flashdisk
flashdisk

Reputation: 3820

printing token and line causing the parsing error

is there a way to know where did the error happened in the parser ,it means which token did that error and which line, I don't know how to use yylineno which can be easily used in the lex file ? thanks

Upvotes: 0

Views: 228

Answers (1)

akim
akim

Reputation: 8759

You should enable debug traces in both flex (%option debug and set yy_flex_debug to 1) and the parser (%debug and set yydebug to 1). See their documentations.

Upvotes: 1

Related Questions