[antlr-interest] v3: Can someone explain ^^ to me in a Parser?

Terence Parr parrt at cs.usfca.edu
Sun Jan 28 21:52:26 PST 2007


On Jan 28, 2007, at 9:33 PM, Mark Mandel wrote:

> Okay.. I'm beating my head against this one - every time I try and
> place '^^' on a node, I get the error that it is a 'unexpected token'
> ^.

if you're using > 3.0b5 it's just '^'.  Use the -> rewrite stuff if  
you can; the ^ and ! etc.. only make sense for expressions now.

You've probably seen this, but...

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

Ter

>
> So, while I believe I understand what it does - can someone please
> explain to me:
>
> 1) Against what aspect of a grammar do I put it next to?
> 2) Exactly the scenario you would use this in? I think I get it, but
> the XML tutorial wasn't very clear on this point.
>
> Thanks in advance, I can't seem to wrap my head around this aspect  
> of it.
>
> Mark
>
> -- 
> E: mark.mandel at gmail.com
> W: www.compoundtheory.com



More information about the antlr-interest mailing list