Hi all

I have the following grammar fragment (with template output) that  
parses an AST and translates it to a text representation.  The parsing  
works fine and I'm reading in the template group just fine.

The problem that seems to be happening below is that 'prefixed_name'  
is being correctly recognized and the template returned, but the  
'name' production is not passing that template back up to the 'name'  
non-terminal in the top rule for inclusion in the template rewrite.   
Is there some switch I'm forgetting to set or do I need to do  
something explicit with the second rule to make sure the template gets  
propagated.

Thanks in advance

text_block
        : ^(AS_TEXT name phrase+)
          -> text(name={$name.st})
        ;

name
        : prefixed_name
        ;
        
prefixed_name
        : ^(AS_NAME AS_NAME_NS AS_NAME_LOCAL)
          -> name(ns={$AS_NAME_NS.text},local={$AS_NAME_LOCAL.text})
        ;


        .bill



List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to