]> granicus.if.org Git - php/commitdiff
Fix inconsistencies with here-docs implementation
authorZeev Suraski <zeev@php.net>
Mon, 22 Nov 1999 17:11:36 +0000 (17:11 +0000)
committerZeev Suraski <zeev@php.net>
Mon, 22 Nov 1999 17:11:36 +0000 (17:11 +0000)
Zend/zend-scanner.l

index 3960c5692d19c1ad25575772d7dcbc9a9113c4d9..d08b1864dc188cc9eea0dde1833c8deeb8860bbf 100644 (file)
@@ -1441,7 +1441,7 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
        return T_CHARACTER;
 }
 
-<ST_DOUBLE_QUOTES,ST_BACKQUOTE>"\\". {
+<ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC>"\\". {
        switch (yytext[1]) {
                case 'n':
                        zendlval->value.chval='\n';
@@ -1472,12 +1472,6 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
 }
 
 
-<ST_HEREDOC>"\\$"|"\\{" {
-       zendlval->value.chval = yytext[1];
-       return T_CHARACTER;
-}
-
-
 <ST_HEREDOC>["'`]+ {
        zendlval->value.str.val = (char *) estrndup(yytext, yyleng);
        zendlval->value.str.len = yyleng;
@@ -1515,6 +1509,6 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
        
 
 
-<ST_IN_SCRIPTING,INITIAL,ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_SINGLE_QUOTE>. {
+<ST_IN_SCRIPTING,INITIAL,ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_SINGLE_QUOTE,ST_HEREDOC>. {
        zend_error(E_COMPILE_WARNING,"Unexpected character in input:  '%c' (ASCII=%d) state=%d",yytext[0],yytext[0],YYSTATE);
 }