c++: get rid of global_tokens_and_yystype

This was a hack to make it easier for people to migrate from yacc.c to
lalr1.cc and from glr.c to glr.cc: when set, YYSTYPE and YYLTYPE were
`#defined`.  It was never documented (just mentioned in NEWS for Bison
2.2, 2006-05-19), but was used to simplify the test suite.  Stop that:
adjust the test suite to the skeletons, not the converse.

In C++ use yy::parser::semantic_type, yy::parser::location_type, and
yy::parser::token::MY_TOKEN, instead of YYSTYPE, YYLTYPE and MY_TOKEN.

* data/skeletons/glr.cc, data/skeletons/lalr1.cc: Remove its support.
* tests/actions.at, tests/c++.at, tests/calc.at: Adjust.
This commit is contained in:
Akim Demaille
2020-06-16 08:01:48 +02:00
parent e077bf1ebc
commit efb65daa36
6 changed files with 4 additions and 28 deletions

3
TODO
View File

@@ -41,9 +41,6 @@ Use "•" instead of ".".
Not all the conflicts have counterexamples generated. See the "break"s in
counterexample_report_state.
** glr.cc
Get rid of global_tokens_and_yystype.
** Bistromathic
- Hitting tab on a line with a syntax error is ugly