glr.c: example: several improvements
commit5a4e6062751043e43e260961336d8dafb83ae63e
authorAkim Demaille <akim.demaille@gmail.com>
Fri, 1 Jan 2021 17:19:12 +0000 (1 18:19 +0100)
committerAkim Demaille <akim.demaille@gmail.com>
Sat, 2 Jan 2021 06:36:35 +0000 (2 07:36 +0100)
treea16bc180a75d7e9b48408f225a6e6618a640a803
parent83f2eb3737b8037c79796dcb1648818d50897fc8
glr.c: example: several improvements

* examples/c/glr/c++-types.y (node_print): New.
Use YY_LOCATION_PRINT instead of duplicating it.
And actually use it in the action instead of badly duplicating it.
(main): Add proper option support.
* examples/c/glr/c++-types.test: Adjust expectations on locations.
* examples/c++/glr/c++-types.yy: Fix bad iteration.
TODO
examples/c++/glr/c++-types.yy
examples/c/glr/c++-types.test
examples/c/glr/c++-types.y