help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: push parser


From: Joel E. Denny
Subject: Re: push parser
Date: Mon, 30 Jul 2007 21:40:49 -0400 (EDT)

On Mon, 30 Jul 2007, Bob Rossi wrote:

> 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?

Yes, but that would start a new parse.

> 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?

My plan for yypull_parse was reading the rest of the input stream.  If the 
user wants to be able to pause the parse, he could just write his own loop 
similar to the one in yypull_parse.  If you're proposing that we extend 
yypull_parse to make this easier, I'm open to suggestions, but I don't 
have much time to work on the implementation right now.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]