conflicts: 1 reduce/reduce, error: expected ',' or '}' before '.' token

42 Views Asked by At

Problem Part of grammar:

tracelevel
: TRACELEVEL LPAREN IDENT RPAREN         { $$ = makeFuncTraceLevel($3);  }
| TRACELEVEL error                       { $$ = 0; error("Expected 'log(<EV_TRACE>)'");  }
;

category
: CATEGORY LPAREN IDENT RPAREN           { $$ = makeFuncCategory($3);  }
| TRACELEVEL error                       { $$ = 0; error("Expected 'log(<EV_CATE>)'");  }  
;

Warning that I am getting:

edc.y: conflicts: 1 reduce/reduce
edc.y:169.7-93: warning: rule useless in parser due to conflicts: category: TRACELEVEL error

In the category token I tried to replaced "TRACELEVEL error" with "CATEGORY error"

After that I am getting this error:

y.tab.c:135: error: expected ',' or '}' before '.' token
recipe for target 'y.tab.o' failed

the file y.tab.c just contains these kind of things:

CATEGORY = 279,
EVTIDINCL = 280,
MIBINCL = 281,
0

There are 0 best solutions below