* data/bison.simple (yyparse): Do not implement @$ = @1.

(YYLLOC_DEFAULT): Adjust to do it.
* doc/bison.texinfo (Location Default Action): Fix.
This commit is contained in:
Akim Demaille
2002-05-02 16:40:54 +00:00
parent 3a8b410924
commit b2d52318fa
4 changed files with 25 additions and 23 deletions

View File

@@ -2886,9 +2886,11 @@ By default, it is defined this way:
@example
@group
#define YYLLOC_DEFAULT(Current, Rhs, N) \
Current.last_line = Rhs[N].last_line; \
Current.last_column = Rhs[N].last_column;
#define YYLLOC_DEFAULT(Current, Rhs, N) \
Current.first_line = Rhs[1].first_line; \
Current.first_column = Rhs[1].first_column; \
Current.last_line = Rhs[N].last_line; \
Current.last_column = Rhs[N].last_column;
@end group
@end example
@@ -2900,12 +2902,8 @@ All arguments are free of side-effects. However, only the first one (the
result) should be modified by @code{YYLLOC_DEFAULT}.
@item
Before @code{YYLLOC_DEFAULT} is executed, the output parser sets @code{@@$}
to @code{@@1}.
@item
For consistency with semantic actions, valid indexes for the location array
range from 1 to @var{n}.
For consistency with semantic actions, valid indexes for the location
array range from 1 to @var{n}.
@end itemize
@node Declarations