|
@@ -107,7 +107,7 @@ macro BISON_NO_HEADER() {
|
|
|
### Use `contrib/tools/flex` as flex tool. Default is `contrib/tools/flex-old`.
|
|
|
### @note: by default no header is emitted. Use `USE_MODERN_FLEX_WITH_HEADER` to add header emission.
|
|
|
macro USE_MODERN_FLEX() {
|
|
|
- SET(_FLEX_TOOL \${tool:"contrib/tools/flex"} --m4=\${tool:"contrib/tools/bison/m4"})
|
|
|
+ SET(_FLEX_TOOL \${tool:"contrib/tools/flex"} --m4=\${tool:"contrib/tools/m4"})
|
|
|
SET(_FLEX_TOOL_DIR contrib/tools/flex)
|
|
|
}
|
|
|
|
|
@@ -118,7 +118,7 @@ macro USE_MODERN_FLEX() {
|
|
|
###
|
|
|
### @example: USE_MODERN_FLEX_WITH_HEADER(_lexer.h)
|
|
|
macro USE_MODERN_FLEX_WITH_HEADER(Suffix) {
|
|
|
- SET(_FLEX_TOOL \${tool:"contrib/tools/flex"} --m4=\${tool:"contrib/tools/bison/m4"})
|
|
|
+ SET(_FLEX_TOOL \${tool:"contrib/tools/flex"} --m4=\${tool:"contrib/tools/m4"})
|
|
|
SET(_FLEX_TOOL_DIR contrib/tools/flex)
|
|
|
SET(_FLEX_HEADER --header-file=\${nopath;noext;output;main;addincl;norel;suf=$Suffix:SRC})
|
|
|
}
|
|
@@ -132,13 +132,13 @@ macro USE_OLD_FLEX() {
|
|
|
}
|
|
|
|
|
|
macro _SRC("y", SRC, SRCFLAGS...) {
|
|
|
- .PEERDIR=contrib/tools/bison/induced
|
|
|
- .CMD=${tool:"contrib/tools/bison"} $BISON_FLAGS --m4=${tool:"contrib/tools/bison/m4"} $_BISON_HEADER ${hide:_BISON_GEN_EXT} -o ${nopath;output;suf=$_BISON_GEN_EXT:SRC} ${input:SRC} ${SRCFLAGS} ${kv;hide:"p YC"} ${kv;hide:"pc light-green"} && $_BISON_PP
|
|
|
+ .PEERDIR=build/induced/by_bison
|
|
|
+ .CMD=${tool:"contrib/tools/bison"} $BISON_FLAGS --m4=${tool:"contrib/tools/m4"} $_BISON_HEADER ${hide:_BISON_GEN_EXT} -o ${nopath;output;suf=$_BISON_GEN_EXT:SRC} ${input:SRC} ${SRCFLAGS} ${kv;hide:"p YC"} ${kv;hide:"pc light-green"} && $_BISON_PP
|
|
|
.SEM=target_bison_parser PRIVATE ${input:SRC} ${output;nopath;noext;hide;suf=${OBJ_SUF}.o:SRC} ${nopath;noext;output;hide:SRC.h} ${nopath;noext;output;addincl;hide:SRC.h} && set_global_flags BISON_FLAGS $BISON_FLAGS && conan_require_tool m4/1.4.19 && conan_import '"bin, m4* -> ./bin/m4/bin"' && conan_require_tool bison/3.8.2 && conan_import '"bin, bison* -> ./bin/bison/bin"' && conan_import '"res, * -> ./bin/bison/res"' && platform_vars-BISON_FLAGS ${quo:BISON_FLAGS} && conan-tool_requires m4/1.4.19 && conan-imports 'bin, m4* -> ./bin/m4/bin' && conan-tool_requires bison/3.8.2 && conan-imports 'bin, bison* -> ./bin/bison/bin' && conan-imports 'res, * -> ./bin/bison/res'
|
|
|
}
|
|
|
|
|
|
macro _SRC("ypp", SRC, SRCFLAGS...) {
|
|
|
- .PEERDIR=contrib/tools/bison/induced
|
|
|
+ .PEERDIR=build/induced/by_bison
|
|
|
.CMD=$_SRC(y $SRC $SRCFLAGS)
|
|
|
.SEM=$_SRC(y $SRC $SRCFLAGS)
|
|
|
}
|