From ca96bc2d1746215d197ff52c9c2d262e4b4ff075 Mon Sep 17 00:00:00 2001 From: Marc Autret Date: Thu, 9 Aug 2001 19:59:29 +0000 Subject: [PATCH 1/1] * src/bison.simple (YYLLOC_DEFAULT): Update. (yyparse): Adjust. --- ChangeLog | 5 +++++ src/bison.simple | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5360599b..d266f411 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-08-09 Robert Anisko + + * src/bison.simple (YYLLOC_DEFAULT): Update. + (yyparse): Adjust. + 2001-08-08 Marc Autret * doc/bison.texinfo: Change @samp{$<@dots{}>} to diff --git a/src/bison.simple b/src/bison.simple index e2b5d6fb..7a374ee5 100644 --- a/src/bison.simple +++ b/src/bison.simple @@ -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 -- 2.45.2