[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: push parser
From: |
Bob Rossi |
Subject: |
Re: push parser |
Date: |
Mon, 30 Jul 2007 21:24:43 -0400 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Mon, Jul 02, 2007 at 10:16:13AM -0400, Joel E. Denny wrote:
> %push-pull-parser adds yypull_parse, which is a wrapper around
> yypush_parse that invokes yylex in a loop. For example, one can
> yypush_parse tokens to select a subgrammar and then yypull_parse the rest
> of the input stream.
Hi Joel,
I can see that it would be possible to yypush_parse for a while, and
then call yypull_parse. However, would it be possible to start calling
yypush_parse after yypull_parse returned? The loop in yypull_parse
currently looks like,
do {
yychar = YYLEX;
yystatus =
yypush_parse (yyps_local);
} while (yystatus == YYPUSH_MORE);
so I'm thinking the only point it would end is when the grammar is
finished. That is yystatus != YYPUSH_MORE.
I think it should allow the user to break out on certain circumstances?
Am I missing something?
Thanks,
Bob Rossi