Skip to content

Commit

Permalink
flex: use %option instead of command line options.
Browse files Browse the repository at this point in the history
  • Loading branch information
groleo committed Sep 21, 2016
1 parent 2a5357a commit 0bdb01d
Show file tree
Hide file tree
Showing 20 changed files with 57 additions and 18 deletions.
2 changes: 1 addition & 1 deletion addon/doxywizard/CMakeLists.txt
Expand Up @@ -76,7 +76,7 @@ OUTPUT ${GENERATED_SRC_WIZARD}/configdoc.cpp
)
set_source_files_properties(${GENERATED_SRC_WIZARD}/configdoc.cpp PROPERTIES GENERATED 1)

FLEX_TARGET(config_doxyw config_doxyw.l ${GENERATED_SRC_WIZARD}/config_doxyw.cpp COMPILE_FLAGS "${LEX_FLAGS} -Pconfig_doxywYY")
FLEX_TARGET(config_doxyw config_doxyw.l ${GENERATED_SRC_WIZARD}/config_doxyw.cpp COMPILE_FLAGS "${LEX_FLAGS}")

qt_wrap_cpp(doxywizard_MOC
doxywizard.h
Expand Down
1 change: 1 addition & 0 deletions addon/doxywizard/config_doxyw.l
Expand Up @@ -13,6 +13,7 @@
*/

%option never-interactive
%option prefix="config_doxywYY"
%{

/*
Expand Down
34 changes: 17 additions & 17 deletions src/CMakeLists.txt
Expand Up @@ -100,23 +100,23 @@ add_custom_command(
set_source_files_properties(${GENERATED_SRC}/layout_default.xml.h PROPERTIES GENERATED 1)

# Targets for flex/bison generated files
FLEX_TARGET(scanner scanner.l ${GENERATED_SRC}/scanner.cpp COMPILE_FLAGS "${LEX_FLAGS} -PscannerYY")
FLEX_TARGET(code code.l ${GENERATED_SRC}/code.cpp COMPILE_FLAGS "${LEX_FLAGS} -PcodeYY")
FLEX_TARGET(pyscanner pyscanner.l ${GENERATED_SRC}/pyscanner.cpp COMPILE_FLAGS "${LEX_FLAGS} -PpyscannerYY")
FLEX_TARGET(pycode pycode.l ${GENERATED_SRC}/pycode.cpp COMPILE_FLAGS "${LEX_FLAGS} -PpycodeYY")
FLEX_TARGET(fortranscanner fortranscanner.l ${GENERATED_SRC}/fortranscanner.cpp COMPILE_FLAGS "${LEX_FLAGS} -PfortranscannerYY -i")
FLEX_TARGET(fortrancode fortrancode.l ${GENERATED_SRC}/fortrancode.cpp COMPILE_FLAGS "${LEX_FLAGS} -PfortrancodeYY -i")
FLEX_TARGET(vhdlcode vhdlcode.l ${GENERATED_SRC}/vhdlcode.cpp COMPILE_FLAGS "${LEX_FLAGS} -PvhdlcodeYY -i")
FLEX_TARGET(tclscanner tclscanner.l ${GENERATED_SRC}/tclscanner.cpp COMPILE_FLAGS "${LEX_FLAGS} -PtclscannerYY -i")
FLEX_TARGET(pre pre.l ${GENERATED_SRC}/pre.cpp COMPILE_FLAGS "${LEX_FLAGS} -PpreYY")
FLEX_TARGET(declinfo declinfo.l ${GENERATED_SRC}/declinfo.cpp COMPILE_FLAGS "${LEX_FLAGS} -PdeclinfoYY")
FLEX_TARGET(defargs defargs.l ${GENERATED_SRC}/defargs.cpp COMPILE_FLAGS "${LEX_FLAGS} -PdefargsYY")
FLEX_TARGET(doctokenizer doctokenizer.l ${GENERATED_SRC}/doctokenizer.cpp COMPILE_FLAGS "${LEX_FLAGS} -PdoctokenizerYY")
FLEX_TARGET(commentcnv commentcnv.l ${GENERATED_SRC}/commentcnv.cpp COMPILE_FLAGS "${LEX_FLAGS} -PcommentcnvYY")
FLEX_TARGET(commentscan commentscan.l ${GENERATED_SRC}/commentscan.cpp COMPILE_FLAGS "${LEX_FLAGS} -PcommentscanYY")
FLEX_TARGET(constexp constexp.l ${GENERATED_SRC}/constexp.cpp COMPILE_FLAGS "${LEX_FLAGS} -PconstexpYY")
FLEX_TARGET(xmlcode xmlcode.l ${GENERATED_SRC}/xmlcode.cpp COMPILE_FLAGS "${LEX_FLAGS} -PxmlcodeYY")
FLEX_TARGET(configimpl configimpl.l ${GENERATED_SRC}/configimpl.cpp COMPILE_FLAGS "${LEX_FLAGS} -PconfigimplYY")
FLEX_TARGET(scanner scanner.l ${GENERATED_SRC}/scanner.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(code code.l ${GENERATED_SRC}/code.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(pyscanner pyscanner.l ${GENERATED_SRC}/pyscanner.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(pycode pycode.l ${GENERATED_SRC}/pycode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(fortranscanner fortranscanner.l ${GENERATED_SRC}/fortranscanner.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(fortrancode fortrancode.l ${GENERATED_SRC}/fortrancode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(vhdlcode vhdlcode.l ${GENERATED_SRC}/vhdlcode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(tclscanner tclscanner.l ${GENERATED_SRC}/tclscanner.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(pre pre.l ${GENERATED_SRC}/pre.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(declinfo declinfo.l ${GENERATED_SRC}/declinfo.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(defargs defargs.l ${GENERATED_SRC}/defargs.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(doctokenizer doctokenizer.l ${GENERATED_SRC}/doctokenizer.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(commentcnv commentcnv.l ${GENERATED_SRC}/commentcnv.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(commentscan commentscan.l ${GENERATED_SRC}/commentscan.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(constexp constexp.l ${GENERATED_SRC}/constexp.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(xmlcode xmlcode.l ${GENERATED_SRC}/xmlcode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(configimpl configimpl.l ${GENERATED_SRC}/configimpl.cpp COMPILE_FLAGS "${LEX_FLAGS}")

BISON_TARGET(vhdlparser vhdlparser.y ${GENERATED_SRC}/vhdlparser.cpp COMPILE_FLAGS "${YACC_FLAGS} -l -p vhdlscannerYY")
BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS "${YACC_FLAGS} -l -p constexpYY")
Expand Down
2 changes: 2 additions & 0 deletions src/code.l
Expand Up @@ -15,6 +15,8 @@
*
*/
%option never-interactive
%option prefix="codeYY"

%{

/*
Expand Down
2 changes: 2 additions & 0 deletions src/commentcnv.l
Expand Up @@ -15,6 +15,8 @@
*
*/
%option never-interactive
%option prefix="commentcnvYY"

%{


Expand Down
2 changes: 2 additions & 0 deletions src/commentscan.l
Expand Up @@ -14,6 +14,8 @@
*/

%option never-interactive
%option prefix="commentscanYY"

%{

/*
Expand Down
2 changes: 2 additions & 0 deletions src/configimpl.l
Expand Up @@ -10,6 +10,8 @@
*
*/
%option never-interactive
%option prefix="configimplYY"

%{

/*
Expand Down
2 changes: 2 additions & 0 deletions src/constexp.l
Expand Up @@ -16,6 +16,8 @@
*
*/
%option never-interactive
%option prefix="constexpYY"

%{

#include "constexp.h"
Expand Down
2 changes: 2 additions & 0 deletions src/declinfo.l
Expand Up @@ -15,6 +15,8 @@
*
*/
%option never-interactive
%option prefix="declinfoYY"

%{

/*
Expand Down
2 changes: 2 additions & 0 deletions src/defargs.l
Expand Up @@ -40,6 +40,8 @@
* further determine the correct separation.
*/
%option never-interactive
%option prefix="defargsYY"

%{

/*
Expand Down
2 changes: 2 additions & 0 deletions src/doctokenizer.l
Expand Up @@ -17,6 +17,8 @@
*/

%option never-interactive
%option prefix="doctokenizerYY"

%{

#include <ctype.h>
Expand Down
3 changes: 3 additions & 0 deletions src/fortrancode.l
Expand Up @@ -24,6 +24,9 @@
- references to variables
**/
%option never-interactive
%option case-insensitive
%option prefix="fortrancodeYY"

%{

/*
Expand Down
3 changes: 3 additions & 0 deletions src/fortranscanner.l
Expand Up @@ -38,6 +38,9 @@
* - Must track yyLineNr when using REJECT, unput() or similar commands.
*/
%option never-interactive
%option case-insensitive
%option prefix="fortranscannerYY"

%{

#include <stdio.h>
Expand Down
2 changes: 2 additions & 0 deletions src/pre.l
Expand Up @@ -15,6 +15,8 @@
*
*/
%option never-interactive
%option prefix="preYY"

%{

/*
Expand Down
2 changes: 2 additions & 0 deletions src/pycode.l
Expand Up @@ -22,6 +22,8 @@
*/

%option never-interactive
%option prefix="pycodeYY"

%{

#include <stdio.h>
Expand Down
2 changes: 2 additions & 0 deletions src/pyscanner.l
Expand Up @@ -22,6 +22,8 @@
*/

%option never-interactive
%option prefix="pyscannerYY"

%{

/*
Expand Down
2 changes: 2 additions & 0 deletions src/scanner.l
Expand Up @@ -15,6 +15,8 @@
*
*/
%option never-interactive
%option prefix="scannerYY"

%{

/*
Expand Down
3 changes: 3 additions & 0 deletions src/tclscanner.l
Expand Up @@ -15,6 +15,9 @@
*
*/
%option never-interactive
%option case-insensitive
%option prefix="tclscannerYY"

%{
#include <stdio.h>
#include <stdlib.h>
Expand Down
3 changes: 3 additions & 0 deletions src/vhdlcode.l
Expand Up @@ -18,6 +18,9 @@
* supports VHDL-87/93/2008
******************************************************************************/
%option never-interactive
%option case-insensitive
%option prefix="vhdlcodeYY"

%{

/*
Expand Down
2 changes: 2 additions & 0 deletions src/xmlcode.l
Expand Up @@ -18,6 +18,8 @@
******************************************************************************/

%option never-interactive
%option prefix="xmlcodeYY"

%{

#include <stdio.h>
Expand Down

0 comments on commit 0bdb01d

Please sign in to comment.