[antlr-interest] ANTLR 3.1: Decision analysis timeout seems too low

Kausch, Robert Robert.Kausch at ottogroup.com
Wed Aug 13 06:34:16 PDT 2008


Hi,

I'm working on an ANTLR grammar for ABAP which, due to the size of that
language, is steadily becoming really huge.

Now I reached a point where ANTLR sometimes gives me the following error
message while processing the parser grammar:

error(10):  internal error:
org.antlr.tool.Grammar.createLookaheadDFA(Grammar.java:1228): could not
even do k=1 for decision 103; reason: timed out (>1000ms)

I can trigger this error by taking away CPU time from ANTLR while it is
processing the parser grammar (e.g. by browsing the web, starting a
program etc.). If I just sit still and do nothing during the ANTLR run,
it processes everything just fine. However, adding one more rule to my
grammar triggers the error all the time.

I figure increasing the value for MAX_TIME_PER_DFA_CREATION in DFA.java
would solve the problem. But maybe it would be better to add a command
line option for setting the timeout value.

I tried setting the timeout to 5000, but that caused the same problem
followed by a Java heap space out of memory error. A value of 2000
finally worked for me.

Greetings,
Robert

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080813/c3bd1ea2/attachment.html 


More information about the antlr-interest mailing list