]> granicus.if.org Git - php/commitdiff
- Use yyless() instead of unput() where possible. I'll erase the commented
authorAndi Gutmans <andi@php.net>
Fri, 23 Apr 1999 06:14:06 +0000 (06:14 +0000)
committerAndi Gutmans <andi@php.net>
Fri, 23 Apr 1999 06:14:06 +0000 (06:14 +0000)
  out code in a day or so.

Zend/zend-scanner.l

index 9f0813a907770940a1617dbd091ee464c367f1bd..49239c7ccc3675e188f1ec8bfb99731e157e62cd 100644 (file)
@@ -617,7 +617,8 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
 }
 
 <LOOKING_FOR_PROPERTY>. {
-       unput(yytext[0]);
+       /*unput(yytext[0]);*/
+       yyless(1);
        yy_pop_state();
 }
 
@@ -1161,9 +1162,10 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
 <DOUBLE_QUOTES,BACKQUOTE,HEREDOC>"$"[^a-zA-Z_\x7f-\xff{] {
        zendlval->value.chval = yytext[0];
        if (yyleng == 2) {
-               unput(yytext[1]);
+               yyless(1);
+               /*unput(yytext[1]);
                yytext[1] = 0;
-               yyleng--;
+               yyleng--;*/
        }
        return T_CHARACTER;     
 }
@@ -1177,7 +1179,8 @@ ESCAPED_AND_WHITESPACE [\n\t\r #'.:;,()|^&+-/*=%!~<>?@]+
 <DOUBLE_QUOTES,BACKQUOTE,HEREDOC>"{$" {
        zendlval->value.chval = yytext[0];
        yy_push_state(IN_SCRIPTING);
-       unput('$');
+       /*unput('$');*/
+       yyless(1);
        return T_CURLY_OPEN;
 }