Menu

#129 %caseless does not work in jflex 1.6.0 ?

jflex bug
open
None
1
2015-02-15
2014-07-30
No

It seems like %caseless is not working the way it should in jflex 1.6.0:

%class XxxTokenizer
%unicode
%function next
%type Object
%char
%caseless

...

/** the first rule: **/
c[+][+] { return getNext(); }

This rule matches c++ (keeps it as one token), but not C++ (it gets split into C + +). Until version 1.5.1, C++ was also matched.

Discussion

  • Steve Rowe

    Steve Rowe - 2014-07-30

    Thanks for reporting!

    I was able to reproduce the problem with current trunk (no significant differences from 1.6.0). The problem does not reproduce for me on 1.5.1.

    I'll investigate.

     
  • Steve Rowe

    Steve Rowe - 2014-07-30

    Evgeny, I found a workaround (until this is fixed): enclose the 'c' in quotes:

    "c" [+][+]

    This successfully recognized "C++" for me in caseless mode.

     
  • Steve Rowe

    Steve Rowe - 2014-08-06

    I've committed a fix to trunk: http://sf.net/p/jflex/code/849

    This fix will be included in JFlex 1.6.1.

     
  • Steve Rowe

    Steve Rowe - 2014-08-06
    • assigned_to: Steve Rowe
     
  • titi4u

    titi4u - 2015-01-03

    Hi,
    first of all, thank you very much for your great work about JFlex!
    Sorry for asking, but do you have some scheduled date for JFlex 1.6.1 (that includes this fix)?
    In my company, I'm only allowed to work with official releases :/
    Thank you!

     
  • Gerwin Klein

    Gerwin Klein - 2015-01-08

    It looks like we'll be able to do the next release in about 1-2 weeks.

     
  • Gerwin Klein

    Gerwin Klein - 2015-02-15
     
MongoDB Logo MongoDB