2 #include "setl-lexeme.ph"
3 #include "setl-syntax.ph"
9 left: 3 '*' '/' "mod" "div";
11 left: 5 ":=" "with" "less";
13 exp(Exp): literal { $$ = LITexp($1); }
14 | '(' exp ')' { $$ = $2; }
35 exp_list(Exps): { $$ = #[]; }
36 | exp_list_1 { $$ = $1; }
39 exp_list_1(Exps): exp { $$ = #[ $1 ]; }
40 | exp ',' exp_list_1 { $$ = #[ $1 ... $3 ]; }
44 integer { $$ = INTlit($1); }
45 | real { $$ = REALlit($1); }
46 | character { $$ = CHARlit($1); }
47 | string { $$ = STRINGlit($1); }
50 integer(int): INTEGER { $$ = atol(lexer_buf.text()); };
52 character(char): CHARACTER;
53 string(const char*): STRING;