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,
34 yyin = fopen(configfile, "r");
36 yy_fatal_error("Could not open the configuration file.");
43 %option case-insensitive
50 QSTRING \"[^"\n]+[\"\n]
53 {QSTRING} {yytext[yyleng-1] = 0; yylval.text = yytext+1; return QSTRING;}
54 {NUMBER} {yylval.num = strtoul(yytext, NULL, 10); return NUMBER;}
59 administrator return ADMIN;
60 general return GENERAL;
61 location return LOCATION;
62 contact return CONTACT;
63 connect return CONNECT;
65 pingfreq return PINGFREQ;
66 connectfreq return CONNECTFREQ;
67 maxlinks return MAXLINKS;
73 seconds return SECONDS;
74 minutes return MINUTES;
80 decades return DECADES;
84 kilobytes return KBYTES;
87 megabytes return MBYTES;
90 gigabytes return GBYTES;
93 terabytes return TBYTES;
101 uworld return UWORLD;
102 operator return OPER;
107 hidden return HIDDEN;
109 numeric return NUMERIC;
112 description return DESCRIPTION;
113 client return CLIENT;
115 realname return REAL;
116 reason return REASON;
123 quarantine return QUARANTINE;
125 timeout return TIMEOUT;
126 features return FEATURES;
127 channel return CHANNEL;
128 chan_limit return TPRIV_CHAN_LIMIT;
129 mode_lchan return TPRIV_MODE_LCHAN;
130 deop_lchan return TPRIV_DEOP_LCHAN;
131 walk_lchan return TPRIV_WALK_LCHAN;
132 local_kill return TPRIV_LOCAL_KILL;
133 rehash return TPRIV_REHASH;
134 restart return TPRIV_RESTART;
135 die return TPRIV_DIE;
136 gline return TPRIV_GLINE;
137 local_gline return TPRIV_LOCAL_GLINE;
138 local_jupe return TPRIV_LOCAL_JUPE;
139 opmode return TPRIV_OPMODE;
140 set return TPRIV_SET;
141 whox return TPRIV_WHOX;
142 badchan return TPRIV_BADCHAN;
143 local_badchan return TPRIV_LOCAL_BADCHAN;
144 see_chan return TPRIV_SEE_CHAN;
145 show_invis return TPRIV_SHOW_INVIS;
146 show_all_invis return TPRIV_SHOW_ALL_INVIS;
147 propagate return TPRIV_PROPAGATE;
148 unlimit_query return TPRIV_UNLIMIT_QUERY;
149 display return TPRIV_DISPLAY;
150 see_opers return TPRIV_SEE_OPERS;
151 wide_gline return TPRIV_WIDE_GLINE;
152 force_opmode return TPRIV_FORCE_OPMODE;
153 force_local_opmode return TPRIV_FORCE_LOCAL_OPMODE;
154 pseudo return PSEUDO;
155 prepend return PREPEND;
156 usermode return USERMODE;