Closed zosrothko closed 8 years ago
I'm of mixed feelings about this change. While enums are generally better than #define
s, the POSIX yacc spec requires that tokens be defined as macros. This can come up with someone using #ifdef TOKEN
in their lexer code.
OK, I didn't know about the POSIX requirments of #define in the generated parser.. So I will close this PR.
Hi
This PR brings enum to btyacc: -- btyacc is using enum instead of predefined constants in defs.h -- btyacc generates enum [class] YYTOKEN instead of predefined constants for the tokens.
Also, yyname is no more static to allow access of the symbol's name from outside the compile unit.