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.
This commit is contained in:
Akim Demaille
2021-01-01 18:19:12 +01:00
parent 83f2eb3737
commit 5a4e606275
4 changed files with 98 additions and 61 deletions

4
TODO
View File

@@ -1,4 +1,8 @@
* Soon
** YY_LOCATION_PRINT
This is an internal detail. But it's very handy, we should make it public.
It already has leaked in the documentation by accident.
** glr
There is no test with "Parse on stack %ld rejected by rule %d" in it.