[antlr-interest] Memory issue while lexer initialization
elango m
go2elango at gmail.com
Fri Dec 28 06:19:51 PST 2007
Hi,
I have a memory issue when I create an instance of the lexer (new
MyLexer(new ANTLRStringStream("expression")). The following code in the
lexer creates instances of short[] with a huge data, consuming more than 25
Mb. I don't understand why it requires such a huge memory. Any help is
appreciated.
static {
int numStates = DFA14_transitionS.length;
DFA14_transition = new short[numStates][];
for (int i=0; i<numStates; i++) {
DFA14_transition[i] = DFA.unpackEncodedString
(DFA14_transitionS[i]);
}
}
Thanks,
--Elango M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20071228/ce107e2d/attachment-0001.html
More information about the antlr-interest
mailing list