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 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
2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
In warnings, say "previous declaration" rather than "first
{
/* Bison's grammar can initial empty locations, hence a default
location is needed. */
{
/* 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"
}
/* Line 1085 of yacc.c. */
#line 1592 "parse-gram.c"
{
/* Bison's grammar can initial empty locations, hence a default
location is needed. */
{
/* 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. */
}
/* Only NUMBERS have a value. */
code_start = scanner_cursor = loc->start; \
/* Location of scanner cursor. */
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);
#define YY_USER_ACTION location_compute (loc, &scanner_cursor, yytext, yyleng);
AT_DATA([input.y], [])
AT_CHECK([bison input.y], [1], [],
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
[{}
])
AT_CHECK([bison input.y], [1], [],
[{}
])
AT_CHECK([bison input.y], [1], [],
-[[input.y:1.0-1: syntax error, unexpected {...}
+[[input.y:1.1-2: syntax error, unexpected {...}