*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.
*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.