Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] %caseless does not work in jflex 1.6.0 ? [sf#129] #130

Closed
lsf37 opened this issue Feb 15, 2015 · 6 comments
Closed

[Bug] %caseless does not work in jflex 1.6.0 ? [sf#129] #130

lsf37 opened this issue Feb 15, 2015 · 6 comments
Labels
bug Not working as intended
Milestone

Comments

@lsf37
Copy link
Member

lsf37 commented Feb 15, 2015

Reported by evgen-i on 2014-07-30 10:07 UTC
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.

@lsf37 lsf37 changed the title %caseless does not work in jflex 1.6.0 ? [Bug] %caseless does not work in jflex 1.6.0 ? [sf#129] Feb 15, 2015
@lsf37 lsf37 added this to the jflex bug milestone Feb 15, 2015
@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by steve_rowe on 2014-07-30 14:29 UTC
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.

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by steve_rowe on 2014-07-30 14:53 UTC
Evgeny, I found a workaround (until this is fixed): enclose the 'c' in quotes:

"c" [+][+]

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

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Updated by steve_rowe on 2014-08-06 04:31 UTC

  • assigned_to: Steve Rowe

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by steve_rowe on 2014-08-06 04:31 UTC
I've committed a fix to trunk: http://sf.net/p/jflex/code/849

This fix will be included in JFlex 1.6.1.

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by titi4u on 2015-01-03 22:42 UTC
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!

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by lsf37 on 2015-01-08 06:19 UTC
It looks like we'll be able to do the next release in about 1-2 weeks.

@lsf37 lsf37 added the bug Not working as intended label Feb 15, 2015
@lsf37 lsf37 modified the milestones: jflex bug, 1.6.1 Feb 15, 2015
@lsf37 lsf37 closed this as completed Feb 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Projects
None yet
Development

No branches or pull requests

1 participant