mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-23 11:13:03 +00:00
parser: deprecate %nterm
It has several weaknesses. Reported by Rici Lake. http://lists.gnu.org/archive/html/bug-bison/2018-10/msg00000.html * src/scan-gram.l: here.
This commit is contained in:
@@ -210,7 +210,7 @@ AT_DATA_GRAMMAR([input.yy],
|
||||
[[%skeleton "lalr1.cc"
|
||||
%define api.value.automove
|
||||
%token <int> NUMBER "number"
|
||||
%nterm <int> exp
|
||||
%type <int> exp
|
||||
%%
|
||||
exp:
|
||||
"number" { $$ = $1; $$; }
|
||||
@@ -576,7 +576,7 @@ AT_DATA_GRAMMAR([[input.y]],
|
||||
}
|
||||
|
||||
%token <int> NUMBER;
|
||||
%nterm <int> expr;
|
||||
%type <int> expr;
|
||||
%token EOI 0;
|
||||
%printer { yyo << $$; } <int>;
|
||||
%destructor { std::cerr << "destroy: " << $$ << '\n'; } <int>
|
||||
|
||||
Reference in New Issue
Block a user