> That could be. it's possible that the tab character means moveto the
> next field
> Ter
No, it was definitely a Tab char in the input box. However, I discovered what
the real underlying problem was.
It wasn't actually the Tab char that was the problem, but that my grammar
didn't recognize Tab, and so it was causing an infinite loop (I mistakenly used
a * quantifier in one of my lexer rules instead of a +). This in turn caused
AntlrWorks to think it was failing to connect, when actually the real problem
was that the lexer process was stuck in a loop.
Does the debugger perform a complete parse *before* attempting to connect to
the process? That would probably explain it. I was expecting the debugger to
first connect, and *then* attempt to parse. In that way, I could have debugged
the infinite looping. However, all I saw was a mysterious "Failed to connect"
message which sent me on a wild goose chase.
FYI here's a sample grammar and input that would cause this usability bug to
occur:
grammar Bug;
file : line+ EOF ;
line : field+ terminator ;
field : SEP TEXT? ;
terminator : (NEWLINE | EOF) ;
NEWLINE : '\r'? '\n' ;
TEXT : ('a'..'z'|'A'..'Z'|' ')* ; // NOTE: Does not match Tab, and also
has a * quantifier
SEP : '*' ;
Input:
*a*a[Tab]a**
Note: Replace '[Tab]' with an actual Tab char. (In fact, even the '[' char will
cause the bug to occur.)
Rob
----------------------------------------
> CC: [email protected]
> From: [email protected]
> To: [email protected]
> Subject: Re: [antlr-interest] Bug in AntlrWorks debugger
> Date: Mon, 8 Jun 2009 13:22:13 -0700
>
>
> On Jun 8, 2009, at 12:14 PM, Dukie Banderjee wrote:
>
>>
>> Hi,
>>
>> Is this the right place to post AntlrWorks bugs? I looked around but
>> didn't find any other place.
>>
>> It seems that AntlrWorks does not accept Tab characters (or
>> backslashes, for that matter) in the Text field of the Input Text
>> dialog box when you press the Debug button.
>
> That could be. it's possible that the tab character means moveto the
> next field
> Ter
_________________________________________________________________
We are your photos. Share us now with Windows Live Photos.
http://go.microsoft.com/?linkid=9666047
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
-~----------~----~----~----~------~----~------~--~---