On Fri, Oct 28, 2011 at 11:56 AM, Benjamin Niemann <[email protected]> wrote:
> On Fri, Oct 7, 2011 at 11:17 PM, Benjamin S Wolf <[email protected]> wrote:
>> I've discovered two bugs in working with the Python target to generate 
>> lexers.
>>
>> The first is in that when supplying k, the generated code for special
>> state transitions is invalid: the "elif" keyword is split across lines
>> as "el\nif", so the python interpreter crashes upon reading "el".
>
> That's been reported before, but I have problem reproducing it. Are
> you using antlr-3.4-complete.jar (I can only see this problem with
> that build) or did you build it yourself from antlr-3.4.tar.gz (or
> something else completely)?

Using antlr-3.4-complete.jar, yes.

I tried reducing my test case as far as I could, but it won't generate
the DFA with the special state transitions if I use fewer than 57
rules. Eventually I tried generating 57 rules to trigger it, and here
is the (excruciatingly ugly) result. (Note that I have rules that
start with 'a' and rules that start with 'b'. This triggers the
"el\nif" case. If I only used 'a' rules, the special state transition
would only need to check "if s == 0" since no other character is
valid.)
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Attachment: minimal.g
Description: Binary data

-- 
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.

Reply via email to