]> git.saurik.com Git - bison.git/commitdiff
(b4_lex_param): Corrected for the case where %lex-param is provided
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 29 Apr 2003 06:04:04 +0000 (06:04 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 29 Apr 2003 06:04:04 +0000 (06:04 +0000)
and %pure-parser isn't.

From Tim Van Holder in
<http://mail.gnu.org/archive/html/bug-bison/2003-04/msg00045.html>.

data/yacc.c

index d2a3c558f70413055f45f66b26c0a9dd09e8d269..4ee09fbb3ae9027e3fc9cb971984c7885e00109e 100644 (file)
@@ -58,8 +58,8 @@ m4_ifset([b4_parse_param], [b4_c_args(b4_parse_param), ])])
 # b4_lex_param arrives quoted twice, but we want to keep only one level.
 m4_define([b4_lex_param],
 m4_dquote(b4_pure_if([[[[YYSTYPE *]], [[&yylval]]][]dnl
-b4_location_if([, [[YYLTYPE *], [&yylloc]]])])dnl
-m4_ifdef([b4_lex_param], [, ]b4_lex_param)))
+b4_location_if([, [[YYLTYPE *], [&yylloc]]])m4_ifdef([b4_lex_param], [, ])])dnl
+m4_ifdef([b4_lex_param], b4_lex_param)))