[antlr-interest] AST for java decalration

higgins_barry higgins_barry at yahoo.co.uk
Wed Nov 10 03:31:31 PST 2004



HJ all,
In the var declaration for java.g for the line
  int i, q, s;

it creates an AST like this
VARIABLE_DEF
   MODIFIER
   TYPE
   INDENT
for each of the three variables i, q & s.

I've run into a problem when I try to replicate this because my
declarations come in the form
   i, q, s int
Therefore I cannot pass the type as a parameter (as is done in the
java.g) because I have do not hit that token until the other tokens
have been consumed.

Can anyone tell me if there is another way to build my AST which stays
within the accepted form?

Thanks,
Barry





 
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