[antlr-interest] (newbie problem) rewrite rule question

Diehl, Matthew J matthew.j.diehl at intel.com
Tue Jul 10 18:34:52 PDT 2007



> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Randall R Schulz
> Sent: Tuesday, July 10, 2007 6:27 PM
> To: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] (newbie problem) rewrite rule question
> 
> On Tuesday 10 July 2007 18:07, ali azimi wrote:
> > Hi,
> >
> >   Yes. It would be fantastic if I could make the debugger in my
> > ANTLRWorks work. I have tried but still can not use the debugger. I
> > remember when I used to try to use the debugger; my ANTLRWorks would
> > produce the following error message:
> >
> >   Connection Error:
> >   Cannot launch the debugger.
> >   Time-out waiting to connect to the remote parser.
> 
> I've found that the best way to use the ANTLRWorks debugger is
remotely.
> The reason is that this frees you from all the classpath and JVM
> compatibility issues of direct debugging. This may be a consequence of
> my situation, having a parser that is intimately tied to a large
> software system with several of its own packages and many external
> (JAR, typically) dependencies.

If that doesn't work...the problem I've run into in the past is that if
it cannot compile the grammar (ANTLR or ANTLRWorks), and has certain
errors, ANTLRWorks will wait for the debugger to start...and since it
never finished compiling, it won't be able to start...and ANTLRWorks
times out.

> > Second: when I try the debug again, the input text GUI appears. When
I
> > give some input, then the following error messages comes up:
 
> > Connection Error:
> > Cannot launch the debugger.
> > Time-out waiting to connect to the remote parser.

ANTLRWorks has a flag that is set when it believes the file has been
compiled successfully with -debug set.  If nothing is changed in the
grammar after this is set (in your case, the first time you press
debug), then it skips compiling it again (a time-saving feature), and
just brings up the input text GUI.  It'll have the same effect as before
though, since it was never compiled correctly, it won't run...and will
time-out.

So you've just got to find out what's keeping it from compiling and fix
the errors (or the parts it doesn't like)

Matt


More information about the antlr-interest mailing list