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;
124 features return FEATURES;
125 channel return CHANNEL;
126 bypass_local_channel_limits return TPRIV_CHAN_LIMIT;
127 set_local_channel_modes return TPRIV_MODE_LCHAN;
128 protected_local_channel return TPRIV_DEOP_LCHAN;
129 bypass_join_local_channels return TPRIV_WALK_LCHAN;
130 global_kill return TPRIV_KILL;
131 local_kill return TPRIV_LOCAL_KILL;
132 rehash return TPRIV_REHASH;
133 restart return TPRIV_RESTART;
134 die return TPRIV_DIE;
135 gline return TPRIV_GLINE;
136 local_gline return TPRIV_LOCAL_GLINE;
137 jupe_server return TPRIV_JUPE;
138 local_jupe_server return TPRIV_LOCAL_JUPE;
139 hack_channel_modes return TPRIV_OPMODE;
140 change_settings return TPRIV_SET;
141 extended_who_information return TPRIV_WHOX;
142 gline_channels return TPRIV_BADCHAN;
143 local_gline_channels return TPRIV_LOCAL_BADCHAN;
144 see_private_channels return TPRIV_SEE_CHAN;
145 see_invisible_users return TPRIV_SHOW_INVIS;
146 list_all_invisible_users return TPRIV_SHOW_ALL_INVIS;
147 globally_opered return TPRIV_PROPAGATE;
148 unlimited_who_queries return TPRIV_UNLIMIT_QUERY;
149 oper_status_display return TPRIV_DISPLAY;
150 see_other_opers return TPRIV_SEE_OPERS;
151 wide_glines return TPRIV_WIDE_GLINE;