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