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

Comments

Projects
None yet
1 participant
@lsf37
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 from yytext() return longer than expected with lookahead to [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 Feb 15, 2015

@lsf37

This comment has been minimized.

Show comment
Hide comment
@lsf37

lsf37 Feb 15, 2015

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@lsf37

lsf37 Feb 15, 2015

Member

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

  • status: open --> open-accepted
Member

lsf37 commented Feb 15, 2015

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

  • status: open --> open-accepted
@lsf37

This comment has been minimized.

Show comment
Hide comment
@lsf37

lsf37 Feb 15, 2015

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@lsf37

lsf37 Feb 15, 2015

Member

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

  • status: open-accepted --> closed
Member

lsf37 commented Feb 15, 2015

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

  • status: open-accepted --> closed

@lsf37 lsf37 added the bug 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