aboutsummaryrefslogtreecommitdiffstats
path: root/rcfile_y.y
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-10-06 04:19:46 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-10-06 04:19:46 +0000
commitf5b84d19652ce18be464d6009c153320d61b989b (patch)
treee9620d29d380508ffda716c00913fb4ac7320a84 /rcfile_y.y
parentd9ce41d61c83e5952fc5bd098528b388ba6da789 (diff)
downloadfetchmail-f5b84d19652ce18be464d6009c153320d61b989b.tar.gz
fetchmail-f5b84d19652ce18be464d6009c153320d61b989b.tar.bz2
fetchmail-f5b84d19652ce18be464d6009c153320d61b989b.zip
Multiple users per entry works now.
svn path=/trunk/; revision=233
Diffstat (limited to 'rcfile_y.y')
-rw-r--r--rcfile_y.y23
1 files changed, 19 insertions, 4 deletions
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);}