From: Andrei Zmievski Date: Wed, 20 Dec 2006 18:22:07 +0000 (+0000) Subject: More correct patch for b-prefixes. X-Git-Tag: php-5.2.1RC2~136 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d7af28a40001614b7b8676b28b3873e41639bae;p=php More correct patch for b-prefixes. --- diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 8c78d9674e..cceffd1969 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -1569,10 +1569,15 @@ NEWLINE ("\r"|"\n"|"\r\n") } -(["]([^$"\\]|("\\".))*["]) { +("b"?["]([^$"\\]|("\\".))*["]) { register char *s, *t; char *end; + if (*yytext == 'b') { + yytext++; + yyleng--; + } + zendlval->value.str.val = estrndup(yytext+1, yyleng-2); zendlval->value.str.len = yyleng-2; zendlval->type = IS_STRING; @@ -1659,10 +1664,15 @@ NEWLINE ("\r"|"\n"|"\r\n") } -([']([^'\\]|("\\".))*[']) { +("b"?[']([^'\\]|("\\".))*[']) { register char *s, *t; char *end; + if (*yytext == 'b') { + yytext++; + yyleng--; + } + zendlval->value.str.val = estrndup(yytext+1, yyleng-2); zendlval->value.str.len = yyleng-2; zendlval->type = IS_STRING; @@ -1713,8 +1723,14 @@ NEWLINE ("\r"|"\n"|"\r\n") } -b?"<<<"{TABS_AND_SPACES}{LABEL}{NEWLINE} { +"b"?"<<<"{TABS_AND_SPACES}{LABEL}{NEWLINE} { char *s; + + if (*yytext == 'b') { + yytext++; + yyleng--; + } + CG(zend_lineno)++; CG(heredoc_len) = yyleng-3-1-(yytext[yyleng-2]=='\r'?1:0); s = yytext+3;