]> git.saurik.com Git - bison.git/commit - tests/actions.at
yacc.c, glr.c: check and fix the display of locations
authorAkim Demaille <akim@lrde.epita.fr>
Fri, 30 Nov 2012 10:19:43 +0000 (11:19 +0100)
committerAkim Demaille <akim@lrde.epita.fr>
Fri, 30 Nov 2012 10:19:43 +0000 (11:19 +0100)
commit3804aa260b956dd012adde3894767254422a5fcf
tree810f6c0138f24980547da7f3f734da8581c75632
parent4c36bc2b8d65cb76480a30b3fcd2d7824ea12de9
yacc.c, glr.c: check and fix the display of locations

In some case, negative column number could be displayed.
Make YY_LOCATION_PRINT similar to bison's own implementation of
locations.  Since the macro is getting fat, make it a static
function.
Reported by Jonathan Fabrizio.

* data/c.m4 (yy_location_print_define): Improve the implementation,
and generate the yy_location_print_ function.
Adjust YY_LOCATION_PRINT.
* tests/actions.at (Location Print): New tests.
THANKS
data/c.m4
tests/actions.at