aboutsummaryrefslogtreecommitdiffstats
path: root/rcfile_l.l
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1999-07-31 21:41:50 +0000
committerEric S. Raymond <esr@thyrsus.com>1999-07-31 21:41:50 +0000
commit72fc2c255f364507fbc87717cd54b9541f2f5189 (patch)
tree9b739f816b027ba8ee891e0ae064904f21166b3d /rcfile_l.l
parent79739caa154403260496d3b0c33f47ef0cf21447 (diff)
downloadfetchmail-72fc2c255f364507fbc87717cd54b9541f2f5189.tar.gz
fetchmail-72fc2c255f364507fbc87717cd54b9541f2f5189.tar.bz2
fetchmail-72fc2c255f364507fbc87717cd54b9541f2f5189.zip
The big lexer fix.
svn path=/trunk/; revision=2519
Diffstat (limited to 'rcfile_l.l')
-rw-r--r--rcfile_l.l23
1 files changed, 17 insertions, 6 deletions
diff --git a/rcfile_l.l b/rcfile_l.l
index e5c4fba9..365c6a05 100644
--- a/rcfile_l.l
+++ b/rcfile_l.l
@@ -19,8 +19,19 @@ int prc_lineno = 1;
%a 4000
%p 3000
+%s NAME
+
%%
+<NAME>[^=;:, \t\r\n\"\']+ {
+ char buf[MSGBUFSIZE];
+
+ escapes(yytext, buf);
+ yylval.sval = (char *) xstrdup(buf);
+ BEGIN(0);
+ return STRING;
+ }
+
set { return SET; }
logfile { return LOGFILE; }
idfile { return IDFILE; }
@@ -50,8 +61,8 @@ timeout { return TIMEOUT;}
envelope { return ENVELOPE; }
qvirtual { return QVIRTUAL; }
-user(name)? { return USERNAME; }
-pass(word)? { return PASSWORD; }
+user(name)? {BEGIN(NAME); return USERNAME; }
+pass(word)? {BEGIN(NAME); return PASSWORD; }
folder(s)? { return FOLDER; }
smtp(host)? { return SMTPHOST; }
smtpaddress { return SMTPADDRESS; }
@@ -71,12 +82,12 @@ fetchlimit { return FETCHLIMIT; }
expunge { return EXPUNGE; }
properties { return PROPERTIES; }
-is { return IS; }
+is { BEGIN(NAME); return IS; }
here { return HERE; }
there { return THERE; }
-to { return TO; }
-= { return MAP; }
-"*" { return WILDCARD; }
+to { BEGIN(NAME); return TO; }
+= { BEGIN(NAME); return MAP; }
+"*" { BEGIN(0); return WILDCARD; }
nobouncemail |
nouidl |