]> granicus.if.org Git - sudo/blob - plugins/sudoers/toke.c
544cfe186da098b8dd2274ce6ac861418d9f8694
[sudo] / plugins / sudoers / toke.c
1 /*
2  * This is an open source non-commercial project. Dear PVS-Studio, please check it.
3  * PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
4  */
5
6 #include <config.h>
7
8 #line 3 "toke.c"
9
10 #define  YY_INT_ALIGNED short int
11
12 /*      $OpenBSD: flex.skl,v 1.16 2017/05/02 19:16:19 millert Exp $     */
13
14 /* A lexical scanner generated by flex */
15
16 #define yy_create_buffer sudoers_create_buffer
17 #define yy_delete_buffer sudoers_delete_buffer
18 #define yy_flex_debug sudoers_flex_debug
19 #define yy_init_buffer sudoers_init_buffer
20 #define yy_flush_buffer sudoers_flush_buffer
21 #define yy_load_buffer_state sudoers_load_buffer_state
22 #define yy_switch_to_buffer sudoers_switch_to_buffer
23 #define yyin sudoersin
24 #define yyleng sudoersleng
25 #define yylex sudoerslex
26 #define yylineno sudoerslineno
27 #define yyout sudoersout
28 #define yyrestart sudoersrestart
29 #define yytext sudoerstext
30 #define yywrap sudoerswrap
31 #define yyalloc sudoersalloc
32 #define yyrealloc sudoersrealloc
33 #define yyfree sudoersfree
34
35 #define FLEX_SCANNER
36 #define YY_FLEX_MAJOR_VERSION 2
37 #define YY_FLEX_MINOR_VERSION 5
38 #define YY_FLEX_SUBMINOR_VERSION 39
39 #if YY_FLEX_SUBMINOR_VERSION > 0
40 #define FLEX_BETA
41 #endif
42
43 /* First, we deal with  platform-specific or compiler-specific issues. */
44
45 /* begin standard C headers. */
46 #include <stdio.h>
47 #include <string.h>
48 #include <errno.h>
49 #include <stdlib.h>
50
51 /* end standard C headers. */
52
53 /* $OpenBSD: flexint.h,v 1.1 2015/11/19 19:43:40 tedu Exp $ */
54
55 /* flex integer type definitions */
56
57 #ifndef FLEXINT_H
58 #define FLEXINT_H
59
60 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
61
62 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
63
64 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
65  * if you want the limit (max/min) macros for int types. 
66  */
67 #ifndef __STDC_LIMIT_MACROS
68 #define __STDC_LIMIT_MACROS 1
69 #endif
70
71 #include <inttypes.h>
72 typedef int8_t flex_int8_t;
73 typedef uint8_t flex_uint8_t;
74 typedef int16_t flex_int16_t;
75 typedef uint16_t flex_uint16_t;
76 typedef int32_t flex_int32_t;
77 typedef uint32_t flex_uint32_t;
78 #else
79 typedef signed char flex_int8_t;
80 typedef short int flex_int16_t;
81 typedef int flex_int32_t;
82 typedef unsigned char flex_uint8_t; 
83 typedef unsigned short int flex_uint16_t;
84 typedef unsigned int flex_uint32_t;
85
86 /* Limits of integral types. */
87 #ifndef INT8_MIN
88 #define INT8_MIN               (-128)
89 #endif
90 #ifndef INT16_MIN
91 #define INT16_MIN              (-32767-1)
92 #endif
93 #ifndef INT32_MIN
94 #define INT32_MIN              (-2147483647-1)
95 #endif
96 #ifndef INT8_MAX
97 #define INT8_MAX               (127)
98 #endif
99 #ifndef INT16_MAX
100 #define INT16_MAX              (32767)
101 #endif
102 #ifndef INT32_MAX
103 #define INT32_MAX              (2147483647)
104 #endif
105 #ifndef UINT8_MAX
106 #define UINT8_MAX              (255U)
107 #endif
108 #ifndef UINT16_MAX
109 #define UINT16_MAX             (65535U)
110 #endif
111 #ifndef UINT32_MAX
112 #define UINT32_MAX             (4294967295U)
113 #endif
114
115 #endif /* ! C99 */
116
117 #endif /* ! FLEXINT_H */
118
119 #ifdef __cplusplus
120
121 /* The "const" storage-class-modifier is valid. */
122 #define YY_USE_CONST
123
124 #else   /* ! __cplusplus */
125
126 /* C99 requires __STDC__ to be defined as 1. */
127 #if defined (__STDC__)
128
129 #define YY_USE_CONST
130
131 #endif  /* defined (__STDC__) */
132 #endif  /* ! __cplusplus */
133
134 #ifdef YY_USE_CONST
135 #define yyconst const
136 #else
137 #define yyconst
138 #endif
139
140 /* Returned upon end-of-file. */
141 #define YY_NULL 0
142
143 /* Promotes a possibly negative, possibly signed char to an unsigned
144  * integer for use as an array index.  If the signed char is negative,
145  * we want to instead treat it as an 8-bit unsigned char, hence the
146  * double cast.
147  */
148 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
149
150 /* Enter a start condition.  This macro really ought to take a parameter,
151  * but we do it the disgusting crufty way forced on us by the ()-less
152  * definition of BEGIN.
153  */
154 #define BEGIN (yy_start) = 1 + 2 *
155
156 /* Translate the current start state into a value that can be later handed
157  * to BEGIN to return to the state.  The YYSTATE alias is for lex
158  * compatibility.
159  */
160 #define YY_START (((yy_start) - 1) / 2)
161 #define YYSTATE YY_START
162
163 /* Action number for EOF rule of a given start state. */
164 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
165
166 /* Special action meaning "start processing a new file". */
167 #define YY_NEW_FILE sudoersrestart(sudoersin  )
168
169 #define YY_END_OF_BUFFER_CHAR 0
170
171 /* Size of default input buffer. */
172 #ifndef YY_BUF_SIZE
173 #define YY_BUF_SIZE 16384
174 #endif
175
176 /* The state buf must be large enough to hold one state per character in the main buffer.
177  */
178 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
179
180 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
181 #define YY_TYPEDEF_YY_BUFFER_STATE
182 typedef struct yy_buffer_state *YY_BUFFER_STATE;
183 #endif
184
185 #ifndef YY_TYPEDEF_YY_SIZE_T
186 #define YY_TYPEDEF_YY_SIZE_T
187 typedef size_t yy_size_t;
188 #endif
189
190 extern yy_size_t sudoersleng;
191
192 extern FILE *sudoersin, *sudoersout;
193
194 #define EOB_ACT_CONTINUE_SCAN 0
195 #define EOB_ACT_END_OF_FILE 1
196 #define EOB_ACT_LAST_MATCH 2
197
198     #define YY_LESS_LINENO(n)
199     #define YY_LINENO_REWIND_TO(ptr)
200     
201 /* Return all but the first "n" matched characters back to the input stream. */
202 #define yyless(n) \
203         do \
204                 { \
205                 /* Undo effects of setting up sudoerstext. */ \
206         int yyless_macro_arg = (n); \
207         YY_LESS_LINENO(yyless_macro_arg);\
208                 *yy_cp = (yy_hold_char); \
209                 YY_RESTORE_YY_MORE_OFFSET \
210                 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
211                 YY_DO_BEFORE_ACTION; /* set up sudoerstext again */ \
212                 } \
213         while ( 0 )
214
215 #define unput(c) yyunput( c, (yytext_ptr)  )
216
217 #ifndef YY_STRUCT_YY_BUFFER_STATE
218 #define YY_STRUCT_YY_BUFFER_STATE
219 struct yy_buffer_state
220         {
221         FILE *yy_input_file;
222
223         char *yy_ch_buf;                /* input buffer */
224         char *yy_buf_pos;               /* current position in input buffer */
225
226         /* Size of input buffer in bytes, not including room for EOB
227          * characters.
228          */
229         yy_size_t yy_buf_size;
230
231         /* Number of characters read into yy_ch_buf, not including EOB
232          * characters.
233          */
234         yy_size_t yy_n_chars;
235
236         /* Whether we "own" the buffer - i.e., we know we created it,
237          * and can realloc() it to grow it, and should free() it to
238          * delete it.
239          */
240         int yy_is_our_buffer;
241
242         /* Whether this is an "interactive" input source; if so, and
243          * if we're using stdio for input, then we want to use getc()
244          * instead of fread(), to make sure we stop fetching input after
245          * each newline.
246          */
247         int yy_is_interactive;
248
249         /* Whether we're considered to be at the beginning of a line.
250          * If so, '^' rules will be active on the next match, otherwise
251          * not.
252          */
253         int yy_at_bol;
254
255     int yy_bs_lineno; /**< The line count. */
256     int yy_bs_column; /**< The column count. */
257     
258         /* Whether to try to fill the input buffer when we reach the
259          * end of it.
260          */
261         int yy_fill_buffer;
262
263         int yy_buffer_status;
264
265 #define YY_BUFFER_NEW 0
266 #define YY_BUFFER_NORMAL 1
267         /* When an EOF's been seen but there's still some text to process
268          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
269          * shouldn't try reading from the input source any more.  We might
270          * still have a bunch of tokens to match, though, because of
271          * possible backing-up.
272          *
273          * When we actually see the EOF, we change the status to "new"
274          * (via sudoersrestart()), so that the user can continue scanning by
275          * just pointing sudoersin at a new input file.
276          */
277 #define YY_BUFFER_EOF_PENDING 2
278
279         };
280 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
281
282 /* Stack of input buffers. */
283 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
284 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
285 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
286
287 /* We provide macros for accessing buffer states in case in the
288  * future we want to put the buffer states in a more general
289  * "scanner state".
290  *
291  * Returns the top of the stack, or NULL.
292  */
293 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
294                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
295                           : NULL)
296
297 /* Same as previous macro, but useful when we know that the buffer stack is not
298  * NULL or when we need an lvalue. For internal use only.
299  */
300 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
301
302 /* yy_hold_char holds the character lost when sudoerstext is formed. */
303 static char yy_hold_char;
304 static yy_size_t yy_n_chars;            /* number of characters read into yy_ch_buf */
305 yy_size_t sudoersleng;
306
307 /* Points to current character in buffer. */
308 static char *yy_c_buf_p = (char *) 0;
309 static int yy_init = 0;         /* whether we need to initialize */
310 static int yy_start = 0;        /* start state number */
311
312 /* Flag which is used to allow sudoerswrap()'s to do buffer switches
313  * instead of setting up a fresh sudoersin.  A bit of a hack ...
314  */
315 static int yy_did_buffer_switch_on_eof;
316
317 void sudoersrestart (FILE *input_file  );
318 void sudoers_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
319 YY_BUFFER_STATE sudoers_create_buffer (FILE *file,int size  );
320 void sudoers_delete_buffer (YY_BUFFER_STATE b  );
321 void sudoers_flush_buffer (YY_BUFFER_STATE b  );
322 void sudoerspush_buffer_state (YY_BUFFER_STATE new_buffer  );
323 void sudoerspop_buffer_state (void );
324
325 static void sudoersensure_buffer_stack (void );
326 static void sudoers_load_buffer_state (void );
327 static void sudoers_init_buffer (YY_BUFFER_STATE b,FILE *file  );
328
329 #define YY_FLUSH_BUFFER sudoers_flush_buffer(YY_CURRENT_BUFFER )
330
331 YY_BUFFER_STATE sudoers_scan_buffer (char *base,yy_size_t size  );
332 YY_BUFFER_STATE sudoers_scan_string (yyconst char *yy_str  );
333 YY_BUFFER_STATE sudoers_scan_bytes (yyconst char *bytes,yy_size_t len  );
334
335 void *sudoersalloc (yy_size_t  );
336 void *sudoersrealloc (void *,yy_size_t  );
337 void sudoersfree (void *  );
338
339 #define yy_new_buffer sudoers_create_buffer
340
341 #define yy_set_interactive(is_interactive) \
342         { \
343         if ( ! YY_CURRENT_BUFFER ){ \
344         sudoersensure_buffer_stack (); \
345                 YY_CURRENT_BUFFER_LVALUE =    \
346             sudoers_create_buffer(sudoersin,YY_BUF_SIZE ); \
347         } \
348         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
349         }
350
351 #define yy_set_bol(at_bol) \
352         { \
353         if ( ! YY_CURRENT_BUFFER ){\
354         sudoersensure_buffer_stack (); \
355                 YY_CURRENT_BUFFER_LVALUE =    \
356             sudoers_create_buffer(sudoersin,YY_BUF_SIZE ); \
357         } \
358         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
359         }
360
361 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
362
363 /* Begin user sect3 */
364
365 #define sudoerswrap() 1
366 #define YY_SKIP_YYWRAP
367
368 typedef unsigned char YY_CHAR;
369
370 FILE *sudoersin = (FILE *) 0, *sudoersout = (FILE *) 0;
371
372 typedef int yy_state_type;
373
374 extern int sudoerslineno;
375
376 int sudoerslineno = 1;
377
378 extern char *sudoerstext;
379 #define yytext_ptr sudoerstext
380
381 static yy_state_type yy_get_previous_state (void );
382 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
383 static int yy_get_next_buffer (void );
384 static void yy_fatal_error (yyconst char msg[]  );
385
386 /* Done after the current pattern has been matched and before the
387  * corresponding action - sets up sudoerstext.
388  */
389 #define YY_DO_BEFORE_ACTION \
390         (yytext_ptr) = yy_bp; \
391         sudoersleng = (size_t) (yy_cp - yy_bp); \
392         (yy_hold_char) = *yy_cp; \
393         *yy_cp = '\0'; \
394         (yy_c_buf_p) = yy_cp;
395
396 #define YY_NUM_RULES 74
397 #define YY_END_OF_BUFFER 75
398 /* This struct is not used in this scanner,
399    but its presence is necessary. */
400 struct yy_trans_info
401         {
402         flex_int32_t yy_verify;
403         flex_int32_t yy_nxt;
404         };
405 static yyconst flex_int16_t yy_accept[896] =
406     {   0,
407         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
408         0,    0,    0,    0,   75,   62,   70,   69,   73,   68,
409        61,   72,   38,   63,   64,   38,   65,   62,   62,   62,
410        62,   67,   66,   73,   53,   53,   53,   53,   53,   53,
411        53,   53,   53,   53,   53,   53,   73,   62,   62,   70,
412        72,   53,   53,   53,   53,   53,    2,   73,    1,   62,
413        53,   53,   53,   62,   17,   16,   16,   17,   16,   16,
414        73,   72,   73,    3,    9,    8,    9,    4,    9,    5,
415        73,   13,   13,   13,   11,   12,   73,   19,   19,   18,
416        18,   18,   19,   18,   18,   18,   18,   19,   19,   19,
417
418        19,   19,   19,   18,   19,   19,   62,    0,   70,   69,
419        68,   72,   72,    0,    0,   62,   40,    0,   38,    0,
420        39,    0,   60,   60,    0,   62,   62,    0,   62,   62,
421        62,   62,    0,   43,   53,   53,   53,   53,   53,   53,
422        53,   53,   53,   53,   53,   53,   53,   53,   53,    0,
423        71,   62,   62,   62,   62,   70,    0,    0,    0,    0,
424         0,   72,   62,   62,   62,   62,   62,    2,    1,    0,
425         1,   54,   54,    0,   53,   62,   17,   17,   15,    0,
426        14,   15,    0,    3,    9,    0,    6,    7,    9,    9,
427        13,    0,   13,   13,    0,   10,    0,   40,    0,    0,
428
429        39,   19,   19,    0,   19,    0,    0,   18,   18,   18,
430        18,   18,   18,   19,   19,   53,   19,   19,   19,   19,
431        19,   19,   19,   19,   19,   72,   72,   72,    0,   40,
432        62,   62,   62,   62,   62,    0,    0,   43,   43,   53,
433        45,   53,   53,   53,   53,   53,   53,   53,   53,   53,
434        53,   53,   53,   53,   53,   53,   53,   53,   53,   62,
435        62,    0,    0,    0,    0,    0,   72,   62,   62,   62,
436        62,   62,    0,   62,   10,    0,    0,    0,   18,   18,
437        18,   19,   19,   19,   19,   19,   19,   19,   19,   19,
438        19,   19,   19,   19,   19,   19,   72,   72,   72,   62,
439
440        62,   62,   62,   62,   62,    0,   44,   44,   44,    0,
441         0,   43,   43,   43,   43,   43,   43,   43,   53,   53,
442        53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
443        53,   53,   53,   53,   49,   53,   53,   50,   62,   62,
444        62,   62,    0,    0,    0,    0,    0,   72,   62,   62,
445        62,   62,    0,    0,    0,    0,    0,   18,   18,   19,
446        19,   53,   19,   19,   19,   19,   19,   19,   19,   19,
447        19,   19,   19,   19,   19,   62,   62,   62,    0,    0,
448        44,   44,   44,    0,   43,   43,    0,   43,   43,   43,
449        43,   43,   43,   43,   43,   43,   43,   43,    0,   27,
450
451        53,   53,   53,   53,    0,   34,   53,   53,   53,   53,
452        53,   53,   53,   53,   53,   51,   53,   53,   62,   62,
453        62,   62,   62,    0,    0,    0,   72,   62,   62,   62,
454         0,    0,    0,   18,   18,   19,   53,   53,   19,   19,
455        19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
456        19,   62,   62,   62,   62,   62,    0,   44,    0,   43,
457        43,   43,    0,    0,    0,   43,   43,   43,   43,   43,
458        43,   43,   43,   43,   43,   43,   43,   43,   53,   53,
459        53,   53,   53,   53,   53,   53,   53,   53,   53,   53,
460        53,   53,   53,   55,   56,   57,   58,   62,    0,    0,
461
462        72,   62,   62,   62,    0,    0,    0,    0,    0,   19,
463        53,   53,   19,   19,   53,   19,   19,   19,   19,   19,
464        19,   19,   19,   19,   19,   41,   41,   41,    0,    0,
465        43,   43,   43,   43,   43,   43,   43,    0,    0,    0,
466         0,    0,   43,   43,   43,   43,   43,   43,   43,   43,
467        43,   43,   43,   43,   43,   43,    0,   36,   53,   53,
468        53,    0,   26,   53,   53,   53,    0,   35,   53,   53,
469        53,   53,    0,   25,    0,   28,   46,   62,    0,    0,
470        72,   62,   62,   62,   41,   41,   41,   53,   53,   19,
471        53,   53,   19,   19,   19,   62,   41,   41,   41,   41,
472
473         0,   43,    0,   43,   43,   43,   43,   43,   43,   43,
474        43,   43,   43,   43,    0,    0,    0,   43,   43,   43,
475        43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
476        53,   53,   53,   53,   53,   53,   53,   53,   48,   53,
477        59,    0,    0,   72,   62,   22,   54,    0,   41,   41,
478        41,   41,   53,   53,   19,   53,   53,   19,   19,   19,
479        42,   42,   42,   42,   43,    0,    0,    0,   43,   43,
480        43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
481        43,    0,    0,    0,    0,    0,   43,   43,   43,   43,
482        43,   43,   43,   43,   53,   53,   53,    0,   37,   53,
483
484        53,    0,   24,    0,   29,   47,    0,   22,   72,   72,
485        62,    0,   62,   42,   42,   42,   42,   53,   53,   53,
486        53,   62,   62,   42,   42,   42,   42,    0,    0,    0,
487         0,    0,   43,   43,   43,   43,   43,   43,   43,   43,
488        43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
489        43,   43,   52,    0,   32,   53,   53,   53,    0,   72,
490        72,   20,   72,   72,   23,   22,    0,    0,    0,    0,
491         0,   22,    0,    0,    0,   42,   42,   42,   42,   53,
492        53,   53,   62,   62,   62,    0,    0,    0,   43,   43,
493        43,   43,   43,   43,   43,   43,   43,   43,   43,   43,
494
495        43,   43,   43,   43,   43,   43,    0,   30,   53,   53,
496        23,   20,   72,    0,   22,    0,    0,    0,   53,   53,
497        62,   62,   62,   62,   62,    0,    0,    0,    0,    0,
498        43,   43,   43,   43,   43,   43,   43,   43,    0,   33,
499        53,   72,    0,    0,    0,    0,    0,   53,   62,   62,
500        62,   43,   43,   43,   43,   43,   43,    0,   31,   72,
501        72,   21,   72,    0,    0,    0,   62,   62,   62,   62,
502        62,   43,   43,   43,   43,   43,   21,    0,    0,    0,
503         0,    0,   41,   41,   41,   41,   41,   41,   41,   41,
504        41,   41,   41,   41,    0
505
506     } ;
507
508 static yyconst flex_int32_t yy_ec[256] =
509     {   0,
510         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
511         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
512         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
513         1,    5,    6,    7,    8,    1,    9,    1,    1,   10,
514        11,   12,   13,   14,   15,   16,   17,   18,   19,   20,
515        21,   22,   23,   24,   25,   26,   27,   28,    1,    1,
516        29,   30,   12,   31,   32,   33,   34,   35,   36,   37,
517        38,   39,   40,   41,   41,   42,   43,   44,   45,   46,
518        41,   47,   48,   49,   50,   51,   52,   53,   54,   41,
519        12,   55,   12,    1,   56,    1,   57,   58,   59,   60,
520
521        61,   62,   63,   64,   65,   63,   63,   66,   67,   68,
522        69,   63,   63,   70,   71,   72,   73,   63,   63,   63,
523        63,   63,    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,    1,    1,    1,    1,    1,    1,    1,
528         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
529         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
530         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
531
532         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
533         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
534         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
535         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
536         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
537         1,    1,    1,    1,    1
538     } ;
539
540 static yyconst flex_int32_t yy_meta[74] =
541     {   0,
542         1,    2,    3,    3,    2,    4,    5,    6,    1,    7,
543         7,    1,    8,    9,   10,   11,   12,   13,   13,   13,
544        13,   13,   13,   13,   13,   13,   13,   14,   15,    7,
545         1,   16,   16,   16,   16,   16,   16,   17,   17,   17,
546        17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
547        17,   17,   17,   17,   18,   19,   20,   20,   20,   20,
548        20,   20,   21,   21,   21,   21,   21,   21,   21,   21,
549        21,   21,   21
550     } ;
551
552 static yyconst flex_int16_t yy_base[1020] =
553     {   0,
554         0,   72,  121,  191,   81,   88,  261,  333,  405,  459,
555       142,  148,  514,    0, 4774, 4718,   73, 6207, 4769, 4765,
556      6207,  585,   73, 6207, 6207, 4715, 6207,  151,  597,  153,
557       164, 4741, 6207, 6207,  659, 4726,   46,   34,  715,   58,
558      4724, 4710,   50, 4709, 4717,   60,  776,  791,   57,  189,
559       816,   66,   63, 4683,   59, 4680,  113, 4735,  129,  204,
560      4704, 4703, 4715,  134,    0, 6207, 4743, 4739, 6207,    0,
561       880,  933,  137,    0, 4689, 6207,  135, 6207,  140, 6207,
562       214, 4688,  154,  194, 6207,  239,  193,  259,  960, 1004,
563       258,  232, 1062, 1112, 4700,  160,  180, 1168, 4696, 4708,
564
565      4694, 4706, 4701, 1215,    0,  156, 4681, 1239,  225, 6207,
566      4729,  228, 6207, 4731,  273,  283, 4678, 4717,  332, 1266,
567      4676, 1293,  415, 4675, 1322, 1335, 1375, 4681, 4681,  324,
568       343,  334, 4657,  228, 1437, 1493, 4631, 4625, 4607, 4594,
569      4587, 4573,  335, 4553, 4549, 4535, 4516, 4514, 4510,  371,
570      6207,  157,  425,  215,   65,  442, 4488, 4493, 4484, 4479,
571      4480,  355,  218,  369,  133,  369,  325,  434,  256,  431,
572       377,  584, 4495, 1554,  448,  378,    0, 4543,  412, 4545,
573      6207, 6207,  479,    0, 4492,  633, 6207, 6207, 4491,  438,
574      4490, 4537,  591,  440,  505,  430, 4540,  736,  737,  659,
575
576      4487,  843,    0, 1581, 1611,  794,  842, 1650, 4525,  892,
577       902,  740, 1700, 1756, 4498,    0, 4503, 4490, 4493, 4490,
578       752, 4481, 4469, 4448, 4433,  308,  465,  475,  920,  959,
579      1803,  974,  748, 1843, 4465, 4441, 1888,  454, 1934, 1979,
580         0, 4423, 4410, 4411, 4394, 4407, 4395, 4402, 4401, 4413,
581      4412, 4407,  454, 4394, 4390, 4404, 4402, 4401, 4398,  825,
582       573, 4357, 4362, 4352, 4354, 4360,  594,  588, 4363,  572,
583       232,  581, 1098,  778,  597, 4403, 4402, 2026, 2036, 4401,
584      2081,    0, 4382, 4373, 4358, 4371, 4358, 4365, 4362, 4326,
585      4325, 4320, 4294, 4303,  733, 4269, 6207,  508,  646, 2126,
586
587       730,    0,    0,  800,  773, 4308, 4307, 2164,  831, 4306,
588      4305,  609,  984, 2177, 1193,  882, 2223, 2270, 4304,  851,
589      4286, 4281,  830,  960, 4271, 4257, 4260, 4257, 4248, 4246,
590      4257, 4246, 4229, 4226,    0, 4229, 4227,    0,  834,  111,
591       774,  606, 4211, 4197, 4181, 4195, 4159,  946,  821, 1193,
592       404,  742, 1236, 4212, 4211, 4199, 1095, 2280, 2325, 1100,
593      4157,  833, 1204, 4163, 4156, 4159, 4156, 4147, 4145, 4141,
594      4118,  867, 4133, 4139, 4096, 2372, 2384, 2396, 4128, 4127,
595      2406, 4127, 4125, 4084, 4060,  804, 1263,  879, 1290, 1076,
596      2419,    0, 1321, 2466, 1345, 1355, 2512, 2559, 1377, 6207,
597
598      4028, 4033, 4034, 4027, 1378, 6207, 4031, 4022, 4007, 4020,
599      4007, 4018, 4004, 3998, 3993,    0, 3959, 3959,  875,  202,
600       909,  851,  908, 3952, 3923, 3912, 1219, 1220, 1142,  958,
601      3955, 3952, 2571, 2581, 2626, 3915, 3922, 3915, 3930, 3921,
602      3906, 3889, 3863, 3851, 3851, 3821, 3849, 3846, 3846, 3839,
603      3753, 2671,  877, 2711, 2723, 1515, 3770, 3767, 3766, 3746,
604      2733, 1274, 3750, 3746, 2780, 1303, 1318, 1397, 1397, 1411,
605      2792,    0, 1580, 2839, 1521, 1366, 2885, 2932, 2959, 1588,
606      1602, 1629, 1438, 1634, 1653, 1439, 1792, 1686, 1623, 1803,
607      1687, 1804, 1805, 3701, 3694, 3684, 3664, 1036, 3670, 3627,
608
609      1139, 1326, 1152, 1467, 1553, 3640, 3632, 3631, 1681, 1832,
610      3585, 3553, 1844, 3532,  974, 1845, 3512, 3507, 1869, 1889,
611         0,    0,    0,    0, 3483, 3016, 1863, 1780, 3456, 3426,
612      3402, 1908, 3056, 1954, 1820, 3101, 3148, 1999, 3398, 3340,
613      3321, 1920, 1414, 1577, 1616, 1621, 2056, 1636, 3160,    0,
614      2103, 3207, 2136, 1964, 3253, 3300, 1890, 6207, 3327, 1517,
615      1279, 1891, 6207, 1253, 1407, 1574, 2082, 6207, 1610, 1603,
616      1566, 1616, 2083, 6207, 2084, 6207, 3277, 1494, 3243, 3236,
617      1106, 1564, 1374, 1732, 3266, 3245, 3384, 3166, 3163, 3399,
618      3164, 3140, 1760,  882, 3093, 3455, 1882, 3494,    0, 2003,
619
620      3103, 3084, 2146, 1290, 2197, 1553, 3534,    0, 2245, 3547,
621      2300, 2114, 3592, 3639, 3095, 3090, 3651, 1677, 1678, 2015,
622      2259, 3088, 2337, 3663,    0, 2350, 3710, 2439, 2156, 3757,
623      3784, 1296,  923, 2226, 1614, 1802, 2328, 2467, 3036, 1228,
624      3031, 3005, 2992, 2502, 1800, 2626, 3000, 2490, 2971, 2956,
625      2952, 2533, 2916, 2899, 3856, 2886, 2882, 2224, 2225,    0,
626      3914, 2601, 2646, 1945, 2866, 2871, 2863, 3954, 2850, 2246,
627      2347, 2841, 2348, 3966,    0, 2683, 3979, 2694, 2545, 4024,
628      4071, 2753, 2828, 2807, 2781, 2765, 1768, 1828, 2805, 1018,
629      1043, 4083,    0, 2818, 2079, 2468, 1939, 2306, 6207, 1057,
630
631      2285, 2327, 6207, 2469, 6207, 2738, 2725, 2603, 2267, 2063,
632      1625, 2840, 2875, 2747, 2659, 4095, 2541, 2672, 2886, 2887,
633      2888, 4105, 1508, 4145,    0, 2683, 1700, 3026, 2639, 2620,
634      2594, 3038, 2530, 2514, 2361, 2385, 3076, 2560, 4185,    0,
635      3123, 4198, 3180, 2905, 4243, 4290, 2504, 2458, 4301, 2815,
636      2311, 1630, 4328, 2934, 6207, 2961, 2229, 2183, 2154, 1832,
637      2720, 6207, 2005, 2608, 2125, 2054, 3102, 2878, 2224, 2050,
638      4398, 1980, 4425, 3227, 1994, 1973, 1928, 3046, 1882, 3208,
639      3209, 3210, 4440, 4452, 4464, 1836, 1795, 4476, 1758, 1703,
640      2712, 2913, 3273, 3057, 4488,    0, 3467, 4501, 3478, 3283,
641
642      4548, 1673, 1644, 1598, 3312, 1506, 3254, 6207, 3279, 1399,
643      6207, 6207, 3145, 3504, 3514, 1410, 1388, 4560, 3593, 3594,
644      4572, 2074, 4584, 4596, 3685, 3567, 1332, 1262, 1249, 3614,
645      1223, 1170, 3124, 1063,  971, 4608,    0, 3129, 3595, 6207,
646      3640, 3489, 3691,  875,  814,  739, 3732, 3736, 4620, 4632,
647      4644, 3924, 3934, 3999,  617,    0,  585, 3758, 6207, 2030,
648      3504, 6207, 2088,  576,  497, 4656, 4668, 2319, 4680, 4692,
649      4011, 6207, 4049, 4115, 3524, 6207, 6207, 4125,  467,  297,
650       231, 3844, 4702, 4740, 4778, 4155, 4165, 4218,   58, 4816,
651      4228, 6207, 4266, 3769, 6207, 4871, 4892, 4913, 4934, 4955,
652
653      4976, 4997, 5018, 5039, 5048, 2666, 5068, 5089, 2187, 5110,
654      5131, 5152, 5173, 5194, 5215, 5236, 5257, 5278, 2957, 5299,
655      5320, 5341, 5350, 5358, 5367, 5387, 5408, 5429, 2429, 5450,
656      5471, 5492, 5513, 5534, 5543, 5562, 5571, 5580, 2509, 2530,
657      5588, 5596, 5604, 5613, 5621, 5628, 5636, 5644, 5653, 5663,
658      2624, 2669, 5671, 5679, 5687, 2751, 2857, 5696, 5706, 5726,
659      2927, 5735, 5743, 3119, 5752, 5762, 5782, 2297, 2368, 5791,
660      5803, 5812, 5822, 3178, 3244, 5831, 5841, 5850, 5870, 2455,
661      5879, 5891, 3250, 3344, 5900, 5910, 5918, 3402, 5927, 5937,
662      5957, 5978, 5999, 3416, 3565, 6019, 3590, 6026, 6036, 2617,
663
664      2818, 6045, 6065, 6086, 6107, 3328, 6128, 3627, 3628, 6137,
665      6147, 3633, 3681, 6155, 6165, 6185, 3745, 3746, 3801
666     } ;
667
668 static yyconst flex_int16_t yy_def[1020] =
669     {   0,
670       895,    1,    1,    1,  896,  896,  897,  897,  898,  898,
671       899,  899,  895,   13,  895,  900,  895,  895,  895,  895,
672       895,  901,  902,  895,  895,  903,  895,  904,  900,   29,
673        29,  905,  895,  895,  895,   35,   35,   35,   35,   39,
674        39,   39,   39,   39,   39,   39,  900,   29,  900,  895,
675       901,   35,   35,   39,   39,   39,  895,  906,  895,  907,
676        39,   39,   39,  900,  908,  895,  895,  908,  895,  908,
677       895,  901,  895,  909,  910,  895,  910,  895,  910,  895,
678       911,  912,  912,  912,  895,  895,  913,  914,  915,  895,
679        90,   90,   90,  895,   94,   94,   94,   94,   98,   98,
680
681        98,   98,   98,   90,   93,   93,  900,  900,  895,  895,
682       895,  916,  895,  895,  917,  895,  918,  919,  913,  918,
683       920,  920,  921,  922,  900,  900,  900,  923,  127,  127,
684       127,  127,  924,  925,  895,  135,  136,  136,  136,  136,
685       136,  136,  136,  136,  136,  136,  136,  136,  136,  895,
686       895,  900,  900,  900,  900,  895,  895,  895,  895,  895,
687       895,  916,  900,  127,  900,  900,  900,  895,  895,  895,
688       895,  926,  927,  900,  136,  900,  928,  928,  895,  895,
689       895,  895,  917,  929,  930,  930,  895,  895,  930,  930,
690       931,  895,  931,  931,  895,  895,  895,  913,  913,  913,
691
692       932,  933,   93,  932,  934,  895,  895,   90,  208,  208,
693       208,  208,  895,  213,  214,  935,  214,  214,  214,  214,
694       214,  214,  214,   93,   93,  916,  916,  936,  895,  895,
695       900,  231,  231,  127,  234,  937,  895,  938,  895,  136,
696       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
697       136,  136,  136,  136,  136,  136,  136,  136,  136,  900,
698       900,  895,  895,  895,  895,  895,  916,  900,  234,  900,
699       900,  900,  895,  900,  895,  939,  940,  895,   93,  279,
700       213,  214,  214,  214,  214,  214,  214,  214,  214,  214,
701       214,  214,  214,  214,   93,   93,  895,  936,  936,  900,
702
703       900,  231,  231,  231,  900,  941,  942,  942,  308,  943,
704       942,  944,  239,  895,  314,  314,  895,  314,  136,  136,
705       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
706       136,  136,  136,  136,  136,  136,  136,  136,  900,  900,
707       900,  900,  895,  895,  895,  895,  895,  916,  900,  900,
708       900,  900,  895,  895,  939,  939,  895,  279,  213,  214,
709       214,  945,  214,  214,  214,  214,  214,  214,  214,  214,
710       214,   93,   93,   93,   93,  231,  231,  231,  895,  946,
711       946,  381,  946,  947,  948,  949,  895,  950,  317,  950,
712       895,  391,  950,  895,  394,  394,  895,  394,  895,  895,
713
714       136,  136,  136,  136,  895,  895,  136,  136,  136,  136,
715       136,  136,  136,  136,  136,  136,  136,  136,  900,  900,
716       900,  900,  900,  895,  895,  895,  916,  900,  900,  900,
717       951,  952,  895,   93,  214,  214,  945,  945,  214,  214,
718       214,  214,  214,  214,  214,  214,   93,   93,   93,   93,
719        93,  900,  900,  231,  231,  900,  953,  953,  954,  955,
720       895,  895,  956,  957,  895,  958,  958,  959,  397,  959,
721       895,  471,  959,  895,  474,  474,  895,  474,  895,  479,
722       479,  479,  479,  479,  479,  479,  479,  479,  479,  479,
723       479,  479,  479,  900,  900,  900,  900,  900,  895,  895,
724
725       960,  900,  900,  900,  895,  895,  961,  961,  895,  214,
726       945,  945,  214,  214,  945,  214,  214,  214,  214,  214,
727        93,   93,   93,   93,   93,  900,  526,  526,  895,  962,
728       963,  461,  895,  533,  533,  895,  533,  895,  895,  964,
729       964,  895,  895,  965,  965,  966,  477,  966,  895,  549,
730       966,  895,  552,  552,  895,  552,  895,  895,  895,  559,
731       559,  895,  895,  559,  559,  559,  895,  895,  559,  559,
732       559,  559,  895,  895,  895,  895,  559,  900,  895,  895,
733       967,  900,  900,  900,  968,  969,  895,  970,  970,  895,
734       970,  970,  590,  590,  971,  900,  900,  900,  598,  598,
735
736       895,  972,  895,  973,  536,  973,  973,  607,  973,  895,
737       610,  610,  895,  610,  974,  975,  895,  895,  976,  976,
738       977,  978,  977,  895,  624,  977,  895,  627,  627,  627,
739       895,  631,  631,  631,  631,  631,  631,  631,  631,  631,
740       900,  895,  895,  979,  900,  900,  900,  895,  895,  980,
741       980,  895,  981,  981,  895,  981,  981,  655,  655,  982,
742       900,  661,  661,  661,  895,  983,  984,  895,  985,  985,
743       986,  987,  986,  986,  674,  986,  895,  677,  677,  895,
744       677,  895,  895,  988,  988,  895,  895,  989,  989,  990,
745       990,  990,  692,  990,  631,  631,  631,  895,  895,  631,
746
747       631,  895,  895,  895,  895,  631,  895,  895,  991,  979,
748       900,  992,  993,  994,  995,  895,  994,  996,  996,  996,
749       996,  900,  900,  900,  724,  724,  900,  895,  895,  997,
750       997,  895,  895,  998,  998,  999,  680,  999,  999,  739,
751       999,  895,  742,  742,  895,  742, 1000, 1001,  895,  895,
752      1002, 1002,  895,  895,  895,  753,  753,  753,  895, 1003,
753      1003,  895, 1003, 1004,  900, 1005, 1005, 1005, 1005, 1006,
754      1005, 1007, 1007,  895,  895,  994,  994,  895,  895,  996,
755       996,  996,  724,  724,  724, 1008, 1009,  895,  895, 1010,
756      1010, 1011,  745, 1011, 1011,  795, 1011,  895,  798,  798,
757
758       798,  895, 1000, 1000,  895,  895,  895,  895,  753,  753,
759       895,  895, 1004,  895,  895, 1012, 1013,  895,  996,  996,
760       724,  900,  724,  724,  900,  895,  895, 1008, 1008,  895,
761       895, 1014, 1014, 1015, 1015, 1015,  836,  836,  895,  895,
762       753, 1016,  895,  895, 1012, 1012,  895,  996,  724,  724,
763       724,  895,  895,  895,  895, 1017, 1017,  895,  895, 1016,
764      1016,  895, 1016, 1018, 1019,  895,  724,  900,  724,  724,
765       900,  895,  895,  895,  895,  895,  895,  895,  895, 1018,
766      1018,  895,  900,  900,  900,  895,  895,  895,  900,  900,
767       900,  895,  895,  895,    0,  895,  895,  895,  895,  895,
768
769       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
770       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
771       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
772       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
773       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
774       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
775       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
776       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
777       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
778       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
779
780       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
781       895,  895,  895,  895,  895,  895,  895,  895,  895
782     } ;
783
784 static yyconst flex_int16_t yy_nxt[6281] =
785     {   0,
786        16,   17,   18,   19,   17,   20,   21,   22,   23,   24,
787        25,   16,   26,   27,   16,   16,   28,   29,   30,   31,
788        29,   29,   29,   29,   29,   29,   29,   32,   33,   34,
789        16,   35,   36,   36,   36,   37,   38,   39,   39,   39,
790        39,   40,   41,   42,   39,   43,   44,   45,   46,   39,
791        39,   39,   39,   39,   47,   16,   48,   48,   48,   48,
792        48,   48,   16,   16,   16,   16,   16,   16,   16,   16,
793        49,   16,   16,   50,  109,  136,   50,  109,  139,   51,
794       118,  144,   17,   66,   67,   17,   68,  136,   69,   17,
795        66,   67,   17,   68,   69,   69,  145,  140,  138,  148,
796
797       119,   69,  141,  146,  136,   52,   53,  136,   69,   70,
798        54,  108,  108,  149,  168,   69,   70,  168,   55,  108,
799       154,   56,   57,  164,  261,   57,  169,  120,   58,  155,
800       171,  166,  163,  171,   59,   71,  421,   60,  150,  151,
801       180,  150,   71,   83,   18,   19,   83,   84,   85,   83,
802        18,   19,   83,   84,   85,  193,  124,  124,  193,  151,
803       124,  124,   61,  187,   62,  108,   63,   39,  188,   39,
804       130,  130,  130,  130,  130,  130,  130,  130,  130,  130,
805       124,  131,  131,  131,  131,  131,  132,  108,  108,  186,
806       156,   64,   57,  156,  186,   57,   86,  154,   58,  194,
807
808       118,  214,   86,  270,   59,  125,  176,   60,  192,  173,
809       173,  108,  217,  173,  173,  190,  151,  180,  190,  224,
810       199,  214,  157,  158,  218,  495,  109,  159,  225,  109,
811       113,  227,   61,  173,   62,  160,   63,   39,  161,   39,
812       195,  196,  197,  195,  237,  191,  878,  200,  192,  211,
813       211,  211,  211,  211,  212,  239,  108,  171,  174,  201,
814       171,   64,   17,   18,   19,   17,   20,  201,   72,  108,
815       201,  260,  108,  201,  201,  210,  210,  210,  210,  210,
816       210,  210,  210,  210,  210,  268,  108,  203,  351,  201,
817       116,  116,  116,  116,  116,  116,  116,  116,  116,  116,
818
819       116,  116,  116,  116,  116,  116,  116,  116,  116,  116,
820       113,  227,  878,  204,  201,   73,   74,   74,   74,   74,
821        74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
822        74,   74,   74,   74,   17,   18,   19,   17,   20,  118,
823        72,  235,  235,  235,  235,  235,  235,  235,  235,  235,
824       235,  235,  235,  235,  235,  235,  235,  113,  227,  895,
825       235,  235,  235,  235,  235,  235,  235,  235,  235,  235,
826       247,  248,  150,  151,  180,  150,  249,  250,  171,  108,
827       251,  171,  252,  253,  107,  272,  200,   73,   74,   74,
828        74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
829
830        74,   74,   74,   74,   74,   74,   17,   18,   19,   17,
831        20,   76,   72,  150,  151,  180,  150,   77,   78,   79,
832       124,  124,  267,  108,  124,  124,  150,  151,  180,  150,
833       269,  275,  108,   80,  275,  168,  271,  274,  168,  150,
834       151,  180,  150,  156,  124,  194,  156,  169,  116,  116,
835       116,  116,  116,  116,  116,  116,  116,  116,  108,   81,
836        17,   18,   19,   17,   20,   76,   72,  297,  227,  125,
837       237,   77,   78,   79,  349,  157,  158,  113,  299,  108,
838       159,  313,  878,  247,  248,  331,  332,   80,  160,  249,
839       250,  161,  186,  251,  192,  252,  895,  895,  895,  895,
840
841       895,  895,  895,  895,  895,  895,  195,  196,  197,  195,
842       113,  299,  878,   81,   34,   17,   18,   19,   17,   20,
843        34,   34,   87,   24,   25,   34,   88,   27,   34,   34,
844        89,   90,   91,   92,   90,   90,   90,   90,   90,   90,
845        90,   32,   93,   34,   34,   94,   95,   95,   95,   96,
846        97,   98,   98,   98,   98,   99,  100,  101,   98,  102,
847        98,  103,   98,   98,   98,   98,   98,   98,   73,   34,
848       104,  104,  104,  104,  104,  104,  105,  105,  105,  105,
849       105,  105,  105,  105,  106,  105,  105,  113,  114,  173,
850       173,  878,  193,  173,  173,  193,  113,  227,  275,  115,
851
852       603,  275,  116,  116,  116,  116,  116,  116,  116,  116,
853       116,  116,  126,  173,  127,  127,  127,  127,  127,  127,
854       127,  127,  127,  127,  128,  237,  108,  108,  129,  129,
855       129,  129,  129,  129,  185,  108,  313,  185,  174,  185,
856       185,  342,  108,  349,  793,  192,  185,  349,  297,  299,
857       349,  108,  348,  129,  129,  129,  129,  129,  129,  107,
858       108,  185,  198,  198,  198,  198,  423,  107,  198,  198,
859       107,  107,  198,  107,  107,  107,  135,  135,  135,  135,
860       135,  135,  135,  135,  135,  135,  128,  198,  198,  107,
861       135,  135,  135,  135,  135,  135,  136,  136,  136,  136,
862
863       137,  136,  136,  136,  136,  136,  136,  136,  136,  136,
864       136,  136,  136,  108,  136,  129,  129,  129,  129,  129,
865       129,  107,  107,  107,  107,  107,  107,  107,  107,  107,
866       107,  107,  136,  136,  136,  136,  136,  136,  136,  136,
867       136,  136,  895,  895,  118,  300,  136,  136,  136,  136,
868       136,  136,  372,  373,  843,  374,  136,  280,  280,  280,
869       280,  280,  280,  895,  895,  303,  303,  303,  303,  303,
870       304,  107,  107,  107,  107,  107,  107,  150,  151,  152,
871       153,  107,  107,  107,  108,  107,  107,  287,  288,  107,
872       200,  200,  422,  289,  290,  124,  108,  291,  124,  292,
873
874       128,  124,  430,  107,  107,  107,  107,  124,  129,  129,
875       129,  129,  129,  129,  129,  129,  129,  129,  113,  114,
876       237,  124,  124,  107,  107,  107,  107,  108,  108,  843,
877       115,  313,  108,  116,  116,  116,  116,  116,  116,  116,
878       116,  116,  116,  201,  339,  340,  352,  341,  383,  383,
879       383,  201,  399,  419,  201,  399,  420,  201,  201,  276,
880       277,  278,  276,  276,  276,  276,  276,  276,  276,  403,
881       497,  203,  437,  201,  404,  108,  428,  438,  400,  108,
882       162,  179,  151,  180,  179,  181,  447,  182,  108,  448,
883       843,  181,  452,  182,  387,  237,  494,  204,  201,  392,
884
885       392,  392,  392,  392,  393,  108,  389,  182,  182,  280,
886       280,  280,  280,  280,  280,  280,  280,  280,  280,  280,
887       280,  280,  280,  280,  280,  280,  280,  280,  280,  108,
888       496,  108,  659,  214,  182,  113,  114,  230,  230,  230,
889       230,  230,  230,  230,  230,  230,  230,  183,  113,  227,
890       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
891       124,  405,  108,  108,  405,  124,  124,  498,  124,  124,
892       124,  124,  697,  136,  124,  124,  230,  230,  230,  230,
893       230,  230,  230,  230,  230,  230,  895,  406,  203,  124,
894       124,  302,  302,  302,  302,  302,  302,  302,  302,  302,
895
896       302,  318,  318,  318,  318,  318,  318,  318,  318,  318,
897       318,  427,  108,  591,  206,  124,  203,  504,  592,  207,
898       203,  208,  208,  208,  208,  208,  208,  208,  208,  208,
899       208,  128,  203,  387,  237,  209,  209,  209,  209,  209,
900       209,  203,  203,  203,  203,  203,  203,  203,  203,  203,
901       203,  203,  203,  203,  203,  203,  203,  203,  895,  237,
902       209,  209,  209,  209,  209,  209,  203,  203,  203,  203,
903       203,  203,  203,  203,  203,  203,  203,  895,  603,  203,
904       203,  203,  203,  203,  203,  203,  203,  203,  203,  895,
905       108,  895,  237,  203,  203,  203,  203,  203,  203,  173,
906
907       578,  399,  173,  389,  399,  173,  757,  136,  113,  227,
908       353,  173,  354,  354,  354,  354,  354,  354,  203,  203,
909       203,  203,  203,  203,  203,  173,  173,  400,  203,  213,
910       213,  213,  213,  213,  213,  213,  213,  213,  213,  128,
911       203,  113,  227,  213,  213,  213,  213,  213,  213,  214,
912       214,  214,  214,  215,  214,  214,  214,  214,  214,  214,
913       214,  214,  214,  214,  214,  214,  644,  216,  209,  209,
914       209,  209,  209,  209,  203,  203,  203,  203,  203,  203,
915       203,  203,  203,  203,  203,  214,  214,  214,  214,  214,
916       214,  214,  214,  214,  214,  895,  108,  793,  581,  214,
917
918       214,  214,  214,  214,  214,  405,  108,  503,  405,  214,
919       391,  391,  391,  391,  391,  391,  391,  391,  391,  391,
920       128,  113,  227,  583,  203,  203,  203,  203,  203,  203,
921       895,  406,  209,  209,  209,  209,  209,  209,  209,  209,
922       209,  209,  107,  107,  107,  107,  107,  108,  107,  107,
923       737,  502,  107,  431,  432,  433,  431,  431,  431,  431,
924       431,  431,  431,  706,  826,  429,  107,  107,  107,  117,
925       117,  117,  117,  117,  108,  117,  117,  826,  136,  117,
926       463,  464,  465,  463,  463,  463,  463,  463,  463,  463,
927       237,  501,  136,  117,  117,  117,  121,  121,  121,  121,
928
929       121,  313,  121,  121,  634,  603,  121,  398,  398,  398,
930       398,  398,  398,  398,  398,  398,  398,  605,  136,  237,
931       121,  121,  121,  124,  633,  107,  123,  107,  107,  123,
932       389,  107,  107,  387,  237,  123,  387,  237,  467,  467,
933       467,  467,  467,  467,  696,  389,  136,  826,  389,  123,
934       123,  107,  231,  232,  233,  231,  231,  231,  231,  231,
935       231,  231,  471,  471,  471,  471,  471,  471,  471,  471,
936       471,  471,  472,  472,  472,  472,  472,  473,  399,  405,
937       108,  399,  405,  550,  550,  550,  550,  550,  551,  108,
938       126,  582,  234,  234,  234,  234,  234,  234,  234,  234,
939
940       234,  234,  128,  843,  400,  406,  234,  234,  234,  234,
941       234,  234,  387,  237,  478,  478,  478,  478,  478,  478,
942       478,  478,  478,  478,  469,  843,  895,  237,  108,  108,
943       237,  234,  234,  234,  234,  234,  234,  107,  469,  562,
944       567,  389,  562,  567,  646,  107,  136,  841,  107,  107,
945       635,  107,  107,  107,  240,  240,  240,  240,  240,  240,
946       240,  240,  240,  240,  128,  563,  568,  107,  240,  240,
947       240,  240,  240,  240,  136,  136,  136,  136,  136,  136,
948       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
949       136,  108,  136,  234,  234,  234,  234,  234,  234,  107,
950
951       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
952       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
953       895,  108,  237,  722,  136,  136,  136,  136,  136,  136,
954       452,  584,  453,  453,  453,  453,  453,  453,  549,  549,
955       549,  549,  549,  549,  549,  549,  549,  549,  108,  107,
956       107,  107,  107,  107,  107,  173,  136,  107,  172,  107,
957       107,  172,  108,  107,  107,  641,  632,  172,  895,  108,
958       585,  586,  587,  585,  585,  585,  585,  585,  585,  585,
959       605,  172,  172,  107,  201,  201,  201,  201,  201,  895,
960       201,  201,  895,  237,  201,  387,  237,  545,  545,  545,
961
962       545,  545,  545,  895,  469,  136,  895,  469,  201,  201,
963       201,  124,  639,  136,  237,  895,  124,  124,  108,  124,
964       124,  124,  124,  636,  895,  124,  124,  895,  645,  895,
965       895,  387,  237,  895,  559,  895,  387,  237,  895,  203,
966       124,  124,  136,  469,  637,  387,  237,  560,  547,  136,
967       895,  895,  237,  638,  895,  136,  895,  895,  571,  700,
968       237,  895,  640,  547,  136,  206,  124,  279,  279,  279,
969       279,  279,  279,  279,  279,  279,  279,  561,  564,  108,
970       895,  279,  279,  279,  279,  279,  279,  895,  573,  237,
971       895,  573,  565,  237,  237,  765,  505,  566,  506,  506,
972
973       506,  506,  506,  506,  469,  547,  279,  279,  279,  279,
974       279,  279,  203,  895,  574,  722,  203,  281,  281,  281,
975       281,  281,  281,  281,  281,  281,  281,  128,  203,  570,
976       737,  281,  281,  281,  281,  281,  281,  214,  214,  214,
977       214,  214,  214,  214,  214,  214,  214,  214,  214,  214,
978       214,  214,  214,  214,  108,  216,  279,  279,  279,  279,
979       279,  279,  203,  203,  203,  203,  203,  203,  203,  203,
980       203,  203,  203,  214,  214,  214,  214,  214,  214,  214,
981       214,  214,  214,  895,  237,  672,  108,  214,  214,  214,
982       214,  214,  214,  895,  658,  547,  895,  599,  599,  599,
983
984       599,  599,  600,  647,  895,  575,  895,  895,  575,  895,
985       826,  214,  203,  203,  203,  203,  203,  203,  300,  895,
986       301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
987       895,  576,  895,  557,  762,  763,  557,  608,  608,  608,
988       608,  608,  609,  569,  237,  562,  567,  572,  562,  567,
989       701,  826,  136,  577,  108,  622,  711,  108,  107,  558,
990       305,  305,  305,  305,  305,  305,  305,  305,  305,  305,
991       573,  563,  568,  573,  305,  305,  305,  305,  305,  305,
992       598,  598,  598,  598,  598,  598,  598,  598,  598,  598,
993       575,  557,  562,  575,  557,  562,  574,  774,  596,  305,
994
995       305,  305,  305,  305,  305,  307,  308,  309,  309,  309,
996       309,  309,  309,  309,  309,  310,  576,  558,  563,  311,
997       311,  311,  311,  311,  311,  537,  537,  537,  537,  537,
998       537,  537,  537,  537,  537,  538,  108,  539,  539,  539,
999       539,  539,  539,  774,  311,  311,  311,  311,  311,  311,
1000       237,  314,  315,  316,  314,  314,  314,  314,  314,  314,
1001       314,  317,  727,  727,  727,  318,  318,  318,  318,  318,
1002       318,  607,  607,  607,  607,  607,  607,  607,  607,  607,
1003       607,  625,  625,  625,  625,  625,  626,  756,  774,  136,
1004       318,  318,  318,  318,  318,  318,  319,  319,  319,  319,
1005
1006       319,  319,  319,  319,  319,  319,  128,  812,  763,  774,
1007       319,  319,  319,  319,  319,  319,  615,  616,  617,  615,
1008       615,  615,  615,  615,  615,  615,  107,  107,  107,  107,
1009       387,  237,  862,  863,  773,  305,  305,  305,  305,  305,
1010       305,  353,  547,  356,  356,  356,  356,  356,  357,  354,
1011       354,  354,  354,  358,  358,  358,  358,  358,  358,  358,
1012       358,  358,  358,  128,  814,  113,  227,  358,  358,  358,
1013       358,  358,  358,  556,  556,  556,  556,  556,  556,  556,
1014       556,  556,  556,  567,  573,  575,  567,  573,  575,  821,
1015       877,  863,  358,  358,  358,  358,  358,  358,  359,  359,
1016
1017       359,  359,  359,  359,  359,  359,  359,  359,  771,  568,
1018       574,  576,  359,  359,  359,  359,  359,  359,  387,  237,
1019       620,  620,  620,  620,  620,  620,  753,  764,  108,  136,
1020       547,  675,  675,  675,  675,  675,  676,  358,  358,  358,
1021       358,  358,  358,  376,  377,  378,  376,  376,  376,  376,
1022       376,  376,  376,  624,  624,  624,  624,  624,  624,  624,
1023       624,  624,  624,  666,  667,  668,  666,  666,  666,  666,
1024       666,  666,  666,  693,  693,  693,  693,  693,  694,  108,
1025       108,  381,  381,  382,  383,  383,  383,  383,  383,  383,
1026       383,  310,  387,  237,  388,  388,  388,  388,  388,  388,
1027
1028       388,  388,  388,  388,  389,  184,  184,  184,  390,  390,
1029       390,  390,  390,  390,  614,  614,  614,  614,  614,  614,
1030       614,  614,  614,  614,  811,  702,  704,  698,  702,  704,
1031       698,  770,  810,  390,  390,  390,  390,  390,  390,  237,
1032       394,  395,  396,  394,  394,  394,  394,  394,  394,  394,
1033       397,  703,  705,  699,  398,  398,  398,  398,  398,  398,
1034       603,  603,  670,  670,  670,  670,  670,  670,  761,  762,
1035       763,  761,  605,  605,  387,  237,  136,  809,  771,  398,
1036       398,  398,  398,  398,  398,  895,  622,  390,  390,  390,
1037       390,  390,  390,  390,  390,  390,  390,  434,  434,  434,
1038
1039       434,  434,  434,  434,  434,  434,  434,  698,  649,  649,
1040       698,  434,  434,  434,  434,  434,  434,  674,  674,  674,
1041       674,  674,  674,  674,  674,  674,  674,  237,  702,  702,
1042       758,  702,  702,  699,  867,  136,  434,  434,  434,  434,
1043       434,  434,  435,  435,  435,  435,  435,  435,  435,  435,
1044       435,  435,  895,  237,  703,  703,  435,  435,  435,  435,
1045       435,  435,  603,  895,  622,  387,  237,  689,  689,  689,
1046       689,  689,  689,  108,  672,  672,  603,  622,  136,  650,
1047       650,  434,  434,  434,  434,  434,  434,  452,  672,  453,
1048       453,  453,  453,  453,  453,  453,  453,  453,  453,  452,
1049
1050       603,  454,  454,  454,  454,  454,  454,  454,  454,  454,
1051       454,  452,  737,  455,  455,  455,  455,  455,  456,  453,
1052       453,  453,  453,  458,  458,  458,  458,  458,  458,  458,
1053       458,  458,  458,  310,  387,  237,  467,  467,  467,  467,
1054       467,  467,  467,  467,  467,  467,  389,  184,  184,  184,
1055       466,  466,  466,  466,  466,  466,  692,  692,  692,  692,
1056       692,  692,  692,  692,  692,  692,  649,  649,  704,  754,
1057       704,  704,  754,  704,  237,  466,  466,  466,  466,  466,
1058       466,  387,  237,  468,  468,  468,  468,  468,  468,  468,
1059       468,  468,  468,  469,  705,  755,  705,  470,  470,  470,
1060
1061       470,  470,  470,  709,  113,  227,  709,  714,  715,  716,
1062       717,  714,  714,  714,  714,  714,  714,  136,  136,  354,
1063       237,  354,  470,  470,  470,  470,  470,  470,  237,  474,
1064       475,  476,  474,  474,  474,  474,  474,  474,  474,  477,
1065       355,  672,  355,  478,  478,  478,  478,  478,  478,  648,
1066       649,  649,  649,  649,  649,  649,  774,  605,  779,  779,
1067       779,  710,  740,  740,  740,  740,  740,  741,  478,  478,
1068       478,  478,  478,  478,  895,  895,  470,  470,  470,  470,
1069       470,  470,  470,  470,  470,  470,  505,  737,  508,  508,
1070       508,  508,  508,  509,  506,  506,  506,  506,  434,  434,
1071
1072       434,  434,  434,  434,  434,  434,  434,  434,  712,  728,
1073       113,  227,  434,  434,  434,  434,  434,  434,  724,  724,
1074       724,  724,  724,  724,  724,  724,  724,  724,  802,  802,
1075       712,  712,  712,  712,  506,  728,  506,  434,  434,  434,
1076       434,  434,  434,  435,  435,  435,  435,  435,  435,  435,
1077       435,  435,  435,  712,  728,  712,  713,  435,  435,  435,
1078       435,  435,  435,  725,  725,  725,  725,  725,  726,  727,
1079       727,  727,  727,  754,  774,  116,  754,  813,  116,  507,
1080       108,  507,  434,  434,  434,  434,  434,  434,  526,  527,
1081       528,  526,  526,  526,  526,  526,  526,  526,  603,  755,
1082
1083       735,  735,  735,  735,  735,  735,  107,  107,  107,  107,
1084       672,  739,  739,  739,  739,  739,  739,  739,  739,  739,
1085       739,  761,  762,  763,  761,  108,  452,  603,  453,  453,
1086       453,  453,  453,  453,  453,  453,  453,  453,  452,  737,
1087       453,  453,  453,  453,  453,  453,  453,  453,  453,  453,
1088       533,  534,  535,  533,  533,  533,  533,  533,  533,  533,
1089       536,  539,  774,  539,  537,  537,  537,  537,  537,  537,
1090       747,  748,  749,  747,  747,  747,  747,  747,  747,  747,
1091       682,  759,  683,  683,  683,  683,  683,  683,  136,  537,
1092       537,  537,  537,  537,  537,  538,  682,  541,  541,  541,
1093
1094       541,  541,  542,  539,  539,  539,  539,  387,  237,  545,
1095       545,  545,  545,  545,  545,  545,  545,  545,  545,  469,
1096       387,  237,  682,  544,  544,  544,  544,  544,  544,  803,
1097       803,  237,  622,  387,  237,  752,  752,  752,  752,  752,
1098       752,  767,  622,  682,  767,  768,  769,  770,  544,  544,
1099       544,  544,  544,  544,  387,  237,  546,  546,  546,  546,
1100       546,  546,  546,  546,  546,  546,  547,  540,  680,  540,
1101       548,  548,  548,  548,  548,  548,  767,  605,  728,  767,
1102       768,  769,  770,  768,  769,  770,  728,  895,  895,  895,
1103       895,  895,  895,  532,  771,  548,  548,  548,  548,  548,
1104
1105       548,  237,  552,  553,  554,  552,  552,  552,  552,  552,
1106       552,  552,  555,  895,  895,  895,  556,  556,  556,  556,
1107       556,  556,  796,  796,  796,  796,  796,  797,  603,  773,
1108       721,  720,  771,  782,  780,  754,  781,  506,  754,  506,
1109       793,  556,  556,  556,  556,  556,  556,  895,  719,  548,
1110       548,  548,  548,  548,  548,  548,  548,  548,  548,  107,
1111       557,  755,  807,  557,  718,  807,  230,  107,  648,  230,
1112       107,  107,  648,  107,  107,  107,  136,  136,  136,  136,
1113       136,  136,  136,  136,  136,  136,  558,  648,  808,  107,
1114       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
1115
1116       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
1117       136,  136,  136,  108,  136,  107,  107,  107,  107,  107,
1118       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
1119       107,  107,  596,  597,  597,  597,  597,  597,  597,  597,
1120       597,  597,  597,  786,  787,  788,  786,  786,  786,  786,
1121       786,  786,  786,  728,  108,  729,  729,  729,  729,  729,
1122       729,  774,  708,  775,  775,  775,  775,  775,  775,  707,
1123       108,  603,  895,  604,  604,  604,  604,  604,  604,  604,
1124       604,  604,  604,  605,  793,  108,  136,  606,  606,  606,
1125       606,  606,  606,  746,  746,  746,  746,  746,  746,  746,
1126
1127       746,  746,  746,  767,  237,  682,  767,  768,  769,  770,
1128       682,  532,  606,  606,  606,  606,  606,  606,  610,  611,
1129       612,  610,  610,  610,  610,  610,  610,  610,  613,  539,
1130       385,  539,  614,  614,  614,  614,  614,  614,  603,  603,
1131       791,  791,  791,  791,  791,  791,  842,  113,  227,  842,
1132       737,  793,  856,  856,  856,  856,  771,  614,  614,  614,
1133       614,  614,  614,  895,  660,  606,  606,  606,  606,  606,
1134       606,  606,  606,  606,  606,  387,  237,  620,  620,  620,
1135       620,  620,  620,  620,  620,  620,  620,  547,  683,  657,
1136       683,  619,  619,  619,  619,  619,  619,  795,  795,  795,
1137
1138       795,  795,  795,  795,  795,  795,  795,  656,  654,  807,
1139       895,  895,  807,  895,  895,  653,  619,  619,  619,  619,
1140       619,  619,  387,  237,  621,  621,  621,  621,  621,  621,
1141       621,  621,  621,  621,  622,  808,  895,  895,  623,  623,
1142       623,  623,  623,  623,  816,  817,  818,  816,  816,  816,
1143       816,  816,  816,  816,  684,  807,  684,  819,  807,  820,
1144       729,  648,  729,  623,  623,  623,  623,  623,  623,  237,
1145       627,  628,  629,  627,  627,  627,  627,  627,  627,  627,
1146       839,  808,  648,  839,  630,  630,  630,  630,  630,  630,
1147       801,  801,  801,  801,  801,  801,  801,  801,  801,  801,
1148
1149       837,  837,  837,  837,  837,  838,  840,  643,  642,  630,
1150       630,  630,  630,  630,  630,  895,  136,  623,  623,  623,
1151       623,  623,  623,  623,  623,  623,  623,  107,  237,  802,
1152       802,  802,  802,  802,  802,  107,  538,  815,  107,  107,
1153       815,  107,  107,  107,  136,  136,  136,  136,  136,  136,
1154       136,  136,  136,  136,  730,  538,  730,  107,  136,  136,
1155       136,  136,  136,  136,  136,  136,  631,  136,  136,  136,
1156       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
1157       136,  108,  136,  107,  107,  107,  107,  107,  107,  107,
1158       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
1159
1160       648,  651,  651,  651,  651,  651,  652,  649,  649,  649,
1161       649,  203,  683,  538,  683,  203,  214,  214,  214,  214,
1162       214,  214,  214,  214,  214,  214,  775,  203,  775,  532,
1163       214,  214,  214,  214,  214,  214,  214,  214,  214,  214,
1164       214,  214,  214,  214,  214,  214,  214,  214,  214,  214,
1165       655,  214,  214,  385,  216,  203,  203,  203,  203,  203,
1166       203,  203,  203,  203,  203,  203,  203,  203,  203,  203,
1167       203,  203,  661,  662,  663,  664,  661,  661,  661,  661,
1168       661,  661,  603,  310,  833,  833,  833,  833,  833,  833,
1169       861,  862,  863,  861,  793,  836,  836,  836,  836,  836,
1170
1171       836,  836,  836,  836,  836,  861,  862,  863,  861,  108,
1172       596,  597,  597,  597,  597,  597,  597,  597,  597,  597,
1173       597,  815,  815,  815,  815,  815,  815,  815,  815,  815,
1174       815,  815,  815,  815,  815,  815,  815,  815,  815,  815,
1175       815,  872,  872,  872,  872,  872,  872,  595,  108,  603,
1176       594,  670,  670,  670,  670,  670,  670,  670,  670,  670,
1177       670,  605,  603,  593,  671,  671,  671,  671,  671,  671,
1178       671,  671,  671,  671,  672,  776,  590,  776,  673,  673,
1179       673,  673,  673,  673,  852,  853,  854,  852,  852,  852,
1180       852,  852,  852,  852,  839,  895,  839,  839,  895,  839,
1181
1182       729,  589,  729,  673,  673,  673,  673,  673,  673,  677,
1183       678,  679,  677,  677,  677,  677,  677,  677,  677,  680,
1184       840,  895,  840,  681,  681,  681,  681,  681,  681,  826,
1185       588,  827,  827,  827,  827,  827,  827,  827,  828,  827,
1186       828,  858,  848,  844,  858,  844,  505,  505,  681,  681,
1187       681,  681,  681,  681,  895,  505,  673,  673,  673,  673,
1188       673,  673,  673,  673,  673,  673,  682,  859,  685,  685,
1189       685,  685,  685,  686,  683,  683,  683,  683,  387,  237,
1190       689,  689,  689,  689,  689,  689,  689,  689,  689,  689,
1191       622,  845,  580,  845,  688,  688,  688,  688,  688,  688,
1192
1193       821,  579,  822,  822,  822,  822,  822,  822,  864,  865,
1194       866,  864,  864,  864,  864,  864,  864,  864,  108,  688,
1195       688,  688,  688,  688,  688,  387,  237,  690,  690,  690,
1196       690,  690,  690,  690,  690,  690,  690,  858,  108,  108,
1197       858,  691,  691,  691,  691,  691,  691,  843,  108,  844,
1198       844,  844,  844,  844,  844,  108,  879,  876,  879,  858,
1199       876,  538,  858,  859,  876,  538,  691,  691,  691,  691,
1200       691,  691,  895,  532,  691,  691,  691,  691,  691,  691,
1201       691,  691,  691,  691,  107,  859,  892,  892,  892,  892,
1202       892,  892,  107,  385,  310,  107,  107,  310,  107,  107,
1203
1204       107,  136,  136,  136,  136,  136,  136,  136,  136,  136,
1205       136,  880,  525,  880,  107,  136,  136,  136,  136,  136,
1206       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
1207       136,  136,  136,  136,  695,  136,  136,  136,  108,  136,
1208       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
1209       107,  107,  107,  107,  107,  107,  107,  698,  524,  878,
1210       698,  879,  879,  879,  879,  879,  879,  523,  203,  522,
1211       521,  520,  203,  214,  214,  214,  214,  214,  214,  214,
1212       214,  214,  214,  699,  203,  519,  518,  214,  214,  214,
1213       214,  214,  214,  214,  214,  214,  214,  214,  214,  214,
1214
1215       214,  214,  214,  214,  214,  214,  214,  214,  214,  214,
1216       517,  216,  203,  203,  203,  203,  203,  203,  203,  203,
1217       203,  203,  203,  203,  203,  203,  203,  203,  203,  722,
1218       516,  723,  723,  723,  723,  723,  723,  723,  723,  723,
1219       723,  872,  872,  872,  872,  872,  872,  872,  872,  872,
1220       872,  873,  873,  873,  873,  873,  873,  873,  873,  873,
1221       873,  515,  514,  513,  512,  511,  510,  505,  108,  728,
1222       505,  731,  731,  731,  731,  731,  732,  729,  729,  729,
1223       729,  603,  424,  735,  735,  735,  735,  735,  735,  735,
1224       735,  735,  735,  672,  603,  500,  736,  736,  736,  736,
1225
1226       736,  736,  736,  736,  736,  736,  737,  499,  493,  492,
1227       738,  738,  738,  738,  738,  738,  874,  874,  874,  874,
1228       874,  875,  872,  872,  872,  872,  867,  491,  868,  868,
1229       868,  868,  868,  868,  490,  738,  738,  738,  738,  738,
1230       738,  742,  743,  744,  742,  742,  742,  742,  742,  742,
1231       742,  745,  489,  488,  487,  746,  746,  746,  746,  746,
1232       746,  486,  485,  484,  483,  108,  872,  872,  872,  872,
1233       872,  872,  872,  872,  872,  872,  482,  481,  480,  479,
1234       746,  746,  746,  746,  746,  746,  895,  461,  738,  738,
1235       738,  738,  738,  738,  738,  738,  738,  738,  387,  237,
1236
1237       752,  752,  752,  752,  752,  752,  752,  752,  752,  752,
1238       774,  385,  777,  777,  777,  777,  777,  778,  779,  779,
1239       779,  779,  783,  784,  785,  783,  783,  783,  783,  783,
1240       783,  783,  872,  872,  872,  872,  872,  872,  872,  872,
1241       872,  872,  886,  887,  888,  886,  886,  886,  886,  886,
1242       886,  886,  310,  457,  310,  134,  451,  450,  449,  108,
1243       722,  446,  723,  723,  723,  723,  723,  723,  723,  723,
1244       723,  723,  892,  892,  892,  892,  892,  892,  892,  892,
1245       892,  892,  886,  886,  886,  886,  886,  886,  886,  886,
1246       886,  886,  445,  444,  443,  442,  441,  440,  439,  108,
1247
1248       603,  436,  791,  791,  791,  791,  791,  791,  791,  791,
1249       791,  791,  737,  603,  353,  792,  792,  792,  792,  792,
1250       792,  792,  792,  792,  792,  793,  353,  353,  424,  794,
1251       794,  794,  794,  794,  794,  893,  893,  893,  893,  893,
1252       894,  892,  892,  892,  892,  889,  889,  889,  889,  889,
1253       889,  426,  424,  425,  794,  794,  794,  794,  794,  794,
1254       798,  799,  800,  798,  798,  798,  798,  798,  798,  798,
1255       424,  418,  417,  416,  801,  801,  801,  801,  801,  801,
1256       415,  414,  108,  892,  892,  892,  892,  892,  892,  892,
1257       892,  892,  892,  413,  412,  411,  410,  409,  408,  801,
1258
1259       801,  801,  801,  801,  801,  895,  407,  794,  794,  794,
1260       794,  794,  794,  794,  794,  794,  794,  237,  804,  804,
1261       804,  804,  804,  805,  802,  802,  802,  802,  107,  402,
1262       401,  128,  310,  385,  310,  134,  107,  375,  371,  107,
1263       107,  370,  107,  107,  107,  136,  136,  136,  136,  136,
1264       136,  136,  136,  136,  136,  369,  368,  367,  107,  136,
1265       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
1266       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
1267       136,  136,  108,  136,  107,  107,  107,  107,  107,  107,
1268       107,  107,  107,  107,  107,  107,  107,  107,  107,  107,
1269
1270       107,  766,  766,  766,  766,  766,  366,  766,  766,  365,
1271       364,  766,  363,  362,  361,  360,  207,  353,  353,  350,
1272       347,  346,  345,  344,  343,  766,  766,  766,  772,  772,
1273       772,  772,  772,  338,  772,  772,  337,  336,  772,  335,
1274       334,  333,  330,  329,  328,  327,  326,  325,  324,  323,
1275       322,  321,  772,  772,  772,  821,  320,  822,  822,  822,
1276       822,  822,  822,  822,  822,  822,  822,  821,  134,  823,
1277       823,  823,  823,  823,  823,  823,  823,  823,  823,  821,
1278       126,  824,  824,  824,  824,  824,  825,  822,  822,  822,
1279       822,  826,  296,  829,  829,  829,  829,  829,  830,  827,
1280
1281       827,  827,  827,  603,  295,  833,  833,  833,  833,  833,
1282       833,  833,  833,  833,  833,  793,  603,  294,  834,  834,
1283       834,  834,  834,  834,  834,  834,  834,  834,  293,  286,
1284       285,  284,  835,  835,  835,  835,  835,  835,  283,  282,
1285       895,  204,  196,  191,  192,  186,  186,  151,  178,  273,
1286       266,  265,  264,  263,  262,  259,  258,  835,  835,  835,
1287       835,  835,  835,  895,  257,  835,  835,  835,  835,  835,
1288       835,  835,  835,  835,  835,  843,  256,  846,  846,  846,
1289       846,  846,  847,  844,  844,  844,  844,  107,  255,  849,
1290       850,  851,  849,  849,  849,  849,  849,  849,  849,  821,
1291
1292       254,  822,  822,  822,  822,  822,  822,  822,  822,  822,
1293       822,  821,  246,  822,  822,  822,  822,  822,  822,  822,
1294       822,  822,  822,  603,  245,  857,  857,  857,  857,  857,
1295       857,  857,  857,  857,  857,  867,  244,  868,  868,  868,
1296       868,  868,  868,  868,  868,  868,  868,  867,  243,  869,
1297       869,  869,  869,  869,  869,  869,  869,  869,  869,  867,
1298       242,  870,  870,  870,  870,  870,  871,  868,  868,  868,
1299       868,  878,  241,  881,  881,  881,  881,  881,  882,  879,
1300       879,  879,  879,  107,  134,  883,  884,  885,  883,  883,
1301       883,  883,  883,  883,  883,  867,  107,  868,  868,  868,
1302
1303       868,  868,  868,  868,  868,  868,  868,  867,  134,  868,
1304       868,  868,  868,  868,  868,  868,  868,  868,  868,  889,
1305       889,  889,  889,  889,  889,  889,  889,  889,  889,  206,
1306       122,  229,  120,  113,  111,  108,  223,  222,  221,  220,
1307       219,  214,  192,  186,  178,  110,  144,  175,  141,  170,
1308       167,  165,  147,  146,  143,  142,  108,  883,  883,  883,
1309       883,  883,  883,  883,  883,  883,  883,  136,  134,  122,
1310       111,  110,  108,  895,  895,  895,  895,  895,  895,  895,
1311       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
1312       895,  895,  895,  895,  108,  890,  890,  890,  890,  890,
1313
1314       891,  889,  889,  889,  889,  895,  895,  895,  895,  895,
1315       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
1316       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
1317       895,  895,  108,  889,  889,  889,  889,  889,  889,  889,
1318       889,  889,  889,  895,  895,  895,  895,  895,  895,  895,
1319       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
1320       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
1321       108,   65,   65,   65,   65,   65,   65,   65,   65,   65,
1322        65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
1323        65,   65,   34,   34,   34,   34,   34,   34,   34,   34,
1324
1325        34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
1326        34,   34,   34,   75,   75,   75,   75,   75,   75,   75,
1327        75,   75,   75,   75,   75,   75,   75,   75,   75,   75,
1328        75,   75,   75,   75,   82,   82,   82,   82,   82,   82,
1329        82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
1330        82,   82,   82,   82,   82,  107,  895,  895,  895,  895,
1331       895,  895,  107,  895,  107,  107,  107,  107,  895,  895,
1332       107,  107,  107,  107,  107,  107,  112,  112,  112,  112,
1333       112,  112,  112,  112,  112,  112,  112,  112,  112,  112,
1334       112,  112,  112,  112,  112,  112,  112,  117,  895,  895,
1335
1336       895,  895,  117,  895,  117,  895,  117,  117,  117,  117,
1337       117,  895,  117,  117,  117,  117,  117,  117,  121,  895,
1338       895,  895,  895,  895,  895,  121,  895,  121,  121,  121,
1339       121,  895,  895,  121,  121,  121,  121,  121,  121,  123,
1340       895,  895,  123,  123,  895,  123,  123,  895,  123,  123,
1341       123,  123,  895,  895,  123,  123,  123,  123,  123,  123,
1342       133,  133,  895,  133,  895,  895,  895,  133,  172,  895,
1343       895,  172,  172,  895,  172,  172,  895,  172,  172,  172,
1344       172,  895,  895,  172,  172,  172,  172,  172,  172,  177,
1345       895,  895,  177,  177,  895,  177,  177,  895,  177,  177,
1346
1347       177,  177,  895,  177,  177,  177,  895,  177,  177,  177,
1348       185,  895,  895,  185,  895,  895,  185,  185,  895,  185,
1349       185,  185,  185,  185,  895,  185,  185,  185,  185,  185,
1350       185,  189,  189,  189,  189,  189,  189,  189,  189,  189,
1351       189,  189,  189,  189,  189,  189,  189,  189,  189,  189,
1352       189,  189,  191,  191,  895,  191,  895,  191,  191,  191,
1353       191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
1354       191,  191,  191,  198,  895,  895,  895,  895,  198,  895,
1355       198,  895,  198,  198,  198,  198,  198,  895,  198,  198,
1356       198,  198,  198,  198,  202,  895,  895,  895,  895,  895,
1357
1358       895,  202,  895,  202,  202,  202,  202,  895,  202,  202,
1359       202,  202,  202,  202,  202,  205,  895,  895,  205,  205,
1360       895,  205,  205,  895,  205,  205,  205,  205,  895,  205,
1361       205,  205,  205,  205,  205,  205,  226,  226,  226,  226,
1362       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
1363       226,  226,  226,  226,  226,  226,  226,  228,  228,  895,
1364       228,  228,  228,  228,  228,  228,  228,  228,  228,  228,
1365       228,  228,  228,  228,  228,  228,  228,  228,  117,  895,
1366       895,  895,  895,  895,  895,  117,  895,  117,  117,  117,
1367       117,  895,  895,  117,  117,  117,  117,  117,  117,  121,
1368
1369       895,  895,  895,  895,  895,  895,  121,  895,  121,  121,
1370       121,  121,  895,  895,  121,  121,  121,  121,  121,  121,
1371       123,  895,  895,  123,  123,  895,  123,  123,  895,  123,
1372       123,  123,  123,  895,  895,  123,  123,  123,  123,  123,
1373       123,  124,  895,  895,  124,  124,  895,  124,  124,  895,
1374       124,  124,  124,  124,  895,  895,  124,  124,  124,  124,
1375       124,  124,  133,  133,  895,  133,  895,  895,  895,  133,
1376       236,  236,  895,  236,  895,  895,  895,  236,  238,  238,
1377       238,  895,  238,  895,  895,  895,  238,  172,  895,  895,
1378       172,  172,  895,  172,  172,  895,  172,  172,  172,  172,
1379
1380       895,  895,  172,  172,  172,  172,  172,  172,  173,  895,
1381       895,  173,  173,  895,  173,  173,  895,  173,  173,  173,
1382       173,  895,  895,  173,  173,  173,  173,  173,  173,  177,
1383       895,  895,  177,  177,  895,  177,  177,  895,  177,  177,
1384       177,  177,  895,  177,  177,  177,  895,  177,  177,  177,
1385       185,  895,  895,  185,  895,  895,  185,  185,  895,  185,
1386       185,  185,  185,  185,  895,  185,  185,  185,  185,  185,
1387       185,  191,  191,  895,  191,  895,  191,  191,  191,  191,
1388       191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
1389       191,  191,  201,  895,  895,  895,  895,  895,  895,  201,
1390
1391       895,  201,  201,  201,  201,  895,  895,  201,  201,  201,
1392       201,  201,  201,  202,  895,  895,  895,  895,  895,  895,
1393       202,  895,  202,  202,  202,  202,  895,  202,  202,  202,
1394       202,  202,  202,  202,  205,  895,  895,  205,  205,  895,
1395       205,  205,  895,  205,  205,  205,  205,  895,  205,  205,
1396       205,  205,  205,  205,  205,  216,  895,  895,  216,  216,
1397       895,  216,  298,  298,  298,  298,  298,  298,  298,  298,
1398       298,  298,  298,  298,  298,  298,  298,  298,  298,  298,
1399       298,  298,  298,  306,  306,  895,  306,  895,  895,  895,
1400       306,  312,  312,  312,  895,  312,  895,  895,  895,  312,
1401
1402       379,  379,  895,  379,  895,  895,  895,  379,  380,  380,
1403       895,  380,  895,  895,  895,  380,  384,  384,  895,  384,
1404       895,  895,  895,  384,  386,  386,  386,  895,  386,  895,
1405       895,  895,  386,  216,  895,  895,  216,  216,  895,  216,
1406       457,  457,  895,  457,  895,  895,  895,  457,  459,  459,
1407       895,  459,  895,  895,  895,  459,  460,  460,  895,  460,
1408       895,  895,  895,  460,  462,  462,  462,  895,  462,  895,
1409       895,  895,  462,  466,  466,  466,  466,  895,  466,  895,
1410       895,  895,  466,  529,  529,  895,  529,  895,  895,  895,
1411       529,  530,  530,  895,  530,  895,  895,  895,  530,  531,
1412
1413       531,  895,  531,  895,  895,  895,  531,  543,  543,  543,
1414       895,  543,  895,  895,  895,  543,  544,  544,  544,  544,
1415       895,  544,  895,  895,  895,  544,  226,  226,  226,  226,
1416       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
1417       226,  226,  226,  226,  226,  226,  226,  601,  601,  895,
1418       601,  895,  895,  895,  601,  602,  602,  895,  602,  895,
1419       895,  895,  602,  618,  618,  618,  895,  618,  895,  895,
1420       895,  618,  619,  619,  619,  619,  895,  619,  895,  895,
1421       895,  619,  226,  226,  226,  226,  226,  226,  226,  226,
1422       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
1423
1424       226,  226,  226,  216,  895,  895,  216,  216,  895,  216,
1425       203,  895,  895,  895,  203,  203,  895,  203,  203,  203,
1426       895,  895,  203,  203,  665,  665,  895,  665,  895,  895,
1427       895,  665,  669,  895,  669,  669,  895,  669,  895,  895,
1428       895,  669,  687,  687,  687,  895,  687,  895,  895,  895,
1429       687,  688,  688,  688,  688,  895,  688,  895,  895,  895,
1430       688,  630,  630,  895,  895,  630,  895,  895,  895,  630,
1431       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
1432       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
1433       226,  216,  895,  895,  216,  216,  895,  216,  203,  895,
1434
1435       895,  895,  203,  203,  895,  203,  203,  203,  895,  895,
1436       203,  203,  733,  733,  895,  733,  895,  895,  895,  733,
1437       734,  895,  734,  734,  895,  734,  895,  895,  895,  734,
1438       681,  681,  895,  681,  895,  895,  895,  681,  750,  750,
1439       750,  895,  750,  895,  895,  895,  750,  751,  751,  751,
1440       895,  895,  751,  895,  895,  895,  751,  760,  760,  760,
1441       760,  760,  760,  760,  760,  760,  760,  760,  760,  760,
1442       760,  760,  760,  760,  760,  760,  760,  760,  766,  766,
1443       895,  766,  766,  766,  895,  766,  895,  766,  766,  766,
1444       766,  895,  895,  766,  766,  766,  766,  766,  766,  772,
1445
1446       772,  895,  772,  772,  772,  895,  772,  895,  772,  772,
1447       772,  772,  895,  895,  772,  772,  772,  772,  772,  772,
1448       216,  895,  895,  895,  895,  895,  895,  895,  895,  895,
1449       895,  216,  216,  895,  216,  216,  895,  216,  789,  789,
1450       895,  789,  895,  895,  895,  789,  790,  895,  790,  790,
1451       895,  790,  895,  895,  895,  790,  806,  806,  895,  895,
1452       806,  895,  895,  895,  806,  760,  760,  760,  760,  760,
1453       760,  760,  760,  760,  760,  760,  760,  760,  760,  760,
1454       760,  760,  760,  760,  760,  760,  226,  226,  226,  226,
1455       226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
1456
1457       226,  226,  226,  226,  226,  226,  226,  766,  895,  895,
1458       895,  895,  895,  895,  766,  895,  766,  766,  766,  766,
1459       895,  895,  766,  766,  766,  766,  766,  766,  772,  895,
1460       895,  895,  895,  895,  895,  772,  895,  772,  772,  772,
1461       772,  895,  895,  772,  772,  772,  772,  772,  772,  831,
1462       831,  895,  831,  895,  895,  895,  831,  832,  895,  832,
1463       832,  895,  832,  895,  895,  895,  832,  855,  855,  895,
1464       855,  895,  895,  895,  855,  856,  895,  856,  895,  895,
1465       856,  895,  895,  895,  856,  860,  860,  860,  860,  860,
1466       860,  860,  860,  860,  860,  860,  860,  860,  860,  860,
1467
1468       860,  860,  860,  860,  860,  860,   15,  895,  895,  895,
1469       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
1470       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
1471       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
1472       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
1473       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
1474       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
1475       895,  895,  895,  895,  895,  895,  895,  895,  895,  895
1476     } ;
1477
1478 static yyconst flex_int16_t yy_chk[6281] =
1479     {   0,
1480         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1481         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1482         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1483         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1484         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1485         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1486         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1487         1,    1,    1,    2,   17,   38,    2,   17,   38,    2,
1488        23,   43,    5,    5,    5,    5,    5,   37,    5,    6,
1489         6,    6,    6,    6,    5,    6,   43,   40,   37,   46,
1490
1491        23,    6,   40,   55,   53,    2,    2,   52,    5,    5,
1492         2,   49,  889,   46,   57,    6,    6,   57,    2,  155,
1493        49,    2,    3,   53,  155,    3,   57,   23,    3,   49,
1494        59,   55,   52,   59,    3,    5,  340,    3,   73,   73,
1495        73,   73,    6,   11,   11,   11,   11,   11,   11,   12,
1496        12,   12,   12,   12,   12,   83,   28,   28,   83,  152,
1497        28,   28,    3,   77,    3,  340,    3,    3,   79,    3,
1498        30,   30,   30,   30,   30,   30,   30,   30,   30,   30,
1499        28,   31,   31,   31,   31,   31,   31,  165,   64,   77,
1500        50,    3,    4,   50,   79,    4,   11,   64,    4,   84,
1501
1502        87,   96,   12,  165,    4,   28,   64,    4,   83,   60,
1503        60,  152,   96,   60,   60,   81,   81,   81,   81,  106,
1504        87,   97,   50,   50,   97,  420,  109,   50,  106,  109,
1505       112,  112,    4,   60,    4,   50,    4,    4,   50,    4,
1506        86,   86,   86,   86,  134,   86,  881,   87,   84,   92,
1507        92,   92,   92,   92,   92,  134,  420,  169,   60,   88,
1508       169,    4,    7,    7,    7,    7,    7,   88,    7,  154,
1509        88,  154,  163,   88,   88,   91,   91,   91,   91,   91,
1510        91,   91,   91,   91,   91,  163,  271,   88,  271,   88,
1511       115,  115,  115,  115,  115,  115,  115,  115,  115,  115,
1512
1513       116,  116,  116,  116,  116,  116,  116,  116,  116,  116,
1514       226,  226,  880,   88,   88,    7,    7,    7,    7,    7,
1515         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
1516         7,    7,    7,    7,    8,    8,    8,    8,    8,  119,
1517         8,  130,  130,  130,  130,  130,  130,  130,  130,  130,
1518       130,  132,  132,  132,  132,  132,  132,  162,  162,  119,
1519       131,  131,  131,  131,  131,  131,  131,  131,  131,  131,
1520       143,  143,  150,  150,  150,  150,  143,  143,  171,  167,
1521       143,  171,  143,  143,  164,  167,  119,    8,    8,    8,
1522         8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
1523
1524         8,    8,    8,    8,    8,    8,    9,    9,    9,    9,
1525         9,    9,    9,  179,  179,  179,  179,    9,    9,    9,
1526       123,  123,  162,  166,  123,  123,  153,  153,  153,  153,
1527       164,  196,  176,    9,  196,  168,  166,  176,  168,  190,
1528       190,  190,  190,  156,  123,  194,  156,  168,  170,  170,
1529       170,  170,  170,  170,  170,  170,  170,  170,  351,    9,
1530        10,   10,   10,   10,   10,   10,   10,  227,  227,  123,
1531       238,   10,   10,   10,  351,  156,  156,  228,  228,  153,
1532       156,  238,  879,  175,  175,  253,  253,   10,  156,  175,
1533       175,  156,  190,  175,  194,  175,  183,  183,  183,  183,
1534
1535       183,  183,  183,  183,  183,  183,  195,  195,  195,  195,
1536       298,  298,  865,   10,   13,   13,   13,   13,   13,   13,
1537        13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
1538        13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
1539        13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
1540        13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
1541        13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
1542        13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
1543        13,   13,   13,   13,   13,   13,   13,   22,   22,  172,
1544       172,  864,  193,  172,  172,  193,  267,  267,  275,   22,
1545
1546       857,  275,   22,   22,   22,   22,   22,   22,   22,   22,
1547        22,   22,   29,  172,   29,   29,   29,   29,   29,   29,
1548        29,   29,   29,   29,   29,  312,  270,  261,   29,   29,
1549        29,   29,   29,   29,  186,  272,  312,  186,  172,  186,
1550       186,  261,  268,  270,  855,  193,  186,  268,  299,  299,
1551       272,   29,  267,   29,   29,   29,   29,   29,   29,   35,
1552       342,  186,  200,  200,  200,  200,  342,   35,  200,  200,
1553        35,   35,  200,   35,   35,   35,   35,   35,   35,   35,
1554        35,   35,   35,   35,   35,   35,   35,  200,  200,   35,
1555        35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
1556
1557        35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
1558        35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
1559        35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
1560        35,   35,   39,   39,   39,   39,   39,   39,   39,   39,
1561        39,   39,   39,  198,  199,  301,   39,   39,   39,   39,
1562        39,   39,  295,  295,  846,  295,   39,  212,  212,  212,
1563       212,  212,  212,  198,  199,  233,  233,  233,  233,  233,
1564       233,   39,   39,   39,   39,   39,   39,   47,   47,   47,
1565        47,   47,   47,   47,  301,   47,   47,  221,  221,   47,
1566       198,  199,  341,  221,  221,  206,  352,  221,  206,  221,
1567
1568       305,  206,  352,   47,   47,   47,   48,  206,   48,   48,
1569        48,   48,   48,   48,   48,   48,   48,   48,   51,   51,
1570       386,  206,  206,  304,  304,  304,  304,  305,  341,  845,
1571        51,  386,  274,   51,   51,   51,   51,   51,   51,   51,
1572        51,   51,   51,  202,  260,  260,  274,  260,  309,  309,
1573       309,  202,  320,  339,  202,  320,  339,  202,  202,  207,
1574       207,  207,  207,  207,  207,  207,  207,  207,  207,  323,
1575       422,  202,  362,  202,  323,  349,  349,  362,  320,  260,
1576        51,   71,   71,   71,   71,   71,  372,   71,  339,  372,
1577       844,   71,  453,   71,  388,  388,  419,  202,  202,  316,
1578
1579       316,  316,  316,  316,  316,  422,  388,   71,   71,  210,
1580       210,  210,  210,  210,  210,  210,  210,  210,  210,  211,
1581       211,  211,  211,  211,  211,  211,  211,  211,  211,  419,
1582       421,  453,  594,  594,   71,   72,   72,  229,  229,  229,
1583       229,  229,  229,  229,  229,  229,  229,   72,  348,  348,
1584        72,   72,   72,   72,   72,   72,   72,   72,   72,   72,
1585        89,  324,  423,  421,  324,   89,   89,  423,   89,   89,
1586        89,   89,  633,  633,   89,   89,  230,  230,  230,  230,
1587       230,  230,  230,  230,  230,  230,  835,  324,   89,   89,
1588        89,  232,  232,  232,  232,  232,  232,  232,  232,  232,
1589
1590       232,  313,  313,  313,  313,  313,  313,  313,  313,  313,
1591       313,  348,  430,  515,   89,   89,   90,  430,  515,   90,
1592        90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
1593        90,   90,   90,  690,  690,   90,   90,   90,   90,   90,
1594        90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
1595        90,   90,   90,   90,   90,   90,   90,   90,  691,  691,
1596        90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
1597        90,   90,   90,   90,   90,   90,   90,   93,  834,   93,
1598        93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
1599       498,  390,  390,   93,   93,   93,   93,   93,   93,  273,
1600
1601       498,  360,  273,  390,  360,  273,  700,  700,  581,  581,
1602       357,  273,  357,  357,  357,  357,  357,  357,   93,   93,
1603        93,   93,   93,   93,   94,  273,  273,  360,   94,   94,
1604        94,   94,   94,   94,   94,   94,   94,   94,   94,   94,
1605        94,  501,  501,   94,   94,   94,   94,   94,   94,   94,
1606        94,   94,   94,   94,   94,   94,   94,   94,   94,   94,
1607        94,   94,   94,   94,   94,   94,  581,   94,   94,   94,
1608        94,   94,   94,   94,   94,   94,   94,   94,   94,   94,
1609        94,   94,   94,   94,   94,   98,   98,   98,   98,   98,
1610        98,   98,   98,   98,   98,   98,  429,  832,  501,   98,
1611
1612        98,   98,   98,   98,   98,  363,  503,  429,  363,   98,
1613       315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
1614       350,  427,  427,  503,   98,   98,   98,   98,   98,   98,
1615       104,  363,  104,  104,  104,  104,  104,  104,  104,  104,
1616       104,  104,  108,  108,  108,  108,  108,  350,  108,  108,
1617       831,  428,  108,  353,  353,  353,  353,  353,  353,  353,
1618       353,  353,  353,  640,  829,  350,  108,  108,  108,  120,
1619       120,  120,  120,  120,  428,  120,  120,  828,  640,  120,
1620       387,  387,  387,  387,  387,  387,  387,  387,  387,  387,
1621       462,  427,  564,  120,  120,  120,  122,  122,  122,  122,
1622
1623       122,  462,  122,  122,  564,  604,  122,  389,  389,  389,
1624       389,  389,  389,  389,  389,  389,  389,  604,  561,  466,
1625       122,  122,  122,  125,  561,  125,  125,  125,  125,  125,
1626       466,  125,  125,  467,  467,  125,  393,  393,  393,  393,
1627       393,  393,  393,  393,  632,  467,  632,  827,  393,  125,
1628       125,  125,  126,  126,  126,  126,  126,  126,  126,  126,
1629       126,  126,  395,  395,  395,  395,  395,  395,  395,  395,
1630       395,  395,  396,  396,  396,  396,  396,  396,  399,  405,
1631       502,  399,  405,  476,  476,  476,  476,  476,  476,  126,
1632       127,  502,  127,  127,  127,  127,  127,  127,  127,  127,
1633
1634       127,  127,  127,  817,  399,  405,  127,  127,  127,  127,
1635       127,  127,  468,  468,  469,  469,  469,  469,  469,  469,
1636       469,  469,  469,  469,  468,  816,  470,  470,  583,  127,
1637       543,  127,  127,  127,  127,  127,  127,  135,  470,  483,
1638       486,  543,  483,  486,  583,  135,  565,  810,  135,  135,
1639       565,  135,  135,  135,  135,  135,  135,  135,  135,  135,
1640       135,  135,  135,  135,  135,  483,  486,  135,  135,  135,
1641       135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
1642       135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
1643       135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
1644
1645       135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
1646       136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
1647       136,  504,  806,  723,  136,  136,  136,  136,  136,  136,
1648       456,  504,  456,  456,  456,  456,  456,  456,  475,  475,
1649       475,  475,  475,  475,  475,  475,  475,  475,  578,  136,
1650       136,  136,  136,  136,  136,  174,  560,  174,  174,  174,
1651       174,  174,  723,  174,  174,  578,  560,  174,  606,  456,
1652       505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
1653       606,  174,  174,  174,  204,  204,  204,  204,  204,  480,
1654       204,  204,  480,  544,  204,  473,  473,  473,  473,  473,
1655
1656       473,  473,  473,  481,  544,  571,  481,  473,  204,  204,
1657       204,  205,  571,  566,  804,  480,  205,  205,  582,  205,
1658       205,  205,  205,  566,  489,  205,  205,  489,  582,  481,
1659       482,  545,  545,  482,  480,  484,  546,  546,  484,  205,
1660       205,  205,  570,  545,  569,  752,  752,  481,  546,  569,
1661       489,  548,  548,  570,  485,  572,  482,  485,  489,  635,
1662       803,  484,  572,  548,  635,  205,  205,  208,  208,  208,
1663       208,  208,  208,  208,  208,  208,  208,  482,  484,  711,
1664       485,  208,  208,  208,  208,  208,  208,  488,  491,  802,
1665       488,  491,  485,  618,  619,  711,  509,  485,  509,  509,
1666
1667       509,  509,  509,  509,  618,  619,  208,  208,  208,  208,
1668       208,  208,  213,  488,  491,  727,  213,  213,  213,  213,
1669       213,  213,  213,  213,  213,  213,  213,  213,  213,  488,
1670       790,  213,  213,  213,  213,  213,  213,  213,  213,  213,
1671       213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
1672       213,  213,  213,  213,  727,  213,  213,  213,  213,  213,
1673       213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
1674       213,  213,  213,  214,  214,  214,  214,  214,  214,  214,
1675       214,  214,  214,  214,  687,  789,  584,  214,  214,  214,
1676       214,  214,  214,  487,  593,  687,  487,  528,  528,  528,
1677
1678       528,  528,  528,  584,  490,  492,  493,  490,  492,  493,
1679       787,  593,  214,  214,  214,  214,  214,  214,  231,  487,
1680       231,  231,  231,  231,  231,  231,  231,  231,  231,  231,
1681       490,  492,  493,  510,  760,  760,  510,  535,  535,  535,
1682       535,  535,  535,  487,  688,  513,  516,  490,  513,  516,
1683       636,  786,  636,  493,  645,  688,  645,  231,  234,  510,
1684       234,  234,  234,  234,  234,  234,  234,  234,  234,  234,
1685       519,  513,  516,  519,  234,  234,  234,  234,  234,  234,
1686       527,  527,  527,  527,  527,  527,  527,  527,  527,  527,
1687       520,  557,  562,  520,  557,  562,  519,  779,  597,  234,
1688
1689       234,  234,  234,  234,  234,  237,  237,  237,  237,  237,
1690       237,  237,  237,  237,  237,  237,  520,  557,  562,  237,
1691       237,  237,  237,  237,  237,  532,  532,  532,  532,  532,
1692       532,  532,  532,  532,  532,  542,  597,  542,  542,  542,
1693       542,  542,  542,  777,  237,  237,  237,  237,  237,  237,
1694       239,  239,  239,  239,  239,  239,  239,  239,  239,  239,
1695       239,  239,  664,  664,  664,  239,  239,  239,  239,  239,
1696       239,  534,  534,  534,  534,  534,  534,  534,  534,  534,
1697       534,  554,  554,  554,  554,  554,  554,  697,  776,  697,
1698       239,  239,  239,  239,  239,  239,  240,  240,  240,  240,
1699
1700       240,  240,  240,  240,  240,  240,  240,  763,  763,  775,
1701       240,  240,  240,  240,  240,  240,  538,  538,  538,  538,
1702       538,  538,  538,  538,  538,  538,  600,  600,  600,  600,
1703       620,  620,  860,  860,  772,  240,  240,  240,  240,  240,
1704       240,  278,  620,  278,  278,  278,  278,  278,  278,  278,
1705       278,  278,  278,  279,  279,  279,  279,  279,  279,  279,
1706       279,  279,  279,  279,  770,  710,  710,  279,  279,  279,
1707       279,  279,  279,  547,  547,  547,  547,  547,  547,  547,
1708       547,  547,  547,  567,  573,  575,  567,  573,  575,  822,
1709       863,  863,  279,  279,  279,  279,  279,  279,  281,  281,
1710
1711       281,  281,  281,  281,  281,  281,  281,  281,  766,  567,
1712       573,  575,  281,  281,  281,  281,  281,  281,  551,  551,
1713       551,  551,  551,  551,  551,  551,  695,  710,  822,  695,
1714       551,  612,  612,  612,  612,  612,  612,  281,  281,  281,
1715       281,  281,  281,  300,  300,  300,  300,  300,  300,  300,
1716       300,  300,  300,  553,  553,  553,  553,  553,  553,  553,
1717       553,  553,  553,  603,  603,  603,  603,  603,  603,  603,
1718       603,  603,  603,  629,  629,  629,  629,  629,  629,  765,
1719       300,  308,  308,  308,  308,  308,  308,  308,  308,  308,
1720       308,  308,  314,  314,  314,  314,  314,  314,  314,  314,
1721
1722       314,  314,  314,  314,  314,  909,  909,  909,  314,  314,
1723       314,  314,  314,  314,  605,  605,  605,  605,  605,  605,
1724       605,  605,  605,  605,  759,  658,  659,  634,  658,  659,
1725       634,  769,  758,  314,  314,  314,  314,  314,  314,  317,
1726       317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
1727       317,  658,  659,  634,  317,  317,  317,  317,  317,  317,
1728       609,  670,  609,  609,  609,  609,  609,  609,  709,  709,
1729       709,  709,  609,  670,  621,  621,  634,  757,  769,  317,
1730       317,  317,  317,  317,  317,  318,  621,  318,  318,  318,
1731       318,  318,  318,  318,  318,  318,  318,  358,  358,  358,
1732
1733       358,  358,  358,  358,  358,  358,  358,  698,  968,  968,
1734       698,  358,  358,  358,  358,  358,  358,  611,  611,  611,
1735       611,  611,  611,  611,  611,  611,  611,  751,  702,  637,
1736       701,  702,  637,  698,  868,  701,  358,  358,  358,  358,
1737       358,  358,  359,  359,  359,  359,  359,  359,  359,  359,
1738       359,  359,  623,  623,  702,  637,  359,  359,  359,  359,
1739       359,  359,  671,  673,  623,  626,  626,  626,  626,  626,
1740       626,  626,  626,  868,  671,  673,  735,  626,  637,  969,
1741       969,  359,  359,  359,  359,  359,  359,  376,  735,  376,
1742       376,  376,  376,  376,  376,  376,  376,  376,  376,  377,
1743
1744       736,  377,  377,  377,  377,  377,  377,  377,  377,  377,
1745       377,  378,  736,  378,  378,  378,  378,  378,  378,  378,
1746       378,  378,  378,  381,  381,  381,  381,  381,  381,  381,
1747       381,  381,  381,  381,  391,  391,  391,  391,  391,  391,
1748       391,  391,  391,  391,  391,  391,  391,  929,  929,  929,
1749       391,  391,  391,  391,  391,  391,  628,  628,  628,  628,
1750       628,  628,  628,  628,  628,  628,  980,  980,  638,  696,
1751       704,  638,  696,  704,  748,  391,  391,  391,  391,  391,
1752       391,  394,  394,  394,  394,  394,  394,  394,  394,  394,
1753       394,  394,  394,  394,  638,  696,  704,  394,  394,  394,
1754
1755       394,  394,  394,  644,  644,  644,  644,  648,  648,  648,
1756       648,  648,  648,  648,  648,  648,  648,  638,  696,  939,
1757       747,  939,  394,  394,  394,  394,  394,  394,  397,  397,
1758       397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
1759       940,  734,  940,  397,  397,  397,  397,  397,  397,  652,
1760       652,  652,  652,  652,  652,  652,  717,  733,  717,  717,
1761       717,  644,  679,  679,  679,  679,  679,  679,  397,  397,
1762       397,  397,  397,  397,  398,  738,  398,  398,  398,  398,
1763       398,  398,  398,  398,  398,  398,  433,  738,  433,  433,
1764       433,  433,  433,  433,  433,  433,  433,  433,  434,  434,
1765
1766       434,  434,  434,  434,  434,  434,  434,  434,  708,  731,
1767       764,  764,  434,  434,  434,  434,  434,  434,  662,  662,
1768       662,  662,  662,  662,  662,  662,  662,  662, 1000, 1000,
1769       708,  646,  708,  708,  951,  730,  951,  434,  434,  434,
1770       434,  434,  434,  435,  435,  435,  435,  435,  435,  435,
1771       435,  435,  435,  646,  729,  646,  646,  435,  435,  435,
1772       435,  435,  435,  663,  663,  663,  663,  663,  663,  663,
1773       663,  663,  663,  718,  715,  906,  718,  764,  906,  952,
1774       646,  952,  435,  435,  435,  435,  435,  435,  452,  452,
1775       452,  452,  452,  452,  452,  452,  452,  452,  676,  718,
1776
1777       676,  676,  676,  676,  676,  676,  726,  726,  726,  726,
1778       676,  678,  678,  678,  678,  678,  678,  678,  678,  678,
1779       678,  761,  761,  761,  761,  452,  454,  791,  454,  454,
1780       454,  454,  454,  454,  454,  454,  454,  454,  455,  791,
1781       455,  455,  455,  455,  455,  455,  455,  455,  455,  455,
1782       461,  461,  461,  461,  461,  461,  461,  461,  461,  461,
1783       461,  956,  714,  956,  461,  461,  461,  461,  461,  461,
1784       682,  682,  682,  682,  682,  682,  682,  682,  682,  682,
1785       686,  707,  686,  686,  686,  686,  686,  686,  706,  461,
1786       461,  461,  461,  461,  461,  465,  685,  465,  465,  465,
1787
1788       465,  465,  465,  465,  465,  465,  465,  471,  471,  471,
1789       471,  471,  471,  471,  471,  471,  471,  471,  471,  471,
1790       689,  689,  684,  471,  471,  471,  471,  471,  471, 1001,
1791      1001,  750,  689,  694,  694,  694,  694,  694,  694,  694,
1792       694,  712,  750,  683,  712,  712,  712,  712,  471,  471,
1793       471,  471,  471,  471,  474,  474,  474,  474,  474,  474,
1794       474,  474,  474,  474,  474,  474,  474,  957,  672,  957,
1795       474,  474,  474,  474,  474,  474,  713,  669,  667,  713,
1796       713,  713,  713,  768,  768,  768,  666,  719,  720,  721,
1797       719,  720,  721,  665,  712,  474,  474,  474,  474,  474,
1798
1799       474,  477,  477,  477,  477,  477,  477,  477,  477,  477,
1800       477,  477,  477,  719,  720,  721,  477,  477,  477,  477,
1801       477,  477,  744,  744,  744,  744,  744,  744,  792,  713,
1802       657,  656,  768,  721,  719,  754,  720,  961,  754,  961,
1803       792,  477,  477,  477,  477,  477,  477,  478,  654,  478,
1804       478,  478,  478,  478,  478,  478,  478,  478,  478,  479,
1805       479,  754,  756,  479,  653,  756,  919,  479,  651,  919,
1806       479,  479,  650,  479,  479,  479,  479,  479,  479,  479,
1807       479,  479,  479,  479,  479,  479,  479,  649,  756,  479,
1808       479,  479,  479,  479,  479,  479,  479,  479,  479,  479,
1809
1810       479,  479,  479,  479,  479,  479,  479,  479,  479,  479,
1811       479,  479,  479,  479,  479,  479,  479,  479,  479,  479,
1812       479,  479,  479,  479,  479,  479,  479,  479,  479,  479,
1813       479,  479,  526,  526,  526,  526,  526,  526,  526,  526,
1814       526,  526,  526,  728,  728,  728,  728,  728,  728,  728,
1815       728,  728,  728,  732,  647,  732,  732,  732,  732,  732,
1816       732,  778,  643,  778,  778,  778,  778,  778,  778,  642,
1817       526,  533,  794,  533,  533,  533,  533,  533,  533,  533,
1818       533,  533,  533,  533,  794,  641,  639,  533,  533,  533,
1819       533,  533,  533,  737,  737,  737,  737,  737,  737,  737,
1820
1821       737,  737,  737,  767,  622,  616,  767,  767,  767,  767,
1822       615,  602,  533,  533,  533,  533,  533,  533,  536,  536,
1823       536,  536,  536,  536,  536,  536,  536,  536,  536,  964,
1824       601,  964,  536,  536,  536,  536,  536,  536,  741,  833,
1825       741,  741,  741,  741,  741,  741,  813,  813,  813,  813,
1826       741,  833,  838,  838,  838,  838,  767,  536,  536,  536,
1827       536,  536,  536,  537,  595,  537,  537,  537,  537,  537,
1828       537,  537,  537,  537,  537,  549,  549,  549,  549,  549,
1829       549,  549,  549,  549,  549,  549,  549,  549,  974,  592,
1830       974,  549,  549,  549,  549,  549,  549,  743,  743,  743,
1831
1832       743,  743,  743,  743,  743,  743,  743,  591,  589,  780,
1833       781,  782,  780,  781,  782,  588,  549,  549,  549,  549,
1834       549,  549,  552,  552,  552,  552,  552,  552,  552,  552,
1835       552,  552,  552,  552,  552,  780,  781,  782,  552,  552,
1836       552,  552,  552,  552,  774,  774,  774,  774,  774,  774,
1837       774,  774,  774,  774,  975,  807,  975,  781,  807,  782,
1838       983,  586,  983,  552,  552,  552,  552,  552,  552,  555,
1839       555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
1840       809,  807,  585,  809,  555,  555,  555,  555,  555,  555,
1841       793,  793,  793,  793,  793,  793,  793,  793,  793,  793,
1842
1843       800,  800,  800,  800,  800,  800,  809,  580,  579,  555,
1844       555,  555,  555,  555,  555,  556,  577,  556,  556,  556,
1845       556,  556,  556,  556,  556,  556,  556,  559,  805,  805,
1846       805,  805,  805,  805,  805,  559,  541, 1006,  559,  559,
1847      1006,  559,  559,  559,  559,  559,  559,  559,  559,  559,
1848       559,  559,  559,  559,  984,  540,  984,  559,  559,  559,
1849       559,  559,  559,  559,  559,  559,  559,  559,  559,  559,
1850       559,  559,  559,  559,  559,  559,  559,  559,  559,  559,
1851       559,  559,  559,  559,  559,  559,  559,  559,  559,  559,
1852       559,  559,  559,  559,  559,  559,  559,  559,  559,  559,
1853
1854       587,  587,  587,  587,  587,  587,  587,  587,  587,  587,
1855       587,  590,  988,  539,  988,  590,  590,  590,  590,  590,
1856       590,  590,  590,  590,  590,  590,  994,  590,  994,  531,
1857       590,  590,  590,  590,  590,  590,  590,  590,  590,  590,
1858       590,  590,  590,  590,  590,  590,  590,  590,  590,  590,
1859       590,  590,  590,  530,  590,  590,  590,  590,  590,  590,
1860       590,  590,  590,  590,  590,  590,  590,  590,  590,  590,
1861       590,  590,  596,  596,  596,  596,  596,  596,  596,  596,
1862       596,  596,  797,  529,  797,  797,  797,  797,  797,  797,
1863       842,  842,  842,  842,  797,  799,  799,  799,  799,  799,
1864
1865       799,  799,  799,  799,  799,  861,  861,  861,  861,  596,
1866       598,  598,  598,  598,  598,  598,  598,  598,  598,  598,
1867       598,  814,  814,  814,  814,  814,  814,  814,  814,  814,
1868       814,  815,  815,  815,  815,  815,  815,  815,  815,  815,
1869       815,  875,  875,  875,  875,  875,  875,  525,  598,  607,
1870       518,  607,  607,  607,  607,  607,  607,  607,  607,  607,
1871       607,  607,  610,  517,  610,  610,  610,  610,  610,  610,
1872       610,  610,  610,  610,  610,  995,  514,  995,  610,  610,
1873       610,  610,  610,  610,  826,  826,  826,  826,  826,  826,
1874       826,  826,  826,  826,  819,  820,  839,  819,  820,  839,
1875
1876       997,  512,  997,  610,  610,  610,  610,  610,  610,  613,
1877       613,  613,  613,  613,  613,  613,  613,  613,  613,  613,
1878       819,  820,  839,  613,  613,  613,  613,  613,  613,  830,
1879       511,  830,  830,  830,  830,  830,  830, 1008, 1009, 1008,
1880      1009,  841,  820, 1012,  841, 1012,  508,  507,  613,  613,
1881       613,  613,  613,  613,  614,  506,  614,  614,  614,  614,
1882       614,  614,  614,  614,  614,  614,  617,  841,  617,  617,
1883       617,  617,  617,  617,  617,  617,  617,  617,  624,  624,
1884       624,  624,  624,  624,  624,  624,  624,  624,  624,  624,
1885       624, 1013,  500, 1013,  624,  624,  624,  624,  624,  624,
1886
1887       825,  499,  825,  825,  825,  825,  825,  825,  843,  843,
1888       843,  843,  843,  843,  843,  843,  843,  843,  497,  624,
1889       624,  624,  624,  624,  624,  627,  627,  627,  627,  627,
1890       627,  627,  627,  627,  627,  627,  627,  848,  496,  825,
1891       848,  627,  627,  627,  627,  627,  627,  847,  495,  847,
1892       847,  847,  847,  847,  847,  494, 1018, 1017, 1018,  858,
1893      1017,  464,  858,  848, 1017,  463,  627,  627,  627,  627,
1894       627,  627,  630,  460,  630,  630,  630,  630,  630,  630,
1895       630,  630,  630,  630,  631,  858,  894,  894,  894,  894,
1896       894,  894,  631,  459,  458,  631,  631,  457,  631,  631,
1897
1898       631,  631,  631,  631,  631,  631,  631,  631,  631,  631,
1899       631, 1019,  451, 1019,  631,  631,  631,  631,  631,  631,
1900       631,  631,  631,  631,  631,  631,  631,  631,  631,  631,
1901       631,  631,  631,  631,  631,  631,  631,  631,  631,  631,
1902       631,  631,  631,  631,  631,  631,  631,  631,  631,  631,
1903       631,  631,  631,  631,  631,  631,  631,  655,  450,  882,
1904       655,  882,  882,  882,  882,  882,  882,  449,  655,  448,
1905       447,  446,  655,  655,  655,  655,  655,  655,  655,  655,
1906       655,  655,  655,  655,  655,  445,  444,  655,  655,  655,
1907       655,  655,  655,  655,  655,  655,  655,  655,  655,  655,
1908
1909       655,  655,  655,  655,  655,  655,  655,  655,  655,  655,
1910       443,  655,  655,  655,  655,  655,  655,  655,  655,  655,
1911       655,  655,  655,  655,  655,  655,  655,  655,  655,  661,
1912       442,  661,  661,  661,  661,  661,  661,  661,  661,  661,
1913       661,  852,  852,  852,  852,  852,  852,  852,  852,  852,
1914       852,  853,  853,  853,  853,  853,  853,  853,  853,  853,
1915       853,  441,  440,  439,  438,  437,  436,  432,  661,  668,
1916       431,  668,  668,  668,  668,  668,  668,  668,  668,  668,
1917       668,  674,  426,  674,  674,  674,  674,  674,  674,  674,
1918       674,  674,  674,  674,  677,  425,  677,  677,  677,  677,
1919
1920       677,  677,  677,  677,  677,  677,  677,  424,  418,  417,
1921       677,  677,  677,  677,  677,  677,  854,  854,  854,  854,
1922       854,  854,  854,  854,  854,  854,  871,  415,  871,  871,
1923       871,  871,  871,  871,  414,  677,  677,  677,  677,  677,
1924       677,  680,  680,  680,  680,  680,  680,  680,  680,  680,
1925       680,  680,  413,  412,  411,  680,  680,  680,  680,  680,
1926       680,  410,  409,  408,  407,  871,  873,  873,  873,  873,
1927       873,  873,  873,  873,  873,  873,  404,  403,  402,  401,
1928       680,  680,  680,  680,  680,  680,  681,  385,  681,  681,
1929       681,  681,  681,  681,  681,  681,  681,  681,  692,  692,
1930
1931       692,  692,  692,  692,  692,  692,  692,  692,  692,  692,
1932       716,  384,  716,  716,  716,  716,  716,  716,  716,  716,
1933       716,  716,  722,  722,  722,  722,  722,  722,  722,  722,
1934       722,  722,  874,  874,  874,  874,  874,  874,  874,  874,
1935       874,  874,  878,  878,  878,  878,  878,  878,  878,  878,
1936       878,  878,  383,  382,  380,  379,  375,  374,  373,  722,
1937       724,  371,  724,  724,  724,  724,  724,  724,  724,  724,
1938       724,  724,  886,  886,  886,  886,  886,  886,  886,  886,
1939       886,  886,  887,  887,  887,  887,  887,  887,  887,  887,
1940       887,  887,  370,  369,  368,  367,  366,  365,  364,  724,
1941
1942       739,  361,  739,  739,  739,  739,  739,  739,  739,  739,
1943       739,  739,  739,  742,  356,  742,  742,  742,  742,  742,
1944       742,  742,  742,  742,  742,  742,  355,  354,  347,  742,
1945       742,  742,  742,  742,  742,  888,  888,  888,  888,  888,
1946       888,  888,  888,  888,  888,  891,  891,  891,  891,  891,
1947       891,  346,  345,  344,  742,  742,  742,  742,  742,  742,
1948       745,  745,  745,  745,  745,  745,  745,  745,  745,  745,
1949       343,  337,  336,  334,  745,  745,  745,  745,  745,  745,
1950       333,  332,  891,  893,  893,  893,  893,  893,  893,  893,
1951       893,  893,  893,  331,  330,  329,  328,  327,  326,  745,
1952
1953       745,  745,  745,  745,  745,  746,  325,  746,  746,  746,
1954       746,  746,  746,  746,  746,  746,  746,  749,  749,  749,
1955       749,  749,  749,  749,  749,  749,  749,  749,  753,  322,
1956       321,  319,  311,  310,  307,  306,  753,  296,  294,  753,
1957       753,  293,  753,  753,  753,  753,  753,  753,  753,  753,
1958       753,  753,  753,  753,  753,  292,  291,  290,  753,  753,
1959       753,  753,  753,  753,  753,  753,  753,  753,  753,  753,
1960       753,  753,  753,  753,  753,  753,  753,  753,  753,  753,
1961       753,  753,  753,  753,  753,  753,  753,  753,  753,  753,
1962       753,  753,  753,  753,  753,  753,  753,  753,  753,  753,
1963
1964       753,  771,  771,  771,  771,  771,  289,  771,  771,  288,
1965       287,  771,  286,  285,  284,  283,  280,  277,  276,  269,
1966       266,  265,  264,  263,  262,  771,  771,  771,  773,  773,
1967       773,  773,  773,  259,  773,  773,  258,  257,  773,  256,
1968       255,  254,  252,  251,  250,  249,  248,  247,  246,  245,
1969       244,  243,  773,  773,  773,  783,  242,  783,  783,  783,
1970       783,  783,  783,  783,  783,  783,  783,  784,  236,  784,
1971       784,  784,  784,  784,  784,  784,  784,  784,  784,  785,
1972       235,  785,  785,  785,  785,  785,  785,  785,  785,  785,
1973       785,  788,  225,  788,  788,  788,  788,  788,  788,  788,
1974
1975       788,  788,  788,  795,  224,  795,  795,  795,  795,  795,
1976       795,  795,  795,  795,  795,  795,  798,  223,  798,  798,
1977       798,  798,  798,  798,  798,  798,  798,  798,  222,  220,
1978       219,  218,  798,  798,  798,  798,  798,  798,  217,  215,
1979       209,  201,  197,  192,  191,  189,  185,  180,  178,  173,
1980       161,  160,  159,  158,  157,  149,  148,  798,  798,  798,
1981       798,  798,  798,  801,  147,  801,  801,  801,  801,  801,
1982       801,  801,  801,  801,  801,  818,  146,  818,  818,  818,
1983       818,  818,  818,  818,  818,  818,  818,  821,  145,  821,
1984       821,  821,  821,  821,  821,  821,  821,  821,  821,  823,
1985
1986       144,  823,  823,  823,  823,  823,  823,  823,  823,  823,
1987       823,  824,  142,  824,  824,  824,  824,  824,  824,  824,
1988       824,  824,  824,  836,  141,  836,  836,  836,  836,  836,
1989       836,  836,  836,  836,  836,  849,  140,  849,  849,  849,
1990       849,  849,  849,  849,  849,  849,  849,  850,  139,  850,
1991       850,  850,  850,  850,  850,  850,  850,  850,  850,  851,
1992       138,  851,  851,  851,  851,  851,  851,  851,  851,  851,
1993       851,  866,  137,  866,  866,  866,  866,  866,  866,  866,
1994       866,  866,  866,  867,  133,  867,  867,  867,  867,  867,
1995       867,  867,  867,  867,  867,  869,  129,  869,  869,  869,
1996
1997       869,  869,  869,  869,  869,  869,  869,  870,  128,  870,
1998       870,  870,  870,  870,  870,  870,  870,  870,  870,  883,
1999       883,  883,  883,  883,  883,  883,  883,  883,  883,  124,
2000       121,  118,  117,  114,  111,  107,  103,  102,  101,  100,
2001        99,   95,   82,   75,   68,   67,   63,   62,   61,   58,
2002        56,   54,   45,   44,   42,   41,  883,  884,  884,  884,
2003       884,  884,  884,  884,  884,  884,  884,   36,   32,   26,
2004        20,   19,   16,   15,    0,    0,    0,    0,    0,    0,
2005         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
2006         0,    0,    0,    0,  884,  885,  885,  885,  885,  885,
2007
2008       885,  885,  885,  885,  885,    0,    0,    0,    0,    0,
2009         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
2010         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
2011         0,    0,  885,  890,  890,  890,  890,  890,  890,  890,
2012       890,  890,  890,    0,    0,    0,    0,    0,    0,    0,
2013         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
2014         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
2015       890,  896,  896,  896,  896,  896,  896,  896,  896,  896,
2016       896,  896,  896,  896,  896,  896,  896,  896,  896,  896,
2017       896,  896,  897,  897,  897,  897,  897,  897,  897,  897,
2018
2019       897,  897,  897,  897,  897,  897,  897,  897,  897,  897,
2020       897,  897,  897,  898,  898,  898,  898,  898,  898,  898,
2021       898,  898,  898,  898,  898,  898,  898,  898,  898,  898,
2022       898,  898,  898,  898,  899,  899,  899,  899,  899,  899,
2023       899,  899,  899,  899,  899,  899,  899,  899,  899,  899,
2024       899,  899,  899,  899,  899,  900,    0,    0,    0,    0,
2025         0,    0,  900,    0,  900,  900,  900,  900,    0,    0,
2026       900,  900,  900,  900,  900,  900,  901,  901,  901,  901,
2027       901,  901,  901,  901,  901,  901,  901,  901,  901,  901,
2028       901,  901,  901,  901,  901,  901,  901,  902,    0,    0,
2029
2030         0,    0,  902,    0,  902,    0,  902,  902,  902,  902,
2031       902,    0,  902,  902,  902,  902,  902,  902,  903,    0,
2032         0,    0,    0,    0,    0,  903,    0,  903,  903,  903,
2033       903,    0,    0,  903,  903,  903,  903,  903,  903,  904,
2034         0,    0,  904,  904,    0,  904,  904,    0,  904,  904,
2035       904,  904,    0,    0,  904,  904,  904,  904,  904,  904,
2036       905,  905,    0,  905,    0,    0,    0,  905,  907,    0,
2037         0,  907,  907,    0,  907,  907,    0,  907,  907,  907,
2038       907,    0,    0,  907,  907,  907,  907,  907,  907,  908,
2039         0,    0,  908,  908,    0,  908,  908,    0,  908,  908,
2040
2041       908,  908,    0,  908,  908,  908,    0,  908,  908,  908,
2042       910,    0,    0,  910,    0,    0,  910,  910,    0,  910,
2043       910,  910,  910,  910,    0,  910,  910,  910,  910,  910,
2044       910,  911,  911,  911,  911,  911,  911,  911,  911,  911,
2045       911,  911,  911,  911,  911,  911,  911,  911,  911,  911,
2046       911,  911,  912,  912,    0,  912,    0,  912,  912,  912,
2047       912,  912,  912,  912,  912,  912,  912,  912,  912,  912,
2048       912,  912,  912,  913,    0,    0,    0,    0,  913,    0,
2049       913,    0,  913,  913,  913,  913,  913,    0,  913,  913,
2050       913,  913,  913,  913,  914,    0,    0,    0,    0,    0,
2051
2052         0,  914,    0,  914,  914,  914,  914,    0,  914,  914,
2053       914,  914,  914,  914,  914,  915,    0,    0,  915,  915,
2054         0,  915,  915,    0,  915,  915,  915,  915,    0,  915,
2055       915,  915,  915,  915,  915,  915,  916,  916,  916,  916,
2056       916,  916,  916,  916,  916,  916,  916,  916,  916,  916,
2057       916,  916,  916,  916,  916,  916,  916,  917,  917,    0,
2058       917,  917,  917,  917,  917,  917,  917,  917,  917,  917,
2059       917,  917,  917,  917,  917,  917,  917,  917,  918,    0,
2060         0,    0,    0,    0,    0,  918,    0,  918,  918,  918,
2061       918,    0,    0,  918,  918,  918,  918,  918,  918,  920,
2062
2063         0,    0,    0,    0,    0,    0,  920,    0,  920,  920,
2064       920,  920,    0,    0,  920,  920,  920,  920,  920,  920,
2065       921,    0,    0,  921,  921,    0,  921,  921,    0,  921,
2066       921,  921,  921,    0,    0,  921,  921,  921,  921,  921,
2067       921,  922,    0,    0,  922,  922,    0,  922,  922,    0,
2068       922,  922,  922,  922,    0,    0,  922,  922,  922,  922,
2069       922,  922,  923,  923,    0,  923,    0,    0,    0,  923,
2070       924,  924,    0,  924,    0,    0,    0,  924,  925,  925,
2071       925,    0,  925,    0,    0,    0,  925,  926,    0,    0,
2072       926,  926,    0,  926,  926,    0,  926,  926,  926,  926,
2073
2074         0,    0,  926,  926,  926,  926,  926,  926,  927,    0,
2075         0,  927,  927,    0,  927,  927,    0,  927,  927,  927,
2076       927,    0,    0,  927,  927,  927,  927,  927,  927,  928,
2077         0,    0,  928,  928,    0,  928,  928,    0,  928,  928,
2078       928,  928,    0,  928,  928,  928,    0,  928,  928,  928,
2079       930,    0,    0,  930,    0,    0,  930,  930,    0,  930,
2080       930,  930,  930,  930,    0,  930,  930,  930,  930,  930,
2081       930,  931,  931,    0,  931,    0,  931,  931,  931,  931,
2082       931,  931,  931,  931,  931,  931,  931,  931,  931,  931,
2083       931,  931,  932,    0,    0,    0,    0,    0,    0,  932,
2084
2085         0,  932,  932,  932,  932,    0,    0,  932,  932,  932,
2086       932,  932,  932,  933,    0,    0,    0,    0,    0,    0,
2087       933,    0,  933,  933,  933,  933,    0,  933,  933,  933,
2088       933,  933,  933,  933,  934,    0,    0,  934,  934,    0,
2089       934,  934,    0,  934,  934,  934,  934,    0,  934,  934,
2090       934,  934,  934,  934,  934,  935,    0,    0,  935,  935,
2091         0,  935,  936,  936,  936,  936,  936,  936,  936,  936,
2092       936,  936,  936,  936,  936,  936,  936,  936,  936,  936,
2093       936,  936,  936,  937,  937,    0,  937,    0,    0,    0,
2094       937,  938,  938,  938,    0,  938,    0,    0,    0,  938,
2095
2096       941,  941,    0,  941,    0,    0,    0,  941,  942,  942,
2097         0,  942,    0,    0,    0,  942,  943,  943,    0,  943,
2098         0,    0,    0,  943,  944,  944,  944,    0,  944,    0,
2099         0,    0,  944,  945,    0,    0,  945,  945,    0,  945,
2100       946,  946,    0,  946,    0,    0,    0,  946,  947,  947,
2101         0,  947,    0,    0,    0,  947,  948,  948,    0,  948,
2102         0,    0,    0,  948,  949,  949,  949,    0,  949,    0,
2103         0,    0,  949,  950,  950,  950,  950,    0,  950,    0,
2104         0,    0,  950,  953,  953,    0,  953,    0,    0,    0,
2105       953,  954,  954,    0,  954,    0,    0,    0,  954,  955,
2106
2107       955,    0,  955,    0,    0,    0,  955,  958,  958,  958,
2108         0,  958,    0,    0,    0,  958,  959,  959,  959,  959,
2109         0,  959,    0,    0,    0,  959,  960,  960,  960,  960,
2110       960,  960,  960,  960,  960,  960,  960,  960,  960,  960,
2111       960,  960,  960,  960,  960,  960,  960,  962,  962,    0,
2112       962,    0,    0,    0,  962,  963,  963,    0,  963,    0,
2113         0,    0,  963,  965,  965,  965,    0,  965,    0,    0,
2114         0,  965,  966,  966,  966,  966,    0,  966,    0,    0,
2115         0,  966,  967,  967,  967,  967,  967,  967,  967,  967,
2116       967,  967,  967,  967,  967,  967,  967,  967,  967,  967,
2117
2118       967,  967,  967,  970,    0,    0,  970,  970,    0,  970,
2119       971,    0,    0,    0,  971,  971,    0,  971,  971,  971,
2120         0,    0,  971,  971,  972,  972,    0,  972,    0,    0,
2121         0,  972,  973,    0,  973,  973,    0,  973,    0,    0,
2122         0,  973,  976,  976,  976,    0,  976,    0,    0,    0,
2123       976,  977,  977,  977,  977,    0,  977,    0,    0,    0,
2124       977,  978,  978,    0,    0,  978,    0,    0,    0,  978,
2125       979,  979,  979,  979,  979,  979,  979,  979,  979,  979,
2126       979,  979,  979,  979,  979,  979,  979,  979,  979,  979,
2127       979,  981,    0,    0,  981,  981,    0,  981,  982,    0,
2128
2129         0,    0,  982,  982,    0,  982,  982,  982,    0,    0,
2130       982,  982,  985,  985,    0,  985,    0,    0,    0,  985,
2131       986,    0,  986,  986,    0,  986,    0,    0,    0,  986,
2132       987,  987,    0,  987,    0,    0,    0,  987,  989,  989,
2133       989,    0,  989,    0,    0,    0,  989,  990,  990,  990,
2134         0,    0,  990,    0,    0,    0,  990,  991,  991,  991,
2135       991,  991,  991,  991,  991,  991,  991,  991,  991,  991,
2136       991,  991,  991,  991,  991,  991,  991,  991,  992,  992,
2137         0,  992,  992,  992,    0,  992,    0,  992,  992,  992,
2138       992,    0,    0,  992,  992,  992,  992,  992,  992,  993,
2139
2140       993,    0,  993,  993,  993,    0,  993,    0,  993,  993,
2141       993,  993,    0,    0,  993,  993,  993,  993,  993,  993,
2142       996,    0,    0,    0,    0,    0,    0,    0,    0,    0,
2143         0,  996,  996,    0,  996,  996,    0,  996,  998,  998,
2144         0,  998,    0,    0,    0,  998,  999,    0,  999,  999,
2145         0,  999,    0,    0,    0,  999, 1002, 1002,    0,    0,
2146      1002,    0,    0,    0, 1002, 1003, 1003, 1003, 1003, 1003,
2147      1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003, 1003,
2148      1003, 1003, 1003, 1003, 1003, 1003, 1004, 1004, 1004, 1004,
2149      1004, 1004, 1004, 1004, 1004, 1004, 1004, 1004, 1004, 1004,
2150
2151      1004, 1004, 1004, 1004, 1004, 1004, 1004, 1005,    0,    0,
2152         0,    0,    0,    0, 1005,    0, 1005, 1005, 1005, 1005,
2153         0,    0, 1005, 1005, 1005, 1005, 1005, 1005, 1007,    0,
2154         0,    0,    0,    0,    0, 1007,    0, 1007, 1007, 1007,
2155      1007,    0,    0, 1007, 1007, 1007, 1007, 1007, 1007, 1010,
2156      1010,    0, 1010,    0,    0,    0, 1010, 1011,    0, 1011,
2157      1011,    0, 1011,    0,    0,    0, 1011, 1014, 1014,    0,
2158      1014,    0,    0,    0, 1014, 1015,    0, 1015,    0,    0,
2159      1015,    0,    0,    0, 1015, 1016, 1016, 1016, 1016, 1016,
2160      1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016,
2161
2162      1016, 1016, 1016, 1016, 1016, 1016,  895,  895,  895,  895,
2163       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
2164       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
2165       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
2166       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
2167       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
2168       895,  895,  895,  895,  895,  895,  895,  895,  895,  895,
2169       895,  895,  895,  895,  895,  895,  895,  895,  895,  895
2170     } ;
2171
2172 static yy_state_type yy_last_accepting_state;
2173 static char *yy_last_accepting_cpos;
2174
2175 extern int sudoers_flex_debug;
2176 int sudoers_flex_debug = 0;
2177
2178 /* The intent behind this definition is that it'll catch
2179  * any uses of REJECT which flex missed.
2180  */
2181 #define REJECT reject_used_but_not_detected
2182 #define yymore() yymore_used_but_not_detected
2183 #define YY_MORE_ADJ 0
2184 #define YY_RESTORE_YY_MORE_OFFSET
2185 char *sudoerstext;
2186 #line 1 "toke.l"
2187 #line 2 "toke.l"
2188 /*
2189  * Copyright (c) 1996, 1998-2005, 2007-2017
2190  *      Todd C. Miller <Todd.Miller@sudo.ws>
2191  *
2192  * Permission to use, copy, modify, and distribute this software for any
2193  * purpose with or without fee is hereby granted, provided that the above
2194  * copyright notice and this permission notice appear in all copies.
2195  *
2196  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
2197  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
2198  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
2199  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
2200  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
2201  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
2202  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2203  *
2204  * Sponsored in part by the Defense Advanced Research Projects
2205  * Agency (DARPA) and Air Force Research Laboratory, Air Force
2206  * Materiel Command, USAF, under agreement number F39502-99-1-0512.
2207  */
2208
2209 #include <config.h>
2210
2211 #include <sys/types.h>
2212 #include <sys/stat.h>
2213 #include <stdio.h>
2214 #include <stdlib.h>
2215 #ifdef HAVE_STRING_H
2216 # include <string.h>
2217 #endif /* HAVE_STRING_H */
2218 #ifdef HAVE_STRINGS_H
2219 # include <strings.h>
2220 #endif /* HAVE_STRINGS_H */
2221 #if defined(HAVE_STDINT_H)
2222 # include <stdint.h>
2223 #elif defined(HAVE_INTTYPES_H)
2224 # include <inttypes.h>
2225 #endif
2226 #include <unistd.h>
2227 #include <dirent.h>
2228 #include <errno.h>
2229 #include <ctype.h>
2230 #include "sudoers.h"
2231 #include "toke.h"
2232 #include <gram.h>
2233 #include "sudo_digest.h"
2234 #include "sudo_lbuf.h"
2235
2236 #if defined(HAVE_STRUCT_DIRENT_D_NAMLEN) && HAVE_STRUCT_DIRENT_D_NAMLEN
2237 # define NAMLEN(dirent) (dirent)->d_namlen
2238 #else
2239 # define NAMLEN(dirent) strlen((dirent)->d_name)
2240 #endif
2241
2242 int sudolineno;                 /* current sudoers line number. */
2243 int last_token;                 /* last token that was parsed. */
2244 char *sudoers;                  /* sudoers file being parsed. */
2245
2246 /* Default sudoers path, mode and owner (may be set via sudo.conf) */
2247 const char *sudoers_file = _PATH_SUDOERS;
2248 mode_t sudoers_mode = SUDOERS_MODE;
2249 uid_t sudoers_uid = SUDOERS_UID;
2250 gid_t sudoers_gid = SUDOERS_GID;
2251
2252 static bool continued, sawspace;
2253 static int prev_state;
2254 static int digest_type = -1;
2255
2256 static bool push_include_int(char *, bool);
2257 static bool pop_include(void);
2258 static char *parse_include_int(const char *, bool);
2259
2260 int (*trace_print)(const char *msg) = sudoers_trace_print;
2261
2262 #define LEXRETURN(n)    do {    \
2263         last_token = (n);       \
2264         return (n);             \
2265 } while (0)
2266
2267 #define ECHO    ignore_result(fwrite(sudoerstext, sudoersleng, 1, sudoersout))
2268
2269 #define parse_include(_p)       (parse_include_int((_p), false))
2270 #define parse_includedir(_p)    (parse_include_int((_p), true))
2271 #define push_include(_p)        (push_include_int((_p), false))
2272 #define push_includedir(_p)     (push_include_int((_p), true))
2273 #define YY_NO_INPUT 1
2274
2275
2276
2277
2278
2279
2280 #line 2275 "toke.c"
2281
2282 #define INITIAL 0
2283 #define GOTDEFS 1
2284 #define GOTCMND 2
2285 #define STARTDEFS 3
2286 #define INDEFS 4
2287 #define INSTR 5
2288 #define WANTDIGEST 6
2289
2290 #ifndef YY_NO_UNISTD_H
2291 /* Special case for "unistd.h", since it is non-ANSI. We include it way
2292  * down here because we want the user's section 1 to have been scanned first.
2293  * The user has a chance to override it with an option.
2294  */
2295 #include <unistd.h>
2296 #endif
2297
2298 #ifndef YY_EXTRA_TYPE
2299 #define YY_EXTRA_TYPE void *
2300 #endif
2301
2302 static int yy_init_globals (void );
2303
2304 /* Accessor methods to globals.
2305    These are made visible to non-reentrant scanners for convenience. */
2306
2307 int sudoerslex_destroy (void );
2308
2309 int sudoersget_debug (void );
2310
2311 void sudoersset_debug (int debug_flag  );
2312
2313 YY_EXTRA_TYPE sudoersget_extra (void );
2314
2315 void sudoersset_extra (YY_EXTRA_TYPE user_defined  );
2316
2317 FILE *sudoersget_in (void );
2318
2319 void sudoersset_in  (FILE * in_str  );
2320
2321 FILE *sudoersget_out (void );
2322
2323 void sudoersset_out  (FILE * out_str  );
2324
2325 yy_size_t sudoersget_leng (void );
2326
2327 char *sudoersget_text (void );
2328
2329 int sudoersget_lineno (void );
2330
2331 void sudoersset_lineno (int line_number  );
2332
2333 /* Macros after this point can all be overridden by user definitions in
2334  * section 1.
2335  */
2336
2337 #ifndef YY_SKIP_YYWRAP
2338 #ifdef __cplusplus
2339 extern "C" int sudoerswrap (void );
2340 #else
2341 extern int sudoerswrap (void );
2342 #endif
2343 #endif
2344
2345 #ifndef yytext_ptr
2346 static void yy_flex_strncpy (char *,yyconst char *,int );
2347 #endif
2348
2349 #ifdef YY_NEED_STRLEN
2350 static int yy_flex_strlen (yyconst char * );
2351 #endif
2352
2353 #ifndef YY_NO_INPUT
2354
2355 #ifdef __cplusplus
2356 static int yyinput (void );
2357 #else
2358 static int input (void );
2359 #endif
2360
2361 #endif
2362
2363 /* Amount of stuff to slurp up with each read. */
2364 #ifndef YY_READ_BUF_SIZE
2365 #define YY_READ_BUF_SIZE 8192
2366 #endif
2367
2368 /* Copy whatever the last rule matched to the standard output. */
2369 #ifndef ECHO
2370 /* This used to be an fputs(), but since the string might contain NUL's,
2371  * we now use fwrite().
2372  */
2373 #define ECHO do { if (fwrite( sudoerstext, sudoersleng, 1, sudoersout )) {} } while (0)
2374 #endif
2375
2376 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
2377  * is returned in "result".
2378  */
2379 #ifndef YY_INPUT
2380 #define YY_INPUT(buf,result,max_size) \
2381         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
2382                 { \
2383                 int c = '*'; \
2384                 size_t n; \
2385                 for ( n = 0; n < max_size && \
2386                              (c = getc( sudoersin )) != EOF && c != '\n'; ++n ) \
2387                         buf[n] = (char) c; \
2388                 if ( c == '\n' ) \
2389                         buf[n++] = (char) c; \
2390                 if ( c == EOF && ferror( sudoersin ) ) \
2391                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
2392                 result = n; \
2393                 } \
2394         else \
2395                 { \
2396                 errno=0; \
2397                 while ( (result = fread(buf, 1, max_size, sudoersin))==0 && ferror(sudoersin)) \
2398                         { \
2399                         if( errno != EINTR) \
2400                                 { \
2401                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
2402                                 break; \
2403                                 } \
2404                         errno=0; \
2405                         clearerr(sudoersin); \
2406                         } \
2407                 }\
2408 \
2409
2410 #endif
2411
2412 /* No semi-colon after return; correct usage is to write "yyterminate();" -
2413  * we don't want an extra ';' after the "return" because that will cause
2414  * some compilers to complain about unreachable statements.
2415  */
2416 #ifndef yyterminate
2417 #define yyterminate() return YY_NULL
2418 #endif
2419
2420 /* Number of entries by which start-condition stack grows. */
2421 #ifndef YY_START_STACK_INCR
2422 #define YY_START_STACK_INCR 25
2423 #endif
2424
2425 /* Report a fatal error. */
2426 #ifndef YY_FATAL_ERROR
2427 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
2428 #endif
2429
2430 /* end tables serialization structures and prototypes */
2431
2432 /* Default declaration of generated scanner - a define so the user can
2433  * easily add parameters.
2434  */
2435 #ifndef YY_DECL
2436 #define YY_DECL_IS_OURS 1
2437
2438 extern int sudoerslex (void);
2439
2440 #define YY_DECL int sudoerslex (void)
2441 #endif /* !YY_DECL */
2442
2443 /* Code executed at the beginning of each rule, after sudoerstext and sudoersleng
2444  * have been set up.
2445  */
2446 #ifndef YY_USER_ACTION
2447 #define YY_USER_ACTION
2448 #endif
2449
2450 /* Code executed at the end of each rule. */
2451 #ifndef YY_BREAK
2452 #define YY_BREAK break;
2453 #endif
2454
2455 #define YY_RULE_SETUP \
2456         if ( sudoersleng > 0 ) \
2457                 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
2458                                 (sudoerstext[sudoersleng - 1] == '\n'); \
2459         YY_USER_ACTION
2460
2461 /** The main scanner function which does all the work.
2462  */
2463 YY_DECL
2464 {
2465         yy_state_type yy_current_state;
2466         char *yy_cp, *yy_bp;
2467         int yy_act;
2468     
2469         if ( !(yy_init) )
2470                 {
2471                 (yy_init) = 1;
2472
2473 #ifdef YY_USER_INIT
2474                 YY_USER_INIT;
2475 #endif
2476
2477                 if ( ! (yy_start) )
2478                         (yy_start) = 1; /* first start state */
2479
2480                 if ( ! sudoersin )
2481                         sudoersin = stdin;
2482
2483                 if ( ! sudoersout )
2484                         sudoersout = stdout;
2485
2486                 if ( ! YY_CURRENT_BUFFER ) {
2487                         sudoersensure_buffer_stack ();
2488                         YY_CURRENT_BUFFER_LVALUE =
2489                                 sudoers_create_buffer(sudoersin,YY_BUF_SIZE );
2490                 }
2491
2492                 sudoers_load_buffer_state( );
2493                 }
2494
2495         {
2496 #line 113 "toke.l"
2497
2498 #line 2493 "toke.c"
2499
2500         while ( 1 )             /* loops until end-of-file is reached */
2501                 {
2502                 yy_cp = (yy_c_buf_p);
2503
2504                 /* Support of sudoerstext. */
2505                 *yy_cp = (yy_hold_char);
2506
2507                 /* yy_bp points to the position in yy_ch_buf of the start of
2508                  * the current run.
2509                  */
2510                 yy_bp = yy_cp;
2511
2512                 yy_current_state = (yy_start);
2513                 yy_current_state += YY_AT_BOL();
2514 yy_match:
2515                 do
2516                         {
2517                         YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
2518                         if ( yy_accept[yy_current_state] )
2519                                 {
2520                                 (yy_last_accepting_state) = yy_current_state;
2521                                 (yy_last_accepting_cpos) = yy_cp;
2522                                 }
2523                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2524                                 {
2525                                 yy_current_state = (int) yy_def[yy_current_state];
2526                                 if ( yy_current_state >= 896 )
2527                                         yy_c = yy_meta[(unsigned int) yy_c];
2528                                 }
2529                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2530                         ++yy_cp;
2531                         }
2532                 while ( yy_base[yy_current_state] != 6207 );
2533
2534 yy_find_action:
2535                 yy_act = yy_accept[yy_current_state];
2536                 if ( yy_act == 0 )
2537                         { /* have to back up */
2538                         yy_cp = (yy_last_accepting_cpos);
2539                         yy_current_state = (yy_last_accepting_state);
2540                         yy_act = yy_accept[yy_current_state];
2541                         }
2542
2543                 YY_DO_BEFORE_ACTION;
2544
2545 do_action:      /* This label is used only to access EOF actions. */
2546
2547                 switch ( yy_act )
2548         { /* beginning of action switch */
2549                         case 0: /* must back up */
2550                         /* undo the effects of YY_DO_BEFORE_ACTION */
2551                         *yy_cp = (yy_hold_char);
2552                         yy_cp = (yy_last_accepting_cpos);
2553                         yy_current_state = (yy_last_accepting_state);
2554                         goto yy_find_action;
2555
2556 case 1:
2557 YY_RULE_SETUP
2558 #line 114 "toke.l"
2559 {
2560                             LEXTRACE(", ");
2561                             LEXRETURN(',');
2562                         }                       /* return ',' */
2563         YY_BREAK
2564 case 2:
2565 YY_RULE_SETUP
2566 #line 119 "toke.l"
2567 BEGIN STARTDEFS;
2568         YY_BREAK
2569 case 3:
2570 YY_RULE_SETUP
2571 #line 121 "toke.l"
2572 {
2573                             BEGIN INDEFS;
2574                             LEXTRACE("DEFVAR ");
2575                             if (!fill(sudoerstext, sudoersleng))
2576                                 yyterminate();
2577                             LEXRETURN(DEFVAR);
2578                         }
2579         YY_BREAK
2580
2581 case 4:
2582 YY_RULE_SETUP
2583 #line 130 "toke.l"
2584 {
2585                             BEGIN STARTDEFS;
2586                             LEXTRACE(", ");
2587                             LEXRETURN(',');
2588                         }                       /* return ',' */
2589         YY_BREAK
2590 case 5:
2591 YY_RULE_SETUP
2592 #line 136 "toke.l"
2593 {
2594                             LEXTRACE("= ");
2595                             LEXRETURN('=');
2596                         }                       /* return '=' */
2597         YY_BREAK
2598 case 6:
2599 YY_RULE_SETUP
2600 #line 141 "toke.l"
2601 {
2602                             LEXTRACE("+= ");
2603                             LEXRETURN('+');
2604                         }                       /* return '+' */
2605         YY_BREAK
2606 case 7:
2607 YY_RULE_SETUP
2608 #line 146 "toke.l"
2609 {
2610                             LEXTRACE("-= ");
2611                             LEXRETURN('-');
2612                         }                       /* return '-' */
2613         YY_BREAK
2614 case 8:
2615 YY_RULE_SETUP
2616 #line 151 "toke.l"
2617 {
2618                             LEXTRACE("BEGINSTR ");
2619                             sudoerslval.string = NULL;
2620                             prev_state = YY_START;
2621                             BEGIN INSTR;
2622                         }
2623         YY_BREAK
2624 case 9:
2625 YY_RULE_SETUP
2626 #line 158 "toke.l"
2627 {
2628                             LEXTRACE("WORD(2) ");
2629                             if (!fill(sudoerstext, sudoersleng))
2630                                 yyterminate();
2631                             LEXRETURN(WORD);
2632                         }
2633         YY_BREAK
2634
2635
2636 case 10:
2637 /* rule 10 can match eol */
2638 YY_RULE_SETUP
2639 #line 167 "toke.l"
2640 {
2641                             /* Line continuation char followed by newline. */
2642                             sudolineno++;
2643                             continued = true;
2644                         }
2645         YY_BREAK
2646 case 11:
2647 YY_RULE_SETUP
2648 #line 173 "toke.l"
2649 {
2650                             LEXTRACE("ENDSTR ");
2651                             BEGIN prev_state;
2652
2653                             if (sudoerslval.string == NULL) {
2654                                 LEXTRACE("ERROR "); /* empty string */
2655                                 LEXRETURN(ERROR);
2656                             }
2657                             if (prev_state == INITIAL) {
2658                                 switch (sudoerslval.string[0]) {
2659                                 case '%':
2660                                     if (sudoerslval.string[1] == '\0' ||
2661                                         (sudoerslval.string[1] == ':' &&
2662                                         sudoerslval.string[2] == '\0')) {
2663                                         LEXTRACE("ERROR "); /* empty group */
2664                                         LEXRETURN(ERROR);
2665                                     }
2666                                     LEXTRACE("USERGROUP ");
2667                                     LEXRETURN(USERGROUP);
2668                                 case '+':
2669                                     if (sudoerslval.string[1] == '\0') {
2670                                         LEXTRACE("ERROR "); /* empty netgroup */
2671                                         LEXRETURN(ERROR);
2672                                     }
2673                                     LEXTRACE("NETGROUP ");
2674                                     LEXRETURN(NETGROUP);
2675                                 }
2676                             }
2677                             LEXTRACE("WORD(4) ");
2678                             LEXRETURN(WORD);
2679                         }
2680         YY_BREAK
2681 case 12:
2682 YY_RULE_SETUP
2683 #line 205 "toke.l"
2684 {
2685                             LEXTRACE("BACKSLASH ");
2686                             if (!append(sudoerstext, sudoersleng))
2687                                 yyterminate();
2688                         }
2689         YY_BREAK
2690 case 13:
2691 YY_RULE_SETUP
2692 #line 211 "toke.l"
2693 {
2694                             LEXTRACE("STRBODY ");
2695                             if (!append(sudoerstext, sudoersleng))
2696                                 yyterminate();
2697                         }
2698         YY_BREAK
2699
2700
2701 case 14:
2702 YY_RULE_SETUP
2703 #line 219 "toke.l"
2704 {
2705                             /* quoted fnmatch glob char, pass verbatim */
2706                             LEXTRACE("QUOTEDCHAR ");
2707                             if (!fill_args(sudoerstext, 2, sawspace))
2708                                 yyterminate();
2709                             sawspace = false;
2710                         }
2711         YY_BREAK
2712 case 15:
2713 YY_RULE_SETUP
2714 #line 227 "toke.l"
2715 {
2716                             /* quoted sudoers special char, strip backslash */
2717                             LEXTRACE("QUOTEDCHAR ");
2718                             if (!fill_args(sudoerstext + 1, 1, sawspace))
2719                                 yyterminate();
2720                             sawspace = false;
2721                         }
2722         YY_BREAK
2723 case 16:
2724 /* rule 16 can match eol */
2725 YY_RULE_SETUP
2726 #line 235 "toke.l"
2727 {
2728                             BEGIN INITIAL;
2729                             yyless(0);
2730                             LEXRETURN(COMMAND);
2731                         }                       /* end of command line args */
2732         YY_BREAK
2733 case 17:
2734 YY_RULE_SETUP
2735 #line 241 "toke.l"
2736 {
2737                             LEXTRACE("ARG ");
2738                             if (!fill_args(sudoerstext, sudoersleng, sawspace))
2739                                 yyterminate();
2740                             sawspace = false;
2741                         }                       /* a command line arg */
2742         YY_BREAK
2743
2744 case 18:
2745 YY_RULE_SETUP
2746 #line 249 "toke.l"
2747 {
2748                             /* Only return DIGEST if the length is correct. */
2749                             yy_size_t digest_len =
2750                                 sudo_digest_getlen(digest_type);
2751                             if ((yy_size_t)sudoersleng == digest_len * 2) {
2752                                 if (!fill(sudoerstext, sudoersleng))
2753                                     yyterminate();
2754                                 BEGIN INITIAL;
2755                                 LEXTRACE("DIGEST ");
2756                                 LEXRETURN(DIGEST);
2757                             }
2758                             BEGIN INITIAL;
2759                             yyless(sudoersleng);
2760                         } /* hex digest */
2761         YY_BREAK
2762 case 19:
2763 YY_RULE_SETUP
2764 #line 264 "toke.l"
2765 {
2766                             /* Only return DIGEST if the length is correct. */
2767                             yy_size_t len, digest_len =
2768                                 sudo_digest_getlen(digest_type);
2769                             if (sudoerstext[sudoersleng - 1] == '=') {
2770                                 /* use padding */
2771                                 len = 4 * ((digest_len + 2) / 3);
2772                             } else {
2773                                 /* no padding */
2774                                 len = (4 * digest_len + 2) / 3;
2775                             }
2776                             if ((yy_size_t)sudoersleng == len) {
2777                                 if (!fill(sudoerstext, sudoersleng))
2778                                     yyterminate();
2779                                 BEGIN INITIAL;
2780                                 LEXTRACE("DIGEST ");
2781                                 LEXRETURN(DIGEST);
2782                             }
2783                             BEGIN INITIAL;
2784                             yyless(sudoersleng);
2785                         } /* base64 digest */
2786         YY_BREAK
2787 case 20:
2788 /* rule 20 can match eol */
2789 YY_RULE_SETUP
2790 #line 286 "toke.l"
2791 {
2792                             char *path;
2793
2794                             if (continued) {
2795                                 LEXTRACE("ERROR ");
2796                                 LEXRETURN(ERROR);
2797                             }
2798
2799                             if ((path = parse_include(sudoerstext)) == NULL)
2800                                 yyterminate();
2801
2802                             LEXTRACE("INCLUDE\n");
2803
2804                             /* Push current buffer and switch to include file */
2805                             if (!push_include(path))
2806                                 yyterminate();
2807                         }
2808         YY_BREAK
2809 case 21:
2810 /* rule 21 can match eol */
2811 YY_RULE_SETUP
2812 #line 304 "toke.l"
2813 {
2814                             char *path;
2815
2816                             if (continued) {
2817                                 LEXTRACE("ERROR ");
2818                                 LEXRETURN(ERROR);
2819                             }
2820
2821                             if ((path = parse_includedir(sudoerstext)) == NULL)
2822                                 yyterminate();
2823
2824                             LEXTRACE("INCLUDEDIR\n");
2825
2826                             /*
2827                              * Push current buffer and switch to include file,
2828                              * ignoring missing or empty directories.
2829                              */
2830                             if (!push_includedir(path))
2831                                 yyterminate();
2832                         }
2833         YY_BREAK
2834 case 22:
2835 YY_RULE_SETUP
2836 #line 325 "toke.l"
2837 {
2838                             char deftype;
2839                             int n;
2840
2841                             if (continued) {
2842                                 LEXTRACE("ERROR ");
2843                                 LEXRETURN(ERROR);
2844                             }
2845
2846                             for (n = 0; isblank((unsigned char)sudoerstext[n]); n++)
2847                                 continue;
2848                             n += sizeof("Defaults") - 1;
2849                             if ((deftype = sudoerstext[n++]) != '\0') {
2850                                 while (isblank((unsigned char)sudoerstext[n]))
2851                                     n++;
2852                             }
2853                             BEGIN GOTDEFS;
2854                             switch (deftype) {
2855                                 case ':':
2856                                     yyless(n);
2857                                     LEXTRACE("DEFAULTS_USER ");
2858                                     LEXRETURN(DEFAULTS_USER);
2859                                 case '>':
2860                                     yyless(n);
2861                                     LEXTRACE("DEFAULTS_RUNAS ");
2862                                     LEXRETURN(DEFAULTS_RUNAS);
2863                                 case '@':
2864                                     yyless(n);
2865                                     LEXTRACE("DEFAULTS_HOST ");
2866                                     LEXRETURN(DEFAULTS_HOST);
2867                                 case '!':
2868                                     yyless(n);
2869                                     LEXTRACE("DEFAULTS_CMND ");
2870                                     LEXRETURN(DEFAULTS_CMND);
2871                                 default:
2872                                     LEXTRACE("DEFAULTS ");
2873                                     LEXRETURN(DEFAULTS);
2874                             }
2875                         }
2876         YY_BREAK
2877 case 23:
2878 YY_RULE_SETUP
2879 #line 365 "toke.l"
2880 {
2881                             int n;
2882
2883                             if (continued) {
2884                                 LEXTRACE("ERROR ");
2885                                 LEXRETURN(ERROR);
2886                             }
2887
2888                             for (n = 0; isblank((unsigned char)sudoerstext[n]); n++)
2889                                 continue;
2890                             switch (sudoerstext[n]) {
2891                                 case 'H':
2892                                     LEXTRACE("HOSTALIAS ");
2893                                     LEXRETURN(HOSTALIAS);
2894                                 case 'C':
2895                                     LEXTRACE("CMNDALIAS ");
2896                                     LEXRETURN(CMNDALIAS);
2897                                 case 'U':
2898                                     LEXTRACE("USERALIAS ");
2899                                     LEXRETURN(USERALIAS);
2900                                 case 'R':
2901                                     LEXTRACE("RUNASALIAS ");
2902                                     LEXRETURN(RUNASALIAS);
2903                             }
2904                         }
2905         YY_BREAK
2906 case 24:
2907 YY_RULE_SETUP
2908 #line 391 "toke.l"
2909 {
2910                                 /* cmnd does not require passwd for this user */
2911                                 LEXTRACE("NOPASSWD ");
2912                                 LEXRETURN(NOPASSWD);
2913                         }
2914         YY_BREAK
2915 case 25:
2916 YY_RULE_SETUP
2917 #line 397 "toke.l"
2918 {
2919                                 /* cmnd requires passwd for this user */
2920                                 LEXTRACE("PASSWD ");
2921                                 LEXRETURN(PASSWD);
2922                         }
2923         YY_BREAK
2924 case 26:
2925 YY_RULE_SETUP
2926 #line 403 "toke.l"
2927 {
2928                                 LEXTRACE("NOEXEC ");
2929                                 LEXRETURN(NOEXEC);
2930                         }
2931         YY_BREAK
2932 case 27:
2933 YY_RULE_SETUP
2934 #line 408 "toke.l"
2935 {
2936                                 LEXTRACE("EXEC ");
2937                                 LEXRETURN(EXEC);
2938                         }
2939         YY_BREAK
2940 case 28:
2941 YY_RULE_SETUP
2942 #line 413 "toke.l"
2943 {
2944                                 LEXTRACE("SETENV ");
2945                                 LEXRETURN(SETENV);
2946                         }
2947         YY_BREAK
2948 case 29:
2949 YY_RULE_SETUP
2950 #line 418 "toke.l"
2951 {
2952                                 LEXTRACE("NOSETENV ");
2953                                 LEXRETURN(NOSETENV);
2954                         }
2955         YY_BREAK
2956 case 30:
2957 YY_RULE_SETUP
2958 #line 423 "toke.l"
2959 {
2960                                 LEXTRACE("LOG_OUTPUT ");
2961                                 LEXRETURN(LOG_OUTPUT);
2962                         }
2963         YY_BREAK
2964 case 31:
2965 YY_RULE_SETUP
2966 #line 428 "toke.l"
2967 {
2968                                 LEXTRACE("NOLOG_OUTPUT ");
2969                                 LEXRETURN(NOLOG_OUTPUT);
2970                         }
2971         YY_BREAK
2972 case 32:
2973 YY_RULE_SETUP
2974 #line 433 "toke.l"
2975 {
2976                                 LEXTRACE("LOG_INPUT ");
2977                                 LEXRETURN(LOG_INPUT);
2978                         }
2979         YY_BREAK
2980 case 33:
2981 YY_RULE_SETUP
2982 #line 438 "toke.l"
2983 {
2984                                 LEXTRACE("NOLOG_INPUT ");
2985                                 LEXRETURN(NOLOG_INPUT);
2986                         }
2987         YY_BREAK
2988 case 34:
2989 YY_RULE_SETUP
2990 #line 443 "toke.l"
2991 {
2992                                 LEXTRACE("MAIL ");
2993                                 LEXRETURN(MAIL);
2994                         }
2995         YY_BREAK
2996 case 35:
2997 YY_RULE_SETUP
2998 #line 448 "toke.l"
2999 {
3000                                 LEXTRACE("NOMAIL ");
3001                                 LEXRETURN(NOMAIL);
3002                         }
3003         YY_BREAK
3004 case 36:
3005 YY_RULE_SETUP
3006 #line 453 "toke.l"
3007 {
3008                                 LEXTRACE("FOLLOW ");
3009                                 LEXRETURN(FOLLOWLNK);
3010                         }
3011         YY_BREAK
3012 case 37:
3013 YY_RULE_SETUP
3014 #line 458 "toke.l"
3015 {
3016                                 LEXTRACE("NOFOLLOW ");
3017                                 LEXRETURN(NOFOLLOWLNK);
3018                         }
3019         YY_BREAK
3020 case 38:
3021 YY_RULE_SETUP
3022 #line 463 "toke.l"
3023 {
3024                             /* empty group or netgroup */
3025                             LEXTRACE("ERROR ");
3026                             LEXRETURN(ERROR);
3027                         }
3028         YY_BREAK
3029 case 39:
3030 YY_RULE_SETUP
3031 #line 469 "toke.l"
3032 {
3033                             /* netgroup */
3034                             if (!fill(sudoerstext, sudoersleng))
3035                                 yyterminate();
3036                             LEXTRACE("NETGROUP ");
3037                             LEXRETURN(NETGROUP);
3038                         }
3039         YY_BREAK
3040 case 40:
3041 YY_RULE_SETUP
3042 #line 477 "toke.l"
3043 {
3044                             /* group */
3045                             if (!fill(sudoerstext, sudoersleng))
3046                                 yyterminate();
3047                             LEXTRACE("USERGROUP ");
3048                             LEXRETURN(USERGROUP);
3049                         }
3050         YY_BREAK
3051 case 41:
3052 YY_RULE_SETUP
3053 #line 485 "toke.l"
3054 {
3055                             if (!fill(sudoerstext, sudoersleng))
3056                                 yyterminate();
3057                             LEXTRACE("NTWKADDR ");
3058                             LEXRETURN(NTWKADDR);
3059                         }
3060         YY_BREAK
3061 case 42:
3062 YY_RULE_SETUP
3063 #line 492 "toke.l"
3064 {
3065                             if (!fill(sudoerstext, sudoersleng))
3066                                 yyterminate();
3067                             LEXTRACE("NTWKADDR ");
3068                             LEXRETURN(NTWKADDR);
3069                         }
3070         YY_BREAK
3071 case 43:
3072 YY_RULE_SETUP
3073 #line 499 "toke.l"
3074 {
3075                             if (!ipv6_valid(sudoerstext)) {
3076                                 LEXTRACE("ERROR ");
3077                                 LEXRETURN(ERROR);
3078                             }
3079                             if (!fill(sudoerstext, sudoersleng))
3080                                 yyterminate();
3081                             LEXTRACE("NTWKADDR ");
3082                             LEXRETURN(NTWKADDR);
3083                         }
3084         YY_BREAK
3085 case 44:
3086 YY_RULE_SETUP
3087 #line 510 "toke.l"
3088 {
3089                             if (!ipv6_valid(sudoerstext)) {
3090                                 LEXTRACE("ERROR ");
3091                                 LEXRETURN(ERROR);
3092                             }
3093                             if (!fill(sudoerstext, sudoersleng))
3094                                 yyterminate();
3095                             LEXTRACE("NTWKADDR ");
3096                             LEXRETURN(NTWKADDR);
3097                         }
3098         YY_BREAK
3099 case 45:
3100 YY_RULE_SETUP
3101 #line 521 "toke.l"
3102 {
3103                             LEXTRACE("ALL ");
3104                             LEXRETURN(ALL);
3105
3106                         }
3107         YY_BREAK
3108 case 46:
3109 YY_RULE_SETUP
3110 #line 527 "toke.l"
3111 {
3112                             LEXTRACE("CMND_TIMEOUT ");
3113                             LEXRETURN(CMND_TIMEOUT);
3114                         }
3115         YY_BREAK
3116 case 47:
3117 YY_RULE_SETUP
3118 #line 532 "toke.l"
3119 {
3120                             LEXTRACE("NOTBEFORE ");
3121                             LEXRETURN(NOTBEFORE);
3122                         }
3123         YY_BREAK
3124 case 48:
3125 YY_RULE_SETUP
3126 #line 537 "toke.l"
3127 {
3128                             LEXTRACE("NOTAFTER ");
3129                             LEXRETURN(NOTAFTER);
3130                         }
3131         YY_BREAK
3132 case 49:
3133 YY_RULE_SETUP
3134 #line 542 "toke.l"
3135 {
3136 #ifdef HAVE_SELINUX
3137                             LEXTRACE("ROLE ");
3138                             LEXRETURN(ROLE);
3139 #else
3140                             goto got_alias;
3141 #endif
3142                         }
3143         YY_BREAK
3144 case 50:
3145 YY_RULE_SETUP
3146 #line 551 "toke.l"
3147 {
3148 #ifdef HAVE_SELINUX
3149                             LEXTRACE("TYPE ");
3150                             LEXRETURN(TYPE);
3151 #else
3152                             goto got_alias;
3153 #endif
3154                         }
3155         YY_BREAK
3156 case 51:
3157 YY_RULE_SETUP
3158 #line 559 "toke.l"
3159 {
3160 #ifdef HAVE_PRIV_SET
3161                             LEXTRACE("PRIVS ");
3162                             LEXRETURN(PRIVS);
3163 #else
3164                             goto got_alias;
3165 #endif
3166                         }
3167         YY_BREAK
3168 case 52:
3169 YY_RULE_SETUP
3170 #line 568 "toke.l"
3171 {
3172 #ifdef HAVE_PRIV_SET
3173                             LEXTRACE("LIMITPRIVS ");
3174                             LEXRETURN(LIMITPRIVS);
3175 #else
3176                             goto got_alias;
3177 #endif
3178                         }
3179         YY_BREAK
3180 case 53:
3181 YY_RULE_SETUP
3182 #line 577 "toke.l"
3183 {
3184                         got_alias:
3185                             if (!fill(sudoerstext, sudoersleng))
3186                                 yyterminate();
3187                             LEXTRACE("ALIAS ");
3188                             LEXRETURN(ALIAS);
3189                         }
3190         YY_BREAK
3191 case 54:
3192 YY_RULE_SETUP
3193 #line 585 "toke.l"
3194 {
3195                             /* XXX - no way to specify digest for command */
3196                             /* no command args allowed for Defaults!/path */
3197                             if (!fill_cmnd(sudoerstext, sudoersleng))
3198                                 yyterminate();
3199                             LEXTRACE("COMMAND ");
3200                             LEXRETURN(COMMAND);
3201                         }
3202         YY_BREAK
3203 case 55:
3204 YY_RULE_SETUP
3205 #line 594 "toke.l"
3206 {
3207                             digest_type = SUDO_DIGEST_SHA224;
3208                             BEGIN WANTDIGEST;
3209                             LEXTRACE("SHA224_TOK ");
3210                             LEXRETURN(SHA224_TOK);
3211                         }
3212         YY_BREAK
3213 case 56:
3214 YY_RULE_SETUP
3215 #line 601 "toke.l"
3216 {
3217                             digest_type = SUDO_DIGEST_SHA256;
3218                             BEGIN WANTDIGEST;
3219                             LEXTRACE("SHA256_TOK ");
3220                             LEXRETURN(SHA256_TOK);
3221                         }
3222         YY_BREAK
3223 case 57:
3224 YY_RULE_SETUP
3225 #line 608 "toke.l"
3226 {
3227                             digest_type = SUDO_DIGEST_SHA384;
3228                             BEGIN WANTDIGEST;
3229                             LEXTRACE("SHA384_TOK ");
3230                             LEXRETURN(SHA384_TOK);
3231                         }
3232         YY_BREAK
3233 case 58:
3234 YY_RULE_SETUP
3235 #line 615 "toke.l"
3236 {
3237                             digest_type = SUDO_DIGEST_SHA512;
3238                             BEGIN WANTDIGEST;
3239                             LEXTRACE("SHA512_TOK ");
3240                             LEXRETURN(SHA512_TOK);
3241                         }
3242         YY_BREAK
3243 case 59:
3244 YY_RULE_SETUP
3245 #line 622 "toke.l"
3246 {
3247                             BEGIN GOTCMND;
3248                             LEXTRACE("COMMAND ");
3249                             if (!fill_cmnd(sudoerstext, sudoersleng))
3250                                 yyterminate();
3251                         }                       /* sudo -e */
3252         YY_BREAK
3253 case 60:
3254 YY_RULE_SETUP
3255 #line 629 "toke.l"
3256 {
3257                             /* directories can't have args... */
3258                             if (sudoerstext[sudoersleng - 1] == '/') {
3259                                 LEXTRACE("COMMAND ");
3260                                 if (!fill_cmnd(sudoerstext, sudoersleng))
3261                                     yyterminate();
3262                                 LEXRETURN(COMMAND);
3263                             } else {
3264                                 BEGIN GOTCMND;
3265                                 LEXTRACE("COMMAND ");
3266                                 if (!fill_cmnd(sudoerstext, sudoersleng))
3267                                     yyterminate();
3268                             }
3269                         }                       /* a pathname */
3270         YY_BREAK
3271 case 61:
3272 YY_RULE_SETUP
3273 #line 644 "toke.l"
3274 {
3275                             LEXTRACE("BEGINSTR ");
3276                             sudoerslval.string = NULL;
3277                             prev_state = YY_START;
3278                             BEGIN INSTR;
3279                         }
3280         YY_BREAK
3281 case 62:
3282 YY_RULE_SETUP
3283 #line 651 "toke.l"
3284 {
3285                             /* a word */
3286                             if (!fill(sudoerstext, sudoersleng))
3287                                 yyterminate();
3288                             LEXTRACE("WORD(5) ");
3289                             LEXRETURN(WORD);
3290                         }
3291         YY_BREAK
3292 case 63:
3293 YY_RULE_SETUP
3294 #line 659 "toke.l"
3295 {
3296                             LEXTRACE("( ");
3297                             LEXRETURN('(');
3298                         }
3299         YY_BREAK
3300 case 64:
3301 YY_RULE_SETUP
3302 #line 664 "toke.l"
3303 {
3304                             LEXTRACE(") ");
3305                             LEXRETURN(')');
3306                         }
3307         YY_BREAK
3308 case 65:
3309 YY_RULE_SETUP
3310 #line 669 "toke.l"
3311 {
3312                             LEXTRACE(", ");
3313                             LEXRETURN(',');
3314                         }                       /* return ',' */
3315         YY_BREAK
3316 case 66:
3317 YY_RULE_SETUP
3318 #line 674 "toke.l"
3319 {
3320                             LEXTRACE("= ");
3321                             LEXRETURN('=');
3322                         }                       /* return '=' */
3323         YY_BREAK
3324 case 67:
3325 YY_RULE_SETUP
3326 #line 679 "toke.l"
3327 {
3328                             LEXTRACE(": ");
3329                             LEXRETURN(':');
3330                         }                       /* return ':' */
3331         YY_BREAK
3332 case 68:
3333 YY_RULE_SETUP
3334 #line 684 "toke.l"
3335 {
3336                             if (sudoersleng & 1) {
3337                                 LEXTRACE("!");
3338                                 LEXRETURN('!'); /* return '!' */
3339                             }
3340                         }
3341         YY_BREAK
3342 case 69:
3343 /* rule 69 can match eol */
3344 YY_RULE_SETUP
3345 #line 691 "toke.l"
3346 {
3347                             if (YY_START == INSTR) {
3348                                 LEXTRACE("ERROR ");
3349                                 LEXRETURN(ERROR);       /* line break in string */
3350                             }
3351                             BEGIN INITIAL;
3352                             sudolineno++;
3353                             continued = false;
3354                             LEXTRACE("\n");
3355                             LEXRETURN(COMMENT);
3356                         }                       /* return newline */
3357         YY_BREAK
3358 case 70:
3359 YY_RULE_SETUP
3360 #line 703 "toke.l"
3361 {                       /* throw away space/tabs */
3362                             sawspace = true;    /* but remember for fill_args */
3363                         }
3364         YY_BREAK
3365 case 71:
3366 /* rule 71 can match eol */
3367 YY_RULE_SETUP
3368 #line 707 "toke.l"
3369 {
3370                             sawspace = true;    /* remember for fill_args */
3371                             sudolineno++;
3372                             continued = true;
3373                         }                       /* throw away EOL after \ */
3374         YY_BREAK
3375 case 72:
3376 /* rule 72 can match eol */
3377 YY_RULE_SETUP
3378 #line 713 "toke.l"
3379 {
3380                             if (sudoerstext[sudoersleng - 1] == '\n') {
3381                                 /* comment ending in a newline */
3382                                 BEGIN INITIAL;
3383                                 sudolineno++;
3384                                 continued = false;
3385                             } else if (!feof(sudoersin)) {
3386                                 LEXTRACE("ERROR ");
3387                                 LEXRETURN(ERROR);
3388                             }
3389                             LEXTRACE("#\n");
3390                             LEXRETURN(COMMENT);
3391                         }                       /* comment, not uid/gid */
3392         YY_BREAK
3393 case 73:
3394 YY_RULE_SETUP
3395 #line 727 "toke.l"
3396 {
3397                             LEXTRACE("ERROR ");
3398                             LEXRETURN(ERROR);
3399                         }       /* parse error */
3400         YY_BREAK
3401 case YY_STATE_EOF(INITIAL):
3402 case YY_STATE_EOF(GOTDEFS):
3403 case YY_STATE_EOF(GOTCMND):
3404 case YY_STATE_EOF(STARTDEFS):
3405 case YY_STATE_EOF(INDEFS):
3406 case YY_STATE_EOF(INSTR):
3407 case YY_STATE_EOF(WANTDIGEST):
3408 #line 732 "toke.l"
3409 {
3410                             if (YY_START != INITIAL) {
3411                                 BEGIN INITIAL;
3412                                 LEXTRACE("ERROR ");
3413                                 LEXRETURN(ERROR);
3414                             }
3415                             if (!pop_include())
3416                                 yyterminate();
3417                         }
3418         YY_BREAK
3419 case 74:
3420 YY_RULE_SETUP
3421 #line 742 "toke.l"
3422 ECHO;
3423         YY_BREAK
3424 #line 3419 "toke.c"
3425
3426         case YY_END_OF_BUFFER:
3427                 {
3428                 /* Amount of text matched not including the EOB char. */
3429                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
3430
3431                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
3432                 *yy_cp = (yy_hold_char);
3433                 YY_RESTORE_YY_MORE_OFFSET
3434
3435                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
3436                         {
3437                         /* We're scanning a new file or input source.  It's
3438                          * possible that this happened because the user
3439                          * just pointed sudoersin at a new source and called
3440                          * sudoerslex().  If so, then we have to assure
3441                          * consistency between YY_CURRENT_BUFFER and our
3442                          * globals.  Here is the right place to do so, because
3443                          * this is the first action (other than possibly a
3444                          * back-up) that will match for the new input source.
3445                          */
3446                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3447                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = sudoersin;
3448                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
3449                         }
3450
3451                 /* Note that here we test for yy_c_buf_p "<=" to the position
3452                  * of the first EOB in the buffer, since yy_c_buf_p will
3453                  * already have been incremented past the NUL character
3454                  * (since all states make transitions on EOB to the
3455                  * end-of-buffer state).  Contrast this with the test
3456                  * in input().
3457                  */
3458                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3459                         { /* This was really a NUL. */
3460                         yy_state_type yy_next_state;
3461
3462                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
3463
3464                         yy_current_state = yy_get_previous_state(  );
3465
3466                         /* Okay, we're now positioned to make the NUL
3467                          * transition.  We couldn't have
3468                          * yy_get_previous_state() go ahead and do it
3469                          * for us because it doesn't know how to deal
3470                          * with the possibility of jamming (and we don't
3471                          * want to build jamming into it because then it
3472                          * will run more slowly).
3473                          */
3474
3475                         yy_next_state = yy_try_NUL_trans( yy_current_state );
3476
3477                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3478
3479                         if ( yy_next_state )
3480                                 {
3481                                 /* Consume the NUL. */
3482                                 yy_cp = ++(yy_c_buf_p);
3483                                 yy_current_state = yy_next_state;
3484                                 goto yy_match;
3485                                 }
3486
3487                         else
3488                                 {
3489                                 yy_cp = (yy_c_buf_p);
3490                                 goto yy_find_action;
3491                                 }
3492                         }
3493
3494                 else switch ( yy_get_next_buffer(  ) )
3495                         {
3496                         case EOB_ACT_END_OF_FILE:
3497                                 {
3498                                 (yy_did_buffer_switch_on_eof) = 0;
3499
3500                                 if ( sudoerswrap( ) )
3501                                         {
3502                                         /* Note: because we've taken care in
3503                                          * yy_get_next_buffer() to have set up
3504                                          * sudoerstext, we can now set up
3505                                          * yy_c_buf_p so that if some total
3506                                          * hoser (like flex itself) wants to
3507                                          * call the scanner after we return the
3508                                          * YY_NULL, it'll still work - another
3509                                          * YY_NULL will get returned.
3510                                          */
3511                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
3512
3513                                         yy_act = YY_STATE_EOF(YY_START);
3514                                         goto do_action;
3515                                         }
3516
3517                                 else
3518                                         {
3519                                         if ( ! (yy_did_buffer_switch_on_eof) )
3520                                                 YY_NEW_FILE;
3521                                         }
3522                                 break;
3523                                 }
3524
3525                         case EOB_ACT_CONTINUE_SCAN:
3526                                 (yy_c_buf_p) =
3527                                         (yytext_ptr) + yy_amount_of_matched_text;
3528
3529                                 yy_current_state = yy_get_previous_state(  );
3530
3531                                 yy_cp = (yy_c_buf_p);
3532                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3533                                 goto yy_match;
3534
3535                         case EOB_ACT_LAST_MATCH:
3536                                 (yy_c_buf_p) =
3537                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
3538
3539                                 yy_current_state = yy_get_previous_state(  );
3540
3541                                 yy_cp = (yy_c_buf_p);
3542                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3543                                 goto yy_find_action;
3544                         }
3545                 break;
3546                 }
3547
3548         default:
3549                 YY_FATAL_ERROR(
3550                         "fatal flex scanner internal error--no action found" );
3551         } /* end of action switch */
3552                 } /* end of scanning one token */
3553         } /* end of user's declarations */
3554 } /* end of sudoerslex */
3555
3556 /* yy_get_next_buffer - try to read in a new buffer
3557  *
3558  * Returns a code representing an action:
3559  *      EOB_ACT_LAST_MATCH -
3560  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
3561  *      EOB_ACT_END_OF_FILE - end of file
3562  */
3563 static int yy_get_next_buffer (void)
3564 {
3565         char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
3566         char *source = (yytext_ptr);
3567         int number_to_move, i;
3568         int ret_val;
3569
3570         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
3571                 YY_FATAL_ERROR(
3572                 "fatal flex scanner internal error--end of buffer missed" );
3573
3574         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
3575                 { /* Don't try to fill the buffer, so this is an EOF. */
3576                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
3577                         {
3578                         /* We matched a single character, the EOB, so
3579                          * treat this as a final EOF.
3580                          */
3581                         return EOB_ACT_END_OF_FILE;
3582                         }
3583
3584                 else
3585                         {
3586                         /* We matched some text prior to the EOB, first
3587                          * process it.
3588                          */
3589                         return EOB_ACT_LAST_MATCH;
3590                         }
3591                 }
3592
3593         /* Try to read more data. */
3594
3595         /* First move last chars to start of buffer. */
3596         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
3597
3598         for ( i = 0; i < number_to_move; ++i )
3599                 *(dest++) = *(source++);
3600
3601         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
3602                 /* don't do the read, it's not guaranteed to return an EOF,
3603                  * just force an EOF
3604                  */
3605                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
3606
3607         else
3608                 {
3609                         yy_size_t num_to_read =
3610                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
3611
3612                 while ( num_to_read <= 0 )
3613                         { /* Not enough room in the buffer - grow it. */
3614
3615                         /* just a shorter name for the current buffer */
3616                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
3617
3618                         int yy_c_buf_p_offset =
3619                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
3620
3621                         if ( b->yy_is_our_buffer )
3622                                 {
3623                                 yy_size_t new_size = b->yy_buf_size * 2;
3624
3625                                 if ( new_size <= 0 )
3626                                         b->yy_buf_size += b->yy_buf_size / 8;
3627                                 else
3628                                         b->yy_buf_size *= 2;
3629
3630                                 b->yy_ch_buf = (char *)
3631                                         /* Include room in for 2 EOB chars. */
3632                                         sudoersrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
3633                                 }
3634                         else
3635                                 /* Can't grow it, we don't own it. */
3636                                 b->yy_ch_buf = 0;
3637
3638                         if ( ! b->yy_ch_buf )
3639                                 YY_FATAL_ERROR(
3640                                 "fatal error - scanner input buffer overflow" );
3641
3642                         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
3643
3644                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
3645                                                 number_to_move - 1;
3646
3647                         }
3648
3649                 if ( num_to_read > YY_READ_BUF_SIZE )
3650                         num_to_read = YY_READ_BUF_SIZE;
3651
3652                 /* Read in more data. */
3653                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
3654                         (yy_n_chars), num_to_read );
3655
3656                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3657                 }
3658
3659         if ( (yy_n_chars) == 0 )
3660                 {
3661                 if ( number_to_move == YY_MORE_ADJ )
3662                         {
3663                         ret_val = EOB_ACT_END_OF_FILE;
3664                         sudoersrestart(sudoersin  );
3665                         }
3666
3667                 else
3668                         {
3669                         ret_val = EOB_ACT_LAST_MATCH;
3670                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
3671                                 YY_BUFFER_EOF_PENDING;
3672                         }
3673                 }
3674
3675         else
3676                 ret_val = EOB_ACT_CONTINUE_SCAN;
3677
3678         if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
3679                 /* Extend the array by 50%, plus the number we really need. */
3680                 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
3681                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) sudoersrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
3682                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3683                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
3684                 /* "- 2" to take care of EOB's */
3685                 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
3686         }
3687
3688         (yy_n_chars) += number_to_move;
3689         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
3690         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
3691
3692         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
3693
3694         return ret_val;
3695 }
3696
3697 /* yy_get_previous_state - get the state just before the EOB char was reached */
3698
3699     static yy_state_type yy_get_previous_state (void)
3700 {
3701         yy_state_type yy_current_state;
3702         char *yy_cp;
3703     
3704         yy_current_state = (yy_start);
3705         yy_current_state += YY_AT_BOL();
3706
3707         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
3708                 {
3709                 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
3710                 if ( yy_accept[yy_current_state] )
3711                         {
3712                         (yy_last_accepting_state) = yy_current_state;
3713                         (yy_last_accepting_cpos) = yy_cp;
3714                         }
3715                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3716                         {
3717                         yy_current_state = (int) yy_def[yy_current_state];
3718                         if ( yy_current_state >= 896 )
3719                                 yy_c = yy_meta[(unsigned int) yy_c];
3720                         }
3721                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3722                 }
3723
3724         return yy_current_state;
3725 }
3726
3727 /* yy_try_NUL_trans - try to make a transition on the NUL character
3728  *
3729  * synopsis
3730  *      next_state = yy_try_NUL_trans( current_state );
3731  */
3732     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
3733 {
3734         int yy_is_jam;
3735         char *yy_cp = (yy_c_buf_p);
3736
3737         YY_CHAR yy_c = 1;
3738         if ( yy_accept[yy_current_state] )
3739                 {
3740                 (yy_last_accepting_state) = yy_current_state;
3741                 (yy_last_accepting_cpos) = yy_cp;
3742                 }
3743         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3744                 {
3745                 yy_current_state = (int) yy_def[yy_current_state];
3746                 if ( yy_current_state >= 896 )
3747                         yy_c = yy_meta[(unsigned int) yy_c];
3748                 }
3749         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3750         yy_is_jam = (yy_current_state == 895);
3751
3752                 return yy_is_jam ? 0 : yy_current_state;
3753 }
3754
3755 #ifndef YY_NO_INPUT
3756 #ifdef __cplusplus
3757     static int yyinput (void)
3758 #else
3759     static int input  (void)
3760 #endif
3761
3762 {
3763         int c;
3764     
3765         *(yy_c_buf_p) = (yy_hold_char);
3766
3767         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
3768                 {
3769                 /* yy_c_buf_p now points to the character we want to return.
3770                  * If this occurs *before* the EOB characters, then it's a
3771                  * valid NUL; if not, then we've hit the end of the buffer.
3772                  */
3773                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3774                         /* This was really a NUL. */
3775                         *(yy_c_buf_p) = '\0';
3776
3777                 else
3778                         { /* need more input */
3779                         yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
3780                         ++(yy_c_buf_p);
3781
3782                         switch ( yy_get_next_buffer(  ) )
3783                                 {
3784                                 case EOB_ACT_LAST_MATCH:
3785                                         /* This happens because yy_g_n_b()
3786                                          * sees that we've accumulated a
3787                                          * token and flags that we need to
3788                                          * try matching the token before
3789                                          * proceeding.  But for input(),
3790                                          * there's no matching to consider.
3791                                          * So convert the EOB_ACT_LAST_MATCH
3792                                          * to EOB_ACT_END_OF_FILE.
3793                                          */
3794
3795                                         /* Reset buffer status. */
3796                                         sudoersrestart(sudoersin );
3797
3798                                         /*FALLTHROUGH*/
3799
3800                                 case EOB_ACT_END_OF_FILE:
3801                                         {
3802                                         if ( sudoerswrap( ) )
3803                                                 return EOF;
3804
3805                                         if ( ! (yy_did_buffer_switch_on_eof) )
3806                                                 YY_NEW_FILE;
3807 #ifdef __cplusplus
3808                                         return yyinput();
3809 #else
3810                                         return input();
3811 #endif
3812                                         }
3813
3814                                 case EOB_ACT_CONTINUE_SCAN:
3815                                         (yy_c_buf_p) = (yytext_ptr) + offset;
3816                                         break;
3817                                 }
3818                         }
3819                 }
3820
3821         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
3822         *(yy_c_buf_p) = '\0';   /* preserve sudoerstext */
3823         (yy_hold_char) = *++(yy_c_buf_p);
3824
3825         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
3826
3827         return c;
3828 }
3829 #endif  /* ifndef YY_NO_INPUT */
3830
3831 /** Immediately switch to a different input stream.
3832  * @param input_file A readable stream.
3833  * 
3834  * @note This function does not reset the start condition to @c INITIAL .
3835  */
3836     void sudoersrestart  (FILE * input_file )
3837 {
3838     
3839         if ( ! YY_CURRENT_BUFFER ){
3840         sudoersensure_buffer_stack ();
3841                 YY_CURRENT_BUFFER_LVALUE =
3842             sudoers_create_buffer(sudoersin,YY_BUF_SIZE );
3843         }
3844
3845         sudoers_init_buffer(YY_CURRENT_BUFFER,input_file );
3846         sudoers_load_buffer_state( );
3847 }
3848
3849 /** Switch to a different input buffer.
3850  * @param new_buffer The new input buffer.
3851  * 
3852  */
3853     void sudoers_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
3854 {
3855     
3856         /* TODO. We should be able to replace this entire function body
3857          * with
3858          *              sudoerspop_buffer_state();
3859          *              sudoerspush_buffer_state(new_buffer);
3860      */
3861         sudoersensure_buffer_stack ();
3862         if ( YY_CURRENT_BUFFER == new_buffer )
3863                 return;
3864
3865         if ( YY_CURRENT_BUFFER )
3866                 {
3867                 /* Flush out information for old buffer. */
3868                 *(yy_c_buf_p) = (yy_hold_char);
3869                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3870                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3871                 }
3872
3873         YY_CURRENT_BUFFER_LVALUE = new_buffer;
3874         sudoers_load_buffer_state( );
3875
3876         /* We don't actually know whether we did this switch during
3877          * EOF (sudoerswrap()) processing, but the only time this flag
3878          * is looked at is after sudoerswrap() is called, so it's safe
3879          * to go ahead and always set it.
3880          */
3881         (yy_did_buffer_switch_on_eof) = 1;
3882 }
3883
3884 static void sudoers_load_buffer_state  (void)
3885 {
3886         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3887         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3888         sudoersin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3889         (yy_hold_char) = *(yy_c_buf_p);
3890 }
3891
3892 /** Allocate and initialize an input buffer state.
3893  * @param file A readable stream.
3894  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3895  * 
3896  * @return the allocated buffer state.
3897  */
3898     YY_BUFFER_STATE sudoers_create_buffer  (FILE * file, int  size )
3899 {
3900         YY_BUFFER_STATE b;
3901     
3902         b = (YY_BUFFER_STATE) sudoersalloc(sizeof( struct yy_buffer_state )  );
3903         if ( ! b )
3904                 YY_FATAL_ERROR( "out of dynamic memory in sudoers_create_buffer()" );
3905
3906         b->yy_buf_size = size;
3907
3908         /* yy_ch_buf has to be 2 characters longer than the size given because
3909          * we need to put in 2 end-of-buffer characters.
3910          */
3911         b->yy_ch_buf = (char *) sudoersalloc(b->yy_buf_size + 2  );
3912         if ( ! b->yy_ch_buf )
3913                 YY_FATAL_ERROR( "out of dynamic memory in sudoers_create_buffer()" );
3914
3915         b->yy_is_our_buffer = 1;
3916
3917         sudoers_init_buffer(b,file );
3918
3919         return b;
3920 }
3921
3922 /** Destroy the buffer.
3923  * @param b a buffer created with sudoers_create_buffer()
3924  * 
3925  */
3926     void sudoers_delete_buffer (YY_BUFFER_STATE  b )
3927 {
3928     
3929         if ( ! b )
3930                 return;
3931
3932         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3933                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3934
3935         if ( b->yy_is_our_buffer )
3936                 sudoersfree((void *) b->yy_ch_buf  );
3937
3938         sudoersfree((void *) b  );
3939 }
3940
3941 /* Initializes or reinitializes a buffer.
3942  * This function is sometimes called more than once on the same buffer,
3943  * such as during a sudoersrestart() or at EOF.
3944  */
3945     static void sudoers_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
3946
3947 {
3948         int oerrno = errno;
3949     
3950         sudoers_flush_buffer(b );
3951
3952         b->yy_input_file = file;
3953         b->yy_fill_buffer = 1;
3954
3955     /* If b is the current buffer, then sudoers_init_buffer was _probably_
3956      * called from sudoersrestart() or through yy_get_next_buffer.
3957      * In that case, we don't want to reset the lineno or column.
3958      */
3959     if (b != YY_CURRENT_BUFFER){
3960         b->yy_bs_lineno = 1;
3961         b->yy_bs_column = 0;
3962     }
3963
3964         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3965     
3966         errno = oerrno;
3967 }
3968
3969 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3970  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3971  * 
3972  */
3973     void sudoers_flush_buffer (YY_BUFFER_STATE  b )
3974 {
3975         if ( ! b )
3976                 return;
3977
3978         b->yy_n_chars = 0;
3979
3980         /* We always need two end-of-buffer characters.  The first causes
3981          * a transition to the end-of-buffer state.  The second causes
3982          * a jam in that state.
3983          */
3984         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3985         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3986
3987         b->yy_buf_pos = &b->yy_ch_buf[0];
3988
3989         b->yy_at_bol = 1;
3990         b->yy_buffer_status = YY_BUFFER_NEW;
3991
3992         if ( b == YY_CURRENT_BUFFER )
3993                 sudoers_load_buffer_state( );
3994 }
3995
3996 /** Pushes the new state onto the stack. The new state becomes
3997  *  the current state. This function will allocate the stack
3998  *  if necessary.
3999  *  @param new_buffer The new state.
4000  *  
4001  */
4002 void sudoerspush_buffer_state (YY_BUFFER_STATE new_buffer )
4003 {
4004         if (new_buffer == NULL)
4005                 return;
4006
4007         sudoersensure_buffer_stack();
4008
4009         /* This block is copied from sudoers_switch_to_buffer. */
4010         if ( YY_CURRENT_BUFFER )
4011                 {
4012                 /* Flush out information for old buffer. */
4013                 *(yy_c_buf_p) = (yy_hold_char);
4014                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
4015                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
4016                 }
4017
4018         /* Only push if top exists. Otherwise, replace top. */
4019         if (YY_CURRENT_BUFFER)
4020                 (yy_buffer_stack_top)++;
4021         YY_CURRENT_BUFFER_LVALUE = new_buffer;
4022
4023         /* copied from sudoers_switch_to_buffer. */
4024         sudoers_load_buffer_state( );
4025         (yy_did_buffer_switch_on_eof) = 1;
4026 }
4027
4028 /** Removes and deletes the top of the stack, if present.
4029  *  The next element becomes the new top.
4030  *  
4031  */
4032 void sudoerspop_buffer_state (void)
4033 {
4034         if (!YY_CURRENT_BUFFER)
4035                 return;
4036
4037         sudoers_delete_buffer(YY_CURRENT_BUFFER );
4038         YY_CURRENT_BUFFER_LVALUE = NULL;
4039         if ((yy_buffer_stack_top) > 0)
4040                 --(yy_buffer_stack_top);
4041
4042         if (YY_CURRENT_BUFFER) {
4043                 sudoers_load_buffer_state( );
4044                 (yy_did_buffer_switch_on_eof) = 1;
4045         }
4046 }
4047
4048 /* Allocates the stack if it does not exist.
4049  *  Guarantees space for at least one push.
4050  */
4051 static void sudoersensure_buffer_stack (void)
4052 {
4053         yy_size_t num_to_alloc;
4054     
4055         if (!(yy_buffer_stack)) {
4056
4057                 /* First allocation is just for 2 elements, since we don't know if this
4058                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
4059                  * immediate realloc on the next call.
4060          */
4061                 num_to_alloc = 1;
4062                 (yy_buffer_stack) = (struct yy_buffer_state**)sudoersalloc
4063                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
4064                                                                 );
4065                 if ( ! (yy_buffer_stack) )
4066                         YY_FATAL_ERROR( "out of dynamic memory in sudoersensure_buffer_stack()" );
4067                                                                   
4068                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
4069                                 
4070                 (yy_buffer_stack_max) = num_to_alloc;
4071                 (yy_buffer_stack_top) = 0;
4072                 return;
4073         }
4074
4075         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
4076
4077                 /* Increase the buffer to prepare for a possible push. */
4078                 int grow_size = 8 /* arbitrary grow size */;
4079
4080                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
4081                 (yy_buffer_stack) = (struct yy_buffer_state**)sudoersrealloc
4082                                                                 ((yy_buffer_stack),
4083                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
4084                                                                 );
4085                 if ( ! (yy_buffer_stack) )
4086                         YY_FATAL_ERROR( "out of dynamic memory in sudoersensure_buffer_stack()" );
4087
4088                 /* zero only the new slots.*/
4089                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
4090                 (yy_buffer_stack_max) = num_to_alloc;
4091         }
4092 }
4093
4094 /** Setup the input buffer state to scan directly from a user-specified character buffer.
4095  * @param base the character buffer
4096  * @param size the size in bytes of the character buffer
4097  * 
4098  * @return the newly allocated buffer state object. 
4099  */
4100 YY_BUFFER_STATE sudoers_scan_buffer  (char * base, yy_size_t  size )
4101 {
4102         YY_BUFFER_STATE b;
4103     
4104         if ( size < 2 ||
4105              base[size-2] != YY_END_OF_BUFFER_CHAR ||
4106              base[size-1] != YY_END_OF_BUFFER_CHAR )
4107                 /* They forgot to leave room for the EOB's. */
4108                 return 0;
4109
4110         b = (YY_BUFFER_STATE) sudoersalloc(sizeof( struct yy_buffer_state )  );
4111         if ( ! b )
4112                 YY_FATAL_ERROR( "out of dynamic memory in sudoers_scan_buffer()" );
4113
4114         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
4115         b->yy_buf_pos = b->yy_ch_buf = base;
4116         b->yy_is_our_buffer = 0;
4117         b->yy_input_file = 0;
4118         b->yy_n_chars = b->yy_buf_size;
4119         b->yy_is_interactive = 0;
4120         b->yy_at_bol = 1;
4121         b->yy_fill_buffer = 0;
4122         b->yy_buffer_status = YY_BUFFER_NEW;
4123
4124         sudoers_switch_to_buffer(b  );
4125
4126         return b;
4127 }
4128
4129 /** Setup the input buffer state to scan a string. The next call to sudoerslex() will
4130  * scan from a @e copy of @a str.
4131  * @param yystr a NUL-terminated string to scan
4132  * 
4133  * @return the newly allocated buffer state object.
4134  * @note If you want to scan bytes that may contain NUL values, then use
4135  *       sudoers_scan_bytes() instead.
4136  */
4137 YY_BUFFER_STATE sudoers_scan_string (yyconst char * yystr )
4138 {
4139     
4140         return sudoers_scan_bytes(yystr,strlen(yystr) );
4141 }
4142
4143 /** Setup the input buffer state to scan the given bytes. The next call to sudoerslex() will
4144  * scan from a @e copy of @a bytes.
4145  * @param yybytes the byte buffer to scan
4146  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
4147  * 
4148  * @return the newly allocated buffer state object.
4149  */
4150 YY_BUFFER_STATE sudoers_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
4151 {
4152         YY_BUFFER_STATE b;
4153         char *buf;
4154         yy_size_t n;
4155         yy_size_t i;
4156     
4157         /* Get memory for full buffer, including space for trailing EOB's. */
4158         n = _yybytes_len + 2;
4159         buf = (char *) sudoersalloc(n  );
4160         if ( ! buf )
4161                 YY_FATAL_ERROR( "out of dynamic memory in sudoers_scan_bytes()" );
4162
4163         for ( i = 0; i < _yybytes_len; ++i )
4164                 buf[i] = yybytes[i];
4165
4166         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
4167
4168         b = sudoers_scan_buffer(buf,n );
4169         if ( ! b )
4170                 YY_FATAL_ERROR( "bad buffer in sudoers_scan_bytes()" );
4171
4172         /* It's okay to grow etc. this buffer, and we should throw it
4173          * away when we're done.
4174          */
4175         b->yy_is_our_buffer = 1;
4176
4177         return b;
4178 }
4179
4180 #ifndef YY_EXIT_FAILURE
4181 #define YY_EXIT_FAILURE 2
4182 #endif
4183
4184 static void yy_fatal_error (yyconst char* msg )
4185 {
4186         (void) fprintf( stderr, "%s\n", msg );
4187         exit( YY_EXIT_FAILURE );
4188 }
4189
4190 /* Redefine yyless() so it works in section 3 code. */
4191
4192 #undef yyless
4193 #define yyless(n) \
4194         do \
4195                 { \
4196                 /* Undo effects of setting up sudoerstext. */ \
4197         int yyless_macro_arg = (n); \
4198         YY_LESS_LINENO(yyless_macro_arg);\
4199                 sudoerstext[sudoersleng] = (yy_hold_char); \
4200                 (yy_c_buf_p) = sudoerstext + yyless_macro_arg; \
4201                 (yy_hold_char) = *(yy_c_buf_p); \
4202                 *(yy_c_buf_p) = '\0'; \
4203                 sudoersleng = yyless_macro_arg; \
4204                 } \
4205         while ( 0 )
4206
4207 /* Accessor  methods (get/set functions) to struct members. */
4208
4209 /** Get the current line number.
4210  * 
4211  */
4212 int sudoersget_lineno  (void)
4213 {
4214         
4215     return sudoerslineno;
4216 }
4217
4218 /** Get the input stream.
4219  * 
4220  */
4221 FILE *sudoersget_in  (void)
4222 {
4223         return sudoersin;
4224 }
4225
4226 /** Get the output stream.
4227  * 
4228  */
4229 FILE *sudoersget_out  (void)
4230 {
4231         return sudoersout;
4232 }
4233
4234 /** Get the length of the current token.
4235  * 
4236  */
4237 yy_size_t sudoersget_leng  (void)
4238 {
4239         return sudoersleng;
4240 }
4241
4242 /** Get the current token.
4243  * 
4244  */
4245
4246 char *sudoersget_text  (void)
4247 {
4248         return sudoerstext;
4249 }
4250
4251 /** Set the current line number.
4252  * @param line_number
4253  * 
4254  */
4255 void sudoersset_lineno (int  line_number )
4256 {
4257     
4258     sudoerslineno = line_number;
4259 }
4260
4261 /** Set the input stream. This does not discard the current
4262  * input buffer.
4263  * @param in_str A readable stream.
4264  * 
4265  * @see sudoers_switch_to_buffer
4266  */
4267 void sudoersset_in (FILE *  in_str )
4268 {
4269         sudoersin = in_str ;
4270 }
4271
4272 void sudoersset_out (FILE *  out_str )
4273 {
4274         sudoersout = out_str ;
4275 }
4276
4277 int sudoersget_debug  (void)
4278 {
4279         return sudoers_flex_debug;
4280 }
4281
4282 void sudoersset_debug (int  bdebug )
4283 {
4284         sudoers_flex_debug = bdebug ;
4285 }
4286
4287 static int yy_init_globals (void)
4288 {
4289         /* Initialization is the same as for the non-reentrant scanner.
4290      * This function is called from sudoerslex_destroy(), so don't allocate here.
4291      */
4292
4293     (yy_buffer_stack) = 0;
4294     (yy_buffer_stack_top) = 0;
4295     (yy_buffer_stack_max) = 0;
4296     (yy_c_buf_p) = (char *) 0;
4297     (yy_init) = 0;
4298     (yy_start) = 0;
4299
4300 /* Defined in main.c */
4301 #ifdef YY_STDINIT
4302     sudoersin = stdin;
4303     sudoersout = stdout;
4304 #else
4305     sudoersin = (FILE *) 0;
4306     sudoersout = (FILE *) 0;
4307 #endif
4308
4309     /* For future reference: Set errno on error, since we are called by
4310      * sudoerslex_init()
4311      */
4312     return 0;
4313 }
4314
4315 /* sudoerslex_destroy is for both reentrant and non-reentrant scanners. */
4316 int sudoerslex_destroy  (void)
4317 {
4318     
4319     /* Pop the buffer stack, destroying each element. */
4320         while(YY_CURRENT_BUFFER){
4321                 sudoers_delete_buffer(YY_CURRENT_BUFFER  );
4322                 YY_CURRENT_BUFFER_LVALUE = NULL;
4323                 sudoerspop_buffer_state();
4324         }
4325
4326         /* Destroy the stack itself. */
4327         sudoersfree((yy_buffer_stack) );
4328         (yy_buffer_stack) = NULL;
4329
4330     /* Reset the globals. This is important in a non-reentrant scanner so the next time
4331      * sudoerslex() is called, initialization will occur. */
4332     yy_init_globals( );
4333
4334     return 0;
4335 }
4336
4337 /*
4338  * Internal utility routines.
4339  */
4340
4341 #ifndef yytext_ptr
4342 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
4343 {
4344         int i;
4345         for ( i = 0; i < n; ++i )
4346                 s1[i] = s2[i];
4347 }
4348 #endif
4349
4350 #ifdef YY_NEED_STRLEN
4351 static int yy_flex_strlen (yyconst char * s )
4352 {
4353         int n;
4354         for ( n = 0; s[n]; ++n )
4355                 ;
4356
4357         return n;
4358 }
4359 #endif
4360
4361 void *sudoersalloc (yy_size_t  size )
4362 {
4363         return (void *) malloc( size );
4364 }
4365
4366 void *sudoersrealloc  (void * ptr, yy_size_t  size )
4367 {
4368         /* The cast to (char *) in the following accommodates both
4369          * implementations that use char* generic pointers, and those
4370          * that use void* generic pointers.  It works with the latter
4371          * because both ANSI C and C++ allow castless assignment from
4372          * any pointer type to void*, and deal with argument conversions
4373          * as though doing an assignment.
4374          */
4375         return (void *) realloc( (char *) ptr, size );
4376 }
4377
4378 void sudoersfree (void * ptr )
4379 {
4380         free( (char *) ptr );   /* see sudoersrealloc() for (char *) cast */
4381 }
4382
4383 #define YYTABLES_NAME "yytables"
4384
4385 #line 742 "toke.l"
4386
4387
4388 struct path_list {
4389     SLIST_ENTRY(path_list) entries;
4390     char *path;
4391 };
4392
4393 SLIST_HEAD(path_list_head, path_list);
4394
4395 struct include_stack {
4396     YY_BUFFER_STATE bs;
4397     char *path;
4398     struct path_list_head more; /* more files in case of includedir */
4399     int lineno;
4400     bool keepopen;
4401 };
4402
4403 /*
4404  * Compare two struct path_list structs in reverse order.
4405  */
4406 static int
4407 pl_compare(const void *v1, const void *v2)
4408 {
4409     const struct path_list * const *p1 = v1;
4410     const struct path_list * const *p2 = v2;
4411
4412     return strcmp((*p2)->path, (*p1)->path);
4413 }
4414
4415 /*
4416  * Open dirpath and fill in pathsp with an array of regular files
4417  * that do not end in '~' or contain a '.'.
4418  * Returns the number of files or -1 on error.
4419  * If zero files are found, NULL is stored in pathsp.
4420  */
4421 static int
4422 read_dir_files(const char *dirpath, struct path_list ***pathsp)
4423 {
4424     DIR *dir;
4425     int i, count = 0;
4426     int max_paths = 32;
4427     struct dirent *dent;
4428     struct path_list **paths = NULL;
4429     debug_decl(read_dir_files, SUDOERS_DEBUG_PARSER)
4430
4431     dir = opendir(dirpath);
4432     if (dir == NULL) {
4433         if (errno == ENOENT)
4434             goto done;
4435         sudo_warn("%s", dirpath);
4436         goto bad;
4437     }
4438     paths = reallocarray(NULL, max_paths, sizeof(*paths));
4439     if (paths == NULL)
4440         goto oom;
4441     while ((dent = readdir(dir)) != NULL) {
4442         struct path_list *pl;
4443         struct stat sb;
4444         size_t len;
4445         char *path;
4446
4447         /* Ignore files that end in '~' or have a '.' in them. */
4448         if (dent->d_name[0] == '\0' || dent->d_name[NAMLEN(dent) - 1] == '~'
4449             || strchr(dent->d_name, '.') != NULL) {
4450             continue;
4451         }
4452         len = strlen(dirpath) + 1 + NAMLEN(dent);
4453         if ((path = rcstr_alloc(len)) == NULL)
4454             goto oom;
4455         (void)snprintf(path, len + 1, "%s/%s", dirpath, dent->d_name);
4456         if (stat(path, &sb) != 0 || !S_ISREG(sb.st_mode)) {
4457             rcstr_delref(path);
4458             continue;
4459         }
4460         pl = malloc(sizeof(*pl));
4461         if (pl == NULL) {
4462             rcstr_delref(path);
4463             goto oom;
4464         }
4465         pl->path = path;
4466         if (count >= max_paths) {
4467             struct path_list **tmp;
4468             max_paths <<= 1;
4469             tmp = reallocarray(paths, max_paths, sizeof(*paths));
4470             if (tmp == NULL) {
4471                 rcstr_delref(path);
4472                 free(pl);
4473                 goto oom;
4474             }
4475             paths = tmp;
4476         }
4477         paths[count++] = pl;
4478     }
4479     closedir(dir);
4480     if (count == 0) {
4481         free(paths);
4482         paths = NULL;
4483     }
4484 done:
4485     *pathsp = paths;
4486     debug_return_int(count);
4487 oom:
4488     sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory"));
4489 bad:
4490     sudoerserror(NULL);
4491     if (dir != NULL)
4492         closedir(dir);
4493     for (i = 0; i < count; i++) {
4494         rcstr_delref(paths[i]->path);
4495         free(paths[i]);
4496     }
4497     free(paths);
4498     debug_return_int(-1);
4499 }
4500
4501 /*
4502  * Push a list of all files in dirpath onto stack.
4503  * Returns the number of files or -1 on error.
4504  */
4505 static int
4506 switch_dir(struct include_stack *stack, char *dirpath)
4507 {
4508     struct path_list **paths = NULL;
4509     int count, i;
4510     debug_decl(switch_dir, SUDOERS_DEBUG_PARSER)
4511
4512     count = read_dir_files(dirpath, &paths);
4513     if (count > 0) {
4514         /* Sort the list as an array in reverse order. */
4515         qsort(paths, count, sizeof(*paths), pl_compare);
4516
4517         /* Build up the list in sorted order. */
4518         for (i = 0; i < count; i++) {
4519             SLIST_INSERT_HEAD(&stack->more, paths[i], entries);
4520         }
4521         free(paths);
4522     }
4523
4524     debug_return_int(count);
4525 }
4526
4527 #define MAX_SUDOERS_DEPTH       128
4528 #define SUDOERS_STACK_INCREMENT 16
4529
4530 static size_t istacksize, idepth;
4531 static struct include_stack *istack;
4532 static bool keepopen;
4533
4534 void
4535 init_lexer(void)
4536 {
4537     struct path_list *pl;
4538     debug_decl(init_lexer, SUDOERS_DEBUG_PARSER)
4539
4540     while (idepth) {
4541         idepth--;
4542         while ((pl = SLIST_FIRST(&istack[idepth].more)) != NULL) {
4543             SLIST_REMOVE_HEAD(&istack[idepth].more, entries);
4544             rcstr_delref(pl->path);
4545             free(pl);
4546         }
4547         rcstr_delref(istack[idepth].path);
4548         if (idepth && !istack[idepth].keepopen)
4549             fclose(istack[idepth].bs->yy_input_file);
4550         sudoers_delete_buffer(istack[idepth].bs);
4551     }
4552     free(istack);
4553     istack = NULL;
4554     istacksize = idepth = 0;
4555     sudolineno = 1;
4556     keepopen = false;
4557     sawspace = false;
4558     continued = false;
4559     digest_type = -1;
4560     prev_state = INITIAL;
4561
4562     debug_return;
4563 }
4564
4565 /*
4566  * Open an include file (or file from a directory), push the old
4567  * sudoers file buffer and switch to the new one.
4568  * A missing or insecure include dir is simply ignored.
4569  * Returns false on error, else true.
4570  */
4571 static bool
4572 push_include_int(char *path, bool isdir)
4573 {
4574     struct path_list *pl;
4575     FILE *fp;
4576     debug_decl(push_include_int, SUDOERS_DEBUG_PARSER)
4577
4578     /* push current state onto stack */
4579     if (idepth >= istacksize) {
4580         struct include_stack *new_istack;
4581
4582         if (idepth > MAX_SUDOERS_DEPTH) {
4583             sudoerserror(N_("too many levels of includes"));
4584             debug_return_bool(false);
4585         }
4586         istacksize += SUDOERS_STACK_INCREMENT;
4587         new_istack = reallocarray(istack, istacksize, sizeof(*istack));
4588         if (new_istack == NULL) {
4589             sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory"));
4590             sudoerserror(NULL);
4591             debug_return_bool(false);
4592         }
4593         istack = new_istack;
4594     }
4595     SLIST_INIT(&istack[idepth].more);
4596     if (isdir) {
4597         struct stat sb;
4598         int count, status;
4599
4600         status = sudo_secure_dir(path, sudoers_uid, sudoers_gid, &sb);
4601         if (status != SUDO_PATH_SECURE) {
4602             if (sudoers_warnings) {
4603                 switch (status) {
4604                 case SUDO_PATH_BAD_TYPE:
4605                     errno = ENOTDIR;
4606                     sudo_warn("%s", path);
4607                     break;
4608                 case SUDO_PATH_WRONG_OWNER:
4609                     sudo_warnx(U_("%s is owned by uid %u, should be %u"),   
4610                         path, (unsigned int) sb.st_uid,
4611                         (unsigned int) sudoers_uid);
4612                     break;
4613                 case SUDO_PATH_WORLD_WRITABLE:
4614                     sudo_warnx(U_("%s is world writable"), path);
4615                     break;
4616                 case SUDO_PATH_GROUP_WRITABLE:
4617                     sudo_warnx(U_("%s is owned by gid %u, should be %u"),
4618                         path, (unsigned int) sb.st_gid,
4619                         (unsigned int) sudoers_gid);
4620                     break;
4621                 default:
4622                     break;
4623                 }
4624             }
4625             /* A missing or insecure include dir is not a fatal error. */
4626             debug_return_bool(true);
4627         }
4628         count = switch_dir(&istack[idepth], path);
4629         if (count <= 0) {
4630             /* switch_dir() called sudoerserror() for us */
4631             rcstr_delref(path);
4632             debug_return_bool(count ? false : true);
4633         }
4634
4635         /* Parse the first dir entry we can open, leave the rest for later. */
4636         do {
4637             rcstr_delref(path);
4638             if ((pl = SLIST_FIRST(&istack[idepth].more)) == NULL) {
4639                 /* Unable to open any files in include dir, not an error. */
4640                 debug_return_bool(true);
4641             }
4642             SLIST_REMOVE_HEAD(&istack[idepth].more, entries);
4643             path = pl->path;
4644             free(pl);
4645         } while ((fp = open_sudoers(path, false, &keepopen)) == NULL);
4646     } else {
4647         if ((fp = open_sudoers(path, true, &keepopen)) == NULL) {
4648             /* The error was already printed by open_sudoers() */
4649             sudoerserror(NULL);
4650             debug_return_bool(false);
4651         }
4652     }
4653     /* Push the old (current) file and open the new one. */
4654     istack[idepth].path = sudoers; /* push old path (and its ref) */
4655     istack[idepth].bs = YY_CURRENT_BUFFER;
4656     istack[idepth].lineno = sudolineno;
4657     istack[idepth].keepopen = keepopen;
4658     idepth++;
4659     sudolineno = 1;
4660     sudoers = path;
4661     sudoers_switch_to_buffer(sudoers_create_buffer(fp, YY_BUF_SIZE));
4662
4663     debug_return_bool(true);
4664 }
4665
4666 /*
4667  * Restore the previous sudoers file and buffer, or, in the case
4668  * of an includedir, switch to the next file in the dir.
4669  * Returns false if there is nothing to pop, else true.
4670  */
4671 static bool
4672 pop_include(void)
4673 {
4674     struct path_list *pl;
4675     FILE *fp;
4676     debug_decl(pop_include, SUDOERS_DEBUG_PARSER)
4677
4678     if (idepth == 0 || YY_CURRENT_BUFFER == NULL)
4679         debug_return_bool(false);
4680
4681     if (!keepopen)
4682         fclose(YY_CURRENT_BUFFER->yy_input_file);
4683     sudoers_delete_buffer(YY_CURRENT_BUFFER);
4684     /* If we are in an include dir, move to the next file. */
4685     while ((pl = SLIST_FIRST(&istack[idepth - 1].more)) != NULL) {
4686         SLIST_REMOVE_HEAD(&istack[idepth - 1].more, entries);
4687         fp = open_sudoers(pl->path, false, &keepopen);
4688         if (fp != NULL) {
4689             rcstr_delref(sudoers);
4690             sudoers = pl->path;
4691             sudolineno = 1;
4692             sudoers_switch_to_buffer(sudoers_create_buffer(fp, YY_BUF_SIZE));
4693             free(pl);
4694             break;
4695         }
4696         /* Unable to open path in include dir, go to next one. */
4697         rcstr_delref(pl->path);
4698         free(pl);
4699     }
4700     /* If no path list, just pop the last dir on the stack. */
4701     if (pl == NULL) {
4702         idepth--;
4703         sudoers_switch_to_buffer(istack[idepth].bs);
4704         rcstr_delref(sudoers);
4705         sudoers = istack[idepth].path;
4706         sudolineno = istack[idepth].lineno;
4707         keepopen = istack[idepth].keepopen;
4708     }
4709     debug_return_bool(true);
4710 }
4711
4712 static char *
4713 parse_include_int(const char *base, bool isdir)
4714 {
4715     const char *cp, *ep;
4716     char *path, *pp;
4717     int dirlen = 0, len = 0, subst = 0;
4718     size_t shost_len = 0;
4719     debug_decl(parse_include, SUDOERS_DEBUG_PARSER)
4720
4721     /* Pull out path from #include line. */
4722     cp = base + (isdir ? sizeof("#includedir") : sizeof("#include"));
4723     while (isblank((unsigned char) *cp))
4724         cp++;
4725     ep = cp;
4726     while (*ep != '\0' && !isspace((unsigned char) *ep)) {
4727         if (ep[0] == '%' && ep[1] == 'h') {
4728             shost_len = strlen(user_shost);
4729             len += shost_len - 2;
4730             subst = 1;
4731         }
4732         ep++;
4733     }
4734
4735     /* Relative paths are located in the same dir as the sudoers file. */
4736     if (*cp != '/') {
4737         char *dirend = strrchr(sudoers, '/');
4738         if (dirend != NULL)
4739             dirlen = (int)(dirend - sudoers) + 1;
4740     }
4741
4742     /* Make a copy of the fully-qualified path and return it. */
4743     len += (int)(ep - cp);
4744     path = pp = rcstr_alloc(len + dirlen);
4745     if (path == NULL) {
4746         sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory"));
4747         sudoerserror(NULL);
4748         debug_return_str(NULL);
4749     }
4750     if (dirlen) {
4751         memcpy(path, sudoers, dirlen);
4752         pp += dirlen;
4753     }
4754     if (subst) {
4755         /* substitute for %h */
4756         while (cp < ep) {
4757             if (cp[0] == '%' && cp[1] == 'h') {
4758                 memcpy(pp, user_shost, shost_len);
4759                 pp += shost_len;
4760                 cp += 2;
4761                 continue;
4762             }
4763             *pp++ = *cp++;
4764         }
4765         *pp = '\0';
4766     } else {
4767         memcpy(pp, cp, len);
4768         pp[len] = '\0';
4769     }
4770
4771     /* Push any excess characters (e.g. comment, newline) back to the lexer */
4772     if (*ep != '\0')
4773         yyless((int)(ep - base));
4774
4775     debug_return_str(path);
4776 }
4777
4778 #ifdef TRACELEXER
4779 int
4780 sudoers_trace_print(const char *msg)
4781 {
4782     return fputs(msg, stderr);
4783 }
4784 #else
4785 int
4786 sudoers_trace_print(const char *msg)
4787 {
4788     static bool initialized;
4789     static struct sudo_lbuf lbuf;
4790
4791     if (!initialized) {
4792         initialized = true;
4793         sudo_lbuf_init(&lbuf, NULL, 0, NULL, 0);
4794     }
4795
4796     sudo_lbuf_append(&lbuf, "%s", msg);
4797     /* XXX - assumes a final newline */
4798     if (strchr(msg, '\n') != NULL)
4799     {
4800         sudo_debug_printf2(NULL, NULL, 0, SUDOERS_DEBUG_PARSER|SUDO_DEBUG_DEBUG,
4801             "%s:%d %s", sudoers, sudolineno, lbuf.buf);
4802         lbuf.len = 0;
4803     }
4804     return 0;
4805 }
4806 #endif /* TRACELEXER */
4807