__________________________________________________________________ Syntax of Mini-Pascal (Welsh & McKeag, 1980) __________________________________________________________________ Syntax in recursive descent order __________________________________________________________________ ::= program ; . ::= __________________________________________________________________ ::= | var ; { ; } ::= { , } : ::= | ::= array [ ] of ::= .. ::= ::= __________________________________________________________________ ::= { ; } ::= procedure ; __________________________________________________________________ ::= ::= begin { ; } end ::= | __________________________________________________________________ ::= | | | ::= := ::= ::= ::= read ( { , } ) ::= ::= write ( { , } ) ::= __________________________________________________________________ ::= | | ::= if then | if then else ::= while do __________________________________________________________________ ::= | ::= { } ::= { } ::= | | ( ) | not __________________________________________________________________ ::= = | <> | < | <= | >= | > ::= + | - | ::= + | - | or ::= * | div | and __________________________________________________________________ ::= | ::= [ ] ::= ::= ::= __________________________________________________________________ Lexical grammar __________________________________________________________________ ::= | | ::= ::= { } ::= | ::= { } ::= '< any character other than ' >' | '''' ::= 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 | 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 ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ::= + | - | * | = | <> | < | > | <= | >= | ( | ) | [ | ] | := | . | , | ; | : | .. | div | or | and | not | if | then | else | of | while | do | begin | end | read | write | var | array | procedure | program ::= integer | Boolean | true | false __________________________________________________________________