[antlr-interest] mild simplification and tree grammars
Giampaolo Tomassoni
Giampaolo at Tomassoni.biz
Tue Apr 20 06:21:00 PDT 2010
> Oops, I see placed the { after the $ earlier, where it should
> be outside the $paramater, like {$parameter}, as in:
>
> protected
> conditionalExpression[CommonTree TheActualASTRoot]
> : QMARK t=expression COMMA f=expression
> -> ^(ITE {$TheActualASTRoot} $t $f)
> |
> ;
Ah, that's it!
Right, it works. Thank you.
I'm a bit astonished with that, then: why a {$var} notation is needed here?
What's the difference with $t and $f, in example?
Giampaolo
More information about the antlr-interest
mailing list