summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_lexer.l
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2016-10-01 19:14:26 +0100
committerBob Weinand <bobwei9@hotmail.com>2016-10-01 19:14:26 +0100
commit3fe1010ceebe231afcee8aceae6782c18da23539 (patch)
tree06fc5009359d266419e274effedbce15b62ba5a8 /sapi/phpdbg/phpdbg_lexer.l
parent5f69c929ea845c2b1e0bfb978f6859d135590a80 (diff)
parent9d537951c5e4af5e453dd4d60e74dad039856b80 (diff)
downloadphp-git-3fe1010ceebe231afcee8aceae6782c18da23539.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
Diffstat (limited to 'sapi/phpdbg/phpdbg_lexer.l')
-rw-r--r--sapi/phpdbg/phpdbg_lexer.l6
1 files changed, 3 insertions, 3 deletions
diff --git a/sapi/phpdbg/phpdbg_lexer.l b/sapi/phpdbg/phpdbg_lexer.l
index 21c4569480..b9c247a494 100644
--- a/sapi/phpdbg/phpdbg_lexer.l
+++ b/sapi/phpdbg/phpdbg_lexer.l
@@ -82,7 +82,7 @@ ID [^ \r\n\t:#\000]+
GENERIC_ID ([^ \r\n\t:#\000"']|":\\")+|["]([^\n\000"\\]|"\\\\"|"\\"["])+["]|[']([^\n\000'\\]|"\\\\"|"\\"['])+[']
ADDR [0][x][a-fA-F0-9]+
OPCODE (ZEND_|zend_)([A-Za-z])+
-INPUT ([^\n\000#"']|["]([^\n\000"\\]|"\\\\"|"\\"["])+["]|[']([^\n\000'\\]|"\\\\"|"\\"['])+['])+
+INPUT ([^\n\000#"']|"\\"["']|["]([^\n\000"\\]|"\\\\"|"\\"["])+["]|[']([^\n\000'\\]|"\\\\"|"\\"['])+['])+
<!*> := yyleng = (size_t) YYCURSOR - (size_t) yytext;
@@ -160,14 +160,14 @@ INPUT ([^\n\000#"']|["]([^\n\000"\\]|"\\\\"|"\\"["])+["]|[']([^\n\000'\\]|
<NORMAL>{GENERIC_ID} {
phpdbg_init_param(yylval, STR_PARAM);
- yylval->str = estrndup(yytext, yyleng - unescape_string(yytext));
+ yylval->str = estrndup(yytext + (*yytext == '\'' || *yytext == '\"'), yyleng - unescape_string(yytext));
yylval->len = yyleng;
return T_ID;
}
<RAW>{INPUT} {
phpdbg_init_param(yylval, STR_PARAM);
- yylval->str = estrndup(yytext, yyleng - unescape_string(yytext));
+ yylval->str = estrdup(yytext);
yylval->len = yyleng;
return T_INPUT;
}