ghaerr / microwindows

The Nano-X Window System
Other
648 stars 92 forks source link

lex issue #50

Closed rofl0r closed 3 years ago

rofl0r commented 3 years ago
yacc -d fileio.y
Compiling y.tab.c...
lex fileio.l
"fileio.l":line 54: Error: Too many transitions 
Try using %a num
make[2]: *** [lex.yy.c] Error 1

i'm using posix compatible lex https://github.com/sabotage-linux/lex as lex program, and it requires that the maximum number of transitions be specified with the %a directive. apparently the build system assumes that lex is a symlink to flex oslt.

ghaerr commented 3 years ago

I think the contributed TinyWidgets is the only application that requires yacc/lex to compile.

You should be able to turn off the compilation of TinyWidgets by setting TINYWIDGETS=N in config. Otherwise, it looks like you should be able to set LEX= in the src/contrib/TinyWidgets/tndesigner/Makefile./

rofl0r commented 3 years ago

i fixed the error with

--- a/src/contrib/TinyWidgets/tndesigner/fileio.l
+++ b/src/contrib/TinyWidgets/tndesigner/fileio.l
@@ -1,3 +1,4 @@
+%a 3000
 %{
 #include<tnWidgets.h>
 #include<math.h>

but then tinywidgets build choked on missing nanoX libraries (which i had disabled already), so i ended up disabling TINYWIDGETS as you proposed.

rofl0r commented 3 years ago

maybe the build config template could have something like

MICROWINDOWS=y
NANOX=y

ifeq $(NANOX, y)
TINYWIDGETS=y
...
endif
ghaerr commented 3 years ago

I fixed the lex issue with a commit.

ifeq $(NANOX, y) TINYWIDGETS=y ... endif

Yes, that would work in this case, but there are many dependencies on various modules, and we're trying to keep code out of the config files. Thanks!