-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
198 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
From: Peter Kokot <[email protected]> | ||
Subject: Fix re2c -Wuseless-escape warnings | ||
|
||
re2c version 4 enables some warnigns by default. This fixes the | ||
-Wuseless-escape warnings. | ||
--- | ||
Zend/zend_ini_scanner.l | 6 +++--- | ||
Zend/zend_language_scanner.l | 4 ++-- | ||
sapi/phpdbg/phpdbg_lexer.l | 2 +- | ||
3 files changed, 6 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l | ||
index 44159297a0..b87f4e33cc 100644 | ||
--- a/Zend/zend_ini_scanner.l | ||
+++ b/Zend/zend_ini_scanner.l | ||
@@ -352,16 +352,16 @@ restart: | ||
/*!re2c | ||
re2c:yyfill:check = 0; | ||
LNUM [0-9]+ | ||
-DNUM ([0-9]*[\.][0-9]+)|([0-9]+[\.][0-9]*) | ||
+DNUM ([0-9]*[.][0-9]+)|([0-9]+[.][0-9]*) | ||
NUMBER [-]?{LNUM}|{DNUM} | ||
ANY_CHAR (.|[\n\t]) | ||
NEWLINE ("\r"|"\n"|"\r\n") | ||
TABS_AND_SPACES [ \t] | ||
WHITESPACE [ \t]+ | ||
CONSTANT [a-zA-Z_][a-zA-Z0-9_]* | ||
-LABEL_CHAR [^=\n\r\t;&|^$~(){}!"\[\]\x00] | ||
+LABEL_CHAR [^=\n\r\t;&|^$~(){}!"[\]\x00] | ||
LABEL ({LABEL_CHAR}+) | ||
-TOKENS [:,.\[\]"'()&|^+-/*=%$!~<>?@{}] | ||
+TOKENS [:,.[\]"'()&|^+-/*=%$!~<>?@{}] | ||
OPERATORS [&|^~()!] | ||
DOLLAR_CURLY "${" | ||
|
||
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l | ||
index 25e1ecbca6..3ea51fe7c9 100644 | ||
--- a/Zend/zend_language_scanner.l | ||
+++ b/Zend/zend_language_scanner.l | ||
@@ -1801,11 +1801,11 @@ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_ | ||
RETURN_TOKEN(T_MUL_EQUAL); | ||
} | ||
|
||
-<ST_IN_SCRIPTING>"*\*" { | ||
+<ST_IN_SCRIPTING>"**" { | ||
RETURN_TOKEN(T_POW); | ||
} | ||
|
||
-<ST_IN_SCRIPTING>"*\*=" { | ||
+<ST_IN_SCRIPTING>"**=" { | ||
RETURN_TOKEN(T_POW_EQUAL); | ||
} | ||
|
||
diff --git a/sapi/phpdbg/phpdbg_lexer.l b/sapi/phpdbg/phpdbg_lexer.l | ||
index 6245262a00..bcfefcba81 100644 | ||
--- a/sapi/phpdbg/phpdbg_lexer.l | ||
+++ b/sapi/phpdbg/phpdbg_lexer.l | ||
@@ -77,7 +77,7 @@ T_IF 'if' | ||
T_RUN 'run' | ||
T_RUN_SHORT "r" | ||
WS [ \r\t]+ | ||
-DIGITS [-]?[0-9\.]+ | ||
+DIGITS [-]?[0-9.]+ | ||
ID [^ \r\n\t:#\000]+ | ||
GENERIC_ID ([^ \r\n\t:#\000"']|":\\")+|["]([^\n\000"\\]|"\\\\"|"\\"["])+["]|[']([^\n\000'\\]|"\\\\"|"\\"['])+['] | ||
ADDR [0][x][a-fA-F0-9]+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
From: Peter Kokot <[email protected]> | ||
Subject: Fix re2c -Wuseless-escape warnings | ||
|
||
re2c version 4 enables some warnigns by default. This fixes the | ||
-Wuseless-escape warnings. | ||
--- | ||
Zend/zend_ini_scanner.l | 6 +++--- | ||
Zend/zend_language_scanner.l | 4 ++-- | ||
sapi/phpdbg/phpdbg_lexer.l | 2 +- | ||
3 files changed, 6 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l | ||
index 44159297a0..b87f4e33cc 100644 | ||
--- a/Zend/zend_ini_scanner.l | ||
+++ b/Zend/zend_ini_scanner.l | ||
@@ -352,16 +352,16 @@ restart: | ||
/*!re2c | ||
re2c:yyfill:check = 0; | ||
LNUM [0-9]+ | ||
-DNUM ([0-9]*[\.][0-9]+)|([0-9]+[\.][0-9]*) | ||
+DNUM ([0-9]*[.][0-9]+)|([0-9]+[.][0-9]*) | ||
NUMBER [-]?{LNUM}|{DNUM} | ||
ANY_CHAR (.|[\n\t]) | ||
NEWLINE ("\r"|"\n"|"\r\n") | ||
TABS_AND_SPACES [ \t] | ||
WHITESPACE [ \t]+ | ||
CONSTANT [a-zA-Z_][a-zA-Z0-9_]* | ||
-LABEL_CHAR [^=\n\r\t;&|^$~(){}!"\[\]\x00] | ||
+LABEL_CHAR [^=\n\r\t;&|^$~(){}!"[\]\x00] | ||
LABEL ({LABEL_CHAR}+) | ||
-TOKENS [:,.\[\]"'()&|^+-/*=%$!~<>?@{}] | ||
+TOKENS [:,.[\]"'()&|^+-/*=%$!~<>?@{}] | ||
OPERATORS [&|^~()!] | ||
DOLLAR_CURLY "${" | ||
|
||
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l | ||
index 7ae7387592..988ec6366a 100644 | ||
--- a/Zend/zend_language_scanner.l | ||
+++ b/Zend/zend_language_scanner.l | ||
@@ -1813,11 +1813,11 @@ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_ | ||
RETURN_TOKEN(T_MUL_EQUAL); | ||
} | ||
|
||
-<ST_IN_SCRIPTING>"*\*" { | ||
+<ST_IN_SCRIPTING>"**" { | ||
RETURN_TOKEN(T_POW); | ||
} | ||
|
||
-<ST_IN_SCRIPTING>"*\*=" { | ||
+<ST_IN_SCRIPTING>"**=" { | ||
RETURN_TOKEN(T_POW_EQUAL); | ||
} | ||
|
||
diff --git a/sapi/phpdbg/phpdbg_lexer.l b/sapi/phpdbg/phpdbg_lexer.l | ||
index 6245262a00..bcfefcba81 100644 | ||
--- a/sapi/phpdbg/phpdbg_lexer.l | ||
+++ b/sapi/phpdbg/phpdbg_lexer.l | ||
@@ -77,7 +77,7 @@ T_IF 'if' | ||
T_RUN 'run' | ||
T_RUN_SHORT "r" | ||
WS [ \r\t]+ | ||
-DIGITS [-]?[0-9\.]+ | ||
+DIGITS [-]?[0-9.]+ | ||
ID [^ \r\n\t:#\000]+ | ||
GENERIC_ID ([^ \r\n\t:#\000"']|":\\")+|["]([^\n\000"\\]|"\\\\"|"\\"["])+["]|[']([^\n\000'\\]|"\\\\"|"\\"['])+['] | ||
ADDR [0][x][a-fA-F0-9]+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
From: Peter Kokot <[email protected]> | ||
Subject: Fix re2c -Wuseless-escape warnings | ||
|
||
re2c version 4 enables some warnigns by default. This fixes the | ||
-Wuseless-escape warnings. | ||
--- | ||
Zend/zend_ini_scanner.l | 6 +++--- | ||
Zend/zend_language_scanner.l | 4 ++-- | ||
sapi/phpdbg/phpdbg_lexer.l | 2 +- | ||
3 files changed, 6 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l | ||
index 44159297a0..b87f4e33cc 100644 | ||
--- a/Zend/zend_ini_scanner.l | ||
+++ b/Zend/zend_ini_scanner.l | ||
@@ -352,16 +352,16 @@ restart: | ||
/*!re2c | ||
re2c:yyfill:check = 0; | ||
LNUM [0-9]+ | ||
-DNUM ([0-9]*[\.][0-9]+)|([0-9]+[\.][0-9]*) | ||
+DNUM ([0-9]*[.][0-9]+)|([0-9]+[.][0-9]*) | ||
NUMBER [-]?{LNUM}|{DNUM} | ||
ANY_CHAR (.|[\n\t]) | ||
NEWLINE ("\r"|"\n"|"\r\n") | ||
TABS_AND_SPACES [ \t] | ||
WHITESPACE [ \t]+ | ||
CONSTANT [a-zA-Z_][a-zA-Z0-9_]* | ||
-LABEL_CHAR [^=\n\r\t;&|^$~(){}!"\[\]\x00] | ||
+LABEL_CHAR [^=\n\r\t;&|^$~(){}!"[\]\x00] | ||
LABEL ({LABEL_CHAR}+) | ||
-TOKENS [:,.\[\]"'()&|^+-/*=%$!~<>?@{}] | ||
+TOKENS [:,.[\]"'()&|^+-/*=%$!~<>?@{}] | ||
OPERATORS [&|^~()!] | ||
DOLLAR_CURLY "${" | ||
|
||
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l | ||
index 7ae7387592..988ec6366a 100644 | ||
--- a/Zend/zend_language_scanner.l | ||
+++ b/Zend/zend_language_scanner.l | ||
@@ -1813,11 +1813,11 @@ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_ | ||
RETURN_TOKEN(T_MUL_EQUAL); | ||
} | ||
|
||
-<ST_IN_SCRIPTING>"*\*" { | ||
+<ST_IN_SCRIPTING>"**" { | ||
RETURN_TOKEN(T_POW); | ||
} | ||
|
||
-<ST_IN_SCRIPTING>"*\*=" { | ||
+<ST_IN_SCRIPTING>"**=" { | ||
RETURN_TOKEN(T_POW_EQUAL); | ||
} | ||
|
||
diff --git a/sapi/phpdbg/phpdbg_lexer.l b/sapi/phpdbg/phpdbg_lexer.l | ||
index 6245262a00..bcfefcba81 100644 | ||
--- a/sapi/phpdbg/phpdbg_lexer.l | ||
+++ b/sapi/phpdbg/phpdbg_lexer.l | ||
@@ -77,7 +77,7 @@ T_IF 'if' | ||
T_RUN 'run' | ||
T_RUN_SHORT "r" | ||
WS [ \r\t]+ | ||
-DIGITS [-]?[0-9\.]+ | ||
+DIGITS [-]?[0-9.]+ | ||
ID [^ \r\n\t:#\000]+ | ||
GENERIC_ID ([^ \r\n\t:#\000"']|":\\")+|["]([^\n\000"\\]|"\\\\"|"\\"["])+["]|[']([^\n\000'\\]|"\\\\"|"\\"['])+['] | ||
ADDR [0][x][a-fA-F0-9]+ |