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)
26
26
${CMAKE_CURRENT_SOURCE_DIR} /zend_ini_parser.c
27
27
HEADER
28
28
${verbose}
29
+ CODEGEN
29
30
)
30
31
31
- if (CMAKE_SCRIPT_MODE_FILE )
32
- set (verbose "" )
33
- else ()
34
- set (verbose VERBOSE )
35
- endif ()
36
-
37
32
bison (
38
33
zend_language_parser
39
34
zend_language_parser.y
@@ -125,7 +120,12 @@ if(RE2C_FOUND)
125
120
zend_ini_scanner.l
126
121
${CMAKE_CURRENT_SOURCE_DIR} /zend_ini_scanner.c
127
122
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
129
129
CODEGEN
130
130
)
131
131
@@ -134,7 +134,12 @@ if(RE2C_FOUND)
134
134
zend_language_scanner.l
135
135
${CMAKE_CURRENT_SOURCE_DIR} /zend_language_scanner.c
136
136
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
138
143
CODEGEN
139
144
)
140
145
endif ()
Original file line number Diff line number Diff line change @@ -431,6 +431,19 @@ function(_re2c_process_options options result)
431
431
list (PREPEND options ${RE2C_DEFAULT_OPTIONS} )
432
432
endif ()
433
433
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
+
434
447
set (${result} ${options} )
435
448
436
449
return (PROPAGATE ${result} )
Original file line number Diff line number Diff line change @@ -15,15 +15,15 @@ if(BISON_FOUND)
15
15
if (CMAKE_SCRIPT_MODE_FILE )
16
16
set (verbose "" )
17
17
else ()
18
- set (verbose VERBOSE ) # REPORT_FILE json_parser.output)
18
+ set (verbose VERBOSE )
19
19
endif ()
20
20
21
21
bison (
22
22
php_ext_json_parser
23
23
json_parser.y
24
24
${CMAKE_CURRENT_SOURCE_DIR} /json_parser.tab.c
25
- ${verbose}
26
25
HEADER
26
+ ${verbose}
27
27
CODEGEN
28
28
)
29
29
endif ()
@@ -41,7 +41,7 @@ if(RE2C_FOUND)
41
41
json_scanner.re
42
42
${CMAKE_CURRENT_SOURCE_DIR} /json_scanner.c
43
43
HEADER ${CMAKE_CURRENT_SOURCE_DIR} /php_json_scanner_defs.h
44
- OPTIONS -bc
44
+ OPTIONS --bit-vectors --conditions
45
45
CODEGEN
46
46
)
47
47
endif ()
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ if(RE2C_FOUND)
12
12
php_ext_phar_path_check
13
13
phar_path_check.re
14
14
${CMAKE_CURRENT_SOURCE_DIR} /phar_path_check.c
15
- OPTIONS -b
15
+ OPTIONS --bit-vectors
16
16
CODEGEN
17
17
)
18
18
endif ()
Original file line number Diff line number Diff line change @@ -15,15 +15,15 @@ if(RE2C_FOUND)
15
15
php_ext_standard_url_scanner_ex
16
16
url_scanner_ex.re
17
17
${CMAKE_CURRENT_SOURCE_DIR} /url_scanner_ex.c
18
- OPTIONS -b
18
+ OPTIONS --bit-vectors
19
19
CODEGEN
20
20
)
21
21
22
22
re2c (
23
23
php_ext_standard_var_unserializer
24
24
var_unserializer.re
25
25
${CMAKE_CURRENT_SOURCE_DIR} /var_unserializer.c
26
- OPTIONS -b
26
+ OPTIONS --bit-vectors
27
27
CODEGEN
28
28
)
29
29
endif ()
Original file line number Diff line number Diff line change @@ -37,7 +37,11 @@ if(RE2C_FOUND)
37
37
php_sapi_phpdbg_lexer
38
38
phpdbg_lexer.l
39
39
${CMAKE_CURRENT_SOURCE_DIR} /phpdbg_lexer.c
40
- OPTIONS -cbdF
40
+ OPTIONS
41
+ --conditions
42
+ --debug-output
43
+ --bit-vectors
44
+ --flex-syntax
41
45
CODEGEN
42
46
)
43
47
endif ()
You can’t perform that action at this time.
0 commit comments