[antlr-interest] bug in java.g?
mzukowski at yci.com
mzukowski at yci.com
Tue Feb 3 12:00:17 PST 2004
You can't call arbitrary methods like statement or expr, you have to be sure
you have a rule with EOF that you call. Like
statementComplete: statement EOF;
Monty
-----Original Message-----
From: SainTiss [mailto:saintiss at arklinux.org]
Sent: Tuesday, February 03, 2004 11:55 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] bug in java.g?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
when parsing a file containing nothing but the following line:
m = (TEST) d;
I get the following exception:
parser exception: emp.java:1:1: unexpected token: m
emp.java:1:1: unexpected token: m
at JavaRecognizer.statement(JavaRecognizer.java:2058)
at Main.parseFile(Main.java:81)
at Main.doFile(Main.java:54)
at Main.main(Main.java:24)
I'm calling the "statement()" method from the JavaRecognizer, so the file
should be valid.
What's more, if I add a word (e.g. "smdfjmkj") on a line after the statement
in the file, the parser does *not* throw the exception...
Is there an explanation for this?
Thanks,
Hans
- --
Ark Linux - Linux for the Masses (http://arklinux.org)
Capitalism:
You don't have any cows. The bank will not lend you money to buy cows,
because you don't have any cows to put up as collateral.
Representative Democracy:
You have two cows. Your neighbors pick someone to tell you who gets the
milk.
In a world without walls and fences, who needs windows and gates?
Hans Schippers
2LIC INF
UA 2003-2004
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQFAH/ymXlnUYIbmLOQRAhxjAKCabYulRYftMGo+8zwffAFZ1neu2wCeK2mM
wsUcIFD/iw/FDxSx2cD6x7U=
=jwpq
-----END PGP SIGNATURE-----
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/
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