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

flex: input rules are too complicated (>= 32000 NFA states)" #57

Open
srivasta opened this issue Feb 17, 2016 · 0 comments
Open

flex: input rules are too complicated (>= 32000 NFA states)" #57

srivasta opened this issue Feb 17, 2016 · 0 comments
Milestone

Comments

@srivasta
Copy link
Contributor

Hi,

This bug was reported by a Debian user in:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=642040

I'm trying to compile libsbook from here: https://simson.net/ref/sbook5/
During compilation, i get:

 flex -tL8B  -i parse_address.flex  | sed s/yy/yyaddress/g | grep -v unistd.h > parse_address.cpp
 flex: input rules are too complicated (>= 32000 NFA states)

A web search points me to this FAQ:
https://flex.sourceforge.net/manual/unnamed_002dfaq_002d88.html#unnamed_002dfaq_002d88
which contains this suggestion from Vern Paxson:

Increase the definitions in flexdef.h for:

define JAMSTATE -32766 /* marks a reference to the state that always jams */

define MAXIMUM_MNS 31999

define BAD_SUBSCRIPT -32767

recompile everything, and it should all work.

Is there a reason to avoid making these changes in flex? Or can this be chosen as a run-time option? Processing power even on netbooks is demonstrated to be enough to handle instructions much more complex than this.

Manoj

@westes westes modified the milestone: 2.7.0 Jul 3, 2017
eric-s-raymond added a commit to eric-s-raymond/flex that referenced this issue Oct 3, 2020
All symbols except a handful dependent on nultrans and the number of
backups are now written in one visible group right at the start of m4
generation.  The exception are exceptions because their values
are not known until after DFA computation.

Has comment diffs in generated test code due to one symbol rename and
symbols beoming visible. Should be the last time the latter happens.

westes#57 in the retargeting patch series
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants