Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue with locations of parse errors
If you change your grammar in such a way that, for some strange reason, you want each upper-case letter to be followed by an 'x', the resulting rules in mc_parser.yy could look like this: item : UPPER 'x' { driver.add_upper(); } ... ; Now if your parser encounters an upper-case letter and then a character that is not 'x', it would report an error. However, the printed location is always line 1, column 1. The proposed change should fix that.
- Loading branch information