[antlr-interest] How to push and pop scope using antlr3 c code generator

Yang Yang cometyang at gmail.com
Fri Apr 30 03:52:30 PDT 2010


Hi, All

I'm new to antlr3. I want to wirte a simple parser and do scope pushing and
poping during parsing.
How can i define this in antlr3 grammer rules?

Is there some way to do things like this in antlr grammer rules:

topdown:
   enterBlock|enterFunction { pushScope();}

bottomup:
   exitBlock|exitFunction { popScope(); }


Best regards

Yang


More information about the antlr-interest mailing list