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] yytext() return longer than expected with lookahead [sf#72] #74

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

[Bug] yytext() return longer than expected with lookahead [sf#72] #74

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

Comments

@lsf37
Copy link
Member

lsf37 commented Feb 15, 2015

*Reported by anonymous on 2005-03-16 22:24 UTC
If following by design

pattern:
ab / cde { System.out.println(yytext()); return 2; }
abcd / f { System.out.println(yytext()); return 7; }

string:
abcde

result
prints out "abcd" while returns 2.

--Xiang (xyu at cs.princeton.edu)

@lsf37 lsf37 changed the title yytext() return longer than expected with lookahead [Bug] yytext() return longer than expected with lookahead [sf#72] Feb 15, 2015
@lsf37 lsf37 added this to the jflex bug milestone Feb 15, 2015
@lsf37 lsf37 closed this as completed Feb 15, 2015
@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by lsf37 on 2007-11-04 08:55 UTC
Logged In: YES
user_id=93534
Originator: NO

This fixed (somewhat) now in svn revision 276.

There are two special cases for lookahead implemented now that
will definitely work correctly: when in r1/r2 either r1 or r2
have a fixed length, the lookahaed is matched correctly and
efficiently.

General lookahead is still pretty much horribly broken, though.

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Updated by lsf37 on 2007-11-04 08:55 UTC

  • status: open --> open-accepted

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by lsf37 on 2007-11-25 11:14 UTC
Logged In: YES
user_id=93534
Originator: NO

Now properly fixed for all lookahead cases in svn revision 297.

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Updated by lsf37 on 2008-05-27 11:46 UTC

  • status: open-accepted --> closed

@lsf37 lsf37 added the bug Not working as intended label Feb 17, 2015
@lsf37 lsf37 modified the milestone: jflex bug Feb 17, 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