mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
doc: clarify what a location is
Reported by Arthur Schwarz <aschwarz1309@att.net> https://lists.gnu.org/r/help-bison/2013-12/msg00009.html * doc/bison.texi (Location Type): here.
This commit is contained in:
1
THANKS
1
THANKS
@@ -20,6 +20,7 @@ Anthony Heading ajrh@ajrh.net
|
|||||||
Antonio Silva Correia amsilvacorreia@hotmail.com
|
Antonio Silva Correia amsilvacorreia@hotmail.com
|
||||||
Arnold Robbins arnold@skeeve.com
|
Arnold Robbins arnold@skeeve.com
|
||||||
Art Haas ahaas@neosoft.com
|
Art Haas ahaas@neosoft.com
|
||||||
|
Arthur Schwarz aschwarz1309@att.net
|
||||||
Askar Safin safinaskar@mail.ru
|
Askar Safin safinaskar@mail.ru
|
||||||
Balázs Scheidler balazs.scheidler@oneidentity.com
|
Balázs Scheidler balazs.scheidler@oneidentity.com
|
||||||
Baron Schwartz baron@sequent.org
|
Baron Schwartz baron@sequent.org
|
||||||
|
|||||||
@@ -4505,12 +4505,17 @@ typedef struct YYLTYPE
|
|||||||
@} YYLTYPE;
|
@} YYLTYPE;
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
While default locations represent a range in the source file(s), this is not
|
||||||
|
a requirement. It could be a single point or just a line number, or even
|
||||||
|
more complex structures.
|
||||||
|
|
||||||
When @code{YYLTYPE} is not defined, at the beginning of the parsing, Bison
|
When @code{YYLTYPE} is not defined, at the beginning of the parsing, Bison
|
||||||
initializes all these fields to 1 for @code{yylloc}. To initialize
|
initializes all these fields to 1 for @code{yylloc}. To initialize
|
||||||
@code{yylloc} with a custom location type (or to chose a different
|
@code{yylloc} with a custom location type (or to chose a different
|
||||||
initialization), use the @code{%initial-action} directive. @xref{Initial
|
initialization), use the @code{%initial-action} directive. @xref{Initial
|
||||||
Action Decl}.
|
Action Decl}.
|
||||||
|
|
||||||
|
|
||||||
@node Actions and Locations
|
@node Actions and Locations
|
||||||
@subsection Actions and Locations
|
@subsection Actions and Locations
|
||||||
@cindex location actions
|
@cindex location actions
|
||||||
@@ -14735,8 +14740,8 @@ In semantic actions, it stores the location of the lookahead token.
|
|||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Type} YYLTYPE
|
@deffn {Type} YYLTYPE
|
||||||
Data type of @code{yylloc}; by default, a structure with four members.
|
Data type of @code{yylloc}. By default in C, a structure with four members
|
||||||
@xref{Location Type}.
|
(start/end line/column). @xref{Location Type}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Variable} yylval
|
@deffn {Variable} yylval
|
||||||
|
|||||||
Reference in New Issue
Block a user