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

Jim Idle jimi at temporal-wave.com
Fri Apr 30 07:49:50 PDT 2010


Just use the built in global scopes.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Yang Yang
> Sent: Friday, April 30, 2010 3:53 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] How to push and pop scope using antlr3 c code
> generator
> 
> 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
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address





More information about the antlr-interest mailing list