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 <[email protected]> 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. <[email protected]>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: [email protected] [mailto: >> [email protected]] On Behalf Of Matt Palmer >> Sent: Friday, July 02, 2010 5:21 AM >> To: Jane Eisenstein >> Cc: [email protected] >> 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 <[email protected] >> >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 >> > > List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
