From cef68337ca0c5b94280fafe3b547994a2a65adef Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 1 Oct 1996 17:43:13 +0000 Subject: Fix for the fact that Bison ignores zero-value tokens. svn path=/trunk/; revision=191 --- rcfile_l.l | 20 ++++++++++---------- rcfile_y.y | 26 +++++++++++++------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/rcfile_l.l b/rcfile_l.l index 5cfdc081..173042a9 100644 --- a/rcfile_l.l +++ b/rcfile_l.l @@ -30,16 +30,16 @@ user(name)? { return KW_USERNAME; } pass(word)? { return KW_PASSWORD; } remote(folder)? { return KW_REMOTEFOLDER; } smtp(host)? { return KW_SMTPHOST; } -keep { yylval.flag = TRUE; return KW_KEEP; } -flush { yylval.flag = TRUE; return KW_FLUSH; } -fetchall { yylval.flag = TRUE; return KW_FETCHALL; } -rewrite { yylval.flag = TRUE; return KW_REWRITE; } -skip { yylval.flag = TRUE; return KW_SKIP; } -nokeep { yylval.flag = FALSE; return KW_KEEP; } -noflush { yylval.flag = FALSE; return KW_FLUSH; } -nofetchall { yylval.flag = FALSE; return KW_FETCHALL; } -norewrite { yylval.flag = FALSE; return KW_REWRITE; } -noskip { yylval.flag = FALSE; return KW_SKIP; } +keep { yylval.flag = FLAG_TRUE; return KW_KEEP; } +flush { yylval.flag = FLAG_TRUE; return KW_FLUSH; } +fetchall { yylval.flag = FLAG_TRUE; return KW_FETCHALL; } +rewrite { yylval.flag = FLAG_TRUE; return KW_REWRITE; } +skip { yylval.flag = FLAG_TRUE; return KW_SKIP; } +nokeep { yylval.flag = FLAG_FALSE; return KW_KEEP; } +noflush { yylval.flag = FLAG_FALSE; return KW_FLUSH; } +nofetchall { yylval.flag = FLAG_FALSE; return KW_FETCHALL; } +norewrite { yylval.flag = FLAG_FALSE; return KW_REWRITE; } +noskip { yylval.flag = FLAG_FALSE; return KW_SKIP; } port { return KW_PORT; } (auto)|(AUTO) { yylval.proto = P_AUTO; return KW_PROTO; } diff --git a/rcfile_y.y b/rcfile_y.y index 4de27f9c..196433a5 100644 --- a/rcfile_y.y +++ b/rcfile_y.y @@ -36,8 +36,8 @@ int yydebug; /* in case we didn't generate with -- debug */ %token KW_KEEP KW_FLUSH KW_FETCHALL KW_REWRITE KW_PORT KW_SKIP /* these are actually used by the lexer */ -%token TRUE 1 -%token FALSE 0 +%token FLAG_TRUE 2 +%token FLAG_FALSE 1 %% @@ -62,17 +62,17 @@ server_options: serv_option_clause ; serv_option_clause: - KW_PROTOCOL KW_PROTO {prc_setproto($2);} - | KW_USERNAME PARAM_STRING {prc_remotename($2);} - | KW_PASSWORD PARAM_STRING {prc_setpassword($2);} - | KW_REMOTEFOLDER PARAM_STRING {prc_setremote($2);} - | KW_SMTPHOST PARAM_STRING {prc_setsmtphost($2);} - | KW_KEEP {prc_setkeep($1);} - | KW_FLUSH {prc_setflush($1);} - | KW_FETCHALL {prc_setfetchall($1);} - | KW_REWRITE {prc_setrewrite($1);} - | KW_SKIP {prc_setskip($1);} - | KW_PORT PARAM_STRING {prc_setport($2);} + KW_PROTOCOL KW_PROTO {prc_setproto($2);} + | KW_USERNAME PARAM_STRING {prc_remotename($2);} + | KW_PASSWORD PARAM_STRING {prc_setpassword($2);} + | KW_REMOTEFOLDER PARAM_STRING {prc_setremote($2);} + | KW_SMTPHOST PARAM_STRING {prc_setsmtphost($2);} + | KW_KEEP {prc_setkeep($1==FLAG_TRUE);} + | KW_FLUSH {prc_setflush($1==FLAG_TRUE);} + | KW_FETCHALL {prc_setfetchall($1==FLAG_TRUE);} + | KW_REWRITE {prc_setrewrite($1==FLAG_TRUE);} + | KW_SKIP {prc_setskip($1==FLAG_TRUE);} + | KW_PORT PARAM_STRING {prc_setport($2);} ; %% -- cgit v1.2.3