From b48176ac1fc780e25f19222aa73417e956074bc7 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 8 Oct 1996 07:04:50 +0000 Subject: More English-like token values. svn path=/trunk/; revision=247 --- rcfile_y.y | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) (limited to 'rcfile_y.y') diff --git a/rcfile_y.y b/rcfile_y.y index a7464eb1..ccde88e8 100644 --- a/rcfile_y.y +++ b/rcfile_y.y @@ -29,11 +29,10 @@ int yydebug; /* in case we didn't generate with -- debug */ char *sval; } -%token KW_SERVER KW_PROTOCOL KW_LOCALNAME KW_USERNAME KW_PASSWORD -%token KW_FOLDER KW_SMTPHOST KW_MDA KW_DEFAULTS -%token KW_PROTO -%token PARAM_STRING -%token KW_KEEP KW_FLUSH KW_FETCHALL KW_REWRITE KW_PORT KW_SKIP +%token SERVER PROTOCOL LOCALNAME USERNAME PASSWORD FOLDER SMTPHOST MDA DEFAULTS +%token PROTO +%token STRING +%token KEEP FLUSH FETCHALL REWRITE PORT SKIP /* these are actually used by the lexer */ %token FLAG_TRUE 2 @@ -52,19 +51,19 @@ statement_list : statement statement : define_server serverspecs userspecs ; -define_server : KW_SERVER PARAM_STRING {prc_setserver($2);} - | KW_DEFAULTS {prc_setserver("defaults");} +define_server : SERVER STRING {prc_setserver($2);} + | DEFAULTS {prc_setserver("defaults");} ; serverspecs : /* EMPTY */ | serverspecs serv_option ; -serv_option : KW_PROTOCOL KW_PROTO {prc_setproto($2);} - | KW_PORT PARAM_STRING {prc_setport($2);} +serv_option : PROTOCOL PROTO {prc_setproto($2);} + | PORT STRING {prc_setport($2);} ; -/* the first and only the first user spec may omit the KW_USERNAME part */ +/* the first and only the first user spec may omit the USERNAME part */ userspecs : user1opts {prc_register(); prc_reset();} | user1opts explicits {prc_register(); prc_reset();} | explicits @@ -74,7 +73,7 @@ explicits : userdef {prc_register(); prc_reset();} | explicits userdef {prc_register(); prc_reset();} ; -userdef : KW_USERNAME PARAM_STRING user0opts {prc_setremote($2);} +userdef : USERNAME STRING user0opts {prc_setremote($2);} ; user0opts : /* EMPTY */ @@ -85,17 +84,17 @@ user1opts : user_option | user1opts user_option ; -user_option : KW_LOCALNAME PARAM_STRING {prc_setlocal($2);} - | KW_PASSWORD PARAM_STRING {prc_setpassword($2);} - | KW_FOLDER PARAM_STRING {prc_setfolder($2);} - | KW_SMTPHOST PARAM_STRING {prc_setsmtphost($2);} - | KW_MDA PARAM_STRING {prc_setmda($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);} +user_option : LOCALNAME STRING {prc_setlocal($2);} + | PASSWORD STRING {prc_setpassword($2);} + | FOLDER STRING {prc_setfolder($2);} + | SMTPHOST STRING {prc_setsmtphost($2);} + | MDA STRING {prc_setmda($2);} + + | KEEP {prc_setkeep($1==FLAG_TRUE);} + | FLUSH {prc_setflush($1==FLAG_TRUE);} + | FETCHALL {prc_setfetchall($1==FLAG_TRUE);} + | REWRITE {prc_setrewrite($1==FLAG_TRUE);} + | SKIP {prc_setskip($1==FLAG_TRUE);} ; %% -- cgit v1.2.3