File tree Expand file tree Collapse file tree 6 files changed +37
-15
lines changed Expand file tree Collapse file tree 6 files changed +37
-15
lines changed Original file line number Diff line number Diff line change @@ -26,14 +26,9 @@ if(BISON_FOUND)
2626 ${CMAKE_CURRENT_SOURCE_DIR} /zend_ini_parser.c
2727 HEADER
2828 ${verbose}
29+ CODEGEN
2930 )
3031
31- if (CMAKE_SCRIPT_MODE_FILE )
32- set (verbose "" )
33- else ()
34- set (verbose VERBOSE)
35- endif ()
36-
3732 bison(
3833 zend_language_parser
3934 zend_language_parser.y
@@ -125,7 +120,12 @@ if(RE2C_FOUND)
125120 zend_ini_scanner.l
126121 ${CMAKE_CURRENT_SOURCE_DIR} /zend_ini_scanner.c
127122 HEADER ${CMAKE_CURRENT_SOURCE_DIR} /zend_ini_scanner_defs.h
128- OPTIONS --case-inverted -cbdF
123+ OPTIONS
124+ --case-inverted
125+ --conditions
126+ --bit-vectors
127+ --debug-output
128+ --flex-syntax
129129 CODEGEN
130130 )
131131
@@ -134,7 +134,12 @@ if(RE2C_FOUND)
134134 zend_language_scanner.l
135135 ${CMAKE_CURRENT_SOURCE_DIR} /zend_language_scanner.c
136136 HEADER ${CMAKE_CURRENT_SOURCE_DIR} /zend_language_scanner_defs.h
137- OPTIONS --case-inverted -cbdF
137+ OPTIONS
138+ --case-inverted
139+ --conditions
140+ --bit-vectors
141+ --debug-output
142+ --flex-syntax
138143 CODEGEN
139144 )
140145endif ()
Original file line number Diff line number Diff line change @@ -431,6 +431,19 @@ function(_re2c_process_options options result)
431431 list (PREPEND options ${RE2C_DEFAULT_OPTIONS} )
432432 endif ()
433433
434+ # Remove any generator expressions when running in script mode.
435+ if (CMAKE_SCRIPT_MODE_FILE )
436+ list (TRANSFORM options GENEX_STRIP)
437+ endif ()
438+
439+ # Sync long -c variants. The long --conditions option was introduced in re2c
440+ # version 1.1 as a new alias for the legacy --start-conditions.
441+ if (RE2C_VERSION VERSION_LESS 1.1)
442+ list (TRANSFORM options REPLACE "^--conditions$" "--start-conditions" )
443+ else ()
444+ list (TRANSFORM options REPLACE "^--start-conditions$" "--conditions" )
445+ endif ()
446+
434447 set (${result} ${options} )
435448
436449 return (PROPAGATE ${result} )
Original file line number Diff line number Diff line change @@ -15,15 +15,15 @@ if(BISON_FOUND)
1515 if (CMAKE_SCRIPT_MODE_FILE )
1616 set (verbose "" )
1717 else ()
18- set (verbose VERBOSE) #REPORT_FILE json_parser.output)
18+ set (verbose VERBOSE)
1919 endif ()
2020
2121 bison(
2222 php_ext_json_parser
2323 json_parser.y
2424 ${CMAKE_CURRENT_SOURCE_DIR} /json_parser.tab.c
25- ${verbose}
2625 HEADER
26+ ${verbose}
2727 CODEGEN
2828 )
2929endif ()
@@ -41,7 +41,7 @@ if(RE2C_FOUND)
4141 json_scanner.re
4242 ${CMAKE_CURRENT_SOURCE_DIR} /json_scanner.c
4343 HEADER ${CMAKE_CURRENT_SOURCE_DIR} /php_json_scanner_defs.h
44- OPTIONS -bc
44+ OPTIONS --bit-vectors --conditions
4545 CODEGEN
4646 )
4747endif ()
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ if(RE2C_FOUND)
1212 php_ext_phar_path_check
1313 phar_path_check.re
1414 ${CMAKE_CURRENT_SOURCE_DIR} /phar_path_check.c
15- OPTIONS -b
15+ OPTIONS --bit-vectors
1616 CODEGEN
1717 )
1818endif ()
Original file line number Diff line number Diff line change @@ -15,15 +15,15 @@ if(RE2C_FOUND)
1515 php_ext_standard_url_scanner_ex
1616 url_scanner_ex.re
1717 ${CMAKE_CURRENT_SOURCE_DIR} /url_scanner_ex.c
18- OPTIONS -b
18+ OPTIONS --bit-vectors
1919 CODEGEN
2020 )
2121
2222 re2c(
2323 php_ext_standard_var_unserializer
2424 var_unserializer.re
2525 ${CMAKE_CURRENT_SOURCE_DIR} /var_unserializer.c
26- OPTIONS -b
26+ OPTIONS --bit-vectors
2727 CODEGEN
2828 )
2929endif ()
Original file line number Diff line number Diff line change @@ -37,7 +37,11 @@ if(RE2C_FOUND)
3737 php_sapi_phpdbg_lexer
3838 phpdbg_lexer.l
3939 ${CMAKE_CURRENT_SOURCE_DIR} /phpdbg_lexer.c
40- OPTIONS -cbdF
40+ OPTIONS
41+ --conditions
42+ --debug-output
43+ --bit-vectors
44+ --flex-syntax
4145 CODEGEN
4246 )
4347endif ()
You can’t perform that action at this time.
0 commit comments