mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Attaching lineno to buckets is stupid, since only one copy of each
symbol is kept, only the line of the first occurrence is kept too. * src/symtab.h, src/symtab.c (bucket): Remove the line member. * src/reader.c (rline_allocated): Remove, unused. (symbol_list): Have a `line' member. (symbol_list_new): New. (readgram): Use it. * src/print.c (print_grammar): Output the rule line numbers. * tests/regression.at (Solved SR Conflicts) (Unresolved SR Conflicts): Adjust. Reported by Hans Aberg.
This commit is contained in:
@@ -65,8 +65,9 @@ AT_CHECK([cat input.output], [],
|
||||
|
||||
Grammar
|
||||
|
||||
rule 1 exp -> exp OP exp
|
||||
rule 2 exp -> NUM
|
||||
Number, Line, Rule
|
||||
1 3 exp -> exp OP exp
|
||||
2 3 exp -> NUM
|
||||
|
||||
Terminals, with rules where they appear
|
||||
|
||||
@@ -163,8 +164,9 @@ AT_CHECK([cat input.output], [],
|
||||
|
||||
Grammar
|
||||
|
||||
rule 1 exp -> exp OP exp
|
||||
rule 2 exp -> NUM
|
||||
Number, Line, Rule
|
||||
1 4 exp -> exp OP exp
|
||||
2 4 exp -> NUM
|
||||
|
||||
Terminals, with rules where they appear
|
||||
|
||||
|
||||
Reference in New Issue
Block a user