* data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.

(yylval, yylloc): If pure, #define to yystackp->yyval and
yystackp->yyloc similar to yychar and yynerrs.
(yyparse): If pure, remove local yylval and yylloc. Add local
yystackp to accommodate pure definitions of yylval and yylloc.
(b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
yylvalp and yyllocp to &yylval and &yylloc.
(nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
namespace. Previously, nerrs and char were missing, but lval and lloc
weren't necessary.
(yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
yylvalp and yyllocp parameters since, if pure, these are now always
accessible through yystackp.  If not pure, they are still accessible
globally.
* data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
`if (YYID (N))' to pacify lint.
This commit is contained in:
Akim Demaille
2005-12-21 15:33:13 +00:00
parent a85284cfbd
commit d6cff4dc6f
3 changed files with 73 additions and 60 deletions

View File

@@ -587,7 +587,7 @@ while (YYID (0))
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
if (N) \
if (YYID (N)) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \