[antlr-interest] Processing lists in a tree grammar
Terence Parr
parrt at cs.usfca.edu
Fri Nov 26 18:04:37 PST 2010
On Nov 26, 2010, at 4:56 PM, Arthur Goldberg wrote:
>
> as per an example on p. 166 of Parr's "... ANTLR Reference" (TDAR):
>> /** Collect the result trees from all formalArg invocations
>> * and put into an AST list.
>> */
>> formalArgs : formalArg (',' formalArg)* -> formalArg+
>> | ;
> How does one walk these repeated elements in a tree grammar? I'm unable
> to find any documentation in TDAR or on antlr.org.
hi. try formatArg+ in tree grammar :)
Remember right side of tree construction is usually the tree grammar.
Ter
More information about the antlr-interest
mailing list