1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 10:43:30 +02:00

More correct patch for b-prefixes.

This commit is contained in:
Andrei Zmievski
2006-12-20 18:22:07 +00:00
parent c348c293c8
commit 0d7af28a40
+19 -3
View File
@@ -1569,10 +1569,15 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
<ST_IN_SCRIPTING>(["]([^$"\\]|("\\".))*["]) {
<ST_IN_SCRIPTING>("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")
}
<ST_IN_SCRIPTING>([']([^'\\]|("\\".))*[']) {
<ST_IN_SCRIPTING>("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")
}
<ST_IN_SCRIPTING>b?"<<<"{TABS_AND_SPACES}{LABEL}{NEWLINE} {
<ST_IN_SCRIPTING>"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;