[antlr-interest] OutOfMemory: impossible to process java comments only?
SainTiss
saintiss at arklinux.org
Tue Apr 13 06:14:59 PDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I've got a serious problem here. I've got this rule in the Java grammar, which
allows parsing of a number of java statements:
statementSequenceOnly
:
(
statement
)*
EOF!
;
This works fine, in general... However, when I feed the parser some input
which just consists of a comment (so there are zero statements), I get an
OutOfMemory error. I pinpointed the problem to the following statement in the
generated code:
if ((_tokenSet_0.member(LA(1)))) {
More specifically, it seems there is an endless loop on LA(1).
I tried creating a rule with just EOF!, but I got the same problem. This time,
there seemed to be an endless loop on
match(Token.EOF_TYPE);
Am I doing something wrong here?
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)
iD8DBQFAe+fTXlnUYIbmLOQRAmK0AKCigggOMnFcWessJ0QsXorNu42pdACgl1Ht
l7qgGOD1P3uEkh6eBXcL3/8=
=sX9l
-----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/
More information about the antlr-interest
mailing list