glr2.cc: introduce the yytranslate_ member function
commit4aa731d110111ae658ea632322e46c1a3f475946
authorAkim Demaille <akim.demaille@gmail.com>
Sun, 10 Jan 2021 12:38:35 +0000 (10 13:38 +0100)
committerAkim Demaille <akim.demaille@gmail.com>
Sun, 10 Jan 2021 16:04:06 +0000 (10 17:04 +0100)
tree3b7e2e9fe47ccc11544c0d4acb742f51fa638c46
parent3ad6d862b7011e158195426cbb2267ca0128174f
glr2.cc: introduce the yytranslate_ member function

* data/skeletons/c++.m4 (b4_yytranslate_define): Use static_cast
rather than the YY_CAST macro.
Avoids the need to define YY_CAST in the header.
* data/skeletons/glr2.cc: Fix calls to b4_shared_declarations: pass
the type of file we are in.
Don't define YYTRANSLATE.
(parser::yytranslate_): New, as in lalr1.cc.
Adjust to use it.

* tests/glr-regression.at: Adjust.
data/skeletons/c++.m4
data/skeletons/glr2.cc
tests/glr-regression.at