Improving the quality of error messages produced by the parser

6 views
Skip to first unread message

Iván Pérez

unread,
Aug 10, 2021, 10:39:59 AM8/10/21
to BNFC Developers and Users
Hi everyone,

Right now, the error messages produced by the parser don't help understand what is going on very well.

For example, when I run an apparently invalid C file with a valid C parser, I get:

syntax error at line 2, column 3 before `time`

The file seems correct to me, so this error message doesn't really help me. It would be more helpful if the message was something like: I was trying to parse the following NonTerminals, or I expected one of the following tokens and instead got the following kind of token.

I know that BNFC is partly limited by alex/happy but, can anything be done about this?

Thanks,

Ivan
Reply all
Reply to author
Forward
0 new messages