%% %term EOF | ID of string | INT of int | STRING of string | COMMA | COLON | SEMICOLON | LPAREN | RPAREN | LBRACK | RBRACK | LBRACE | RBRACE | DOT | PLUS | MINUS | TIMES | DIVIDE | EQ | NEQ | LT | LE | GT | GE | AND | OR | ASSIGN | ARRAY | IF | THEN | ELSE | WHILE | FOR | TO | DO | LET | IN | END | OF | BREAK | NIL | FUNCTION | VAR | TYPE %nonterm exp | program %pos int %verbose %start program %eop EOF %noshift EOF %name Tiger %keyword WHILE FOR TO BREAK LET IN END FUNCTION VAR TYPE ARRAY IF THEN ELSE DO OF NIL %prefer THEN ELSE LPAREN %value ID ("bogus") %value INT (1) %value STRING ("") %% (* This is a skeleton grammar file, meant to illustrate what kind of * declarations are necessary above the %% mark. Students are expected * to replace the two dummy productions below with an actual grammar. *) program : exp () exp: ()