[antlr-interest] Combining multiple tokens
gwlist at grahamwideman.com
Sun Oct 18 14:24:42 PDT 2009
I'm not entirely sure I understand the particulars of what you're trying to do
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:
> 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)
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the antlr-interest