2 /* Copyright 1993-95 by Carl Harris, Jr. Copyright 1996 by Eric S. Raymond
4 * For license terms, see the file COPYING in this directory.
7 /***********************************************************************
10 programmer: Carl Harris, ceharris@mal.com
11 Extensively hacked and fixed by esr.
12 description: .poprc parser
14 ***********************************************************************/
18 extern char *prc_pathname;
19 extern int prc_lineno;
20 extern int prc_errflag;
23 int yydebug; /* in case we didn't generate with -- debug */
32 %token KW_SERVER KW_PROTOCOL KW_USERNAME KW_PASSWORD
33 %token KW_REMOTEFOLDER KW_LOCALFOLDER KW_MDA KW_EOL KW_DEFAULTS
34 %token <proto> PROTO_POP2 PROTO_POP3 PROTO_IMAP PROTO_APOP PROTO_RPOP
35 %token <sval> PARAM_STRING
36 %token <flag> KW_KEEP KW_FLUSH KW_FETCHALL
45 rcline: statement KW_EOL
49 | define_server {prc_register(); prc_reset();}
52 define_server: KW_SERVER PARAM_STRING server_options {prc_setserver($2);}
53 | KW_SERVER PARAM_STRING {prc_setserver($2);}
54 | KW_DEFAULTS server_options {prc_setserver("defaults");}
57 server_options: serv_option_clause
58 | server_options serv_option_clause
62 KW_PROTOCOL proto {prc_setproto($2);}
63 | KW_USERNAME PARAM_STRING {prc_setusername($2);}
64 | KW_PASSWORD PARAM_STRING {prc_setpassword($2);}
65 | KW_REMOTEFOLDER PARAM_STRING {prc_setremote($2);}
66 | KW_LOCALFOLDER PARAM_STRING {prc_setlocal($2);}
67 | KW_MDA PARAM_STRING {prc_setmda($2);}
68 | KW_KEEP {prc_setkeep($1);}
69 | KW_FLUSH {prc_setflush($1);}
70 | KW_FETCHALL {prc_setfetchall($1);}
86 fprintf(stderr,"%s line %d: %s at %s\n", prc_pathname, prc_lineno, s, yytext);