2 /* Copyright 1993-95 by Carl Harris, Jr.
5 * Distribute freely, except: don't remove my name from the source or
6 * documentation (don't take credit for my work), mark your changes (don't
7 * get me blamed for your possible bugs), don't alter or remove this
8 * notice. May be sold if buildable source is provided to buyer. No
9 * warrantee of any kind, express or implied, is included with this
10 * software; use at your own risk, responsibility for damages (if any) to
11 * anyone resulting from the use of this software rests entirely with the
14 * Send bug reports, bug fixes, enhancements, requests, flames, etc., and
15 * I'll try to keep a version up to date. I can be reached as follows:
16 * Carl Harris <ceharris@mal.com>
20 /***********************************************************************
23 programmer: Carl Harris, ceharris@mal.com
24 description: .poprc parser
27 Revision 1.2 1996/06/26 19:09:01 esr
28 This is what I sent Harris.
30 Revision 1.1 1996/06/24 18:17:24 esr
33 Revision 1.4 1995/08/10 00:32:45 ceharris
34 Preparation for 3.0b3 beta release:
35 - added code for --kill/--keep, --limit, --protocol, --flush
36 options; --pop2 and --pop3 options now obsoleted by --protocol.
37 - added support for APOP authentication, including --with-APOP
38 argument for configure.
39 - provisional and broken support for RPOP
40 - added buffering to SockGets and SockRead functions.
41 - fixed problem of command-line options not being correctly
42 carried into the merged options record.
44 Revision 1.3 1995/08/09 01:33:02 ceharris
45 Version 3.0 beta 2 release.
47 - .poprc functionality
49 - multiple servers on the command line.
51 - Passwords showing up in ps output.
53 Revision 1.2 1995/08/08 01:01:36 ceharris
54 Added GNU-style long options processing.
55 Fixed password in 'ps' output problem.
56 Fixed various RCS tag blunders.
57 Integrated .poprc parser, lexer, etc into Makefile processing.
59 ***********************************************************************/
63 extern char *prc_pathname;
64 extern int prc_lineno;
65 extern int prc_errflag;
68 int yydebug; /* in case we didn't generate with -- debug */
77 %token KW_SERVER KW_PROTOCOL KW_USERNAME KW_PASSWORD
78 %token KW_REMOTEFOLDER KW_LOCALFOLDER KW_MDA KW_EOL KW_DEFAULTS
79 %token <proto> PROTO_POP2 PROTO_POP3 PROTO_IMAP PROTO_APOP PROTO_RPOP
80 %token <sval> PARAM_STRING
81 %token <flag> KW_KEEP KW_FLUSH KW_FETCHALL
90 rcline: statement KW_EOL
94 | define_server {prc_register(); prc_reset();}
97 define_server: KW_SERVER PARAM_STRING server_options {prc_setserver($2);}
98 | KW_SERVER PARAM_STRING {prc_setserver($2);}
99 | KW_DEFAULTS server_options {prc_setserver("defaults");}
102 server_options: serv_option_clause
103 | server_options serv_option_clause
107 KW_PROTOCOL proto {prc_setproto($2);}
108 | KW_USERNAME PARAM_STRING {prc_setusername($2);}
109 | KW_PASSWORD PARAM_STRING {prc_setpassword($2);}
110 | KW_REMOTEFOLDER PARAM_STRING {prc_setremote($2);}
111 | KW_LOCALFOLDER PARAM_STRING {prc_setlocal($2);}
112 | KW_MDA PARAM_STRING {prc_setmda($2);}
113 | KW_KEEP {prc_setkeep($1);}
114 | KW_FLUSH {prc_setflush($1);}
115 | KW_FETCHALL {prc_setfetchall($1);}
131 fprintf(stderr,"%s line %d: %s at %s\n", prc_pathname, prc_lineno, s, yytext);