mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
* 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:
@@ -1998,7 +1998,9 @@ type for storing locations is not needed: we will use the type provided
|
||||
by default (@pxref{Location Type, ,Data Types of Locations}), which is a
|
||||
four member structure with the following integer fields:
|
||||
@code{first_line}, @code{first_column}, @code{last_line} and
|
||||
@code{last_column}.
|
||||
@code{last_column}. By conventions, and in accordance with the GNU
|
||||
Coding Standards and common practice, the line and column count both
|
||||
start at 1.
|
||||
|
||||
@node Ltcalc Rules
|
||||
@subsection Grammar Rules for @code{ltcalc}
|
||||
@@ -3512,6 +3514,9 @@ typedef struct YYLTYPE
|
||||
@} YYLTYPE;
|
||||
@end example
|
||||
|
||||
At the beginning of the parsing, Bison initializes all these fields to 1
|
||||
for @code{yylloc}.
|
||||
|
||||
@node Actions and Locations
|
||||
@subsection Actions and Locations
|
||||
@cindex location actions
|
||||
|
||||
Reference in New Issue
Block a user