Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Nested Bounded Repetitions causes "Illegal Argument Exception" #952

@hellotommmy

Description

@hellotommmy

Running jflex on the following code snippet,

%%


%class search
%standalone


%% 
((a|b )*b.{10}){3} {System.out.printf("*** found match");}

And I get the error:

147972 states before minimization, 79107 states in minimized DFA
Old file "search.java" saved as "search.java~"
Writing code to "search.java"

Unexpected exception encountered. This indicates a bug in JFlex.
Please consider filing an issue at http://github.com/jflex-de/jflex/issues/new


character value expected
java.lang.IllegalArgumentException: character value expected
        at jflex.generator.PackEmitter.emitUC(PackEmitter.java:105)
        at jflex.generator.CountEmitter.emit(CountEmitter.java:116)
        at jflex.generator.Emitter.emitDynamicInit(Emitter.java:530)
        at jflex.generator.Emitter.emit(Emitter.java:1369)
        at jflex.generator.LexGenerator.generate(LexGenerator.java:115)
        at jflex.Main.generate(Main.java:320)
        at jflex.Main.main(Main.java:336)

As suggested, I report this error.

Can I also ask a question together with this issue report:
I understand that jflex uses the Thompson construction to create an NFA first,
and then determinises it, and minimises the DFA.
I am wondering if these are the main methods for making jflex fast, or are there any
other optimizations involved? Are these methods documented somewhere other
than the user manual? Can someone give a pointer if possible?

Thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions