* doc/bison.texinfo: Use "location" consistently to refer to @n,

to avoid confusions with lalr1.cc's notion of Position.
Suggested by Paul Eggert.
This commit is contained in:
Akim Demaille
2003-02-21 08:07:57 +00:00
parent 2cdc240eeb
commit 95923bd6a6
2 changed files with 20 additions and 14 deletions

View File

@@ -1,3 +1,9 @@
2003-02-21 Akim Demaille <akim@epita.fr>
* doc/bison.texinfo: Use "location" consistently to refer to @n,
to avoid confusions with lalr1.cc's notion of Position.
Suggested by Paul Eggert.
2003-02-20 Akim Demaille <akim@epita.fr> 2003-02-20 Akim Demaille <akim@epita.fr>
* data/lalr1.cc (position.hh): Make sure "columns" never pushes * data/lalr1.cc (position.hh): Make sure "columns" never pushes

View File

@@ -237,7 +237,7 @@ The Lexical Analyzer Function @code{yylex}
* Calling Convention:: How @code{yyparse} calls @code{yylex}. * Calling Convention:: How @code{yyparse} calls @code{yylex}.
* Token Values:: How @code{yylex} must return the semantic value * Token Values:: How @code{yylex} must return the semantic value
of the token it has read. of the token it has read.
* Token Positions:: How @code{yylex} must return the text position * Token Locations:: How @code{yylex} must return the text location
(line number, etc.) of the token, if the (line number, etc.) of the token, if the
actions want that. actions want that.
* Pure Calling:: How the calling convention differs * Pure Calling:: How the calling convention differs
@@ -855,12 +855,12 @@ will suffice. Otherwise, we suggest
@node Locations Overview @node Locations Overview
@section Locations @section Locations
@cindex location @cindex location
@cindex textual position @cindex textual location
@cindex position, textual @cindex location, textual
Many applications, like interpreters or compilers, have to produce verbose Many applications, like interpreters or compilers, have to produce verbose
and useful error messages. To achieve this, one must be able to keep track of and useful error messages. To achieve this, one must be able to keep track of
the @dfn{textual position}, or @dfn{location}, of each syntactic construct. the @dfn{textual location}, or @dfn{location}, of each syntactic construct.
Bison provides a mechanism for handling these locations. Bison provides a mechanism for handling these locations.
Each token has a semantic value. In a similar fashion, each token has an Each token has a semantic value. In a similar fashion, each token has an
@@ -3071,8 +3071,8 @@ actually does to implement mid-rule actions.
@node Locations @node Locations
@section Tracking Locations @section Tracking Locations
@cindex location @cindex location
@cindex textual position @cindex textual location
@cindex position, textual @cindex location, textual
Though grammar rules and semantic actions are enough to write a fully Though grammar rules and semantic actions are enough to write a fully
functional parser, it can be useful to process some additional information, functional parser, it can be useful to process some additional information,
@@ -3971,7 +3971,7 @@ that need it. @xref{Invocation, ,Invoking Bison}.
* Calling Convention:: How @code{yyparse} calls @code{yylex}. * Calling Convention:: How @code{yyparse} calls @code{yylex}.
* Token Values:: How @code{yylex} must return the semantic value * Token Values:: How @code{yylex} must return the semantic value
of the token it has read. of the token it has read.
* Token Positions:: How @code{yylex} must return the text position * Token Locations:: How @code{yylex} must return the text location
(line number, etc.) of the token, if the (line number, etc.) of the token, if the
actions want that. actions want that.
* Pure Calling:: How the calling convention differs * Pure Calling:: How the calling convention differs
@@ -4104,8 +4104,8 @@ then the code in @code{yylex} might look like this:
@end group @end group
@end example @end example
@node Token Positions @node Token Locations
@subsection Textual Positions of Tokens @subsection Textual Locations of Tokens
@vindex yylloc @vindex yylloc
If you are using the @samp{@@@var{n}}-feature (@pxref{Locations, , If you are using the @samp{@@@var{n}}-feature (@pxref{Locations, ,
@@ -4148,7 +4148,7 @@ yylex (YYSTYPE *lvalp, YYLTYPE *llocp)
@end example @end example
If the grammar file does not use the @samp{@@} constructs to refer to If the grammar file does not use the @samp{@@} constructs to refer to
textual positions, then the type @code{YYLTYPE} will not be defined. In textual locations, then the type @code{YYLTYPE} will not be defined. In
this case, omit the second argument; @code{yylex} will be called with this case, omit the second argument; @code{yylex} will be called with
only one argument. only one argument.
@@ -4410,7 +4410,7 @@ errors. This is useful primarily in error rules.
@deffn {Value} @@$ @deffn {Value} @@$
@findex @@$ @findex @@$
Acts like a structure variable containing information on the textual position Acts like a structure variable containing information on the textual location
of the grouping made by the current rule. @xref{Locations, , of the grouping made by the current rule. @xref{Locations, ,
Tracking Locations}. Tracking Locations}.
@@ -4436,7 +4436,7 @@ Tracking Locations}.
@deffn {Value} @@@var{n} @deffn {Value} @@@var{n}
@findex @@@var{n} @findex @@@var{n}
Acts like a structure variable containing information on the textual position Acts like a structure variable containing information on the textual location
of the @var{n}th component of the current rule. @xref{Locations, , of the @var{n}th component of the current rule. @xref{Locations, ,
Tracking Locations}. Tracking Locations}.
@end deffn @end deffn
@@ -6562,8 +6562,8 @@ External variable in which @code{yylex} should place the line and column
numbers associated with a token. (In a pure parser, it is a local numbers associated with a token. (In a pure parser, it is a local
variable within @code{yyparse}, and its address is passed to variable within @code{yyparse}, and its address is passed to
@code{yylex}.) You can ignore this variable if you don't use the @code{yylex}.) You can ignore this variable if you don't use the
@samp{@@} feature in the grammar actions. @xref{Token Positions, @samp{@@} feature in the grammar actions. @xref{Token Locations,
,Textual Positions of Tokens}. ,Textual Locations of Tokens}.
@end deffn @end deffn
@deffn {Variable} yynerrs @deffn {Variable} yynerrs