Lrama always turned on %locations unlike Bison
Closed this issue · 3 comments
matz commented
When bison file specifies %define api.pure
, Bison calls yylex
as yylex (&yylval)
but lrama calls yylex (&yylval, &yylloc)
, which is Bison's behavior for %define api.pure full
. I will update the bison input, but it is a compatibility issue anyway.
matz commented
Upon further investigation, it appears that the problem is that lrama has %locations
directive set by default (default off in Bison).
matz commented
As a workaround, we have added @1
in the rules. But we still prefer no YYLTYPE
passed to yyerror
and yylex
.
matz commented
Thank you!