[antlr-interest] unable to run or debug grammar in antlrworks 1.4 on Windows XP

Matt Palmer mattpalms at gmail.com
Tue Jul 6 04:31:42 PDT 2010


Thanks for the tip.  However, what surprises me with the debugger issue I
have is that all my grammars are actually very simple.  As far as I can see,
there is basically no need for left factoring at all.

When I encounter another grammar for which the debugger times out, I'll have
a play with the timeout preferences you mention, and report back on whether
it helps or not (and maybe post a cut-down version exhibiting the problem).

Matt.


On 5 July 2010 21:47, Jim Idle <jimi at temporal-wave.com> wrote:

> You just need to add -Xconversiontimeout 10000 in the antlrworks
> preferences. However if your lexer generation is timing out, then examine it
> closely and see if you can't left factor things better.
>
> Jim
>
> > -----Original Message-----
> > From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> > bounces at antlr.org] On Behalf Of Andrew Haley
> > Sent: Monday, July 05, 2010 3:06 AM
> > To: antlr-interest at antlr.org
> > Subject: Re: [antlr-interest] unable to run or debug grammar in
> > antlrworks 1.4 on Windows XP
> >
> > On 07/03/2010 10:14 PM, Matt Palmer wrote:
> > > I should add, in case the way I phrased the problem is causing any
> > > confusion: The grammar itself is fine (well - it works - it may not
> > be very
> > > elegant!).  Code can be generated.  I have no warnings or errors.
> > The
> > > problem is whether the debugger in antlrworks will choose to start
> > up, or
> > > time out.
> >
> > I had this problem too.  The only way seemed to be to edit the source
> > code
> > of ANTLR to fix the timeout.
> >
> > --- antlr-3.2/tool/src/main/java/org/antlr/analysis/DFA.java~   2009-
> > 09-23 19:36:06.000000000 +0100
> > +++ antlr-3.2/tool/src/main/java/org/antlr/analysis/DFA.java    2010-
> > 01-21 13:08:32.625782840 +0000
> > @@ -53,7 +53,7 @@
> >          */
> >
> >         /** Set to 0 to not terminate early (time in ms) */
> > -       public static int MAX_TIME_PER_DFA_CREATION = 1*1000;
> > +       public static int MAX_TIME_PER_DFA_CREATION = 10*1000;
> >
> >         /** How many edges can each DFA state have before a "special"
> > state
> >          *  is created that uses IF expressions instead of a table?
> >
> > The core problem was that antlrworks didn't allow this timeout to be
> > tweaked.
> >
> > Andrew.
> >
> > List: http://www.antlr.org/mailman/listinfo/antlr-interest
> > Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> > email-address
>
>
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>


More information about the antlr-interest mailing list