fixed ssl.c bug when ssl backend returns IO_BLOCKED but IO engine doesn't get informe...
[ircu2.10.12-pk.git] / ircd / lex.yy.c
1
2 #line 3 "lex.yy.c"
3
4 #define  YY_INT_ALIGNED short int
5
6 /* A lexical scanner generated by flex */
7
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11 #define YY_FLEX_SUBMINOR_VERSION 35
12 #if YY_FLEX_SUBMINOR_VERSION > 0
13 #define FLEX_BETA
14 #endif
15
16 /* First, we deal with  platform-specific or compiler-specific issues. */
17
18 /* begin standard C headers. */
19 #include <stdio.h>
20 #include <string.h>
21 #include <errno.h>
22 #include <stdlib.h>
23
24 /* end standard C headers. */
25
26 /* flex integer type definitions */
27
28 #ifndef FLEXINT_H
29 #define FLEXINT_H
30
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
34
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36  * if you want the limit (max/min) macros for int types. 
37  */
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
40 #endif
41
42 #include <inttypes.h>
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
49 #else
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t; 
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
56
57 /* Limits of integral types. */
58 #ifndef INT8_MIN
59 #define INT8_MIN               (-128)
60 #endif
61 #ifndef INT16_MIN
62 #define INT16_MIN              (-32767-1)
63 #endif
64 #ifndef INT32_MIN
65 #define INT32_MIN              (-2147483647-1)
66 #endif
67 #ifndef INT8_MAX
68 #define INT8_MAX               (127)
69 #endif
70 #ifndef INT16_MAX
71 #define INT16_MAX              (32767)
72 #endif
73 #ifndef INT32_MAX
74 #define INT32_MAX              (2147483647)
75 #endif
76 #ifndef UINT8_MAX
77 #define UINT8_MAX              (255U)
78 #endif
79 #ifndef UINT16_MAX
80 #define UINT16_MAX             (65535U)
81 #endif
82 #ifndef UINT32_MAX
83 #define UINT32_MAX             (4294967295U)
84 #endif
85
86 #endif /* ! C99 */
87
88 #endif /* ! FLEXINT_H */
89
90 #ifdef __cplusplus
91
92 /* The "const" storage-class-modifier is valid. */
93 #define YY_USE_CONST
94
95 #else   /* ! __cplusplus */
96
97 /* C99 requires __STDC__ to be defined as 1. */
98 #if defined (__STDC__)
99
100 #define YY_USE_CONST
101
102 #endif  /* defined (__STDC__) */
103 #endif  /* ! __cplusplus */
104
105 #ifdef YY_USE_CONST
106 #define yyconst const
107 #else
108 #define yyconst
109 #endif
110
111 /* Returned upon end-of-file. */
112 #define YY_NULL 0
113
114 /* Promotes a possibly negative, possibly signed char to an unsigned
115  * integer for use as an array index.  If the signed char is negative,
116  * we want to instead treat it as an 8-bit unsigned char, hence the
117  * double cast.
118  */
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
120
121 /* Enter a start condition.  This macro really ought to take a parameter,
122  * but we do it the disgusting crufty way forced on us by the ()-less
123  * definition of BEGIN.
124  */
125 #define BEGIN (yy_start) = 1 + 2 *
126
127 /* Translate the current start state into a value that can be later handed
128  * to BEGIN to return to the state.  The YYSTATE alias is for lex
129  * compatibility.
130  */
131 #define YY_START (((yy_start) - 1) / 2)
132 #define YYSTATE YY_START
133
134 /* Action number for EOF rule of a given start state. */
135 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
136
137 /* Special action meaning "start processing a new file". */
138 #define YY_NEW_FILE yyrestart(yyin  )
139
140 #define YY_END_OF_BUFFER_CHAR 0
141
142 /* Size of default input buffer. */
143 #ifndef YY_BUF_SIZE
144 #ifdef __ia64__
145 /* On IA-64, the buffer size is 16k, not 8k.
146  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
147  * Ditto for the __ia64__ case accordingly.
148  */
149 #define YY_BUF_SIZE 32768
150 #else
151 #define YY_BUF_SIZE 16384
152 #endif /* __ia64__ */
153 #endif
154
155 /* The state buf must be large enough to hold one state per character in the main buffer.
156  */
157 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
158
159 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
160 #define YY_TYPEDEF_YY_BUFFER_STATE
161 typedef struct yy_buffer_state *YY_BUFFER_STATE;
162 #endif
163
164 extern int yyleng;
165
166 extern FILE *yyin, *yyout;
167
168 #define EOB_ACT_CONTINUE_SCAN 0
169 #define EOB_ACT_END_OF_FILE 1
170 #define EOB_ACT_LAST_MATCH 2
171
172     #define YY_LESS_LINENO(n)
173     
174 /* Return all but the first "n" matched characters back to the input stream. */
175 #define yyless(n) \
176         do \
177                 { \
178                 /* Undo effects of setting up yytext. */ \
179         int yyless_macro_arg = (n); \
180         YY_LESS_LINENO(yyless_macro_arg);\
181                 *yy_cp = (yy_hold_char); \
182                 YY_RESTORE_YY_MORE_OFFSET \
183                 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
184                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
185                 } \
186         while ( 0 )
187
188 #define unput(c) yyunput( c, (yytext_ptr)  )
189
190 #ifndef YY_TYPEDEF_YY_SIZE_T
191 #define YY_TYPEDEF_YY_SIZE_T
192 typedef size_t yy_size_t;
193 #endif
194
195 #ifndef YY_STRUCT_YY_BUFFER_STATE
196 #define YY_STRUCT_YY_BUFFER_STATE
197 struct yy_buffer_state
198         {
199         FILE *yy_input_file;
200
201         char *yy_ch_buf;                /* input buffer */
202         char *yy_buf_pos;               /* current position in input buffer */
203
204         /* Size of input buffer in bytes, not including room for EOB
205          * characters.
206          */
207         yy_size_t yy_buf_size;
208
209         /* Number of characters read into yy_ch_buf, not including EOB
210          * characters.
211          */
212         int yy_n_chars;
213
214         /* Whether we "own" the buffer - i.e., we know we created it,
215          * and can realloc() it to grow it, and should free() it to
216          * delete it.
217          */
218         int yy_is_our_buffer;
219
220         /* Whether this is an "interactive" input source; if so, and
221          * if we're using stdio for input, then we want to use getc()
222          * instead of fread(), to make sure we stop fetching input after
223          * each newline.
224          */
225         int yy_is_interactive;
226
227         /* Whether we're considered to be at the beginning of a line.
228          * If so, '^' rules will be active on the next match, otherwise
229          * not.
230          */
231         int yy_at_bol;
232
233     int yy_bs_lineno; /**< The line count. */
234     int yy_bs_column; /**< The column count. */
235     
236         /* Whether to try to fill the input buffer when we reach the
237          * end of it.
238          */
239         int yy_fill_buffer;
240
241         int yy_buffer_status;
242
243 #define YY_BUFFER_NEW 0
244 #define YY_BUFFER_NORMAL 1
245         /* When an EOF's been seen but there's still some text to process
246          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
247          * shouldn't try reading from the input source any more.  We might
248          * still have a bunch of tokens to match, though, because of
249          * possible backing-up.
250          *
251          * When we actually see the EOF, we change the status to "new"
252          * (via yyrestart()), so that the user can continue scanning by
253          * just pointing yyin at a new input file.
254          */
255 #define YY_BUFFER_EOF_PENDING 2
256
257         };
258 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
259
260 /* Stack of input buffers. */
261 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
262 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
263 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
264
265 /* We provide macros for accessing buffer states in case in the
266  * future we want to put the buffer states in a more general
267  * "scanner state".
268  *
269  * Returns the top of the stack, or NULL.
270  */
271 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
272                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
273                           : NULL)
274
275 /* Same as previous macro, but useful when we know that the buffer stack is not
276  * NULL or when we need an lvalue. For internal use only.
277  */
278 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
279
280 /* yy_hold_char holds the character lost when yytext is formed. */
281 static char yy_hold_char;
282 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
283 int yyleng;
284
285 /* Points to current character in buffer. */
286 static char *yy_c_buf_p = (char *) 0;
287 static int yy_init = 0;         /* whether we need to initialize */
288 static int yy_start = 0;        /* start state number */
289
290 /* Flag which is used to allow yywrap()'s to do buffer switches
291  * instead of setting up a fresh yyin.  A bit of a hack ...
292  */
293 static int yy_did_buffer_switch_on_eof;
294
295 void yyrestart (FILE *input_file  );
296 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
297 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
298 void yy_delete_buffer (YY_BUFFER_STATE b  );
299 void yy_flush_buffer (YY_BUFFER_STATE b  );
300 void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
301 void yypop_buffer_state (void );
302
303 static void yyensure_buffer_stack (void );
304 static void yy_load_buffer_state (void );
305 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
306
307 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
308
309 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
310 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
311 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
312
313 void *yyalloc (yy_size_t  );
314 void *yyrealloc (void *,yy_size_t  );
315 void yyfree (void *  );
316
317 #define yy_new_buffer yy_create_buffer
318
319 #define yy_set_interactive(is_interactive) \
320         { \
321         if ( ! YY_CURRENT_BUFFER ){ \
322         yyensure_buffer_stack (); \
323                 YY_CURRENT_BUFFER_LVALUE =    \
324             yy_create_buffer(yyin,YY_BUF_SIZE ); \
325         } \
326         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
327         }
328
329 #define yy_set_bol(at_bol) \
330         { \
331         if ( ! YY_CURRENT_BUFFER ){\
332         yyensure_buffer_stack (); \
333                 YY_CURRENT_BUFFER_LVALUE =    \
334             yy_create_buffer(yyin,YY_BUF_SIZE ); \
335         } \
336         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
337         }
338
339 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
340
341 typedef unsigned char YY_CHAR;
342
343 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
344
345 typedef int yy_state_type;
346
347 extern int yylineno;
348
349 int yylineno = 1;
350
351 extern char *yytext;
352 #define yytext_ptr yytext
353
354 static yy_state_type yy_get_previous_state (void );
355 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
356 static int yy_get_next_buffer (void );
357 static void yy_fatal_error (yyconst char msg[]  );
358
359 /* Done after the current pattern has been matched and before the
360  * corresponding action - sets up yytext.
361  */
362 #define YY_DO_BEFORE_ACTION \
363         (yytext_ptr) = yy_bp; \
364         yyleng = (size_t) (yy_cp - yy_bp); \
365         (yy_hold_char) = *yy_cp; \
366         *yy_cp = '\0'; \
367         (yy_c_buf_p) = yy_cp;
368
369 #define YY_NUM_RULES 8
370 #define YY_END_OF_BUFFER 9
371 /* This struct is not used in this scanner,
372    but its presence is necessary. */
373 struct yy_trans_info
374         {
375         flex_int32_t yy_verify;
376         flex_int32_t yy_nxt;
377         };
378 static yyconst flex_int16_t yy_acclist[25] =
379     {   0,
380         9,    7,    8,    3,    7,    8,    6,    8,    7,    8,
381         4,    7,    8,    2,    7,    8,    5,    7,    8,    3,
382         4,    2,    5,    1
383     } ;
384
385 static yyconst flex_int16_t yy_accept[19] =
386     {   0,
387         1,    1,    1,    2,    4,    7,    9,   11,   14,   17,
388        20,   21,   21,   22,   23,   24,   25,   25
389     } ;
390
391 static yyconst flex_int32_t yy_ec[256] =
392     {   0,
393         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
394         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
395         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
396         1,    2,    1,    4,    5,    1,    1,    1,    1,    1,
397         1,    1,    1,    1,    1,    1,    1,    6,    6,    6,
398         6,    6,    6,    6,    6,    6,    6,    1,    1,    1,
399         1,    1,    1,    1,    7,    7,    7,    7,    7,    7,
400         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
401         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
402         1,    1,    1,    1,    7,    1,    7,    7,    7,    7,
403
404         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
405         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
406         7,    7,    1,    1,    1,    1,    1,    1,    1,    1,
407         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
408         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
409         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
410         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
411         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
412         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
413         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
414
415         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
416         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
417         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
418         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
419         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
420         1,    1,    1,    1,    1
421     } ;
422
423 static yyconst flex_int32_t yy_meta[8] =
424     {   0,
425         1,    1,    2,    3,    1,    4,    4
426     } ;
427
428 static yyconst flex_int16_t yy_base[21] =
429     {   0,
430         0,    0,   20,   21,   17,   21,    0,    0,   12,    0,
431        13,    5,    0,    6,    0,   21,   21,    9,   13,    7
432     } ;
433
434 static yyconst flex_int16_t yy_def[21] =
435     {   0,
436        17,    1,   17,   17,   17,   17,   18,   19,   17,   20,
437        17,   18,   19,   17,   20,   17,    0,   17,   17,   17
438     } ;
439
440 static yyconst flex_int16_t yy_nxt[29] =
441     {   0,
442         4,    5,    6,    7,    8,    9,   10,   16,   16,   12,
443        15,   14,   12,   13,   11,   13,   13,   14,   11,   17,
444         3,   17,   17,   17,   17,   17,   17,   17
445     } ;
446
447 static yyconst flex_int16_t yy_chk[29] =
448     {   0,
449         1,    1,    1,    1,    1,    1,    1,   12,   12,   18,
450        20,   14,   18,   19,   11,   19,   19,    9,    5,    3,
451        17,   17,   17,   17,   17,   17,   17,   17
452     } ;
453
454 extern int yy_flex_debug;
455 int yy_flex_debug = 0;
456
457 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
458 static char *yy_full_match;
459 static int yy_lp;
460 #define REJECT \
461 { \
462 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
463 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
464 ++(yy_lp); \
465 goto find_rule; \
466 }
467
468 #define yymore() yymore_used_but_not_detected
469 #define YY_MORE_ADJ 0
470 #define YY_RESTORE_YY_MORE_OFFSET
471 char *yytext;
472 #line 1 "./ircd_lexer.l"
473 /*
474  * ircd_lexer.l: A lexical scanner for ircd config files.
475  * This is part of ircu, an Internet Relay Chat server.
476  * The contents of this file are Copyright(C) 2001 by Andrew Miller, the
477  * ircd-hybrid team and the ircu team.
478  *  This program is free software; you can redistribute it and/or modify
479  *  it under the terms of the GNU General Public License as published by
480  *  the Free Software Foundation; either version 2 of the License, or
481  *  (at your option) any later version.
482  *
483  *  This program is distributed in the hope that it will be useful,
484  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
485  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
486  *  GNU General Public License for more details.
487  *
488  *  You should have received a copy of the GNU General Public License
489  *  along with this program; if not, write to the Free Software
490  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
491  *  USA.
492  * $Id: ircd_lexer.l 1851 2007-11-30 22:10:04Z klmitch $
493  */
494 #line 24 "./ircd_lexer.l"
495 #include <unistd.h>
496 #include <stdio.h>
497 #include <stdlib.h>
498 #include <string.h>
499 #include "config.h"
500 #include "fileio.h"
501 #include "ircd.h"
502 #include "ircd_alloc.h"
503 #include "ircd_string.h"
504 #include "s_debug.h"
505 #include "y.tab.h"
506
507 extern int lineno;
508
509 static struct lexer_token {
510   const char *string;
511   int value;
512 } tokens[] = {
513 #define TOKEN(NAME) { #NAME, NAME }
514   TOKEN(ADMIN),
515   TOKEN(GENERAL),
516   TOKEN(LOCATION),
517   TOKEN(CONTACT),
518   TOKEN(CLASS),
519   TOKEN(PINGFREQ),
520   TOKEN(CONNECT),
521   TOKEN(CONNECTFREQ),
522   TOKEN(MAXLINKS),
523   TOKEN(MAXHOPS),
524   TOKEN(SENDQ),
525   TOKEN(NAME),
526   TOKEN(HOST),
527   TOKEN(IP),
528   TOKEN(USERNAME),
529   TOKEN(PASS),
530   TOKEN(SECONDS),
531   TOKEN(MINUTES),
532   TOKEN(HOURS),
533   TOKEN(DAYS),
534   TOKEN(WEEKS),
535   TOKEN(MONTHS),
536   TOKEN(YEARS),
537   TOKEN(DECADES),
538   TOKEN(BYTES),
539   TOKEN(KBYTES),
540   TOKEN(MBYTES),
541   TOKEN(GBYTES),
542   TOKEN(TBYTES),
543   TOKEN(PORT),
544   TOKEN(SERVER),
545   TOKEN(YES),
546   TOKEN(NO),
547   TOKEN(HUB),
548   TOKEN(LEAF),
549   TOKEN(UWORLD),
550   TOKEN(OPER),
551   TOKEN(LOCAL),
552   TOKEN(VHOST),
553   TOKEN(MASK),
554   TOKEN(HIDDEN),
555   TOKEN(MOTD),
556   TOKEN(NUMERIC),
557   TOKEN(NICK),
558   TOKEN(JUPE),
559   TOKEN(DESCRIPTION),
560   TOKEN(CLIENT),
561   TOKEN(REAL),
562   TOKEN(REASON),
563   TOKEN(RULE),
564   TOKEN(ALL),
565   TOKEN(CRULE),
566   TOKEN(KILL),
567   TOKEN(QUARANTINE),
568   TOKEN(IAUTH),
569   TOKEN(TIMEOUT),
570   TOKEN(FEATURES),
571   TOKEN(CHANNEL),
572   TOKEN(PSEUDO),
573   TOKEN(PREPEND),
574   TOKEN(USERMODE),
575   TOKEN(FAST),
576   TOKEN(AUTOCONNECT),
577   TOKEN(PROGRAM),
578   TOKEN(DNS),
579   TOKEN(FORWARDS),
580   TOKEN(SECURE),
581   TOKEN(WEBIRC),
582   TOKEN(SPOOF),
583   TOKEN(REQUIRED),
584   TOKEN(SSL),
585   TOKEN(CERT),
586   TOKEN(CACERT),
587 #undef TOKEN
588   { "administrator", ADMIN },
589   { "apass_opmode", TPRIV_APASS_OPMODE },
590   { "auto", AUTOCONNECT },
591   { "b", BYTES },
592   { "badchan", TPRIV_BADCHAN },
593   { "chan_limit", TPRIV_CHAN_LIMIT },
594   { "deop_lchan", TPRIV_DEOP_LCHAN },
595   { "die", TPRIV_DIE },
596   { "display", TPRIV_DISPLAY },
597   { "file", TFILE },
598   { "force_local_opmode", TPRIV_FORCE_LOCAL_OPMODE },
599   { "force_opmode", TPRIV_FORCE_OPMODE },
600   { "gb", GBYTES },
601   { "gigabytes", GBYTES },
602   { "gline", TPRIV_GLINE },
603 #ifdef OLD_OGN_IRCU_COMPAT
604   { "hide_channels", TPRIV_UMODE_NOCHAN },
605   { "hide_idletime", TPRIV_UMODE_NOIDLE },
606 #endif
607   { "umode_nochan", TPRIV_UMODE_NOCHAN },
608   { "umode_noidle", TPRIV_UMODE_NOIDLE },
609   { "extra_hide_idletime", TPRIV_HIDE_IDLETIME },
610 #ifndef OLD_OGN_IRCU_COMPAT
611   { "hide_idletime", TPRIV_HIDE_IDLETIME },
612 #endif
613   { "ipv4", TOK_IPV4 },
614   { "ipv6", TOK_IPV6 },
615   { "kb", KBYTES },
616   { "kilobytes", KBYTES },
617   { "list_chan", TPRIV_LIST_CHAN },
618   { "local_badchan", TPRIV_LOCAL_BADCHAN },
619   { "local_gline", TPRIV_LOCAL_GLINE },
620   { "local_jupe", TPRIV_LOCAL_JUPE },
621   { "local_kill", TPRIV_LOCAL_KILL },
622   { "local_opmode", TPRIV_LOCAL_OPMODE },
623   { "maxchans", MAXCHANS },
624   { "mb", MBYTES },
625   { "megabytes", MBYTES },
626   { "mode_lchan", TPRIV_MODE_LCHAN },
627   { "more_flood", TPRIV_HALFFLOOD },
628   { "noamsg_override", TPRIV_NOAMSG_OVERRIDE },
629   { "operator", OPER },
630   { "opmode", TPRIV_OPMODE },
631   { "password", PASS },
632   { "propagate", TPRIV_PROPAGATE },
633   { "realname", REAL },
634   { "rehash", TPRIV_REHASH },
635   { "restart", TPRIV_RESTART },
636   { "see_chan", TPRIV_SEE_CHAN },
637   { "see_idletime", TPRIV_SEE_IDLETIME },
638   { "see_opers", TPRIV_SEE_OPERS },
639   { "set", TPRIV_SET },
640   { "show_all_invis", TPRIV_SHOW_ALL_INVIS },
641   { "show_invis", TPRIV_SHOW_INVIS },
642 #ifdef OLD_OGN_IRCU_COMPAT
643   { "targetchange", TPRIV_UNLIMITED_TARGET },
644 #endif
645   { "unlimited_targets", TPRIV_UNLIMITED_TARGET },
646   { "tb", TBYTES },
647   { "terabytes", TBYTES },
648   { "umode_chserv", TPRIV_UMODE_CHSERV },
649   { "umode_xtraop", TPRIV_UMODE_XTRAOP },
650   { "umode_netserv", TPRIV_UMODE_NETSERV },
651   { "umode_overridecc", TPRIV_UMODE_OVERRIDECC },
652   { "unlimit_query", TPRIV_UNLIMIT_QUERY },
653   { "unlimited_flood", TPRIV_FLOOD },
654   { "walk_lchan", TPRIV_WALK_LCHAN },
655   { "wide_gline", TPRIV_WIDE_GLINE },
656   { "whox", TPRIV_WHOX },
657   { NULL, 0 }
658 };
659 static int ntokens;
660
661 static int
662 token_compare(const void *pa, const void *pb)
663 {
664   const struct lexer_token *ta = pa;
665   const struct lexer_token *tb = pb;
666   unsigned int ii = 0;
667   int res;
668   while (ta->string[ii] && (ToLower(ta->string[ii]) == ToLower(tb->string[ii])))
669     ii++;
670   res = ToLower(tb->string[ii]) - ToLower(ta->string[ii]);
671   return res;
672 }
673
674 static void
675 init_ntokens(void)
676 {
677   for (ntokens = 0; tokens[ntokens].string; ++ntokens) ;
678   qsort(tokens, ntokens, sizeof(tokens[0]), token_compare);
679 }
680
681 static int
682 find_token(char *token)
683 {
684   struct lexer_token *tok;
685   if (!ntokens)
686     init_ntokens();
687   tok = bsearch(&token, tokens, ntokens, sizeof(tokens[0]), token_compare);
688   return tok ? tok->value : 0;
689 }
690
691 static FBFILE *lexer_input;
692
693 #undef YY_INPUT
694 #define YY_INPUT(buf, res, size) res = (fbgets(buf, size, lexer_input) ? strlen(buf) : 0)
695
696 int
697 init_lexer(void)
698 {
699   lexer_input = fbopen(configfile, "r");
700   if (lexer_input == NULL)
701   {
702 #ifdef YY_FATAL_ERROR
703     YY_FATAL_ERROR("Could not open the configuration file.");
704 #else
705     fprintf(stderr, "Could not open the configuration file.");
706 #endif
707     return 0;
708   }
709 #ifdef YY_NEW_FILE
710   YY_NEW_FILE;
711 #endif
712   lineno = 1;
713   return 1;
714 }
715
716 void deinit_lexer(void)
717 {
718   if (lexer_input != NULL)
719   {
720     fbclose(lexer_input);
721     lexer_input = NULL;
722   }
723 }
724
725 int
726 yywrap(void)
727 {
728   return 1;
729 }
730
731 #line 732 "lex.yy.c"
732
733 #define INITIAL 0
734
735 #ifndef YY_NO_UNISTD_H
736 /* Special case for "unistd.h", since it is non-ANSI. We include it way
737  * down here because we want the user's section 1 to have been scanned first.
738  * The user has a chance to override it with an option.
739  */
740 #include <unistd.h>
741 #endif
742
743 #ifndef YY_EXTRA_TYPE
744 #define YY_EXTRA_TYPE void *
745 #endif
746
747 static int yy_init_globals (void );
748
749 /* Accessor methods to globals.
750    These are made visible to non-reentrant scanners for convenience. */
751
752 int yylex_destroy (void );
753
754 int yyget_debug (void );
755
756 void yyset_debug (int debug_flag  );
757
758 YY_EXTRA_TYPE yyget_extra (void );
759
760 void yyset_extra (YY_EXTRA_TYPE user_defined  );
761
762 FILE *yyget_in (void );
763
764 void yyset_in  (FILE * in_str  );
765
766 FILE *yyget_out (void );
767
768 void yyset_out  (FILE * out_str  );
769
770 int yyget_leng (void );
771
772 char *yyget_text (void );
773
774 int yyget_lineno (void );
775
776 void yyset_lineno (int line_number  );
777
778 /* Macros after this point can all be overridden by user definitions in
779  * section 1.
780  */
781
782 #ifndef YY_SKIP_YYWRAP
783 #ifdef __cplusplus
784 extern "C" int yywrap (void );
785 #else
786 extern int yywrap (void );
787 #endif
788 #endif
789
790     static void yyunput (int c,char *buf_ptr  );
791     
792 #ifndef yytext_ptr
793 static void yy_flex_strncpy (char *,yyconst char *,int );
794 #endif
795
796 #ifdef YY_NEED_STRLEN
797 static int yy_flex_strlen (yyconst char * );
798 #endif
799
800 #ifndef YY_NO_INPUT
801
802 #ifdef __cplusplus
803 static int yyinput (void );
804 #else
805 static int input (void );
806 #endif
807
808 #endif
809
810 /* Amount of stuff to slurp up with each read. */
811 #ifndef YY_READ_BUF_SIZE
812 #ifdef __ia64__
813 /* On IA-64, the buffer size is 16k, not 8k */
814 #define YY_READ_BUF_SIZE 16384
815 #else
816 #define YY_READ_BUF_SIZE 8192
817 #endif /* __ia64__ */
818 #endif
819
820 /* Copy whatever the last rule matched to the standard output. */
821 #ifndef ECHO
822 /* This used to be an fputs(), but since the string might contain NUL's,
823  * we now use fwrite().
824  */
825 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
826 #endif
827
828 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
829  * is returned in "result".
830  */
831 #ifndef YY_INPUT
832 #define YY_INPUT(buf,result,max_size) \
833         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
834                 { \
835                 int c = '*'; \
836                 size_t n; \
837                 for ( n = 0; n < max_size && \
838                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
839                         buf[n] = (char) c; \
840                 if ( c == '\n' ) \
841                         buf[n++] = (char) c; \
842                 if ( c == EOF && ferror( yyin ) ) \
843                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
844                 result = n; \
845                 } \
846         else \
847                 { \
848                 errno=0; \
849                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
850                         { \
851                         if( errno != EINTR) \
852                                 { \
853                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
854                                 break; \
855                                 } \
856                         errno=0; \
857                         clearerr(yyin); \
858                         } \
859                 }\
860 \
861
862 #endif
863
864 /* No semi-colon after return; correct usage is to write "yyterminate();" -
865  * we don't want an extra ';' after the "return" because that will cause
866  * some compilers to complain about unreachable statements.
867  */
868 #ifndef yyterminate
869 #define yyterminate() return YY_NULL
870 #endif
871
872 /* Number of entries by which start-condition stack grows. */
873 #ifndef YY_START_STACK_INCR
874 #define YY_START_STACK_INCR 25
875 #endif
876
877 /* Report a fatal error. */
878 #ifndef YY_FATAL_ERROR
879 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
880 #endif
881
882 /* end tables serialization structures and prototypes */
883
884 /* Default declaration of generated scanner - a define so the user can
885  * easily add parameters.
886  */
887 #ifndef YY_DECL
888 #define YY_DECL_IS_OURS 1
889
890 extern int yylex (void);
891
892 #define YY_DECL int yylex (void)
893 #endif /* !YY_DECL */
894
895 /* Code executed at the beginning of each rule, after yytext and yyleng
896  * have been set up.
897  */
898 #ifndef YY_USER_ACTION
899 #define YY_USER_ACTION
900 #endif
901
902 /* Code executed at the end of each rule. */
903 #ifndef YY_BREAK
904 #define YY_BREAK break;
905 #endif
906
907 #define YY_RULE_SETUP \
908         YY_USER_ACTION
909
910 /** The main scanner function which does all the work.
911  */
912 YY_DECL
913 {
914         register yy_state_type yy_current_state;
915         register char *yy_cp, *yy_bp;
916         register int yy_act;
917     
918 #line 266 "./ircd_lexer.l"
919
920
921 #line 922 "lex.yy.c"
922
923         if ( !(yy_init) )
924                 {
925                 (yy_init) = 1;
926
927 #ifdef YY_USER_INIT
928                 YY_USER_INIT;
929 #endif
930
931         /* Create the reject buffer large enough to save one state per allowed character. */
932         if ( ! (yy_state_buf) )
933             (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  );
934             if ( ! (yy_state_buf) )
935                 YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
936
937                 if ( ! (yy_start) )
938                         (yy_start) = 1; /* first start state */
939
940                 if ( ! yyin )
941                         yyin = stdin;
942
943                 if ( ! yyout )
944                         yyout = stdout;
945
946                 if ( ! YY_CURRENT_BUFFER ) {
947                         yyensure_buffer_stack ();
948                         YY_CURRENT_BUFFER_LVALUE =
949                                 yy_create_buffer(yyin,YY_BUF_SIZE );
950                 }
951
952                 yy_load_buffer_state( );
953                 }
954
955         while ( 1 )             /* loops until end-of-file is reached */
956                 {
957                 yy_cp = (yy_c_buf_p);
958
959                 /* Support of yytext. */
960                 *yy_cp = (yy_hold_char);
961
962                 /* yy_bp points to the position in yy_ch_buf of the start of
963                  * the current run.
964                  */
965                 yy_bp = yy_cp;
966
967                 yy_current_state = (yy_start);
968
969                 (yy_state_ptr) = (yy_state_buf);
970                 *(yy_state_ptr)++ = yy_current_state;
971
972 yy_match:
973                 do
974                         {
975                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
976                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
977                                 {
978                                 yy_current_state = (int) yy_def[yy_current_state];
979                                 if ( yy_current_state >= 18 )
980                                         yy_c = yy_meta[(unsigned int) yy_c];
981                                 }
982                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
983                         *(yy_state_ptr)++ = yy_current_state;
984                         ++yy_cp;
985                         }
986                 while ( yy_base[yy_current_state] != 21 );
987
988 yy_find_action:
989                 yy_current_state = *--(yy_state_ptr);
990                 (yy_lp) = yy_accept[yy_current_state];
991 find_rule: /* we branch to this label when backing up */
992                 for ( ; ; ) /* until we find what rule we matched */
993                         {
994                         if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
995                                 {
996                                 yy_act = yy_acclist[(yy_lp)];
997                                         {
998                                         (yy_full_match) = yy_cp;
999                                         break;
1000                                         }
1001                                 }
1002                         --yy_cp;
1003                         yy_current_state = *--(yy_state_ptr);
1004                         (yy_lp) = yy_accept[yy_current_state];
1005                         }
1006
1007                 YY_DO_BEFORE_ACTION;
1008
1009 do_action:      /* This label is used only to access EOF actions. */
1010
1011                 switch ( yy_act )
1012         { /* beginning of action switch */
1013 case 1:
1014 /* rule 1 can match eol */
1015 YY_RULE_SETUP
1016 #line 268 "./ircd_lexer.l"
1017 {yytext[yyleng-1] = 0; DupString(yylval.text, yytext+1); return QSTRING;}
1018         YY_BREAK
1019 case 2:
1020 YY_RULE_SETUP
1021 #line 269 "./ircd_lexer.l"
1022 {yylval.num = strtoul(yytext, NULL, 10); return NUMBER;}
1023         YY_BREAK
1024 case 3:
1025 YY_RULE_SETUP
1026 #line 270 "./ircd_lexer.l"
1027 ;
1028         YY_BREAK
1029 case 4:
1030 YY_RULE_SETUP
1031 #line 271 "./ircd_lexer.l"
1032 ;
1033         YY_BREAK
1034 case 5:
1035 YY_RULE_SETUP
1036 #line 273 "./ircd_lexer.l"
1037 { int res = find_token(yytext); if (res) return res; else REJECT; }
1038         YY_BREAK
1039 case 6:
1040 /* rule 6 can match eol */
1041 YY_RULE_SETUP
1042 #line 274 "./ircd_lexer.l"
1043 lineno++;
1044         YY_BREAK
1045 case 7:
1046 YY_RULE_SETUP
1047 #line 275 "./ircd_lexer.l"
1048 return yytext[0];
1049         YY_BREAK
1050 case 8:
1051 YY_RULE_SETUP
1052 #line 276 "./ircd_lexer.l"
1053 ECHO;
1054         YY_BREAK
1055 #line 1056 "lex.yy.c"
1056                         case YY_STATE_EOF(INITIAL):
1057                                 yyterminate();
1058
1059         case YY_END_OF_BUFFER:
1060                 {
1061                 /* Amount of text matched not including the EOB char. */
1062                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1063
1064                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1065                 *yy_cp = (yy_hold_char);
1066                 YY_RESTORE_YY_MORE_OFFSET
1067
1068                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1069                         {
1070                         /* We're scanning a new file or input source.  It's
1071                          * possible that this happened because the user
1072                          * just pointed yyin at a new source and called
1073                          * yylex().  If so, then we have to assure
1074                          * consistency between YY_CURRENT_BUFFER and our
1075                          * globals.  Here is the right place to do so, because
1076                          * this is the first action (other than possibly a
1077                          * back-up) that will match for the new input source.
1078                          */
1079                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1080                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1081                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1082                         }
1083
1084                 /* Note that here we test for yy_c_buf_p "<=" to the position
1085                  * of the first EOB in the buffer, since yy_c_buf_p will
1086                  * already have been incremented past the NUL character
1087                  * (since all states make transitions on EOB to the
1088                  * end-of-buffer state).  Contrast this with the test
1089                  * in input().
1090                  */
1091                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1092                         { /* This was really a NUL. */
1093                         yy_state_type yy_next_state;
1094
1095                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1096
1097                         yy_current_state = yy_get_previous_state(  );
1098
1099                         /* Okay, we're now positioned to make the NUL
1100                          * transition.  We couldn't have
1101                          * yy_get_previous_state() go ahead and do it
1102                          * for us because it doesn't know how to deal
1103                          * with the possibility of jamming (and we don't
1104                          * want to build jamming into it because then it
1105                          * will run more slowly).
1106                          */
1107
1108                         yy_next_state = yy_try_NUL_trans( yy_current_state );
1109
1110                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1111
1112                         if ( yy_next_state )
1113                                 {
1114                                 /* Consume the NUL. */
1115                                 yy_cp = ++(yy_c_buf_p);
1116                                 yy_current_state = yy_next_state;
1117                                 goto yy_match;
1118                                 }
1119
1120                         else
1121                                 {
1122                                 yy_cp = (yy_c_buf_p);
1123                                 goto yy_find_action;
1124                                 }
1125                         }
1126
1127                 else switch ( yy_get_next_buffer(  ) )
1128                         {
1129                         case EOB_ACT_END_OF_FILE:
1130                                 {
1131                                 (yy_did_buffer_switch_on_eof) = 0;
1132
1133                                 if ( yywrap( ) )
1134                                         {
1135                                         /* Note: because we've taken care in
1136                                          * yy_get_next_buffer() to have set up
1137                                          * yytext, we can now set up
1138                                          * yy_c_buf_p so that if some total
1139                                          * hoser (like flex itself) wants to
1140                                          * call the scanner after we return the
1141                                          * YY_NULL, it'll still work - another
1142                                          * YY_NULL will get returned.
1143                                          */
1144                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1145
1146                                         yy_act = YY_STATE_EOF(YY_START);
1147                                         goto do_action;
1148                                         }
1149
1150                                 else
1151                                         {
1152                                         if ( ! (yy_did_buffer_switch_on_eof) )
1153                                                 YY_NEW_FILE;
1154                                         }
1155                                 break;
1156                                 }
1157
1158                         case EOB_ACT_CONTINUE_SCAN:
1159                                 (yy_c_buf_p) =
1160                                         (yytext_ptr) + yy_amount_of_matched_text;
1161
1162                                 yy_current_state = yy_get_previous_state(  );
1163
1164                                 yy_cp = (yy_c_buf_p);
1165                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1166                                 goto yy_match;
1167
1168                         case EOB_ACT_LAST_MATCH:
1169                                 (yy_c_buf_p) =
1170                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1171
1172                                 yy_current_state = yy_get_previous_state(  );
1173
1174                                 yy_cp = (yy_c_buf_p);
1175                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1176                                 goto yy_find_action;
1177                         }
1178                 break;
1179                 }
1180
1181         default:
1182                 YY_FATAL_ERROR(
1183                         "fatal flex scanner internal error--no action found" );
1184         } /* end of action switch */
1185                 } /* end of scanning one token */
1186 } /* end of yylex */
1187
1188 /* yy_get_next_buffer - try to read in a new buffer
1189  *
1190  * Returns a code representing an action:
1191  *      EOB_ACT_LAST_MATCH -
1192  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1193  *      EOB_ACT_END_OF_FILE - end of file
1194  */
1195 static int yy_get_next_buffer (void)
1196 {
1197         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1198         register char *source = (yytext_ptr);
1199         register int number_to_move, i;
1200         int ret_val;
1201
1202         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1203                 YY_FATAL_ERROR(
1204                 "fatal flex scanner internal error--end of buffer missed" );
1205
1206         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1207                 { /* Don't try to fill the buffer, so this is an EOF. */
1208                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1209                         {
1210                         /* We matched a single character, the EOB, so
1211                          * treat this as a final EOF.
1212                          */
1213                         return EOB_ACT_END_OF_FILE;
1214                         }
1215
1216                 else
1217                         {
1218                         /* We matched some text prior to the EOB, first
1219                          * process it.
1220                          */
1221                         return EOB_ACT_LAST_MATCH;
1222                         }
1223                 }
1224
1225         /* Try to read more data. */
1226
1227         /* First move last chars to start of buffer. */
1228         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1229
1230         for ( i = 0; i < number_to_move; ++i )
1231                 *(dest++) = *(source++);
1232
1233         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1234                 /* don't do the read, it's not guaranteed to return an EOF,
1235                  * just force an EOF
1236                  */
1237                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1238
1239         else
1240                 {
1241                         int num_to_read =
1242                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1243
1244                 while ( num_to_read <= 0 )
1245                         { /* Not enough room in the buffer - grow it. */
1246
1247                         YY_FATAL_ERROR(
1248 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1249
1250                         }
1251
1252                 if ( num_to_read > YY_READ_BUF_SIZE )
1253                         num_to_read = YY_READ_BUF_SIZE;
1254
1255                 /* Read in more data. */
1256                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1257                         (yy_n_chars), (size_t) num_to_read );
1258
1259                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1260                 }
1261
1262         if ( (yy_n_chars) == 0 )
1263                 {
1264                 if ( number_to_move == YY_MORE_ADJ )
1265                         {
1266                         ret_val = EOB_ACT_END_OF_FILE;
1267                         yyrestart(yyin  );
1268                         }
1269
1270                 else
1271                         {
1272                         ret_val = EOB_ACT_LAST_MATCH;
1273                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1274                                 YY_BUFFER_EOF_PENDING;
1275                         }
1276                 }
1277
1278         else
1279                 ret_val = EOB_ACT_CONTINUE_SCAN;
1280
1281         if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1282                 /* Extend the array by 50%, plus the number we really need. */
1283                 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1284                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
1285                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1286                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1287         }
1288
1289         (yy_n_chars) += number_to_move;
1290         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1291         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1292
1293         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1294
1295         return ret_val;
1296 }
1297
1298 /* yy_get_previous_state - get the state just before the EOB char was reached */
1299
1300     static yy_state_type yy_get_previous_state (void)
1301 {
1302         register yy_state_type yy_current_state;
1303         register char *yy_cp;
1304     
1305         yy_current_state = (yy_start);
1306
1307         (yy_state_ptr) = (yy_state_buf);
1308         *(yy_state_ptr)++ = yy_current_state;
1309
1310         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1311                 {
1312                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1313                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1314                         {
1315                         yy_current_state = (int) yy_def[yy_current_state];
1316                         if ( yy_current_state >= 18 )
1317                                 yy_c = yy_meta[(unsigned int) yy_c];
1318                         }
1319                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1320                 *(yy_state_ptr)++ = yy_current_state;
1321                 }
1322
1323         return yy_current_state;
1324 }
1325
1326 /* yy_try_NUL_trans - try to make a transition on the NUL character
1327  *
1328  * synopsis
1329  *      next_state = yy_try_NUL_trans( current_state );
1330  */
1331     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
1332 {
1333         register int yy_is_jam;
1334     
1335         register YY_CHAR yy_c = 1;
1336         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1337                 {
1338                 yy_current_state = (int) yy_def[yy_current_state];
1339                 if ( yy_current_state >= 18 )
1340                         yy_c = yy_meta[(unsigned int) yy_c];
1341                 }
1342         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1343         yy_is_jam = (yy_current_state == 17);
1344         if ( ! yy_is_jam )
1345                 *(yy_state_ptr)++ = yy_current_state;
1346
1347         return yy_is_jam ? 0 : yy_current_state;
1348 }
1349
1350     static void yyunput (int c, register char * yy_bp )
1351 {
1352         register char *yy_cp;
1353     
1354     yy_cp = (yy_c_buf_p);
1355
1356         /* undo effects of setting up yytext */
1357         *yy_cp = (yy_hold_char);
1358
1359         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1360                 { /* need to shift things up to make room */
1361                 /* +2 for EOB chars. */
1362                 register int number_to_move = (yy_n_chars) + 2;
1363                 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1364                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1365                 register char *source =
1366                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1367
1368                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1369                         *--dest = *--source;
1370
1371                 yy_cp += (int) (dest - source);
1372                 yy_bp += (int) (dest - source);
1373                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1374                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1375
1376                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1377                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1378                 }
1379
1380         *--yy_cp = (char) c;
1381
1382         (yytext_ptr) = yy_bp;
1383         (yy_hold_char) = *yy_cp;
1384         (yy_c_buf_p) = yy_cp;
1385 }
1386
1387 #ifndef YY_NO_INPUT
1388 #ifdef __cplusplus
1389     static int yyinput (void)
1390 #else
1391     static int input  (void)
1392 #endif
1393
1394 {
1395         int c;
1396     
1397         *(yy_c_buf_p) = (yy_hold_char);
1398
1399         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1400                 {
1401                 /* yy_c_buf_p now points to the character we want to return.
1402                  * If this occurs *before* the EOB characters, then it's a
1403                  * valid NUL; if not, then we've hit the end of the buffer.
1404                  */
1405                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1406                         /* This was really a NUL. */
1407                         *(yy_c_buf_p) = '\0';
1408
1409                 else
1410                         { /* need more input */
1411                         int offset = (yy_c_buf_p) - (yytext_ptr);
1412                         ++(yy_c_buf_p);
1413
1414                         switch ( yy_get_next_buffer(  ) )
1415                                 {
1416                                 case EOB_ACT_LAST_MATCH:
1417                                         /* This happens because yy_g_n_b()
1418                                          * sees that we've accumulated a
1419                                          * token and flags that we need to
1420                                          * try matching the token before
1421                                          * proceeding.  But for input(),
1422                                          * there's no matching to consider.
1423                                          * So convert the EOB_ACT_LAST_MATCH
1424                                          * to EOB_ACT_END_OF_FILE.
1425                                          */
1426
1427                                         /* Reset buffer status. */
1428                                         yyrestart(yyin );
1429
1430                                         /*FALLTHROUGH*/
1431
1432                                 case EOB_ACT_END_OF_FILE:
1433                                         {
1434                                         if ( yywrap( ) )
1435                                                 return EOF;
1436
1437                                         if ( ! (yy_did_buffer_switch_on_eof) )
1438                                                 YY_NEW_FILE;
1439 #ifdef __cplusplus
1440                                         return yyinput();
1441 #else
1442                                         return input();
1443 #endif
1444                                         }
1445
1446                                 case EOB_ACT_CONTINUE_SCAN:
1447                                         (yy_c_buf_p) = (yytext_ptr) + offset;
1448                                         break;
1449                                 }
1450                         }
1451                 }
1452
1453         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
1454         *(yy_c_buf_p) = '\0';   /* preserve yytext */
1455         (yy_hold_char) = *++(yy_c_buf_p);
1456
1457         return c;
1458 }
1459 #endif  /* ifndef YY_NO_INPUT */
1460
1461 /** Immediately switch to a different input stream.
1462  * @param input_file A readable stream.
1463  * 
1464  * @note This function does not reset the start condition to @c INITIAL .
1465  */
1466     void yyrestart  (FILE * input_file )
1467 {
1468     
1469         if ( ! YY_CURRENT_BUFFER ){
1470         yyensure_buffer_stack ();
1471                 YY_CURRENT_BUFFER_LVALUE =
1472             yy_create_buffer(yyin,YY_BUF_SIZE );
1473         }
1474
1475         yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1476         yy_load_buffer_state( );
1477 }
1478
1479 /** Switch to a different input buffer.
1480  * @param new_buffer The new input buffer.
1481  * 
1482  */
1483     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
1484 {
1485     
1486         /* TODO. We should be able to replace this entire function body
1487          * with
1488          *              yypop_buffer_state();
1489          *              yypush_buffer_state(new_buffer);
1490      */
1491         yyensure_buffer_stack ();
1492         if ( YY_CURRENT_BUFFER == new_buffer )
1493                 return;
1494
1495         if ( YY_CURRENT_BUFFER )
1496                 {
1497                 /* Flush out information for old buffer. */
1498                 *(yy_c_buf_p) = (yy_hold_char);
1499                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1500                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1501                 }
1502
1503         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1504         yy_load_buffer_state( );
1505
1506         /* We don't actually know whether we did this switch during
1507          * EOF (yywrap()) processing, but the only time this flag
1508          * is looked at is after yywrap() is called, so it's safe
1509          * to go ahead and always set it.
1510          */
1511         (yy_did_buffer_switch_on_eof) = 1;
1512 }
1513
1514 static void yy_load_buffer_state  (void)
1515 {
1516         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1517         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1518         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1519         (yy_hold_char) = *(yy_c_buf_p);
1520 }
1521
1522 /** Allocate and initialize an input buffer state.
1523  * @param file A readable stream.
1524  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1525  * 
1526  * @return the allocated buffer state.
1527  */
1528     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
1529 {
1530         YY_BUFFER_STATE b;
1531     
1532         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
1533         if ( ! b )
1534                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1535
1536         b->yy_buf_size = size;
1537
1538         /* yy_ch_buf has to be 2 characters longer than the size given because
1539          * we need to put in 2 end-of-buffer characters.
1540          */
1541         b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
1542         if ( ! b->yy_ch_buf )
1543                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1544
1545         b->yy_is_our_buffer = 1;
1546
1547         yy_init_buffer(b,file );
1548
1549         return b;
1550 }
1551
1552 /** Destroy the buffer.
1553  * @param b a buffer created with yy_create_buffer()
1554  * 
1555  */
1556     void yy_delete_buffer (YY_BUFFER_STATE  b )
1557 {
1558     
1559         if ( ! b )
1560                 return;
1561
1562         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1563                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1564
1565         if ( b->yy_is_our_buffer )
1566                 yyfree((void *) b->yy_ch_buf  );
1567
1568         yyfree((void *) b  );
1569 }
1570
1571 #ifndef __cplusplus
1572 extern int isatty (int );
1573 #endif /* __cplusplus */
1574     
1575 /* Initializes or reinitializes a buffer.
1576  * This function is sometimes called more than once on the same buffer,
1577  * such as during a yyrestart() or at EOF.
1578  */
1579     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
1580
1581 {
1582         int oerrno = errno;
1583     
1584         yy_flush_buffer(b );
1585
1586         b->yy_input_file = file;
1587         b->yy_fill_buffer = 1;
1588
1589     /* If b is the current buffer, then yy_init_buffer was _probably_
1590      * called from yyrestart() or through yy_get_next_buffer.
1591      * In that case, we don't want to reset the lineno or column.
1592      */
1593     if (b != YY_CURRENT_BUFFER){
1594         b->yy_bs_lineno = 1;
1595         b->yy_bs_column = 0;
1596     }
1597
1598         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1599     
1600         errno = oerrno;
1601 }
1602
1603 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1604  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1605  * 
1606  */
1607     void yy_flush_buffer (YY_BUFFER_STATE  b )
1608 {
1609         if ( ! b )
1610                 return;
1611
1612         b->yy_n_chars = 0;
1613
1614         /* We always need two end-of-buffer characters.  The first causes
1615          * a transition to the end-of-buffer state.  The second causes
1616          * a jam in that state.
1617          */
1618         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1619         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1620
1621         b->yy_buf_pos = &b->yy_ch_buf[0];
1622
1623         b->yy_at_bol = 1;
1624         b->yy_buffer_status = YY_BUFFER_NEW;
1625
1626         if ( b == YY_CURRENT_BUFFER )
1627                 yy_load_buffer_state( );
1628 }
1629
1630 /** Pushes the new state onto the stack. The new state becomes
1631  *  the current state. This function will allocate the stack
1632  *  if necessary.
1633  *  @param new_buffer The new state.
1634  *  
1635  */
1636 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1637 {
1638         if (new_buffer == NULL)
1639                 return;
1640
1641         yyensure_buffer_stack();
1642
1643         /* This block is copied from yy_switch_to_buffer. */
1644         if ( YY_CURRENT_BUFFER )
1645                 {
1646                 /* Flush out information for old buffer. */
1647                 *(yy_c_buf_p) = (yy_hold_char);
1648                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1649                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1650                 }
1651
1652         /* Only push if top exists. Otherwise, replace top. */
1653         if (YY_CURRENT_BUFFER)
1654                 (yy_buffer_stack_top)++;
1655         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1656
1657         /* copied from yy_switch_to_buffer. */
1658         yy_load_buffer_state( );
1659         (yy_did_buffer_switch_on_eof) = 1;
1660 }
1661
1662 /** Removes and deletes the top of the stack, if present.
1663  *  The next element becomes the new top.
1664  *  
1665  */
1666 void yypop_buffer_state (void)
1667 {
1668         if (!YY_CURRENT_BUFFER)
1669                 return;
1670
1671         yy_delete_buffer(YY_CURRENT_BUFFER );
1672         YY_CURRENT_BUFFER_LVALUE = NULL;
1673         if ((yy_buffer_stack_top) > 0)
1674                 --(yy_buffer_stack_top);
1675
1676         if (YY_CURRENT_BUFFER) {
1677                 yy_load_buffer_state( );
1678                 (yy_did_buffer_switch_on_eof) = 1;
1679         }
1680 }
1681
1682 /* Allocates the stack if it does not exist.
1683  *  Guarantees space for at least one push.
1684  */
1685 static void yyensure_buffer_stack (void)
1686 {
1687         int num_to_alloc;
1688     
1689         if (!(yy_buffer_stack)) {
1690
1691                 /* First allocation is just for 2 elements, since we don't know if this
1692                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1693                  * immediate realloc on the next call.
1694          */
1695                 num_to_alloc = 1;
1696                 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1697                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
1698                                                                 );
1699                 if ( ! (yy_buffer_stack) )
1700                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1701                                                                   
1702                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1703                                 
1704                 (yy_buffer_stack_max) = num_to_alloc;
1705                 (yy_buffer_stack_top) = 0;
1706                 return;
1707         }
1708
1709         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1710
1711                 /* Increase the buffer to prepare for a possible push. */
1712                 int grow_size = 8 /* arbitrary grow size */;
1713
1714                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1715                 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1716                                                                 ((yy_buffer_stack),
1717                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
1718                                                                 );
1719                 if ( ! (yy_buffer_stack) )
1720                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1721
1722                 /* zero only the new slots.*/
1723                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1724                 (yy_buffer_stack_max) = num_to_alloc;
1725         }
1726 }
1727
1728 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1729  * @param base the character buffer
1730  * @param size the size in bytes of the character buffer
1731  * 
1732  * @return the newly allocated buffer state object. 
1733  */
1734 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
1735 {
1736         YY_BUFFER_STATE b;
1737     
1738         if ( size < 2 ||
1739              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1740              base[size-1] != YY_END_OF_BUFFER_CHAR )
1741                 /* They forgot to leave room for the EOB's. */
1742                 return 0;
1743
1744         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
1745         if ( ! b )
1746                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1747
1748         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1749         b->yy_buf_pos = b->yy_ch_buf = base;
1750         b->yy_is_our_buffer = 0;
1751         b->yy_input_file = 0;
1752         b->yy_n_chars = b->yy_buf_size;
1753         b->yy_is_interactive = 0;
1754         b->yy_at_bol = 1;
1755         b->yy_fill_buffer = 0;
1756         b->yy_buffer_status = YY_BUFFER_NEW;
1757
1758         yy_switch_to_buffer(b  );
1759
1760         return b;
1761 }
1762
1763 /** Setup the input buffer state to scan a string. The next call to yylex() will
1764  * scan from a @e copy of @a str.
1765  * @param yystr a NUL-terminated string to scan
1766  * 
1767  * @return the newly allocated buffer state object.
1768  * @note If you want to scan bytes that may contain NUL values, then use
1769  *       yy_scan_bytes() instead.
1770  */
1771 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1772 {
1773     
1774         return yy_scan_bytes(yystr,strlen(yystr) );
1775 }
1776
1777 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1778  * scan from a @e copy of @a bytes.
1779  * @param yybytes the byte buffer to scan
1780  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1781  * 
1782  * @return the newly allocated buffer state object.
1783  */
1784 YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
1785 {
1786         YY_BUFFER_STATE b;
1787         char *buf;
1788         yy_size_t n;
1789         int i;
1790     
1791         /* Get memory for full buffer, including space for trailing EOB's. */
1792         n = _yybytes_len + 2;
1793         buf = (char *) yyalloc(n  );
1794         if ( ! buf )
1795                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1796
1797         for ( i = 0; i < _yybytes_len; ++i )
1798                 buf[i] = yybytes[i];
1799
1800         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1801
1802         b = yy_scan_buffer(buf,n );
1803         if ( ! b )
1804                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1805
1806         /* It's okay to grow etc. this buffer, and we should throw it
1807          * away when we're done.
1808          */
1809         b->yy_is_our_buffer = 1;
1810
1811         return b;
1812 }
1813
1814 #ifndef YY_EXIT_FAILURE
1815 #define YY_EXIT_FAILURE 2
1816 #endif
1817
1818 static void yy_fatal_error (yyconst char* msg )
1819 {
1820         (void) fprintf( stderr, "%s\n", msg );
1821         exit( YY_EXIT_FAILURE );
1822 }
1823
1824 /* Redefine yyless() so it works in section 3 code. */
1825
1826 #undef yyless
1827 #define yyless(n) \
1828         do \
1829                 { \
1830                 /* Undo effects of setting up yytext. */ \
1831         int yyless_macro_arg = (n); \
1832         YY_LESS_LINENO(yyless_macro_arg);\
1833                 yytext[yyleng] = (yy_hold_char); \
1834                 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1835                 (yy_hold_char) = *(yy_c_buf_p); \
1836                 *(yy_c_buf_p) = '\0'; \
1837                 yyleng = yyless_macro_arg; \
1838                 } \
1839         while ( 0 )
1840
1841 /* Accessor  methods (get/set functions) to struct members. */
1842
1843 /** Get the current line number.
1844  * 
1845  */
1846 int yyget_lineno  (void)
1847 {
1848         
1849     return yylineno;
1850 }
1851
1852 /** Get the input stream.
1853  * 
1854  */
1855 FILE *yyget_in  (void)
1856 {
1857         return yyin;
1858 }
1859
1860 /** Get the output stream.
1861  * 
1862  */
1863 FILE *yyget_out  (void)
1864 {
1865         return yyout;
1866 }
1867
1868 /** Get the length of the current token.
1869  * 
1870  */
1871 int yyget_leng  (void)
1872 {
1873         return yyleng;
1874 }
1875
1876 /** Get the current token.
1877  * 
1878  */
1879
1880 char *yyget_text  (void)
1881 {
1882         return yytext;
1883 }
1884
1885 /** Set the current line number.
1886  * @param line_number
1887  * 
1888  */
1889 void yyset_lineno (int  line_number )
1890 {
1891     
1892     yylineno = line_number;
1893 }
1894
1895 /** Set the input stream. This does not discard the current
1896  * input buffer.
1897  * @param in_str A readable stream.
1898  * 
1899  * @see yy_switch_to_buffer
1900  */
1901 void yyset_in (FILE *  in_str )
1902 {
1903         yyin = in_str ;
1904 }
1905
1906 void yyset_out (FILE *  out_str )
1907 {
1908         yyout = out_str ;
1909 }
1910
1911 int yyget_debug  (void)
1912 {
1913         return yy_flex_debug;
1914 }
1915
1916 void yyset_debug (int  bdebug )
1917 {
1918         yy_flex_debug = bdebug ;
1919 }
1920
1921 static int yy_init_globals (void)
1922 {
1923         /* Initialization is the same as for the non-reentrant scanner.
1924      * This function is called from yylex_destroy(), so don't allocate here.
1925      */
1926
1927     (yy_buffer_stack) = 0;
1928     (yy_buffer_stack_top) = 0;
1929     (yy_buffer_stack_max) = 0;
1930     (yy_c_buf_p) = (char *) 0;
1931     (yy_init) = 0;
1932     (yy_start) = 0;
1933
1934     (yy_state_buf) = 0;
1935     (yy_state_ptr) = 0;
1936     (yy_full_match) = 0;
1937     (yy_lp) = 0;
1938
1939 /* Defined in main.c */
1940 #ifdef YY_STDINIT
1941     yyin = stdin;
1942     yyout = stdout;
1943 #else
1944     yyin = (FILE *) 0;
1945     yyout = (FILE *) 0;
1946 #endif
1947
1948     /* For future reference: Set errno on error, since we are called by
1949      * yylex_init()
1950      */
1951     return 0;
1952 }
1953
1954 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
1955 int yylex_destroy  (void)
1956 {
1957     
1958     /* Pop the buffer stack, destroying each element. */
1959         while(YY_CURRENT_BUFFER){
1960                 yy_delete_buffer(YY_CURRENT_BUFFER  );
1961                 YY_CURRENT_BUFFER_LVALUE = NULL;
1962                 yypop_buffer_state();
1963         }
1964
1965         /* Destroy the stack itself. */
1966         yyfree((yy_buffer_stack) );
1967         (yy_buffer_stack) = NULL;
1968
1969     yyfree ( (yy_state_buf) );
1970     (yy_state_buf)  = NULL;
1971
1972     /* Reset the globals. This is important in a non-reentrant scanner so the next time
1973      * yylex() is called, initialization will occur. */
1974     yy_init_globals( );
1975
1976     return 0;
1977 }
1978
1979 /*
1980  * Internal utility routines.
1981  */
1982
1983 #ifndef yytext_ptr
1984 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1985 {
1986         register int i;
1987         for ( i = 0; i < n; ++i )
1988                 s1[i] = s2[i];
1989 }
1990 #endif
1991
1992 #ifdef YY_NEED_STRLEN
1993 static int yy_flex_strlen (yyconst char * s )
1994 {
1995         register int n;
1996         for ( n = 0; s[n]; ++n )
1997                 ;
1998
1999         return n;
2000 }
2001 #endif
2002
2003 void *yyalloc (yy_size_t  size )
2004 {
2005         return (void *) malloc( size );
2006 }
2007
2008 void *yyrealloc  (void * ptr, yy_size_t  size )
2009 {
2010         /* The cast to (char *) in the following accommodates both
2011          * implementations that use char* generic pointers, and those
2012          * that use void* generic pointers.  It works with the latter
2013          * because both ANSI C and C++ allow castless assignment from
2014          * any pointer type to void*, and deal with argument conversions
2015          * as though doing an assignment.
2016          */
2017         return (void *) realloc( (char *) ptr, size );
2018 }
2019
2020 void yyfree (void * ptr )
2021 {
2022         free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
2023 }
2024
2025 #define YYTABLES_NAME "yytables"
2026
2027 #line 276 "./ircd_lexer.l"