- remove the main from the scanner.l
- remove all the
#define [TOKEN] [INDEX]
inscanner.l
(we define them in parser.y with%token
) - add
#include "parser.h"
in yourscanner.l
- add a
#pragma token on
and#pragma token off
to control[INFO]
andtoken(type:...)...
message, default is off
Please follow the grammar in 01-minipascal-spec.pdf
to write your syntax rule in parser.y
.