-
Notifications
You must be signed in to change notification settings - Fork 40
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
Unable to build with alternative lex implementation #121
Comments
@firasuke This option is used to set the name of the header file. The option can be dropped and the lex option can be used within the file. Tell me if the following patch works for you. diff --git a/src/libkeymap/Makefile.am b/src/libkeymap/Makefile.am
index 097ea5c4..fa399aec 100644
--- a/src/libkeymap/Makefile.am
+++ b/src/libkeymap/Makefile.am
@@ -69,7 +69,6 @@ noinst_LTLIBRARIES = libkeymap.la
endif
AM_YFLAGS = -Wno-yacc
-AM_LFLAGS = --header-file=$(CURDIR)/analyze.h
BUILT_SOURCES = parser.c analyze.c parser.h analyze.h $(ksyms_gen_headers)
CLEANFILES += $(BUILT_SOURCES)
diff --git a/src/libkeymap/analyze.l b/src/libkeymap/analyze.l
index 614077b6..acc1b51c 100644
--- a/src/libkeymap/analyze.l
+++ b/src/libkeymap/analyze.l
@@ -27,6 +27,7 @@ int stack_pop(struct lk_ctx *ctx, void *scanner);
%option noinput
%option noyy_top_state
+%option header-file="analyze.h"
%option extra-type="struct lk_ctx *"
%{ |
Unfortunately I didn't find support for header-file option in reflex code. So, it is unlikely that my patch would be useful. It seams that reflex doesn't have a way to ask for a header to be created. |
Thank you for your time. I still haven't tried the patch yet, but will report back if it fixed the issue. Yeah |
It still is not working. I am receiving the following error: make[3]: Entering directory 'kbd-2.6.4/src/libkeymap'
LEX analyze.c
"kbd-2.6.4/src/libkeymap/analyze.l", line 17: unrecognized '%' directive
"kbd-2.6.4/src/libkeymap/analyze.l", line 18: bad character: #
"kbd-2.6.4/src/libkeymap/analyze.l", line 18: unknown error processing section 1
"kbd-2.6.4/src/libkeymap/analyze.l", line 18: bad character: "
"kbd-2.6.4/src/libkeymap/analyze.l", line 18: bad character: .
"kbd-2.6.4/src/libkeymap/analyze.l", line 18: bad character: "
"kbd-2.6.4/src/libkeymap/analyze.l", line 20: name defined twice
"kbd-2.6.4/src/libkeymap/analyze.l", line 21: bad character: }
"kbd-2.6.4/src/libkeymap/analyze.l", line 23: unrecognized %option: reentrant
"kbd-2.6.4/src/libkeymap/analyze.l", line 24: unrecognized %option: bison-bridge
"kbd-2.6.4/src/libkeymap/analyze.l", line 32: unrecognized %option: header-file
"kbd-2.6.4/src/libkeymap/analyze.l", line 33: unrecognized %option: extra-type
m |
@firasuke why should it be otherwise if no one has done anything on the |
Hey there,
Thank you for your time and effort!
I am trying to build
kbd
on a system that usesreflex
as its defaultlex
implementation, and it's failing with the following error:It appears that the lex implementation I am using does not support the following flag
--header-file
which is only supported byflex
.Is the flag
AM_LFLAGS = --header-file=$(CURDIR)/analyze.h
used insrc/libkeymap/Makefile.am
needed for the correct building ofkbd
?Thanks in advance!
The text was updated successfully, but these errors were encountered: