]> granicus.if.org Git - sudo/commitdiff
Remove us of unput() in favor of yyless() which is cheaper.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 29 Sep 2004 18:29:40 +0000 (18:29 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 29 Sep 2004 18:29:40 +0000 (18:29 +0000)
parse.lex

index c7f8683036165ad29cf7b3ed08c2d1bfc133bf9a..34710e7a6749ffe5971741ef4cb79c458a43a8b3 100644 (file)
--- a/parse.lex
+++ b/parse.lex
@@ -94,6 +94,8 @@ WORD                  ([^#>@!=:,\(\) \t\n\\]|\\[^\n])+
 ENVAR                  ([^#!=, \t\n\\]|\\[^\n])([^#=, \t\n\\]|\\[^\n])*
 DEFVAR                 [a-z_]+
 
+%option nounput
+
 /* XXX - convert GOTRUNAS to exclusive state (GOTDEFS cannot be) */
 %s     GOTRUNAS
 %s     GOTDEFS
@@ -168,7 +170,7 @@ DEFVAR                      [a-z_]+
 
     [#:\,=\n]          {
                            BEGIN INITIAL;
-                           unput(*yytext);
+                           yyless(1);
                            return(COMMAND);
                        }                       /* end of command line args */