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

Rules in INITIAL state affect errors in an exclusive state #1

Closed
yurivict opened this issue Mar 5, 2014 · 1 comment
Closed

Rules in INITIAL state affect errors in an exclusive state #1

yurivict opened this issue Mar 5, 2014 · 1 comment
Assignees

Comments

@yurivict
Copy link
Contributor

yurivict commented Mar 5, 2014

Reposting the issue from the sourceforge https://sourceforge.net/p/flex/bugs/162

The attached test case has one exclusive state COMMENT. Some COMMENT rules there (obviously) can't be matched.
The problem is that addition of some rule for INITIAL state causes the warnings to disappear.

When the XXX rule is commented out, flex (correctly) prints these warnings:
testcase.l:17: warning, rule cannot be matched
testcase.l:18: warning, rule cannot be matched

When the XXX rule is present, flex (incorrectly) doesn't print these warnings.

Any rules in any other states shouldn't affect exclusive states. Each exclusive state should behave exactly as if it was the only state in the lex source.

flex-2.5.38_2 on FreeBSD-9.2

https://sourceforge.net/p/flex/bugs/162/attachment/testcase.l

@westes westes self-assigned this Jun 14, 2014
@westes
Copy link
Owner

westes commented Dec 2, 2014

Since the bug references a bug over at sourceforge, I'm going to close the report here to reduce duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants