[antlr-interest] ANTRL 3.3

Justin Murray jmurray at aerotech.com
Fri Dec 10 06:51:45 PST 2010


Hello,

 

I am currently developing the grammar for a very large language. It has
several hundred keywords, and hundreds of syntax permutations in the
form of commands. The language itself is poorly designed, but we
unfortunately have to continue to support it. My question involves the
update to ANTLR v3.3. My grammar file is able to be processed by ANTLR
v3.2 without any errors, and produces a working output (C target). I had
to bump up the java stack size to 64M, and the heap size to 1024M, but
from what I have read this is fairly common. The processing takes about
15 seconds on average. Yesterday, I decided to try upgrading to ANTLR
v3.3, but have been unsuccessful. When processing the exact same grammar
file, it will spend several minutes consuming one of my cpu cores, and
then ultimately crash with an outOfMemory exception. I tried increasing
the memory further, but it made no difference. I tried using the
-Xwatchconversion option, but it was not very helpful. It prints out
thousands of lines like "convert DFA state 4192 (229 nfa states)", but
never appears to get stuck on a particular line, it just eventually runs
out of memory. What has changed in v3.3 that could cause this to happen?
What should I try next?

 

Thank you,

Justin Murray 
Software Engineer 
jmurray at aerotech.com

Aerotech, Inc. 
101 Zeta Drive 
Pittsburgh, PA 15238 
412-963-7470

 



More information about the antlr-interest mailing list