diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-02-17 04:15:48 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-02-17 04:15:48 +0000 |
commit | 1bf8bb4b2751ef3d4007221cbe0e9bc39de34117 (patch) | |
tree | 454b81fb5ed405fc4dfab262ea9495f37dc04f49 /rcfile_y.y | |
parent | 39a1e45b96f6dd43acf3692c12e9ed340a9431c1 (diff) | |
download | fetchmail-1bf8bb4b2751ef3d4007221cbe0e9bc39de34117.tar.gz fetchmail-1bf8bb4b2751ef3d4007221cbe0e9bc39de34117.tar.bz2 fetchmail-1bf8bb4b2751ef3d4007221cbe0e9bc39de34117.zip |
Pull negation into the grammar, simplifying the lexer.
svn path=/trunk/; revision=892
Diffstat (limited to 'rcfile_y.y')
-rw-r--r-- | rcfile_y.y | 26 |
1 files changed, 17 insertions, 9 deletions
@@ -36,7 +36,6 @@ static void user_reset(); %union { int proto; - int flag; int number; char *sval; } @@ -49,7 +48,7 @@ static void user_reset(); %token <proto> PROTO %token <sval> STRING %token <number> NUMBER -%token <flag> KEEP FLUSH FETCHALL REWRITE STRIPCR DNS PORT RECEIVED +%token NO KEEP FLUSH FETCHALL REWRITE STRIPCR DNS PORT RECEIVED %% @@ -123,8 +122,10 @@ serv_option : AKA alias_list fprintf(stderr, "fetchmail: monitor option is only supported under Linux\n"); #endif /* linux */ } - | DNS {current.server.dns = $1;} - | RECEIVED {current.server.received = $1;} + | DNS {current.server.dns = FLAG_TRUE;} + | RECEIVED {current.server.received = FLAG_TRUE;} + | NO DNS {current.server.dns = FLAG_FALSE;} + | NO RECEIVED {current.server.received = FLAG_FALSE;} ; /* @@ -188,11 +189,18 @@ user_option : TO localnames HERE | MDA STRING {current.mda = xstrdup($2);} | PRECONNECT STRING {current.preconnect = xstrdup($2);} - | KEEP {current.keep = $1;} - | FLUSH {current.flush = $1;} - | FETCHALL {current.fetchall = $1;} - | REWRITE {current.rewrite = $1;} - | STRIPCR {current.stripcr = $1;} + | KEEP {current.keep = FLAG_TRUE;} + | FLUSH {current.flush = FLAG_TRUE;} + | FETCHALL {current.fetchall = FLAG_TRUE;} + | REWRITE {current.rewrite = FLAG_TRUE;} + | STRIPCR {current.stripcr = FLAG_TRUE;} + + | NO KEEP {current.keep = FLAG_FALSE;} + | NO FLUSH {current.flush = FLAG_FALSE;} + | NO FETCHALL {current.fetchall = FLAG_FALSE;} + | NO REWRITE {current.rewrite = FLAG_FALSE;} + | NO STRIPCR {current.stripcr = FLAG_FALSE;} + | LIMIT NUMBER {current.limit = $2;} | FETCHLIMIT NUMBER {current.fetchlimit = $2;} | BATCHLIMIT NUMBER {current.batchlimit = $2;} |