* data/c.m4 (b4_location_initial_column, b4_location_initial_line):

New, default to 1.
* data/yacc.c, data/glr.c, data/location.cc: Use them.
* NEWS, doc/bison.texinfo: The initial column and line are 1 by
default.
* tests/calc.at: Adjust.
This commit is contained in:
Akim Demaille
2006-07-08 20:38:14 +00:00
parent 8ec0a172bc
commit cd48d21d94
8 changed files with 48 additions and 30 deletions

View File

@@ -2303,8 +2303,8 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
yylval = yyval_default;
]b4_locations_if([
#if YYLTYPE_IS_TRIVIAL
yylloc.first_line = yylloc.last_line = 1;
yylloc.first_column = yylloc.last_column = 0;
yylloc.first_line = yylloc.last_line = ]b4_location_initial_line[;
yylloc.first_column = yylloc.last_column = ]b4_location_initial_column[;
#endif
])
m4_ifdef([b4_initial_action], [