diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-10-05 19:22:09 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-10-05 19:22:09 +0000 |
commit | d9ce41d61c83e5952fc5bd098528b388ba6da789 (patch) | |
tree | bba6b619616037f189bf161627b0daf2bece856a | |
parent | 0bdf1e2437156de0f50e76eaeb1bc54f5bf8b990 (diff) | |
download | fetchmail-d9ce41d61c83e5952fc5bd098528b388ba6da789.tar.gz fetchmail-d9ce41d61c83e5952fc5bd098528b388ba6da789.tar.bz2 fetchmail-d9ce41d61c83e5952fc5bd098528b388ba6da789.zip |
I think this will allow multiple user specs.
svn path=/trunk/; revision=232
-rw-r--r-- | rcfile_y.y | 80 |
1 files changed, 41 insertions, 39 deletions
@@ -41,45 +41,47 @@ int yydebug; /* in case we didn't generate with -- debug */ %% -rcfile: - /* empty */ - | statement_list - ; - -statement_list: - statement - | statement_list statement - ; - -statement: - define_server {prc_register(); prc_reset();} - ; - -define_server: KW_SERVER PARAM_STRING server_options {prc_setserver($2);} - | KW_SERVER PARAM_STRING {prc_setserver($2);} - | KW_DEFAULTS server_options {prc_setserver("defaults");} - ; - -server_options: serv_option_clause - | server_options serv_option_clause - ; - -serv_option_clause: - KW_PROTOCOL KW_PROTO {prc_setproto($2);} - | 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);} - | 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);} - | KW_PORT PARAM_STRING {prc_setport($2);} - ; - +rcfile : /* empty */ + | statement_list + ; + +statement_list : statement + | statement_list statement + ; + +statement : define_server serverspecs userspecs + {prc_register(); prc_reset();} + ; + +define_server : KW_SERVER PARAM_STRING {prc_setserver($2);} + | KW_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);} + ; + +userspecs : /* EMPTY */ + | userspecs 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);} + | 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);} + ; %% yyerror (s) |