[antlr-interest] tree construction ?
Chris Snyder
snyder at t-vec.com
Tue Apr 1 13:10:12 PDT 2008
This seems to do what I wanted:
completeExpression
: e1=expression ( NEWLINE | SEMI | (ASSIGN e2=expression
(NEWLINE|SEMI)) -> ^(ASSIGN $e2 $e1) )
;
Chris
_____
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Chris Snyder
Sent: Tuesday, April 01, 2008 3:05 PM
To: antlr-interest at antlr.org
Subject: [antlr-interest] tree construction ?
Hello,
I'm using Antlr 3 with this tree construction statement
completeExpression
: expression ( NEWLINE! | SEMI! | (ASSIGN^ expression (NEWLINE!|SEMI!)) )
;
I would like the order of the expression children of the root ASSIGN node to
be reversed. Is there a simple way to do that?
Thanks,
Chris
T-VEC Technologies, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080401/a4939bd7/attachment.html
More information about the antlr-interest
mailing list