1/16
A set of vocabulary flashcards defining the Backus-Naur Form (BNF) syntax rules for a specific programming language grammar as provided in the lecture notes.
<letter>
a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z
<digit>
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<symbol>
_ | @ | . | ~ | ? | # | $
<char>
<letter> | <digit> | <symbol>
<operator>
+ | - | * | / | % | < | > | == | <= | >= | and | or | not
<identifier>
<letter> | <identifier><char>
<number>
<digit>|<number><digit>
<item>
<identifier> | <number>
<expression>
<item>| (<expression>) | <expression><operator><expression>
<branch>
if <expr>then {<block>} |
if <expr>then {<block>}else {<block>}
<switch>
switch<expr>{<sbody>}
<sbody>
<cases> | <cases>; default :<block>
<cases>
case<value>:<block> |
<cases> ; case<value>:<block>
<loop>
while <expr>do {<block>}
<assignment>
<identifier>=<expression>;
<statement>
<assignment> | <branch> | <loop>
<block>
<statement> | <block>;<statement>