-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathre2c.patch
66 lines (60 loc) · 1.99 KB
/
re2c.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From: Peter Kokot <peterkokot@gmail.com>
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 44159297a04..b87f4e33cc8 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 4c883b81c5f..70f85e43068 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -1817,11 +1817,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 60d995526ea..ba1423c5a4e 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]+