[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07-fyi-rule-0-lineno.patch
From: |
Akim Demaille |
Subject: |
07-fyi-rule-0-lineno.patch |
Date: |
Sat, 29 Dec 2001 15:13:47 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* 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.
Index: src/reader.c
--- src/reader.c Thu, 27 Dec 2001 17:14:11 +0100 akim
+++ src/reader.c Fri, 28 Dec 2001 15:19:22 +0100 akim
@@ -1451,10 +1451,12 @@
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. */
p = symbol_list_new (axiom);
+ p->line = grammar->line;
p->next = symbol_list_new (startval);
p->next->next = symbol_list_new (eoftoken);
p->next->next->next = symbol_list_new (NULL);
Index: tests/regression.at
--- tests/regression.at Fri, 28 Dec 2001 15:16:45 +0100 akim
+++ tests/regression.at Fri, 28 Dec 2001 15:21:13 +0100 akim
@@ -67,7 +67,7 @@ exp: exp OP exp | NUM;
Grammar
Number, Line, Rule
- 0 4 $axiom -> exp $
+ 0 3 $axiom -> exp $
1 3 exp -> exp OP exp
2 3 exp -> NUM
@@ -171,7 +171,7 @@ exp: exp OP exp | NUM;
Grammar
Number, Line, Rule
- 0 5 $axiom -> exp $
+ 0 4 $axiom -> exp $
1 4 exp -> exp OP exp
2 4 exp -> NUM
@@ -296,7 +296,7 @@ expr:
[[Grammar
Number, Line, Rule
- 0 28 $axiom -> expr $
+ 0 2 $axiom -> expr $
1 2 @1 -> /* empty */
2 2 expr -> 'a' @1 'b'
3 15 @2 -> /* empty */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 07-fyi-rule-0-lineno.patch,
Akim Demaille <=