* src/bison.simple (YYLLOC_DEFAULT): Update.

(yyparse): Adjust.
This commit is contained in:
Marc Autret
2001-08-09 19:59:29 +00:00
parent fd6b609da9
commit ca96bc2d17
2 changed files with 9 additions and 4 deletions

View File

@@ -119,9 +119,9 @@ while (0)
its range to the last symbol. */
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Last) \
Current.last_line = Last.last_line; \
Current.last_column = Last.last_column;
# define YYLLOC_DEFAULT(Current, Rhs, N) \
Current.last_line = Rhs[N].last_line; \
Current.last_column = Rhs[N].last_column;
#endif
@@ -592,7 +592,7 @@ yyreduce:
/* Similarly for the default location. Let the user run additional
commands if for instance locations are ranges. */
yyloc = yylsp[1-yylen];
YYLLOC_DEFAULT (yyloc, yylsp[0]);
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
#endif
#if YYDEBUG