diff options
Diffstat (limited to 'plugins/sudoers/toke.c')
-rw-r--r-- | plugins/sudoers/toke.c | 4665 |
1 files changed, 4665 insertions, 0 deletions
diff --git a/plugins/sudoers/toke.c b/plugins/sudoers/toke.c new file mode 100644 index 0000000..d0dd5e3 --- /dev/null +++ b/plugins/sudoers/toke.c @@ -0,0 +1,4665 @@ +/* + * This is an open source non-commercial project. Dear PVS-Studio, please check it. + * PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com + */ + +#include <config.h> + +#line 3 "toke.c" + +#define YY_INT_ALIGNED short int + +/* $OpenBSD: flex.skl,v 1.16 2017/05/02 19:16:19 millert Exp $ */ + +/* A lexical scanner generated by flex */ + +#define yy_create_buffer sudoers_create_buffer +#define yy_delete_buffer sudoers_delete_buffer +#define yy_flex_debug sudoers_flex_debug +#define yy_init_buffer sudoers_init_buffer +#define yy_flush_buffer sudoers_flush_buffer +#define yy_load_buffer_state sudoers_load_buffer_state +#define yy_switch_to_buffer sudoers_switch_to_buffer +#define yyin sudoersin +#define yyleng sudoersleng +#define yylex sudoerslex +#define yylineno sudoerslineno +#define yyout sudoersout +#define yyrestart sudoersrestart +#define yytext sudoerstext +#define yywrap sudoerswrap +#define yyalloc sudoersalloc +#define yyrealloc sudoersrealloc +#define yyfree sudoersfree + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 39 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include <stdio.h> +#include <string.h> +#include <errno.h> +#include <stdlib.h> + +/* end standard C headers. */ + +/* $OpenBSD: flexint.h,v 1.1 2015/11/19 19:43:40 tedu Exp $ */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include <inttypes.h> +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE sudoersrestart(sudoersin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t sudoersleng; + +extern FILE *sudoersin, *sudoersout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up sudoerstext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up sudoerstext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via sudoersrestart()), so that the user can continue scanning by + * just pointing sudoersin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when sudoerstext is formed. */ +static char yy_hold_char; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t sudoersleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow sudoerswrap()'s to do buffer switches + * instead of setting up a fresh sudoersin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void sudoersrestart (FILE *input_file ); +void sudoers_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE sudoers_create_buffer (FILE *file,int size ); +void sudoers_delete_buffer (YY_BUFFER_STATE b ); +void sudoers_flush_buffer (YY_BUFFER_STATE b ); +void sudoerspush_buffer_state (YY_BUFFER_STATE new_buffer ); +void sudoerspop_buffer_state (void ); + +static void sudoersensure_buffer_stack (void ); +static void sudoers_load_buffer_state (void ); +static void sudoers_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER sudoers_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE sudoers_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE sudoers_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE sudoers_scan_bytes (yyconst char *bytes,yy_size_t len ); + +void *sudoersalloc (yy_size_t ); +void *sudoersrealloc (void *,yy_size_t ); +void sudoersfree (void * ); + +#define yy_new_buffer sudoers_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + sudoersensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + sudoers_create_buffer(sudoersin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + sudoersensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + sudoers_create_buffer(sudoersin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define sudoerswrap() 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +FILE *sudoersin = (FILE *) 0, *sudoersout = (FILE *) 0; + +typedef int yy_state_type; + +extern int sudoerslineno; + +int sudoerslineno = 1; + +extern char *sudoerstext; +#define yytext_ptr sudoerstext + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up sudoerstext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + sudoersleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 74 +#define YY_END_OF_BUFFER 75 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[882] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 75, 62, 70, 69, 68, 61, + 72, 38, 63, 64, 38, 65, 62, 62, 62, 62, + 67, 66, 73, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 73, 62, 62, 70, 72, + 53, 53, 53, 53, 53, 2, 73, 1, 62, 53, + 53, 53, 62, 17, 16, 17, 16, 16, 73, 72, + 73, 3, 9, 8, 9, 4, 9, 5, 73, 13, + 13, 13, 11, 12, 73, 19, 19, 18, 18, 18, + 19, 18, 18, 18, 18, 19, 19, 19, 19, 19, + + 19, 18, 19, 19, 62, 0, 70, 68, 72, 72, + 0, 62, 40, 0, 38, 0, 39, 0, 60, 60, + 0, 62, 62, 0, 62, 62, 62, 62, 0, 43, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 62, 71, 62, 62, 70, + 0, 0, 0, 0, 0, 72, 62, 62, 62, 62, + 62, 2, 1, 0, 1, 54, 54, 0, 53, 62, + 17, 17, 15, 14, 15, 0, 0, 3, 9, 0, + 6, 7, 9, 9, 13, 0, 13, 13, 0, 10, + 40, 0, 0, 39, 19, 19, 0, 19, 0, 0, + + 18, 18, 18, 18, 18, 18, 19, 19, 53, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 72, 72, + 0, 40, 62, 62, 62, 62, 62, 0, 0, 43, + 43, 53, 45, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 62, 62, 0, 0, 0, 0, 0, 72, 62, + 62, 62, 62, 62, 0, 62, 10, 0, 0, 0, + 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 72, 62, + 62, 62, 62, 62, 62, 0, 44, 44, 44, 0, + + 0, 43, 43, 43, 43, 43, 43, 43, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 49, 53, 53, 50, 62, 62, + 62, 62, 0, 0, 0, 0, 0, 72, 62, 62, + 62, 62, 0, 0, 0, 0, 0, 18, 18, 19, + 19, 53, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 62, 62, 62, 0, 0, + 44, 44, 44, 0, 43, 43, 0, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 0, 27, + 53, 53, 53, 53, 0, 34, 53, 53, 53, 53, + + 53, 53, 53, 53, 53, 51, 53, 53, 62, 62, + 62, 62, 62, 0, 0, 0, 72, 62, 62, 62, + 0, 0, 0, 18, 18, 19, 53, 53, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 62, 62, 62, 62, 62, 0, 44, 0, 43, + 43, 43, 0, 0, 0, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 55, 56, 57, 58, 62, 0, 0, + 72, 62, 62, 62, 0, 0, 0, 0, 0, 19, + + 53, 53, 19, 19, 53, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 41, 41, 41, 0, 0, + 43, 43, 43, 43, 43, 43, 43, 0, 0, 0, + 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 0, 36, 53, 53, + 53, 0, 26, 53, 53, 53, 0, 35, 53, 53, + 53, 53, 0, 25, 0, 28, 46, 62, 0, 0, + 72, 62, 62, 62, 41, 41, 41, 53, 53, 19, + 53, 53, 19, 19, 19, 62, 41, 41, 41, 41, + 0, 43, 0, 43, 43, 43, 43, 43, 43, 43, + + 43, 43, 43, 43, 0, 0, 0, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 53, 53, 53, 53, 53, 53, 53, 53, 48, 53, + 59, 0, 0, 72, 62, 22, 54, 0, 41, 41, + 41, 41, 53, 53, 19, 53, 53, 19, 19, 19, + 42, 42, 42, 42, 43, 0, 0, 0, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 0, 0, 0, 0, 0, 43, 43, 43, 43, + 43, 43, 43, 43, 53, 53, 53, 0, 37, 53, + 53, 0, 24, 0, 29, 47, 0, 22, 72, 72, + + 62, 0, 62, 42, 42, 42, 42, 53, 53, 53, + 53, 62, 62, 42, 42, 42, 42, 0, 0, 0, + 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 52, 0, 32, 53, 53, 53, 0, 72, + 72, 20, 72, 23, 22, 0, 0, 0, 0, 0, + 22, 0, 0, 0, 42, 42, 42, 42, 53, 53, + 53, 62, 62, 62, 0, 0, 0, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, + 43, 43, 43, 43, 43, 0, 30, 53, 53, 23, + + 72, 0, 22, 0, 0, 0, 53, 53, 62, 62, + 62, 62, 62, 0, 0, 0, 0, 0, 43, 43, + 43, 43, 43, 43, 43, 43, 0, 33, 53, 72, + 0, 0, 0, 0, 0, 53, 62, 62, 62, 43, + 43, 43, 43, 43, 43, 0, 31, 72, 72, 21, + 0, 0, 0, 62, 62, 62, 62, 62, 43, 43, + 43, 43, 43, 0, 0, 0, 0, 0, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 6, 1, 7, 1, 1, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 1, 1, + 27, 28, 10, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 39, 40, 41, 42, 43, 44, + 39, 45, 46, 47, 48, 49, 50, 51, 52, 39, + 10, 53, 10, 1, 54, 1, 55, 56, 57, 58, + + 59, 60, 61, 62, 63, 61, 61, 64, 65, 66, + 67, 61, 61, 68, 69, 70, 71, 61, 61, 61, + 61, 61, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[72] = + { 0, + 1, 2, 3, 4, 5, 6, 1, 7, 7, 1, + 8, 9, 10, 11, 12, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 14, 15, 7, 1, 16, + 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 18, 19, 20, 20, 20, 20, 20, 20, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21 + } ; + +static yyconst flex_int16_t yy_base[999] = + { 0, + 0, 70, 72, 80, 126, 131, 183, 253, 161, 205, + 86, 94, 324, 0, 4976, 4918, 4967, 5585, 4964, 5585, + 393, 87, 5585, 5585, 4914, 5585, 172, 405, 174, 185, + 4940, 5585, 5585, 465, 4925, 43, 37, 521, 62, 4934, + 4913, 76, 4912, 4916, 71, 580, 595, 83, 228, 618, + 39, 91, 4881, 30, 4878, 73, 4933, 4943, 439, 4901, + 4900, 4895, 89, 0, 5585, 4919, 5585, 0, 620, 679, + 108, 0, 4861, 5585, 117, 5585, 129, 5585, 159, 4855, + 106, 122, 5585, 166, 209, 656, 710, 754, 261, 203, + 812, 862, 4865, 223, 186, 918, 4861, 4872, 4858, 4866, + + 4858, 965, 0, 84, 4834, 650, 4882, 4877, 4877, 5585, + 271, 546, 619, 4859, 622, 723, 4818, 848, 952, 4813, + 989, 1002, 1040, 4837, 4846, 577, 724, 250, 4833, 249, + 1085, 1130, 4811, 4816, 4805, 4801, 4803, 4800, 994, 4789, + 4796, 4793, 4784, 4785, 4781, 396, 5585, 178, 125, 1000, + 4759, 4763, 4751, 4746, 4747, 231, 354, 386, 159, 379, + 245, 439, 4812, 736, 4803, 1038, 4751, 1165, 1042, 247, + 0, 4795, 299, 5585, 5585, 946, 399, 0, 4743, 659, + 5585, 5585, 4740, 401, 4739, 4767, 403, 404, 431, 4739, + 627, 668, 1192, 4683, 1198, 0, 1227, 1255, 1211, 1105, + + 1294, 4719, 1224, 1254, 845, 1344, 1400, 4690, 0, 4695, + 4680, 4679, 4675, 1246, 4666, 4664, 4655, 4651, 4705, 4697, + 1277, 1314, 1447, 1420, 990, 1487, 4680, 4666, 1532, 427, + 1578, 1623, 0, 4658, 4649, 4650, 4633, 4629, 4616, 4594, + 4588, 4598, 4597, 4591, 438, 4578, 4570, 4581, 4576, 4573, + 4570, 669, 160, 4537, 4535, 4525, 4523, 4527, 546, 397, + 4528, 504, 418, 406, 1471, 505, 4580, 4565, 4564, 1670, + 1680, 4563, 1725, 0, 4543, 4526, 4511, 4520, 4506, 4511, + 4510, 4515, 4514, 4505, 4491, 4502, 687, 4468, 4531, 1770, + 534, 0, 0, 1027, 246, 4507, 4506, 1808, 633, 4498, + + 4492, 653, 1468, 1821, 1507, 1115, 1867, 1914, 4490, 603, + 4471, 4466, 646, 665, 4478, 4471, 4446, 4443, 4430, 4427, + 4438, 4438, 4421, 4424, 0, 4427, 4339, 0, 837, 551, + 574, 654, 4323, 4325, 4309, 4323, 4309, 763, 506, 1041, + 424, 677, 1552, 4362, 4361, 4360, 1162, 1924, 1969, 781, + 4330, 691, 889, 4338, 4331, 4334, 4331, 4322, 4320, 4316, + 4323, 830, 4340, 4346, 4303, 2016, 2028, 2040, 4335, 4334, + 2050, 4334, 4332, 4331, 4330, 977, 1598, 1054, 1643, 1064, + 2063, 0, 1702, 2110, 1745, 1324, 2156, 2203, 970, 5585, + 4294, 4299, 4300, 4293, 1010, 5585, 4308, 4299, 4284, 4297, + + 4290, 4301, 4287, 4298, 4299, 0, 4282, 4282, 640, 786, + 1034, 986, 709, 4275, 4257, 4237, 641, 520, 1028, 901, + 4291, 4289, 2215, 2225, 4276, 4251, 4226, 4143, 4147, 4127, + 4101, 4083, 4065, 4065, 4054, 4026, 4043, 4029, 4019, 4009, + 3961, 2270, 1000, 2310, 2322, 1655, 3986, 3954, 3941, 3929, + 2332, 1142, 3929, 3917, 2379, 1169, 1188, 1192, 1780, 1195, + 2391, 0, 1792, 2438, 1841, 1430, 2484, 2531, 2556, 1259, + 1450, 1111, 1112, 1224, 1868, 1196, 1452, 1473, 1232, 1535, + 1320, 1321, 1427, 3843, 3835, 3828, 3790, 663, 3806, 3753, + 394, 1843, 960, 796, 1896, 3790, 3777, 3774, 1565, 1346, + + 3707, 3697, 1371, 3688, 1046, 1512, 3680, 3685, 1514, 1533, + 0, 0, 0, 0, 3660, 2613, 1944, 1608, 3651, 3634, + 3626, 1989, 2653, 2083, 1713, 2698, 2745, 2130, 3629, 3610, + 3603, 1757, 2005, 2168, 2170, 2178, 2245, 2183, 2757, 0, + 2282, 2804, 2293, 1954, 2850, 2897, 1534, 5585, 2922, 907, + 1128, 1604, 5585, 1178, 1265, 1857, 1605, 5585, 1501, 2157, + 1632, 1734, 1683, 5585, 1725, 5585, 3561, 1235, 3534, 3502, + 1156, 2147, 1426, 1236, 3545, 3520, 2979, 3452, 3432, 2994, + 3433, 3412, 1463, 791, 3381, 3050, 1305, 3089, 0, 1792, + 3378, 3377, 2352, 2029, 2411, 2204, 3129, 0, 2460, 3142, + + 2504, 2093, 3187, 3234, 3375, 3345, 3246, 2368, 2520, 2625, + 2627, 3319, 2629, 3258, 0, 2642, 3305, 2673, 2140, 3352, + 3377, 1433, 898, 1927, 1823, 1603, 2089, 2090, 3263, 2270, + 3256, 3242, 3216, 1817, 1671, 2414, 3171, 2718, 3200, 3165, + 3070, 2256, 3030, 2974, 3447, 2881, 2850, 1847, 1848, 0, + 3505, 2777, 2824, 1736, 2852, 2844, 2836, 3545, 2805, 2311, + 2461, 2870, 2638, 3557, 0, 3062, 3570, 3073, 2629, 3615, + 3662, 3099, 2797, 2738, 2734, 2685, 2639, 2734, 2886, 985, + 1342, 3674, 0, 2789, 1822, 2439, 1861, 1993, 5585, 1379, + 1860, 1995, 5585, 1996, 5585, 2695, 2670, 2356, 1819, 1478, + + 2252, 2849, 3125, 2686, 2570, 3686, 2185, 2252, 2464, 2511, + 3100, 3696, 1963, 3736, 0, 2356, 1964, 3116, 2554, 2547, + 2498, 3165, 2459, 2419, 2994, 3073, 3171, 3143, 3776, 0, + 3209, 3789, 3278, 3220, 3834, 3881, 2424, 2371, 3892, 3316, + 2264, 1936, 2204, 2418, 5585, 2534, 2115, 2159, 2136, 2160, + 2249, 5585, 2416, 2084, 3302, 3352, 3532, 3544, 2104, 2922, + 2037, 3720, 3327, 2009, 1982, 1938, 3436, 1889, 2536, 2830, + 2831, 3904, 3916, 3928, 1855, 1834, 3940, 1699, 1681, 3235, + 3327, 3590, 3353, 3952, 0, 3637, 3965, 3717, 3523, 4012, + 1636, 1617, 1590, 3536, 1565, 2724, 5585, 2850, 2273, 5585, + + 2304, 3746, 3756, 1519, 1448, 4024, 2725, 3285, 4036, 2477, + 4048, 4060, 3648, 3809, 1307, 1277, 1243, 3602, 1204, 1198, + 3506, 1161, 1125, 4072, 0, 2509, 2901, 5585, 3284, 2435, + 3854, 1079, 1071, 1030, 3821, 2902, 4084, 4096, 4108, 3985, + 4118, 4128, 1005, 0, 768, 3021, 5585, 730, 2480, 5585, + 596, 576, 4140, 4152, 2693, 4164, 4176, 3866, 5585, 4186, + 4196, 3766, 5585, 4206, 456, 289, 134, 3997, 4216, 4254, + 4292, 4226, 4236, 4264, 28, 4330, 4246, 5585, 4302, 4274, + 5585, 4383, 4404, 4425, 4446, 4467, 4488, 4509, 4530, 4551, + 4560, 2005, 4580, 4601, 2661, 4622, 4643, 4664, 4685, 4706, + + 4727, 4748, 4769, 2479, 4790, 4799, 4807, 4816, 4836, 4857, + 4878, 2765, 4899, 4920, 4941, 4962, 4983, 4992, 5011, 5020, + 5029, 2348, 2734, 5037, 5045, 5053, 5062, 5070, 5077, 5085, + 5093, 5102, 5112, 2885, 2913, 5120, 5128, 5136, 3073, 3203, + 5145, 5155, 5175, 3220, 5184, 5192, 3221, 5201, 5211, 5231, + 2552, 2994, 5240, 5252, 5261, 5271, 3369, 3370, 5280, 5290, + 5299, 5319, 3088, 5328, 5340, 3448, 3520, 5349, 5359, 3534, + 5368, 5378, 5398, 5419, 5440, 3631, 3648, 5460, 3732, 5467, + 5477, 3158, 3373, 5486, 3115, 5506, 3805, 3849, 5515, 5525, + 3850, 3980, 5533, 5543, 5563, 4284, 3981, 4285 + + } ; + +static yyconst flex_int16_t yy_def[999] = + { 0, + 881, 1, 1, 1, 882, 882, 883, 883, 884, 884, + 885, 885, 881, 13, 881, 886, 881, 881, 881, 881, + 887, 888, 881, 881, 889, 881, 890, 886, 28, 28, + 891, 881, 881, 881, 34, 34, 34, 34, 38, 38, + 38, 38, 38, 38, 38, 886, 28, 886, 881, 887, + 34, 34, 38, 38, 38, 881, 892, 881, 893, 38, + 38, 38, 886, 894, 881, 894, 881, 894, 881, 887, + 881, 895, 896, 881, 896, 881, 896, 881, 897, 898, + 898, 898, 881, 881, 899, 900, 901, 881, 88, 88, + 88, 881, 92, 92, 92, 92, 96, 96, 96, 96, + + 96, 88, 91, 91, 886, 886, 881, 881, 902, 881, + 903, 881, 888, 904, 899, 888, 889, 889, 890, 905, + 886, 886, 28, 906, 123, 123, 123, 123, 907, 908, + 38, 131, 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 886, 881, 886, 886, 881, + 881, 881, 881, 881, 881, 902, 886, 123, 886, 886, + 886, 881, 881, 881, 881, 909, 910, 886, 132, 886, + 911, 911, 881, 881, 881, 903, 881, 912, 913, 913, + 881, 881, 913, 913, 914, 881, 914, 914, 881, 881, + 899, 899, 899, 915, 916, 91, 915, 917, 881, 881, + + 88, 201, 201, 201, 201, 881, 206, 207, 918, 207, + 207, 207, 207, 207, 207, 207, 91, 91, 902, 919, + 881, 881, 886, 223, 223, 123, 226, 920, 881, 921, + 881, 132, 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, + 132, 886, 886, 881, 881, 881, 881, 881, 902, 886, + 226, 886, 886, 886, 881, 886, 881, 922, 923, 881, + 91, 271, 206, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 91, 91, 919, 886, + 886, 223, 223, 223, 886, 924, 925, 925, 298, 926, + + 925, 927, 231, 881, 304, 304, 881, 304, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, 886, 886, + 886, 886, 881, 881, 881, 881, 881, 902, 886, 886, + 886, 886, 881, 881, 922, 922, 881, 271, 206, 207, + 207, 928, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 91, 91, 91, 91, 223, 223, 223, 881, 929, + 929, 371, 929, 930, 931, 932, 881, 933, 307, 933, + 881, 381, 933, 881, 384, 384, 881, 384, 881, 881, + 132, 132, 132, 132, 881, 881, 132, 132, 132, 132, + + 132, 132, 132, 132, 132, 132, 132, 132, 886, 886, + 886, 886, 886, 881, 881, 881, 902, 886, 886, 886, + 934, 935, 881, 91, 349, 207, 928, 928, 207, 207, + 207, 207, 207, 207, 207, 207, 91, 91, 91, 91, + 91, 886, 886, 223, 223, 886, 936, 936, 937, 938, + 881, 881, 939, 940, 881, 941, 941, 942, 387, 942, + 881, 461, 942, 881, 464, 464, 881, 464, 881, 469, + 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + 469, 469, 469, 886, 886, 886, 886, 886, 881, 881, + 943, 886, 886, 886, 881, 881, 944, 944, 881, 207, + + 928, 928, 207, 207, 928, 207, 207, 207, 207, 207, + 91, 91, 91, 91, 91, 886, 516, 516, 881, 945, + 946, 451, 881, 523, 523, 881, 523, 881, 881, 947, + 947, 881, 881, 948, 948, 949, 467, 949, 881, 539, + 949, 881, 542, 542, 881, 542, 881, 881, 881, 549, + 549, 881, 881, 549, 549, 549, 881, 881, 549, 549, + 549, 549, 881, 881, 881, 881, 549, 886, 881, 881, + 950, 886, 886, 886, 951, 952, 881, 953, 953, 881, + 953, 953, 580, 580, 954, 886, 886, 886, 588, 588, + 881, 955, 881, 956, 526, 956, 956, 597, 956, 881, + + 600, 600, 881, 600, 957, 958, 881, 881, 959, 959, + 960, 961, 960, 881, 614, 960, 881, 617, 617, 617, + 881, 621, 621, 621, 621, 621, 621, 621, 621, 621, + 886, 881, 881, 962, 886, 886, 886, 881, 881, 963, + 963, 881, 964, 964, 881, 964, 964, 645, 645, 965, + 886, 651, 651, 651, 881, 966, 967, 881, 968, 968, + 969, 603, 969, 969, 664, 969, 881, 667, 667, 881, + 667, 881, 881, 970, 970, 881, 881, 971, 971, 972, + 972, 972, 682, 972, 621, 621, 621, 881, 881, 621, + 621, 881, 881, 881, 881, 621, 881, 881, 973, 962, + + 886, 974, 975, 976, 977, 881, 976, 978, 978, 978, + 978, 886, 886, 886, 714, 714, 886, 881, 881, 979, + 979, 881, 881, 980, 980, 981, 670, 981, 981, 729, + 981, 881, 732, 732, 881, 732, 982, 983, 881, 881, + 984, 984, 621, 881, 881, 621, 621, 621, 881, 973, + 973, 881, 962, 886, 974, 974, 974, 974, 985, 974, + 986, 986, 881, 881, 976, 976, 881, 881, 978, 978, + 978, 714, 714, 714, 987, 988, 881, 881, 989, 989, + 990, 735, 990, 990, 784, 990, 881, 787, 787, 787, + 881, 982, 982, 881, 881, 881, 881, 621, 621, 881, + + 962, 881, 881, 991, 992, 881, 978, 978, 714, 886, + 714, 714, 886, 881, 881, 987, 987, 881, 881, 993, + 993, 994, 994, 994, 824, 824, 881, 881, 621, 995, + 881, 881, 991, 991, 881, 978, 714, 714, 714, 881, + 881, 881, 881, 996, 996, 881, 881, 995, 995, 881, + 997, 998, 881, 714, 886, 714, 714, 886, 881, 881, + 881, 881, 881, 881, 881, 997, 997, 881, 886, 886, + 886, 881, 881, 881, 886, 886, 886, 881, 881, 881, + 0, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881 + + } ; + +static yyconst flex_int16_t yy_nxt[5657] = + { 0, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 16, + 25, 26, 16, 16, 27, 28, 29, 30, 28, 28, + 28, 28, 28, 28, 28, 31, 32, 33, 16, 34, + 35, 35, 35, 36, 37, 38, 38, 38, 38, 39, + 40, 41, 38, 42, 43, 44, 45, 38, 38, 38, + 38, 38, 46, 16, 47, 47, 47, 47, 47, 47, + 16, 16, 16, 16, 16, 16, 16, 16, 48, 16, + 16, 49, 142, 56, 162, 50, 132, 57, 132, 135, + 106, 56, 132, 58, 163, 57, 59, 81, 18, 82, + 83, 58, 114, 134, 59, 81, 18, 82, 83, 136, + + 160, 51, 52, 157, 137, 140, 53, 187, 144, 177, + 147, 60, 115, 61, 54, 62, 38, 55, 38, 60, + 141, 61, 145, 62, 38, 188, 38, 17, 65, 66, + 132, 67, 17, 65, 66, 106, 67, 67, 84, 116, + 63, 106, 67, 181, 148, 217, 84, 864, 63, 158, + 148, 67, 68, 149, 218, 182, 67, 68, 186, 170, + 184, 147, 17, 18, 19, 74, 70, 189, 190, 180, + 185, 75, 76, 77, 186, 120, 120, 106, 69, 120, + 120, 180, 253, 69, 17, 18, 19, 78, 70, 126, + 126, 126, 126, 126, 126, 126, 126, 126, 126, 120, + + 127, 127, 127, 127, 127, 128, 17, 18, 19, 74, + 70, 106, 106, 79, 114, 75, 76, 77, 204, 204, + 204, 204, 204, 205, 121, 207, 332, 262, 211, 150, + 106, 78, 252, 110, 192, 71, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 17, 18, 19, 79, 70, 151, + 152, 193, 207, 229, 153, 227, 227, 227, 227, 227, + 227, 124, 154, 210, 231, 155, 203, 203, 203, 203, + 203, 203, 203, 203, 203, 203, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 259, 106, 106, 106, + + 177, 147, 864, 264, 266, 71, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 33, 17, 18, 19, 33, 33, + 85, 23, 24, 33, 86, 26, 33, 33, 87, 88, + 89, 90, 88, 88, 88, 88, 88, 88, 88, 31, + 91, 33, 33, 92, 93, 93, 93, 94, 95, 96, + 96, 96, 96, 97, 98, 99, 96, 100, 96, 101, + 96, 96, 96, 96, 96, 96, 71, 33, 102, 102, + 102, 102, 102, 102, 103, 103, 103, 103, 103, 103, + 103, 103, 104, 103, 103, 110, 110, 177, 147, 105, + + 177, 147, 177, 147, 187, 111, 106, 188, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, 122, 260, + 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, + 124, 106, 189, 190, 125, 125, 125, 125, 125, 125, + 162, 229, 167, 167, 263, 261, 167, 167, 106, 106, + 163, 571, 303, 180, 339, 186, 186, 106, 106, 125, + 125, 125, 125, 125, 125, 105, 167, 321, 322, 864, + 106, 105, 341, 339, 105, 105, 106, 105, 105, 105, + 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 124, 168, 339, 105, 131, 131, 131, 131, 131, 131, + + 132, 132, 132, 132, 133, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 106, 132, 125, + 125, 125, 125, 125, 125, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 881, 290, 110, 492, + 132, 132, 132, 132, 132, 132, 106, 106, 106, 418, + 132, 112, 112, 112, 112, 112, 112, 112, 112, 112, + 112, 342, 106, 339, 411, 105, 105, 105, 105, 105, + 105, 146, 147, 105, 105, 105, 106, 105, 105, 864, + 412, 105, 227, 227, 227, 227, 227, 227, 227, 227, + + 227, 227, 338, 106, 389, 105, 105, 105, 105, 864, + 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, + 110, 173, 147, 174, 881, 175, 106, 114, 390, 174, + 111, 175, 881, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 110, 881, 175, 175, 881, 373, 373, + 373, 105, 881, 105, 105, 105, 194, 105, 105, 484, + 179, 105, 194, 179, 179, 194, 395, 229, 194, 194, + 179, 116, 175, 114, 193, 105, 105, 105, 303, 193, + 156, 110, 196, 393, 194, 179, 329, 330, 394, 331, + 396, 176, 106, 881, 881, 881, 881, 881, 881, 881, + + 881, 881, 881, 881, 362, 363, 106, 364, 197, 194, + 120, 491, 413, 120, 120, 106, 120, 120, 120, 120, + 193, 106, 120, 120, 113, 568, 113, 113, 427, 106, + 113, 113, 850, 428, 113, 420, 196, 120, 120, 227, + 227, 227, 227, 227, 227, 227, 227, 227, 227, 113, + 113, 112, 112, 112, 112, 112, 112, 112, 112, 112, + 112, 106, 199, 120, 196, 110, 488, 200, 196, 201, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 124, + 196, 593, 389, 202, 202, 202, 202, 202, 202, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + + 196, 196, 196, 196, 196, 196, 390, 485, 202, 202, + 202, 202, 202, 202, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 881, 417, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 881, 106, 649, + 207, 196, 196, 196, 196, 196, 196, 437, 106, 117, + 438, 117, 117, 117, 409, 117, 117, 410, 574, 117, + 272, 272, 272, 272, 272, 272, 196, 196, 196, 196, + 196, 196, 196, 117, 117, 117, 196, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 124, 196, 106, + 395, 206, 206, 206, 206, 206, 206, 207, 207, 207, + + 207, 208, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 396, 209, 202, 202, 202, 202, + 202, 202, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 881, 132, 687, 132, 207, 207, 207, + 207, 207, 207, 106, 622, 120, 120, 207, 494, 120, + 120, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 389, 196, 196, 196, 196, 196, 196, 881, 120, + 202, 202, 202, 202, 202, 202, 202, 202, 202, 202, + 119, 229, 105, 105, 119, 390, 105, 105, 377, 229, + + 119, 150, 303, 487, 121, 293, 293, 293, 293, 293, + 294, 395, 106, 442, 119, 119, 105, 223, 224, 225, + 223, 223, 223, 223, 223, 223, 223, 239, 240, 573, + 782, 151, 152, 241, 242, 396, 153, 243, 106, 244, + 245, 167, 167, 831, 154, 167, 167, 155, 105, 105, + 105, 105, 106, 486, 106, 226, 226, 226, 226, 226, + 226, 226, 226, 226, 226, 167, 124, 377, 229, 226, + 226, 226, 226, 226, 226, 239, 240, 881, 229, 379, + 106, 241, 242, 581, 831, 243, 106, 244, 582, 379, + 168, 493, 831, 106, 226, 226, 226, 226, 226, 226, + + 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, + 124, 419, 881, 552, 232, 232, 232, 232, 232, 232, + 268, 269, 270, 268, 268, 268, 268, 268, 268, 268, + 382, 382, 382, 382, 382, 383, 881, 553, 881, 226, + 226, 226, 226, 226, 226, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 881, 229, 551, 110, 132, + 132, 132, 132, 132, 132, 132, 166, 303, 105, 105, + 166, 623, 105, 105, 593, 343, 166, 344, 344, 344, + 344, 344, 344, 229, 105, 105, 105, 105, 105, 105, + 166, 166, 105, 191, 379, 191, 191, 557, 194, 191, + + 191, 377, 229, 191, 194, 377, 229, 194, 881, 229, + 194, 194, 120, 379, 634, 132, 120, 459, 191, 191, + 459, 558, 120, 782, 196, 881, 194, 624, 194, 727, + 194, 194, 194, 881, 194, 194, 120, 120, 194, 272, + 272, 272, 272, 272, 272, 272, 272, 272, 272, 881, + 197, 194, 194, 194, 194, 120, 814, 881, 120, 120, + 881, 120, 120, 120, 120, 561, 554, 120, 120, 272, + 272, 272, 272, 272, 272, 272, 272, 272, 272, 279, + 280, 196, 120, 120, 881, 281, 282, 106, 106, 283, + 814, 284, 222, 222, 222, 222, 222, 222, 222, 222, + + 222, 222, 132, 549, 631, 637, 625, 199, 120, 271, + 271, 271, 271, 271, 271, 271, 271, 271, 271, 586, + 814, 563, 565, 271, 271, 271, 271, 271, 271, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 462, + 462, 462, 462, 462, 463, 564, 566, 547, 271, 271, + 271, 271, 271, 271, 196, 881, 229, 106, 196, 273, + 273, 273, 273, 273, 273, 273, 273, 273, 273, 124, + 196, 548, 552, 273, 273, 273, 273, 273, 273, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 553, 209, 271, 271, + + 271, 271, 271, 271, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 881, 747, 132, 881, 207, + 207, 207, 207, 207, 207, 292, 292, 292, 292, 292, + 292, 292, 292, 292, 292, 540, 540, 540, 540, 540, + 541, 881, 881, 881, 196, 196, 196, 196, 196, 196, + 290, 831, 291, 291, 291, 291, 291, 291, 291, 291, + 291, 291, 167, 567, 881, 881, 167, 881, 106, 686, + 110, 132, 167, 308, 308, 308, 308, 308, 308, 308, + 308, 308, 308, 550, 636, 648, 167, 167, 881, 106, + + 105, 559, 295, 295, 295, 295, 295, 295, 295, 295, + 295, 295, 207, 557, 560, 563, 295, 295, 295, 295, + 295, 295, 381, 381, 381, 381, 381, 381, 381, 381, + 381, 381, 831, 627, 565, 547, 881, 558, 132, 564, + 753, 295, 295, 295, 295, 295, 295, 297, 298, 299, + 299, 299, 299, 299, 299, 299, 299, 300, 566, 548, + 881, 301, 301, 301, 301, 301, 301, 421, 422, 423, + 421, 421, 421, 421, 421, 421, 421, 562, 495, 229, + 496, 496, 496, 496, 496, 496, 301, 301, 301, 301, + 301, 301, 229, 304, 305, 306, 304, 304, 304, 304, + + 304, 304, 304, 307, 229, 552, 557, 308, 308, 308, + 308, 308, 308, 453, 454, 455, 453, 453, 453, 453, + 453, 453, 453, 589, 589, 589, 589, 589, 590, 553, + 558, 229, 308, 308, 308, 308, 308, 308, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, 124, 691, + 229, 132, 309, 309, 309, 309, 309, 309, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, 442, 132, + 443, 443, 443, 443, 443, 443, 629, 295, 295, 295, + 295, 295, 295, 343, 563, 346, 346, 346, 346, 346, + 347, 344, 344, 344, 344, 348, 348, 348, 348, 348, + + 348, 348, 348, 348, 348, 124, 727, 106, 564, 348, + 348, 348, 348, 348, 348, 377, 229, 457, 457, 457, + 457, 457, 457, 106, 662, 701, 565, 379, 598, 598, + 598, 598, 598, 599, 348, 348, 348, 348, 348, 348, + 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, + 566, 717, 717, 717, 349, 349, 349, 349, 349, 349, + 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, + 528, 132, 529, 529, 529, 529, 529, 529, 630, 348, + 348, 348, 348, 348, 348, 366, 367, 368, 366, 366, + 366, 366, 366, 366, 366, 468, 468, 468, 468, 468, + + 468, 468, 468, 468, 468, 377, 229, 535, 535, 535, + 535, 535, 535, 105, 105, 105, 105, 459, 699, 110, + 751, 752, 106, 371, 371, 372, 373, 373, 373, 373, + 373, 373, 373, 300, 377, 229, 378, 378, 378, 378, + 378, 378, 378, 378, 378, 378, 379, 814, 692, 694, + 380, 380, 380, 380, 380, 380, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 539, 690, 743, 814, 881, + 132, 132, 693, 695, 700, 380, 380, 380, 380, 380, + 380, 229, 384, 385, 386, 384, 384, 384, 384, 384, + 384, 384, 387, 881, 132, 106, 388, 388, 388, 388, + + 388, 388, 763, 748, 626, 555, 572, 746, 132, 132, + 556, 575, 576, 577, 575, 575, 575, 575, 575, 575, + 575, 388, 388, 388, 388, 388, 388, 881, 688, 380, + 380, 380, 380, 380, 380, 380, 380, 380, 380, 424, + 424, 424, 424, 424, 424, 424, 424, 424, 424, 377, + 229, 763, 689, 424, 424, 424, 424, 424, 424, 588, + 588, 588, 588, 588, 588, 588, 588, 588, 588, 615, + 615, 615, 615, 615, 616, 132, 712, 712, 424, 424, + 424, 424, 424, 424, 425, 425, 425, 425, 425, 425, + 425, 425, 425, 425, 688, 763, 692, 694, 425, 425, + + 425, 425, 425, 425, 527, 527, 527, 527, 527, 527, + 527, 527, 527, 527, 112, 106, 106, 112, 689, 229, + 693, 695, 763, 424, 424, 424, 424, 424, 424, 442, + 379, 443, 443, 443, 443, 443, 443, 443, 443, 443, + 443, 442, 593, 444, 444, 444, 444, 444, 444, 444, + 444, 444, 444, 442, 595, 445, 445, 445, 445, 445, + 446, 443, 443, 443, 443, 448, 448, 448, 448, 448, + 448, 448, 448, 448, 448, 300, 377, 229, 457, 457, + 457, 457, 457, 457, 457, 457, 457, 457, 379, 762, + 692, 694, 456, 456, 456, 456, 456, 456, 597, 597, + + 597, 597, 597, 597, 597, 597, 597, 597, 665, 665, + 665, 665, 665, 666, 693, 695, 802, 456, 456, 456, + 456, 456, 456, 377, 229, 458, 458, 458, 458, 458, + 458, 458, 458, 458, 458, 459, 106, 132, 132, 460, + 460, 460, 460, 460, 460, 605, 606, 607, 605, 605, + 605, 605, 605, 605, 605, 683, 683, 683, 683, 683, + 684, 798, 752, 132, 460, 460, 460, 460, 460, 460, + 229, 464, 465, 466, 464, 464, 464, 464, 464, 464, + 464, 467, 229, 377, 229, 468, 468, 468, 468, 468, + 468, 377, 229, 459, 132, 459, 881, 229, 763, 106, + + 768, 768, 768, 537, 800, 628, 799, 132, 537, 635, + 468, 468, 468, 468, 468, 468, 881, 881, 460, 460, + 460, 460, 460, 460, 460, 460, 460, 460, 495, 595, + 498, 498, 498, 498, 498, 499, 496, 496, 496, 496, + 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, + 751, 752, 132, 744, 424, 424, 424, 424, 424, 424, + 546, 546, 546, 546, 546, 546, 546, 546, 546, 546, + 638, 639, 639, 639, 639, 639, 639, 745, 229, 424, + 424, 424, 424, 424, 424, 516, 517, 518, 516, 516, + 516, 516, 516, 516, 516, 377, 229, 610, 610, 610, + + 610, 610, 610, 696, 106, 830, 110, 537, 614, 614, + 614, 614, 614, 614, 614, 614, 614, 614, 132, 829, + 754, 132, 106, 442, 593, 443, 443, 443, 443, 443, + 443, 443, 443, 443, 443, 442, 595, 443, 443, 443, + 443, 443, 443, 443, 443, 443, 443, 523, 524, 525, + 523, 523, 523, 523, 523, 523, 523, 526, 344, 702, + 344, 527, 527, 527, 527, 527, 527, 656, 657, 658, + 656, 656, 656, 656, 656, 656, 656, 105, 105, 105, + 105, 702, 229, 702, 702, 229, 527, 527, 527, 527, + 527, 527, 528, 459, 531, 531, 531, 531, 531, 532, + + 529, 529, 529, 529, 377, 229, 535, 535, 535, 535, + 535, 535, 535, 535, 535, 535, 459, 702, 110, 744, + 534, 534, 534, 534, 534, 534, 604, 604, 604, 604, + 604, 604, 604, 604, 604, 604, 849, 850, 229, 702, + 744, 702, 703, 745, 662, 534, 534, 534, 534, 534, + 534, 377, 229, 536, 536, 536, 536, 536, 536, 536, + 536, 536, 536, 537, 745, 881, 106, 538, 538, 538, + 538, 538, 538, 593, 593, 660, 660, 660, 660, 660, + 660, 849, 850, 801, 595, 595, 662, 132, 222, 881, + 809, 222, 538, 538, 538, 538, 538, 538, 229, 542, + + 543, 544, 542, 542, 542, 542, 542, 542, 542, 545, + 769, 718, 881, 546, 546, 546, 546, 546, 546, 664, + 664, 664, 664, 664, 664, 664, 664, 664, 664, 106, + 844, 844, 844, 844, 229, 796, 881, 796, 546, 546, + 546, 546, 546, 546, 881, 537, 538, 538, 538, 538, + 538, 538, 538, 538, 538, 538, 105, 547, 770, 797, + 718, 797, 105, 639, 639, 105, 105, 718, 105, 105, + 105, 132, 132, 132, 132, 132, 132, 132, 132, 132, + 132, 548, 132, 763, 105, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, + + 132, 132, 132, 132, 132, 132, 132, 132, 106, 132, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 586, 587, 587, + 587, 587, 587, 587, 587, 587, 587, 587, 377, 229, + 377, 229, 881, 229, 730, 730, 730, 730, 730, 731, + 537, 881, 612, 229, 612, 377, 229, 679, 679, 679, + 679, 679, 679, 662, 537, 106, 593, 612, 594, 594, + 594, 594, 594, 594, 594, 594, 594, 594, 595, 178, + 178, 178, 596, 596, 596, 596, 596, 596, 682, 682, + 682, 682, 682, 682, 682, 682, 682, 682, 672, 763, + + 673, 673, 673, 673, 673, 673, 854, 596, 596, 596, + 596, 596, 596, 600, 601, 602, 600, 600, 600, 600, + 600, 600, 600, 603, 749, 796, 827, 604, 604, 604, + 604, 604, 604, 704, 705, 706, 707, 704, 704, 704, + 704, 704, 704, 132, 345, 106, 345, 672, 229, 797, + 828, 672, 604, 604, 604, 604, 604, 604, 881, 612, + 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, + 377, 229, 610, 610, 610, 610, 610, 610, 610, 610, + 610, 610, 537, 178, 178, 178, 609, 609, 609, 609, + 609, 609, 714, 714, 714, 714, 714, 714, 714, 714, + + 714, 714, 377, 229, 742, 742, 742, 742, 742, 742, + 672, 609, 609, 609, 609, 609, 609, 377, 229, 611, + 611, 611, 611, 611, 611, 611, 611, 611, 611, 612, + 595, 881, 881, 613, 613, 613, 613, 613, 613, 715, + 715, 715, 715, 715, 716, 717, 717, 717, 717, 718, + 756, 827, 757, 758, 759, 881, 881, 718, 613, 613, + 613, 613, 613, 613, 229, 617, 618, 619, 617, 617, + 617, 617, 617, 617, 617, 828, 807, 522, 808, 620, + 620, 620, 620, 620, 620, 671, 671, 671, 671, 671, + 671, 671, 671, 671, 671, 496, 711, 496, 132, 377, + + 229, 760, 827, 846, 620, 620, 620, 620, 620, 620, + 881, 612, 613, 613, 613, 613, 613, 613, 613, 613, + 613, 613, 105, 497, 710, 497, 828, 847, 105, 755, + 755, 105, 105, 755, 105, 105, 105, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 755, 755, 755, + 105, 132, 132, 132, 132, 132, 132, 132, 132, 621, + 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 106, 132, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 638, 641, 641, 641, 641, 641, 642, + + 639, 639, 639, 639, 196, 640, 640, 593, 196, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 662, + 196, 709, 846, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 645, 207, 207, 847, 209, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 651, 652, 653, 654, 651, + 651, 651, 651, 651, 651, 593, 708, 725, 725, 725, + 725, 725, 725, 529, 638, 529, 593, 662, 729, 729, + 729, 729, 729, 729, 729, 729, 729, 729, 727, 639, + + 639, 881, 106, 586, 587, 587, 587, 587, 587, 587, + 587, 587, 587, 587, 737, 738, 739, 737, 737, 737, + 737, 737, 737, 737, 803, 881, 756, 803, 757, 758, + 759, 775, 776, 777, 775, 775, 775, 775, 775, 775, + 775, 106, 593, 771, 660, 660, 660, 660, 660, 660, + 660, 660, 660, 660, 595, 593, 881, 661, 661, 661, + 661, 661, 661, 661, 661, 661, 661, 662, 727, 791, + 791, 663, 663, 663, 663, 663, 663, 762, 718, 638, + 719, 719, 719, 719, 719, 719, 736, 736, 736, 736, + 736, 736, 736, 736, 736, 736, 663, 663, 663, 663, + + 663, 663, 667, 668, 669, 667, 667, 667, 667, 667, + 667, 667, 670, 530, 638, 530, 671, 671, 671, 671, + 671, 671, 593, 106, 780, 780, 780, 780, 780, 780, + 496, 529, 496, 529, 727, 785, 785, 785, 785, 785, + 786, 671, 671, 671, 671, 671, 671, 881, 593, 663, + 663, 663, 663, 663, 663, 663, 663, 663, 663, 672, + 727, 675, 675, 675, 675, 675, 676, 673, 673, 673, + 673, 377, 229, 679, 679, 679, 679, 679, 679, 679, + 679, 679, 679, 612, 698, 846, 881, 678, 678, 678, + 678, 678, 678, 784, 784, 784, 784, 784, 784, 784, + + 784, 784, 784, 881, 697, 881, 881, 881, 106, 847, + 881, 132, 678, 678, 678, 678, 678, 678, 377, 229, + 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, + 229, 836, 132, 229, 681, 681, 681, 681, 681, 681, + 593, 612, 804, 805, 806, 804, 804, 804, 804, 804, + 804, 804, 782, 756, 760, 757, 758, 759, 672, 681, + 681, 681, 681, 681, 681, 881, 881, 681, 681, 681, + 681, 681, 681, 681, 681, 681, 681, 105, 782, 673, + 674, 673, 674, 105, 792, 792, 105, 105, 672, 105, + 105, 105, 132, 132, 132, 132, 132, 132, 132, 132, + + 132, 132, 522, 375, 760, 105, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 685, 132, 132, 132, 106, + 132, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 688, 763, + 650, 764, 764, 764, 764, 764, 764, 196, 719, 647, + 719, 196, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 689, 196, 646, 644, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 643, + + 209, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 712, 593, + 713, 713, 713, 713, 713, 713, 713, 713, 713, 713, + 720, 782, 720, 881, 638, 757, 758, 759, 825, 825, + 825, 825, 825, 826, 673, 881, 673, 881, 881, 759, + 229, 791, 791, 791, 791, 791, 791, 106, 718, 638, + 721, 721, 721, 721, 721, 722, 719, 719, 719, 719, + 593, 633, 725, 725, 725, 725, 725, 725, 725, 725, + 725, 725, 662, 593, 760, 726, 726, 726, 726, 726, + 726, 726, 726, 726, 726, 727, 760, 632, 132, 728, + + 728, 728, 728, 728, 728, 790, 790, 790, 790, 790, + 790, 790, 790, 790, 790, 814, 528, 815, 815, 815, + 815, 815, 815, 528, 728, 728, 728, 728, 728, 728, + 732, 733, 734, 732, 732, 732, 732, 732, 732, 732, + 735, 764, 528, 764, 736, 736, 736, 736, 736, 736, + 593, 522, 821, 821, 821, 821, 821, 821, 765, 375, + 765, 809, 782, 810, 810, 810, 810, 810, 810, 736, + 736, 736, 736, 736, 736, 881, 300, 728, 728, 728, + 728, 728, 728, 728, 728, 728, 728, 377, 229, 742, + 742, 742, 742, 742, 742, 742, 742, 742, 742, 763, + + 106, 766, 766, 766, 766, 766, 767, 768, 768, 768, + 768, 772, 773, 774, 772, 772, 772, 772, 772, 772, + 772, 761, 585, 761, 761, 761, 584, 761, 761, 583, + 580, 761, 824, 824, 824, 824, 824, 824, 824, 824, + 824, 824, 719, 579, 719, 761, 761, 761, 106, 712, + 578, 713, 713, 713, 713, 713, 713, 713, 713, 713, + 713, 803, 803, 803, 803, 803, 803, 803, 803, 803, + 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, + 803, 859, 859, 859, 859, 859, 859, 495, 106, 593, + 495, 780, 780, 780, 780, 780, 780, 780, 780, 780, + + 780, 727, 593, 495, 781, 781, 781, 781, 781, 781, + 781, 781, 781, 781, 782, 815, 570, 815, 783, 783, + 783, 783, 783, 783, 840, 841, 842, 840, 840, 840, + 840, 840, 840, 840, 831, 569, 832, 832, 832, 832, + 832, 832, 106, 783, 783, 783, 783, 783, 783, 787, + 788, 789, 787, 787, 787, 787, 787, 787, 787, 816, + 832, 816, 832, 790, 790, 790, 790, 790, 790, 851, + 852, 853, 851, 851, 851, 851, 851, 851, 851, 854, + 106, 855, 855, 855, 855, 855, 855, 106, 790, 790, + 790, 790, 790, 790, 881, 106, 783, 783, 783, 783, + + 783, 783, 783, 783, 783, 783, 229, 793, 793, 793, + 793, 793, 794, 791, 791, 791, 791, 809, 106, 810, + 810, 810, 810, 810, 810, 810, 810, 810, 810, 809, + 528, 811, 811, 811, 811, 811, 811, 811, 811, 811, + 811, 809, 528, 812, 812, 812, 812, 812, 813, 810, + 810, 810, 810, 814, 522, 817, 817, 817, 817, 817, + 818, 815, 815, 815, 815, 593, 375, 821, 821, 821, + 821, 821, 821, 821, 821, 821, 821, 782, 593, 300, + 822, 822, 822, 822, 822, 822, 822, 822, 822, 822, + 833, 865, 833, 865, 823, 823, 823, 823, 823, 823, + + 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 864, 300, 865, 865, 865, 865, 865, 865, 515, 823, + 823, 823, 823, 823, 823, 881, 514, 823, 823, 823, + 823, 823, 823, 823, 823, 823, 823, 831, 513, 834, + 834, 834, 834, 834, 835, 832, 832, 832, 832, 105, + 512, 837, 838, 839, 837, 837, 837, 837, 837, 837, + 837, 809, 511, 810, 810, 810, 810, 810, 810, 810, + 810, 810, 810, 809, 510, 810, 810, 810, 810, 810, + 810, 810, 810, 810, 810, 593, 509, 845, 845, 845, + 845, 845, 845, 845, 845, 845, 845, 854, 508, 855, + + 855, 855, 855, 855, 855, 855, 855, 855, 855, 854, + 507, 856, 856, 856, 856, 856, 856, 856, 856, 856, + 856, 854, 506, 857, 857, 857, 857, 857, 858, 855, + 855, 855, 855, 860, 860, 860, 860, 860, 860, 860, + 860, 860, 860, 861, 861, 861, 861, 861, 862, 859, + 859, 859, 859, 864, 505, 867, 867, 867, 867, 867, + 868, 865, 865, 865, 865, 105, 504, 869, 870, 871, + 869, 869, 869, 869, 869, 869, 869, 854, 503, 855, + 855, 855, 855, 855, 855, 855, 855, 855, 855, 854, + 502, 855, 855, 855, 855, 855, 855, 855, 855, 855, + + 855, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, + 859, 872, 873, 874, 872, 872, 872, 872, 872, 872, + 872, 875, 875, 875, 875, 875, 875, 875, 875, 875, + 875, 878, 878, 878, 878, 878, 878, 878, 878, 878, + 878, 872, 872, 872, 872, 872, 872, 872, 872, 872, + 872, 875, 875, 875, 875, 875, 875, 501, 106, 869, + 869, 869, 869, 869, 869, 869, 869, 869, 869, 879, + 879, 879, 879, 879, 880, 878, 878, 878, 878, 878, + 878, 878, 878, 878, 878, 866, 863, 866, 106, 863, + + 500, 881, 495, 863, 495, 414, 106, 876, 876, 876, + 876, 876, 877, 875, 875, 875, 875, 878, 878, 878, + 878, 878, 878, 878, 878, 878, 878, 490, 489, 483, + 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, + 472, 471, 470, 469, 106, 875, 875, 875, 875, 875, + 875, 875, 875, 875, 875, 451, 375, 300, 447, 300, + 130, 441, 440, 439, 436, 435, 434, 433, 432, 431, + 430, 429, 426, 343, 343, 343, 414, 416, 414, 415, + 414, 408, 106, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + + 64, 64, 64, 64, 33, 33, 33, 33, 33, 33, + 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, + 33, 33, 33, 33, 33, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 105, 407, 406, + 405, 404, 403, 402, 105, 401, 105, 105, 105, 105, + 400, 399, 105, 105, 105, 105, 105, 105, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + + 109, 109, 109, 109, 109, 109, 109, 109, 109, 113, + 398, 397, 392, 391, 113, 124, 113, 300, 113, 113, + 113, 113, 113, 375, 113, 113, 113, 113, 113, 113, + 117, 300, 130, 110, 365, 361, 360, 117, 359, 117, + 117, 117, 117, 358, 357, 117, 117, 117, 117, 117, + 117, 119, 356, 355, 119, 119, 354, 119, 119, 353, + 119, 119, 119, 119, 352, 351, 119, 119, 119, 119, + 119, 119, 129, 129, 350, 129, 200, 343, 343, 129, + 166, 267, 340, 166, 166, 337, 166, 166, 336, 166, + 166, 166, 166, 335, 334, 166, 166, 166, 166, 166, + + 166, 171, 333, 328, 171, 171, 327, 171, 171, 326, + 171, 171, 171, 171, 325, 171, 171, 171, 324, 171, + 171, 171, 179, 323, 320, 179, 319, 318, 179, 179, + 317, 179, 179, 179, 179, 179, 316, 179, 179, 179, + 179, 179, 179, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 183, 183, 183, 183, 183, 183, + 183, 183, 183, 183, 185, 185, 315, 185, 314, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 191, 313, 312, 311, 310, + 191, 130, 191, 122, 191, 191, 191, 191, 191, 110, + + 191, 191, 191, 191, 191, 191, 195, 110, 288, 287, + 286, 285, 278, 195, 277, 195, 195, 195, 195, 276, + 195, 195, 195, 195, 195, 195, 195, 198, 275, 274, + 198, 198, 881, 198, 198, 197, 198, 198, 198, 198, + 267, 198, 198, 198, 198, 198, 198, 198, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, 219, 220, + 220, 185, 220, 220, 220, 220, 220, 220, 220, 220, + 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, + 120, 186, 180, 120, 120, 180, 120, 120, 172, 120, + + 120, 120, 120, 265, 165, 120, 120, 120, 120, 120, + 120, 129, 129, 165, 129, 258, 257, 256, 129, 228, + 228, 255, 228, 254, 251, 250, 228, 230, 230, 230, + 249, 230, 248, 247, 246, 230, 166, 238, 237, 166, + 166, 236, 166, 166, 235, 166, 166, 166, 166, 234, + 233, 166, 166, 166, 166, 166, 166, 167, 130, 105, + 167, 167, 130, 167, 167, 199, 167, 167, 167, 167, + 118, 221, 167, 167, 167, 167, 167, 167, 171, 110, + 108, 171, 171, 107, 171, 171, 106, 171, 171, 171, + 171, 216, 171, 171, 171, 215, 171, 171, 171, 179, + + 214, 213, 179, 212, 207, 179, 179, 186, 179, 179, + 179, 179, 179, 180, 179, 179, 179, 179, 179, 179, + 185, 185, 172, 185, 140, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 194, 169, 137, 165, 164, 161, 159, 194, 143, + 194, 194, 194, 194, 142, 139, 194, 194, 194, 194, + 194, 194, 195, 138, 132, 130, 118, 108, 107, 195, + 106, 195, 195, 195, 195, 881, 195, 195, 195, 195, + 195, 195, 195, 198, 881, 881, 198, 198, 881, 198, + 198, 881, 198, 198, 198, 198, 881, 198, 198, 198, + + 198, 198, 198, 198, 209, 881, 881, 209, 209, 881, + 209, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, + 289, 289, 296, 296, 881, 296, 881, 881, 881, 296, + 302, 302, 302, 881, 302, 881, 881, 881, 302, 369, + 369, 881, 369, 881, 881, 881, 369, 370, 370, 881, + 370, 881, 881, 881, 370, 374, 374, 881, 374, 881, + 881, 881, 374, 376, 376, 376, 881, 376, 881, 881, + 881, 376, 209, 881, 881, 209, 209, 881, 209, 447, + 447, 881, 447, 881, 881, 881, 447, 449, 449, 881, + + 449, 881, 881, 881, 449, 450, 450, 881, 450, 881, + 881, 881, 450, 452, 452, 452, 881, 452, 881, 881, + 881, 452, 456, 456, 456, 456, 881, 456, 881, 881, + 881, 456, 519, 519, 881, 519, 881, 881, 881, 519, + 520, 520, 881, 520, 881, 881, 881, 520, 521, 521, + 881, 521, 881, 881, 881, 521, 533, 533, 533, 881, + 533, 881, 881, 881, 533, 534, 534, 534, 534, 881, + 534, 881, 881, 881, 534, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 591, 591, 881, 591, + + 881, 881, 881, 591, 592, 592, 881, 592, 881, 881, + 881, 592, 608, 608, 608, 881, 608, 881, 881, 881, + 608, 609, 609, 609, 609, 881, 609, 881, 881, 881, + 609, 219, 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 209, 881, 881, 209, 209, 881, 209, 196, + 881, 881, 881, 196, 196, 881, 196, 196, 196, 881, + 881, 196, 196, 655, 655, 881, 655, 881, 881, 881, + 655, 659, 881, 659, 659, 881, 659, 881, 881, 881, + 659, 677, 677, 677, 881, 677, 881, 881, 881, 677, + + 678, 678, 678, 678, 881, 678, 881, 881, 881, 678, + 620, 620, 881, 881, 620, 881, 881, 881, 620, 219, + 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, + 219, 219, 219, 219, 219, 219, 219, 219, 219, 219, + 209, 881, 881, 209, 209, 881, 209, 196, 881, 881, + 881, 196, 196, 881, 196, 196, 196, 881, 881, 196, + 196, 723, 723, 881, 723, 881, 881, 881, 723, 724, + 881, 724, 724, 881, 724, 881, 881, 881, 724, 740, + 740, 740, 881, 740, 881, 881, 881, 740, 741, 741, + 741, 881, 881, 741, 881, 881, 881, 741, 750, 750, + + 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, + 750, 750, 750, 750, 750, 750, 750, 750, 750, 755, + 755, 881, 755, 755, 755, 881, 755, 881, 755, 755, + 755, 755, 881, 881, 755, 755, 755, 755, 755, 755, + 761, 761, 881, 761, 761, 761, 881, 761, 881, 761, + 761, 761, 761, 881, 881, 761, 761, 761, 761, 761, + 761, 209, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 209, 209, 881, 209, 209, 881, 209, 778, + 778, 881, 778, 881, 881, 881, 778, 779, 881, 779, + 779, 881, 779, 881, 881, 881, 779, 795, 795, 881, + + 881, 795, 881, 881, 881, 795, 761, 881, 881, 881, + 881, 881, 881, 761, 881, 761, 761, 761, 761, 881, + 881, 761, 761, 761, 761, 761, 761, 819, 819, 881, + 819, 881, 881, 881, 819, 820, 881, 820, 820, 881, + 820, 881, 881, 881, 820, 843, 843, 881, 843, 881, + 881, 881, 843, 844, 881, 844, 881, 881, 844, 881, + 881, 881, 844, 848, 848, 848, 848, 848, 848, 848, + 848, 848, 848, 848, 848, 848, 848, 848, 848, 848, + 848, 848, 848, 848, 15, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881 + } ; + +static yyconst flex_int16_t yy_chk[5657] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 54, 3, 56, 2, 37, 3, 51, 37, + 875, 4, 36, 3, 56, 4, 3, 11, 11, 11, + 11, 4, 22, 36, 4, 12, 12, 12, 12, 39, + + 54, 2, 2, 51, 39, 42, 2, 81, 45, 71, + 71, 3, 22, 3, 2, 3, 3, 2, 3, 4, + 42, 4, 45, 4, 4, 82, 4, 5, 5, 5, + 52, 5, 6, 6, 6, 48, 6, 5, 11, 22, + 3, 63, 6, 75, 48, 104, 12, 867, 4, 52, + 63, 5, 5, 48, 104, 77, 6, 6, 81, 63, + 79, 79, 9, 9, 9, 9, 9, 84, 84, 75, + 84, 9, 9, 9, 82, 27, 27, 149, 5, 27, + 27, 77, 149, 6, 7, 7, 7, 9, 7, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 27, + + 30, 30, 30, 30, 30, 30, 10, 10, 10, 10, + 10, 159, 253, 9, 85, 10, 10, 10, 90, 90, + 90, 90, 90, 90, 27, 95, 253, 159, 95, 49, + 148, 10, 148, 156, 85, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 8, 8, 8, 10, 8, 49, + 49, 85, 94, 130, 49, 128, 128, 128, 128, 128, + 128, 295, 49, 94, 130, 49, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 111, 111, 111, 111, + 111, 111, 111, 111, 111, 111, 156, 161, 295, 170, + + 173, 173, 866, 161, 170, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 21, 491, 146, 146, 158, + + 177, 177, 184, 184, 187, 21, 157, 188, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 28, 157, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 160, 189, 189, 28, 28, 28, 28, 28, 28, + 162, 230, 59, 59, 160, 158, 59, 59, 146, 260, + 162, 491, 230, 184, 260, 187, 188, 28, 264, 28, + 28, 28, 28, 28, 28, 34, 59, 245, 245, 865, + 263, 34, 263, 264, 34, 34, 341, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 59, 341, 34, 34, 34, 34, 34, 34, 34, + + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 291, 259, 418, + 38, 38, 38, 38, 38, 38, 262, 266, 339, 339, + 38, 112, 112, 112, 112, 112, 112, 112, 112, 112, + 112, 266, 418, 262, 330, 38, 38, 38, 38, 38, + 38, 46, 46, 46, 46, 46, 291, 46, 46, 852, + 331, 46, 126, 126, 126, 126, 126, 126, 126, 126, + + 126, 126, 259, 330, 310, 46, 46, 46, 47, 851, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 50, 69, 69, 69, 113, 69, 331, 115, 310, 69, + 50, 69, 191, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 417, 113, 69, 69, 115, 299, 299, + 299, 106, 191, 106, 106, 106, 86, 106, 106, 409, + 180, 106, 86, 180, 180, 86, 314, 302, 86, 86, + 180, 113, 69, 192, 115, 106, 106, 106, 302, 191, + 50, 70, 86, 313, 86, 180, 252, 252, 313, 252, + 314, 70, 409, 192, 70, 70, 70, 70, 70, 70, + + 70, 70, 70, 70, 287, 287, 332, 287, 86, 86, + 87, 417, 332, 87, 87, 488, 87, 87, 87, 87, + 192, 252, 87, 87, 116, 488, 116, 116, 352, 342, + 116, 116, 848, 352, 116, 342, 87, 87, 87, 127, + 127, 127, 127, 127, 127, 127, 127, 127, 127, 116, + 116, 164, 164, 164, 164, 164, 164, 164, 164, 164, + 164, 413, 87, 87, 88, 338, 413, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 845, 350, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + + 88, 88, 88, 88, 88, 88, 350, 410, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 91, 338, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 410, 584, + 584, 91, 91, 91, 91, 91, 91, 362, 494, 118, + 362, 118, 118, 118, 329, 118, 118, 329, 494, 118, + 205, 205, 205, 205, 205, 205, 91, 91, 91, 91, + 91, 91, 92, 118, 118, 118, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 329, + 353, 92, 92, 92, 92, 92, 92, 92, 92, 92, + + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 353, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 96, 96, 96, 96, 96, 96, 96, + 96, 96, 96, 96, 550, 623, 623, 96, 96, 96, + 96, 96, 96, 420, 550, 119, 119, 96, 420, 119, + 119, 176, 176, 176, 176, 176, 176, 176, 176, 176, + 176, 389, 96, 96, 96, 96, 96, 96, 102, 119, + 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, + 121, 376, 121, 121, 121, 389, 121, 121, 680, 680, + + 121, 150, 376, 412, 119, 225, 225, 225, 225, 225, + 225, 395, 493, 443, 121, 121, 121, 122, 122, 122, + 122, 122, 122, 122, 122, 122, 122, 139, 139, 493, + 843, 150, 150, 139, 139, 395, 150, 139, 412, 139, + 139, 166, 166, 834, 150, 166, 166, 150, 294, 294, + 294, 294, 443, 411, 122, 123, 123, 123, 123, 123, + 123, 123, 123, 123, 123, 166, 340, 378, 378, 123, + 123, 123, 123, 123, 123, 169, 169, 380, 380, 378, + 419, 169, 169, 505, 833, 169, 411, 169, 505, 380, + 166, 419, 832, 340, 123, 123, 123, 123, 123, 123, + + 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, + 131, 340, 472, 473, 131, 131, 131, 131, 131, 131, + 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + 306, 306, 306, 306, 306, 306, 472, 473, 823, 131, + 131, 131, 131, 131, 131, 132, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 452, 472, 571, 132, + 132, 132, 132, 132, 132, 551, 168, 452, 168, 168, + 168, 551, 168, 168, 822, 347, 168, 347, 347, 347, + 347, 347, 347, 456, 132, 132, 132, 132, 132, 132, + 168, 168, 168, 193, 456, 193, 193, 476, 195, 193, + + 193, 457, 457, 193, 195, 458, 458, 195, 460, 460, + 195, 195, 199, 457, 571, 554, 199, 458, 193, 193, + 460, 476, 199, 820, 195, 474, 195, 554, 197, 819, + 197, 197, 197, 479, 197, 197, 199, 199, 197, 203, + 203, 203, 203, 203, 203, 203, 203, 203, 203, 474, + 195, 195, 197, 197, 197, 198, 817, 479, 198, 198, + 470, 198, 198, 198, 198, 479, 474, 198, 198, 204, + 204, 204, 204, 204, 204, 204, 204, 204, 204, 214, + 214, 198, 198, 198, 470, 214, 214, 568, 574, 214, + 816, 214, 221, 221, 221, 221, 221, 221, 221, 221, + + 221, 221, 555, 470, 568, 574, 555, 198, 198, 201, + 201, 201, 201, 201, 201, 201, 201, 201, 201, 587, + 815, 481, 482, 201, 201, 201, 201, 201, 201, 222, + 222, 222, 222, 222, 222, 222, 222, 222, 222, 386, + 386, 386, 386, 386, 386, 481, 482, 500, 201, 201, + 201, 201, 201, 201, 206, 681, 681, 587, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 500, 503, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 206, 503, 206, 206, 206, + + 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, + 206, 206, 206, 206, 206, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 690, 690, 483, 207, + 207, 207, 207, 207, 207, 224, 224, 224, 224, 224, + 224, 224, 224, 224, 224, 466, 466, 466, 466, 466, + 466, 471, 483, 477, 207, 207, 207, 207, 207, 207, + 223, 805, 223, 223, 223, 223, 223, 223, 223, 223, + 223, 223, 265, 483, 478, 471, 265, 477, 573, 622, + 700, 622, 265, 303, 303, 303, 303, 303, 303, 303, + 303, 303, 303, 471, 573, 583, 265, 265, 478, 223, + + 226, 477, 226, 226, 226, 226, 226, 226, 226, 226, + 226, 226, 583, 506, 478, 509, 226, 226, 226, 226, + 226, 226, 305, 305, 305, 305, 305, 305, 305, 305, + 305, 305, 804, 559, 510, 547, 480, 506, 559, 509, + 700, 226, 226, 226, 226, 226, 226, 229, 229, 229, + 229, 229, 229, 229, 229, 229, 229, 229, 510, 547, + 480, 229, 229, 229, 229, 229, 229, 343, 343, 343, + 343, 343, 343, 343, 343, 343, 343, 480, 499, 795, + 499, 499, 499, 499, 499, 499, 229, 229, 229, 229, + 229, 229, 231, 231, 231, 231, 231, 231, 231, 231, + + 231, 231, 231, 231, 793, 552, 557, 231, 231, 231, + 231, 231, 231, 377, 377, 377, 377, 377, 377, 377, + 377, 377, 377, 518, 518, 518, 518, 518, 518, 552, + 557, 792, 231, 231, 231, 231, 231, 231, 232, 232, + 232, 232, 232, 232, 232, 232, 232, 232, 232, 626, + 791, 626, 232, 232, 232, 232, 232, 232, 379, 379, + 379, 379, 379, 379, 379, 379, 379, 379, 446, 561, + 446, 446, 446, 446, 446, 446, 561, 232, 232, 232, + 232, 232, 232, 270, 563, 270, 270, 270, 270, 270, + 270, 270, 270, 270, 270, 271, 271, 271, 271, 271, + + 271, 271, 271, 271, 271, 271, 779, 446, 563, 271, + 271, 271, 271, 271, 271, 383, 383, 383, 383, 383, + 383, 383, 383, 635, 778, 635, 565, 383, 525, 525, + 525, 525, 525, 525, 271, 271, 271, 271, 271, 271, + 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, + 565, 654, 654, 654, 273, 273, 273, 273, 273, 273, + 385, 385, 385, 385, 385, 385, 385, 385, 385, 385, + 532, 562, 532, 532, 532, 532, 532, 532, 562, 273, + 273, 273, 273, 273, 273, 290, 290, 290, 290, 290, + 290, 290, 290, 290, 290, 459, 459, 459, 459, 459, + + 459, 459, 459, 459, 459, 463, 463, 463, 463, 463, + 463, 463, 463, 590, 590, 590, 590, 463, 634, 634, + 699, 699, 290, 298, 298, 298, 298, 298, 298, 298, + 298, 298, 298, 298, 304, 304, 304, 304, 304, 304, + 304, 304, 304, 304, 304, 304, 304, 776, 648, 649, + 304, 304, 304, 304, 304, 304, 465, 465, 465, 465, + 465, 465, 465, 465, 465, 465, 625, 685, 775, 475, + 685, 625, 648, 649, 634, 304, 304, 304, 304, 304, + 304, 307, 307, 307, 307, 307, 307, 307, 307, 307, + 307, 307, 307, 475, 556, 492, 307, 307, 307, 307, + + 307, 307, 768, 691, 556, 475, 492, 687, 691, 687, + 475, 495, 495, 495, 495, 495, 495, 495, 495, 495, + 495, 307, 307, 307, 307, 307, 307, 308, 624, 308, + 308, 308, 308, 308, 308, 308, 308, 308, 308, 348, + 348, 348, 348, 348, 348, 348, 348, 348, 348, 742, + 742, 766, 624, 348, 348, 348, 348, 348, 348, 517, + 517, 517, 517, 517, 517, 517, 517, 517, 517, 544, + 544, 544, 544, 544, 544, 624, 713, 717, 348, 348, + 348, 348, 348, 348, 349, 349, 349, 349, 349, 349, + 349, 349, 349, 349, 688, 765, 692, 694, 349, 349, + + 349, 349, 349, 349, 522, 522, 522, 522, 522, 522, + 522, 522, 522, 522, 892, 713, 717, 892, 688, 533, + 692, 694, 764, 349, 349, 349, 349, 349, 349, 366, + 533, 366, 366, 366, 366, 366, 366, 366, 366, 366, + 366, 367, 594, 367, 367, 367, 367, 367, 367, 367, + 367, 367, 367, 368, 594, 368, 368, 368, 368, 368, + 368, 368, 368, 368, 368, 371, 371, 371, 371, 371, + 371, 371, 371, 371, 371, 371, 381, 381, 381, 381, + 381, 381, 381, 381, 381, 381, 381, 381, 381, 761, + 627, 628, 381, 381, 381, 381, 381, 381, 524, 524, + + 524, 524, 524, 524, 524, 524, 524, 524, 602, 602, + 602, 602, 602, 602, 627, 628, 759, 381, 381, 381, + 381, 381, 381, 384, 384, 384, 384, 384, 384, 384, + 384, 384, 384, 384, 384, 384, 754, 627, 628, 384, + 384, 384, 384, 384, 384, 528, 528, 528, 528, 528, + 528, 528, 528, 528, 528, 619, 619, 619, 619, 619, + 619, 747, 750, 747, 384, 384, 384, 384, 384, 384, + 387, 387, 387, 387, 387, 387, 387, 387, 387, 387, + 387, 387, 534, 535, 535, 387, 387, 387, 387, 387, + 387, 536, 536, 534, 560, 535, 538, 538, 707, 572, + + 707, 707, 707, 536, 749, 560, 748, 748, 538, 572, + 387, 387, 387, 387, 387, 387, 388, 596, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, 423, 596, + 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, + 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, + 751, 751, 743, 708, 424, 424, 424, 424, 424, 424, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 642, 642, 642, 642, 642, 642, 642, 708, 741, 424, + 424, 424, 424, 424, 424, 442, 442, 442, 442, 442, + 442, 442, 442, 442, 442, 541, 541, 541, 541, 541, + + 541, 541, 541, 630, 701, 801, 801, 541, 543, 543, + 543, 543, 543, 543, 543, 543, 543, 543, 630, 799, + 701, 799, 442, 444, 660, 444, 444, 444, 444, 444, + 444, 444, 444, 444, 444, 445, 660, 445, 445, 445, + 445, 445, 445, 445, 445, 445, 445, 451, 451, 451, + 451, 451, 451, 451, 451, 451, 451, 451, 922, 698, + 922, 451, 451, 451, 451, 451, 451, 593, 593, 593, + 593, 593, 593, 593, 593, 593, 593, 716, 716, 716, + 716, 698, 608, 698, 698, 738, 451, 451, 451, 451, + 451, 451, 455, 608, 455, 455, 455, 455, 455, 455, + + 455, 455, 455, 455, 461, 461, 461, 461, 461, 461, + 461, 461, 461, 461, 461, 461, 461, 636, 753, 744, + 461, 461, 461, 461, 461, 461, 595, 595, 595, 595, + 595, 595, 595, 595, 595, 595, 830, 830, 737, 636, + 686, 636, 636, 744, 724, 461, 461, 461, 461, 461, + 461, 464, 464, 464, 464, 464, 464, 464, 464, 464, + 464, 464, 464, 464, 686, 709, 636, 464, 464, 464, + 464, 464, 464, 599, 661, 599, 599, 599, 599, 599, + 599, 849, 849, 753, 723, 599, 661, 686, 904, 709, + 810, 904, 464, 464, 464, 464, 464, 464, 467, 467, + + 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, + 709, 721, 710, 467, 467, 467, 467, 467, 467, 601, + 601, 601, 601, 601, 601, 601, 601, 601, 601, 810, + 826, 826, 826, 826, 609, 746, 710, 769, 467, 467, + 467, 467, 467, 467, 468, 609, 468, 468, 468, 468, + 468, 468, 468, 468, 468, 468, 469, 469, 710, 746, + 720, 769, 469, 951, 951, 469, 469, 719, 469, 469, + 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + 469, 469, 746, 705, 469, 469, 469, 469, 469, 469, + 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + + 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, + 469, 469, 469, 469, 469, 469, 469, 516, 516, 516, + 516, 516, 516, 516, 516, 516, 516, 516, 610, 610, + 611, 611, 613, 613, 669, 669, 669, 669, 669, 669, + 610, 663, 611, 677, 613, 616, 616, 616, 616, 616, + 616, 616, 616, 663, 677, 516, 523, 616, 523, 523, + 523, 523, 523, 523, 523, 523, 523, 523, 523, 895, + 895, 895, 523, 523, 523, 523, 523, 523, 618, 618, + 618, 618, 618, 618, 618, 618, 618, 618, 676, 704, + + 676, 676, 676, 676, 676, 676, 855, 523, 523, 523, + 523, 523, 523, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 697, 796, 807, 526, 526, 526, + 526, 526, 526, 638, 638, 638, 638, 638, 638, 638, + 638, 638, 638, 696, 923, 855, 923, 675, 678, 796, + 807, 674, 526, 526, 526, 526, 526, 526, 527, 678, + 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, + 539, 539, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 912, 912, 912, 539, 539, 539, 539, + 539, 539, 652, 652, 652, 652, 652, 652, 652, 652, + + 652, 652, 684, 684, 684, 684, 684, 684, 684, 684, + 673, 539, 539, 539, 539, 539, 539, 542, 542, 542, + 542, 542, 542, 542, 542, 542, 542, 542, 542, 542, + 659, 770, 771, 542, 542, 542, 542, 542, 542, 653, + 653, 653, 653, 653, 653, 653, 653, 653, 653, 657, + 702, 798, 702, 702, 702, 770, 771, 656, 542, 542, + 542, 542, 542, 542, 545, 545, 545, 545, 545, 545, + 545, 545, 545, 545, 545, 798, 770, 655, 771, 545, + 545, 545, 545, 545, 545, 662, 662, 662, 662, 662, + 662, 662, 662, 662, 662, 934, 647, 934, 798, 679, + + 679, 702, 827, 836, 545, 545, 545, 545, 545, 545, + 546, 679, 546, 546, 546, 546, 546, 546, 546, 546, + 546, 546, 549, 935, 646, 935, 827, 836, 549, 760, + 760, 549, 549, 760, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 760, 760, 760, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 577, 577, 577, 577, 577, 577, 577, + + 577, 577, 577, 577, 580, 952, 952, 725, 580, 580, + 580, 580, 580, 580, 580, 580, 580, 580, 580, 725, + 580, 644, 846, 580, 580, 580, 580, 580, 580, 580, + 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, + 580, 580, 580, 580, 580, 580, 846, 580, 580, 580, + 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, + 580, 580, 580, 580, 580, 586, 586, 586, 586, 586, + 586, 586, 586, 586, 586, 666, 643, 666, 666, 666, + 666, 666, 666, 939, 641, 939, 726, 666, 668, 668, + 668, 668, 668, 668, 668, 668, 668, 668, 726, 963, + + 963, 711, 586, 588, 588, 588, 588, 588, 588, 588, + 588, 588, 588, 588, 672, 672, 672, 672, 672, 672, + 672, 672, 672, 672, 985, 711, 703, 985, 703, 703, + 703, 718, 718, 718, 718, 718, 718, 718, 718, 718, + 718, 588, 597, 711, 597, 597, 597, 597, 597, 597, + 597, 597, 597, 597, 597, 600, 728, 600, 600, 600, + 600, 600, 600, 600, 600, 600, 600, 600, 728, 982, + 982, 600, 600, 600, 600, 600, 600, 703, 722, 640, + 722, 722, 722, 722, 722, 722, 727, 727, 727, 727, + 727, 727, 727, 727, 727, 727, 600, 600, 600, 600, + + 600, 600, 603, 603, 603, 603, 603, 603, 603, 603, + 603, 603, 603, 940, 639, 940, 603, 603, 603, 603, + 603, 603, 731, 637, 731, 731, 731, 731, 731, 731, + 944, 947, 944, 947, 731, 734, 734, 734, 734, 734, + 734, 603, 603, 603, 603, 603, 603, 604, 780, 604, + 604, 604, 604, 604, 604, 604, 604, 604, 604, 607, + 780, 607, 607, 607, 607, 607, 607, 607, 607, 607, + 607, 614, 614, 614, 614, 614, 614, 614, 614, 614, + 614, 614, 614, 614, 633, 829, 808, 614, 614, 614, + 614, 614, 614, 733, 733, 733, 733, 733, 733, 733, + + 733, 733, 733, 755, 632, 755, 755, 755, 631, 829, + 808, 629, 614, 614, 614, 614, 614, 614, 617, 617, + 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, + 740, 808, 829, 612, 617, 617, 617, 617, 617, 617, + 781, 740, 763, 763, 763, 763, 763, 763, 763, 763, + 763, 763, 781, 756, 755, 756, 756, 756, 606, 617, + 617, 617, 617, 617, 617, 620, 783, 620, 620, 620, + 620, 620, 620, 620, 620, 620, 620, 621, 783, 957, + 958, 957, 958, 621, 983, 983, 621, 621, 605, 621, + 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, + + 621, 621, 592, 591, 756, 621, 621, 621, 621, 621, + 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, + 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, + 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, + 621, 621, 621, 621, 621, 621, 621, 621, 645, 767, + 585, 767, 767, 767, 767, 767, 767, 645, 966, 582, + 966, 645, 645, 645, 645, 645, 645, 645, 645, 645, + 645, 645, 645, 645, 581, 579, 645, 645, 645, 645, + 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, + 645, 645, 645, 645, 645, 645, 645, 645, 645, 578, + + 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, + 645, 645, 645, 645, 645, 645, 645, 645, 651, 821, + 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, + 967, 821, 967, 757, 576, 757, 757, 757, 789, 789, + 789, 789, 789, 789, 970, 758, 970, 758, 758, 758, + 794, 794, 794, 794, 794, 794, 794, 651, 658, 575, + 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, + 664, 570, 664, 664, 664, 664, 664, 664, 664, 664, + 664, 664, 664, 667, 757, 667, 667, 667, 667, 667, + 667, 667, 667, 667, 667, 667, 758, 569, 567, 667, + + 667, 667, 667, 667, 667, 782, 782, 782, 782, 782, + 782, 782, 782, 782, 782, 818, 531, 818, 818, 818, + 818, 818, 818, 530, 667, 667, 667, 667, 667, 667, + 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, + 670, 976, 529, 976, 670, 670, 670, 670, 670, 670, + 786, 521, 786, 786, 786, 786, 786, 786, 977, 520, + 977, 813, 786, 813, 813, 813, 813, 813, 813, 670, + 670, 670, 670, 670, 670, 671, 519, 671, 671, 671, + 671, 671, 671, 671, 671, 671, 671, 682, 682, 682, + 682, 682, 682, 682, 682, 682, 682, 682, 682, 706, + + 813, 706, 706, 706, 706, 706, 706, 706, 706, 706, + 706, 712, 712, 712, 712, 712, 712, 712, 712, 712, + 712, 762, 515, 762, 762, 762, 508, 762, 762, 507, + 504, 762, 788, 788, 788, 788, 788, 788, 788, 788, + 788, 788, 979, 502, 979, 762, 762, 762, 712, 714, + 501, 714, 714, 714, 714, 714, 714, 714, 714, 714, + 714, 802, 802, 802, 802, 802, 802, 802, 802, 802, + 802, 803, 803, 803, 803, 803, 803, 803, 803, 803, + 803, 862, 862, 862, 862, 862, 862, 498, 714, 729, + 497, 729, 729, 729, 729, 729, 729, 729, 729, 729, + + 729, 729, 732, 496, 732, 732, 732, 732, 732, 732, + 732, 732, 732, 732, 732, 987, 490, 987, 732, 732, + 732, 732, 732, 732, 814, 814, 814, 814, 814, 814, + 814, 814, 814, 814, 835, 489, 835, 835, 835, 835, + 835, 835, 487, 732, 732, 732, 732, 732, 732, 735, + 735, 735, 735, 735, 735, 735, 735, 735, 735, 988, + 991, 988, 991, 735, 735, 735, 735, 735, 735, 831, + 831, 831, 831, 831, 831, 831, 831, 831, 831, 858, + 486, 858, 858, 858, 858, 858, 858, 485, 735, 735, + 735, 735, 735, 735, 736, 484, 736, 736, 736, 736, + + 736, 736, 736, 736, 736, 736, 739, 739, 739, 739, + 739, 739, 739, 739, 739, 739, 739, 772, 858, 772, + 772, 772, 772, 772, 772, 772, 772, 772, 772, 773, + 454, 773, 773, 773, 773, 773, 773, 773, 773, 773, + 773, 774, 453, 774, 774, 774, 774, 774, 774, 774, + 774, 774, 774, 777, 450, 777, 777, 777, 777, 777, + 777, 777, 777, 777, 777, 784, 449, 784, 784, 784, + 784, 784, 784, 784, 784, 784, 784, 784, 787, 448, + 787, 787, 787, 787, 787, 787, 787, 787, 787, 787, + 992, 997, 992, 997, 787, 787, 787, 787, 787, 787, + + 840, 840, 840, 840, 840, 840, 840, 840, 840, 840, + 868, 447, 868, 868, 868, 868, 868, 868, 441, 787, + 787, 787, 787, 787, 787, 790, 440, 790, 790, 790, + 790, 790, 790, 790, 790, 790, 790, 806, 439, 806, + 806, 806, 806, 806, 806, 806, 806, 806, 806, 809, + 438, 809, 809, 809, 809, 809, 809, 809, 809, 809, + 809, 811, 437, 811, 811, 811, 811, 811, 811, 811, + 811, 811, 811, 812, 436, 812, 812, 812, 812, 812, + 812, 812, 812, 812, 812, 824, 435, 824, 824, 824, + 824, 824, 824, 824, 824, 824, 824, 837, 434, 837, + + 837, 837, 837, 837, 837, 837, 837, 837, 837, 838, + 433, 838, 838, 838, 838, 838, 838, 838, 838, 838, + 838, 839, 432, 839, 839, 839, 839, 839, 839, 839, + 839, 839, 839, 841, 841, 841, 841, 841, 841, 841, + 841, 841, 841, 842, 842, 842, 842, 842, 842, 842, + 842, 842, 842, 853, 431, 853, 853, 853, 853, 853, + 853, 853, 853, 853, 853, 854, 430, 854, 854, 854, + 854, 854, 854, 854, 854, 854, 854, 856, 429, 856, + 856, 856, 856, 856, 856, 856, 856, 856, 856, 857, + 428, 857, 857, 857, 857, 857, 857, 857, 857, 857, + + 857, 860, 860, 860, 860, 860, 860, 860, 860, 860, + 860, 861, 861, 861, 861, 861, 861, 861, 861, 861, + 861, 864, 864, 864, 864, 864, 864, 864, 864, 864, + 864, 869, 869, 869, 869, 869, 869, 869, 869, 869, + 869, 872, 872, 872, 872, 872, 872, 872, 872, 872, + 872, 873, 873, 873, 873, 873, 873, 873, 873, 873, + 873, 877, 877, 877, 877, 877, 877, 427, 869, 870, + 870, 870, 870, 870, 870, 870, 870, 870, 870, 874, + 874, 874, 874, 874, 874, 874, 874, 874, 874, 880, + 880, 880, 880, 880, 880, 998, 996, 998, 877, 996, + + 426, 425, 422, 996, 421, 416, 870, 871, 871, 871, + 871, 871, 871, 871, 871, 871, 871, 879, 879, 879, + 879, 879, 879, 879, 879, 879, 879, 415, 414, 408, + 407, 405, 404, 403, 402, 401, 400, 399, 398, 397, + 394, 393, 392, 391, 871, 876, 876, 876, 876, 876, + 876, 876, 876, 876, 876, 375, 374, 373, 372, 370, + 369, 365, 364, 363, 361, 360, 359, 358, 357, 356, + 355, 354, 351, 346, 345, 344, 337, 336, 335, 334, + 333, 327, 876, 882, 882, 882, 882, 882, 882, 882, + 882, 882, 882, 882, 882, 882, 882, 882, 882, 882, + + 882, 882, 882, 882, 883, 883, 883, 883, 883, 883, + 883, 883, 883, 883, 883, 883, 883, 883, 883, 883, + 883, 883, 883, 883, 883, 884, 884, 884, 884, 884, + 884, 884, 884, 884, 884, 884, 884, 884, 884, 884, + 884, 884, 884, 884, 884, 884, 885, 885, 885, 885, + 885, 885, 885, 885, 885, 885, 885, 885, 885, 885, + 885, 885, 885, 885, 885, 885, 885, 886, 326, 324, + 323, 322, 321, 320, 886, 319, 886, 886, 886, 886, + 318, 317, 886, 886, 886, 886, 886, 886, 887, 887, + 887, 887, 887, 887, 887, 887, 887, 887, 887, 887, + + 887, 887, 887, 887, 887, 887, 887, 887, 887, 888, + 316, 315, 312, 311, 888, 309, 888, 301, 888, 888, + 888, 888, 888, 300, 888, 888, 888, 888, 888, 888, + 889, 297, 296, 289, 288, 286, 285, 889, 284, 889, + 889, 889, 889, 283, 282, 889, 889, 889, 889, 889, + 889, 890, 281, 280, 890, 890, 279, 890, 890, 278, + 890, 890, 890, 890, 277, 276, 890, 890, 890, 890, + 890, 890, 891, 891, 275, 891, 272, 269, 268, 891, + 893, 267, 261, 893, 893, 258, 893, 893, 257, 893, + 893, 893, 893, 256, 255, 893, 893, 893, 893, 893, + + 893, 894, 254, 251, 894, 894, 250, 894, 894, 249, + 894, 894, 894, 894, 248, 894, 894, 894, 247, 894, + 894, 894, 896, 246, 244, 896, 243, 242, 896, 896, + 241, 896, 896, 896, 896, 896, 240, 896, 896, 896, + 896, 896, 896, 897, 897, 897, 897, 897, 897, 897, + 897, 897, 897, 897, 897, 897, 897, 897, 897, 897, + 897, 897, 897, 897, 898, 898, 239, 898, 238, 898, + 898, 898, 898, 898, 898, 898, 898, 898, 898, 898, + 898, 898, 898, 898, 898, 899, 237, 236, 235, 234, + 899, 228, 899, 227, 899, 899, 899, 899, 899, 220, + + 899, 899, 899, 899, 899, 899, 900, 219, 218, 217, + 216, 215, 213, 900, 212, 900, 900, 900, 900, 211, + 900, 900, 900, 900, 900, 900, 900, 901, 210, 208, + 901, 901, 202, 901, 901, 194, 901, 901, 901, 901, + 190, 901, 901, 901, 901, 901, 901, 901, 902, 902, + 902, 902, 902, 902, 902, 902, 902, 902, 902, 902, + 902, 902, 902, 902, 902, 902, 902, 902, 902, 903, + 903, 186, 903, 903, 903, 903, 903, 903, 903, 903, + 903, 903, 903, 903, 903, 903, 903, 903, 903, 903, + 905, 185, 183, 905, 905, 179, 905, 905, 172, 905, + + 905, 905, 905, 167, 165, 905, 905, 905, 905, 905, + 905, 906, 906, 163, 906, 155, 154, 153, 906, 907, + 907, 152, 907, 151, 145, 144, 907, 908, 908, 908, + 143, 908, 142, 141, 140, 908, 909, 138, 137, 909, + 909, 136, 909, 909, 135, 909, 909, 909, 909, 134, + 133, 909, 909, 909, 909, 909, 909, 910, 129, 125, + 910, 910, 124, 910, 910, 120, 910, 910, 910, 910, + 117, 114, 910, 910, 910, 910, 910, 910, 911, 109, + 108, 911, 911, 107, 911, 911, 105, 911, 911, 911, + 911, 101, 911, 911, 911, 100, 911, 911, 911, 913, + + 99, 98, 913, 97, 93, 913, 913, 80, 913, 913, + 913, 913, 913, 73, 913, 913, 913, 913, 913, 913, + 914, 914, 66, 914, 62, 914, 914, 914, 914, 914, + 914, 914, 914, 914, 914, 914, 914, 914, 914, 914, + 914, 915, 61, 60, 58, 57, 55, 53, 915, 44, + 915, 915, 915, 915, 43, 41, 915, 915, 915, 915, + 915, 915, 916, 40, 35, 31, 25, 19, 17, 916, + 16, 916, 916, 916, 916, 15, 916, 916, 916, 916, + 916, 916, 916, 917, 0, 0, 917, 917, 0, 917, + 917, 0, 917, 917, 917, 917, 0, 917, 917, 917, + + 917, 917, 917, 917, 918, 0, 0, 918, 918, 0, + 918, 919, 919, 919, 919, 919, 919, 919, 919, 919, + 919, 919, 919, 919, 919, 919, 919, 919, 919, 919, + 919, 919, 920, 920, 0, 920, 0, 0, 0, 920, + 921, 921, 921, 0, 921, 0, 0, 0, 921, 924, + 924, 0, 924, 0, 0, 0, 924, 925, 925, 0, + 925, 0, 0, 0, 925, 926, 926, 0, 926, 0, + 0, 0, 926, 927, 927, 927, 0, 927, 0, 0, + 0, 927, 928, 0, 0, 928, 928, 0, 928, 929, + 929, 0, 929, 0, 0, 0, 929, 930, 930, 0, + + 930, 0, 0, 0, 930, 931, 931, 0, 931, 0, + 0, 0, 931, 932, 932, 932, 0, 932, 0, 0, + 0, 932, 933, 933, 933, 933, 0, 933, 0, 0, + 0, 933, 936, 936, 0, 936, 0, 0, 0, 936, + 937, 937, 0, 937, 0, 0, 0, 937, 938, 938, + 0, 938, 0, 0, 0, 938, 941, 941, 941, 0, + 941, 0, 0, 0, 941, 942, 942, 942, 942, 0, + 942, 0, 0, 0, 942, 943, 943, 943, 943, 943, + 943, 943, 943, 943, 943, 943, 943, 943, 943, 943, + 943, 943, 943, 943, 943, 943, 945, 945, 0, 945, + + 0, 0, 0, 945, 946, 946, 0, 946, 0, 0, + 0, 946, 948, 948, 948, 0, 948, 0, 0, 0, + 948, 949, 949, 949, 949, 0, 949, 0, 0, 0, + 949, 950, 950, 950, 950, 950, 950, 950, 950, 950, + 950, 950, 950, 950, 950, 950, 950, 950, 950, 950, + 950, 950, 953, 0, 0, 953, 953, 0, 953, 954, + 0, 0, 0, 954, 954, 0, 954, 954, 954, 0, + 0, 954, 954, 955, 955, 0, 955, 0, 0, 0, + 955, 956, 0, 956, 956, 0, 956, 0, 0, 0, + 956, 959, 959, 959, 0, 959, 0, 0, 0, 959, + + 960, 960, 960, 960, 0, 960, 0, 0, 0, 960, + 961, 961, 0, 0, 961, 0, 0, 0, 961, 962, + 962, 962, 962, 962, 962, 962, 962, 962, 962, 962, + 962, 962, 962, 962, 962, 962, 962, 962, 962, 962, + 964, 0, 0, 964, 964, 0, 964, 965, 0, 0, + 0, 965, 965, 0, 965, 965, 965, 0, 0, 965, + 965, 968, 968, 0, 968, 0, 0, 0, 968, 969, + 0, 969, 969, 0, 969, 0, 0, 0, 969, 971, + 971, 971, 0, 971, 0, 0, 0, 971, 972, 972, + 972, 0, 0, 972, 0, 0, 0, 972, 973, 973, + + 973, 973, 973, 973, 973, 973, 973, 973, 973, 973, + 973, 973, 973, 973, 973, 973, 973, 973, 973, 974, + 974, 0, 974, 974, 974, 0, 974, 0, 974, 974, + 974, 974, 0, 0, 974, 974, 974, 974, 974, 974, + 975, 975, 0, 975, 975, 975, 0, 975, 0, 975, + 975, 975, 975, 0, 0, 975, 975, 975, 975, 975, + 975, 978, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 978, 978, 0, 978, 978, 0, 978, 980, + 980, 0, 980, 0, 0, 0, 980, 981, 0, 981, + 981, 0, 981, 0, 0, 0, 981, 984, 984, 0, + + 0, 984, 0, 0, 0, 984, 986, 0, 0, 0, + 0, 0, 0, 986, 0, 986, 986, 986, 986, 0, + 0, 986, 986, 986, 986, 986, 986, 989, 989, 0, + 989, 0, 0, 0, 989, 990, 0, 990, 990, 0, + 990, 0, 0, 0, 990, 993, 993, 0, 993, 0, + 0, 0, 993, 994, 0, 994, 0, 0, 994, 0, + 0, 0, 994, 995, 995, 995, 995, 995, 995, 995, + 995, 995, 995, 995, 995, 995, 995, 995, 995, 995, + 995, 995, 995, 995, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + 881, 881, 881, 881, 881, 881 + } ; + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +extern int sudoers_flex_debug; +int sudoers_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *sudoerstext; +#line 1 "toke.l" +#line 2 "toke.l" +/* + * Copyright (c) 1996, 1998-2005, 2007-2017 + * Todd C. Miller <Todd.Miller@sudo.ws> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Sponsored in part by the Defense Advanced Research Projects + * Agency (DARPA) and Air Force Research Laboratory, Air Force + * Materiel Command, USAF, under agreement number F39502-99-1-0512. + */ + +#include <config.h> + +#include <sys/types.h> +#include <sys/stat.h> +#include <stdio.h> +#include <stdlib.h> +#ifdef HAVE_STRING_H +# include <string.h> +#endif /* HAVE_STRING_H */ +#ifdef HAVE_STRINGS_H +# include <strings.h> +#endif /* HAVE_STRINGS_H */ +#if defined(HAVE_STDINT_H) +# include <stdint.h> +#elif defined(HAVE_INTTYPES_H) +# include <inttypes.h> +#endif +#include <unistd.h> +#include <dirent.h> +#include <errno.h> +#include <ctype.h> +#include "sudoers.h" +#include "toke.h" +#include <gram.h> +#include "sudo_digest.h" +#include "sudo_lbuf.h" + +#if defined(HAVE_STRUCT_DIRENT_D_NAMLEN) && HAVE_STRUCT_DIRENT_D_NAMLEN +# define NAMLEN(dirent) (dirent)->d_namlen +#else +# define NAMLEN(dirent) strlen((dirent)->d_name) +#endif + +int sudolineno; /* current sudoers line number. */ +int last_token; /* last token that was parsed. */ +char *sudoers; /* sudoers file being parsed. */ + +/* Default sudoers path, mode and owner (may be set via sudo.conf) */ +const char *sudoers_file = _PATH_SUDOERS; +mode_t sudoers_mode = SUDOERS_MODE; +uid_t sudoers_uid = SUDOERS_UID; +gid_t sudoers_gid = SUDOERS_GID; + +static bool continued, sawspace; +static int prev_state; +static int digest_type = -1; + +static bool push_include_int(char *, bool); +static bool pop_include(void); +static char *parse_include_int(const char *, bool); + +int (*trace_print)(const char *msg) = sudoers_trace_print; + +#define LEXRETURN(n) do { \ + last_token = (n); \ + return (n); \ +} while (0) + +#define ECHO ignore_result(fwrite(sudoerstext, sudoersleng, 1, sudoersout)) + +#define parse_include(_p) (parse_include_int((_p), false)) +#define parse_includedir(_p) (parse_include_int((_p), true)) +#define push_include(_p) (push_include_int((_p), false)) +#define push_includedir(_p) (push_include_int((_p), true)) +#define YY_NO_INPUT 1 + + + + + + +#line 2133 "toke.c" + +#define INITIAL 0 +#define GOTDEFS 1 +#define GOTCMND 2 +#define STARTDEFS 3 +#define INDEFS 4 +#define INSTR 5 +#define WANTDIGEST 6 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include <unistd.h> +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int sudoerslex_destroy (void ); + +int sudoersget_debug (void ); + +void sudoersset_debug (int debug_flag ); + +YY_EXTRA_TYPE sudoersget_extra (void ); + +void sudoersset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *sudoersget_in (void ); + +void sudoersset_in (FILE * in_str ); + +FILE *sudoersget_out (void ); + +void sudoersset_out (FILE * out_str ); + +yy_size_t sudoersget_leng (void ); + +char *sudoersget_text (void ); + +int sudoersget_lineno (void ); + +void sudoersset_lineno (int line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int sudoerswrap (void ); +#else +extern int sudoerswrap (void ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( sudoerstext, sudoersleng, 1, sudoersout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( sudoersin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( sudoersin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, sudoersin))==0 && ferror(sudoersin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(sudoersin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int sudoerslex (void); + +#define YY_DECL int sudoerslex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after sudoerstext and sudoersleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( sudoersleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (sudoerstext[sudoersleng - 1] == '\n'); \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! sudoersin ) + sudoersin = stdin; + + if ( ! sudoersout ) + sudoersout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + sudoersensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + sudoers_create_buffer(sudoersin,YY_BUF_SIZE ); + } + + sudoers_load_buffer_state( ); + } + + { +#line 113 "toke.l" + +#line 2351 "toke.c" + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of sudoerstext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); +yy_match: + do + { + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 882 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 5585 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 114 "toke.l" +{ + LEXTRACE(", "); + LEXRETURN(','); + } /* return ',' */ + YY_BREAK +case 2: +YY_RULE_SETUP +#line 119 "toke.l" +BEGIN STARTDEFS; + YY_BREAK +case 3: +YY_RULE_SETUP +#line 121 "toke.l" +{ + BEGIN INDEFS; + LEXTRACE("DEFVAR "); + if (!fill(sudoerstext, sudoersleng)) + yyterminate(); + LEXRETURN(DEFVAR); + } + YY_BREAK + +case 4: +YY_RULE_SETUP +#line 130 "toke.l" +{ + BEGIN STARTDEFS; + LEXTRACE(", "); + LEXRETURN(','); + } /* return ',' */ + YY_BREAK +case 5: +YY_RULE_SETUP +#line 136 "toke.l" +{ + LEXTRACE("= "); + LEXRETURN('='); + } /* return '=' */ + YY_BREAK +case 6: +YY_RULE_SETUP +#line 141 "toke.l" +{ + LEXTRACE("+= "); + LEXRETURN('+'); + } /* return '+' */ + YY_BREAK +case 7: +YY_RULE_SETUP +#line 146 "toke.l" +{ + LEXTRACE("-= "); + LEXRETURN('-'); + } /* return '-' */ + YY_BREAK +case 8: +YY_RULE_SETUP +#line 151 "toke.l" +{ + LEXTRACE("BEGINSTR "); + sudoerslval.string = NULL; + prev_state = YY_START; + BEGIN INSTR; + } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 158 "toke.l" +{ + LEXTRACE("WORD(2) "); + if (!fill(sudoerstext, sudoersleng)) + yyterminate(); + LEXRETURN(WORD); + } + YY_BREAK + + +case 10: +/* rule 10 can match eol */ +YY_RULE_SETUP +#line 167 "toke.l" +{ + /* Line continuation char followed by newline. */ + sudolineno++; + continued = true; + } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 173 "toke.l" +{ + LEXTRACE("ENDSTR "); + BEGIN prev_state; + + if (sudoerslval.string == NULL) { + LEXTRACE("ERROR "); /* empty string */ + LEXRETURN(ERROR); + } + if (prev_state == INITIAL) { + switch (sudoerslval.string[0]) { + case '%': + if (sudoerslval.string[1] == '\0' || + (sudoerslval.string[1] == ':' && + sudoerslval.string[2] == '\0')) { + LEXTRACE("ERROR "); /* empty group */ + LEXRETURN(ERROR); + } + LEXTRACE("USERGROUP "); + LEXRETURN(USERGROUP); + case '+': + if (sudoerslval.string[1] == '\0') { + LEXTRACE("ERROR "); /* empty netgroup */ + LEXRETURN(ERROR); + } + LEXTRACE("NETGROUP "); + LEXRETURN(NETGROUP); + } + } + LEXTRACE("WORD(4) "); + LEXRETURN(WORD); + } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 205 "toke.l" +{ + LEXTRACE("BACKSLASH "); + if (!append(sudoerstext, sudoersleng)) + yyterminate(); + } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 211 "toke.l" +{ + LEXTRACE("STRBODY "); + if (!append(sudoerstext, sudoersleng)) + yyterminate(); + } + YY_BREAK + + +case 14: +YY_RULE_SETUP +#line 219 "toke.l" +{ + /* quoted fnmatch glob char, pass verbatim */ + LEXTRACE("QUOTEDCHAR "); + if (!fill_args(sudoerstext, 2, sawspace)) + yyterminate(); + sawspace = false; + } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 227 "toke.l" +{ + /* quoted sudoers special char, strip backslash */ + LEXTRACE("QUOTEDCHAR "); + if (!fill_args(sudoerstext + 1, 1, sawspace)) + yyterminate(); + sawspace = false; + } + YY_BREAK +case 16: +/* rule 16 can match eol */ +YY_RULE_SETUP +#line 235 "toke.l" +{ + BEGIN INITIAL; + yyless(0); + LEXRETURN(COMMAND); + } /* end of command line args */ + YY_BREAK +case 17: +YY_RULE_SETUP +#line 241 "toke.l" +{ + LEXTRACE("ARG "); + if (!fill_args(sudoerstext, sudoersleng, sawspace)) + yyterminate(); + sawspace = false; + } /* a command line arg */ + YY_BREAK + +case 18: +YY_RULE_SETUP +#line 249 "toke.l" +{ + /* Only return DIGEST if the length is correct. */ + yy_size_t digest_len = + sudo_digest_getlen(digest_type); + if ((yy_size_t)sudoersleng == digest_len * 2) { + if (!fill(sudoerstext, sudoersleng)) + yyterminate(); + BEGIN INITIAL; + LEXTRACE("DIGEST "); + LEXRETURN(DIGEST); + } + BEGIN INITIAL; + yyless(sudoersleng); + } /* hex digest */ + YY_BREAK +case 19: +YY_RULE_SETUP +#line 264 "toke.l" +{ + /* Only return DIGEST if the length is correct. */ + yy_size_t len, digest_len = + sudo_digest_getlen(digest_type); + if (sudoerstext[sudoersleng - 1] == '=') { + /* use padding */ + len = 4 * ((digest_len + 2) / 3); + } else { + /* no padding */ + len = (4 * digest_len + 2) / 3; + } + if ((yy_size_t)sudoersleng == len) { + if (!fill(sudoerstext, sudoersleng)) + yyterminate(); + BEGIN INITIAL; + LEXTRACE("DIGEST "); + LEXRETURN(DIGEST); + } + BEGIN INITIAL; + yyless(sudoersleng); + } /* base64 digest */ + YY_BREAK +case 20: +/* rule 20 can match eol */ +YY_RULE_SETUP +#line 286 "toke.l" +{ + char *path; + + if (continued) { + LEXTRACE("ERROR "); + LEXRETURN(ERROR); + } + + if ((path = parse_include(sudoerstext)) == NULL) + yyterminate(); + + LEXTRACE("INCLUDE\n"); + + /* Push current buffer and switch to include file */ + if (!push_include(path)) + yyterminate(); + } + YY_BREAK +case 21: +/* rule 21 can match eol */ +YY_RULE_SETUP +#line 304 "toke.l" +{ + char *path; + + if (continued) { + LEXTRACE("ERROR "); + LEXRETURN(ERROR); + } + + if ((path = parse_includedir(sudoerstext)) == NULL) + yyterminate(); + + LEXTRACE("INCLUDEDIR\n"); + + /* + * Push current buffer and switch to include file, + * ignoring missing or empty directories. + */ + if (!push_includedir(path)) + yyterminate(); + } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 325 "toke.l" +{ + char deftype; + int n; + + if (continued) { + LEXTRACE("ERROR "); + LEXRETURN(ERROR); + } + + for (n = 0; isblank((unsigned char)sudoerstext[n]); n++) + continue; + n += sizeof("Defaults") - 1; + if ((deftype = sudoerstext[n++]) != '\0') { + while (isblank((unsigned char)sudoerstext[n])) + n++; + } + BEGIN GOTDEFS; + switch (deftype) { + case ':': + yyless(n); + LEXTRACE("DEFAULTS_USER "); + LEXRETURN(DEFAULTS_USER); + case '>': + yyless(n); + LEXTRACE("DEFAULTS_RUNAS "); + LEXRETURN(DEFAULTS_RUNAS); + case '@': + yyless(n); + LEXTRACE("DEFAULTS_HOST "); + LEXRETURN(DEFAULTS_HOST); + case '!': + yyless(n); + LEXTRACE("DEFAULTS_CMND "); + LEXRETURN(DEFAULTS_CMND); + default: + LEXTRACE("DEFAULTS "); + LEXRETURN(DEFAULTS); + } + } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 365 "toke.l" +{ + int n; + + if (continued) { + LEXTRACE("ERROR "); + LEXRETURN(ERROR); + } + + for (n = 0; isblank((unsigned char)sudoerstext[n]); n++) + continue; + switch (sudoerstext[n]) { + case 'H': + LEXTRACE("HOSTALIAS "); + LEXRETURN(HOSTALIAS); + case 'C': + LEXTRACE("CMNDALIAS "); + LEXRETURN(CMNDALIAS); + case 'U': + LEXTRACE("USERALIAS "); + LEXRETURN(USERALIAS); + case 'R': + LEXTRACE("RUNASALIAS "); + LEXRETURN(RUNASALIAS); + } + } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 391 "toke.l" +{ + /* cmnd does not require passwd for this user */ + LEXTRACE("NOPASSWD "); + LEXRETURN(NOPASSWD); + } + YY_BREAK +case 25: +YY_RULE_SETUP +#line 397 "toke.l" +{ + /* cmnd requires passwd for this user */ + LEXTRACE("PASSWD "); + LEXRETURN(PASSWD); + } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 403 "toke.l" +{ + LEXTRACE("NOEXEC "); + LEXRETURN(NOEXEC); + } + YY_BREAK +case 27: +YY_RULE_SETUP +#line 408 "toke.l" +{ + LEXTRACE("EXEC "); + LEXRETURN(EXEC); + } + YY_BREAK +case 28: +YY_RULE_SETUP +#line 413 "toke.l" +{ + LEXTRACE("SETENV "); + LEXRETURN(SETENV); + } + YY_BREAK +case 29: +YY_RULE_SETUP +#line 418 "toke.l" +{ + LEXTRACE("NOSETENV "); + LEXRETURN(NOSETENV); + } + YY_BREAK +case 30: +YY_RULE_SETUP +#line 423 "toke.l" +{ + LEXTRACE("LOG_OUTPUT "); + LEXRETURN(LOG_OUTPUT); + } + YY_BREAK +case 31: +YY_RULE_SETUP +#line 428 "toke.l" +{ + LEXTRACE("NOLOG_OUTPUT "); + LEXRETURN(NOLOG_OUTPUT); + } + YY_BREAK +case 32: +YY_RULE_SETUP +#line 433 "toke.l" +{ + LEXTRACE("LOG_INPUT "); + LEXRETURN(LOG_INPUT); + } + YY_BREAK +case 33: +YY_RULE_SETUP +#line 438 "toke.l" +{ + LEXTRACE("NOLOG_INPUT "); + LEXRETURN(NOLOG_INPUT); + } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 443 "toke.l" +{ + LEXTRACE("MAIL "); + LEXRETURN(MAIL); + } + YY_BREAK +case 35: +YY_RULE_SETUP +#line 448 "toke.l" +{ + LEXTRACE("NOMAIL "); + LEXRETURN(NOMAIL); + } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 453 "toke.l" +{ + LEXTRACE("FOLLOW "); + LEXRETURN(FOLLOW); + } + YY_BREAK +case 37: +YY_RULE_SETUP +#line 458 "toke.l" +{ + LEXTRACE("NOFOLLOW "); + LEXRETURN(NOFOLLOW); + } + YY_BREAK +case 38: +YY_RULE_SETUP +#line 463 "toke.l" +{ + /* empty group or netgroup */ + LEXTRACE("ERROR "); + LEXRETURN(ERROR); + } + YY_BREAK +case 39: +YY_RULE_SETUP +#line 469 "toke.l" +{ + /* netgroup */ + if (!fill(sudoerstext, sudoersleng)) + yyterminate(); + LEXTRACE("NETGROUP "); + LEXRETURN(NETGROUP); + } + YY_BREAK +case 40: +YY_RULE_SETUP +#line 477 "toke.l" +{ + /* group */ + if (!fill(sudoerstext, sudoersleng)) + yyterminate(); + LEXTRACE("USERGROUP "); + LEXRETURN(USERGROUP); + } + YY_BREAK +case 41: +YY_RULE_SETUP +#line 485 "toke.l" +{ + if (!fill(sudoerstext, sudoersleng)) + yyterminate(); + LEXTRACE("NTWKADDR "); + LEXRETURN(NTWKADDR); + } + YY_BREAK +case 42: +YY_RULE_SETUP +#line 492 "toke.l" +{ + if (!fill(sudoerstext, sudoersleng)) + yyterminate(); + LEXTRACE("NTWKADDR "); + LEXRETURN(NTWKADDR); + } + YY_BREAK +case 43: +YY_RULE_SETUP +#line 499 "toke.l" +{ + if (!ipv6_valid(sudoerstext)) { + LEXTRACE("ERROR "); + LEXRETURN(ERROR); + } + if (!fill(sudoerstext, sudoersleng)) + yyterminate(); + LEXTRACE("NTWKADDR "); + LEXRETURN(NTWKADDR); + } + YY_BREAK +case 44: +YY_RULE_SETUP +#line 510 "toke.l" +{ + if (!ipv6_valid(sudoerstext)) { + LEXTRACE("ERROR "); + LEXRETURN(ERROR); + } + if (!fill(sudoerstext, sudoersleng)) + yyterminate(); + LEXTRACE("NTWKADDR "); + LEXRETURN(NTWKADDR); + } + YY_BREAK +case 45: +YY_RULE_SETUP +#line 521 "toke.l" +{ + LEXTRACE("ALL "); + LEXRETURN(ALL); + + } + YY_BREAK +case 46: +YY_RULE_SETUP +#line 527 "toke.l" +{ + LEXTRACE("CMND_TIMEOUT "); + LEXRETURN(CMND_TIMEOUT); + } + YY_BREAK +case 47: +YY_RULE_SETUP +#line 532 "toke.l" +{ + LEXTRACE("NOTBEFORE "); + LEXRETURN(NOTBEFORE); + } + YY_BREAK +case 48: +YY_RULE_SETUP +#line 537 "toke.l" +{ + LEXTRACE("NOTAFTER "); + LEXRETURN(NOTAFTER); + } + YY_BREAK +case 49: +YY_RULE_SETUP +#line 542 "toke.l" +{ +#ifdef HAVE_SELINUX + LEXTRACE("ROLE "); + LEXRETURN(ROLE); +#else + goto got_alias; +#endif + } + YY_BREAK +case 50: +YY_RULE_SETUP +#line 551 "toke.l" +{ +#ifdef HAVE_SELINUX + LEXTRACE("TYPE "); + LEXRETURN(TYPE); +#else + goto got_alias; +#endif + } + YY_BREAK +case 51: +YY_RULE_SETUP +#line 559 "toke.l" +{ +#ifdef HAVE_PRIV_SET + LEXTRACE("PRIVS "); + LEXRETURN(PRIVS); +#else + goto got_alias; +#endif + } + YY_BREAK +case 52: +YY_RULE_SETUP +#line 568 "toke.l" +{ +#ifdef HAVE_PRIV_SET + LEXTRACE("LIMITPRIVS "); + LEXRETURN(LIMITPRIVS); +#else + goto got_alias; +#endif + } + YY_BREAK +case 53: +YY_RULE_SETUP +#line 577 "toke.l" +{ + got_alias: + if (!fill(sudoerstext, sudoersleng)) + yyterminate(); + LEXTRACE("ALIAS "); + LEXRETURN(ALIAS); + } + YY_BREAK +case 54: +YY_RULE_SETUP +#line 585 "toke.l" +{ + /* XXX - no way to specify digest for command */ + /* no command args allowed for Defaults!/path */ + if (!fill_cmnd(sudoerstext, sudoersleng)) + yyterminate(); + LEXTRACE("COMMAND "); + LEXRETURN(COMMAND); + } + YY_BREAK +case 55: +YY_RULE_SETUP +#line 594 "toke.l" +{ + digest_type = SUDO_DIGEST_SHA224; + BEGIN WANTDIGEST; + LEXTRACE("SHA224_TOK "); + LEXRETURN(SHA224_TOK); + } + YY_BREAK +case 56: +YY_RULE_SETUP +#line 601 "toke.l" +{ + digest_type = SUDO_DIGEST_SHA256; + BEGIN WANTDIGEST; + LEXTRACE("SHA256_TOK "); + LEXRETURN(SHA256_TOK); + } + YY_BREAK +case 57: +YY_RULE_SETUP +#line 608 "toke.l" +{ + digest_type = SUDO_DIGEST_SHA384; + BEGIN WANTDIGEST; + LEXTRACE("SHA384_TOK "); + LEXRETURN(SHA384_TOK); + } + YY_BREAK +case 58: +YY_RULE_SETUP +#line 615 "toke.l" +{ + digest_type = SUDO_DIGEST_SHA512; + BEGIN WANTDIGEST; + LEXTRACE("SHA512_TOK "); + LEXRETURN(SHA512_TOK); + } + YY_BREAK +case 59: +YY_RULE_SETUP +#line 622 "toke.l" +{ + BEGIN GOTCMND; + LEXTRACE("COMMAND "); + if (!fill_cmnd(sudoerstext, sudoersleng)) + yyterminate(); + } /* sudo -e */ + YY_BREAK +case 60: +YY_RULE_SETUP +#line 629 "toke.l" +{ + /* directories can't have args... */ + if (sudoerstext[sudoersleng - 1] == '/') { + LEXTRACE("COMMAND "); + if (!fill_cmnd(sudoerstext, sudoersleng)) + yyterminate(); + LEXRETURN(COMMAND); + } else { + BEGIN GOTCMND; + LEXTRACE("COMMAND "); + if (!fill_cmnd(sudoerstext, sudoersleng)) + yyterminate(); + } + } /* a pathname */ + YY_BREAK +case 61: +YY_RULE_SETUP +#line 644 "toke.l" +{ + LEXTRACE("BEGINSTR "); + sudoerslval.string = NULL; + prev_state = YY_START; + BEGIN INSTR; + } + YY_BREAK +case 62: +YY_RULE_SETUP +#line 651 "toke.l" +{ + /* a word */ + if (!fill(sudoerstext, sudoersleng)) + yyterminate(); + LEXTRACE("WORD(5) "); + LEXRETURN(WORD); + } + YY_BREAK +case 63: +YY_RULE_SETUP +#line 659 "toke.l" +{ + LEXTRACE("( "); + LEXRETURN('('); + } + YY_BREAK +case 64: +YY_RULE_SETUP +#line 664 "toke.l" +{ + LEXTRACE(") "); + LEXRETURN(')'); + } + YY_BREAK +case 65: +YY_RULE_SETUP +#line 669 "toke.l" +{ + LEXTRACE(", "); + LEXRETURN(','); + } /* return ',' */ + YY_BREAK +case 66: +YY_RULE_SETUP +#line 674 "toke.l" +{ + LEXTRACE("= "); + LEXRETURN('='); + } /* return '=' */ + YY_BREAK +case 67: +YY_RULE_SETUP +#line 679 "toke.l" +{ + LEXTRACE(": "); + LEXRETURN(':'); + } /* return ':' */ + YY_BREAK +case 68: +YY_RULE_SETUP +#line 684 "toke.l" +{ + if (sudoersleng & 1) { + LEXTRACE("!"); + LEXRETURN('!'); /* return '!' */ + } + } + YY_BREAK +case 69: +/* rule 69 can match eol */ +YY_RULE_SETUP +#line 691 "toke.l" +{ + if (YY_START == INSTR) { + LEXTRACE("ERROR "); + LEXRETURN(ERROR); /* line break in string */ + } + BEGIN INITIAL; + sudolineno++; + continued = false; + LEXTRACE("\n"); + LEXRETURN(COMMENT); + } /* return newline */ + YY_BREAK +case 70: +YY_RULE_SETUP +#line 703 "toke.l" +{ /* throw away space/tabs */ + sawspace = true; /* but remember for fill_args */ + } + YY_BREAK +case 71: +/* rule 71 can match eol */ +YY_RULE_SETUP +#line 707 "toke.l" +{ + sawspace = true; /* remember for fill_args */ + sudolineno++; + continued = true; + } /* throw away EOL after \ */ + YY_BREAK +case 72: +/* rule 72 can match eol */ +YY_RULE_SETUP +#line 713 "toke.l" +{ + if (sudoerstext[sudoersleng - 1] == '\n') { + /* comment ending in a newline */ + BEGIN INITIAL; + sudolineno++; + continued = false; + } else if (!feof(sudoersin)) { + LEXTRACE("ERROR "); + LEXRETURN(ERROR); + } + LEXTRACE("#\n"); + LEXRETURN(COMMENT); + } /* comment, not uid/gid */ + YY_BREAK +case 73: +YY_RULE_SETUP +#line 727 "toke.l" +{ + LEXTRACE("ERROR "); + LEXRETURN(ERROR); + } /* parse error */ + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(GOTDEFS): +case YY_STATE_EOF(GOTCMND): +case YY_STATE_EOF(STARTDEFS): +case YY_STATE_EOF(INDEFS): +case YY_STATE_EOF(INSTR): +case YY_STATE_EOF(WANTDIGEST): +#line 732 "toke.l" +{ + if (YY_START != INITIAL) { + BEGIN INITIAL; + LEXTRACE("ERROR "); + LEXRETURN(ERROR); + } + if (!pop_include()) + yyterminate(); + } + YY_BREAK +case 74: +YY_RULE_SETUP +#line 742 "toke.l" +ECHO; + YY_BREAK +#line 3277 "toke.c" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed sudoersin at a new source and called + * sudoerslex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = sudoersin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( sudoerswrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * sudoerstext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of user's declarations */ +} /* end of sudoerslex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + sudoersrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + sudoersrestart(sudoersin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) sudoersrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + /* "- 2" to take care of EOB's */ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + yy_state_type yy_current_state; + char *yy_cp; + + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 882 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); + + YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 882 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 881); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + sudoersrestart(sudoersin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( sudoerswrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve sudoerstext */ + (yy_hold_char) = *++(yy_c_buf_p); + + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void sudoersrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + sudoersensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + sudoers_create_buffer(sudoersin,YY_BUF_SIZE ); + } + + sudoers_init_buffer(YY_CURRENT_BUFFER,input_file ); + sudoers_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void sudoers_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * sudoerspop_buffer_state(); + * sudoerspush_buffer_state(new_buffer); + */ + sudoersensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + sudoers_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (sudoerswrap()) processing, but the only time this flag + * is looked at is after sudoerswrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void sudoers_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + sudoersin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE sudoers_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) sudoersalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in sudoers_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) sudoersalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in sudoers_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + sudoers_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with sudoers_create_buffer() + * + */ + void sudoers_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + sudoersfree((void *) b->yy_ch_buf ); + + sudoersfree((void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a sudoersrestart() or at EOF. + */ + static void sudoers_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + sudoers_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then sudoers_init_buffer was _probably_ + * called from sudoersrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void sudoers_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + sudoers_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void sudoerspush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + sudoersensure_buffer_stack(); + + /* This block is copied from sudoers_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from sudoers_switch_to_buffer. */ + sudoers_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void sudoerspop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + sudoers_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + sudoers_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void sudoersensure_buffer_stack (void) +{ + yy_size_t num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)sudoersalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in sudoersensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)sudoersrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in sudoersensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE sudoers_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) sudoersalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in sudoers_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + sudoers_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to sudoerslex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * sudoers_scan_bytes() instead. + */ +YY_BUFFER_STATE sudoers_scan_string (yyconst char * yystr ) +{ + + return sudoers_scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to sudoerslex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE sudoers_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) sudoersalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in sudoers_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = sudoers_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in sudoers_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up sudoerstext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + sudoerstext[sudoersleng] = (yy_hold_char); \ + (yy_c_buf_p) = sudoerstext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + sudoersleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int sudoersget_lineno (void) +{ + + return sudoerslineno; +} + +/** Get the input stream. + * + */ +FILE *sudoersget_in (void) +{ + return sudoersin; +} + +/** Get the output stream. + * + */ +FILE *sudoersget_out (void) +{ + return sudoersout; +} + +/** Get the length of the current token. + * + */ +yy_size_t sudoersget_leng (void) +{ + return sudoersleng; +} + +/** Get the current token. + * + */ + +char *sudoersget_text (void) +{ + return sudoerstext; +} + +/** Set the current line number. + * @param line_number + * + */ +void sudoersset_lineno (int line_number ) +{ + + sudoerslineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see sudoers_switch_to_buffer + */ +void sudoersset_in (FILE * in_str ) +{ + sudoersin = in_str ; +} + +void sudoersset_out (FILE * out_str ) +{ + sudoersout = out_str ; +} + +int sudoersget_debug (void) +{ + return sudoers_flex_debug; +} + +void sudoersset_debug (int bdebug ) +{ + sudoers_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from sudoerslex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + sudoersin = stdin; + sudoersout = stdout; +#else + sudoersin = (FILE *) 0; + sudoersout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * sudoerslex_init() + */ + return 0; +} + +/* sudoerslex_destroy is for both reentrant and non-reentrant scanners. */ +int sudoerslex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + sudoers_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + sudoerspop_buffer_state(); + } + + /* Destroy the stack itself. */ + sudoersfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * sudoerslex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *sudoersalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *sudoersrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void sudoersfree (void * ptr ) +{ + free( (char *) ptr ); /* see sudoersrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 742 "toke.l" + + +struct path_list { + SLIST_ENTRY(path_list) entries; + char *path; +}; + +SLIST_HEAD(path_list_head, path_list); + +struct include_stack { + YY_BUFFER_STATE bs; + char *path; + struct path_list_head more; /* more files in case of includedir */ + int lineno; + bool keepopen; +}; + +/* + * Compare two struct path_list structs in reverse order. + */ +static int +pl_compare(const void *v1, const void *v2) +{ + const struct path_list * const *p1 = v1; + const struct path_list * const *p2 = v2; + + return strcmp((*p2)->path, (*p1)->path); +} + +/* + * Open dirpath and fill in pathsp with an array of regular files + * that do not end in '~' or contain a '.'. + * Returns the number of files or -1 on error. + * If zero files are found, NULL is stored in pathsp. + */ +static int +read_dir_files(const char *dirpath, struct path_list ***pathsp) +{ + DIR *dir; + int i, count = 0; + int max_paths = 32; + struct dirent *dent; + struct path_list **paths = NULL; + debug_decl(read_dir_files, SUDOERS_DEBUG_PARSER) + + dir = opendir(dirpath); + if (dir == NULL) { + if (errno == ENOENT) + goto done; + sudo_warn("%s", dirpath); + goto bad; + } + paths = reallocarray(NULL, max_paths, sizeof(*paths)); + if (paths == NULL) + goto oom; + while ((dent = readdir(dir)) != NULL) { + struct path_list *pl; + struct stat sb; + size_t len; + char *path; + + /* Ignore files that end in '~' or have a '.' in them. */ + if (dent->d_name[0] == '\0' || dent->d_name[NAMLEN(dent) - 1] == '~' + || strchr(dent->d_name, '.') != NULL) { + continue; + } + len = strlen(dirpath) + 1 + NAMLEN(dent); + if ((path = rcstr_alloc(len)) == NULL) + goto oom; + (void)snprintf(path, len + 1, "%s/%s", dirpath, dent->d_name); + if (stat(path, &sb) != 0 || !S_ISREG(sb.st_mode)) { + rcstr_delref(path); + continue; + } + pl = malloc(sizeof(*pl)); + if (pl == NULL) { + rcstr_delref(path); + goto oom; + } + pl->path = path; + if (count >= max_paths) { + struct path_list **tmp; + max_paths <<= 1; + tmp = reallocarray(paths, max_paths, sizeof(*paths)); + if (tmp == NULL) { + rcstr_delref(path); + free(pl); + goto oom; + } + paths = tmp; + } + paths[count++] = pl; + } + closedir(dir); + if (count == 0) { + free(paths); + paths = NULL; + } +done: + *pathsp = paths; + debug_return_int(count); +oom: + sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory")); +bad: + sudoerserror(NULL); + if (dir != NULL) + closedir(dir); + for (i = 0; i < count; i++) { + rcstr_delref(paths[i]->path); + free(paths[i]); + } + free(paths); + debug_return_int(-1); +} + +/* + * Push a list of all files in dirpath onto stack. + * Returns the number of files or -1 on error. + */ +static int +switch_dir(struct include_stack *stack, char *dirpath) +{ + struct path_list **paths = NULL; + int count, i; + debug_decl(switch_dir, SUDOERS_DEBUG_PARSER) + + count = read_dir_files(dirpath, &paths); + if (count > 0) { + /* Sort the list as an array in reverse order. */ + qsort(paths, count, sizeof(*paths), pl_compare); + + /* Build up the list in sorted order. */ + for (i = 0; i < count; i++) { + SLIST_INSERT_HEAD(&stack->more, paths[i], entries); + } + free(paths); + } + + debug_return_int(count); +} + +#define MAX_SUDOERS_DEPTH 128 +#define SUDOERS_STACK_INCREMENT 16 + +static size_t istacksize, idepth; +static struct include_stack *istack; +static bool keepopen; + +void +init_lexer(void) +{ + struct path_list *pl; + debug_decl(init_lexer, SUDOERS_DEBUG_PARSER) + + while (idepth) { + idepth--; + while ((pl = SLIST_FIRST(&istack[idepth].more)) != NULL) { + SLIST_REMOVE_HEAD(&istack[idepth].more, entries); + rcstr_delref(pl->path); + free(pl); + } + rcstr_delref(istack[idepth].path); + if (idepth && !istack[idepth].keepopen) + fclose(istack[idepth].bs->yy_input_file); + sudoers_delete_buffer(istack[idepth].bs); + } + free(istack); + istack = NULL; + istacksize = idepth = 0; + sudolineno = 1; + keepopen = false; + sawspace = false; + continued = false; + digest_type = -1; + prev_state = INITIAL; + + debug_return; +} + +/* + * Open an include file (or file from a directory), push the old + * sudoers file buffer and switch to the new one. + * A missing or insecure include dir is simply ignored. + * Returns false on error, else true. + */ +static bool +push_include_int(char *path, bool isdir) +{ + struct path_list *pl; + FILE *fp; + debug_decl(push_include_int, SUDOERS_DEBUG_PARSER) + + /* push current state onto stack */ + if (idepth >= istacksize) { + struct include_stack *new_istack; + + if (idepth > MAX_SUDOERS_DEPTH) { + sudoerserror(N_("too many levels of includes")); + debug_return_bool(false); + } + istacksize += SUDOERS_STACK_INCREMENT; + new_istack = reallocarray(istack, istacksize, sizeof(*istack)); + if (new_istack == NULL) { + sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory")); + sudoerserror(NULL); + debug_return_bool(false); + } + istack = new_istack; + } + SLIST_INIT(&istack[idepth].more); + if (isdir) { + struct stat sb; + int count, status; + + status = sudo_secure_dir(path, sudoers_uid, sudoers_gid, &sb); + if (status != SUDO_PATH_SECURE) { + if (sudoers_warnings) { + switch (status) { + case SUDO_PATH_BAD_TYPE: + errno = ENOTDIR; + sudo_warn("%s", path); + break; + case SUDO_PATH_WRONG_OWNER: + sudo_warnx(U_("%s is owned by uid %u, should be %u"), + path, (unsigned int) sb.st_uid, + (unsigned int) sudoers_uid); + break; + case SUDO_PATH_WORLD_WRITABLE: + sudo_warnx(U_("%s is world writable"), path); + break; + case SUDO_PATH_GROUP_WRITABLE: + sudo_warnx(U_("%s is owned by gid %u, should be %u"), + path, (unsigned int) sb.st_gid, + (unsigned int) sudoers_gid); + break; + default: + break; + } + } + /* A missing or insecure include dir is not a fatal error. */ + debug_return_bool(true); + } + count = switch_dir(&istack[idepth], path); + if (count <= 0) { + /* switch_dir() called sudoerserror() for us */ + rcstr_delref(path); + debug_return_bool(count ? false : true); + } + + /* Parse the first dir entry we can open, leave the rest for later. */ + do { + rcstr_delref(path); + if ((pl = SLIST_FIRST(&istack[idepth].more)) == NULL) { + /* Unable to open any files in include dir, not an error. */ + debug_return_bool(true); + } + SLIST_REMOVE_HEAD(&istack[idepth].more, entries); + path = pl->path; + free(pl); + } while ((fp = open_sudoers(path, false, &keepopen)) == NULL); + } else { + if ((fp = open_sudoers(path, true, &keepopen)) == NULL) { + /* The error was already printed by open_sudoers() */ + sudoerserror(NULL); + debug_return_bool(false); + } + } + /* Push the old (current) file and open the new one. */ + istack[idepth].path = sudoers; /* push old path (and its ref) */ + istack[idepth].bs = YY_CURRENT_BUFFER; + istack[idepth].lineno = sudolineno; + istack[idepth].keepopen = keepopen; + idepth++; + sudolineno = 1; + sudoers = path; + sudoers_switch_to_buffer(sudoers_create_buffer(fp, YY_BUF_SIZE)); + + debug_return_bool(true); +} + +/* + * Restore the previous sudoers file and buffer, or, in the case + * of an includedir, switch to the next file in the dir. + * Returns false if there is nothing to pop, else true. + */ +static bool +pop_include(void) +{ + struct path_list *pl; + FILE *fp; + debug_decl(pop_include, SUDOERS_DEBUG_PARSER) + + if (idepth == 0 || YY_CURRENT_BUFFER == NULL) + debug_return_bool(false); + + if (!keepopen) + fclose(YY_CURRENT_BUFFER->yy_input_file); + sudoers_delete_buffer(YY_CURRENT_BUFFER); + /* If we are in an include dir, move to the next file. */ + while ((pl = SLIST_FIRST(&istack[idepth - 1].more)) != NULL) { + SLIST_REMOVE_HEAD(&istack[idepth - 1].more, entries); + fp = open_sudoers(pl->path, false, &keepopen); + if (fp != NULL) { + rcstr_delref(sudoers); + sudoers = pl->path; + sudolineno = 1; + sudoers_switch_to_buffer(sudoers_create_buffer(fp, YY_BUF_SIZE)); + free(pl); + break; + } + /* Unable to open path in include dir, go to next one. */ + rcstr_delref(pl->path); + free(pl); + } + /* If no path list, just pop the last dir on the stack. */ + if (pl == NULL) { + idepth--; + sudoers_switch_to_buffer(istack[idepth].bs); + rcstr_delref(sudoers); + sudoers = istack[idepth].path; + sudolineno = istack[idepth].lineno; + keepopen = istack[idepth].keepopen; + } + debug_return_bool(true); +} + +static char * +parse_include_int(const char *base, bool isdir) +{ + const char *cp, *ep; + char *path, *pp; + int dirlen = 0, len = 0, subst = 0; + size_t shost_len = 0; + debug_decl(parse_include, SUDOERS_DEBUG_PARSER) + + /* Pull out path from #include line. */ + cp = base + (isdir ? sizeof("#includedir") : sizeof("#include")); + while (isblank((unsigned char) *cp)) + cp++; + ep = cp; + while (*ep != '\0' && !isspace((unsigned char) *ep)) { + if (ep[0] == '%' && ep[1] == 'h') { + shost_len = strlen(user_shost); + len += shost_len - 2; + subst = 1; + } + ep++; + } + + /* Relative paths are located in the same dir as the sudoers file. */ + if (*cp != '/') { + char *dirend = strrchr(sudoers, '/'); + if (dirend != NULL) + dirlen = (int)(dirend - sudoers) + 1; + } + + /* Make a copy of the fully-qualified path and return it. */ + len += (int)(ep - cp); + path = pp = rcstr_alloc(len + dirlen); + if (path == NULL) { + sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory")); + sudoerserror(NULL); + debug_return_str(NULL); + } + if (dirlen) { + memcpy(path, sudoers, dirlen); + pp += dirlen; + } + if (subst) { + /* substitute for %h */ + while (cp < ep) { + if (cp[0] == '%' && cp[1] == 'h') { + memcpy(pp, user_shost, shost_len); + pp += shost_len; + cp += 2; + continue; + } + *pp++ = *cp++; + } + *pp = '\0'; + } else { + memcpy(pp, cp, len); + pp[len] = '\0'; + } + + /* Push any excess characters (e.g. comment, newline) back to the lexer */ + if (*ep != '\0') + yyless((int)(ep - base)); + + debug_return_str(path); +} + +#ifdef TRACELEXER +int +sudoers_trace_print(const char *msg) +{ + return fputs(msg, stderr); +} +#else +int +sudoers_trace_print(const char *msg) +{ + static bool initialized; + static struct sudo_lbuf lbuf; + + if (!initialized) { + initialized = true; + sudo_lbuf_init(&lbuf, NULL, 0, NULL, 0); + } + + sudo_lbuf_append(&lbuf, "%s", msg); + /* XXX - assumes a final newline */ + if (strchr(msg, '\n') != NULL) + { + sudo_debug_printf2(NULL, NULL, 0, SUDOERS_DEBUG_PARSER|SUDO_DEBUG_DEBUG, + "%s:%d %s", sudoers, sudolineno, lbuf.buf); + lbuf.len = 0; + } + return 0; +} +#endif /* TRACELEXER */ + |