[antlr-interest] Template map question

Dan Stanger dan.stanger at ieee.org
Thu Jan 31 17:49:19 PST 2008


Hello All,
Is there a function to return a list of the maps in a template object?
Also, is there a antlr syntax to retrieve attributes from a template?
I would like to get values stored in a template created by one rule in 
another,
when a grammar is creating templates.
Thanks,
Dan Stanger
Terence Parr wrote:

> On Jan 30, 2008, at 3:28 PM, Dan Stanger wrote:
>
>> Hello All,
>> Is it possible to access a map created in my group file, from the  
>> parser,
>> in a rewrite rule?
>
>
> I believe so yes. just reference it as you would in a group file.
>
>>  I would like to add new mappings to it.
>
>
> oh.  Well, you would need to have an action not a rewrite rule do  
> that. I can't remember the interface, but you would have to ask the 
> ST  group object for its maps.
>
>> Are there code samples for either of these?
>
>
> I don't think so.
> Ter
>



More information about the antlr-interest mailing list