I'm not entirely sure I understand the particulars of what you're trying to do
but...

At 10/18/2009 05:01 PM, Jeffrey Cameron wrote: 
>
> I have two parser rules in my grammar where I am trying to wrap the complete,
> concatenated text of a series of tokens into a single token for a tree
> grammar.  The rules look like this:
>
> #1:
>
> cell : (~(VBAR|EOL))* ;
>
> in this case I would like to write something like this:
>
> cell : (~(VBAR|EOL))* -> TABLECELL[$cell.text] ;


I think you probably want syntax that's more like:

-> ^(TABLECELL, $cell)

See:
http://www.antlr.org/wiki/display/ANTLR3/Tree+construction

If that doesn't get you going, it might be good to post clarifying:

> I am trying to wrap the complete, concatenated text 
> of a series of tokens into a single token for a tree grammar.

... are you are writing this *in* a tree grammar, or in a combined grammar
trying to produce a tree?  Also describe what actual errors you are seeing.

-- Graham
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

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

Reply via email to