mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +00:00
* src/reader.c (readgram): Bind the initial rule's lineno to that
of the first rule. * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts): (Solved SR Conflicts): Adjust rule 0's line number.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2001-12-29 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* src/reader.c (readgram): Bind the initial rule's lineno to that
|
||||||
|
of the first rule.
|
||||||
|
* tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
|
||||||
|
(Solved SR Conflicts): Adjust rule 0's line number.
|
||||||
|
|
||||||
|
|
||||||
2001-12-29 Akim Demaille <akim@epita.fr>
|
2001-12-29 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
Fix the `GAWK Grammar' failure.
|
Fix the `GAWK Grammar' failure.
|
||||||
|
|||||||
@@ -1451,10 +1451,12 @@ readgram (void)
|
|||||||
t = lex ();
|
t = lex ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Insert the initial rule:
|
/* Insert the initial rule, which line is that of the first rule
|
||||||
|
(not that of the start symbol):
|
||||||
|
|
||||||
axiom: %start EOF. */
|
axiom: %start EOF. */
|
||||||
p = symbol_list_new (axiom);
|
p = symbol_list_new (axiom);
|
||||||
|
p->line = grammar->line;
|
||||||
p->next = symbol_list_new (startval);
|
p->next = symbol_list_new (startval);
|
||||||
p->next->next = symbol_list_new (eoftoken);
|
p->next->next = symbol_list_new (eoftoken);
|
||||||
p->next->next->next = symbol_list_new (NULL);
|
p->next->next->next = symbol_list_new (NULL);
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ AT_CHECK([cat input.output], [],
|
|||||||
Grammar
|
Grammar
|
||||||
|
|
||||||
Number, Line, Rule
|
Number, Line, Rule
|
||||||
0 4 $axiom -> exp $
|
0 3 $axiom -> exp $
|
||||||
1 3 exp -> exp OP exp
|
1 3 exp -> exp OP exp
|
||||||
2 3 exp -> NUM
|
2 3 exp -> NUM
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ AT_CHECK([cat input.output], [],
|
|||||||
Grammar
|
Grammar
|
||||||
|
|
||||||
Number, Line, Rule
|
Number, Line, Rule
|
||||||
0 5 $axiom -> exp $
|
0 4 $axiom -> exp $
|
||||||
1 4 exp -> exp OP exp
|
1 4 exp -> exp OP exp
|
||||||
2 4 exp -> NUM
|
2 4 exp -> NUM
|
||||||
|
|
||||||
@@ -296,7 +296,7 @@ AT_CHECK([cat input.output], [],
|
|||||||
[[Grammar
|
[[Grammar
|
||||||
|
|
||||||
Number, Line, Rule
|
Number, Line, Rule
|
||||||
0 28 $axiom -> expr $
|
0 2 $axiom -> expr $
|
||||||
1 2 @1 -> /* empty */
|
1 2 @1 -> /* empty */
|
||||||
2 2 expr -> 'a' @1 'b'
|
2 2 expr -> 'a' @1 'b'
|
||||||
3 15 @2 -> /* empty */
|
3 15 @2 -> /* empty */
|
||||||
|
|||||||
Reference in New Issue
Block a user