From: Marc Autret Date: Thu, 9 Aug 2001 19:59:29 +0000 (+0000) Subject: * src/bison.simple (YYLLOC_DEFAULT): Update. X-Git-Tag: BISON-1_28c~30 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/ca96bc2d1746215d197ff52c9c2d262e4b4ff075?ds=sidebyside;hp=fd6b609da9661ebab37643153bc02e633de25eb9 * src/bison.simple (YYLLOC_DEFAULT): Update. (yyparse): Adjust. --- 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