[antlr-interest] Question on parsing the loop structure of java.tree.g
zhangcharles
zhangcharles at yahoo.com
Mon Aug 18 13:53:51 PDT 2003
Hi, I'm using the current java.tree.g which seems not to parse the
initialization condition of "for" loops correctly.My code looks like
the following:
for(int i=0,j=0;i<j+1;i++)
{
//some action
}
The tree walker only walks the first variable "i".
I changed the rule to
#(FOR_INIT ((variableDef)* | elist)?)
The walk is correct but there is "none-determinism" warning with the
antlr compilation.
I'm just wondering if this is a bug or something I'm not aware of.
Thanks a lot.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list