[antlr-interest] exceeding java class size limits with my lexer

David Penton djplists at arrowsash.com
Mon Jan 20 15:49:19 PST 2003


Hello all.  I just made my lexer too big to handle in java. I got a
ClassFormatError because the generated class size is greater than 65535
bytes.  As far as I know that's a limit that cannot be circumvented,
although I may be wrong about that. I actually did not know about the
limit until my antlr project ran into it.  I am sitting here fuming
about it.  If it really is a hard and fast limitation to java, I am
pissed off about it and will consider going back to C++.  Or maybe I
should just use SNOBOL after all. Har.

Reason the lexer is so damned big is that I am trying to get it to
handle the lexical parts of the XML 1.0 specification with its large set
of unicode character possibilities.  One of my design goals is to
preserve the EBNF productions in the XML 1.0 specification with as
little modification as possible. If I have to I will abandon the I18N
aspect, but I would like to avoid that. 

Does antlr have any kind of option similar to other parser/lexer
generators to reduce the size of the generated lexer, say by trading
size for speed? The 2.7.1 manual says that version has been optimized to
reduce size for unicode Or, is there anything else I can do to avoid
this problem? Am I overlooking a command line arg or something?

Thanks a whole bunch.

- Dave -




 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list