eryjus / ast-cc

An Abstract Syntax Tree compiler
1 stars 0 forks source link

Improve parsing error messages #9

Closed eryjus closed 8 years ago

eryjus commented 8 years ago

The syntax error is not descriptive enough. There is a way to have bison generate a little more useful syntax error indicating what was expected. Need to investigate and implement better error messages.

eryjus commented 8 years ago

sounds silly to have missed this, but adding '%error-verbose' to the .yy file created the desired error messages. Additionally, I added the token description to the end of the %token line for each token.