From: Andi Gutmans Date: Thu, 6 Jul 2000 16:19:36 +0000 (+0000) Subject: - Fix problem with newlines not being recognized under certain conditions X-Git-Tag: PRE_METHOD_CALL_SEPERATE_FIX_PATCH~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45ca7ec17d7d9cc0f57f89a403a60064e3ddbd25;p=php - Fix problem with newlines not being recognized under certain conditions --- diff --git a/Zend/zend-scanner.l b/Zend/zend-scanner.l index 7d3c8593e6..e3a2b635e1 100644 --- a/Zend/zend-scanner.l +++ b/Zend/zend-scanner.l @@ -741,6 +741,7 @@ TABS_AND_SPACES [ \t]* TOKENS [;:,.\[\]()|^&+-/*=%!~$<>?@] ENCAPSED_TOKENS [\[\]{}$] ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+ +ANY_CHAR (.|[\n]) %option noyylineno %option noyywrap @@ -879,7 +880,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+ return T_STRING; } -. { +{ANY_CHAR} { /*unput(yytext[0]);*/ yyless(0); yy_pop_state(); @@ -1122,7 +1123,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+ } -. { +{ANY_CHAR} { /*unput(yytext[0]);*/ yyless(0); yy_pop_state(); @@ -1618,7 +1619,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+ return T_CHARACTER; } -"\\". { +"\\"{ANY_CHAR} { switch (yytext[1]) { case 'n': zendlval->value.lval = (long) '\n'; @@ -1686,6 +1687,6 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+ -. { +{ANY_CHAR} { zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d",yytext[0],yytext[0],YYSTATE); }