mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 06:43:03 +00:00
grammar: preserve token declaration order
In a declaration %token A B, the token A is declared before B, but in %left A B (or with %precedence or %nonassoc or %right), the token B was declared before A (tokens were declared in reverse order). * src/symlist.h, src/symlist.c (symbol_list_append): New. * src/parse-gram.y: Use it instead of symbol_list_prepend. * tests/input.at: Adjust expectations.
This commit is contained in:
committed by
Akim Demaille
parent
9b3bb25885
commit
93561c21e8
@@ -445,14 +445,14 @@ input.y:5.10-24: error: %printer redeclaration for <field2>
|
||||
input.y:2.10-24: previous declaration
|
||||
input.y:5.10-24: error: %printer redeclaration for <field2>
|
||||
input.y:5.10-24: previous declaration
|
||||
input.y:11.13-29: error: %destructor redeclaration for <field1>
|
||||
input.y:4.13-29: previous declaration
|
||||
input.y:11.13-29: error: %destructor redeclaration for <field2>
|
||||
input.y:1.13-29: previous declaration
|
||||
input.y:12.10-24: error: %printer redeclaration for <field1>
|
||||
input.y:2.10-24: previous declaration
|
||||
input.y:11.13-29: error: %destructor redeclaration for <field1>
|
||||
input.y:4.13-29: previous declaration
|
||||
input.y:12.10-24: error: %printer redeclaration for <field2>
|
||||
input.y:5.10-24: previous declaration
|
||||
input.y:12.10-24: error: %printer redeclaration for <field1>
|
||||
input.y:2.10-24: previous declaration
|
||||
]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
Reference in New Issue
Block a user