I\'m trying to use flex and bison to create a filter, because I want get certain grammar elements from a complex language. My plan is to use flex + bison to recognise the gr
So, I got this to "work", but with a couple of extra steps (I may have overlooked them here ... apologies in that case):
In parser.y, I had to say:
#define YYLEX_PARAM &yylval, &yylloc
even with %locations
and bison --locations
, to get it to pass the data.
In lexer.l I had to use ->
instead of .
for yylloc
Also in lexer.l, I reset the column in the action:
[\n] { yycolumn = 1; }
Obviously a bit more complex, for \r
etc, but at least I got it to work.