From f5b84d19652ce18be464d6009c153320d61b989b Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 6 Oct 1996 04:19:46 +0000 Subject: Multiple users per entry works now. svn path=/trunk/; revision=233 --- rcfile_y.y | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'rcfile_y.y') diff --git a/rcfile_y.y b/rcfile_y.y index 97f9889d..a7464eb1 100644 --- a/rcfile_y.y +++ b/rcfile_y.y @@ -50,7 +50,6 @@ statement_list : statement ; statement : define_server serverspecs userspecs - {prc_register(); prc_reset();} ; define_server : KW_SERVER PARAM_STRING {prc_setserver($2);} @@ -65,12 +64,28 @@ serv_option : KW_PROTOCOL KW_PROTO {prc_setproto($2);} | KW_PORT PARAM_STRING {prc_setport($2);} ; -userspecs : /* EMPTY */ - | userspecs user_option +/* the first and only the first user spec may omit the KW_USERNAME part */ +userspecs : user1opts {prc_register(); prc_reset();} + | user1opts explicits {prc_register(); prc_reset();} + | explicits + ; + +explicits : userdef {prc_register(); prc_reset();} + | explicits userdef {prc_register(); prc_reset();} + ; + +userdef : KW_USERNAME PARAM_STRING user0opts {prc_setremote($2);} + ; + +user0opts : /* EMPTY */ + | user0opts user_option + ; + +user1opts : user_option + | user1opts user_option ; user_option : KW_LOCALNAME PARAM_STRING {prc_setlocal($2);} - | KW_USERNAME PARAM_STRING {prc_setremote($2);} | KW_PASSWORD PARAM_STRING {prc_setpassword($2);} | KW_FOLDER PARAM_STRING {prc_setfolder($2);} | KW_SMTPHOST PARAM_STRING {prc_setsmtphost($2);} -- cgit v1.2.3