Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

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

2.5.31
open
nobody
None
5
2014-03-05
2014-03-05
Yuri
No

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, the flex (correctly) prints these errors:
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.37_1 on FreeBSD 9.2

1 Attachments

Discussion