diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-03-14 21:27:57 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-03-14 21:27:57 +0300 |
commit | 53b474504d398f5a9de9f631e9b74ad08d909e58 (patch) | |
tree | 2f462838951556ef5af013b90d85fc52b41a6005 /Zend | |
parent | d69e3ec47c73fbb0e456dbe28442f92e8a132d33 (diff) | |
download | php-git-53b474504d398f5a9de9f631e9b74ad08d909e58.tar.gz |
PHP scanner optimization
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_language_scanner.c | 828 | ||||
-rw-r--r-- | Zend/zend_language_scanner.l | 101 |
2 files changed, 474 insertions, 455 deletions
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c index a87824dfeb..62bb7b576c 100644 --- a/Zend/zend_language_scanner.c +++ b/Zend/zend_language_scanner.c @@ -1104,6 +1104,17 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot goto emit_token; \ } while (0) +#define RETURN_TOKEN_WITH_VAL(_token) do { \ + token = _token; \ + goto emit_token_with_val; \ + } while (0) + +#define RETURN_TOKEN_WITH_STR(_token, _offset) do { \ + token = _token; \ + offset = _offset; \ + goto emit_token_with_str; \ + } while (0) + #define SKIP_TOKEN(_token) do { \ token = _token; \ goto skip_token; \ @@ -1112,6 +1123,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot int ZEND_FASTCALL lex_scan(zval *zendlval, zend_parser_stack_elem *elem) { int token; +int offset; int start_line = CG(zend_lineno); ZVAL_UNDEF(zendlval); @@ -1119,7 +1131,7 @@ restart: SCNG(yy_text) = YYCURSOR; -#line 1123 "Zend/zend_language_scanner.c" +#line 1135 "Zend/zend_language_scanner.c" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -1171,7 +1183,7 @@ yyc_INITIAL: yy4: YYDEBUG(4, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1834 "Zend/zend_language_scanner.l" +#line 1840 "Zend/zend_language_scanner.l" { if (YYCURSOR > YYLIMIT) { RETURN_TOKEN(END); @@ -1214,9 +1226,9 @@ inline_char_handler: ZVAL_STRINGL(zendlval, yytext, yyleng); } HANDLE_NEWLINES(yytext, yyleng); - RETURN_TOKEN(T_INLINE_HTML); + RETURN_TOKEN_WITH_VAL(T_INLINE_HTML); } -#line 1220 "Zend/zend_language_scanner.c" +#line 1232 "Zend/zend_language_scanner.c" yy5: YYDEBUG(5, *YYCURSOR); yych = *++YYCURSOR; @@ -1232,7 +1244,7 @@ yy5: yy7: YYDEBUG(7, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1822 "Zend/zend_language_scanner.l" +#line 1828 "Zend/zend_language_scanner.l" { if (CG(short_tags)) { BEGIN(ST_IN_SCRIPTING); @@ -1244,13 +1256,13 @@ yy7: goto inline_char_handler; } } -#line 1248 "Zend/zend_language_scanner.c" +#line 1260 "Zend/zend_language_scanner.c" yy8: YYDEBUG(8, *YYCURSOR); ++YYCURSOR; YYDEBUG(9, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1803 "Zend/zend_language_scanner.l" +#line 1809 "Zend/zend_language_scanner.l" { BEGIN(ST_IN_SCRIPTING); if (PARSER_MODE()) { @@ -1258,7 +1270,7 @@ yy8: } RETURN_TOKEN(T_OPEN_TAG_WITH_ECHO); } -#line 1262 "Zend/zend_language_scanner.c" +#line 1274 "Zend/zend_language_scanner.c" yy10: YYDEBUG(10, *YYCURSOR); yych = *++YYCURSOR; @@ -1289,7 +1301,7 @@ yy14: yy15: YYDEBUG(15, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1812 "Zend/zend_language_scanner.l" +#line 1818 "Zend/zend_language_scanner.l" { HANDLE_NEWLINE(yytext[yyleng-1]); BEGIN(ST_IN_SCRIPTING); @@ -1298,7 +1310,7 @@ yy15: } RETURN_TOKEN(T_OPEN_TAG); } -#line 1302 "Zend/zend_language_scanner.c" +#line 1314 "Zend/zend_language_scanner.c" yy16: YYDEBUG(16, *YYCURSOR); ++YYCURSOR; @@ -1355,7 +1367,7 @@ yyc_ST_BACKQUOTE: yy20: YYDEBUG(20, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2267 "Zend/zend_language_scanner.l" +#line 2268 "Zend/zend_language_scanner.l" { if (YYCURSOR > YYLIMIT) { RETURN_TOKEN(END); @@ -1395,12 +1407,12 @@ yy20: if (EXPECTED(zend_scan_escape_string(zendlval, yytext, yyleng, '`') == SUCCESS) || !PARSER_MODE()) { - RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); + RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } else { RETURN_TOKEN(T_ERROR); } } -#line 1404 "Zend/zend_language_scanner.c" +#line 1416 "Zend/zend_language_scanner.c" yy21: YYDEBUG(21, *YYCURSOR); yych = *++YYCURSOR; @@ -1424,12 +1436,12 @@ yy22: ++YYCURSOR; YYDEBUG(23, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2207 "Zend/zend_language_scanner.l" +#line 2208 "Zend/zend_language_scanner.l" { BEGIN(ST_IN_SCRIPTING); RETURN_TOKEN('`'); } -#line 1433 "Zend/zend_language_scanner.c" +#line 1445 "Zend/zend_language_scanner.c" yy24: YYDEBUG(24, *YYCURSOR); yych = *++YYCURSOR; @@ -1450,36 +1462,34 @@ yy25: yy27: YYDEBUG(27, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1899 "Zend/zend_language_scanner.l" +#line 1903 "Zend/zend_language_scanner.l" { - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 1459 "Zend/zend_language_scanner.c" +#line 1470 "Zend/zend_language_scanner.c" yy28: YYDEBUG(28, *YYCURSOR); ++YYCURSOR; YYDEBUG(29, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1602 "Zend/zend_language_scanner.l" +#line 1609 "Zend/zend_language_scanner.l" { yy_push_state(ST_LOOKING_FOR_VARNAME); RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES); } -#line 1470 "Zend/zend_language_scanner.c" +#line 1481 "Zend/zend_language_scanner.c" yy30: YYDEBUG(30, *YYCURSOR); ++YYCURSOR; YYDEBUG(31, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2194 "Zend/zend_language_scanner.l" +#line 2196 "Zend/zend_language_scanner.l" { - Z_LVAL_P(zendlval) = (zend_long) '{'; yy_push_state(ST_IN_SCRIPTING); yyless(1); RETURN_TOKEN(T_CURLY_OPEN); } -#line 1483 "Zend/zend_language_scanner.c" +#line 1493 "Zend/zend_language_scanner.c" yy32: YYDEBUG(32, *YYCURSOR); yych = *++YYCURSOR; @@ -1493,14 +1503,13 @@ yy34: ++YYCURSOR; YYDEBUG(35, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1892 "Zend/zend_language_scanner.l" +#line 1897 "Zend/zend_language_scanner.l" { yyless(yyleng - 1); yy_push_state(ST_VAR_OFFSET); - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 1504 "Zend/zend_language_scanner.c" +#line 1513 "Zend/zend_language_scanner.c" yy36: YYDEBUG(36, *YYCURSOR); yych = *++YYCURSOR; @@ -1518,14 +1527,13 @@ yy37: ++YYCURSOR; YYDEBUG(38, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1883 "Zend/zend_language_scanner.l" +#line 1889 "Zend/zend_language_scanner.l" { yyless(yyleng - 3); yy_push_state(ST_LOOKING_FOR_PROPERTY); - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 1529 "Zend/zend_language_scanner.c" +#line 1537 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_DOUBLE_QUOTES: @@ -1578,7 +1586,7 @@ yyc_ST_DOUBLE_QUOTES: yy42: YYDEBUG(42, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2213 "Zend/zend_language_scanner.l" +#line 2214 "Zend/zend_language_scanner.l" { if (GET_DOUBLE_QUOTES_SCANNED_LENGTH()) { YYCURSOR += GET_DOUBLE_QUOTES_SCANNED_LENGTH() - 1; @@ -1626,23 +1634,23 @@ double_quotes_scan_done: if (EXPECTED(zend_scan_escape_string(zendlval, yytext, yyleng, '"') == SUCCESS) || !PARSER_MODE()) { - RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); + RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } else { RETURN_TOKEN(T_ERROR); } } -#line 1635 "Zend/zend_language_scanner.c" +#line 1643 "Zend/zend_language_scanner.c" yy43: YYDEBUG(43, *YYCURSOR); ++YYCURSOR; YYDEBUG(44, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2202 "Zend/zend_language_scanner.l" +#line 2203 "Zend/zend_language_scanner.l" { BEGIN(ST_IN_SCRIPTING); RETURN_TOKEN('"'); } -#line 1646 "Zend/zend_language_scanner.c" +#line 1654 "Zend/zend_language_scanner.c" yy45: YYDEBUG(45, *YYCURSOR); yych = *++YYCURSOR; @@ -1681,36 +1689,34 @@ yy47: yy49: YYDEBUG(49, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1899 "Zend/zend_language_scanner.l" +#line 1903 "Zend/zend_language_scanner.l" { - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 1690 "Zend/zend_language_scanner.c" +#line 1697 "Zend/zend_language_scanner.c" yy50: YYDEBUG(50, *YYCURSOR); ++YYCURSOR; YYDEBUG(51, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1602 "Zend/zend_language_scanner.l" +#line 1609 "Zend/zend_language_scanner.l" { yy_push_state(ST_LOOKING_FOR_VARNAME); RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES); } -#line 1701 "Zend/zend_language_scanner.c" +#line 1708 "Zend/zend_language_scanner.c" yy52: YYDEBUG(52, *YYCURSOR); ++YYCURSOR; YYDEBUG(53, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2194 "Zend/zend_language_scanner.l" +#line 2196 "Zend/zend_language_scanner.l" { - Z_LVAL_P(zendlval) = (zend_long) '{'; yy_push_state(ST_IN_SCRIPTING); yyless(1); RETURN_TOKEN(T_CURLY_OPEN); } -#line 1714 "Zend/zend_language_scanner.c" +#line 1720 "Zend/zend_language_scanner.c" yy54: YYDEBUG(54, *YYCURSOR); yych = *++YYCURSOR; @@ -1724,14 +1730,13 @@ yy56: ++YYCURSOR; YYDEBUG(57, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1892 "Zend/zend_language_scanner.l" +#line 1897 "Zend/zend_language_scanner.l" { yyless(yyleng - 1); yy_push_state(ST_VAR_OFFSET); - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 1735 "Zend/zend_language_scanner.c" +#line 1740 "Zend/zend_language_scanner.c" yy58: YYDEBUG(58, *YYCURSOR); yych = *++YYCURSOR; @@ -1749,14 +1754,13 @@ yy59: ++YYCURSOR; YYDEBUG(60, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1883 "Zend/zend_language_scanner.l" +#line 1889 "Zend/zend_language_scanner.l" { yyless(yyleng - 3); yy_push_state(ST_LOOKING_FOR_PROPERTY); - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 1760 "Zend/zend_language_scanner.c" +#line 1764 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_END_HEREDOC: @@ -1767,7 +1771,7 @@ yyc_ST_END_HEREDOC: ++YYCURSOR; YYDEBUG(64, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2180 "Zend/zend_language_scanner.l" +#line 2182 "Zend/zend_language_scanner.l" { zend_heredoc_label *heredoc_label = zend_ptr_stack_pop(&SCNG(heredoc_label_stack)); @@ -1780,7 +1784,7 @@ yyc_ST_END_HEREDOC: BEGIN(ST_IN_SCRIPTING); RETURN_TOKEN(T_END_HEREDOC); } -#line 1784 "Zend/zend_language_scanner.c" +#line 1788 "Zend/zend_language_scanner.c" /* *********************************** */ yyc_ST_HEREDOC: { @@ -1828,7 +1832,7 @@ yyc_ST_HEREDOC: yy68: YYDEBUG(68, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2313 "Zend/zend_language_scanner.l" +#line 2314 "Zend/zend_language_scanner.l" { int newline = 0; @@ -1900,12 +1904,12 @@ heredoc_scan_done: if (EXPECTED(zend_scan_escape_string(zendlval, yytext, yyleng - newline, 0) == SUCCESS) || !PARSER_MODE()) { - RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); + RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } else { RETURN_TOKEN(T_ERROR); } } -#line 1909 "Zend/zend_language_scanner.c" +#line 1913 "Zend/zend_language_scanner.c" yy69: YYDEBUG(69, *YYCURSOR); yych = *++YYCURSOR; @@ -1944,36 +1948,34 @@ yy71: yy73: YYDEBUG(73, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1899 "Zend/zend_language_scanner.l" +#line 1903 "Zend/zend_language_scanner.l" { - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 1953 "Zend/zend_language_scanner.c" +#line 1956 "Zend/zend_language_scanner.c" yy74: YYDEBUG(74, *YYCURSOR); ++YYCURSOR; YYDEBUG(75, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1602 "Zend/zend_language_scanner.l" +#line 1609 "Zend/zend_language_scanner.l" { yy_push_state(ST_LOOKING_FOR_VARNAME); RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES); } -#line 1964 "Zend/zend_language_scanner.c" +#line 1967 "Zend/zend_language_scanner.c" yy76: YYDEBUG(76, *YYCURSOR); ++YYCURSOR; YYDEBUG(77, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2194 "Zend/zend_language_scanner.l" +#line 2196 "Zend/zend_language_scanner.l" { - Z_LVAL_P(zendlval) = (zend_long) '{'; yy_push_state(ST_IN_SCRIPTING); yyless(1); RETURN_TOKEN(T_CURLY_OPEN); } -#line 1977 "Zend/zend_language_scanner.c" +#line 1979 "Zend/zend_language_scanner.c" yy78: YYDEBUG(78, *YYCURSOR); yych = *++YYCURSOR; @@ -1987,14 +1989,13 @@ yy80: ++YYCURSOR; YYDEBUG(81, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1892 "Zend/zend_language_scanner.l" +#line 1897 "Zend/zend_language_scanner.l" { yyless(yyleng - 1); yy_push_state(ST_VAR_OFFSET); - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 1998 "Zend/zend_language_scanner.c" +#line 1999 "Zend/zend_language_scanner.c" yy82: YYDEBUG(82, *YYCURSOR); yych = *++YYCURSOR; @@ -2012,12 +2013,11 @@ yy83: ++YYCURSOR; YYDEBUG(84, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1883 "Zend/zend_language_scanner.l" +#line 1889 "Zend/zend_language_scanner.l" { yyless(yyleng - 3); yy_push_state(ST_LOOKING_FOR_PROPERTY); - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } #line 2023 "Zend/zend_language_scanner.c" } @@ -2188,7 +2188,7 @@ yy87: ++YYCURSOR; YYDEBUG(88, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2448 "Zend/zend_language_scanner.l" +#line 2449 "Zend/zend_language_scanner.l" { if (YYCURSOR > YYLIMIT) { RETURN_TOKEN(END); @@ -2209,15 +2209,11 @@ yy89: } YYDEBUG(91, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1303 "Zend/zend_language_scanner.l" +#line 1315 "Zend/zend_language_scanner.l" { - HANDLE_NEWLINES(yytext, yyleng); - if (PARSER_MODE()) { - SKIP_TOKEN(T_WHITESPACE); - } - RETURN_TOKEN(T_WHITESPACE); + goto return_whitespace; } -#line 2221 "Zend/zend_language_scanner.c" +#line 2217 "Zend/zend_language_scanner.c" yy92: YYDEBUG(92, *YYCURSOR); ++YYCURSOR; @@ -2225,17 +2221,17 @@ yy92: yy93: YYDEBUG(93, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1591 "Zend/zend_language_scanner.l" +#line 1598 "Zend/zend_language_scanner.l" { RETURN_TOKEN(yytext[0]); } -#line 2233 "Zend/zend_language_scanner.c" +#line 2229 "Zend/zend_language_scanner.c" yy94: YYDEBUG(94, *YYCURSOR); ++YYCURSOR; YYDEBUG(95, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2080 "Zend/zend_language_scanner.l" +#line 2082 "Zend/zend_language_scanner.l" { int bprefix = (yytext[0] != '"') ? 1 : 0; @@ -2245,7 +2241,7 @@ yy94: yyleng = YYCURSOR - SCNG(yy_text); if (EXPECTED(zend_scan_escape_string(zendlval, yytext+bprefix+1, yyleng-bprefix-2, '"') == SUCCESS) || !PARSER_MODE()) { - RETURN_TOKEN(T_CONSTANT_ENCAPSED_STRING); + RETURN_TOKEN_WITH_VAL(T_CONSTANT_ENCAPSED_STRING); } else { RETURN_TOKEN(T_ERROR); } @@ -2280,13 +2276,13 @@ yy94: BEGIN(ST_DOUBLE_QUOTES); RETURN_TOKEN('"'); } -#line 2284 "Zend/zend_language_scanner.c" +#line 2280 "Zend/zend_language_scanner.c" yy96: YYDEBUG(96, *YYCURSOR); ++YYCURSOR; YYDEBUG(97, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1928 "Zend/zend_language_scanner.l" +#line 1930 "Zend/zend_language_scanner.l" { while (YYCURSOR < YYLIMIT) { switch (*YYCURSOR++) { @@ -2318,7 +2314,7 @@ yy96: } RETURN_TOKEN(T_COMMENT); } -#line 2322 "Zend/zend_language_scanner.c" +#line 2318 "Zend/zend_language_scanner.c" yy98: YYDEBUG(98, *YYCURSOR); yych = *++YYCURSOR; @@ -2349,7 +2345,7 @@ yy101: ++YYCURSOR; YYDEBUG(102, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2011 "Zend/zend_language_scanner.l" +#line 2013 "Zend/zend_language_scanner.l" { register char *s, *t; char *end; @@ -2372,7 +2368,7 @@ yy101: * for ' (unrecognized by parser), instead of old flex fallback to "Unexpected character..." * rule, which continued in ST_IN_SCRIPTING state after the quote */ ZVAL_NULL(zendlval); - RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); + RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } } @@ -2415,9 +2411,9 @@ yy101: SCNG(output_filter)((unsigned char **)&str, &sz, (unsigned char *)s, (size_t)Z_STRLEN_P(zendlval)); ZVAL_STRINGL(zendlval, str, sz); } - RETURN_TOKEN(T_CONSTANT_ENCAPSED_STRING); + RETURN_TOKEN_WITH_VAL(T_CONSTANT_ENCAPSED_STRING); } -#line 2421 "Zend/zend_language_scanner.c" +#line 2417 "Zend/zend_language_scanner.c" yy103: YYDEBUG(103, *YYCURSOR); yyaccept = 0; @@ -2547,7 +2543,7 @@ yy110: yy111: YYDEBUG(111, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1661 "Zend/zend_language_scanner.l" +#line 1667 "Zend/zend_language_scanner.l" { char *end; if (yyleng < MAX_LENGTH_OF_LONG - 1) { /* Won't overflow */ @@ -2562,7 +2558,7 @@ yy111: if (PARSER_MODE()) { RETURN_TOKEN(T_ERROR); } - RETURN_TOKEN(T_LNUMBER); + RETURN_TOKEN_WITH_VAL(T_LNUMBER); } } else { errno = 0; @@ -2583,7 +2579,7 @@ yy111: RETURN_TOKEN(T_ERROR); } } - RETURN_TOKEN(T_DNUMBER); + RETURN_TOKEN_WITH_VAL(T_DNUMBER); } /* Also not an assert for the same reason */ if (end != yytext + yyleng) { @@ -2592,13 +2588,13 @@ yy111: if (PARSER_MODE()) { RETURN_TOKEN(T_ERROR); } - RETURN_TOKEN(T_DNUMBER); + RETURN_TOKEN_WITH_VAL(T_DNUMBER); } } ZEND_ASSERT(!errno); - RETURN_TOKEN(T_LNUMBER); + RETURN_TOKEN_WITH_VAL(T_LNUMBER); } -#line 2602 "Zend/zend_language_scanner.c" +#line 2598 "Zend/zend_language_scanner.c" yy112: YYDEBUG(112, *YYCURSOR); yyaccept = 1; @@ -2679,12 +2675,11 @@ yy119: yy120: YYDEBUG(120, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1922 "Zend/zend_language_scanner.l" +#line 1925 "Zend/zend_language_scanner.l" { - zend_copy_value(zendlval, yytext, yyleng); - RETURN_TOKEN(T_STRING); + RETURN_TOKEN_WITH_STR(T_STRING, 0); } -#line 2688 "Zend/zend_language_scanner.c" +#line 2683 "Zend/zend_language_scanner.c" yy121: YYDEBUG(121, *YYCURSOR); yyaccept = 2; @@ -2969,11 +2964,11 @@ yy142: ++YYCURSOR; YYDEBUG(143, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1331 "Zend/zend_language_scanner.l" +#line 1338 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_NS_SEPARATOR); } -#line 2977 "Zend/zend_language_scanner.c" +#line 2972 "Zend/zend_language_scanner.c" yy144: YYDEBUG(144, *YYCURSOR); yych = *++YYCURSOR; @@ -2989,23 +2984,23 @@ yy146: ++YYCURSOR; YYDEBUG(147, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2174 "Zend/zend_language_scanner.l" +#line 2176 "Zend/zend_language_scanner.l" { BEGIN(ST_BACKQUOTE); RETURN_TOKEN('`'); } -#line 2998 "Zend/zend_language_scanner.c" +#line 2993 "Zend/zend_language_scanner.c" yy148: YYDEBUG(148, *YYCURSOR); ++YYCURSOR; YYDEBUG(149, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1596 "Zend/zend_language_scanner.l" +#line 1603 "Zend/zend_language_scanner.l" { yy_push_state(ST_IN_SCRIPTING); RETURN_TOKEN('{'); } -#line 3009 "Zend/zend_language_scanner.c" +#line 3004 "Zend/zend_language_scanner.c" yy150: YYDEBUG(150, *YYCURSOR); yych = *++YYCURSOR; @@ -3017,7 +3012,7 @@ yy151: ++YYCURSOR; YYDEBUG(152, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1608 "Zend/zend_language_scanner.l" +#line 1615 "Zend/zend_language_scanner.l" { RESET_DOC_COMMENT(); if (!zend_stack_is_empty(&SCNG(state_stack))) { @@ -3025,7 +3020,7 @@ yy151: } RETURN_TOKEN('}'); } -#line 3029 "Zend/zend_language_scanner.c" +#line 3024 "Zend/zend_language_scanner.c" yy153: YYDEBUG(153, *YYCURSOR); ++YYCURSOR; @@ -3033,11 +3028,11 @@ yy153: yy154: YYDEBUG(154, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1495 "Zend/zend_language_scanner.l" +#line 1502 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IS_NOT_EQUAL); } -#line 3041 "Zend/zend_language_scanner.c" +#line 3036 "Zend/zend_language_scanner.c" yy155: YYDEBUG(155, *YYCURSOR); ++YYCURSOR; @@ -3062,42 +3057,41 @@ yy155: yy157: YYDEBUG(157, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1899 "Zend/zend_language_scanner.l" +#line 1903 "Zend/zend_language_scanner.l" { - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 3071 "Zend/zend_language_scanner.c" +#line 3065 "Zend/zend_language_scanner.c" yy158: YYDEBUG(158, *YYCURSOR); ++YYCURSOR; YYDEBUG(159, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1539 "Zend/zend_language_scanner.l" +#line 1546 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_MOD_EQUAL); } -#line 3081 "Zend/zend_language_scanner.c" +#line 3075 "Zend/zend_language_scanner.c" yy160: YYDEBUG(160, *YYCURSOR); ++YYCURSOR; YYDEBUG(161, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1567 "Zend/zend_language_scanner.l" +#line 1574 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_BOOLEAN_AND); } -#line 3091 "Zend/zend_language_scanner.c" +#line 3085 "Zend/zend_language_scanner.c" yy162: YYDEBUG(162, *YYCURSOR); ++YYCURSOR; YYDEBUG(163, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1551 "Zend/zend_language_scanner.l" +#line 1558 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_AND_EQUAL); } -#line 3101 "Zend/zend_language_scanner.c" +#line 3095 "Zend/zend_language_scanner.c" yy164: YYDEBUG(164, *YYCURSOR); ++YYCURSOR; @@ -3227,72 +3221,72 @@ yy176: if ((yych = *YYCURSOR) == '=') goto yy289; YYDEBUG(177, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1523 "Zend/zend_language_scanner.l" +#line 1530 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_POW); } -#line 3235 "Zend/zend_language_scanner.c" +#line 3229 "Zend/zend_language_scanner.c" yy178: YYDEBUG(178, *YYCURSOR); ++YYCURSOR; YYDEBUG(179, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1519 "Zend/zend_language_scanner.l" +#line 1526 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_MUL_EQUAL); } -#line 3245 "Zend/zend_language_scanner.c" +#line 3239 "Zend/zend_language_scanner.c" yy180: YYDEBUG(180, *YYCURSOR); ++YYCURSOR; YYDEBUG(181, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1475 "Zend/zend_language_scanner.l" +#line 1482 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INC); } -#line 3255 "Zend/zend_language_scanner.c" +#line 3249 "Zend/zend_language_scanner.c" yy182: YYDEBUG(182, *YYCURSOR); ++YYCURSOR; YYDEBUG(183, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1511 "Zend/zend_language_scanner.l" +#line 1518 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_PLUS_EQUAL); } -#line 3265 "Zend/zend_language_scanner.c" +#line 3259 "Zend/zend_language_scanner.c" yy184: YYDEBUG(184, *YYCURSOR); ++YYCURSOR; YYDEBUG(185, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1479 "Zend/zend_language_scanner.l" +#line 1486 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DEC); } -#line 3275 "Zend/zend_language_scanner.c" +#line 3269 "Zend/zend_language_scanner.c" yy186: YYDEBUG(186, *YYCURSOR); ++YYCURSOR; YYDEBUG(187, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1515 "Zend/zend_language_scanner.l" +#line 1522 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_MINUS_EQUAL); } -#line 3285 "Zend/zend_language_scanner.c" +#line 3279 "Zend/zend_language_scanner.c" yy188: YYDEBUG(188, *YYCURSOR); ++YYCURSOR; YYDEBUG(189, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1298 "Zend/zend_language_scanner.l" +#line 1310 "Zend/zend_language_scanner.l" { yy_push_state(ST_LOOKING_FOR_PROPERTY); RETURN_TOKEN(T_OBJECT_OPERATOR); } -#line 3296 "Zend/zend_language_scanner.c" +#line 3290 "Zend/zend_language_scanner.c" yy190: YYDEBUG(190, *YYCURSOR); yych = *++YYCURSOR; @@ -3315,26 +3309,26 @@ yy191: yy193: YYDEBUG(193, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1761 "Zend/zend_language_scanner.l" +#line 1767 "Zend/zend_language_scanner.l" { const char *end; ZVAL_DOUBLE(zendlval, zend_strtod(yytext, &end)); /* errno isn't checked since we allow HUGE_VAL/INF overflow */ ZEND_ASSERT(end == yytext + yyleng); - RETURN_TOKEN(T_DNUMBER); + RETURN_TOKEN_WITH_VAL(T_DNUMBER); } -#line 3328 "Zend/zend_language_scanner.c" +#line 3322 "Zend/zend_language_scanner.c" yy194: YYDEBUG(194, *YYCURSOR); ++YYCURSOR; YYDEBUG(195, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1535 "Zend/zend_language_scanner.l" +#line 1542 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CONCAT_EQUAL); } -#line 3338 "Zend/zend_language_scanner.c" +#line 3332 "Zend/zend_language_scanner.c" yy196: YYDEBUG(196, *YYCURSOR); yyaccept = 4; @@ -3343,7 +3337,7 @@ yy196: yy197: YYDEBUG(197, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1960 "Zend/zend_language_scanner.l" +#line 1962 "Zend/zend_language_scanner.l" { int doc_com; @@ -3382,17 +3376,17 @@ yy197: } RETURN_TOKEN(T_COMMENT); } -#line 3386 "Zend/zend_language_scanner.c" +#line 3380 "Zend/zend_language_scanner.c" yy198: YYDEBUG(198, *YYCURSOR); ++YYCURSOR; YYDEBUG(199, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1531 "Zend/zend_language_scanner.l" +#line 1538 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DIV_EQUAL); } -#line 3396 "Zend/zend_language_scanner.c" +#line 3390 "Zend/zend_language_scanner.c" yy200: YYDEBUG(200, *YYCURSOR); yych = *++YYCURSOR; @@ -3424,11 +3418,11 @@ yy203: ++YYCURSOR; YYDEBUG(204, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1327 "Zend/zend_language_scanner.l" +#line 1334 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_PAAMAYIM_NEKUDOTAYIM); } -#line 3432 "Zend/zend_language_scanner.c" +#line 3426 "Zend/zend_language_scanner.c" yy205: YYDEBUG(205, *YYCURSOR); yyaccept = 5; @@ -3439,22 +3433,22 @@ yy205: yy206: YYDEBUG(206, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1583 "Zend/zend_language_scanner.l" +#line 1590 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_SL); } -#line 3447 "Zend/zend_language_scanner.c" +#line 3441 "Zend/zend_language_scanner.c" yy207: YYDEBUG(207, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) == '>') goto yy307; YYDEBUG(208, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1503 "Zend/zend_language_scanner.l" +#line 1510 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IS_SMALLER_OR_EQUAL); } -#line 3458 "Zend/zend_language_scanner.c" +#line 3452 "Zend/zend_language_scanner.c" yy209: YYDEBUG(209, *YYCURSOR); yych = *++YYCURSOR; @@ -3465,42 +3459,42 @@ yy210: if ((yych = *YYCURSOR) == '=') goto yy309; YYDEBUG(211, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1491 "Zend/zend_language_scanner.l" +#line 1498 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IS_EQUAL); } -#line 3473 "Zend/zend_language_scanner.c" +#line 3467 "Zend/zend_language_scanner.c" yy212: YYDEBUG(212, *YYCURSOR); ++YYCURSOR; YYDEBUG(213, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1459 "Zend/zend_language_scanner.l" +#line 1466 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DOUBLE_ARROW); } -#line 3483 "Zend/zend_language_scanner.c" +#line 3477 "Zend/zend_language_scanner.c" yy214: YYDEBUG(214, *YYCURSOR); ++YYCURSOR; YYDEBUG(215, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1507 "Zend/zend_language_scanner.l" +#line 1514 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IS_GREATER_OR_EQUAL); } -#line 3493 "Zend/zend_language_scanner.c" +#line 3487 "Zend/zend_language_scanner.c" yy216: YYDEBUG(216, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) == '=') goto yy311; YYDEBUG(217, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1587 "Zend/zend_language_scanner.l" +#line 1594 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_SR); } -#line 3504 "Zend/zend_language_scanner.c" +#line 3498 "Zend/zend_language_scanner.c" yy218: YYDEBUG(218, *YYCURSOR); ++YYCURSOR; @@ -3509,7 +3503,7 @@ yy218: yy219: YYDEBUG(219, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1999 "Zend/zend_language_scanner.l" +#line 2001 "Zend/zend_language_scanner.l" { BEGIN(INITIAL); if (yytext[yyleng-1] != '>') { @@ -3520,17 +3514,17 @@ yy219: } RETURN_TOKEN(T_CLOSE_TAG); } -#line 3524 "Zend/zend_language_scanner.c" +#line 3518 "Zend/zend_language_scanner.c" yy220: YYDEBUG(220, *YYCURSOR); ++YYCURSOR; YYDEBUG(221, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1339 "Zend/zend_language_scanner.l" +#line 1346 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_COALESCE); } -#line 3534 "Zend/zend_language_scanner.c" +#line 3528 "Zend/zend_language_scanner.c" yy222: YYDEBUG(222, *YYCURSOR); yych = *++YYCURSOR; @@ -3557,11 +3551,11 @@ yy225: } YYDEBUG(226, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1238 "Zend/zend_language_scanner.l" +#line 1250 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_AS); } -#line 3565 "Zend/zend_language_scanner.c" +#line 3559 "Zend/zend_language_scanner.c" yy227: YYDEBUG(227, *YYCURSOR); yych = *++YYCURSOR; @@ -3647,11 +3641,11 @@ yy234: } YYDEBUG(235, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1206 "Zend/zend_language_scanner.l" +#line 1218 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DO); } -#line 3655 "Zend/zend_language_scanner.c" +#line 3649 "Zend/zend_language_scanner.c" yy236: YYDEBUG(236, *YYCURSOR); yych = *++YYCURSOR; @@ -3736,11 +3730,11 @@ yy247: } YYDEBUG(248, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1182 "Zend/zend_language_scanner.l" +#line 1194 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IF); } -#line 3744 "Zend/zend_language_scanner.c" +#line 3738 "Zend/zend_language_scanner.c" yy249: YYDEBUG(249, *YYCURSOR); yych = *++YYCURSOR; @@ -3801,11 +3795,11 @@ yy255: } YYDEBUG(256, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1571 "Zend/zend_language_scanner.l" +#line 1578 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_LOGICAL_OR); } -#line 3809 "Zend/zend_language_scanner.c" +#line 3803 "Zend/zend_language_scanner.c" yy257: YYDEBUG(257, *YYCURSOR); yych = *++YYCURSOR; @@ -3919,11 +3913,11 @@ yy270: ++YYCURSOR; YYDEBUG(271, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1559 "Zend/zend_language_scanner.l" +#line 1566 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_XOR_EQUAL); } -#line 3927 "Zend/zend_language_scanner.c" +#line 3921 "Zend/zend_language_scanner.c" yy272: YYDEBUG(272, *YYCURSOR); yych = *++YYCURSOR; @@ -3951,31 +3945,31 @@ yy273: ++YYCURSOR; YYDEBUG(274, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1555 "Zend/zend_language_scanner.l" +#line 1562 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_OR_EQUAL); } -#line 3959 "Zend/zend_language_scanner.c" +#line 3953 "Zend/zend_language_scanner.c" yy275: YYDEBUG(275, *YYCURSOR); ++YYCURSOR; YYDEBUG(276, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1563 "Zend/zend_language_scanner.l" +#line 1570 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_BOOLEAN_OR); } -#line 3969 "Zend/zend_language_scanner.c" +#line 3963 "Zend/zend_language_scanner.c" yy277: YYDEBUG(277, *YYCURSOR); ++YYCURSOR; YYDEBUG(278, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1487 "Zend/zend_language_scanner.l" +#line 1494 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IS_NOT_IDENTICAL); } -#line 3979 "Zend/zend_language_scanner.c" +#line 3973 "Zend/zend_language_scanner.c" yy279: YYDEBUG(279, *YYCURSOR); yych = *++YYCURSOR; @@ -4041,21 +4035,21 @@ yy289: ++YYCURSOR; YYDEBUG(290, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1527 "Zend/zend_language_scanner.l" +#line 1534 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_POW_EQUAL); } -#line 4049 "Zend/zend_language_scanner.c" +#line 4043 "Zend/zend_language_scanner.c" yy291: YYDEBUG(291, *YYCURSOR); ++YYCURSOR; YYDEBUG(292, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1335 "Zend/zend_language_scanner.l" +#line 1342 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ELLIPSIS); } -#line 4059 "Zend/zend_language_scanner.c" +#line 4053 "Zend/zend_language_scanner.c" yy293: YYDEBUG(293, *YYCURSOR); yych = *++YYCURSOR; @@ -4079,7 +4073,7 @@ yy294: } YYDEBUG(296, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1633 "Zend/zend_language_scanner.l" +#line 1639 "Zend/zend_language_scanner.l" { char *bin = yytext + 2; /* Skip "0b" */ int len = yyleng - 2; @@ -4099,15 +4093,15 @@ yy294: ZVAL_LONG(zendlval, ZEND_STRTOL(bin, &end, 2)); ZEND_ASSERT(!errno && end == yytext + yyleng); } - RETURN_TOKEN(T_LNUMBER); + RETURN_TOKEN_WITH_VAL(T_LNUMBER); } else { ZVAL_DOUBLE(zendlval, zend_bin_strtod(bin, (const char **)&end)); /* errno isn't checked since we allow HUGE_VAL/INF overflow */ ZEND_ASSERT(end == yytext + yyleng); - RETURN_TOKEN(T_DNUMBER); + RETURN_TOKEN_WITH_VAL(T_DNUMBER); } } -#line 4111 "Zend/zend_language_scanner.c" +#line 4105 "Zend/zend_language_scanner.c" yy297: YYDEBUG(297, *YYCURSOR); yych = *++YYCURSOR; @@ -4133,7 +4127,7 @@ yy300: } YYDEBUG(302, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1712 "Zend/zend_language_scanner.l" +#line 1718 "Zend/zend_language_scanner.l" { char *hex = yytext + 2; /* Skip "0x" */ int len = yyleng - 2; @@ -4153,15 +4147,15 @@ yy300: ZVAL_LONG(zendlval, ZEND_STRTOL(hex, &end, 16)); ZEND_ASSERT(!errno && end == hex + len); } - RETURN_TOKEN(T_LNUMBER); + RETURN_TOKEN_WITH_VAL(T_LNUMBER); } else { ZVAL_DOUBLE(zendlval, zend_hex_strtod(hex, (const char **)&end)); /* errno isn't checked since we allow HUGE_VAL/INF overflow */ ZEND_ASSERT(end == hex + len); - RETURN_TOKEN(T_DNUMBER); + RETURN_TOKEN_WITH_VAL(T_DNUMBER); } } -#line 4165 "Zend/zend_language_scanner.c" +#line 4159 "Zend/zend_language_scanner.c" yy303: YYDEBUG(303, *YYCURSOR); ++YYCURSOR; @@ -4196,41 +4190,41 @@ yy305: ++YYCURSOR; YYDEBUG(306, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1543 "Zend/zend_language_scanner.l" +#line 1550 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_SL_EQUAL); } -#line 4204 "Zend/zend_language_scanner.c" +#line 4198 "Zend/zend_language_scanner.c" yy307: YYDEBUG(307, *YYCURSOR); ++YYCURSOR; YYDEBUG(308, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1499 "Zend/zend_language_scanner.l" +#line 1506 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_SPACESHIP); } -#line 4214 "Zend/zend_language_scanner.c" +#line 4208 "Zend/zend_language_scanner.c" yy309: YYDEBUG(309, *YYCURSOR); ++YYCURSOR; YYDEBUG(310, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1483 "Zend/zend_language_scanner.l" +#line 1490 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IS_IDENTICAL); } -#line 4224 "Zend/zend_language_scanner.c" +#line 4218 "Zend/zend_language_scanner.c" yy311: YYDEBUG(311, *YYCURSOR); ++YYCURSOR; YYDEBUG(312, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1547 "Zend/zend_language_scanner.l" +#line 1554 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_SR_EQUAL); } -#line 4234 "Zend/zend_language_scanner.c" +#line 4228 "Zend/zend_language_scanner.c" yy313: YYDEBUG(313, *YYCURSOR); yych = *++YYCURSOR; @@ -4254,11 +4248,11 @@ yy316: } YYDEBUG(317, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1575 "Zend/zend_language_scanner.l" +#line 1582 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_LOGICAL_AND); } -#line 4262 "Zend/zend_language_scanner.c" +#line 4256 "Zend/zend_language_scanner.c" yy318: YYDEBUG(318, *YYCURSOR); yych = *++YYCURSOR; @@ -4339,11 +4333,11 @@ yy329: } YYDEBUG(330, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1140 "Zend/zend_language_scanner.l" +#line 1152 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_EXIT); } -#line 4347 "Zend/zend_language_scanner.c" +#line 4341 "Zend/zend_language_scanner.c" yy331: YYDEBUG(331, *YYCURSOR); yych = *++YYCURSOR; @@ -4425,11 +4419,11 @@ yy339: yy340: YYDEBUG(340, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1210 "Zend/zend_language_scanner.l" +#line 1222 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FOR); } -#line 4433 "Zend/zend_language_scanner.c" +#line 4427 "Zend/zend_language_scanner.c" yy341: YYDEBUG(341, *YYCURSOR); yych = *++YYCURSOR; @@ -4498,11 +4492,11 @@ yy351: } YYDEBUG(352, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1343 "Zend/zend_language_scanner.l" +#line 1350 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_NEW); } -#line 4506 "Zend/zend_language_scanner.c" +#line 4500 "Zend/zend_language_scanner.c" yy353: YYDEBUG(353, *YYCURSOR); yych = *++YYCURSOR; @@ -4575,11 +4569,11 @@ yy362: } YYDEBUG(363, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1166 "Zend/zend_language_scanner.l" +#line 1178 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_TRY); } -#line 4583 "Zend/zend_language_scanner.c" +#line 4577 "Zend/zend_language_scanner.c" yy364: YYDEBUG(364, *YYCURSOR); yych = *++YYCURSOR; @@ -4594,11 +4588,11 @@ yy365: } YYDEBUG(366, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1407 "Zend/zend_language_scanner.l" +#line 1414 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_USE); } -#line 4602 "Zend/zend_language_scanner.c" +#line 4596 "Zend/zend_language_scanner.c" yy367: YYDEBUG(367, *YYCURSOR); ++YYCURSOR; @@ -4607,11 +4601,11 @@ yy367: } YYDEBUG(368, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1351 "Zend/zend_language_scanner.l" +#line 1358 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_VAR); } -#line 4615 "Zend/zend_language_scanner.c" +#line 4609 "Zend/zend_language_scanner.c" yy369: YYDEBUG(369, *YYCURSOR); yych = *++YYCURSOR; @@ -4626,11 +4620,11 @@ yy370: } YYDEBUG(371, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1579 "Zend/zend_language_scanner.l" +#line 1586 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_LOGICAL_XOR); } -#line 4634 "Zend/zend_language_scanner.c" +#line 4628 "Zend/zend_language_scanner.c" yy372: YYDEBUG(372, *YYCURSOR); yych = *++YYCURSOR; @@ -4844,11 +4838,11 @@ yy401: } YYDEBUG(402, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1250 "Zend/zend_language_scanner.l" +#line 1262 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CASE); } -#line 4852 "Zend/zend_language_scanner.c" +#line 4846 "Zend/zend_language_scanner.c" yy403: YYDEBUG(403, *YYCURSOR); yych = *++YYCURSOR; @@ -4899,11 +4893,11 @@ yy410: } YYDEBUG(411, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1270 "Zend/zend_language_scanner.l" +#line 1282 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ECHO); } -#line 4907 "Zend/zend_language_scanner.c" +#line 4901 "Zend/zend_language_scanner.c" yy412: YYDEBUG(412, *YYCURSOR); ++YYCURSOR; @@ -4927,11 +4921,11 @@ yy412: yy413: YYDEBUG(413, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1194 "Zend/zend_language_scanner.l" +#line 1206 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ELSE); } -#line 4935 "Zend/zend_language_scanner.c" +#line 4929 "Zend/zend_language_scanner.c" yy414: YYDEBUG(414, *YYCURSOR); yych = *++YYCURSOR; @@ -4976,11 +4970,11 @@ yy420: } YYDEBUG(421, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1383 "Zend/zend_language_scanner.l" +#line 1390 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_EVAL); } -#line 4984 "Zend/zend_language_scanner.c" +#line 4978 "Zend/zend_language_scanner.c" yy422: YYDEBUG(422, *YYCURSOR); ++YYCURSOR; @@ -4989,11 +4983,11 @@ yy422: } YYDEBUG(423, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1136 "Zend/zend_language_scanner.l" +#line 1148 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_EXIT); } -#line 4997 "Zend/zend_language_scanner.c" +#line 4991 "Zend/zend_language_scanner.c" yy424: YYDEBUG(424, *YYCURSOR); yych = *++YYCURSOR; @@ -5032,11 +5026,11 @@ yy429: } YYDEBUG(430, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1266 "Zend/zend_language_scanner.l" +#line 1278 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_GOTO); } -#line 5040 "Zend/zend_language_scanner.c" +#line 5034 "Zend/zend_language_scanner.c" yy431: YYDEBUG(431, *YYCURSOR); yych = *++YYCURSOR; @@ -5085,11 +5079,11 @@ yy436: } YYDEBUG(437, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1463 "Zend/zend_language_scanner.l" +#line 1470 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_LIST); } -#line 5093 "Zend/zend_language_scanner.c" +#line 5087 "Zend/zend_language_scanner.c" yy438: YYDEBUG(438, *YYCURSOR); yych = *++YYCURSOR; @@ -5276,11 +5270,11 @@ yy467: ++YYCURSOR; YYDEBUG(469, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1355 "Zend/zend_language_scanner.l" +#line 1362 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INT_CAST); } -#line 5284 "Zend/zend_language_scanner.c" +#line 5278 "Zend/zend_language_scanner.c" yy470: YYDEBUG(470, *YYCURSOR); yych = *++YYCURSOR; @@ -5377,7 +5371,7 @@ yy480: yy481: YYDEBUG(481, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2126 "Zend/zend_language_scanner.l" +#line 2128 "Zend/zend_language_scanner.l" { char *s; int bprefix = (yytext[0] != '<') ? 1 : 0; @@ -5424,7 +5418,7 @@ yy481: RETURN_TOKEN(T_START_HEREDOC); } -#line 5428 "Zend/zend_language_scanner.c" +#line 5422 "Zend/zend_language_scanner.c" yy482: YYDEBUG(482, *YYCURSOR); yych = *++YYCURSOR; @@ -5444,11 +5438,11 @@ yy484: } YYDEBUG(485, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1467 "Zend/zend_language_scanner.l" +#line 1474 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ARRAY); } -#line 5452 "Zend/zend_language_scanner.c" +#line 5446 "Zend/zend_language_scanner.c" yy486: YYDEBUG(486, *YYCURSOR); ++YYCURSOR; @@ -5457,11 +5451,11 @@ yy486: } YYDEBUG(487, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1258 "Zend/zend_language_scanner.l" +#line 1270 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_BREAK); } -#line 5465 "Zend/zend_language_scanner.c" +#line 5459 "Zend/zend_language_scanner.c" yy488: YYDEBUG(488, *YYCURSOR); yych = *++YYCURSOR; @@ -5476,11 +5470,11 @@ yy489: } YYDEBUG(490, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1170 "Zend/zend_language_scanner.l" +#line 1182 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CATCH); } -#line 5484 "Zend/zend_language_scanner.c" +#line 5478 "Zend/zend_language_scanner.c" yy491: YYDEBUG(491, *YYCURSOR); ++YYCURSOR; @@ -5489,11 +5483,11 @@ yy491: } YYDEBUG(492, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1278 "Zend/zend_language_scanner.l" +#line 1290 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CLASS); } -#line 5497 "Zend/zend_language_scanner.c" +#line 5491 "Zend/zend_language_scanner.c" yy493: YYDEBUG(493, *YYCURSOR); ++YYCURSOR; @@ -5502,11 +5496,11 @@ yy493: } YYDEBUG(494, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1347 "Zend/zend_language_scanner.l" +#line 1354 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CLONE); } -#line 5510 "Zend/zend_language_scanner.c" +#line 5504 "Zend/zend_language_scanner.c" yy495: YYDEBUG(495, *YYCURSOR); ++YYCURSOR; @@ -5515,11 +5509,11 @@ yy495: } YYDEBUG(496, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1148 "Zend/zend_language_scanner.l" +#line 1160 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CONST); } -#line 5523 "Zend/zend_language_scanner.c" +#line 5517 "Zend/zend_language_scanner.c" yy497: YYDEBUG(497, *YYCURSOR); yych = *++YYCURSOR; @@ -5552,11 +5546,11 @@ yy501: } YYDEBUG(502, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1423 "Zend/zend_language_scanner.l" +#line 1430 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_EMPTY); } -#line 5560 "Zend/zend_language_scanner.c" +#line 5554 "Zend/zend_language_scanner.c" yy503: YYDEBUG(503, *YYCURSOR); yych = *++YYCURSOR; @@ -5577,11 +5571,11 @@ yy505: } YYDEBUG(506, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1190 "Zend/zend_language_scanner.l" +#line 1202 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ENDIF); } -#line 5585 "Zend/zend_language_scanner.c" +#line 5579 "Zend/zend_language_scanner.c" yy507: YYDEBUG(507, *YYCURSOR); yych = *++YYCURSOR; @@ -5623,11 +5617,11 @@ yy510: yy511: YYDEBUG(511, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1439 "Zend/zend_language_scanner.l" +#line 1446 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FINAL); } -#line 5631 "Zend/zend_language_scanner.c" +#line 5625 "Zend/zend_language_scanner.c" yy512: YYDEBUG(512, *YYCURSOR); yych = *++YYCURSOR; @@ -5684,11 +5678,11 @@ yy520: } YYDEBUG(521, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1419 "Zend/zend_language_scanner.l" +#line 1426 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ISSET); } -#line 5692 "Zend/zend_language_scanner.c" +#line 5686 "Zend/zend_language_scanner.c" yy522: YYDEBUG(522, *YYCURSOR); yych = *++YYCURSOR; @@ -5703,11 +5697,11 @@ yy523: } YYDEBUG(524, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1274 "Zend/zend_language_scanner.l" +#line 1286 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_PRINT); } -#line 5711 "Zend/zend_language_scanner.c" +#line 5705 "Zend/zend_language_scanner.c" yy525: YYDEBUG(525, *YYCURSOR); yych = *++YYCURSOR; @@ -5758,11 +5752,11 @@ yy532: } YYDEBUG(533, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1178 "Zend/zend_language_scanner.l" +#line 1190 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_THROW); } -#line 5766 "Zend/zend_language_scanner.c" +#line 5760 "Zend/zend_language_scanner.c" yy534: YYDEBUG(534, *YYCURSOR); ++YYCURSOR; @@ -5771,11 +5765,11 @@ yy534: } YYDEBUG(535, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1286 "Zend/zend_language_scanner.l" +#line 1298 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_TRAIT); } -#line 5779 "Zend/zend_language_scanner.c" +#line 5773 "Zend/zend_language_scanner.c" yy536: YYDEBUG(536, *YYCURSOR); ++YYCURSOR; @@ -5784,11 +5778,11 @@ yy536: } YYDEBUG(537, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1455 "Zend/zend_language_scanner.l" +#line 1462 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_UNSET); } -#line 5792 "Zend/zend_language_scanner.c" +#line 5786 "Zend/zend_language_scanner.c" yy538: YYDEBUG(538, *YYCURSOR); ++YYCURSOR; @@ -5797,11 +5791,11 @@ yy538: } YYDEBUG(539, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1198 "Zend/zend_language_scanner.l" +#line 1210 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_WHILE); } -#line 5805 "Zend/zend_language_scanner.c" +#line 5799 "Zend/zend_language_scanner.c" yy540: YYDEBUG(540, *YYCURSOR); yyaccept = 6; @@ -5819,11 +5813,11 @@ yy540: yy541: YYDEBUG(541, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1162 "Zend/zend_language_scanner.l" +#line 1174 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_YIELD); } -#line 5827 "Zend/zend_language_scanner.c" +#line 5821 "Zend/zend_language_scanner.c" yy542: YYDEBUG(542, *YYCURSOR); yych = *++YYCURSOR; @@ -5915,11 +5909,11 @@ yy555: ++YYCURSOR; YYDEBUG(557, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1375 "Zend/zend_language_scanner.l" +#line 1382 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_BOOL_CAST); } -#line 5923 "Zend/zend_language_scanner.c" +#line 5917 "Zend/zend_language_scanner.c" yy558: YYDEBUG(558, *YYCURSOR); yych = *++YYCURSOR; @@ -5949,11 +5943,11 @@ yy562: ++YYCURSOR; YYDEBUG(563, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1359 "Zend/zend_language_scanner.l" +#line 1366 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DOUBLE_CAST); } -#line 5957 "Zend/zend_language_scanner.c" +#line 5951 "Zend/zend_language_scanner.c" yy564: YYDEBUG(564, *YYCURSOR); yych = *++YYCURSOR; @@ -6018,11 +6012,11 @@ yy573: } YYDEBUG(574, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1186 "Zend/zend_language_scanner.l" +#line 1198 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ELSEIF); } -#line 6026 "Zend/zend_language_scanner.c" +#line 6020 "Zend/zend_language_scanner.c" yy575: YYDEBUG(575, *YYCURSOR); yych = *++YYCURSOR; @@ -6052,11 +6046,11 @@ yy576: yy577: YYDEBUG(577, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1214 "Zend/zend_language_scanner.l" +#line 1226 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ENDFOR); } -#line 6060 "Zend/zend_language_scanner.c" +#line 6054 "Zend/zend_language_scanner.c" yy578: YYDEBUG(578, *YYCURSOR); yych = *++YYCURSOR; @@ -6101,11 +6095,11 @@ yy584: } YYDEBUG(585, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1415 "Zend/zend_language_scanner.l" +#line 1422 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_GLOBAL); } -#line 6109 "Zend/zend_language_scanner.c" +#line 6103 "Zend/zend_language_scanner.c" yy586: YYDEBUG(586, *YYCURSOR); yych = *++YYCURSOR; @@ -6162,11 +6156,11 @@ yy594: } YYDEBUG(595, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1451 "Zend/zend_language_scanner.l" +#line 1458 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_PUBLIC); } -#line 6170 "Zend/zend_language_scanner.c" +#line 6164 "Zend/zend_language_scanner.c" yy596: YYDEBUG(596, *YYCURSOR); yych = *++YYCURSOR; @@ -6181,11 +6175,11 @@ yy597: } YYDEBUG(598, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1152 "Zend/zend_language_scanner.l" +#line 1164 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_RETURN); } -#line 6189 "Zend/zend_language_scanner.c" +#line 6183 "Zend/zend_language_scanner.c" yy599: YYDEBUG(599, *YYCURSOR); ++YYCURSOR; @@ -6194,11 +6188,11 @@ yy599: } YYDEBUG(600, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1431 "Zend/zend_language_scanner.l" +#line 1438 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_STATIC); } -#line 6202 "Zend/zend_language_scanner.c" +#line 6196 "Zend/zend_language_scanner.c" yy601: YYDEBUG(601, *YYCURSOR); ++YYCURSOR; @@ -6207,11 +6201,11 @@ yy601: } YYDEBUG(602, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1242 "Zend/zend_language_scanner.l" +#line 1254 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_SWITCH); } -#line 6215 "Zend/zend_language_scanner.c" +#line 6209 "Zend/zend_language_scanner.c" yy603: YYDEBUG(603, *YYCURSOR); ++YYCURSOR; @@ -6291,11 +6285,11 @@ yy614: ++YYCURSOR; YYDEBUG(615, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1367 "Zend/zend_language_scanner.l" +#line 1374 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ARRAY_CAST); } -#line 6299 "Zend/zend_language_scanner.c" +#line 6293 "Zend/zend_language_scanner.c" yy616: YYDEBUG(616, *YYCURSOR); ++YYCURSOR; @@ -6341,11 +6335,11 @@ yy622: ++YYCURSOR; YYDEBUG(623, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1379 "Zend/zend_language_scanner.l" +#line 1386 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_UNSET_CAST); } -#line 6349 "Zend/zend_language_scanner.c" +#line 6343 "Zend/zend_language_scanner.c" yy624: YYDEBUG(624, *YYCURSOR); yych = *++YYCURSOR; @@ -6372,11 +6366,11 @@ yy627: } YYDEBUG(628, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1226 "Zend/zend_language_scanner.l" +#line 1238 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DECLARE); } -#line 6380 "Zend/zend_language_scanner.c" +#line 6374 "Zend/zend_language_scanner.c" yy629: YYDEBUG(629, *YYCURSOR); ++YYCURSOR; @@ -6385,11 +6379,11 @@ yy629: } YYDEBUG(630, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1254 "Zend/zend_language_scanner.l" +#line 1266 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DEFAULT); } -#line 6393 "Zend/zend_language_scanner.c" +#line 6387 "Zend/zend_language_scanner.c" yy631: YYDEBUG(631, *YYCURSOR); yych = *++YYCURSOR; @@ -6422,11 +6416,11 @@ yy635: } YYDEBUG(636, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1290 "Zend/zend_language_scanner.l" +#line 1302 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_EXTENDS); } -#line 6430 "Zend/zend_language_scanner.c" +#line 6424 "Zend/zend_language_scanner.c" yy637: YYDEBUG(637, *YYCURSOR); ++YYCURSOR; @@ -6435,11 +6429,11 @@ yy637: } YYDEBUG(638, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1174 "Zend/zend_language_scanner.l" +#line 1186 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FINALLY); } -#line 6443 "Zend/zend_language_scanner.c" +#line 6437 "Zend/zend_language_scanner.c" yy639: YYDEBUG(639, *YYCURSOR); ++YYCURSOR; @@ -6448,11 +6442,11 @@ yy639: } YYDEBUG(640, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1218 "Zend/zend_language_scanner.l" +#line 1230 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FOREACH); } -#line 6456 "Zend/zend_language_scanner.c" +#line 6450 "Zend/zend_language_scanner.c" yy641: YYDEBUG(641, *YYCURSOR); yych = *++YYCURSOR; @@ -6486,11 +6480,11 @@ yy643: yy644: YYDEBUG(644, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1387 "Zend/zend_language_scanner.l" +#line 1394 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INCLUDE); } -#line 6494 "Zend/zend_language_scanner.c" +#line 6488 "Zend/zend_language_scanner.c" yy645: YYDEBUG(645, *YYCURSOR); yych = *++YYCURSOR; @@ -6523,11 +6517,11 @@ yy649: } YYDEBUG(650, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1443 "Zend/zend_language_scanner.l" +#line 1450 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_PRIVATE); } -#line 6531 "Zend/zend_language_scanner.c" +#line 6525 "Zend/zend_language_scanner.c" yy651: YYDEBUG(651, *YYCURSOR); yych = *++YYCURSOR; @@ -6555,11 +6549,11 @@ yy652: yy653: YYDEBUG(653, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1395 "Zend/zend_language_scanner.l" +#line 1402 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_REQUIRE); } -#line 6563 "Zend/zend_language_scanner.c" +#line 6557 "Zend/zend_language_scanner.c" yy654: YYDEBUG(654, *YYCURSOR); yych = *++YYCURSOR; @@ -6579,11 +6573,11 @@ yy656: } YYDEBUG(657, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1794 "Zend/zend_language_scanner.l" +#line 1800 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_DIR); } -#line 6587 "Zend/zend_language_scanner.c" +#line 6581 "Zend/zend_language_scanner.c" yy658: YYDEBUG(658, *YYCURSOR); yych = *++YYCURSOR; @@ -6628,21 +6622,21 @@ yy665: ++YYCURSOR; YYDEBUG(666, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1363 "Zend/zend_language_scanner.l" +#line 1370 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_STRING_CAST); } -#line 6636 "Zend/zend_language_scanner.c" +#line 6630 "Zend/zend_language_scanner.c" yy667: YYDEBUG(667, *YYCURSOR); ++YYCURSOR; YYDEBUG(668, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1371 "Zend/zend_language_scanner.l" +#line 1378 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_OBJECT_CAST); } -#line 6646 "Zend/zend_language_scanner.c" +#line 6640 "Zend/zend_language_scanner.c" yy669: YYDEBUG(669, *YYCURSOR); ++YYCURSOR; @@ -6651,11 +6645,11 @@ yy669: } YYDEBUG(670, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1435 "Zend/zend_language_scanner.l" +#line 1442 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ABSTRACT); } -#line 6659 "Zend/zend_language_scanner.c" +#line 6653 "Zend/zend_language_scanner.c" yy671: YYDEBUG(671, *YYCURSOR); ++YYCURSOR; @@ -6664,11 +6658,11 @@ yy671: } YYDEBUG(672, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1471 "Zend/zend_language_scanner.l" +#line 1478 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CALLABLE); } -#line 6672 "Zend/zend_language_scanner.c" +#line 6666 "Zend/zend_language_scanner.c" yy673: YYDEBUG(673, *YYCURSOR); ++YYCURSOR; @@ -6677,11 +6671,11 @@ yy673: } YYDEBUG(674, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1262 "Zend/zend_language_scanner.l" +#line 1274 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CONTINUE); } -#line 6685 "Zend/zend_language_scanner.c" +#line 6679 "Zend/zend_language_scanner.c" yy675: YYDEBUG(675, *YYCURSOR); yych = *++YYCURSOR; @@ -6708,11 +6702,11 @@ yy678: } YYDEBUG(679, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1202 "Zend/zend_language_scanner.l" +#line 1214 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ENDWHILE); } -#line 6716 "Zend/zend_language_scanner.c" +#line 6710 "Zend/zend_language_scanner.c" yy680: YYDEBUG(680, *YYCURSOR); ++YYCURSOR; @@ -6721,11 +6715,11 @@ yy680: } YYDEBUG(681, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1144 "Zend/zend_language_scanner.l" +#line 1156 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FUNCTION); } -#line 6729 "Zend/zend_language_scanner.c" +#line 6723 "Zend/zend_language_scanner.c" yy682: YYDEBUG(682, *YYCURSOR); yych = *++YYCURSOR; @@ -6793,11 +6787,11 @@ yy692: } YYDEBUG(693, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1790 "Zend/zend_language_scanner.l" +#line 1796 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FILE); } -#line 6801 "Zend/zend_language_scanner.c" +#line 6795 "Zend/zend_language_scanner.c" yy694: YYDEBUG(694, *YYCURSOR); yych = *++YYCURSOR; @@ -6818,11 +6812,11 @@ yy696: } YYDEBUG(697, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1786 "Zend/zend_language_scanner.l" +#line 1792 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_LINE); } -#line 6826 "Zend/zend_language_scanner.c" +#line 6820 "Zend/zend_language_scanner.c" yy698: YYDEBUG(698, *YYCURSOR); yych = *++YYCURSOR; @@ -6859,11 +6853,11 @@ yy703: } YYDEBUG(704, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1246 "Zend/zend_language_scanner.l" +#line 1258 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ENDSWITCH); } -#line 6867 "Zend/zend_language_scanner.c" +#line 6861 "Zend/zend_language_scanner.c" yy705: YYDEBUG(705, *YYCURSOR); yych = *++YYCURSOR; @@ -6890,11 +6884,11 @@ yy708: } YYDEBUG(709, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1411 "Zend/zend_language_scanner.l" +#line 1418 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INSTEADOF); } -#line 6898 "Zend/zend_language_scanner.c" +#line 6892 "Zend/zend_language_scanner.c" yy710: YYDEBUG(710, *YYCURSOR); ++YYCURSOR; @@ -6903,11 +6897,11 @@ yy710: } YYDEBUG(711, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1282 "Zend/zend_language_scanner.l" +#line 1294 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INTERFACE); } -#line 6911 "Zend/zend_language_scanner.c" +#line 6905 "Zend/zend_language_scanner.c" yy712: YYDEBUG(712, *YYCURSOR); ++YYCURSOR; @@ -6916,11 +6910,11 @@ yy712: } YYDEBUG(713, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1403 "Zend/zend_language_scanner.l" +#line 1410 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_NAMESPACE); } -#line 6924 "Zend/zend_language_scanner.c" +#line 6918 "Zend/zend_language_scanner.c" yy714: YYDEBUG(714, *YYCURSOR); ++YYCURSOR; @@ -6929,11 +6923,11 @@ yy714: } YYDEBUG(715, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1447 "Zend/zend_language_scanner.l" +#line 1454 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_PROTECTED); } -#line 6937 "Zend/zend_language_scanner.c" +#line 6931 "Zend/zend_language_scanner.c" yy716: YYDEBUG(716, *YYCURSOR); yych = *++YYCURSOR; @@ -6954,11 +6948,11 @@ yy718: } YYDEBUG(719, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1770 "Zend/zend_language_scanner.l" +#line 1776 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_CLASS_C); } -#line 6962 "Zend/zend_language_scanner.c" +#line 6956 "Zend/zend_language_scanner.c" yy720: YYDEBUG(720, *YYCURSOR); yych = *++YYCURSOR; @@ -6990,11 +6984,11 @@ yy724: } YYDEBUG(725, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1774 "Zend/zend_language_scanner.l" +#line 1780 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_TRAIT_C); } -#line 6998 "Zend/zend_language_scanner.c" +#line 6992 "Zend/zend_language_scanner.c" yy726: YYDEBUG(726, *YYCURSOR); ++YYCURSOR; @@ -7003,11 +6997,11 @@ yy726: } YYDEBUG(727, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1230 "Zend/zend_language_scanner.l" +#line 1242 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ENDDECLARE); } -#line 7011 "Zend/zend_language_scanner.c" +#line 7005 "Zend/zend_language_scanner.c" yy728: YYDEBUG(728, *YYCURSOR); ++YYCURSOR; @@ -7016,11 +7010,11 @@ yy728: } YYDEBUG(729, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1222 "Zend/zend_language_scanner.l" +#line 1234 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_ENDFOREACH); } -#line 7024 "Zend/zend_language_scanner.c" +#line 7018 "Zend/zend_language_scanner.c" yy730: YYDEBUG(730, *YYCURSOR); ++YYCURSOR; @@ -7029,11 +7023,11 @@ yy730: } YYDEBUG(731, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1294 "Zend/zend_language_scanner.l" +#line 1306 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_IMPLEMENTS); } -#line 7037 "Zend/zend_language_scanner.c" +#line 7031 "Zend/zend_language_scanner.c" yy732: YYDEBUG(732, *YYCURSOR); yych = *++YYCURSOR; @@ -7048,11 +7042,11 @@ yy733: } YYDEBUG(734, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1234 "Zend/zend_language_scanner.l" +#line 1246 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INSTANCEOF); } -#line 7056 "Zend/zend_language_scanner.c" +#line 7050 "Zend/zend_language_scanner.c" yy735: YYDEBUG(735, *YYCURSOR); yych = *++YYCURSOR; @@ -7100,11 +7094,11 @@ yy739: } YYDEBUG(740, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1782 "Zend/zend_language_scanner.l" +#line 1788 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_METHOD_C); } -#line 7108 "Zend/zend_language_scanner.c" +#line 7102 "Zend/zend_language_scanner.c" yy741: YYDEBUG(741, *YYCURSOR); yych = *++YYCURSOR; @@ -7128,13 +7122,13 @@ yy744: ++YYCURSOR; YYDEBUG(745, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1156 "Zend/zend_language_scanner.l" +#line 1168 "Zend/zend_language_scanner.l" { yyless(yyleng - 1); HANDLE_NEWLINES(yytext, yyleng); RETURN_TOKEN(T_YIELD_FROM); } -#line 7138 "Zend/zend_language_scanner.c" +#line 7132 "Zend/zend_language_scanner.c" yy746: YYDEBUG(746, *YYCURSOR); yych = *++YYCURSOR; @@ -7159,11 +7153,11 @@ yy749: } YYDEBUG(750, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1391 "Zend/zend_language_scanner.l" +#line 1398 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_INCLUDE_ONCE); } -#line 7167 "Zend/zend_language_scanner.c" +#line 7161 "Zend/zend_language_scanner.c" yy751: YYDEBUG(751, *YYCURSOR); ++YYCURSOR; @@ -7172,11 +7166,11 @@ yy751: } YYDEBUG(752, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1399 "Zend/zend_language_scanner.l" +#line 1406 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_REQUIRE_ONCE); } -#line 7180 "Zend/zend_language_scanner.c" +#line 7174 "Zend/zend_language_scanner.c" yy753: YYDEBUG(753, *YYCURSOR); ++YYCURSOR; @@ -7185,11 +7179,11 @@ yy753: } YYDEBUG(754, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1778 "Zend/zend_language_scanner.l" +#line 1784 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_FUNC_C); } -#line 7193 "Zend/zend_language_scanner.c" +#line 7187 "Zend/zend_language_scanner.c" yy755: YYDEBUG(755, *YYCURSOR); yych = *++YYCURSOR; @@ -7215,11 +7209,11 @@ yy758: } YYDEBUG(759, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1798 "Zend/zend_language_scanner.l" +#line 1804 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_NS_C); } -#line 7223 "Zend/zend_language_scanner.c" +#line 7217 "Zend/zend_language_scanner.c" yy760: YYDEBUG(760, *YYCURSOR); yych = *++YYCURSOR; @@ -7233,11 +7227,11 @@ yy761: } YYDEBUG(762, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1427 "Zend/zend_language_scanner.l" +#line 1434 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_HALT_COMPILER); } -#line 7241 "Zend/zend_language_scanner.c" +#line 7235 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_LOOKING_FOR_PROPERTY: @@ -7303,13 +7297,13 @@ yy765: yy766: YYDEBUG(766, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1321 "Zend/zend_language_scanner.l" +#line 1328 "Zend/zend_language_scanner.l" { yyless(0); yy_pop_state(); goto restart; } -#line 7313 "Zend/zend_language_scanner.c" +#line 7307 "Zend/zend_language_scanner.c" yy767: YYDEBUG(767, *YYCURSOR); ++YYCURSOR; @@ -7321,15 +7315,11 @@ yy767: } YYDEBUG(769, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1303 "Zend/zend_language_scanner.l" +#line 1315 "Zend/zend_language_scanner.l" { - HANDLE_NEWLINES(yytext, yyleng); - if (PARSER_MODE()) { - SKIP_TOKEN(T_WHITESPACE); - } - RETURN_TOKEN(T_WHITESPACE); + goto return_whitespace; } -#line 7333 "Zend/zend_language_scanner.c" +#line 7323 "Zend/zend_language_scanner.c" yy770: YYDEBUG(770, *YYCURSOR); yych = *++YYCURSOR; @@ -7346,23 +7336,22 @@ yy771: } YYDEBUG(773, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1315 "Zend/zend_language_scanner.l" +#line 1323 "Zend/zend_language_scanner.l" { yy_pop_state(); - zend_copy_value(zendlval, yytext, yyleng); - RETURN_TOKEN(T_STRING); + RETURN_TOKEN_WITH_STR(T_STRING, 0); } -#line 7356 "Zend/zend_language_scanner.c" +#line 7345 "Zend/zend_language_scanner.c" yy774: YYDEBUG(774, *YYCURSOR); ++YYCURSOR; YYDEBUG(775, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1311 "Zend/zend_language_scanner.l" +#line 1319 "Zend/zend_language_scanner.l" { RETURN_TOKEN(T_OBJECT_OPERATOR); } -#line 7366 "Zend/zend_language_scanner.c" +#line 7355 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_LOOKING_FOR_VARNAME: @@ -7419,14 +7408,14 @@ yy778: yy779: YYDEBUG(779, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1626 "Zend/zend_language_scanner.l" +#line 1632 "Zend/zend_language_scanner.l" { yyless(0); yy_pop_state(); yy_push_state(ST_IN_SCRIPTING); goto restart; } -#line 7430 "Zend/zend_language_scanner.c" +#line 7419 "Zend/zend_language_scanner.c" yy780: YYDEBUG(780, *YYCURSOR); yych = *(YYMARKER = ++YYCURSOR); @@ -7473,15 +7462,14 @@ yy784: ++YYCURSOR; YYDEBUG(785, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1617 "Zend/zend_language_scanner.l" +#line 1624 "Zend/zend_language_scanner.l" { yyless(yyleng - 1); - zend_copy_value(zendlval, yytext, yyleng); yy_pop_state(); yy_push_state(ST_IN_SCRIPTING); - RETURN_TOKEN(T_STRING_VARNAME); + RETURN_TOKEN_WITH_STR(T_STRING_VARNAME, 0); } -#line 7485 "Zend/zend_language_scanner.c" +#line 7473 "Zend/zend_language_scanner.c" } /* *********************************** */ yyc_ST_NOWDOC: @@ -7492,7 +7480,7 @@ yyc_ST_NOWDOC: ++YYCURSOR; YYDEBUG(789, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2391 "Zend/zend_language_scanner.l" +#line 2392 "Zend/zend_language_scanner.l" { int newline = 0; @@ -7546,9 +7534,9 @@ nowdoc_scan_done: zend_copy_value(zendlval, yytext, yyleng - newline); HANDLE_NEWLINES(yytext, yyleng - newline); - RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); + RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } -#line 7552 "Zend/zend_language_scanner.c" +#line 7540 "Zend/zend_language_scanner.c" /* *********************************** */ yyc_ST_VAR_OFFSET: { @@ -7636,7 +7624,7 @@ yy792: ++YYCURSOR; YYDEBUG(793, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 2448 "Zend/zend_language_scanner.l" +#line 2449 "Zend/zend_language_scanner.l" { if (YYCURSOR > YYLIMIT) { RETURN_TOKEN(END); @@ -7645,33 +7633,33 @@ yy792: zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE); goto restart; } -#line 7649 "Zend/zend_language_scanner.c" +#line 7637 "Zend/zend_language_scanner.c" yy794: YYDEBUG(794, *YYCURSOR); ++YYCURSOR; YYDEBUG(795, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1914 "Zend/zend_language_scanner.l" +#line 1917 "Zend/zend_language_scanner.l" { /* Invalid rule to return a more explicit parse error with proper line number */ yyless(0); yy_pop_state(); ZVAL_NULL(zendlval); - RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); + RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } -#line 7663 "Zend/zend_language_scanner.c" +#line 7651 "Zend/zend_language_scanner.c" yy796: YYDEBUG(796, *YYCURSOR); ++YYCURSOR; yy797: YYDEBUG(797, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1909 "Zend/zend_language_scanner.l" +#line 1912 "Zend/zend_language_scanner.l" { /* Only '[' or '-' can be valid, but returning other tokens will allow a more explicit parse error */ RETURN_TOKEN(yytext[0]); } -#line 7675 "Zend/zend_language_scanner.c" +#line 7663 "Zend/zend_language_scanner.c" yy798: YYDEBUG(798, *YYCURSOR); yych = *++YYCURSOR; @@ -7706,7 +7694,7 @@ yy799: yy800: YYDEBUG(800, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1740 "Zend/zend_language_scanner.l" +#line 1746 "Zend/zend_language_scanner.l" { /* Offset could be treated as a long */ if (yyleng < MAX_LENGTH_OF_LONG - 1 || (yyleng == MAX_LENGTH_OF_LONG - 1 && strcmp(yytext, long_min_digits) < 0)) { char *end; @@ -7720,9 +7708,9 @@ yy800: string: ZVAL_STRINGL(zendlval, yytext, yyleng); } - RETURN_TOKEN(T_NUM_STRING); + RETURN_TOKEN_WITH_VAL(T_NUM_STRING); } -#line 7726 "Zend/zend_language_scanner.c" +#line 7714 "Zend/zend_language_scanner.c" yy801: YYDEBUG(801, *YYCURSOR); ++YYCURSOR; @@ -7744,23 +7732,22 @@ yy803: } YYDEBUG(805, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1922 "Zend/zend_language_scanner.l" +#line 1925 "Zend/zend_language_scanner.l" { - zend_copy_value(zendlval, yytext, yyleng); - RETURN_TOKEN(T_STRING); + RETURN_TOKEN_WITH_STR(T_STRING, 0); } -#line 7753 "Zend/zend_language_scanner.c" +#line 7740 "Zend/zend_language_scanner.c" yy806: YYDEBUG(806, *YYCURSOR); ++YYCURSOR; YYDEBUG(807, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1904 "Zend/zend_language_scanner.l" +#line 1907 "Zend/zend_language_scanner.l" { yy_pop_state(); RETURN_TOKEN(']'); } -#line 7764 "Zend/zend_language_scanner.c" +#line 7751 "Zend/zend_language_scanner.c" yy808: YYDEBUG(808, *YYCURSOR); ++YYCURSOR; @@ -7785,12 +7772,11 @@ yy808: yy810: YYDEBUG(810, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1899 "Zend/zend_language_scanner.l" +#line 1903 "Zend/zend_language_scanner.l" { - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } -#line 7794 "Zend/zend_language_scanner.c" +#line 7780 "Zend/zend_language_scanner.c" yy811: YYDEBUG(811, *YYCURSOR); ++YYCURSOR; @@ -7802,12 +7788,12 @@ yy811: yy813: YYDEBUG(813, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1756 "Zend/zend_language_scanner.l" +#line 1762 "Zend/zend_language_scanner.l" { /* Offset must be treated as a string */ ZVAL_STRINGL(zendlval, yytext, yyleng); - RETURN_TOKEN(T_NUM_STRING); + RETURN_TOKEN_WITH_VAL(T_NUM_STRING); } -#line 7811 "Zend/zend_language_scanner.c" +#line 7797 "Zend/zend_language_scanner.c" yy814: YYDEBUG(814, *YYCURSOR); yych = *++YYCURSOR; @@ -7847,19 +7833,35 @@ yy819: goto yy813; } } -#line 2457 "Zend/zend_language_scanner.l" +#line 2458 "Zend/zend_language_scanner.l" +emit_token_with_str: + zend_copy_value(zendlval, (yytext + offset), (yyleng - offset)); + +emit_token_with_val: + if (PARSER_MODE()) { + ZEND_ASSERT(Z_TYPE_P(zendlval) != IS_UNDEF); + elem->ast = zend_ast_create_zval_with_lineno(zendlval, 0, start_line); + } + emit_token: if (SCNG(on_event)) { SCNG(on_event)(ON_TOKEN, token, start_line, SCNG(on_event_context)); } + return token; + +return_whitespace: + HANDLE_NEWLINES(yytext, yyleng); + if (SCNG(on_event)) { + SCNG(on_event)(ON_TOKEN, T_WHITESPACE, start_line, SCNG(on_event_context)); + } if (PARSER_MODE()) { - if (Z_TYPE_P(zendlval) != IS_UNDEF) { - elem->ast = zend_ast_create_zval_with_lineno(zendlval, 0, start_line); - } + start_line = CG(zend_lineno); + goto restart; + } else { + return T_WHITESPACE; } - return token; skip_token: if (SCNG(on_event)) { diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 3f41da70e7..e5214e66a8 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -1102,6 +1102,17 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot goto emit_token; \ } while (0) +#define RETURN_TOKEN_WITH_VAL(_token) do { \ + token = _token; \ + goto emit_token_with_val; \ + } while (0) + +#define RETURN_TOKEN_WITH_STR(_token, _offset) do { \ + token = _token; \ + offset = _offset; \ + goto emit_token_with_str; \ + } while (0) + #define SKIP_TOKEN(_token) do { \ token = _token; \ goto skip_token; \ @@ -1110,6 +1121,7 @@ static int zend_scan_escape_string(zval *zendlval, char *str, int len, char quot int ZEND_FASTCALL lex_scan(zval *zendlval, zend_parser_stack_elem *elem) { int token; +int offset; int start_line = CG(zend_lineno); ZVAL_UNDEF(zendlval); @@ -1301,11 +1313,7 @@ NEWLINE ("\r"|"\n"|"\r\n") } <ST_IN_SCRIPTING,ST_LOOKING_FOR_PROPERTY>{WHITESPACE}+ { - HANDLE_NEWLINES(yytext, yyleng); - if (PARSER_MODE()) { - SKIP_TOKEN(T_WHITESPACE); - } - RETURN_TOKEN(T_WHITESPACE); + goto return_whitespace; } <ST_LOOKING_FOR_PROPERTY>"->" { @@ -1314,8 +1322,7 @@ NEWLINE ("\r"|"\n"|"\r\n") <ST_LOOKING_FOR_PROPERTY>{LABEL} { yy_pop_state(); - zend_copy_value(zendlval, yytext, yyleng); - RETURN_TOKEN(T_STRING); + RETURN_TOKEN_WITH_STR(T_STRING, 0); } <ST_LOOKING_FOR_PROPERTY>{ANY_CHAR} { @@ -1616,10 +1623,9 @@ NEWLINE ("\r"|"\n"|"\r\n") <ST_LOOKING_FOR_VARNAME>{LABEL}[[}] { yyless(yyleng - 1); - zend_copy_value(zendlval, yytext, yyleng); yy_pop_state(); yy_push_state(ST_IN_SCRIPTING); - RETURN_TOKEN(T_STRING_VARNAME); + RETURN_TOKEN_WITH_STR(T_STRING_VARNAME, 0); } @@ -1649,12 +1655,12 @@ NEWLINE ("\r"|"\n"|"\r\n") ZVAL_LONG(zendlval, ZEND_STRTOL(bin, &end, 2)); ZEND_ASSERT(!errno && end == yytext + yyleng); } - RETURN_TOKEN(T_LNUMBER); + RETURN_TOKEN_WITH_VAL(T_LNUMBER); } else { ZVAL_DOUBLE(zendlval, zend_bin_strtod(bin, (const char **)&end)); /* errno isn't checked since we allow HUGE_VAL/INF overflow */ ZEND_ASSERT(end == yytext + yyleng); - RETURN_TOKEN(T_DNUMBER); + RETURN_TOKEN_WITH_VAL(T_DNUMBER); } } @@ -1672,7 +1678,7 @@ NEWLINE ("\r"|"\n"|"\r\n") if (PARSER_MODE()) { RETURN_TOKEN(T_ERROR); } - RETURN_TOKEN(T_LNUMBER); + RETURN_TOKEN_WITH_VAL(T_LNUMBER); } } else { errno = 0; @@ -1693,7 +1699,7 @@ NEWLINE ("\r"|"\n"|"\r\n") RETURN_TOKEN(T_ERROR); } } - RETURN_TOKEN(T_DNUMBER); + RETURN_TOKEN_WITH_VAL(T_DNUMBER); } /* Also not an assert for the same reason */ if (end != yytext + yyleng) { @@ -1702,11 +1708,11 @@ NEWLINE ("\r"|"\n"|"\r\n") if (PARSER_MODE()) { RETURN_TOKEN(T_ERROR); } - RETURN_TOKEN(T_DNUMBER); + RETURN_TOKEN_WITH_VAL(T_DNUMBER); } } ZEND_ASSERT(!errno); - RETURN_TOKEN(T_LNUMBER); + RETURN_TOKEN_WITH_VAL(T_LNUMBER); } <ST_IN_SCRIPTING>{HNUM} { @@ -1728,12 +1734,12 @@ NEWLINE ("\r"|"\n"|"\r\n") ZVAL_LONG(zendlval, ZEND_STRTOL(hex, &end, 16)); ZEND_ASSERT(!errno && end == hex + len); } - RETURN_TOKEN(T_LNUMBER); + RETURN_TOKEN_WITH_VAL(T_LNUMBER); } else { ZVAL_DOUBLE(zendlval, zend_hex_strtod(hex, (const char **)&end)); /* errno isn't checked since we allow HUGE_VAL/INF overflow */ ZEND_ASSERT(end == hex + len); - RETURN_TOKEN(T_DNUMBER); + RETURN_TOKEN_WITH_VAL(T_DNUMBER); } } @@ -1750,12 +1756,12 @@ NEWLINE ("\r"|"\n"|"\r\n") string: ZVAL_STRINGL(zendlval, yytext, yyleng); } - RETURN_TOKEN(T_NUM_STRING); + RETURN_TOKEN_WITH_VAL(T_NUM_STRING); } <ST_VAR_OFFSET>{LNUM}|{HNUM}|{BNUM} { /* Offset must be treated as a string */ ZVAL_STRINGL(zendlval, yytext, yyleng); - RETURN_TOKEN(T_NUM_STRING); + RETURN_TOKEN_WITH_VAL(T_NUM_STRING); } <ST_IN_SCRIPTING>{DNUM}|{EXPONENT_DNUM} { @@ -1764,7 +1770,7 @@ string: ZVAL_DOUBLE(zendlval, zend_strtod(yytext, &end)); /* errno isn't checked since we allow HUGE_VAL/INF overflow */ ZEND_ASSERT(end == yytext + yyleng); - RETURN_TOKEN(T_DNUMBER); + RETURN_TOKEN_WITH_VAL(T_DNUMBER); } <ST_IN_SCRIPTING>"__CLASS__" { @@ -1873,7 +1879,7 @@ inline_char_handler: ZVAL_STRINGL(zendlval, yytext, yyleng); } HANDLE_NEWLINES(yytext, yyleng); - RETURN_TOKEN(T_INLINE_HTML); + RETURN_TOKEN_WITH_VAL(T_INLINE_HTML); } @@ -1883,8 +1889,7 @@ inline_char_handler: <ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE>"$"{LABEL}"->"[a-zA-Z_\x80-\xff] { yyless(yyleng - 3); yy_push_state(ST_LOOKING_FOR_PROPERTY); - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } /* A [ always designates a variable offset, regardless of what follows @@ -1892,13 +1897,11 @@ inline_char_handler: <ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE>"$"{LABEL}"[" { yyless(yyleng - 1); yy_push_state(ST_VAR_OFFSET); - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } <ST_IN_SCRIPTING,ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE,ST_VAR_OFFSET>"$"{LABEL} { - zend_copy_value(zendlval, (yytext+1), (yyleng-1)); - RETURN_TOKEN(T_VARIABLE); + RETURN_TOKEN_WITH_STR(T_VARIABLE, 1); } <ST_VAR_OFFSET>"]" { @@ -1916,12 +1919,11 @@ inline_char_handler: yyless(0); yy_pop_state(); ZVAL_NULL(zendlval); - RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); + RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } <ST_IN_SCRIPTING,ST_VAR_OFFSET>{LABEL} { - zend_copy_value(zendlval, yytext, yyleng); - RETURN_TOKEN(T_STRING); + RETURN_TOKEN_WITH_STR(T_STRING, 0); } @@ -2030,7 +2032,7 @@ inline_char_handler: * for ' (unrecognized by parser), instead of old flex fallback to "Unexpected character..." * rule, which continued in ST_IN_SCRIPTING state after the quote */ ZVAL_NULL(zendlval); - RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); + RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } } @@ -2073,7 +2075,7 @@ inline_char_handler: SCNG(output_filter)((unsigned char **)&str, &sz, (unsigned char *)s, (size_t)Z_STRLEN_P(zendlval)); ZVAL_STRINGL(zendlval, str, sz); } - RETURN_TOKEN(T_CONSTANT_ENCAPSED_STRING); + RETURN_TOKEN_WITH_VAL(T_CONSTANT_ENCAPSED_STRING); } @@ -2086,7 +2088,7 @@ inline_char_handler: yyleng = YYCURSOR - SCNG(yy_text); if (EXPECTED(zend_scan_escape_string(zendlval, yytext+bprefix+1, yyleng-bprefix-2, '"') == SUCCESS) || !PARSER_MODE()) { - RETURN_TOKEN(T_CONSTANT_ENCAPSED_STRING); + RETURN_TOKEN_WITH_VAL(T_CONSTANT_ENCAPSED_STRING); } else { RETURN_TOKEN(T_ERROR); } @@ -2192,7 +2194,6 @@ inline_char_handler: <ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"{$" { - Z_LVAL_P(zendlval) = (zend_long) '{'; yy_push_state(ST_IN_SCRIPTING); yyless(1); RETURN_TOKEN(T_CURLY_OPEN); @@ -2257,7 +2258,7 @@ double_quotes_scan_done: if (EXPECTED(zend_scan_escape_string(zendlval, yytext, yyleng, '"') == SUCCESS) || !PARSER_MODE()) { - RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); + RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } else { RETURN_TOKEN(T_ERROR); } @@ -2303,7 +2304,7 @@ double_quotes_scan_done: if (EXPECTED(zend_scan_escape_string(zendlval, yytext, yyleng, '`') == SUCCESS) || !PARSER_MODE()) { - RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); + RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } else { RETURN_TOKEN(T_ERROR); } @@ -2381,7 +2382,7 @@ heredoc_scan_done: if (EXPECTED(zend_scan_escape_string(zendlval, yytext, yyleng - newline, 0) == SUCCESS) || !PARSER_MODE()) { - RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); + RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } else { RETURN_TOKEN(T_ERROR); } @@ -2441,7 +2442,7 @@ nowdoc_scan_done: zend_copy_value(zendlval, yytext, yyleng - newline); HANDLE_NEWLINES(yytext, yyleng - newline); - RETURN_TOKEN(T_ENCAPSED_AND_WHITESPACE); + RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE); } @@ -2456,16 +2457,32 @@ nowdoc_scan_done: */ +emit_token_with_str: + zend_copy_value(zendlval, (yytext + offset), (yyleng - offset)); + +emit_token_with_val: + if (PARSER_MODE()) { + ZEND_ASSERT(Z_TYPE_P(zendlval) != IS_UNDEF); + elem->ast = zend_ast_create_zval_with_lineno(zendlval, 0, start_line); + } + emit_token: if (SCNG(on_event)) { SCNG(on_event)(ON_TOKEN, token, start_line, SCNG(on_event_context)); } + return token; + +return_whitespace: + HANDLE_NEWLINES(yytext, yyleng); + if (SCNG(on_event)) { + SCNG(on_event)(ON_TOKEN, T_WHITESPACE, start_line, SCNG(on_event_context)); + } if (PARSER_MODE()) { - if (Z_TYPE_P(zendlval) != IS_UNDEF) { - elem->ast = zend_ast_create_zval_with_lineno(zendlval, 0, start_line); - } + start_line = CG(zend_lineno); + goto restart; + } else { + return T_WHITESPACE; } - return token; skip_token: if (SCNG(on_event)) { |