mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
In the grammar file, the first column is 1 not 0 on the first line as
on every other line. * src/parse-gram.y (%initial-action): Initialize @$ correctly. * tests/input.at (Torturing the Scanner): Update output. * src/scan-gram.l (scanner_cursor): Declare it static.
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||
|
||||
In the grammar file, the first column is 1 not 0 on the first line as
|
||||
on every other line.
|
||||
* src/parse-gram.y (%initial-action): Initialize @$ correctly.
|
||||
* tests/input.at (Torturing the Scanner): Update output.
|
||||
|
||||
* src/scan-gram.l (scanner_cursor): Declare it static.
|
||||
|
||||
2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||
|
||||
In warnings, say "previous declaration" rather than "first
|
||||
|
||||
@@ -1584,8 +1584,8 @@ YYLTYPE yylloc;
|
||||
{
|
||||
/* Bison's grammar can initial empty locations, hence a default
|
||||
location is needed. */
|
||||
boundary_set (&yylloc.start, current_file, 1, 0);
|
||||
boundary_set (&yylloc.end, current_file, 1, 0);
|
||||
boundary_set (&yylloc.start, current_file, 1, 1);
|
||||
boundary_set (&yylloc.end, current_file, 1, 1);
|
||||
}
|
||||
/* Line 1085 of yacc.c. */
|
||||
#line 1592 "parse-gram.c"
|
||||
|
||||
@@ -88,8 +88,8 @@ static int current_prec = 0;
|
||||
{
|
||||
/* Bison's grammar can initial empty locations, hence a default
|
||||
location is needed. */
|
||||
boundary_set (&@$.start, current_file, 1, 0);
|
||||
boundary_set (&@$.end, current_file, 1, 0);
|
||||
boundary_set (&@$.start, current_file, 1, 1);
|
||||
boundary_set (&@$.end, current_file, 1, 1);
|
||||
}
|
||||
|
||||
/* Only NUMBERS have a value. */
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
code_start = scanner_cursor = loc->start; \
|
||||
|
||||
/* Location of scanner cursor. */
|
||||
boundary scanner_cursor;
|
||||
static boundary scanner_cursor;
|
||||
|
||||
#define YY_USER_ACTION location_compute (loc, &scanner_cursor, yytext, yyleng);
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ AT_SETUP([Torturing the Scanner])
|
||||
|
||||
AT_DATA([input.y], [])
|
||||
AT_CHECK([bison input.y], [1], [],
|
||||
[[input.y:1.0: syntax error, unexpected end of file
|
||||
[[input.y:1.1: syntax error, unexpected end of file
|
||||
]])
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ AT_DATA([input.y],
|
||||
[{}
|
||||
])
|
||||
AT_CHECK([bison input.y], [1], [],
|
||||
[[input.y:1.0-1: syntax error, unexpected {...}
|
||||
[[input.y:1.1-2: syntax error, unexpected {...}
|
||||
]])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user