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.
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.