2 * ircd_parser.y: A yacc/bison parser for ircd config files.
3 * This is part of ircu, an Internet Relay Chat server.
4 * The contents of this file are Copyright(C) 2001 by Andrew Miller, the
5 * ircd-hybrid team and the ircu team.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
24 extern int conf_fd, lineno;
28 /* Just stop the lexer at EOF or error. */
29 #define YY_INPUT(buf,result,max_size) \
30 if ((result = read(conf_fd, buf, max_size)) <= 0) \
34 %option case-insensitive
40 QSTRING \"[^"\n]+[\"\n]
43 {QSTRING} {yytext[yyleng-1] = 0; yylval.text = yytext+1; return QSTRING;}
44 {NUMBER} {yylval.num = strtoul(yytext, NULL, 10); return NUMBER;}
49 administrator return ADMIN;
50 general return GENERAL;
51 location return LOCATION;
52 contact return CONTACT;
53 connect return CONNECT;
55 pingfreq return PINGFREQ;
56 connectfreq return CONNECTFREQ;
57 maxlinks return MAXLINKS;
63 seconds return SECONDS;
64 minutes return MINUTES;
70 decades return DECADES;
74 kilobytes return KBYTES;
77 megabytes return MBYTES;
80 gigabytes return GBYTES;
83 terabytes return TBYTES;
99 numeric return NUMERIC;
102 description return DESCRIPTION;
103 client return CLIENT;
105 realname return REAL;
106 reason return REASON;
113 features return FEATURES;