Shift/reduce error in YACC parser
Hi!Im trying to make a simple parser to load old tekstfiles in to a database using the YACC parser. The YACC code looks like this: it gives a shift/reduce error because of an ambiguity. What can be the error?
%token <int> INCOME
%token <string> NAME
%token EOF
%start COMP
%%
COMP: DEPTList EOF {Comp($1)};
DEPT: NAME INCOME DEPTList {Dept($1,$2,$3) };
DEPTList: { [] }
| DEPT DEPTList { $1::$2 };
I dont know if this is the right place to put the qustion, but please help me!!!
