help-bison
[Top][All Lists]
Advanced

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

go back to initial state - yyparse()


From: falcore
Subject: go back to initial state - yyparse()
Date: Sun, 2 May 2010 20:27:36 +0200

Hello,


I wonder if you could give me some kind of advice using bison.


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


while(.....){

.....

.....

yyparse();

.....

.....

}


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.


To restart it i have to introduce another string that obviously will produce
an error

because you are in a final state and forces the parser to go back to state 0
with an empty stack


There is some way to restart the parser manually after recognition of a
correct string ?


thank you for your time


falcore


reply via email to

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