{This is a BNF for the language of the compiler project. This grammar was designed to facilitate the syntax-directed translation phase and code generation. In that respect, it is a bit unnatural. } -> . -> program IDENTIFIER ; ! program IDENTIFIER ; . -> var ! const ! const var . -> ; ! ; . -> ; ! ; . -> IDENTIFIER , ! IDENTIFIER : . -> IDENTIFIER = CONSTANT . -> integer ! real . -> begin end . -> ! . -> ; . -> := ! read ( IDENTIFIER ) ! write ( IDENTIFIER ) ! writeln ( IDENTIFIER ) ! write ( CONSTANT ) ! writeln ( CONSTANT ) ! endif ! endif ! endrepeat ! endfor ! endwhile . -> IDENTIFIER . -> else . -> if then . -> repeat . -> until . -> := to do . -> do . -> while . -> for . -> ! . -> ! . -> RELOP ! = ! ( ) ! not . -> or . -> and . -> ADDOP ! . -> MULOP ! . -> ADDOP ! CONSTANT ! IDENTIFIER ! ( )