I saw that using the -Y option won't result in a
working parser in python. The problem appears to be the
nature of the yyparser() function jumping back and
forth, and of the way an yyerror macro is supposed to
work. Nice to see these problems can be overcome in
perl, where at least you can name loops.
In python, you'll need some more trickery. The
attached file demonstrates a possible approach.
One more thing you need to know: the function below
assigns to a local variable. When the function
returns, the local variable is discarded:
def yyclearin():
yychar = -1
In python, all lvariables that you assign to are local,
unless
explicitely state otherwise. It should be like this:
def yyclearin():
global yychar
yychar = -1
Logged In: YES
user_id=744403
Here is a better (and tested) version of the goto.py that I
submitted earlier.