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] lookahead and "|" actions [sf#75] #77

Closed
lsf37 opened this Issue Feb 15, 2015 · 3 comments

Comments

Projects
None yet
1 participant
@lsf37
Copy link
Member

lsf37 commented Feb 15, 2015

Reported by lsf37 on 2005-09-06 10:25 UTC
Lookahead expressions and "|" actions do not mix well. If in
the rules

A / B |
C { some action }

the C rule is matched, the JFlex runtime will incorrectly treat
{ some action } as a lookahead action, will get the matched
text wrong and might throw a runtime exception.

Workaround: use

A / B { some action }
C { some action }

instead.

This will be enforced by the JFlex parser in future versions.
(The end states of lookahead expressions and normal
expressions cannot be mixed).

Thanks to Ken Williams for reporting this bug.

@lsf37 lsf37 changed the title lookahead and "|" actions [Bug] lookahead and "|" actions [sf#75] 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.

Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by lsf37 on 2007-11-03 08:56 UTC
Logged In: YES
user_id=93534
Originator: YES

fixed in svn revision 265

@lsf37

This comment has been minimized.

Copy link
Member Author

lsf37 commented Feb 15, 2015

Updated by lsf37 on 2007-11-03 08:56 UTC

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

This comment has been minimized.

Copy link
Member Author

lsf37 commented Feb 15, 2015

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

  • status: open-fixed --> 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
You can’t perform that action at this time.