[antlr-interest] AST construction from rule
anakreonmejdi at yahoo.gr
Mon Sep 27 09:29:34 PDT 2004
I have a problem with the AST constructed from a rule in my TreeParser.
The rule returns a list of AST nodes.
The rule without action code is:
| rule 2
|!#(DIM (decl:s_decl )+)
each decl is added to a List and in the end the result of the rule is
created from the elements of that list.
This is the code of AST generations:
## = makeFromList(dimArrays, null);
makeFromList is a method i have implemented
and if I call ##.toStringList for input:
dim a(12), b()
( EXPR ( = a array ) ) ( EXPR ( = b array ) )
which is fine.
The problem is that from the 2 nodes, only the first one is kept.
Any idea how to fix this?
Yahoo! Groups Links
<*> To visit your group on the web, go to:
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
More information about the antlr-interest