-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] yypushStream/yypopStream-Bug [sf#49] #51
Comments
Commented by lsf37 on 2002-01-19 15:51 UTC |
Commented by lsf37 on 2002-01-19 15:51 UTC I've reproduced the bug, and it is as you write a problem ps: the cached variables are for speed. access to a local |
Updated by lsf37 on 2002-01-19 15:51 UTC
|
Updated by lsf37 on 2004-04-12 12:26 UTC
|
*Reported by anonymous on 2001-12-20 14:21 UTC
Diagnosis:
yypushStream()/yypopStream() do not save/restore the
whole scanner state context. At least the "cached
variables" xxx_1 are not saved/restored (what are they
good for?). So, after yypushStream, the scanner partly
remains in the state before pushing, which leads to
invalid results or an exception. After the
<<EOF>>-yypopStream, the scanner terminated, forgetting
the input from the restored stream.
Workaround:
in my example, push/pop was always at token boundaries,
so I could afford to make a recursive call to yynext()
immediately after push/pop.
Thanks a lot for maintaining this great tool!
Best regards,
Heiner.
The text was updated successfully, but these errors were encountered: