summaryrefslogtreecommitdiffstats
path: root/libmscgen
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-09-12 19:16:07 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-09-12 19:16:07 (GMT)
commit3cf30e72e6b58c70c5a8330cecec4b33fa736852 (patch)
tree8785cf8c1ffe3f5a98bc834561068d8a9ec2a070 /libmscgen
parent4fbb61f020a607a96152ba5c00668b9840ea812c (diff)
parentaca16ea3b4e4beef9bf067d0b532dfa3802f7a3d (diff)
downloadDoxygen-3cf30e72e6b58c70c5a8330cecec4b33fa736852.zip
Doxygen-3cf30e72e6b58c70c5a8330cecec4b33fa736852.tar.gz
Doxygen-3cf30e72e6b58c70c5a8330cecec4b33fa736852.tar.bz2
Merge branch 'feature/bug_consistency_state_2' of https://github.com/albert-github/doxygen into albert-github-feature/bug_consistency_state_2
Diffstat (limited to 'libmscgen')
-rw-r--r--libmscgen/CMakeLists.txt17
-rw-r--r--libmscgen/mscgen_lexer.l6
2 files changed, 17 insertions, 6 deletions
diff --git a/libmscgen/CMakeLists.txt b/libmscgen/CMakeLists.txt
index 3d67ed3..079fcfc 100644
--- a/libmscgen/CMakeLists.txt
+++ b/libmscgen/CMakeLists.txt
@@ -4,6 +4,18 @@ include_directories(
${GENERATED_SRC}
)
+set(LEX_FILES mscgen_lexer)
+foreach(lex_file ${LEX_FILES})
+ add_custom_command(
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/scan_states.py ${CMAKE_SOURCE_DIR}/libmscgen/${lex_file}.l > ${GENERATED_SRC}/${lex_file}.l.h
+ DEPENDS ${CMAKE_SOURCE_DIR}/src/scan_states.py ${CMAKE_SOURCE_DIR}/libmscgen/${lex_file}.l
+ OUTPUT ${GENERATED_SRC}/${lex_file}.l.h
+ )
+ set_source_files_properties(${GENERATED_SRC}/${lex_file}.l.h PROPERTIES GENERATED 1)
+
+ FLEX_TARGET(${lex_file} ${lex_file}.l ${GENERATED_SRC}/${lex_file}.cpp COMPILE_FLAGS "${LEX_FLAGS}")
+endforeach()
+
add_library(mscgen
gd.c
gd_security.c
@@ -19,6 +31,7 @@ mscgen_ps_out.c
mscgen_null_out.c
${GENERATED_SRC}/mscgen_language.cpp
${GENERATED_SRC}/mscgen_lexer.cpp
+${GENERATED_SRC}/mscgen_lexer.l.h
mscgen_api.c
mscgen_msc.c
mscgen_safe.c
@@ -28,10 +41,6 @@ mscgen_utf8.c
)
-FLEX_TARGET(mscgen_lexer
- mscgen_lexer.l
- ${GENERATED_SRC}/mscgen_lexer.cpp
- COMPILE_FLAGS "${LEX_FLAGS}")
BISON_TARGET(mscgen_language
mscgen_language.y
${GENERATED_SRC}/mscgen_language.cpp
diff --git a/libmscgen/mscgen_lexer.l b/libmscgen/mscgen_lexer.l
index 29d6aea..8410e07 100644
--- a/libmscgen/mscgen_lexer.l
+++ b/libmscgen/mscgen_lexer.l
@@ -41,7 +41,7 @@ static Boolean lex_utf8 = FALSE;
/* Local function prototypes */
static void newline(const char *text, unsigned int n);
static char *trimQstring(char *s);
-
+static const char *stateToString(int state);
%}
/* Not used, so prevent compiler warning */
@@ -49,7 +49,8 @@ static char *trimQstring(char *s);
%option noinput
%option noyywrap
-%x IN_COMMENT BODY
+%x IN_COMMENT
+%x BODY
%%
<INITIAL>{
@@ -233,4 +234,5 @@ Boolean lex_getutf8(void)
return lex_utf8;
}
+#include "mscgen_lexer.l.h"
/* END OF FILE */