Skip to content

[Bug] unexpected Error: could not match input [sf#107] #109

Closed

Description

@lsf37

Reported by kneunert on 2010-03-01 20:56 UTC
I'm using a bit of a trick in the Lexer like this:

<YYINITIAL> {identifier}[ { yybegin(ARRAY1); return someSymbol; }
<ARRAY1> $? { yybegin(ARRAY2); return someSymbol; }
<ARRAY2> $? { yybegin(ARRAY3); return someSymbol; }
<ARRAY3> $? { yybegin(YYINITIAL); return someSymbol; }
<YYINITIAL> ] { yybegin(YYINITIAL); return someSymbol; }

The trick here is, that i use an unconvential optional character. This Character is not there, so no character gets consumed however a series of symbols are returned. This used to work in JLex and it does not seem to work in JFlex anymore.
I get this:

Symbol: [
Exception in thread "main" java.lang.Error: Error: could not match input
at struktor.processor.Yylex.zzScanError(Yylex.java:439)
at struktor.processor.Yylex.next_token(Yylex.java:590)
at struktor.processor.MyMain.main(MyMain.java:19)

I have a simple testcase for this. If needed, i can attach it to this ticket.

Thanks

Kim ( https://sourceforge.net/projects/struktor/ )

Activity

  1. changed the title [-]unexpected Error: could not match input[/-] [+][Bug] unexpected Error: could not match input [sf#107][/+] on Feb 15, 2015
  2. added this to the milestone on Feb 15, 2015
  3. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Commented by lsf37 on 2010-03-01 22:34 UTC
    Hi Kim,

    yes, please attach your test file so I can reproduce the problem.

    Cheers,
    Gerwin

  4. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Commented by kneunert on 2010-03-02 17:42 UTC

  5. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Commented by kneunert on 2010-03-02 17:43 UTC
    Hi Gerwin,

    i attached a running eclipse-project with ant-file. If you are only interested in the lexer-definition-file, have a look into lexer/processor.lex

    cheers

    Kim

  6. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Commented by kneunert on 2010-03-27 20:02 UTC
    Did you have the chance to look into it? Anything i can do for this issue?

    thanks

    Kim

  7. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Commented by lsf37 on 2010-04-01 05:44 UTC
    Sorry haven't had a chance yet to look at it in more detail. Hope to get there in about two weeks.

    Cheers,
    Gerwin

  8. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Commented by kneunert on 2010-05-22 19:05 UTC
    Anything new about that?

    cheers

    Kim

  9. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Commented by malbrech on 2010-10-16 07:20 UTC
    Hello Gerwin,

    my students learn to program with Kim’s „Struktor“, which is a very helpful tool. In a few weeks they want to learn about arrays. But there is this problem with the bracket notification in JFLEX. Please forgive me putting pressure on you. I’m sure, that you have to solve a lot of problems which are more important and urgent than this one. But I need to know, if it’s possible to fix this bug within the next two weeks because it will take some time to find another way of teaching this subject.

    My students and I will be very grateful, if you succeed in fixing the bug. Good luck.

    Best regards
    Michael (teacher at Gymnasium Nonnenwerth, Germany)
    www.nonnenwerth.de

  10. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Commented by lsf37 on 2010-10-17 02:29 UTC
    bugfix patch

  11. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Commented by lsf37 on 2010-10-17 02:30 UTC
    fixed version of jflex/src/JFlex/Emitter.java

  12. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Commented by lsf37 on 2010-10-17 02:32 UTC
    I've attached a quick fix to the bug tracker. I haven't done any serious testing yet, but it should fix the problem.

    I can also attach a new JFlex.jar if you need it. Let me know if you do.

    Cheers,
    Gerwin

  13. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Commented by kneunert on 2010-10-17 09:56 UTC
    Thanks, Gerwin. That looks good. I asked michael to test it with his students. If he is alright, you may put that in SVN?!

    cheers

    Kim

  14. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Commented by lsf37 on 2010-10-19 02:01 UTC
    The bug is now fixed in revision 605 in trunk and the jflex-1.4.3-fixes branch.

    This fix only works for the %pack (default) and %table code generation methods. The %switch method will still exhibit the problem, but I'd like to deprecate the %switch and %table methods anyway in the future.

    Cheers,
    Gerwin

  15. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Updated by lsf37 on 2010-10-19 02:01 UTC

    • status: open --> open-fixed
  16. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Commented by nobody on 2010-10-19 05:17 UTC
    Thank you very much, Gerwin. In the next few weeks I will test it with my students.

    Cheers,
    Michael

  17. lsf37 commented on Feb 15, 2015

    @lsf37
    MemberAuthor

    Updated by lsf37 on 2014-03-01 00:26 UTC

    • status: open-fixed --> closed
  18. removed this from the milestone on Feb 17, 2015
  19. added this to the 1.5.0 milestone on Nov 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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