bison/flex: print erroneous line

Viewed 9915

I am using bison+flex to parse file. On error yyerror() is invoked. How can I get the line number or string that is violating the rules, to print it with the error message?

2 Answers
Related