On Sun, 2 May 2010, falcore wrote:

> I´m using a parser to analize strings introduced interactively from the
> standard output. There is a call to yyparse() inside a loop, something like
> that

> Well, the first time is called works fine, but in consecutively calls, the
> parser fails.
> 
> It fails because the internal state and the stack do not restart themselves.

A Bison-generated yyparse does not maintain state between invocations.

However, between yyparse's invocations of your scanner, your scanner must 
remember, for example, where it is in the input string, so you should 
figure out how to point the scanner to a new string.
_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to