]> Pileus Git - ~andy/fetchmail/commitdiff
Fix broken parsing.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 1 Aug 1999 02:06:04 +0000 (02:06 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 1 Aug 1999 02:06:04 +0000 (02:06 -0000)
svn path=/trunk/; revision=2521

rcfile_l.l

index 365c6a0517813561407a7bb07d91d659583268d3..b7f2294902edd93aebb6b2bbb311fc1783d5c4dd 100644 (file)
@@ -23,7 +23,26 @@ int prc_lineno = 1;
 
 %%
 
-<NAME>[^=;:, \t\r\n\"\']+      {
+\"[^\"]*\"     {
+                       char buf[MSGBUFSIZE];
+
+                       yytext[strlen(yytext)-1] = '\0';
+                       escapes(yytext+1, buf);
+                       yylval.sval = (char *) xstrdup(buf);
+                        BEGIN(0);
+                       return STRING;
+               }
+\'[^\']*\'     {
+                       char buf[MSGBUFSIZE];
+
+                       yytext[strlen(yytext)-1] = '\0';
+                       escapes(yytext+1, buf);
+                       yylval.sval = (char *) xstrdup(buf);
+                        BEGIN(0);
+                       return STRING;
+               }
+
+<NAME>[^=;:, \t\r\n]+  {
                        char buf[MSGBUFSIZE];
 
                        escapes(yytext, buf);
@@ -142,32 +161,10 @@ options           {/* EMPTY */}
 (etrn)|(ETRN)   { yylval.proto = P_ETRN;  return PROTO; }
 (kpop)|(KPOP)  { return KPOP; }
 
-remote(folder)? {
-               fprintf(stderr, 
-                       "fetchmail: `remote' keyword is gone, use `folder'\n");
-               }
-
-
 (#.*)?\\?\n    { prc_lineno++; }   /* newline is ignored */
 
 [0-9]+         { yylval.number = atoi(yytext); return NUMBER; }
 
-\"[^\"]*\"     {
-                       char buf[MSGBUFSIZE];
-
-                       yytext[strlen(yytext)-1] = '\0';
-                       escapes(yytext+1, buf);
-                       yylval.sval = (char *) xstrdup(buf);
-                       return STRING;
-               }
-\'[^\']*\'     {
-                       char buf[MSGBUFSIZE];
-
-                       yytext[strlen(yytext)-1] = '\0';
-                       escapes(yytext+1, buf);
-                       yylval.sval = (char *) xstrdup(buf);
-                       return STRING;
-               }
 [^=;:, \t\r\n]+        {
                        char buf[MSGBUFSIZE];