[antlr-interest] Java1.5 grammar and enum as identifier and not as
a keyword
Jörg Rech
joerg.rech at gmail.com
Sun Jun 26 06:16:40 PDT 2005
Hi,
I have a problem parsing the java libraries using the java1.5.g
grammar updated by Scott Wisniewski. Several statements use the
java1.5-keyword "enum" as a name for a variable.
For example, for the statment:
Enumeration enum = db.serverTable.elements();
The parser throws the following error:
RepositoryImpl.java:110:13: unexpected token: Enumeration
RepositoryImpl.java:110:30: expecting IDENT, found '='
As far as I understand it the parser tries to match an enum-rule and
does not recognize the previous IDENT ("Enumeration")
Has anyone a solution to this problem?
Thanks in advance,
Joerg.
--
Joerg Rech
Computer Scientist Web: http://www.joerg-rech.de
Tel.: (+49|0) 631/10653 email: joerg.rech at gmail.com
More information about the antlr-interest
mailing list