diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-11-27 06:39:31 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-11-27 06:39:31 +0000 |
commit | 497fae9d1f23135ffddd5295f16777acc85af89f (patch) | |
tree | baf5d60ee18537bf73d692a7ae4bfdf1a79690dd /Zend/zend_language_scanner.l | |
parent | ef08c58664b87d5f07b2850532eb18c07d35404c (diff) | |
download | php-git-497fae9d1f23135ffddd5295f16777acc85af89f.tar.gz |
Fixed bug #35411 (Regression with \{$ handling).
Fixed bug #35382 (Comment in end of file produces fatal error).
Diffstat (limited to 'Zend/zend_language_scanner.l')
-rw-r--r-- | Zend/zend_language_scanner.l | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index a5738c37a2..332e5c0bf8 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -1469,8 +1469,8 @@ NEWLINE ("\r"|"\n"|"\r\n") zendlval->value.str.val = yytext; /* no copying - intentional */ zendlval->value.str.len = yyleng; zendlval->type = IS_STRING; - BEGIN(ST_IN_SCRIPTING); - return T_COMMENT; + BEGIN(INITIAL); + return EOF; } <ST_ONE_LINE_COMMENT>{NEWLINE} { @@ -1806,6 +1806,13 @@ NEWLINE ("\r"|"\n"|"\r\n") return yytext[0]; } +<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\{" { + zendlval->value.str.val = estrndup("\\{", sizeof("\\{") - 1); + zendlval->value.str.len = sizeof("\\{") - 1; + zendlval->type = IS_STRING; + return T_STRING; +} + <ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"{$" { zendlval->value.lval = (long) yytext[0]; yy_push_state(ST_IN_SCRIPTING TSRMLS_CC); @@ -1844,13 +1851,6 @@ NEWLINE ("\r"|"\n"|"\r\n") return T_CHARACTER; } -<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\{$" { - zendlval->value.str.val = estrndup("{$", sizeof("{$")-1); - zendlval->value.str.len = sizeof("{$")-1; - zendlval->type = IS_STRING; - return T_STRING; -} - <ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\"{ANY_CHAR} { switch (yytext[1]) { case 'n': |