From 1d35ad33c67d5aee945b7eff1aacf65333e2c83b Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Tue, 19 Dec 2000 12:57:38 +0000 Subject: [PATCH] Add support for ASP tags in one-line comment --- Zend/zend_language_scanner.l | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 1567e8ed43..c88a3805e8 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -1179,11 +1179,11 @@ ANY_CHAR (.|[\n]) yymore(); } -"?"|">" { +"?"|"%"|">" { yymore(); } -[^\n\r?>]+ { +[^\n\r?%>]+ { yymore(); } @@ -1196,13 +1196,17 @@ ANY_CHAR (.|[\n]) return T_COMMENT; } -"?>" { - zendlval->value.str.val = yytext; /* no copying - intentional */ - zendlval->value.str.len = yyleng; - zendlval->type = IS_STRING; - yyless(yyleng-2); - BEGIN(ST_IN_SCRIPTING); - return T_COMMENT; +"?>"|"%>" { + if(CG(asp_tags) || yytext[yyleng-2] != '%') { /* asp comment? */ + zendlval->value.str.val = yytext; /* no copying - intentional */ + zendlval->value.str.len = yyleng; + zendlval->type = IS_STRING; + yyless(yyleng-2); + BEGIN(ST_IN_SCRIPTING); + return T_COMMENT; + } else { + yymore(); + } } "/*" { -- 2.40.0