++YYCURSOR;
YYDEBUG(4, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2750 "Zend/zend_language_scanner.l"
+#line 2765 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
RETURN_TOKEN(END);
++YYCURSOR;
YYDEBUG(63, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2403 "Zend/zend_language_scanner.l"
+#line 2412 "Zend/zend_language_scanner.l"
{
BEGIN(ST_BACKQUOTE);
RETURN_TOKEN('`');
if (!IS_LABEL_SUCCESSOR(YYCURSOR[heredoc_label->length])) {
if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) {
zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0);
+ if (PARSER_MODE()) {
+ RETURN_TOKEN(T_ERROR);
+ }
}
YYCURSOR = saved_cursor;
zend_lex_state current_state;
int heredoc_nesting_level = 1;
int first_token = 0;
+ int error = 0;
zend_save_lexical_state(¤t_state);
|| first_token == T_CURLY_OPEN
) && SCNG(heredoc_indentation)) {
zend_throw_exception_ex(zend_ce_parse_error, 0, "Invalid body indentation level (expecting an indentation level of at least %d)", SCNG(heredoc_indentation));
+ error = 1;
}
heredoc_label->indentation = SCNG(heredoc_indentation);
zend_restore_lexical_state(¤t_state);
SCNG(heredoc_scan_ahead) = 0;
CG(increment_lineno) = 0;
+
+ if (PARSER_MODE() && error) {
+ RETURN_TOKEN(T_ERROR);
+ }
}
RETURN_TOKEN(T_START_HEREDOC);
}
-#line 4792 "Zend/zend_language_scanner.c"
+#line 4801 "Zend/zend_language_scanner.c"
yy398:
YYDEBUG(398, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_ARRAY);
}
-#line 4816 "Zend/zend_language_scanner.c"
+#line 4825 "Zend/zend_language_scanner.c"
yy402:
YYDEBUG(402, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_BREAK);
}
-#line 4829 "Zend/zend_language_scanner.c"
+#line 4838 "Zend/zend_language_scanner.c"
yy404:
YYDEBUG(404, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_CATCH);
}
-#line 4848 "Zend/zend_language_scanner.c"
+#line 4857 "Zend/zend_language_scanner.c"
yy407:
YYDEBUG(407, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_CLASS);
}
-#line 4861 "Zend/zend_language_scanner.c"
+#line 4870 "Zend/zend_language_scanner.c"
yy409:
YYDEBUG(409, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_CLONE);
}
-#line 4874 "Zend/zend_language_scanner.c"
+#line 4883 "Zend/zend_language_scanner.c"
yy411:
YYDEBUG(411, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_CONST);
}
-#line 4887 "Zend/zend_language_scanner.c"
+#line 4896 "Zend/zend_language_scanner.c"
yy413:
YYDEBUG(413, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_EMPTY);
}
-#line 4924 "Zend/zend_language_scanner.c"
+#line 4933 "Zend/zend_language_scanner.c"
yy419:
YYDEBUG(419, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_ENDIF);
}
-#line 4949 "Zend/zend_language_scanner.c"
+#line 4958 "Zend/zend_language_scanner.c"
yy423:
YYDEBUG(423, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_FINAL);
}
-#line 4995 "Zend/zend_language_scanner.c"
+#line 5004 "Zend/zend_language_scanner.c"
yy428:
YYDEBUG(428, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_ISSET);
}
-#line 5056 "Zend/zend_language_scanner.c"
+#line 5065 "Zend/zend_language_scanner.c"
yy438:
YYDEBUG(438, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_PRINT);
}
-#line 5075 "Zend/zend_language_scanner.c"
+#line 5084 "Zend/zend_language_scanner.c"
yy441:
YYDEBUG(441, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_THROW);
}
-#line 5130 "Zend/zend_language_scanner.c"
+#line 5139 "Zend/zend_language_scanner.c"
yy450:
YYDEBUG(450, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_TRAIT);
}
-#line 5143 "Zend/zend_language_scanner.c"
+#line 5152 "Zend/zend_language_scanner.c"
yy452:
YYDEBUG(452, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_UNSET);
}
-#line 5156 "Zend/zend_language_scanner.c"
+#line 5165 "Zend/zend_language_scanner.c"
yy454:
YYDEBUG(454, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_WHILE);
}
-#line 5169 "Zend/zend_language_scanner.c"
+#line 5178 "Zend/zend_language_scanner.c"
yy456:
YYDEBUG(456, *YYCURSOR);
yyaccept = 6;
{
RETURN_TOKEN(T_YIELD);
}
-#line 5191 "Zend/zend_language_scanner.c"
+#line 5200 "Zend/zend_language_scanner.c"
yy458:
YYDEBUG(458, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_BOOL_CAST);
}
-#line 5287 "Zend/zend_language_scanner.c"
+#line 5296 "Zend/zend_language_scanner.c"
yy474:
YYDEBUG(474, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_DOUBLE_CAST);
}
-#line 5321 "Zend/zend_language_scanner.c"
+#line 5330 "Zend/zend_language_scanner.c"
yy480:
YYDEBUG(480, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_ELSEIF);
}
-#line 5390 "Zend/zend_language_scanner.c"
+#line 5399 "Zend/zend_language_scanner.c"
yy491:
YYDEBUG(491, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_ENDFOR);
}
-#line 5424 "Zend/zend_language_scanner.c"
+#line 5433 "Zend/zend_language_scanner.c"
yy494:
YYDEBUG(494, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_GLOBAL);
}
-#line 5473 "Zend/zend_language_scanner.c"
+#line 5482 "Zend/zend_language_scanner.c"
yy502:
YYDEBUG(502, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_PUBLIC);
}
-#line 5534 "Zend/zend_language_scanner.c"
+#line 5543 "Zend/zend_language_scanner.c"
yy512:
YYDEBUG(512, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_RETURN);
}
-#line 5553 "Zend/zend_language_scanner.c"
+#line 5562 "Zend/zend_language_scanner.c"
yy515:
YYDEBUG(515, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_STATIC);
}
-#line 5566 "Zend/zend_language_scanner.c"
+#line 5575 "Zend/zend_language_scanner.c"
yy517:
YYDEBUG(517, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_SWITCH);
}
-#line 5579 "Zend/zend_language_scanner.c"
+#line 5588 "Zend/zend_language_scanner.c"
yy519:
YYDEBUG(519, *YYCURSOR);
++YYCURSOR;
{
RETURN_TOKEN(T_ARRAY_CAST);
}
-#line 5663 "Zend/zend_language_scanner.c"
+#line 5672 "Zend/zend_language_scanner.c"
yy532:
YYDEBUG(532, *YYCURSOR);
++YYCURSOR;
{
RETURN_TOKEN(T_UNSET_CAST);
}
-#line 5713 "Zend/zend_language_scanner.c"
+#line 5722 "Zend/zend_language_scanner.c"
yy540:
YYDEBUG(540, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_DECLARE);
}
-#line 5744 "Zend/zend_language_scanner.c"
+#line 5753 "Zend/zend_language_scanner.c"
yy545:
YYDEBUG(545, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_DEFAULT);
}
-#line 5757 "Zend/zend_language_scanner.c"
+#line 5766 "Zend/zend_language_scanner.c"
yy547:
YYDEBUG(547, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_EXTENDS);
}
-#line 5794 "Zend/zend_language_scanner.c"
+#line 5803 "Zend/zend_language_scanner.c"
yy553:
YYDEBUG(553, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_FINALLY);
}
-#line 5807 "Zend/zend_language_scanner.c"
+#line 5816 "Zend/zend_language_scanner.c"
yy555:
YYDEBUG(555, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_FOREACH);
}
-#line 5820 "Zend/zend_language_scanner.c"
+#line 5829 "Zend/zend_language_scanner.c"
yy557:
YYDEBUG(557, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_INCLUDE);
}
-#line 5858 "Zend/zend_language_scanner.c"
+#line 5867 "Zend/zend_language_scanner.c"
yy561:
YYDEBUG(561, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_PRIVATE);
}
-#line 5895 "Zend/zend_language_scanner.c"
+#line 5904 "Zend/zend_language_scanner.c"
yy567:
YYDEBUG(567, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_REQUIRE);
}
-#line 5927 "Zend/zend_language_scanner.c"
+#line 5936 "Zend/zend_language_scanner.c"
yy570:
YYDEBUG(570, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_DIR);
}
-#line 5951 "Zend/zend_language_scanner.c"
+#line 5960 "Zend/zend_language_scanner.c"
yy574:
YYDEBUG(574, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_STRING_CAST);
}
-#line 6000 "Zend/zend_language_scanner.c"
+#line 6009 "Zend/zend_language_scanner.c"
yy583:
YYDEBUG(583, *YYCURSOR);
++YYCURSOR;
{
RETURN_TOKEN(T_OBJECT_CAST);
}
-#line 6010 "Zend/zend_language_scanner.c"
+#line 6019 "Zend/zend_language_scanner.c"
yy585:
YYDEBUG(585, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_ABSTRACT);
}
-#line 6023 "Zend/zend_language_scanner.c"
+#line 6032 "Zend/zend_language_scanner.c"
yy587:
YYDEBUG(587, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_CALLABLE);
}
-#line 6036 "Zend/zend_language_scanner.c"
+#line 6045 "Zend/zend_language_scanner.c"
yy589:
YYDEBUG(589, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_CONTINUE);
}
-#line 6049 "Zend/zend_language_scanner.c"
+#line 6058 "Zend/zend_language_scanner.c"
yy591:
YYDEBUG(591, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_ENDWHILE);
}
-#line 6080 "Zend/zend_language_scanner.c"
+#line 6089 "Zend/zend_language_scanner.c"
yy596:
YYDEBUG(596, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_FUNCTION);
}
-#line 6093 "Zend/zend_language_scanner.c"
+#line 6102 "Zend/zend_language_scanner.c"
yy598:
YYDEBUG(598, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_FILE);
}
-#line 6165 "Zend/zend_language_scanner.c"
+#line 6174 "Zend/zend_language_scanner.c"
yy610:
YYDEBUG(610, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_LINE);
}
-#line 6190 "Zend/zend_language_scanner.c"
+#line 6199 "Zend/zend_language_scanner.c"
yy614:
YYDEBUG(614, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_ENDSWITCH);
}
-#line 6231 "Zend/zend_language_scanner.c"
+#line 6240 "Zend/zend_language_scanner.c"
yy621:
YYDEBUG(621, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_INSTEADOF);
}
-#line 6262 "Zend/zend_language_scanner.c"
+#line 6271 "Zend/zend_language_scanner.c"
yy626:
YYDEBUG(626, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_INTERFACE);
}
-#line 6275 "Zend/zend_language_scanner.c"
+#line 6284 "Zend/zend_language_scanner.c"
yy628:
YYDEBUG(628, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_NAMESPACE);
}
-#line 6288 "Zend/zend_language_scanner.c"
+#line 6297 "Zend/zend_language_scanner.c"
yy630:
YYDEBUG(630, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_PROTECTED);
}
-#line 6301 "Zend/zend_language_scanner.c"
+#line 6310 "Zend/zend_language_scanner.c"
yy632:
YYDEBUG(632, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_CLASS_C);
}
-#line 6326 "Zend/zend_language_scanner.c"
+#line 6335 "Zend/zend_language_scanner.c"
yy636:
YYDEBUG(636, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_TRAIT_C);
}
-#line 6362 "Zend/zend_language_scanner.c"
+#line 6371 "Zend/zend_language_scanner.c"
yy642:
YYDEBUG(642, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_ENDDECLARE);
}
-#line 6375 "Zend/zend_language_scanner.c"
+#line 6384 "Zend/zend_language_scanner.c"
yy644:
YYDEBUG(644, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_ENDFOREACH);
}
-#line 6388 "Zend/zend_language_scanner.c"
+#line 6397 "Zend/zend_language_scanner.c"
yy646:
YYDEBUG(646, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_IMPLEMENTS);
}
-#line 6401 "Zend/zend_language_scanner.c"
+#line 6410 "Zend/zend_language_scanner.c"
yy648:
YYDEBUG(648, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_INSTANCEOF);
}
-#line 6420 "Zend/zend_language_scanner.c"
+#line 6429 "Zend/zend_language_scanner.c"
yy651:
YYDEBUG(651, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_METHOD_C);
}
-#line 6472 "Zend/zend_language_scanner.c"
+#line 6481 "Zend/zend_language_scanner.c"
yy657:
YYDEBUG(657, *YYCURSOR);
yych = *++YYCURSOR;
HANDLE_NEWLINES(yytext, yyleng);
RETURN_TOKEN(T_YIELD_FROM);
}
-#line 6502 "Zend/zend_language_scanner.c"
+#line 6511 "Zend/zend_language_scanner.c"
yy662:
YYDEBUG(662, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_INCLUDE_ONCE);
}
-#line 6531 "Zend/zend_language_scanner.c"
+#line 6540 "Zend/zend_language_scanner.c"
yy667:
YYDEBUG(667, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_REQUIRE_ONCE);
}
-#line 6544 "Zend/zend_language_scanner.c"
+#line 6553 "Zend/zend_language_scanner.c"
yy669:
YYDEBUG(669, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_FUNC_C);
}
-#line 6557 "Zend/zend_language_scanner.c"
+#line 6566 "Zend/zend_language_scanner.c"
yy671:
YYDEBUG(671, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_NS_C);
}
-#line 6587 "Zend/zend_language_scanner.c"
+#line 6596 "Zend/zend_language_scanner.c"
yy676:
YYDEBUG(676, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN(T_HALT_COMPILER);
}
-#line 6605 "Zend/zend_language_scanner.c"
+#line 6614 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_LOOKING_FOR_PROPERTY:
yy_pop_state();
goto restart;
}
-#line 6677 "Zend/zend_language_scanner.c"
+#line 6686 "Zend/zend_language_scanner.c"
yy683:
YYDEBUG(683, *YYCURSOR);
++YYCURSOR;
{
goto return_whitespace;
}
-#line 6693 "Zend/zend_language_scanner.c"
+#line 6702 "Zend/zend_language_scanner.c"
yy686:
YYDEBUG(686, *YYCURSOR);
yych = *++YYCURSOR;
yy_pop_state();
RETURN_TOKEN_WITH_STR(T_STRING, 0);
}
-#line 6715 "Zend/zend_language_scanner.c"
+#line 6724 "Zend/zend_language_scanner.c"
yy690:
YYDEBUG(690, *YYCURSOR);
++YYCURSOR;
{
RETURN_TOKEN(T_OBJECT_OPERATOR);
}
-#line 6725 "Zend/zend_language_scanner.c"
+#line 6734 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_BACKQUOTE:
yy695:
YYDEBUG(695, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2495 "Zend/zend_language_scanner.l"
+#line 2504 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
RETURN_TOKEN(END);
RETURN_TOKEN(T_ERROR);
}
}
-#line 6823 "Zend/zend_language_scanner.c"
+#line 6832 "Zend/zend_language_scanner.c"
yy696:
YYDEBUG(696, *YYCURSOR);
yych = *++YYCURSOR;
++YYCURSOR;
YYDEBUG(698, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2435 "Zend/zend_language_scanner.l"
+#line 2444 "Zend/zend_language_scanner.l"
{
BEGIN(ST_IN_SCRIPTING);
RETURN_TOKEN('`');
}
-#line 6852 "Zend/zend_language_scanner.c"
+#line 6861 "Zend/zend_language_scanner.c"
yy699:
YYDEBUG(699, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
}
-#line 6877 "Zend/zend_language_scanner.c"
+#line 6886 "Zend/zend_language_scanner.c"
yy703:
YYDEBUG(703, *YYCURSOR);
++YYCURSOR;
yy_push_state(ST_LOOKING_FOR_VARNAME);
RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES);
}
-#line 6888 "Zend/zend_language_scanner.c"
+#line 6897 "Zend/zend_language_scanner.c"
yy705:
YYDEBUG(705, *YYCURSOR);
++YYCURSOR;
YYDEBUG(706, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2423 "Zend/zend_language_scanner.l"
+#line 2432 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_IN_SCRIPTING);
yyless(1);
RETURN_TOKEN(T_CURLY_OPEN);
}
-#line 6900 "Zend/zend_language_scanner.c"
+#line 6909 "Zend/zend_language_scanner.c"
yy707:
YYDEBUG(707, *YYCURSOR);
yych = *++YYCURSOR;
yy_push_state(ST_VAR_OFFSET);
RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
}
-#line 6920 "Zend/zend_language_scanner.c"
+#line 6929 "Zend/zend_language_scanner.c"
yy711:
YYDEBUG(711, *YYCURSOR);
yych = *++YYCURSOR;
yy_push_state(ST_LOOKING_FOR_PROPERTY);
RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
}
-#line 6944 "Zend/zend_language_scanner.c"
+#line 6953 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_DOUBLE_QUOTES:
yy717:
YYDEBUG(717, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2441 "Zend/zend_language_scanner.l"
+#line 2450 "Zend/zend_language_scanner.l"
{
if (GET_DOUBLE_QUOTES_SCANNED_LENGTH()) {
YYCURSOR += GET_DOUBLE_QUOTES_SCANNED_LENGTH() - 1;
RETURN_TOKEN(T_ERROR);
}
}
-#line 7050 "Zend/zend_language_scanner.c"
+#line 7059 "Zend/zend_language_scanner.c"
yy718:
YYDEBUG(718, *YYCURSOR);
++YYCURSOR;
YYDEBUG(719, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2430 "Zend/zend_language_scanner.l"
+#line 2439 "Zend/zend_language_scanner.l"
{
BEGIN(ST_IN_SCRIPTING);
RETURN_TOKEN('"');
}
-#line 7061 "Zend/zend_language_scanner.c"
+#line 7070 "Zend/zend_language_scanner.c"
yy720:
YYDEBUG(720, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
}
-#line 7104 "Zend/zend_language_scanner.c"
+#line 7113 "Zend/zend_language_scanner.c"
yy725:
YYDEBUG(725, *YYCURSOR);
++YYCURSOR;
yy_push_state(ST_LOOKING_FOR_VARNAME);
RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES);
}
-#line 7115 "Zend/zend_language_scanner.c"
+#line 7124 "Zend/zend_language_scanner.c"
yy727:
YYDEBUG(727, *YYCURSOR);
++YYCURSOR;
YYDEBUG(728, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2423 "Zend/zend_language_scanner.l"
+#line 2432 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_IN_SCRIPTING);
yyless(1);
RETURN_TOKEN(T_CURLY_OPEN);
}
-#line 7127 "Zend/zend_language_scanner.c"
+#line 7136 "Zend/zend_language_scanner.c"
yy729:
YYDEBUG(729, *YYCURSOR);
yych = *++YYCURSOR;
yy_push_state(ST_VAR_OFFSET);
RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
}
-#line 7147 "Zend/zend_language_scanner.c"
+#line 7156 "Zend/zend_language_scanner.c"
yy733:
YYDEBUG(733, *YYCURSOR);
yych = *++YYCURSOR;
yy_push_state(ST_LOOKING_FOR_PROPERTY);
RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
}
-#line 7171 "Zend/zend_language_scanner.c"
+#line 7180 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_HEREDOC:
yy739:
YYDEBUG(739, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2541 "Zend/zend_language_scanner.l"
+#line 2550 "Zend/zend_language_scanner.l"
{
zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack));
int newline = 0, indentation = 0, spacing = 0;
if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) {
zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0);
+ if (PARSER_MODE()) {
+ RETURN_TOKEN(T_ERROR);
+ }
}
/* newline before label will be subtracted from returned text, but
RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE);
}
-#line 7340 "Zend/zend_language_scanner.c"
+#line 7352 "Zend/zend_language_scanner.c"
yy740:
YYDEBUG(740, *YYCURSOR);
yych = *++YYCURSOR;
{
RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
}
-#line 7383 "Zend/zend_language_scanner.c"
+#line 7395 "Zend/zend_language_scanner.c"
yy745:
YYDEBUG(745, *YYCURSOR);
++YYCURSOR;
yy_push_state(ST_LOOKING_FOR_VARNAME);
RETURN_TOKEN(T_DOLLAR_OPEN_CURLY_BRACES);
}
-#line 7394 "Zend/zend_language_scanner.c"
+#line 7406 "Zend/zend_language_scanner.c"
yy747:
YYDEBUG(747, *YYCURSOR);
++YYCURSOR;
YYDEBUG(748, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2423 "Zend/zend_language_scanner.l"
+#line 2432 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_IN_SCRIPTING);
yyless(1);
RETURN_TOKEN(T_CURLY_OPEN);
}
-#line 7406 "Zend/zend_language_scanner.c"
+#line 7418 "Zend/zend_language_scanner.c"
yy749:
YYDEBUG(749, *YYCURSOR);
yych = *++YYCURSOR;
yy_push_state(ST_VAR_OFFSET);
RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
}
-#line 7426 "Zend/zend_language_scanner.c"
+#line 7438 "Zend/zend_language_scanner.c"
yy753:
YYDEBUG(753, *YYCURSOR);
yych = *++YYCURSOR;
yy_push_state(ST_LOOKING_FOR_PROPERTY);
RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
}
-#line 7450 "Zend/zend_language_scanner.c"
+#line 7462 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_LOOKING_FOR_VARNAME:
yy_push_state(ST_IN_SCRIPTING);
goto restart;
}
-#line 7514 "Zend/zend_language_scanner.c"
+#line 7526 "Zend/zend_language_scanner.c"
yy760:
YYDEBUG(760, *YYCURSOR);
yych = *(YYMARKER = ++YYCURSOR);
yy_push_state(ST_IN_SCRIPTING);
RETURN_TOKEN_WITH_STR(T_STRING_VARNAME, 0);
}
-#line 7568 "Zend/zend_language_scanner.c"
+#line 7580 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_VAR_OFFSET:
++YYCURSOR;
YYDEBUG(769, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2750 "Zend/zend_language_scanner.l"
+#line 2765 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
RETURN_TOKEN(END);
}
goto restart;
}
-#line 7668 "Zend/zend_language_scanner.c"
+#line 7680 "Zend/zend_language_scanner.c"
yy770:
YYDEBUG(770, *YYCURSOR);
++YYCURSOR;
ZVAL_NULL(zendlval);
RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE);
}
-#line 7682 "Zend/zend_language_scanner.c"
+#line 7694 "Zend/zend_language_scanner.c"
yy772:
YYDEBUG(772, *YYCURSOR);
++YYCURSOR;
/* Only '[' or '-' can be valid, but returning other tokens will allow a more explicit parse error */
RETURN_TOKEN(yytext[0]);
}
-#line 7694 "Zend/zend_language_scanner.c"
+#line 7706 "Zend/zend_language_scanner.c"
yy774:
YYDEBUG(774, *YYCURSOR);
yych = *++YYCURSOR;
}
RETURN_TOKEN_WITH_VAL(T_NUM_STRING);
}
-#line 7745 "Zend/zend_language_scanner.c"
+#line 7757 "Zend/zend_language_scanner.c"
yy777:
YYDEBUG(777, *YYCURSOR);
++YYCURSOR;
{
RETURN_TOKEN_WITH_STR(T_STRING, 0);
}
-#line 7771 "Zend/zend_language_scanner.c"
+#line 7783 "Zend/zend_language_scanner.c"
yy782:
YYDEBUG(782, *YYCURSOR);
++YYCURSOR;
yy_pop_state();
RETURN_TOKEN(']');
}
-#line 7782 "Zend/zend_language_scanner.c"
+#line 7794 "Zend/zend_language_scanner.c"
yy784:
YYDEBUG(784, *YYCURSOR);
++YYCURSOR;
{
RETURN_TOKEN_WITH_STR(T_VARIABLE, 1);
}
-#line 7811 "Zend/zend_language_scanner.c"
+#line 7823 "Zend/zend_language_scanner.c"
yy787:
YYDEBUG(787, *YYCURSOR);
++YYCURSOR;
}
RETURN_TOKEN_WITH_VAL(T_NUM_STRING);
}
-#line 7832 "Zend/zend_language_scanner.c"
+#line 7844 "Zend/zend_language_scanner.c"
yy790:
YYDEBUG(790, *YYCURSOR);
yych = *++YYCURSOR;
HANDLE_NEWLINES(yytext, yyleng);
RETURN_TOKEN_WITH_VAL(T_INLINE_HTML);
}
-#line 7929 "Zend/zend_language_scanner.c"
+#line 7941 "Zend/zend_language_scanner.c"
yy801:
YYDEBUG(801, *YYCURSOR);
yych = *++YYCURSOR;
goto inline_char_handler;
}
}
-#line 7957 "Zend/zend_language_scanner.c"
+#line 7969 "Zend/zend_language_scanner.c"
yy804:
YYDEBUG(804, *YYCURSOR);
++YYCURSOR;
}
RETURN_TOKEN(T_OPEN_TAG_WITH_ECHO);
}
-#line 7971 "Zend/zend_language_scanner.c"
+#line 7983 "Zend/zend_language_scanner.c"
yy806:
YYDEBUG(806, *YYCURSOR);
yych = *++YYCURSOR;
}
RETURN_TOKEN(T_OPEN_TAG);
}
-#line 8011 "Zend/zend_language_scanner.c"
+#line 8023 "Zend/zend_language_scanner.c"
yy812:
YYDEBUG(812, *YYCURSOR);
yych = *++YYCURSOR;
++YYCURSOR;
YYDEBUG(816, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2409 "Zend/zend_language_scanner.l"
+#line 2418 "Zend/zend_language_scanner.l"
{
zend_heredoc_label *heredoc_label = zend_ptr_stack_pop(&SCNG(heredoc_label_stack));
BEGIN(ST_IN_SCRIPTING);
RETURN_TOKEN(T_END_HEREDOC);
}
-#line 8039 "Zend/zend_language_scanner.c"
+#line 8051 "Zend/zend_language_scanner.c"
/* *********************************** */
yyc_ST_NOWDOC:
YYDEBUG(817, *YYCURSOR);
++YYCURSOR;
YYDEBUG(820, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2662 "Zend/zend_language_scanner.l"
+#line 2674 "Zend/zend_language_scanner.l"
{
zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack));
int newline = 0, indentation = 0, spacing = -1;
if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) {
zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0);
+ if (PARSER_MODE()) {
+ RETURN_TOKEN(T_ERROR);
+ }
}
/* newline before label will be subtracted from returned text, but
HANDLE_NEWLINES(yytext, yyleng - newline);
RETURN_TOKEN_WITH_VAL(T_ENCAPSED_AND_WHITESPACE);
}
-#line 8136 "Zend/zend_language_scanner.c"
+#line 8151 "Zend/zend_language_scanner.c"
}
-#line 2761 "Zend/zend_language_scanner.l"
+#line 2776 "Zend/zend_language_scanner.l"
emit_token_with_str: