diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1999-08-01 02:06:04 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1999-08-01 02:06:04 +0000 |
commit | bf79edd111d44336c4fbf15bb8dfa84203a13882 (patch) | |
tree | 10dd15809d599fa451e0c911f0361acb8c7eef83 /rcfile_l.l | |
parent | 6b17199c52305193a95e810a8f2351691231d278 (diff) | |
download | fetchmail-bf79edd111d44336c4fbf15bb8dfa84203a13882.tar.gz fetchmail-bf79edd111d44336c4fbf15bb8dfa84203a13882.tar.bz2 fetchmail-bf79edd111d44336c4fbf15bb8dfa84203a13882.zip |
Fix broken parsing.
svn path=/trunk/; revision=2521
Diffstat (limited to 'rcfile_l.l')
-rw-r--r-- | rcfile_l.l | 43 |
1 files changed, 20 insertions, 23 deletions
@@ -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]; |