[antlr-interest] one question regarding tree walking
Joan Pujol
joanpujol at gmail.com
Wed Nov 17 03:58:05 PST 2004
On Tue, 16 Nov 2004 20:18:01 +0000 (GMT), Muhammad Masoom Alam
<doublemalam at yahoo.co.uk> wrote:
> : ( typeName o:COLON^ ((COMMA!)? IDENT)* {#o.setType(PARAMETERCOLON);} SEMI!
> )
>
> how I can write a tree walker expression so that this kind of tree can be
> matched
Us ? and * like in your parser.
> I have written
>
> operation_definition1
>
> : #(PARAMETERCOLON j:typeName (IDENT)+)
In your parser you have (..IDENT)* and in the TreeParser you have (IDENT)+
Use the '*'
Cheers,
--
Joan Jesús Pujol Espinar
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list