-
Notifications
You must be signed in to change notification settings - Fork 116
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] dangerous lookahead check may fail [sf#38] #40
Comments
Commented by lsf37 on 2001-05-04 21:16 UTC it is not clear yet wether this bug will be fixed soon |
Updated by lsf37 on 2001-09-27 13:05 UTC
|
Commented by lsf37 on 2004-11-07 06:05 UTC |
Updated by lsf37 on 2004-11-07 06:05 UTC
|
Commented by lsf37 on 2004-11-07 06:08 UTC The warning is now safe (version 1.4.1), but very crude (reports |
Commented by lsf37 on 2007-11-25 11:53 UTC fixed in svn revision 299. |
Updated by lsf37 on 2007-11-25 11:53 UTC
|
Updated by lsf37 on 2008-05-27 11:46 UTC
|
Reported by lsf37 on 2001-05-04 21:15 UTC
for some lookahead expressions JFlex will fail to print a warning that they are dangerous (r1 / r2 is
dangerous if any postfix of r1 matches a prefix r2).
Example:
.+ "a" / "b" .+ { action }
will not produce a warning/error message, but the postfix .+"a" of r1 matches a prefix of r2 (the
whole lookahead).
These lookahead expressions might match some inputs incorrectly. It is guaranteed that the rule
gets chosen if there is a match for the expression r1r2 (concatenation of r1 and r2), and it is
guaranteed that yytext() matches r1. It is not guaranteed that there is an instance of r2 after
yytext() (because too few lookahead characters were put back into the input).
Workaround: check manually if your lookahead expressions are dangerous.
(reported by Robert Hubley)
The text was updated successfully, but these errors were encountered: