[antlr-interest] Question concerning writing a TreeParser rule
craymer at warpiv.com
Wed Apr 26 15:47:32 PDT 2006
The corresponding tree rule is
#( SEP batchExprTree batchExpr )
Note that the tree annotation essentially inverts the batchExprs (the first
batchExpr encountered when parsing is at the lowest level of the tree)--if
you want to maintain the original order when processing, put actions to the
right of batchExpr in the above rule.
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Stritzel.Nils at infineon.com
> Sent: Wednesday, April 26, 2006 2:55 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] Question concerning writing a TreeParser rule
> In my parser I have the following rule:
> batchExpr (SEP^ batchExpr)*
> Which describes a list of expressions separated by "\".
> I could need some advice or pointer to the right place in the
> documentation to figure out, how to implement a TreeParser rule that
> returns an Array or a ArrayList containing the evaluated batchExpr (i.e.
> batchExprList returns [ArrayList r] ).
More information about the antlr-interest