[antlr-interest] dangling else problem (maybe bug in ANTLr 2.7.2?)
Jan Oetting
jan.oetting at gmx.de
Wed Mar 24 00:11:14 PST 2004
Hi,
i found a bug in my IF ELSE Statement and I am not sure if this i my bug.
testing_statement :
IF^ LPAREN! expression RPAREN! ( command | command_block)
(
// nondeterminism is okay here
options {
warnWhenFollowAmbig=false;
}
: ELSE! ( command | command_block)
)?;
If I use correct statements, everything works fine.
But following script doesn't work
if (a==0)
statement1;
statement2;
else
statement3;
statement4;
this script should be rejected.
But it it interpreted like
if (a==0)
statement1;
statement2;
the else part is ignored.
No error is thrown.
Anybody knows why?
Greeting
Jan
--
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz
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