[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
push parser
From: |
Bob Rossi |
Subject: |
push parser |
Date: |
Sat, 16 Sep 2006 10:53:53 -0400 |
User-agent: |
Mutt/1.5.11 |
Hi,
The user interface to the push parser currently looks like this:
int
yyparse (void)
{
struct yypvars *ctx = yypvarsinit ();
int status;
do {
yychar_set (ctx, yylex ());
yylval_set (ctx, yylval);
#ifdef YYLTYPE_IS_TRIVIAL
yylloc_set (ctx, yylloc);
#endif
yypushparse (ctx);
status = yyresult_get (ctx);
} while (status == 4);
free (ctx);
return status;
}
In particular, I don't like this line:
} while (status == 4);
The number 4 should be put in either a #define, or a function call.
Which one is preferable? The #define would probably be more efficient.
If so, what would be a good name?
Thanks,
Bob Rossi
- push parser,
Bob Rossi <=
- Re: push parser, Paul Eggert, 2006/09/16
- Re: push parser, Bob Rossi, 2006/09/18
- Re: push parser, Paul Eggert, 2006/09/18
- Re: push parser, Bob Rossi, 2006/09/20
- Re: push parser, Paul Eggert, 2006/09/21
- Re: push parser, Bob Rossi, 2006/09/21
- Re: push parser, Bob Rossi, 2006/09/25
- Re: push parser, Bob Rossi, 2006/09/25
- Re: push parser, Paul Eggert, 2006/09/26
- Re: push parser, Bob Rossi, 2006/09/26