mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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:
@@ -607,7 +607,6 @@ $5
|
||||
{
|
||||
int ival;
|
||||
}])
|
||||
AT_LALR1_CC_IF([%define global_tokens_and_yystype])
|
||||
m4_ifval([$6], [[%code provides {]], [[%code {]])
|
||||
AT_LALR1_CC_IF([typedef yy::location YYLTYPE;])[
|
||||
]AT_YYLEX_DECLARE[
|
||||
|
||||
Reference in New Issue
Block a user