drawshield / Blazon-Parser

A Flex/Bison Parser for Blazonry - A Mediaeval Graphical Description Language
Other
14 stars 4 forks source link

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

Closed pseudomonas closed 2 years ago

pseudomonas commented 2 years ago

Trying to compile on Ubuntu 20.04, with the default repository make (4.2.1), flex(2.6.4), bison(3.5.1), libxml2

$ make
flex blazon.l
flex: input rules are too complicated (>= 32000 NFA states)
make: *** [makefile:52: lex.yy.c] Error 1
DGoldDragon28 commented 2 years ago

Firstly, this project is not currently stable, there is much work to be done before it will function.

In response to that specific issue, flex must be invoked with the -Ca in order to cope with the number of NFA states. This has been corrected in the makefile in my working branch djl (which is still WIP but hasn't been updated in some time as I've been busy with completing my degree).

pseudomonas commented 2 years ago

I've just been trying -Ca in the makefile, and it compiles fine, but then running ./blazon segfaults (after being given any text to parse) in all circumstances that I've tried.

Best of luck with your degree!

DGoldDragon28 commented 2 years ago

Thanks, I've actually just a few weeks back received my results so luck was indeed on my side!

The segfault is because, like I said, the code is woefully incomplete. Just this week I've started trying to unpick the code and figure out where I was with all this.