]> granicus.if.org Git - sudo/commitdiff
added double quote support
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 6 Apr 1996 21:31:29 +0000 (21:31 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 6 Apr 1996 21:31:29 +0000 (21:31 +0000)
parse.lex

index 0e601aedf38df43e487532dbd70587e0aba5fcc5..50d4e1dd270f989f8a72fe3c761d4c3c0a9536c6 100644 (file)
--- a/parse.lex
+++ b/parse.lex
@@ -96,7 +96,7 @@ WORD                  [a-zA-Z0-9_-]+
                            LEXTRACE("\n\t");
                        }                       /* throw away EOL after \ */
 
-<GOTCMND>\\[:\,=\\ \t] {
+<GOTCMND>\\[:\,=\\\" \t] {
                            LEXTRACE("QUOTEDCHAR ");
                            fill_args(yytext + 1, 1, sawspace);
                            sawspace = FALSE;
@@ -120,6 +120,13 @@ WORD                       [a-zA-Z0-9_-]+
                            return(COMMENT);
                        }                       /* return comments */
 
+<GOTCMND>\"[^\n]*\"    {
+                           /* XXX - should be able to span lines? */
+                           LEXTRACE("ARG ");
+                           fill_args(yytext+1, yyleng-2, sawspace);
+                           sawspace = FALSE;
+                       }                       /* quoted command line arg */
+
 <GOTCMND>[^:\,= \t\n#]+ {
                            LEXTRACE("ARG ");
                            fill_args(yytext, yyleng, sawspace);