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

Matt Palmer mattpalms at gmail.com
Sat Jul 3 13:58:29 PDT 2010


Well, this gets wierder, and to my mind seems to point to a bug in
Antlrworks itself.

I verified that I could consistently run the debugger using one simple
grammar, but not another.  On the non-working grammar, I commented out rules
and tokens (starting from the most complex), until, lo-and-behold, after one
rule went the debugger started working.  I then re-enabled all the other
rules one by one, and the grammar kept working.  The lexer rule that wasn't
working was  a literal followed by a fragment, looking like this:

BITMASK :   '&' HEX_BYTE ;

I then re-enabled this rule... and the debugger kept working.  The only
difference at this point between where I started with a non-working debugger
and where I finished with a working debugger is I moved a couple of rules to
the end (comments and whitespace both going to hidden channels) to simplify
commenting them out.

I've faced this problem before, I still have no idea what causes it and how
to fix it.  Maybe this will make sense to someone.

Matt.

On 3 July 2010 15:02, Matt Palmer <mattpalms at gmail.com> wrote:

> Thanks for the tip, unfortunately it didn't help.  I only had one rule with
> k>1, which I commented out, and still got the debugger time-out.
>
> I can see I'm going to have to try to narrow down on the differences
> between the grammars which debug and those that don't...
>
> Incidentally, I've had this issue before on earlier versions of antlrworks
> and ubuntu too.
>
> Regards,
>
> Matt.
>
>
> On 2 July 2010 14:45, Mikesell, Darin B. <Darin.Mikesell at gd-ais.com>wrote:
>
>> I've gotten this time-out error in the past also.  It usually occurs when
>> I'm using a look-ahead of k=2, if I change the look-ahead to k=1 and then
>> recompile, it will sometimes spit out an error that leads me to a fix.  I
>> can then fix the error, set look-ahead back to k=2, and then I'm able to
>> debug.
>>
>>
>> - Darin
>>
>>
>> -----Original Message-----
>> From: antlr-interest-bounces at antlr.org [mailto:
>> antlr-interest-bounces at antlr.org] On Behalf Of Matt Palmer
>> Sent: Friday, July 02, 2010 5:21 AM
>> To: Jane Eisenstein
>> Cc: antlr-interest at antlr.org
>> Subject: Re: [antlr-interest] unable to run or debug grammar in antlrworks
>> 1.4 on Windows XP
>>
>> I have exactly the same issues, but running on Ubuntu 10.04, so it's not a
>> windows issue.  Strangely, some grammars the debugger runs, and others it
>> simply times out.  I haven't figured out what is going on yet.
>>
>>
>> On 10 May 2010 21:38, Jane Eisenstein <Jane.Eisenstein at medecision.com
>> >wrote:
>>
>> > I've been using the Snow Leopard version of antlrworks to develop and
>> run a
>> > simple grammar. At work, I only have Windows XP and am running into
>> problems
>> > trying to run/debug the grammar with the MS Windows version of
>> antlrworks.
>> > I'm using sun's jdk1.6.0_17.
>> >
>> > Selecting Run/Run... results in this console message: TODO: run and send
>> > output to this console
>> > Is this command not supported under MS Windows?
>> >
>> > Also, trying to debug results in an alert stating:
>> > Cannot launch the debugger Tab. Time-out waiting to connect to the
>> remote
>> > parser.
>> > Running netstat -aon | find /i "49100" returns no results
>> >
>> > Is there something I can do to correct these problems?
>> >
>> >
>> >
>> >
>> >
>> --------------------------------------------------------------------------------------
>> > The information transmitted is intended only for the person or entity to
>> > which it is addressed and may contain confidential and/or privileged
>> > material. Any review, retransmission, dissemination or other use of, or
>> > taking of any action in reliance upon, this information by persons or
>> > entities other than the intended recipient is prohibited. If you
>> received
>> > this message in error, please contact the sender and delete the material
>> > from any computer.
>> >
>> >
>> --------------------------------------------------------------------------------------
>> >
>> >
>> > 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
>>
>> 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