]> Pileus Git - ~andy/fetchmail/commitdiff
The big lexer fix.
authorEric S. Raymond <esr@thyrsus.com>
Sat, 31 Jul 1999 21:41:50 +0000 (21:41 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 31 Jul 1999 21:41:50 +0000 (21:41 -0000)
svn path=/trunk/; revision=2519

NEWS
fetchmail-FAQ.html
rcfile_l.l

diff --git a/NEWS b/NEWS
index 1493879316b7c742b2242a232b2081b2dc949ec7..639152f9ce33cdb29589f338728ae9bbbe51c967 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,7 +13,9 @@ fetchmail-5.0.6 ():
 * Russion internationalization support (but I couldn't read the contributor
   name in the headers!)
 * Update of the French internationalization support by Guy Brand.
-* Fix for the `nokeep' problem by Robert de Bath.
+* Lexer fix for the `nokeep' problem by Robert de Bath.
+* Lexer states added to tell the lexer to return a string after a
+  `username' or `password' keyword, courtesy of Brian Boutel.
 * Interface option fix from Bill Currie.
 
 There are 267 people on fetchmail-friends and 420 on fetchmail-announce.
index 1b9693fe03ebccbe4b56e97aa9f67528c0f328a9..5aaecd29f8c07f57e8039703e56e62701945d7f3 100644 (file)
@@ -10,7 +10,7 @@
 <table width="100%" cellpadding=0><tr>
 <td width="30%">Back to <a href="index.html">Fetchmail Home Page</a>
 <td width="30%" align=center>To <a href="/~esr/sitemap.html">Site Map</a>
-<td width="30%" align=right>$Date: 1999/07/31 20:44:54 $
+<td width="30%" align=right>$Date: 1999/07/31 21:41:50 $
 </table>
 <HR>
 <H1>Frequently Asked Questions About Fetchmail</H1>
@@ -666,27 +666,26 @@ Do similarly for any `<CODE>monitor</CODE>' or `<CODE>batchlimit</CODE>' options
 <hr>
 <h2><a name="F2">F2. The .fetchmailrc parser won't accept my all-numeric user name.</a></h2>
 
-So put string quotes around it. :-)<p>
+Either upgrade to a post-5.0.5 fetchmail or put string quotes around it. :-)<p>
 
-The configuration file parser treats any all-numeric token as a
-number, which will confuse it when it's expecting a name.  String
-quoting forces the token's class.<p>
+The configuration file parser in older fetchmail versions treated any
+all-numeric token as a number, which confused it when it was
+expecting a name.  String quoting forces the token's class.<p>
+
+The lexical analyzer in 5.0.6 and beyond is smarter and assumes
+any token following "username" or "password" is a string.
 
 <hr>
 <h2><a name="F3">F3. The .fetchmailrc parser won't accept my host or username beginning with `no'.</a></h2>
 
-You're caught in an unfortunate crack between the newer-style syntax
-for negated options (`no keep', `no rewrite' etc.) and the older style
-run-on syntax (`nokeep', `norewrite' etc.).<p>
+See <a href="#F2">F2</a> You're caught in an unfortunate crack between
+the newer-style syntax for negated options (`no keep', `no rewrite'
+etc.) and the older style run-on syntax (`nokeep', `norewrite'
+etc.).<p>
 
-You can work around this easily.  Just put string quotes around your
+Upgrade to a 5.0.6 or later fetchmail, or put string quotes around your
 token.<p>
 
-I haven't fixed this because there is no good fix for it short of
-implementing a token pushback stack in the lexer.  That's more
-additional complexity than I'm willing to add to banish a very
-marginal bug with an easy workaround.<p>
-
 <hr>
 <h2><a name="F4">F4. I'm migrating from popclient.  How do I need to modify my .poprc?</a></h2>
 
@@ -2428,7 +2427,7 @@ inactivity timeout.<p>
 <table width="100%" cellpadding=0><tr>
 <td width="30%">Back to <a href="index.html">Fetchmail Home Page</a>
 <td width="30%" align=center>To <a href="/~esr/sitemap.html">Site Map</a>
-<td width="30%" align=right>$Date: 1999/07/31 20:44:54 $
+<td width="30%" align=right>$Date: 1999/07/31 21:41:50 $
 </table>
 
 <P><ADDRESS>Eric S. Raymond <A HREF="mailto:esr@thyrsus.com">&lt;esr@snark.thyrsus.com&gt;</A></ADDRESS>
index e5c4fba9de201596b62a94e3abc9a58fc6960037..365c6a0517813561407a7bb07d91d659583268d3 100644 (file)
@@ -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         |