From 1a3271fd08d95eca7a1d2caca0423f2915a85cb1 Mon Sep 17 00:00:00 2001 From: steven_q Date: Thu, 30 Dec 2021 10:00:32 +0800 Subject: [PATCH] support for build file_contexts. Signed-off-by: qichanggui Change-Id: I4068951ece880447a53b14a4fab8bfdd1b4df7b4 --- BUILD.gn | 57 +- checkpolicy/policy_scan.c | 3792 --------------------------------- checkpolicy/y.tab.c | 3854 ---------------------------------- checkpolicy/y.tab.h | 296 --- libsepol/cil/src/cil_lexer.c | 1849 ---------------- 5 files changed, 55 insertions(+), 9793 deletions(-) delete mode 100644 checkpolicy/policy_scan.c delete mode 100644 checkpolicy/y.tab.c delete mode 100644 checkpolicy/y.tab.h delete mode 100644 libsepol/cil/src/cil_lexer.c diff --git a/BUILD.gn b/BUILD.gn index d1449466..02dc6e78 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -19,6 +19,13 @@ LIBFTS_ROOT_DIR = "//third_party/FreeBSD" LIBPCRE2_ROOT_DIR = "//third_party/pcre2" ohos_shared_library("libsepol") { + exec_script("/usr/bin/flex", + [ + "-o", + rebase_path("libsepol/cil/src/cil_lexer.c"), + rebase_path("libsepol/cil/src/cil_lexer.l"), + ], + "") output_name = "libsepol" sources = [ "$LIBSEPOL_ROOT_DIR/cil/src/cil.c", @@ -199,7 +206,7 @@ ohos_shared_library("libselinux") { "-w", "-DSHARED", "-DUSE_PCRE2", - "-D__BIONIC__", + "-U__BIONIC__", "-DAUDITD_LOG_TAG=1003", ] deps = [ @@ -400,6 +407,22 @@ ohos_executable("getpidcon") { } ohos_executable("checkpolicy") { + exec_script("/usr/bin/bison", + [ + "-y", + "-d", + rebase_path("checkpolicy/policy_parse.y"), + "-o", + rebase_path("checkpolicy/y.tab.c"), + ], + "") + exec_script("/usr/bin/flex", + [ + "-o", + rebase_path("checkpolicy/policy_scan.c"), + rebase_path("checkpolicy/policy_scan.l"), + ], + "") install_enable = true sources = [ "$LIBSELINUX_ROOT_DIR/../checkpolicy/checkpolicy.c", @@ -454,9 +477,38 @@ ohos_executable("secilc") { subsystem_name = "security" } +ohos_executable("sefcontext_compile") { + install_enable = true + sources = [ "$LIBSELINUX_ROOT_DIR/utils/sefcontext_compile.c" ] + deps = [ + ":libselinux", + ":libsepol", + "$LIBPCRE2_ROOT_DIR:libpcre2", + ] + include_dirs = [ + "$LIBSELINUX_ROOT_DIR/include/selinux", + "$LIBSELINUX_ROOT_DIR/include", + "$LIBSELINUX_ROOT_DIR/src", + "$LIBPCRE2_ROOT_DIR/include", + "$LIBSEPOL_ROOT_DIR/cil/src", + "$LIBSEPOL_ROOT_DIR/src", + "$LIBSEPOL_ROOT_DIR/cil/include", + "$LIBSEPOL_ROOT_DIR/include", + ] + cflags = [ + "-D_GNU_SOURCE", + "-DUSE_PCRE2", + "-w", + ] + license_file = "$LIBSELINUX_ROOT_DIR/LICENSE" + part_name = "selinux" + subsystem_name = "security" +} + group("selinux_group") { - if (build_selinux) { + if (build_selinux && defined(product_name) && product_name == "rk3568") { deps = [ + "//base/security/selinux:build_file_contexts", "//base/security/selinux:build_sepolicy", "//base/security/selinux:config", "//base/security/selinux:file_contexts", @@ -469,6 +521,7 @@ group("selinux_group") { "//third_party/selinux:getfilecon", "//third_party/selinux:getpidcon", "//third_party/selinux:secilc($host_toolchain)", + "//third_party/selinux:sefcontext_compile($host_toolchain)", "//third_party/selinux:selinux_check_access", "//third_party/selinux:selinuxexeccon", "//third_party/selinux:setenforce", diff --git a/checkpolicy/policy_scan.c b/checkpolicy/policy_scan.c deleted file mode 100644 index e1eadcda..00000000 --- a/checkpolicy/policy_scan.c +++ /dev/null @@ -1,3792 +0,0 @@ -#line 2 "checkpolicy/policy_scan.c" - -#line 4 "checkpolicy/policy_scan.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 -#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 -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . 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 -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 */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#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 yyrestart(yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#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 int yyleng; - -extern FILE *yyin, *yyout; - -#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 yytext. */ \ - yy_size_t 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 yytext 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. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int 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 yyrestart()), so that the user can continue scanning by - * just pointing yyin 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 = NULL; /**< 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 yytext is formed. */ -static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = NULL; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart (FILE *input_file ); -void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); -void yy_delete_buffer (YY_BUFFER_STATE b ); -void yy_flush_buffer (YY_BUFFER_STATE b ); -void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); -void yypop_buffer_state (void ); - -static void yyensure_buffer_stack (void ); -static void yy_load_buffer_state (void ); -static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); - -void *yyalloc (yy_size_t ); -void *yyrealloc (void *,yy_size_t ); -void yyfree (void * ); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - yy_create_buffer(yyin,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 yywrap() (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -FILE *yyin = NULL, *yyout = NULL; - -typedef int yy_state_type; - -extern int yylineno; - -int yylineno = 1; - -extern char yytext[]; - -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 yynoreturn yy_fatal_error (yyconst char* msg ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - if ( yyleng >= YYLMAX ) \ - YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ - yy_flex_strncpy( yytext, (yytext_ptr), yyleng + 1 ); \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 230 -#define YY_END_OF_BUFFER 231 -/* 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[1154] = - { 0, - 0, 0, 231, 229, 209, 1, 214, 229, 208, 229, - 219, 220, 228, 216, 224, 225, 197, 201, 201, 217, - 218, 229, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 223, 226, 215, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 221, 229, 222, 227, - 209, 1, 211, 0, 0, 208, 208, 212, 197, 205, - 201, 0, 202, 202, 202, 0, 204, 210, 200, 0, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - - 200, 200, 200, 200, 110, 200, 200, 200, 200, 200, - 200, 174, 176, 200, 200, 38, 200, 200, 170, 172, - 200, 200, 200, 200, 200, 200, 200, 101, 200, 200, - 200, 200, 152, 154, 156, 200, 200, 200, 200, 200, - 200, 200, 164, 166, 168, 200, 200, 200, 200, 158, - 160, 162, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 109, 200, 200, 200, - 200, 200, 173, 175, 200, 200, 39, 200, 200, 169, - 171, 200, 200, 200, 200, 200, 200, 200, 102, 200, - 200, 200, 200, 151, 153, 155, 200, 200, 200, 200, - - 200, 200, 200, 163, 165, 167, 200, 200, 200, 200, - 157, 159, 161, 200, 200, 200, 213, 199, 0, 198, - 208, 205, 205, 201, 202, 202, 202, 202, 202, 201, - 201, 0, 204, 200, 200, 200, 200, 200, 103, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 116, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 194, 200, 200, 200, - 200, 200, 105, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 14, 200, 200, 200, 200, 200, - 200, 200, 108, 200, 200, 104, 200, 200, 200, 200, - - 200, 200, 200, 200, 200, 200, 115, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 193, 200, 200, 200, 200, 200, 106, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 15, 200, 200, 200, 200, 200, 200, 200, 107, - 208, 205, 205, 201, 202, 202, 202, 0, 200, 200, - 200, 200, 200, 200, 34, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 40, 200, 200, 200, 200, - 200, 200, 192, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - - 200, 200, 200, 200, 200, 16, 200, 200, 200, 200, - 112, 200, 32, 72, 200, 200, 200, 200, 200, 35, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 41, 200, 200, 200, 200, 200, 200, 191, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 17, 200, 200, 200, 200, 111, 200, 33, 73, 200, - 208, 205, 205, 205, 201, 0, 42, 76, 200, 200, - 200, 6, 2, 200, 200, 200, 200, 118, 200, 200, - 200, 114, 122, 200, 200, 200, 200, 200, 200, 200, - - 200, 200, 64, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 66, 200, 200, 18, - 200, 200, 200, 200, 200, 200, 200, 200, 24, 200, - 200, 43, 77, 200, 200, 200, 7, 3, 200, 200, - 200, 200, 117, 200, 200, 200, 113, 200, 121, 200, - 200, 200, 200, 200, 200, 200, 200, 65, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 67, 200, 200, 200, 19, 200, 200, 200, 200, - 200, 200, 200, 200, 25, 200, 208, 205, 205, 200, - 200, 200, 200, 200, 4, 200, 200, 200, 200, 200, - - 200, 200, 200, 196, 200, 200, 119, 200, 200, 200, - 200, 200, 200, 98, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 92, - 94, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 5, 200, 200, 200, 200, 200, - 200, 200, 200, 195, 200, 200, 120, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 93, 95, - 200, 200, 200, 200, 200, 200, 200, 200, 207, 207, - 203, 205, 200, 200, 200, 200, 200, 200, 200, 200, - - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 132, 200, 200, 200, 134, - 200, 128, 200, 99, 200, 200, 200, 200, 36, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 131, - 200, 200, 200, 133, 200, 127, 200, 200, 200, 200, - 200, 37, 200, 200, 200, 200, 200, 200, 200, 208, - 203, 200, 200, 200, 200, 62, 200, 200, 200, 200, - 200, 200, 200, 200, 150, 200, 200, 12, 136, 200, - - 190, 200, 200, 130, 200, 100, 200, 200, 200, 200, - 200, 200, 96, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 63, 200, 200, 200, 200, - 200, 200, 200, 200, 149, 200, 200, 13, 135, 200, - 189, 200, 200, 129, 200, 200, 200, 200, 200, 200, - 200, 97, 200, 200, 200, 200, 200, 200, 200, 200, - 208, 203, 200, 44, 200, 80, 8, 200, 200, 200, - 200, 60, 82, 200, 200, 200, 200, 200, 124, 138, - 200, 200, 200, 200, 200, 178, 200, 200, 200, 200, - 26, 200, 200, 200, 200, 200, 200, 200, 45, 200, - - 81, 9, 200, 200, 200, 200, 61, 83, 200, 200, - 200, 200, 200, 123, 137, 200, 200, 200, 200, 200, - 177, 200, 200, 200, 200, 200, 200, 200, 27, 200, - 200, 200, 208, 206, 84, 200, 78, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - 74, 200, 180, 200, 200, 200, 200, 200, 30, 200, - 200, 200, 200, 85, 200, 79, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 75, - 200, 179, 200, 200, 200, 200, 200, 200, 200, 200, - 31, 200, 200, 200, 200, 200, 200, 200, 200, 200, - - 200, 146, 200, 200, 200, 200, 200, 200, 200, 200, - 200, 200, 58, 200, 52, 50, 200, 200, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 145, 200, 200, - 200, 200, 200, 200, 200, 200, 200, 200, 59, 53, - 51, 200, 200, 200, 200, 200, 200, 184, 186, 182, - 200, 200, 200, 148, 144, 126, 68, 200, 200, 140, - 200, 200, 200, 200, 200, 200, 200, 200, 200, 183, - 185, 181, 200, 200, 200, 147, 143, 125, 69, 200, - 200, 139, 200, 200, 200, 200, 200, 200, 200, 200, - 188, 142, 200, 200, 200, 200, 200, 20, 200, 28, - - 200, 10, 200, 200, 187, 141, 200, 200, 200, 200, - 200, 200, 21, 200, 29, 11, 22, 200, 88, 200, - 200, 200, 200, 200, 200, 23, 200, 89, 200, 200, - 200, 200, 200, 200, 86, 46, 200, 90, 200, 54, - 48, 87, 47, 200, 91, 200, 55, 49, 70, 56, - 71, 57, 0 - } ; - -static yyconst YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 2, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 5, 6, 7, 8, 1, 1, 9, 1, 10, - 11, 12, 1, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 21, 21, 21, 21, 21, 22, 23, 1, - 24, 1, 1, 1, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 34, - 50, 1, 51, 52, 53, 1, 54, 55, 56, 57, - - 58, 59, 60, 61, 62, 34, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 34, 78, 79, 80, 81, 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 YY_CHAR yy_meta[82] = - { 0, - 1, 2, 3, 2, 2, 1, 4, 1, 1, 1, - 1, 1, 1, 5, 6, 1, 7, 7, 7, 7, - 7, 8, 1, 1, 7, 7, 7, 7, 7, 7, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, - 1, 1, 10, 7, 7, 7, 7, 7, 7, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 1, 1, 1, - 1 - } ; - -static yyconst flex_uint16_t yy_base[1170] = - { 0, - 0, 0, 2868, 3495, 80, 0, 2839, 2820, 2740, 2787, - 3495, 3495, 3495, 3495, 3495, 3495, 0, 71, 133, 2754, - 3495, 2744, 179, 66, 70, 95, 128, 232, 261, 138, - 106, 58, 274, 83, 84, 139, 233, 303, 275, 311, - 315, 238, 141, 3495, 3495, 3495, 305, 319, 329, 343, - 353, 364, 356, 376, 375, 397, 339, 392, 395, 410, - 425, 420, 466, 433, 149, 229, 3495, 2605, 3495, 3495, - 116, 0, 3495, 100, 2649, 0, 2564, 3495, 0, 479, - 527, 2544, 570, 488, 613, 2529, 0, 3495, 2525, 0, - 656, 0, 166, 265, 309, 396, 452, 273, 2438, 323, - - 485, 119, 488, 498, 235, 431, 2393, 506, 325, 465, - 502, 482, 483, 501, 522, 531, 534, 535, 540, 544, - 565, 573, 574, 576, 577, 608, 578, 579, 617, 618, - 619, 620, 622, 628, 630, 651, 659, 661, 662, 665, - 680, 688, 689, 690, 691, 692, 693, 694, 706, 707, - 708, 711, 712, 716, 720, 721, 722, 724, 725, 730, - 2278, 734, 738, 325, 740, 736, 735, 744, 2222, 739, - 748, 758, 757, 762, 773, 779, 781, 782, 787, 790, - 791, 792, 793, 796, 805, 806, 815, 810, 795, 821, - 820, 824, 825, 829, 834, 835, 840, 845, 848, 850, - - 856, 862, 864, 867, 868, 872, 873, 881, 882, 884, - 887, 892, 895, 897, 896, 898, 3495, 3495, 2277, 3495, - 2215, 0, 921, 952, 995, 0, 0, 944, 966, 0, - 0, 2099, 0, 2105, 1038, 0, 920, 960, 915, 917, - 961, 921, 938, 962, 964, 990, 999, 2084, 1000, 1005, - 1001, 1003, 1044, 1041, 1042, 214, 1046, 1011, 1054, 1062, - 1070, 1072, 1043, 1073, 1074, 1078, 1090, 1088, 1087, 1089, - 1091, 1092, 1100, 1102, 1111, 1108, 1112, 1113, 1114, 1123, - 1126, 1127, 1128, 1131, 1132, 1136, 1144, 1140, 1141, 1150, - 1152, 1154, 1153, 1155, 1156, 1164, 1166, 1167, 1168, 1169, - - 1170, 1172, 1178, 1181, 1988, 1182, 1184, 1183, 1192, 1186, - 1195, 68, 1197, 1201, 1206, 1218, 1220, 1222, 1232, 1233, - 1236, 1238, 1242, 1259, 1246, 1248, 1247, 1260, 1261, 1251, - 1272, 1274, 1275, 1277, 1286, 1278, 1287, 1288, 1296, 1297, - 1299, 1300, 1301, 1309, 1315, 1313, 1323, 1324, 1327, 1328, - 1982, 1357, 1365, 1378, 1384, 1390, 1396, 1956, 1336, 1397, - 1391, 1392, 1396, 1394, 1395, 1406, 1407, 1411, 1412, 1416, - 1427, 1417, 1425, 1426, 1440, 1430, 1439, 1442, 1444, 404, - 1450, 1452, 1454, 1456, 1458, 1462, 1460, 1471, 1474, 1475, - 292, 1476, 1484, 1485, 1488, 1490, 1498, 1494, 1493, 1502, - - 1510, 1513, 1514, 1515, 1519, 1528, 1518, 1529, 1532, 1531, - 1537, 1543, 1549, 1541, 1554, 1551, 1555, 1557, 1559, 1560, - 1565, 1568, 1569, 1570, 1571, 1581, 1579, 1580, 1582, 1584, - 1585, 1597, 1600, 311, 1605, 1611, 1613, 1615, 1616, 1617, - 1626, 1630, 1631, 1632, 1640, 122, 1636, 1641, 1645, 1649, - 1651, 1654, 1663, 1665, 1669, 1677, 1678, 1682, 1683, 1686, - 1691, 1688, 1696, 1699, 1707, 1710, 1711, 1720, 1721, 1723, - 1929, 1764, 1913, 0, 1775, 1842, 1724, 1740, 1741, 1773, - 1771, 1735, 1770, 1775, 1776, 1779, 1785, 1787, 1795, 1790, - 1800, 1796, 1798, 88, 1810, 1804, 1809, 1812, 1814, 1822, - - 1830, 1824, 1827, 357, 1833, 1836, 1838, 1846, 1851, 1849, - 1841, 1854, 1855, 1857, 1863, 1865, 1866, 1874, 1877, 1878, - 392, 1879, 1882, 1888, 1891, 1894, 1896, 1900, 1902, 1918, - 1912, 1913, 1914, 1915, 1917, 1918, 1923, 1927, 1928, 1929, - 1931, 1939, 1937, 1947, 1943, 1948, 1951, 128, 1952, 1953, - 1957, 1962, 1967, 1971, 1975, 1977, 1979, 1981, 169, 1989, - 1985, 1990, 1991, 1999, 1993, 1995, 2005, 2007, 2009, 2021, - 2023, 2027, 2029, 351, 2033, 2035, 2037, 2038, 2039, 2041, - 2052, 2031, 2053, 2055, 2056, 2057, 2109, 2114, 2121, 2066, - 2078, 2065, 2083, 2108, 2116, 2118, 2117, 2119, 2120, 2131, - - 2137, 422, 2135, 2136, 2139, 2150, 2140, 2151, 2152, 2156, - 442, 2153, 2161, 2164, 2169, 2170, 2173, 2178, 2183, 2181, - 2184, 2194, 2189, 534, 2197, 2199, 474, 2200, 2205, 2203, - 2208, 2211, 2213, 2216, 2219, 461, 398, 498, 2221, 2222, - 2225, 2227, 2230, 2233, 2238, 2239, 2241, 2242, 2243, 2244, - 2253, 476, 2256, 2247, 2258, 2266, 2268, 2270, 2276, 2279, - 310, 2281, 2282, 2290, 2291, 2292, 2295, 2300, 2301, 2303, - 2304, 2305, 443, 2309, 215, 2317, 2318, 2330, 2327, 2332, - 2341, 604, 269, 766, 2344, 2345, 2346, 2349, 2376, 2383, - 2390, 1832, 2350, 2354, 2355, 2376, 2384, 2389, 2387, 2395, - - 2399, 2403, 2398, 1649, 2409, 2412, 2414, 2415, 2423, 2426, - 664, 2420, 2438, 2434, 2439, 2440, 2442, 2450, 2451, 2452, - 2460, 2454, 535, 2462, 2463, 774, 2464, 2465, 2466, 2478, - 2468, 2479, 775, 258, 815, 2480, 2483, 2484, 2489, 2492, - 2493, 2495, 2494, 2497, 2498, 2503, 2506, 630, 2507, 2509, - 2508, 2519, 2523, 2532, 678, 2533, 2535, 2545, 2548, 2547, - 2551, 2557, 2559, 2562, 2565, 2567, 860, 564, 2568, 2571, - 2573, 2581, 989, 690, 1031, 2589, 2587, 2593, 2591, 1815, - 2613, 2606, 2608, 2616, 2617, 2622, 2625, 2625, 2635, 2636, - 2639, 2644, 2635, 1238, 2645, 2649, 2653, 2650, 2658, 2661, - - 1763, 2666, 2667, 2669, 2671, 2675, 2677, 2680, 2683, 1442, - 2685, 578, 2686, 2691, 2696, 2700, 2702, 920, 833, 980, - 2699, 2705, 2708, 2711, 2713, 2716, 2717, 2686, 2719, 2721, - 2725, 2731, 1827, 1033, 2733, 2734, 2735, 2736, 2744, 2745, - 1748, 2753, 2755, 2756, 2757, 2758, 2759, 2769, 1097, 1277, - 2778, 2779, 2781, 1324, 892, 1326, 2783, 2784, 2792, 2789, - 1681, 0, 2793, 2798, 2803, 2802, 2806, 2830, 331, 830, - 2812, 2823, 2824, 2828, 960, 1664, 1045, 2829, 2837, 2838, - 2846, 2847, 2848, 2851, 2850, 2852, 1210, 2863, 1513, 2861, - 2864, 2872, 2867, 961, 1059, 1613, 2873, 2875, 2877, 2878, - - 2883, 2887, 1312, 69, 1297, 2888, 2889, 2891, 2892, 1561, - 1244, 1714, 2893, 2897, 2902, 2903, 2905, 2906, 2907, 2908, - 2916, 2017, 1701, 2918, 2919, 1727, 986, 1890, 2922, 2932, - 2935, 2940, 1677, 1617, 2936, 689, 2946, 1219, 1753, 1347, - 1722, 2956, 2950, 2960, 455, 1954, 1201, 2959, 2968, 2971, - 2973, 2976, 2982, 1711, 2984, 2039, 2987, 2988, 2990, 1788, - 1608, 2085, 3002, 2996, 2100, 2999, 2285, 2189, 2089, 1443, - 3001, 3005, 3010, 1407, 2349, 1837, 3011, 3014, 3013, 3015, - 3016, 3019, 2535, 2169, 3024, 3025, 2372, 2647, 2785, 3027, - 3029, 3030, 890, 3041, 2442, 2186, 2431, 2109, 3050, 3033, - - 3038, 1597, 2593, 2784, 3056, 3067, 3051, 3070, 3075, 2829, - 3072, 2570, 3078, 3083, 1530, 1521, 2955, 3086, 2281, 3089, - 1829, 2945, 3073, 2944, 3092, 3094, 3100, 1491, 2557, 3067, - 3097, 3103, 3105, 3106, 3109, 3078, 2567, 3114, 3115, 1480, - 1376, 3075, 3117, 3125, 1987, 3120, 2531, 1373, 1278, 1266, - 3129, 3137, 3135, 1118, 1115, 3147, 3149, 3152, 3161, 3163, - 3157, 3164, 2941, 3166, 3172, 3167, 2301, 3175, 3102, 1047, - 1046, 884, 3177, 3178, 3179, 873, 763, 3180, 3183, 3188, - 3189, 3191, 3167, 3169, 3192, 3183, 3193, 3194, 2534, 3213, - 692, 3205, 3217, 3227, 3232, 3230, 3211, 3231, 2969, 3233, - - 3225, 3241, 3217, 3244, 648, 3245, 3247, 3249, 3250, 3253, - 3222, 2609, 3258, 3053, 3259, 3261, 559, 3262, 3264, 3267, - 3272, 3280, 3287, 3277, 3290, 553, 3277, 3282, 3291, 3293, - 3295, 3304, 2736, 3292, 3296, 3301, 3304, 3305, 3323, 550, - 433, 3307, 3310, 3315, 3316, 3333, 361, 246, 3321, 167, - 3326, 123, 3495, 3399, 3409, 3419, 3429, 3434, 3437, 3445, - 3450, 3454, 3457, 3460, 3464, 3470, 3474, 3476, 3484 - } ; - -static yyconst flex_int16_t yy_def[1170] = - { 0, - 1153, 1, 1153, 1153, 1153, 1154, 1153, 1155, 1156, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1157, 1158, 1158, 1159, - 1153, 1153, 1153, 23, 23, 23, 23, 23, 23, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 1153, 1153, 1153, 23, 23, 23, 23, - 23, 23, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 1153, 1153, 1153, 1153, - 1153, 1154, 1153, 1155, 1160, 1156, 1156, 1153, 1157, 1161, - 19, 1159, 1162, 1162, 1162, 1163, 1164, 1153, 1165, 1166, - 29, 91, 29, 29, 29, 29, 29, 29, 91, 29, - - 29, 91, 29, 29, 29, 29, 91, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 91, 29, 29, 91, 29, 29, 29, 29, 91, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 1153, 1153, 1160, 1153, - 1156, 1161, 1161, 19, 1162, 225, 225, 1162, 1162, 85, - 85, 1167, 1164, 1166, 91, 235, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 235, 29, 29, - 29, 29, 29, 29, 29, 1165, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - - 29, 29, 29, 29, 235, 29, 29, 29, 29, 29, - 29, 1165, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 1156, 1161, 1161, 1158, 1162, 1162, 1162, 1168, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 1165, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 1165, 29, 29, 29, 29, 29, 29, 29, 29, 29, - - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 1165, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 1165, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 1156, 1161, 1161, 1161, 1158, 1153, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 1165, 29, 29, 29, 29, 29, 29, - - 29, 29, 29, 1165, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 1165, 29, 29, 29, 29, 29, 29, 29, 29, 1165, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 1165, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 1165, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 1165, 29, 29, 29, 29, 29, 29, - 29, 1165, 29, 29, 29, 29, 1156, 1161, 1161, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - - 29, 1165, 29, 29, 29, 29, 29, 29, 29, 29, - 1165, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 29, 1165, 29, 29, 1165, 29, 29, 29, - 29, 29, 29, 29, 29, 1165, 1165, 1165, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 1165, 29, 29, 29, 29, 29, 29, 29, 29, - 1165, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 1165, 29, 1165, 29, 29, 29, 29, 29, - 29, 1165, 1165, 1165, 29, 29, 29, 29, 1156, 1156, - 1161, 1161, 29, 29, 29, 29, 29, 29, 29, 29, - - 29, 29, 29, 1165, 29, 29, 29, 29, 29, 29, - 1165, 29, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 29, 1165, 29, 29, 1165, 29, 29, 29, 29, - 29, 29, 1165, 1165, 1165, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 29, 1165, 29, 29, - 29, 29, 29, 29, 1165, 29, 29, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 1165, 1165, 29, 29, - 29, 29, 1165, 1165, 1165, 29, 29, 29, 29, 1156, - 1161, 29, 29, 29, 29, 29, 29, 1165, 29, 29, - 29, 29, 1165, 1165, 29, 29, 29, 29, 29, 29, - - 1165, 29, 29, 29, 29, 29, 29, 29, 29, 1165, - 29, 1165, 29, 29, 29, 29, 29, 1165, 1165, 1165, - 29, 29, 29, 29, 29, 29, 29, 1165, 29, 29, - 29, 29, 1165, 1165, 29, 29, 29, 29, 29, 29, - 1165, 29, 29, 29, 29, 29, 29, 29, 1165, 1165, - 29, 29, 29, 1165, 1165, 1165, 29, 29, 29, 29, - 1169, 1161, 29, 29, 29, 29, 29, 1165, 1165, 1165, - 29, 29, 29, 29, 1165, 1165, 1165, 29, 29, 29, - 29, 29, 29, 29, 29, 29, 1165, 29, 1165, 29, - 29, 29, 29, 1165, 1165, 1165, 29, 29, 29, 29, - - 29, 29, 1165, 1165, 1165, 29, 29, 29, 29, 1165, - 1165, 1165, 29, 29, 29, 29, 29, 29, 29, 29, - 29, 1165, 1165, 29, 29, 1165, 1165, 1165, 29, 29, - 29, 29, 1169, 1169, 29, 1165, 29, 1165, 1165, 1165, - 1165, 29, 29, 29, 1165, 1165, 1165, 29, 29, 29, - 29, 29, 29, 1165, 29, 1165, 29, 29, 29, 1165, - 1165, 1165, 29, 29, 1165, 29, 1165, 1165, 1165, 1165, - 29, 29, 29, 1165, 1165, 1165, 29, 29, 29, 29, - 29, 29, 1165, 1165, 29, 29, 1165, 1165, 1165, 29, - 29, 29, 1165, 29, 1165, 1165, 1165, 1165, 29, 29, - - 29, 1165, 1165, 1165, 29, 29, 29, 29, 29, 1165, - 29, 1165, 29, 29, 1165, 1165, 1165, 29, 1165, 29, - 1165, 1165, 1165, 1165, 29, 29, 29, 1165, 1165, 1165, - 29, 29, 29, 29, 29, 1165, 1165, 29, 29, 1165, - 1165, 1165, 29, 29, 1165, 29, 1165, 1165, 1165, 1165, - 29, 29, 29, 1165, 1165, 29, 29, 29, 29, 29, - 1165, 29, 1165, 29, 1165, 29, 1165, 29, 1165, 1165, - 1165, 1165, 29, 29, 29, 1165, 1165, 29, 29, 29, - 29, 29, 1165, 1165, 29, 1165, 29, 29, 1165, 29, - 1165, 29, 29, 29, 29, 29, 1165, 29, 1165, 29, - - 1165, 29, 1165, 29, 1165, 29, 29, 29, 29, 29, - 1165, 1165, 29, 1165, 29, 29, 1165, 29, 29, 29, - 29, 29, 1165, 1165, 1165, 1165, 29, 29, 29, 29, - 29, 1165, 1165, 1165, 29, 29, 29, 29, 1165, 1165, - 1165, 29, 29, 29, 29, 1165, 1165, 1165, 29, 1165, - 29, 1165, 0, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153 - } ; - -static yyconst flex_uint16_t yy_nxt[3577] = - { 0, - 4, 5, 6, 4, 5, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 19, 19, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 32, 33, 34, 35, 36, 37, - 32, 38, 39, 40, 41, 42, 32, 43, 32, 44, - 45, 46, 4, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 32, 56, 57, 58, 59, 60, 32, 61, - 62, 63, 64, 65, 32, 66, 32, 67, 68, 69, - 70, 71, 90, 90, 71, 80, 93, 81, 81, 81, - 81, 81, 82, 93, 99, 83, 83, 83, 83, 83, - - 83, 93, 90, 93, 98, 100, 218, 93, 101, 93, - 93, 93, 125, 93, 93, 1153, 602, 71, 123, 93, - 71, 124, 126, 102, 83, 83, 83, 83, 83, 83, - 93, 115, 93, 103, 93, 116, 90, 90, 93, 93, - 434, 93, 90, 117, 118, 969, 85, 80, 248, 81, - 81, 81, 81, 81, 82, 112, 113, 83, 83, 83, - 83, 83, 83, 104, 249, 93, 93, 93, 105, 93, - 114, 93, 93, 93, 93, 106, 93, 93, 127, 155, - 128, 90, 559, 90, 93, 652, 83, 83, 83, 83, - 83, 83, 89, 90, 93, 91, 91, 91, 91, 91, - - 82, 93, 215, 92, 92, 92, 92, 92, 92, 93, - 93, 93, 93, 93, 94, 93, 95, 93, 93, 93, - 93, 93, 96, 97, 93, 93, 93, 93, 90, 90, - 661, 89, 92, 92, 92, 92, 92, 92, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 107, 93, 380, 129, - 90, 130, 154, 93, 93, 131, 93, 93, 93, 93, - 93, 132, 90, 93, 108, 93, 93, 109, 109, 109, - 109, 109, 1153, 90, 768, 93, 93, 93, 93, 110, - 93, 119, 120, 93, 819, 216, 111, 237, 93, 139, - - 238, 93, 121, 140, 93, 93, 90, 141, 93, 93, - 93, 242, 122, 142, 93, 93, 93, 93, 93, 93, - 133, 134, 135, 504, 90, 90, 774, 136, 143, 144, - 145, 137, 150, 151, 152, 146, 239, 93, 93, 93, - 93, 138, 93, 93, 93, 90, 93, 244, 93, 93, - 93, 93, 147, 93, 93, 148, 93, 153, 93, 149, - 93, 245, 93, 93, 93, 90, 93, 93, 156, 755, - 157, 90, 93, 93, 93, 90, 158, 159, 93, 940, - 93, 548, 161, 305, 93, 160, 93, 93, 93, 611, - 93, 93, 162, 173, 174, 163, 93, 93, 306, 93, - - 164, 93, 184, 93, 93, 185, 90, 93, 93, 165, - 93, 93, 90, 171, 180, 181, 166, 169, 90, 172, - 93, 167, 675, 93, 93, 93, 734, 93, 168, 176, - 93, 93, 93, 177, 170, 627, 90, 175, 93, 240, - 178, 179, 194, 195, 196, 93, 494, 90, 93, 186, - 211, 212, 213, 93, 182, 93, 90, 90, 187, 93, - 93, 93, 188, 183, 189, 190, 93, 191, 93, 90, - 253, 192, 711, 200, 704, 90, 193, 201, 197, 241, - 93, 202, 198, 204, 205, 206, 203, 93, 90, 1002, - 90, 199, 733, 93, 93, 223, 223, 223, 223, 223, - - 93, 93, 257, 214, 229, 229, 229, 229, 229, 1153, - 93, 93, 90, 93, 767, 726, 93, 93, 93, 207, - 93, 246, 247, 93, 250, 251, 93, 258, 748, 93, - 93, 259, 255, 93, 93, 208, 93, 93, 209, 735, - 252, 93, 210, 224, 224, 224, 224, 224, 90, 90, - 260, 225, 225, 225, 225, 225, 225, 93, 256, 93, - 262, 261, 93, 93, 90, 263, 93, 90, 93, 93, - 93, 264, 93, 90, 265, 93, 810, 723, 90, 93, - 225, 225, 225, 225, 225, 225, 226, 226, 226, 226, - 226, 82, 90, 93, 227, 227, 227, 227, 227, 227, - - 93, 93, 93, 269, 93, 93, 93, 93, 93, 93, - 266, 93, 93, 93, 93, 889, 268, 850, 90, 267, - 270, 274, 271, 227, 227, 227, 227, 227, 227, 230, - 230, 230, 230, 230, 1153, 272, 93, 231, 231, 231, - 231, 231, 231, 93, 90, 93, 93, 93, 93, 275, - 93, 273, 93, 93, 93, 278, 93, 93, 93, 276, - 277, 279, 90, 93, 773, 93, 231, 231, 231, 231, - 231, 231, 235, 235, 235, 235, 235, 82, 90, 93, - 236, 236, 236, 236, 236, 236, 93, 93, 280, 93, - 93, 93, 90, 93, 93, 801, 282, 93, 283, 281, - - 93, 833, 284, 90, 90, 834, 90, 285, 93, 236, - 236, 236, 236, 236, 236, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 993, 289, 286, 287, 93, 93, 93, 288, 841, 93, - 291, 93, 93, 93, 93, 290, 93, 93, 93, 93, - 93, 292, 93, 93, 855, 93, 93, 93, 93, 93, - 93, 293, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 90, 296, 93, - 90, 298, 294, 93, 295, 93, 93, 301, 90, 90, - 93, 312, 93, 93, 313, 297, 299, 93, 812, 818, - - 302, 93, 303, 304, 307, 308, 309, 93, 93, 93, - 93, 310, 315, 314, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 90, - 93, 93, 316, 93, 93, 775, 317, 319, 93, 820, - 93, 93, 320, 93, 90, 93, 318, 90, 93, 93, - 93, 321, 93, 93, 322, 93, 93, 93, 895, 93, - 93, 326, 93, 93, 93, 323, 325, 324, 93, 93, - 93, 329, 941, 93, 90, 93, 93, 327, 93, 328, - 93, 331, 332, 93, 93, 93, 330, 90, 335, 333, - 93, 93, 93, 334, 336, 93, 93, 93, 90, 93, - - 93, 93, 93, 93, 90, 337, 90, 93, 93, 93, - 93, 339, 93, 338, 340, 93, 93, 93, 342, 93, - 93, 341, 93, 93, 93, 93, 93, 93, 1045, 849, - 93, 93, 93, 93, 90, 352, 343, 353, 353, 353, - 353, 353, 344, 93, 361, 93, 927, 346, 93, 93, - 93, 347, 93, 345, 348, 93, 365, 894, 363, 349, - 229, 229, 229, 229, 229, 1153, 366, 350, 354, 354, - 354, 354, 354, 93, 90, 90, 355, 355, 355, 355, - 355, 355, 229, 229, 229, 229, 229, 1153, 93, 93, - 93, 960, 93, 364, 90, 93, 93, 93, 362, 93, - - 90, 368, 945, 90, 367, 355, 355, 355, 355, 355, - 355, 356, 356, 356, 356, 356, 82, 896, 93, 357, - 357, 357, 357, 357, 357, 93, 369, 93, 93, 93, - 373, 376, 372, 93, 93, 93, 93, 374, 93, 93, - 93, 370, 854, 988, 375, 90, 382, 90, 357, 357, - 357, 357, 357, 357, 359, 359, 359, 359, 359, 90, - 90, 90, 360, 360, 360, 360, 360, 360, 377, 93, - 93, 387, 93, 90, 93, 381, 93, 93, 93, 93, - 379, 93, 93, 378, 856, 383, 912, 961, 947, 93, - 93, 360, 360, 360, 360, 360, 360, 93, 93, 384, - - 93, 388, 93, 391, 385, 93, 390, 93, 93, 93, - 386, 90, 389, 93, 392, 93, 93, 93, 93, 396, - 397, 395, 93, 93, 93, 93, 93, 93, 93, 90, - 93, 394, 90, 393, 398, 93, 93, 93, 399, 93, - 93, 93, 93, 93, 400, 402, 93, 93, 93, 93, - 922, 93, 401, 404, 93, 406, 407, 403, 93, 93, - 93, 93, 93, 93, 93, 412, 93, 93, 411, 93, - 405, 93, 93, 408, 410, 93, 93, 409, 413, 93, - 93, 93, 93, 93, 93, 93, 415, 93, 93, 93, - 93, 93, 93, 414, 93, 93, 93, 93, 93, 93, - - 93, 93, 93, 93, 93, 93, 93, 93, 416, 93, - 93, 93, 93, 93, 93, 90, 93, 93, 93, 93, - 93, 93, 417, 93, 90, 93, 421, 93, 419, 93, - 93, 420, 93, 90, 93, 418, 93, 423, 428, 432, - 422, 93, 424, 427, 1004, 429, 93, 954, 93, 431, - 93, 425, 90, 93, 430, 93, 995, 93, 90, 436, - 93, 93, 877, 435, 93, 433, 93, 93, 93, 437, - 93, 93, 446, 93, 93, 93, 93, 93, 438, 93, - 90, 93, 93, 93, 440, 439, 93, 93, 93, 93, - 442, 90, 90, 443, 93, 93, 93, 975, 441, 445, - - 93, 447, 93, 93, 444, 93, 93, 93, 450, 93, - 93, 90, 93, 93, 93, 93, 93, 451, 452, 448, - 449, 93, 93, 93, 93, 93, 90, 93, 93, 93, - 454, 93, 93, 453, 93, 93, 93, 93, 90, 455, - 90, 93, 923, 93, 93, 456, 459, 457, 93, 458, - 93, 93, 93, 461, 462, 93, 93, 82, 93, 93, - 460, 90, 93, 93, 93, 967, 467, 970, 465, 463, - 464, 93, 466, 472, 472, 472, 472, 472, 968, 352, - 468, 473, 473, 473, 473, 473, 997, 90, 470, 926, - 90, 928, 474, 469, 475, 475, 475, 475, 475, 82, - - 229, 229, 229, 229, 229, 82, 229, 229, 229, 229, - 229, 82, 229, 229, 229, 229, 229, 82, 82, 93, - 93, 90, 93, 93, 93, 93, 93, 93, 479, 93, - 93, 93, 93, 477, 93, 93, 481, 480, 478, 483, - 93, 93, 93, 487, 93, 93, 93, 93, 82, 482, - 484, 93, 93, 93, 93, 93, 90, 90, 93, 485, - 93, 93, 93, 489, 490, 93, 887, 93, 93, 1028, - 492, 486, 93, 488, 93, 93, 491, 93, 93, 93, - 93, 493, 93, 497, 93, 93, 498, 93, 93, 93, - 93, 93, 495, 93, 90, 93, 496, 93, 499, 93, - - 1024, 500, 93, 93, 93, 90, 93, 501, 506, 93, - 503, 93, 93, 93, 505, 502, 93, 508, 93, 93, - 507, 512, 93, 93, 510, 93, 93, 90, 93, 93, - 93, 509, 511, 93, 513, 90, 514, 93, 93, 515, - 516, 93, 93, 517, 90, 93, 93, 93, 93, 93, - 93, 518, 519, 93, 93, 956, 93, 93, 524, 525, - 93, 523, 522, 93, 93, 93, 93, 93, 526, 93, - 520, 93, 93, 527, 528, 90, 93, 93, 93, 93, - 521, 531, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 529, 93, 93, 93, 93, 93, 93, 93, 93, - - 93, 530, 82, 93, 93, 93, 93, 93, 93, 93, - 93, 90, 93, 93, 93, 93, 93, 93, 534, 93, - 93, 532, 90, 934, 536, 93, 538, 90, 93, 533, - 535, 974, 93, 93, 542, 93, 539, 545, 537, 93, - 93, 93, 540, 93, 93, 93, 93, 544, 93, 1016, - 93, 93, 93, 541, 93, 962, 543, 547, 93, 93, - 93, 93, 546, 90, 93, 93, 93, 93, 93, 93, - 549, 93, 552, 93, 553, 93, 93, 93, 90, 93, - 93, 550, 93, 934, 93, 551, 93, 934, 946, 93, - 554, 93, 793, 93, 561, 556, 794, 93, 93, 555, - - 93, 557, 560, 558, 93, 93, 93, 563, 562, 565, - 93, 93, 93, 93, 93, 90, 93, 93, 93, 93, - 564, 93, 567, 93, 93, 90, 93, 93, 90, 566, - 568, 93, 569, 570, 93, 93, 90, 571, 93, 93, - 572, 90, 93, 574, 575, 93, 93, 573, 93, 93, - 998, 93, 93, 1010, 579, 93, 93, 578, 93, 93, - 577, 576, 90, 93, 580, 581, 591, 90, 93, 93, - 93, 984, 582, 583, 584, 93, 93, 90, 588, 586, - 589, 589, 589, 589, 589, 976, 987, 590, 996, 474, - 585, 475, 475, 475, 475, 475, 1153, 592, 93, 93, - - 593, 93, 90, 93, 93, 93, 93, 93, 93, 594, - 93, 93, 595, 598, 597, 93, 1015, 596, 93, 599, - 93, 861, 93, 93, 93, 93, 93, 601, 93, 604, - 93, 93, 93, 93, 600, 93, 603, 93, 93, 93, - 93, 90, 93, 90, 93, 93, 588, 93, 605, 93, - 93, 90, 93, 607, 608, 93, 609, 93, 93, 93, - 606, 93, 93, 87, 93, 93, 614, 610, 93, 93, - 612, 613, 615, 93, 93, 616, 93, 93, 618, 93, - 910, 93, 93, 93, 93, 93, 93, 617, 1069, 93, - 93, 93, 93, 93, 93, 621, 911, 620, 93, 619, - - 93, 93, 93, 623, 90, 93, 93, 93, 1030, 93, - 93, 622, 93, 93, 93, 625, 630, 93, 624, 93, - 626, 628, 93, 93, 93, 629, 93, 352, 93, 632, - 93, 633, 90, 587, 631, 93, 639, 93, 635, 634, - 93, 93, 93, 93, 636, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 637, 93, 93, 93, 93, 93, - 989, 638, 93, 93, 93, 93, 93, 93, 90, 641, - 642, 93, 93, 643, 93, 93, 93, 87, 93, 93, - 93, 93, 93, 93, 644, 93, 93, 93, 93, 640, - 93, 1003, 93, 645, 647, 93, 648, 93, 646, 93, - - 649, 90, 93, 93, 651, 93, 93, 93, 653, 93, - 93, 654, 93, 93, 93, 650, 93, 93, 93, 93, - 93, 93, 1089, 93, 93, 93, 93, 93, 93, 655, - 93, 90, 659, 93, 93, 93, 658, 93, 657, 471, - 93, 426, 93, 656, 93, 90, 664, 614, 663, 93, - 660, 93, 665, 90, 662, 93, 93, 93, 93, 666, - 667, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 1012, 93, 93, 93, 670, 93, 669, 668, 673, - 93, 93, 983, 93, 93, 93, 682, 93, 93, 672, - 93, 93, 93, 93, 93, 683, 679, 671, 674, 90, - - 695, 93, 684, 90, 676, 693, 93, 677, 371, 678, - 688, 696, 680, 93, 90, 681, 685, 1017, 93, 90, - 87, 687, 694, 90, 686, 689, 690, 689, 689, 689, - 691, 691, 691, 691, 691, 588, 93, 692, 692, 692, - 692, 692, 698, 93, 93, 93, 93, 93, 93, 697, - 1050, 93, 93, 93, 93, 93, 1023, 701, 702, 93, - 699, 703, 700, 93, 93, 93, 93, 93, 93, 1019, - 93, 93, 93, 705, 93, 93, 707, 706, 93, 93, - 93, 93, 710, 90, 93, 93, 93, 93, 93, 93, - 709, 93, 93, 713, 708, 712, 93, 93, 93, 93, - - 90, 93, 717, 90, 93, 715, 93, 714, 93, 93, - 716, 93, 93, 93, 1048, 718, 93, 93, 93, 93, - 721, 720, 93, 719, 93, 724, 722, 93, 727, 93, - 1037, 93, 93, 93, 93, 93, 93, 728, 93, 729, - 93, 93, 725, 93, 93, 730, 93, 93, 93, 93, - 93, 93, 1022, 93, 93, 93, 93, 93, 93, 731, - 93, 93, 93, 732, 736, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 351, 93, 93, 220, 93, 311, 93, 740, 93, 737, - 739, 93, 742, 93, 93, 90, 93, 738, 93, 90, - - 746, 93, 741, 93, 93, 93, 747, 93, 745, 93, - 93, 93, 743, 744, 93, 90, 93, 93, 93, 93, - 93, 751, 749, 93, 750, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 754, 93, 93, 93, 93, 93, - 93, 752, 753, 757, 93, 93, 93, 1067, 761, 300, - 1021, 756, 93, 93, 759, 93, 758, 760, 93, 765, - 93, 762, 93, 90, 1103, 93, 724, 93, 764, 93, - 766, 763, 93, 93, 93, 770, 93, 93, 782, 93, - 93, 93, 93, 93, 93, 93, 90, 780, 769, 93, - 784, 771, 689, 689, 689, 689, 689, 783, 772, 689, - - 689, 689, 689, 689, 93, 776, 781, 781, 781, 781, - 781, 93, 93, 785, 1029, 93, 777, 93, 778, 93, - 779, 787, 93, 93, 93, 790, 93, 93, 254, 1040, - 93, 93, 786, 93, 93, 791, 789, 93, 93, 788, - 93, 792, 93, 93, 93, 90, 795, 93, 93, 93, - 93, 93, 797, 796, 93, 93, 90, 798, 93, 1049, - 799, 93, 93, 802, 800, 803, 93, 93, 93, 93, - 93, 804, 1047, 93, 805, 93, 807, 806, 93, 93, - 93, 243, 93, 808, 809, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - - 93, 93, 815, 93, 811, 813, 93, 93, 821, 816, - 814, 93, 93, 93, 93, 93, 817, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 90, - 822, 93, 93, 93, 93, 90, 828, 93, 90, 90, - 87, 93, 824, 830, 93, 823, 827, 825, 93, 1091, - 93, 93, 1117, 93, 831, 87, 829, 93, 93, 826, - 93, 90, 835, 93, 837, 93, 93, 832, 836, 93, - 93, 90, 93, 93, 90, 93, 93, 93, 839, 838, - 93, 843, 93, 93, 93, 93, 93, 93, 840, 93, - - 93, 93, 93, 93, 842, 1036, 93, 90, 93, 93, - 844, 845, 846, 1063, 806, 93, 93, 93, 848, 93, - 847, 93, 93, 90, 93, 221, 93, 1076, 93, 862, - 862, 862, 862, 862, 93, 1054, 864, 851, 1084, 90, - 852, 93, 857, 93, 93, 93, 853, 863, 860, 90, - 93, 93, 93, 93, 865, 220, 858, 93, 859, 875, - 93, 90, 867, 871, 872, 866, 868, 93, 869, 870, - 93, 93, 93, 93, 93, 1133, 876, 93, 93, 93, - 93, 93, 873, 217, 93, 93, 93, 874, 93, 93, - 879, 882, 878, 93, 93, 93, 93, 93, 880, 93, - - 90, 93, 93, 93, 93, 884, 93, 881, 93, 883, - 93, 93, 93, 93, 93, 93, 1041, 888, 93, 93, - 93, 93, 886, 890, 93, 885, 93, 93, 93, 893, - 93, 93, 892, 93, 93, 93, 93, 93, 891, 93, - 93, 93, 897, 93, 93, 93, 93, 93, 93, 93, - 90, 93, 93, 93, 93, 903, 93, 904, 905, 93, - 93, 93, 93, 93, 93, 899, 93, 88, 93, 93, - 93, 93, 93, 93, 898, 87, 906, 900, 907, 93, - 93, 93, 902, 93, 93, 93, 93, 93, 93, 901, - 93, 93, 93, 93, 93, 78, 908, 93, 90, 90, - - 914, 1147, 909, 77, 93, 913, 93, 93, 917, 93, - 915, 93, 93, 93, 93, 919, 93, 93, 93, 93, - 93, 93, 916, 918, 93, 1055, 93, 93, 93, 935, - 93, 93, 920, 93, 93, 75, 921, 93, 93, 924, - 942, 93, 925, 90, 90, 930, 1042, 93, 931, 937, - 936, 93, 93, 929, 938, 948, 93, 93, 93, 93, - 932, 1061, 73, 93, 93, 93, 93, 1153, 939, 944, - 949, 943, 93, 93, 93, 93, 93, 952, 953, 93, - 93, 93, 93, 93, 1153, 93, 93, 93, 955, 93, - 950, 93, 93, 1153, 951, 93, 93, 958, 93, 93, - - 93, 93, 93, 93, 957, 93, 93, 93, 93, 959, - 93, 93, 93, 93, 963, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 965, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 964, - 93, 93, 93, 93, 93, 971, 93, 93, 977, 1153, - 93, 93, 966, 93, 93, 90, 978, 93, 90, 90, - 93, 973, 981, 93, 93, 982, 972, 93, 93, 90, - 93, 93, 985, 1099, 93, 93, 979, 1153, 93, 1153, - 980, 93, 999, 90, 93, 93, 990, 93, 93, 1000, - 986, 93, 1001, 994, 93, 93, 93, 1005, 1065, 1007, - - 1006, 93, 1070, 93, 93, 991, 93, 1124, 93, 992, - 93, 93, 93, 1072, 1009, 93, 93, 93, 93, 93, - 1008, 1153, 93, 93, 93, 93, 1018, 93, 1011, 93, - 93, 93, 1014, 93, 93, 1013, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 93, 1025, 93, 93, 93, - 93, 1052, 93, 1053, 93, 93, 93, 90, 93, 93, - 1033, 1027, 1026, 93, 1020, 1032, 93, 1031, 93, 93, - 1046, 90, 1035, 1044, 93, 93, 93, 90, 1051, 90, - 1034, 93, 90, 1056, 1058, 93, 1038, 1153, 93, 1043, - - 93, 1039, 93, 93, 1057, 93, 93, 93, 1153, 1059, - 93, 93, 1060, 93, 93, 1062, 90, 93, 93, 1134, - 93, 93, 93, 1066, 93, 93, 1064, 93, 93, 93, - 1071, 93, 93, 93, 93, 93, 1077, 93, 93, 1083, - 93, 93, 93, 93, 93, 93, 1086, 1153, 1090, 93, - 93, 1074, 93, 93, 1075, 93, 1068, 93, 1073, 1105, - 93, 1153, 1078, 93, 93, 93, 1092, 1153, 1079, 1153, - 93, 90, 93, 1081, 1082, 93, 1080, 93, 1093, 1094, - 93, 90, 93, 90, 93, 1085, 90, 93, 1087, 1096, - 1088, 93, 1098, 1095, 1100, 93, 93, 90, 93, 93, - - 1097, 93, 93, 93, 1101, 93, 93, 93, 93, 1102, - 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 93, 93, 93, 93, 93, 90, 93, 93, 93, 93, - 1112, 90, 1104, 93, 1153, 1153, 90, 1153, 1111, 90, - 93, 93, 1106, 1123, 1114, 93, 1110, 1107, 93, 1113, - 1115, 1108, 93, 1119, 1118, 93, 1121, 1109, 93, 93, - 93, 93, 93, 1125, 1116, 93, 93, 93, 93, 93, - 1120, 1122, 93, 93, 1126, 93, 93, 93, 93, 93, - 93, 93, 93, 1132, 93, 93, 93, 93, 93, 93, - 93, 90, 93, 93, 93, 1136, 93, 93, 1135, 93, - - 93, 90, 93, 1130, 90, 93, 90, 93, 93, 1137, - 93, 1128, 93, 1127, 1140, 93, 1138, 93, 90, 93, - 1129, 93, 1131, 93, 93, 1139, 93, 1141, 93, 93, - 93, 93, 93, 93, 1153, 93, 93, 90, 93, 93, - 93, 1142, 93, 93, 93, 93, 1149, 90, 1143, 93, - 93, 93, 1153, 1153, 93, 1153, 93, 1148, 1144, 1145, - 1150, 93, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1146, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1151, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1152, 72, - - 72, 1153, 72, 72, 72, 72, 72, 72, 72, 74, - 74, 1153, 1153, 74, 74, 74, 74, 74, 74, 76, - 76, 1153, 76, 76, 76, 76, 76, 76, 76, 79, - 1153, 1153, 79, 79, 79, 79, 79, 79, 79, 84, - 84, 84, 84, 86, 86, 219, 219, 1153, 219, 219, - 219, 219, 219, 219, 219, 222, 222, 1153, 222, 222, - 228, 228, 228, 232, 232, 233, 233, 233, 89, 89, - 89, 1153, 89, 89, 234, 1153, 234, 1153, 234, 234, - 358, 358, 476, 476, 933, 933, 1153, 933, 933, 933, - 933, 933, 933, 933, 3, 1153, 1153, 1153, 1153, 1153, - - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153 - } ; - -static yyconst flex_int16_t yy_chk[3577] = - { 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 5, 312, 904, 5, 18, 32, 18, 18, 18, - 18, 18, 18, 32, 25, 18, 18, 18, 18, 18, - - 18, 24, 494, 24, 24, 25, 74, 25, 25, 24, - 24, 34, 35, 25, 25, 74, 494, 71, 34, 35, - 71, 34, 35, 26, 18, 18, 18, 18, 18, 18, - 26, 31, 26, 26, 31, 31, 446, 1152, 26, 26, - 312, 31, 548, 31, 31, 904, 18, 19, 102, 19, - 19, 19, 19, 19, 19, 30, 30, 19, 19, 19, - 19, 19, 19, 27, 102, 27, 30, 36, 27, 43, - 30, 27, 27, 30, 36, 27, 43, 65, 36, 43, - 36, 1150, 446, 559, 65, 548, 19, 19, 19, 19, - 19, 19, 23, 23, 93, 23, 23, 23, 23, 23, - - 23, 93, 65, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 256, 675, - 559, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 28, 66, 256, 37, - 1148, 37, 42, 105, 66, 37, 42, 28, 37, 28, - 105, 37, 734, 42, 28, 28, 28, 29, 29, 29, - 29, 29, 29, 683, 675, 29, 29, 29, 29, 29, - 29, 33, 33, 94, 734, 66, 29, 94, 29, 39, - - 94, 98, 33, 39, 29, 29, 391, 39, 98, 33, - 39, 98, 33, 39, 29, 29, 29, 29, 29, 29, - 38, 38, 38, 391, 661, 434, 683, 38, 40, 40, - 40, 38, 41, 41, 41, 40, 95, 95, 38, 40, - 47, 38, 47, 41, 95, 869, 40, 100, 47, 47, - 41, 100, 40, 109, 48, 40, 48, 41, 100, 40, - 109, 100, 48, 48, 49, 574, 49, 57, 47, 661, - 47, 504, 49, 49, 57, 1147, 47, 47, 50, 869, - 50, 434, 49, 164, 53, 48, 50, 50, 51, 504, - 51, 53, 49, 54, 54, 49, 51, 51, 164, 52, - - 50, 52, 57, 55, 54, 57, 521, 52, 52, 50, - 55, 54, 637, 53, 56, 56, 51, 52, 380, 53, - 58, 51, 574, 59, 96, 56, 637, 58, 51, 55, - 59, 96, 56, 55, 52, 521, 602, 54, 60, 96, - 55, 55, 61, 61, 61, 60, 380, 1141, 62, 58, - 64, 64, 64, 61, 56, 62, 611, 673, 58, 106, - 61, 64, 59, 56, 59, 60, 106, 60, 64, 945, - 106, 60, 611, 62, 602, 636, 60, 62, 61, 97, - 97, 62, 61, 63, 63, 63, 62, 97, 627, 945, - 652, 61, 636, 110, 63, 80, 80, 80, 80, 80, - - 110, 63, 110, 64, 84, 84, 84, 84, 84, 84, - 112, 113, 638, 101, 673, 627, 103, 112, 113, 63, - 101, 101, 101, 103, 103, 103, 104, 111, 652, 114, - 111, 114, 108, 104, 108, 63, 114, 111, 63, 638, - 104, 108, 63, 81, 81, 81, 81, 81, 624, 723, - 115, 81, 81, 81, 81, 81, 81, 115, 108, 116, - 117, 115, 117, 118, 1140, 117, 116, 1126, 119, 117, - 118, 118, 120, 1117, 118, 119, 723, 624, 768, 120, - 81, 81, 81, 81, 81, 81, 83, 83, 83, 83, - 83, 83, 812, 121, 83, 83, 83, 83, 83, 83, - - 121, 122, 123, 124, 124, 125, 127, 128, 122, 123, - 121, 124, 125, 127, 128, 812, 123, 768, 682, 122, - 125, 127, 125, 83, 83, 83, 83, 83, 83, 85, - 85, 85, 85, 85, 85, 126, 126, 85, 85, 85, - 85, 85, 85, 126, 748, 129, 130, 131, 132, 129, - 133, 126, 129, 130, 131, 132, 134, 133, 135, 130, - 131, 132, 1105, 134, 682, 135, 85, 85, 85, 85, - 85, 85, 91, 91, 91, 91, 91, 91, 711, 136, - 91, 91, 91, 91, 91, 91, 136, 137, 136, 138, - 139, 91, 755, 140, 137, 711, 138, 139, 139, 137, - - 140, 748, 140, 936, 774, 748, 1091, 141, 141, 91, - 91, 91, 91, 91, 91, 141, 142, 143, 144, 145, - 146, 147, 148, 142, 143, 144, 145, 146, 147, 148, - 936, 148, 142, 146, 149, 150, 151, 147, 755, 152, - 153, 149, 150, 151, 154, 149, 152, 153, 155, 156, - 157, 154, 158, 159, 774, 155, 156, 157, 160, 158, - 159, 155, 162, 167, 166, 160, 163, 170, 165, 162, - 167, 166, 168, 163, 170, 165, 171, 1077, 157, 168, - 684, 159, 156, 171, 156, 173, 172, 162, 726, 733, - 174, 170, 173, 172, 170, 158, 160, 174, 726, 733, - - 162, 175, 163, 163, 165, 165, 166, 176, 175, 177, - 178, 168, 172, 171, 176, 179, 177, 178, 180, 181, - 182, 183, 179, 189, 184, 180, 181, 182, 183, 735, - 189, 184, 175, 185, 186, 684, 176, 178, 188, 735, - 185, 186, 178, 187, 870, 188, 176, 819, 191, 190, - 187, 179, 192, 193, 179, 191, 190, 194, 819, 192, - 193, 185, 195, 196, 194, 182, 184, 183, 197, 195, - 196, 187, 870, 198, 767, 197, 199, 186, 200, 186, - 198, 188, 190, 199, 201, 200, 187, 1076, 193, 191, - 202, 201, 203, 192, 193, 204, 205, 202, 1072, 203, - - 206, 207, 204, 205, 993, 197, 855, 206, 207, 208, - 209, 199, 210, 198, 200, 211, 208, 209, 202, 210, - 212, 201, 211, 213, 215, 214, 216, 212, 993, 767, - 213, 215, 214, 216, 818, 223, 203, 223, 223, 223, - 223, 223, 207, 239, 237, 240, 855, 209, 237, 242, - 239, 210, 240, 208, 214, 237, 242, 818, 240, 215, - 228, 228, 228, 228, 228, 228, 243, 216, 224, 224, - 224, 224, 224, 243, 875, 894, 224, 224, 224, 224, - 224, 224, 229, 229, 229, 229, 229, 229, 238, 241, - 244, 894, 245, 241, 820, 238, 241, 244, 238, 245, - - 927, 245, 875, 773, 244, 224, 224, 224, 224, 224, - 224, 225, 225, 225, 225, 225, 225, 820, 246, 225, - 225, 225, 225, 225, 225, 246, 246, 247, 249, 251, - 250, 252, 249, 250, 247, 249, 251, 250, 252, 258, - 250, 247, 773, 927, 251, 775, 258, 834, 225, 225, - 225, 225, 225, 225, 235, 235, 235, 235, 235, 877, - 1071, 1070, 235, 235, 235, 235, 235, 235, 253, 254, - 255, 263, 253, 895, 257, 257, 254, 255, 263, 253, - 255, 257, 259, 254, 775, 259, 834, 895, 877, 259, - 260, 235, 235, 235, 235, 235, 235, 260, 261, 260, - - 262, 264, 265, 267, 261, 261, 266, 262, 264, 265, - 262, 849, 265, 266, 268, 269, 268, 270, 267, 271, - 272, 270, 269, 268, 270, 267, 271, 272, 273, 1055, - 274, 269, 1054, 268, 274, 273, 276, 274, 275, 275, - 277, 278, 279, 276, 276, 278, 275, 277, 278, 279, - 849, 280, 277, 280, 281, 282, 283, 279, 280, 284, - 285, 281, 282, 283, 286, 289, 284, 285, 288, 289, - 281, 286, 287, 284, 287, 288, 289, 286, 290, 287, - 291, 293, 292, 294, 295, 290, 292, 291, 293, 292, - 294, 295, 296, 291, 297, 298, 299, 300, 301, 296, - - 302, 297, 298, 299, 300, 301, 303, 302, 294, 304, - 306, 308, 307, 303, 310, 947, 304, 306, 308, 307, - 309, 310, 295, 311, 887, 313, 300, 309, 298, 314, - 311, 299, 313, 938, 315, 297, 314, 302, 307, 310, - 301, 315, 303, 306, 947, 307, 316, 887, 317, 309, - 318, 304, 794, 316, 308, 317, 938, 318, 911, 314, - 319, 320, 794, 313, 321, 311, 322, 319, 320, 315, - 323, 321, 324, 322, 325, 327, 326, 323, 316, 330, - 1050, 325, 327, 326, 318, 317, 330, 324, 328, 329, - 320, 850, 1049, 321, 324, 328, 329, 911, 319, 323, - - 331, 325, 332, 333, 322, 334, 336, 331, 327, 332, - 333, 905, 334, 336, 335, 337, 338, 328, 329, 325, - 326, 335, 337, 338, 339, 340, 903, 341, 342, 343, - 332, 339, 340, 331, 341, 342, 343, 344, 854, 333, - 856, 346, 850, 345, 344, 334, 337, 335, 346, 336, - 345, 347, 348, 339, 340, 349, 350, 359, 347, 348, - 338, 940, 349, 350, 359, 903, 346, 905, 344, 341, - 343, 359, 345, 352, 352, 352, 352, 352, 903, 353, - 347, 353, 353, 353, 353, 353, 940, 1048, 349, 854, - 1041, 856, 354, 348, 354, 354, 354, 354, 354, 354, - - 355, 355, 355, 355, 355, 355, 356, 356, 356, 356, - 356, 356, 357, 357, 357, 357, 357, 357, 360, 361, - 362, 974, 364, 365, 363, 360, 361, 362, 363, 364, - 365, 363, 360, 361, 366, 367, 366, 364, 362, 368, - 369, 366, 367, 372, 370, 372, 368, 369, 371, 367, - 369, 370, 372, 373, 374, 371, 810, 970, 376, 370, - 373, 374, 371, 374, 375, 376, 810, 377, 375, 974, - 378, 371, 379, 373, 377, 375, 377, 378, 381, 379, - 382, 379, 383, 384, 384, 381, 385, 382, 387, 383, - 386, 384, 381, 385, 1040, 387, 382, 386, 386, 388, - - 970, 387, 389, 390, 392, 1028, 388, 388, 393, 389, - 390, 392, 393, 394, 392, 389, 395, 395, 396, 393, - 394, 399, 398, 395, 397, 396, 397, 889, 399, 398, - 400, 396, 398, 397, 400, 1016, 401, 400, 401, 402, - 403, 402, 403, 404, 1015, 401, 407, 405, 402, 403, - 404, 405, 406, 407, 405, 889, 406, 408, 409, 410, - 409, 408, 407, 406, 408, 411, 410, 409, 412, 414, - 406, 412, 411, 413, 413, 910, 414, 413, 412, 416, - 406, 415, 415, 417, 413, 418, 416, 419, 420, 415, - 417, 413, 418, 421, 419, 420, 422, 423, 424, 425, - - 421, 413, 426, 422, 423, 424, 425, 427, 428, 426, - 429, 1002, 430, 431, 427, 428, 426, 429, 418, 430, - 431, 416, 961, 934, 421, 432, 423, 896, 433, 417, - 419, 910, 432, 435, 427, 433, 424, 430, 422, 436, - 435, 437, 425, 438, 439, 440, 436, 429, 437, 961, - 438, 439, 440, 426, 441, 896, 428, 433, 442, 443, - 444, 441, 432, 704, 447, 442, 443, 444, 445, 448, - 435, 447, 439, 449, 440, 445, 448, 450, 876, 451, - 449, 436, 452, 933, 450, 437, 451, 861, 876, 452, - 441, 453, 704, 454, 448, 443, 704, 455, 453, 442, - - 454, 444, 447, 445, 455, 456, 457, 450, 449, 452, - 458, 459, 456, 457, 460, 923, 462, 458, 459, 461, - 451, 460, 454, 462, 463, 954, 461, 464, 912, 453, - 455, 463, 456, 457, 464, 465, 941, 458, 466, 467, - 459, 926, 465, 461, 461, 466, 467, 460, 468, 469, - 941, 470, 477, 954, 464, 468, 469, 463, 470, 477, - 462, 461, 841, 482, 465, 467, 479, 939, 478, 479, - 482, 923, 468, 468, 468, 478, 479, 801, 472, 470, - 472, 472, 472, 472, 472, 912, 926, 478, 939, 475, - 468, 475, 475, 475, 475, 475, 475, 480, 483, 481, - - 480, 480, 960, 484, 485, 483, 481, 486, 480, 481, - 484, 485, 484, 487, 486, 488, 960, 485, 490, 489, - 487, 780, 488, 489, 492, 490, 493, 491, 491, 496, - 489, 492, 496, 493, 490, 491, 495, 497, 495, 496, - 498, 833, 499, 1021, 497, 495, 692, 498, 497, 499, - 500, 976, 502, 499, 500, 503, 501, 500, 501, 502, - 498, 505, 503, 476, 506, 501, 507, 502, 505, 511, - 505, 506, 508, 507, 508, 509, 511, 510, 511, 509, - 833, 508, 512, 513, 510, 514, 509, 510, 1021, 512, - 513, 515, 514, 516, 517, 514, 833, 513, 515, 512, - - 516, 517, 518, 516, 928, 519, 520, 522, 976, 518, - 523, 515, 519, 520, 522, 518, 524, 523, 517, 525, - 519, 522, 526, 524, 527, 523, 525, 473, 528, 526, - 529, 527, 530, 471, 525, 528, 531, 529, 528, 527, - 531, 532, 533, 534, 530, 535, 536, 531, 532, 533, - 534, 537, 535, 536, 530, 538, 539, 540, 537, 541, - 928, 530, 538, 539, 540, 543, 541, 542, 946, 534, - 535, 545, 543, 535, 542, 544, 546, 358, 545, 547, - 549, 550, 544, 546, 536, 551, 547, 549, 550, 533, - 552, 946, 551, 539, 541, 553, 542, 552, 540, 554, - - 544, 1045, 553, 555, 546, 556, 554, 557, 550, 558, - 555, 551, 556, 561, 557, 545, 558, 560, 562, 563, - 561, 565, 1045, 566, 560, 562, 563, 564, 565, 552, - 566, 922, 556, 567, 564, 568, 555, 569, 554, 351, - 567, 305, 568, 553, 569, 582, 563, 562, 561, 570, - 557, 571, 564, 956, 560, 572, 570, 573, 571, 565, - 566, 575, 572, 576, 573, 577, 578, 579, 575, 580, - 576, 956, 577, 578, 579, 569, 580, 568, 567, 572, - 581, 583, 922, 584, 585, 586, 582, 581, 583, 571, - 584, 585, 586, 592, 590, 582, 579, 570, 573, 962, - - 592, 590, 582, 969, 575, 590, 591, 577, 248, 578, - 586, 593, 580, 591, 965, 581, 583, 962, 593, 234, - 232, 584, 591, 998, 583, 587, 587, 587, 587, 587, - 588, 588, 588, 588, 588, 589, 594, 589, 589, 589, - 589, 589, 596, 594, 595, 597, 596, 598, 599, 594, - 998, 595, 597, 596, 598, 599, 969, 599, 600, 600, - 597, 601, 598, 603, 604, 601, 600, 605, 607, 965, - 603, 604, 601, 603, 605, 607, 606, 605, 606, 608, - 609, 612, 610, 984, 610, 606, 608, 609, 612, 613, - 609, 610, 614, 613, 608, 612, 613, 615, 616, 614, - - 996, 617, 618, 968, 615, 616, 618, 615, 617, 620, - 617, 619, 621, 618, 996, 619, 620, 623, 619, 621, - 622, 621, 622, 620, 623, 625, 623, 626, 628, 622, - 984, 630, 625, 629, 626, 628, 631, 629, 630, 632, - 629, 633, 626, 631, 634, 633, 632, 635, 633, 639, - 640, 634, 968, 641, 635, 642, 639, 640, 643, 634, - 641, 644, 642, 635, 639, 643, 645, 646, 644, 647, - 648, 649, 650, 645, 646, 654, 647, 648, 649, 650, - 221, 651, 654, 219, 653, 169, 655, 643, 651, 640, - 642, 653, 646, 655, 656, 1019, 657, 641, 658, 967, - - 650, 656, 644, 657, 659, 658, 651, 660, 649, 662, - 663, 659, 647, 648, 660, 1067, 662, 663, 664, 665, - 666, 656, 653, 667, 655, 664, 665, 666, 668, 669, - 667, 670, 671, 672, 660, 668, 669, 674, 670, 671, - 672, 658, 659, 663, 674, 676, 677, 1019, 667, 161, - 967, 662, 676, 677, 665, 679, 664, 666, 678, 671, - 680, 668, 679, 975, 1067, 678, 674, 680, 670, 681, - 672, 669, 685, 686, 687, 677, 681, 688, 693, 685, - 686, 687, 694, 695, 688, 693, 987, 690, 676, 694, - 695, 678, 689, 689, 689, 689, 689, 694, 681, 690, - - 690, 690, 690, 690, 696, 685, 691, 691, 691, 691, - 691, 696, 697, 696, 975, 699, 686, 698, 687, 697, - 688, 698, 699, 700, 698, 701, 703, 701, 107, 987, - 700, 702, 697, 703, 701, 702, 700, 705, 702, 699, - 706, 703, 707, 708, 705, 997, 705, 706, 712, 707, - 708, 709, 707, 706, 710, 712, 995, 708, 709, 997, - 709, 710, 714, 712, 710, 713, 713, 715, 716, 714, - 717, 714, 995, 713, 715, 716, 718, 717, 718, 719, - 720, 99, 722, 719, 721, 718, 719, 720, 721, 722, - 724, 725, 727, 728, 729, 721, 731, 724, 725, 727, - - 728, 729, 730, 731, 725, 727, 730, 732, 736, 731, - 728, 737, 738, 730, 732, 736, 732, 739, 737, 738, - 740, 741, 743, 742, 739, 744, 745, 740, 741, 743, - 742, 746, 744, 745, 747, 749, 751, 750, 746, 89, - 737, 747, 749, 751, 750, 1047, 743, 752, 1089, 983, - 86, 753, 739, 745, 752, 738, 742, 740, 753, 1047, - 754, 756, 1089, 757, 746, 82, 744, 754, 756, 741, - 757, 1029, 749, 758, 751, 760, 759, 747, 750, 761, - 758, 1037, 760, 759, 1012, 762, 761, 763, 753, 752, - 764, 757, 762, 765, 763, 766, 769, 764, 754, 770, - - 765, 771, 766, 769, 756, 983, 770, 1003, 771, 772, - 758, 759, 762, 1012, 761, 777, 772, 776, 765, 779, - 763, 778, 777, 1112, 776, 77, 779, 1029, 778, 781, - 781, 781, 781, 781, 782, 1003, 783, 769, 1037, 788, - 770, 782, 776, 783, 784, 785, 771, 782, 779, 793, - 786, 784, 785, 787, 784, 75, 777, 786, 778, 793, - 787, 988, 787, 789, 790, 785, 788, 791, 788, 788, - 789, 790, 792, 795, 791, 1112, 793, 796, 798, 792, - 795, 797, 791, 68, 796, 798, 799, 792, 797, 800, - 797, 803, 796, 799, 802, 803, 800, 804, 800, 805, - - 828, 802, 803, 806, 804, 807, 805, 802, 808, 805, - 806, 809, 807, 811, 813, 808, 988, 811, 809, 814, - 811, 813, 809, 814, 815, 808, 814, 821, 816, 817, - 817, 815, 816, 822, 821, 816, 823, 817, 815, 824, - 822, 825, 821, 823, 826, 827, 824, 829, 825, 830, - 1133, 826, 827, 831, 829, 828, 830, 828, 828, 832, - 831, 835, 836, 837, 838, 823, 832, 22, 835, 836, - 837, 838, 839, 840, 822, 20, 829, 824, 830, 839, - 840, 842, 827, 843, 844, 845, 846, 847, 842, 825, - 843, 844, 845, 846, 847, 10, 831, 848, 1004, 989, - - 837, 1133, 832, 9, 848, 836, 851, 852, 843, 853, - 840, 857, 858, 851, 852, 846, 853, 860, 857, 858, - 859, 863, 842, 845, 860, 1004, 864, 859, 863, 863, - 866, 865, 847, 864, 867, 8, 848, 866, 865, 851, - 871, 867, 853, 1010, 868, 858, 989, 871, 859, 865, - 864, 872, 873, 857, 868, 878, 874, 878, 872, 873, - 860, 1010, 7, 874, 878, 879, 880, 3, 868, 874, - 881, 873, 879, 880, 881, 882, 883, 884, 885, 884, - 886, 881, 882, 883, 0, 885, 884, 886, 888, 890, - 882, 888, 891, 0, 883, 893, 890, 892, 888, 891, - - 892, 897, 893, 898, 890, 899, 900, 892, 897, 893, - 898, 901, 899, 900, 897, 902, 906, 907, 901, 908, - 909, 913, 902, 906, 907, 914, 908, 909, 913, 899, - 915, 916, 914, 917, 918, 919, 920, 915, 916, 898, - 917, 918, 919, 920, 921, 906, 924, 925, 913, 0, - 929, 921, 900, 924, 925, 1063, 916, 929, 1024, 1022, - 930, 909, 919, 931, 935, 920, 908, 930, 932, 1017, - 931, 935, 924, 1063, 937, 932, 917, 0, 943, 0, - 918, 937, 942, 1099, 942, 943, 930, 948, 944, 943, - 925, 942, 944, 937, 948, 944, 949, 948, 1017, 950, - - 949, 951, 1022, 949, 952, 931, 950, 1099, 951, 932, - 953, 952, 955, 1024, 952, 957, 958, 953, 959, 955, - 951, 0, 957, 958, 964, 959, 963, 966, 955, 971, - 963, 964, 958, 972, 966, 957, 971, 963, 973, 977, - 972, 979, 978, 980, 981, 973, 977, 982, 979, 978, - 980, 981, 985, 986, 982, 990, 971, 991, 992, 985, - 986, 1000, 990, 1001, 991, 992, 1001, 1114, 1000, 994, - 979, 973, 972, 1001, 966, 978, 994, 977, 999, 1007, - 994, 1030, 981, 992, 1005, 999, 1007, 1023, 999, 1042, - 980, 1005, 1036, 1005, 1007, 1006, 985, 0, 1008, 990, - - 1011, 986, 1006, 1009, 1006, 1008, 1013, 1011, 0, 1008, - 1009, 1014, 1009, 1013, 1018, 1011, 1069, 1020, 1014, 1114, - 1025, 1018, 1026, 1018, 1020, 1031, 1014, 1025, 1027, 1026, - 1023, 1032, 1031, 1033, 1034, 1027, 1030, 1035, 1032, 1036, - 1033, 1034, 1038, 1039, 1035, 1043, 1042, 0, 1046, 1038, - 1039, 1026, 1043, 1044, 1027, 1046, 1020, 1051, 1025, 1069, - 1044, 0, 1031, 1053, 1051, 1052, 1051, 0, 1032, 0, - 1053, 1061, 1052, 1034, 1035, 1056, 1033, 1057, 1052, 1053, - 1058, 1083, 1056, 1084, 1057, 1038, 1065, 1058, 1043, 1059, - 1044, 1060, 1062, 1058, 1064, 1066, 1059, 1086, 1060, 1062, - - 1061, 1064, 1066, 1068, 1065, 1073, 1074, 1075, 1078, 1066, - 1068, 1079, 1073, 1074, 1075, 1078, 1080, 1081, 1079, 1082, - 1085, 1087, 1088, 1080, 1081, 1097, 1082, 1085, 1087, 1088, - 1084, 1103, 1068, 1092, 0, 0, 1111, 0, 1083, 1101, - 1092, 1090, 1073, 1097, 1086, 1093, 1081, 1074, 1090, 1085, - 1087, 1075, 1093, 1093, 1090, 1094, 1095, 1080, 1096, 1098, - 1095, 1100, 1094, 1101, 1088, 1096, 1098, 1095, 1100, 1102, - 1094, 1096, 1104, 1106, 1103, 1107, 1102, 1108, 1109, 1104, - 1106, 1110, 1107, 1111, 1108, 1109, 1113, 1115, 1110, 1116, - 1118, 1124, 1119, 1113, 1115, 1120, 1116, 1118, 1118, 1119, - - 1121, 1123, 1120, 1109, 1125, 1127, 1134, 1121, 1122, 1121, - 1128, 1107, 1127, 1104, 1124, 1122, 1122, 1128, 1132, 1129, - 1108, 1130, 1110, 1131, 1135, 1123, 1129, 1125, 1130, 1136, - 1131, 1135, 1137, 1138, 0, 1142, 1136, 1139, 1143, 1137, - 1138, 1127, 1142, 1144, 1145, 1143, 1137, 1146, 1129, 1149, - 1144, 1145, 0, 0, 1151, 0, 1149, 1134, 1130, 1131, - 1139, 1151, 0, 0, 0, 0, 0, 0, 0, 0, - 1132, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1144, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1146, 1154, - - 1154, 0, 1154, 1154, 1154, 1154, 1154, 1154, 1154, 1155, - 1155, 0, 0, 1155, 1155, 1155, 1155, 1155, 1155, 1156, - 1156, 0, 1156, 1156, 1156, 1156, 1156, 1156, 1156, 1157, - 0, 0, 1157, 1157, 1157, 1157, 1157, 1157, 1157, 1158, - 1158, 1158, 1158, 1159, 1159, 1160, 1160, 0, 1160, 1160, - 1160, 1160, 1160, 1160, 1160, 1161, 1161, 0, 1161, 1161, - 1162, 1162, 1162, 1163, 1163, 1164, 1164, 1164, 1165, 1165, - 1165, 0, 1165, 1165, 1166, 0, 1166, 0, 1166, 1166, - 1167, 1167, 1168, 1168, 1169, 1169, 0, 1169, 1169, 1169, - 1169, 1169, 1169, 1169, 1153, 1153, 1153, 1153, 1153, 1153, - - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, 1153, - 1153, 1153, 1153, 1153, 1153, 1153 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -extern int yy_flex_debug; -int yy_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 -#ifndef YYLMAX -#define YYLMAX 8192 -#endif - -char yytext[YYLMAX]; -char *yytext_ptr; -#line 1 "checkpolicy/policy_scan.l" -/* - * Author : Stephen Smalley, - */ -/* Updated: David Caplan, - * - * Added conditional policy language extensions - * - * Jason Tang - * - * Added support for binary policy modules - * - * Copyright (C) 2003-5 Tresys Technology, LLC - * Copyright (C) 2017 Mellanox Technologies Inc. - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 2. - */ -/* FLASK */ -#line 24 "checkpolicy/policy_scan.l" -#include -#include -#include -#include - -typedef int (* require_func_t)(void); - -#ifdef ANDROID -#include "policy_parse.h" -#else -#include "y.tab.h" -#endif - -static char linebuf[2][255]; -static unsigned int lno = 0; -int werror = 0; -int yyerror(const char *msg); -int yywarn(const char *msg); - -void set_source_file(const char *name); - -char source_file[PATH_MAX]; -unsigned long source_lineno = 1; - -unsigned long policydb_lineno = 1; - -unsigned int policydb_errors = 0; -#define YY_NO_INPUT 1 -#line 1677 "checkpolicy/policy_scan.c" - -#define INITIAL 0 - -#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 -#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 yylex_destroy (void ); - -int yyget_debug (void ); - -void yyset_debug (int debug_flag ); - -YY_EXTRA_TYPE yyget_extra (void ); - -void yyset_extra (YY_EXTRA_TYPE user_defined ); - -FILE *yyget_in (void ); - -void yyset_in (FILE * _in_str ); - -FILE *yyget_out (void ); - -void yyset_out (FILE * _out_str ); - - int yyget_leng (void ); - -char *yyget_text (void ); - -int yyget_lineno (void ); - -void yyset_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 yywrap (void ); -#else -extern int yywrap (void ); -#endif -#endif - -#ifndef YY_NO_UNPUT - -#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 -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#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( yytext, (size_t) yyleng, 1, yyout )) {} } 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 = '*'; \ - int n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#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 yylex (void); - -#define YY_DECL int yylex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * 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 /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - 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 ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); - } - - yy_load_buffer_state( ); - } - - { -#line 61 "checkpolicy/policy_scan.l" - -#line 1895 "checkpolicy/policy_scan.c" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of yytext. */ - *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_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 >= 1154 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 3495 ); - -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: -/* rule 1 can match eol */ -YY_RULE_SETUP -#line 62 "checkpolicy/policy_scan.l" -{ strncpy(linebuf[lno], yytext+1, 255); - linebuf[lno][254] = 0; - lno = 1 - lno; - policydb_lineno++; - source_lineno++; - yyless(1); } - YY_BREAK -case 2: -#line 69 "checkpolicy/policy_scan.l" -case 3: -YY_RULE_SETUP -#line 69 "checkpolicy/policy_scan.l" -{ return(CLONE); } - YY_BREAK -case 4: -#line 71 "checkpolicy/policy_scan.l" -case 5: -YY_RULE_SETUP -#line 71 "checkpolicy/policy_scan.l" -{ return(COMMON); } - YY_BREAK -case 6: -#line 73 "checkpolicy/policy_scan.l" -case 7: -YY_RULE_SETUP -#line 73 "checkpolicy/policy_scan.l" -{ return(CLASS); } - YY_BREAK -case 8: -#line 75 "checkpolicy/policy_scan.l" -case 9: -YY_RULE_SETUP -#line 75 "checkpolicy/policy_scan.l" -{ return(CONSTRAIN); } - YY_BREAK -case 10: -#line 77 "checkpolicy/policy_scan.l" -case 11: -YY_RULE_SETUP -#line 77 "checkpolicy/policy_scan.l" -{ return(VALIDATETRANS); } - YY_BREAK -case 12: -#line 79 "checkpolicy/policy_scan.l" -case 13: -YY_RULE_SETUP -#line 79 "checkpolicy/policy_scan.l" -{ return(INHERITS); } - YY_BREAK -case 14: -#line 81 "checkpolicy/policy_scan.l" -case 15: -YY_RULE_SETUP -#line 81 "checkpolicy/policy_scan.l" -{ return(SID); } - YY_BREAK -case 16: -#line 83 "checkpolicy/policy_scan.l" -case 17: -YY_RULE_SETUP -#line 83 "checkpolicy/policy_scan.l" -{ return(ROLE); } - YY_BREAK -case 18: -#line 85 "checkpolicy/policy_scan.l" -case 19: -YY_RULE_SETUP -#line 85 "checkpolicy/policy_scan.l" -{ return(ROLES); } - YY_BREAK -case 20: -#line 87 "checkpolicy/policy_scan.l" -case 21: -YY_RULE_SETUP -#line 87 "checkpolicy/policy_scan.l" -{ return(ROLEATTRIBUTE);} - YY_BREAK -case 22: -#line 89 "checkpolicy/policy_scan.l" -case 23: -YY_RULE_SETUP -#line 89 "checkpolicy/policy_scan.l" -{ return(ATTRIBUTE_ROLE);} - YY_BREAK -case 24: -#line 91 "checkpolicy/policy_scan.l" -case 25: -YY_RULE_SETUP -#line 91 "checkpolicy/policy_scan.l" -{ return(TYPES); } - YY_BREAK -case 26: -#line 93 "checkpolicy/policy_scan.l" -case 27: -YY_RULE_SETUP -#line 93 "checkpolicy/policy_scan.l" -{ return(TYPEALIAS); } - YY_BREAK -case 28: -#line 95 "checkpolicy/policy_scan.l" -case 29: -YY_RULE_SETUP -#line 95 "checkpolicy/policy_scan.l" -{ return(TYPEATTRIBUTE); } - YY_BREAK -case 30: -#line 97 "checkpolicy/policy_scan.l" -case 31: -YY_RULE_SETUP -#line 97 "checkpolicy/policy_scan.l" -{ return(TYPEBOUNDS); } - YY_BREAK -case 32: -#line 99 "checkpolicy/policy_scan.l" -case 33: -YY_RULE_SETUP -#line 99 "checkpolicy/policy_scan.l" -{ return(TYPE); } - YY_BREAK -case 34: -#line 101 "checkpolicy/policy_scan.l" -case 35: -YY_RULE_SETUP -#line 101 "checkpolicy/policy_scan.l" -{ return(BOOL); } - YY_BREAK -case 36: -#line 103 "checkpolicy/policy_scan.l" -case 37: -YY_RULE_SETUP -#line 103 "checkpolicy/policy_scan.l" -{ return(TUNABLE); } - YY_BREAK -case 38: -#line 105 "checkpolicy/policy_scan.l" -case 39: -YY_RULE_SETUP -#line 105 "checkpolicy/policy_scan.l" -{ return(IF); } - YY_BREAK -case 40: -#line 107 "checkpolicy/policy_scan.l" -case 41: -YY_RULE_SETUP -#line 107 "checkpolicy/policy_scan.l" -{ return(ELSE); } - YY_BREAK -case 42: -#line 109 "checkpolicy/policy_scan.l" -case 43: -YY_RULE_SETUP -#line 109 "checkpolicy/policy_scan.l" -{ return(ALIAS); } - YY_BREAK -case 44: -#line 111 "checkpolicy/policy_scan.l" -case 45: -YY_RULE_SETUP -#line 111 "checkpolicy/policy_scan.l" -{ return(ATTRIBUTE); } - YY_BREAK -case 46: -#line 113 "checkpolicy/policy_scan.l" -case 47: -YY_RULE_SETUP -#line 113 "checkpolicy/policy_scan.l" -{ return(EXPANDATTRIBUTE); } - YY_BREAK -case 48: -#line 115 "checkpolicy/policy_scan.l" -case 49: -YY_RULE_SETUP -#line 115 "checkpolicy/policy_scan.l" -{ return(TYPE_TRANSITION); } - YY_BREAK -case 50: -#line 117 "checkpolicy/policy_scan.l" -case 51: -YY_RULE_SETUP -#line 117 "checkpolicy/policy_scan.l" -{ return(TYPE_MEMBER); } - YY_BREAK -case 52: -#line 119 "checkpolicy/policy_scan.l" -case 53: -YY_RULE_SETUP -#line 119 "checkpolicy/policy_scan.l" -{ return(TYPE_CHANGE); } - YY_BREAK -case 54: -#line 121 "checkpolicy/policy_scan.l" -case 55: -YY_RULE_SETUP -#line 121 "checkpolicy/policy_scan.l" -{ return(ROLE_TRANSITION); } - YY_BREAK -case 56: -#line 123 "checkpolicy/policy_scan.l" -case 57: -YY_RULE_SETUP -#line 123 "checkpolicy/policy_scan.l" -{ return(RANGE_TRANSITION); } - YY_BREAK -case 58: -#line 125 "checkpolicy/policy_scan.l" -case 59: -YY_RULE_SETUP -#line 125 "checkpolicy/policy_scan.l" -{ return(SENSITIVITY); } - YY_BREAK -case 60: -#line 127 "checkpolicy/policy_scan.l" -case 61: -YY_RULE_SETUP -#line 127 "checkpolicy/policy_scan.l" -{ return(DOMINANCE); } - YY_BREAK -case 62: -#line 129 "checkpolicy/policy_scan.l" -case 63: -YY_RULE_SETUP -#line 129 "checkpolicy/policy_scan.l" -{ return(CATEGORY); } - YY_BREAK -case 64: -#line 131 "checkpolicy/policy_scan.l" -case 65: -YY_RULE_SETUP -#line 131 "checkpolicy/policy_scan.l" -{ return(LEVEL); } - YY_BREAK -case 66: -#line 133 "checkpolicy/policy_scan.l" -case 67: -YY_RULE_SETUP -#line 133 "checkpolicy/policy_scan.l" -{ return(RANGE); } - YY_BREAK -case 68: -#line 135 "checkpolicy/policy_scan.l" -case 69: -YY_RULE_SETUP -#line 135 "checkpolicy/policy_scan.l" -{ return(MLSCONSTRAIN); } - YY_BREAK -case 70: -#line 137 "checkpolicy/policy_scan.l" -case 71: -YY_RULE_SETUP -#line 137 "checkpolicy/policy_scan.l" -{ return(MLSVALIDATETRANS); } - YY_BREAK -case 72: -#line 139 "checkpolicy/policy_scan.l" -case 73: -YY_RULE_SETUP -#line 139 "checkpolicy/policy_scan.l" -{ return(USER); } - YY_BREAK -case 74: -#line 141 "checkpolicy/policy_scan.l" -case 75: -YY_RULE_SETUP -#line 141 "checkpolicy/policy_scan.l" -{ return(NEVERALLOW); } - YY_BREAK -case 76: -#line 143 "checkpolicy/policy_scan.l" -case 77: -YY_RULE_SETUP -#line 143 "checkpolicy/policy_scan.l" -{ return(ALLOW); } - YY_BREAK -case 78: -#line 145 "checkpolicy/policy_scan.l" -case 79: -YY_RULE_SETUP -#line 145 "checkpolicy/policy_scan.l" -{ return(AUDITALLOW); } - YY_BREAK -case 80: -#line 147 "checkpolicy/policy_scan.l" -case 81: -YY_RULE_SETUP -#line 147 "checkpolicy/policy_scan.l" -{ return(AUDITDENY); } - YY_BREAK -case 82: -#line 149 "checkpolicy/policy_scan.l" -case 83: -YY_RULE_SETUP -#line 149 "checkpolicy/policy_scan.l" -{ return(DONTAUDIT); } - YY_BREAK -case 84: -#line 151 "checkpolicy/policy_scan.l" -case 85: -YY_RULE_SETUP -#line 151 "checkpolicy/policy_scan.l" -{ return(ALLOWXPERM); } - YY_BREAK -case 86: -#line 153 "checkpolicy/policy_scan.l" -case 87: -YY_RULE_SETUP -#line 153 "checkpolicy/policy_scan.l" -{ return(AUDITALLOWXPERM); } - YY_BREAK -case 88: -#line 155 "checkpolicy/policy_scan.l" -case 89: -YY_RULE_SETUP -#line 155 "checkpolicy/policy_scan.l" -{ return(DONTAUDITXPERM); } - YY_BREAK -case 90: -#line 157 "checkpolicy/policy_scan.l" -case 91: -YY_RULE_SETUP -#line 157 "checkpolicy/policy_scan.l" -{ return(NEVERALLOWXPERM); } - YY_BREAK -case 92: -#line 159 "checkpolicy/policy_scan.l" -case 93: -YY_RULE_SETUP -#line 159 "checkpolicy/policy_scan.l" -{ return(SOURCE); } - YY_BREAK -case 94: -#line 161 "checkpolicy/policy_scan.l" -case 95: -YY_RULE_SETUP -#line 161 "checkpolicy/policy_scan.l" -{ return(TARGET); } - YY_BREAK -case 96: -#line 163 "checkpolicy/policy_scan.l" -case 97: -YY_RULE_SETUP -#line 163 "checkpolicy/policy_scan.l" -{ return(SAMEUSER);} - YY_BREAK -case 98: -YY_RULE_SETUP -#line 164 "checkpolicy/policy_scan.l" -{ return(MODULE); } - YY_BREAK -case 99: -YY_RULE_SETUP -#line 165 "checkpolicy/policy_scan.l" -{ return(REQUIRE); } - YY_BREAK -case 100: -YY_RULE_SETUP -#line 166 "checkpolicy/policy_scan.l" -{ return(OPTIONAL); } - YY_BREAK -case 101: -#line 168 "checkpolicy/policy_scan.l" -case 102: -YY_RULE_SETUP -#line 168 "checkpolicy/policy_scan.l" -{ return(OR);} - YY_BREAK -case 103: -#line 170 "checkpolicy/policy_scan.l" -case 104: -YY_RULE_SETUP -#line 170 "checkpolicy/policy_scan.l" -{ return(AND);} - YY_BREAK -case 105: -#line 172 "checkpolicy/policy_scan.l" -case 106: -YY_RULE_SETUP -#line 172 "checkpolicy/policy_scan.l" -{ return(NOT);} - YY_BREAK -case 107: -#line 174 "checkpolicy/policy_scan.l" -case 108: -YY_RULE_SETUP -#line 174 "checkpolicy/policy_scan.l" -{ return(XOR); } - YY_BREAK -case 109: -#line 176 "checkpolicy/policy_scan.l" -case 110: -YY_RULE_SETUP -#line 176 "checkpolicy/policy_scan.l" -{ return(EQUALS);} - YY_BREAK -case 111: -#line 178 "checkpolicy/policy_scan.l" -case 112: -YY_RULE_SETUP -#line 178 "checkpolicy/policy_scan.l" -{ return(CTRUE); } - YY_BREAK -case 113: -#line 180 "checkpolicy/policy_scan.l" -case 114: -YY_RULE_SETUP -#line 180 "checkpolicy/policy_scan.l" -{ return(CFALSE); } - YY_BREAK -case 115: -#line 182 "checkpolicy/policy_scan.l" -case 116: -YY_RULE_SETUP -#line 182 "checkpolicy/policy_scan.l" -{ return(DOM);} - YY_BREAK -case 117: -#line 184 "checkpolicy/policy_scan.l" -case 118: -YY_RULE_SETUP -#line 184 "checkpolicy/policy_scan.l" -{ return(DOMBY);} - YY_BREAK -case 119: -#line 186 "checkpolicy/policy_scan.l" -case 120: -YY_RULE_SETUP -#line 186 "checkpolicy/policy_scan.l" -{ return(INCOMP);} - YY_BREAK -case 121: -#line 188 "checkpolicy/policy_scan.l" -case 122: -YY_RULE_SETUP -#line 188 "checkpolicy/policy_scan.l" -{ return(FSCON);} - YY_BREAK -case 123: -#line 190 "checkpolicy/policy_scan.l" -case 124: -YY_RULE_SETUP -#line 190 "checkpolicy/policy_scan.l" -{ return(IBPKEYCON);} - YY_BREAK -case 125: -#line 192 "checkpolicy/policy_scan.l" -case 126: -YY_RULE_SETUP -#line 192 "checkpolicy/policy_scan.l" -{ return(IBENDPORTCON);} - YY_BREAK -case 127: -#line 194 "checkpolicy/policy_scan.l" -case 128: -YY_RULE_SETUP -#line 194 "checkpolicy/policy_scan.l" -{ return(PORTCON);} - YY_BREAK -case 129: -#line 196 "checkpolicy/policy_scan.l" -case 130: -YY_RULE_SETUP -#line 196 "checkpolicy/policy_scan.l" -{ return(NETIFCON);} - YY_BREAK -case 131: -#line 198 "checkpolicy/policy_scan.l" -case 132: -YY_RULE_SETUP -#line 198 "checkpolicy/policy_scan.l" -{ return(NODECON);} - YY_BREAK -case 133: -#line 200 "checkpolicy/policy_scan.l" -case 134: -YY_RULE_SETUP -#line 200 "checkpolicy/policy_scan.l" -{ return(PIRQCON);} - YY_BREAK -case 135: -#line 202 "checkpolicy/policy_scan.l" -case 136: -YY_RULE_SETUP -#line 202 "checkpolicy/policy_scan.l" -{ return(IOMEMCON);} - YY_BREAK -case 137: -#line 204 "checkpolicy/policy_scan.l" -case 138: -YY_RULE_SETUP -#line 204 "checkpolicy/policy_scan.l" -{ return(IOPORTCON);} - YY_BREAK -case 139: -#line 206 "checkpolicy/policy_scan.l" -case 140: -YY_RULE_SETUP -#line 206 "checkpolicy/policy_scan.l" -{ return(PCIDEVICECON);} - YY_BREAK -case 141: -#line 208 "checkpolicy/policy_scan.l" -case 142: -YY_RULE_SETUP -#line 208 "checkpolicy/policy_scan.l" -{ return(DEVICETREECON);} - YY_BREAK -case 143: -#line 210 "checkpolicy/policy_scan.l" -case 144: -YY_RULE_SETUP -#line 210 "checkpolicy/policy_scan.l" -{ return(FSUSEXATTR);} - YY_BREAK -case 145: -#line 212 "checkpolicy/policy_scan.l" -case 146: -YY_RULE_SETUP -#line 212 "checkpolicy/policy_scan.l" -{ return(FSUSETASK);} - YY_BREAK -case 147: -#line 214 "checkpolicy/policy_scan.l" -case 148: -YY_RULE_SETUP -#line 214 "checkpolicy/policy_scan.l" -{ return(FSUSETRANS);} - YY_BREAK -case 149: -#line 216 "checkpolicy/policy_scan.l" -case 150: -YY_RULE_SETUP -#line 216 "checkpolicy/policy_scan.l" -{ return(GENFSCON);} - YY_BREAK -case 151: -#line 218 "checkpolicy/policy_scan.l" -case 152: -YY_RULE_SETUP -#line 218 "checkpolicy/policy_scan.l" -{ return(R1); } - YY_BREAK -case 153: -#line 220 "checkpolicy/policy_scan.l" -case 154: -YY_RULE_SETUP -#line 220 "checkpolicy/policy_scan.l" -{ return(R2); } - YY_BREAK -case 155: -#line 222 "checkpolicy/policy_scan.l" -case 156: -YY_RULE_SETUP -#line 222 "checkpolicy/policy_scan.l" -{ return(R3); } - YY_BREAK -case 157: -#line 224 "checkpolicy/policy_scan.l" -case 158: -YY_RULE_SETUP -#line 224 "checkpolicy/policy_scan.l" -{ return(U1); } - YY_BREAK -case 159: -#line 226 "checkpolicy/policy_scan.l" -case 160: -YY_RULE_SETUP -#line 226 "checkpolicy/policy_scan.l" -{ return(U2); } - YY_BREAK -case 161: -#line 228 "checkpolicy/policy_scan.l" -case 162: -YY_RULE_SETUP -#line 228 "checkpolicy/policy_scan.l" -{ return(U3); } - YY_BREAK -case 163: -#line 230 "checkpolicy/policy_scan.l" -case 164: -YY_RULE_SETUP -#line 230 "checkpolicy/policy_scan.l" -{ return(T1); } - YY_BREAK -case 165: -#line 232 "checkpolicy/policy_scan.l" -case 166: -YY_RULE_SETUP -#line 232 "checkpolicy/policy_scan.l" -{ return(T2); } - YY_BREAK -case 167: -#line 234 "checkpolicy/policy_scan.l" -case 168: -YY_RULE_SETUP -#line 234 "checkpolicy/policy_scan.l" -{ return(T3); } - YY_BREAK -case 169: -#line 236 "checkpolicy/policy_scan.l" -case 170: -YY_RULE_SETUP -#line 236 "checkpolicy/policy_scan.l" -{ return(L1); } - YY_BREAK -case 171: -#line 238 "checkpolicy/policy_scan.l" -case 172: -YY_RULE_SETUP -#line 238 "checkpolicy/policy_scan.l" -{ return(L2); } - YY_BREAK -case 173: -#line 240 "checkpolicy/policy_scan.l" -case 174: -YY_RULE_SETUP -#line 240 "checkpolicy/policy_scan.l" -{ return(H1); } - YY_BREAK -case 175: -#line 242 "checkpolicy/policy_scan.l" -case 176: -YY_RULE_SETUP -#line 242 "checkpolicy/policy_scan.l" -{ return(H2); } - YY_BREAK -case 177: -#line 244 "checkpolicy/policy_scan.l" -case 178: -YY_RULE_SETUP -#line 244 "checkpolicy/policy_scan.l" -{ return(POLICYCAP); } - YY_BREAK -case 179: -#line 246 "checkpolicy/policy_scan.l" -case 180: -YY_RULE_SETUP -#line 246 "checkpolicy/policy_scan.l" -{ return(PERMISSIVE); } - YY_BREAK -case 181: -#line 248 "checkpolicy/policy_scan.l" -case 182: -YY_RULE_SETUP -#line 248 "checkpolicy/policy_scan.l" -{ return(DEFAULT_USER); } - YY_BREAK -case 183: -#line 250 "checkpolicy/policy_scan.l" -case 184: -YY_RULE_SETUP -#line 250 "checkpolicy/policy_scan.l" -{ return(DEFAULT_ROLE); } - YY_BREAK -case 185: -#line 252 "checkpolicy/policy_scan.l" -case 186: -YY_RULE_SETUP -#line 252 "checkpolicy/policy_scan.l" -{ return(DEFAULT_TYPE); } - YY_BREAK -case 187: -#line 254 "checkpolicy/policy_scan.l" -case 188: -YY_RULE_SETUP -#line 254 "checkpolicy/policy_scan.l" -{ return(DEFAULT_RANGE); } - YY_BREAK -case 189: -#line 256 "checkpolicy/policy_scan.l" -case 190: -YY_RULE_SETUP -#line 256 "checkpolicy/policy_scan.l" -{ return(LOW_HIGH); } - YY_BREAK -case 191: -#line 258 "checkpolicy/policy_scan.l" -case 192: -YY_RULE_SETUP -#line 258 "checkpolicy/policy_scan.l" -{ return(HIGH); } - YY_BREAK -case 193: -#line 260 "checkpolicy/policy_scan.l" -case 194: -YY_RULE_SETUP -#line 260 "checkpolicy/policy_scan.l" -{ return(LOW); } - YY_BREAK -case 195: -#line 262 "checkpolicy/policy_scan.l" -case 196: -YY_RULE_SETUP -#line 262 "checkpolicy/policy_scan.l" -{ return(GLBLUB); } - YY_BREAK -case 197: -YY_RULE_SETUP -#line 263 "checkpolicy/policy_scan.l" -{ return(PATH); } - YY_BREAK -case 198: -YY_RULE_SETUP -#line 264 "checkpolicy/policy_scan.l" -{ return(QPATH); } - YY_BREAK -case 199: -YY_RULE_SETUP -#line 265 "checkpolicy/policy_scan.l" -{ return(FILENAME); } - YY_BREAK -case 200: -YY_RULE_SETUP -#line 266 "checkpolicy/policy_scan.l" -{ return(IDENTIFIER); } - YY_BREAK -case 201: -YY_RULE_SETUP -#line 267 "checkpolicy/policy_scan.l" -{ return(NUMBER); } - YY_BREAK -case 202: -YY_RULE_SETUP -#line 268 "checkpolicy/policy_scan.l" -{ return(FILESYSTEM); } - YY_BREAK -case 203: -YY_RULE_SETUP -#line 269 "checkpolicy/policy_scan.l" -{ return(IPV4_ADDR); } - YY_BREAK -case 204: -YY_RULE_SETUP -#line 270 "checkpolicy/policy_scan.l" -{ return(IPV6_ADDR); } - YY_BREAK -case 205: -YY_RULE_SETUP -#line 271 "checkpolicy/policy_scan.l" -{ return(VERSION_IDENTIFIER); } - YY_BREAK -case 206: -YY_RULE_SETUP -#line 272 "checkpolicy/policy_scan.l" -{ set_source_file(yytext+9); } - YY_BREAK -case 207: -YY_RULE_SETUP -#line 273 "checkpolicy/policy_scan.l" -{ source_lineno = atoi(yytext+6)-1; } - YY_BREAK -case 208: -YY_RULE_SETUP -#line 274 "checkpolicy/policy_scan.l" -{ /* delete comments */ } - YY_BREAK -case 209: -YY_RULE_SETUP -#line 275 "checkpolicy/policy_scan.l" -{ /* delete whitespace */ } - YY_BREAK -case 210: -YY_RULE_SETUP -#line 276 "checkpolicy/policy_scan.l" -{ return(EQUALS); } - YY_BREAK -case 211: -YY_RULE_SETUP -#line 277 "checkpolicy/policy_scan.l" -{ return (NOTEQUAL); } - YY_BREAK -case 212: -YY_RULE_SETUP -#line 278 "checkpolicy/policy_scan.l" -{ return (AND); } - YY_BREAK -case 213: -YY_RULE_SETUP -#line 279 "checkpolicy/policy_scan.l" -{ return (OR); } - YY_BREAK -case 214: -YY_RULE_SETUP -#line 280 "checkpolicy/policy_scan.l" -{ return (NOT); } - YY_BREAK -case 215: -YY_RULE_SETUP -#line 281 "checkpolicy/policy_scan.l" -{ return (XOR); } - YY_BREAK -case 216: -#line 283 "checkpolicy/policy_scan.l" -case 217: -#line 284 "checkpolicy/policy_scan.l" -case 218: -#line 285 "checkpolicy/policy_scan.l" -case 219: -#line 286 "checkpolicy/policy_scan.l" -case 220: -#line 287 "checkpolicy/policy_scan.l" -case 221: -#line 288 "checkpolicy/policy_scan.l" -case 222: -#line 289 "checkpolicy/policy_scan.l" -case 223: -#line 290 "checkpolicy/policy_scan.l" -case 224: -#line 291 "checkpolicy/policy_scan.l" -case 225: -#line 292 "checkpolicy/policy_scan.l" -case 226: -#line 293 "checkpolicy/policy_scan.l" -case 227: -#line 294 "checkpolicy/policy_scan.l" -case 228: -YY_RULE_SETUP -#line 294 "checkpolicy/policy_scan.l" -{ return(yytext[0]); } - YY_BREAK -case 229: -YY_RULE_SETUP -#line 295 "checkpolicy/policy_scan.l" -{ yyerror("unrecognized character");} - YY_BREAK -case 230: -YY_RULE_SETUP -#line 296 "checkpolicy/policy_scan.l" -ECHO; - YY_BREAK -#line 2784 "checkpolicy/policy_scan.c" -case YY_STATE_EOF(INITIAL): - yyterminate(); - - 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 yyin at a new source and called - * yylex(). 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 = yyin; - 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 ( yywrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, 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 yylex */ - -/* 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); - yy_size_t 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 = (yy_size_t) ((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 - { - int 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 ) - { - int 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. */ - yyrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - 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; - yyrestart(yyin ); - } - - 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 ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (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); - - 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 >= 1154 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) 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 >= 1154 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - yy_is_jam = (yy_current_state == 1153); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - -#endif - -#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 */ - int 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. */ - yyrestart(yyin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap( ) ) - return 0; - - 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 yytext */ - (yy_hold_char) = *++(yy_c_buf_p); - - 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 yyrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - yy_create_buffer(yyin,YY_BUF_SIZE ); - } - - yy_init_buffer(YY_CURRENT_BUFFER,input_file ); - yy_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * yypop_buffer_state(); - * yypush_buffer_state(new_buffer); - */ - yyensure_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; - yy_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void yy_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; - yyin = 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 yy_create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_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 *) yyalloc((yy_size_t) (b->yy_buf_size + 2) ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with yy_create_buffer() - * - */ - void yy_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 ) - yyfree((void *) b->yy_ch_buf ); - - yyfree((void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a yyrestart() or at EOF. - */ - static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - yy_flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then yy_init_buffer was _probably_ - * called from yyrestart() 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 yy_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 ) - yy_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 yypush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - yyensure_buffer_stack(); - - /* This block is copied from yy_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 yy_switch_to_buffer. */ - yy_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 yypop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - yy_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 yyensure_buffer_stack (void) -{ - int 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; /* After all that talk, this was set to 1 anyways... */ - (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_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. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in yyensure_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 yy_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 NULL; - - b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = (int) (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 = NULL; - 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; - - yy_switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to yylex() 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 - * yy_scan_bytes() instead. - */ -YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) -{ - - return yy_scan_bytes(yystr,(int) strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to yylex() 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 yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) yyalloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_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 = yy_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_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 yynoreturn 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 yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int yyget_lineno (void) -{ - - return yylineno; -} - -/** Get the input stream. - * - */ -FILE *yyget_in (void) -{ - return yyin; -} - -/** Get the output stream. - * - */ -FILE *yyget_out (void) -{ - return yyout; -} - -/** Get the length of the current token. - * - */ -int yyget_leng (void) -{ - return yyleng; -} - -/** Get the current token. - * - */ - -char *yyget_text (void) -{ - return yytext; -} - -/** Set the current line number. - * @param _line_number line number - * - */ -void yyset_lineno (int _line_number ) -{ - - yylineno = _line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param _in_str A readable stream. - * - * @see yy_switch_to_buffer - */ -void yyset_in (FILE * _in_str ) -{ - yyin = _in_str ; -} - -void yyset_out (FILE * _out_str ) -{ - yyout = _out_str ; -} - -int yyget_debug (void) -{ - return yy_flex_debug; -} - -void yyset_debug (int _bdebug ) -{ - yy_flex_debug = _bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from yylex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = NULL; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = NULL; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = NULL; - yyout = NULL; -#endif - - /* For future reference: Set errno on error, since we are called by - * yylex_init() - */ - return 0; -} - -/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -int yylex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - yypop_buffer_state(); - } - - /* Destroy the stack itself. */ - yyfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * yylex() 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 *yyalloc (yy_size_t size ) -{ - return malloc(size); -} - -void *yyrealloc (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 realloc(ptr, size); -} - -void yyfree (void * ptr ) -{ - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 296 "checkpolicy/policy_scan.l" - - -int yyerror(const char *msg) -{ - if (source_file[0]) - fprintf(stderr, "%s:%ld:", - source_file, source_lineno); - else - fprintf(stderr, "(unknown source)::"); - fprintf(stderr, "ERROR '%s' at token '%s' on line %ld:\n%s\n%s\n", - msg, - yytext, - policydb_lineno, - linebuf[0], linebuf[1]); - policydb_errors++; - return -1; -} - -int yywarn(const char *msg) -{ - if (werror) - return yyerror(msg); - - if (source_file[0]) - fprintf(stderr, "%s:%ld:", - source_file, source_lineno); - else - fprintf(stderr, "(unknown source)::"); - fprintf(stderr, "WARNING '%s' at token '%s' on line %ld:\n%s\n%s\n", - msg, - yytext, - policydb_lineno, - linebuf[0], linebuf[1]); - return 0; -} - -void set_source_file(const char *name) -{ - source_lineno = 1; - strncpy(source_file, name, sizeof(source_file)-1); - source_file[sizeof(source_file)-1] = '\0'; - if (strlen(source_file) && source_file[strlen(source_file)-1] == '"') - source_file[strlen(source_file)-1] = '\0'; -} - diff --git a/checkpolicy/y.tab.c b/checkpolicy/y.tab.c deleted file mode 100644 index fa5c1487..00000000 --- a/checkpolicy/y.tab.c +++ /dev/null @@ -1,3854 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "3.0.4" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - - - - -/* Copy the first part of user declarations. */ -#line 32 "policy_parse.y" /* yacc.c:339 */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include "queue.h" -#include "checkpolicy.h" -#include "module_compiler.h" -#include "policy_define.h" - -extern policydb_t *policydbp; -extern unsigned int pass; - -extern char yytext[]; -extern int yylex(void); -extern int yywarn(const char *msg); -extern int yyerror(const char *msg); - -typedef int (* require_func_t)(int pass); - - -#line 102 "y.tab.c" /* yacc.c:339 */ - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "y.tab.h". */ -#ifndef YY_YY_Y_TAB_H_INCLUDED -# define YY_YY_Y_TAB_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - PATH = 258, - QPATH = 259, - FILENAME = 260, - CLONE = 261, - COMMON = 262, - CLASS = 263, - CONSTRAIN = 264, - VALIDATETRANS = 265, - INHERITS = 266, - SID = 267, - ROLE = 268, - ROLEATTRIBUTE = 269, - ATTRIBUTE_ROLE = 270, - ROLES = 271, - TYPEALIAS = 272, - TYPEATTRIBUTE = 273, - TYPEBOUNDS = 274, - TYPE = 275, - TYPES = 276, - ALIAS = 277, - ATTRIBUTE = 278, - EXPANDATTRIBUTE = 279, - BOOL = 280, - TUNABLE = 281, - IF = 282, - ELSE = 283, - TYPE_TRANSITION = 284, - TYPE_MEMBER = 285, - TYPE_CHANGE = 286, - ROLE_TRANSITION = 287, - RANGE_TRANSITION = 288, - SENSITIVITY = 289, - DOMINANCE = 290, - DOM = 291, - DOMBY = 292, - INCOMP = 293, - CATEGORY = 294, - LEVEL = 295, - RANGE = 296, - MLSCONSTRAIN = 297, - MLSVALIDATETRANS = 298, - USER = 299, - NEVERALLOW = 300, - ALLOW = 301, - AUDITALLOW = 302, - AUDITDENY = 303, - DONTAUDIT = 304, - ALLOWXPERM = 305, - AUDITALLOWXPERM = 306, - DONTAUDITXPERM = 307, - NEVERALLOWXPERM = 308, - SOURCE = 309, - TARGET = 310, - SAMEUSER = 311, - FSCON = 312, - PORTCON = 313, - NETIFCON = 314, - NODECON = 315, - IBPKEYCON = 316, - IBENDPORTCON = 317, - PIRQCON = 318, - IOMEMCON = 319, - IOPORTCON = 320, - PCIDEVICECON = 321, - DEVICETREECON = 322, - FSUSEXATTR = 323, - FSUSETASK = 324, - FSUSETRANS = 325, - GENFSCON = 326, - U1 = 327, - U2 = 328, - U3 = 329, - R1 = 330, - R2 = 331, - R3 = 332, - T1 = 333, - T2 = 334, - T3 = 335, - L1 = 336, - L2 = 337, - H1 = 338, - H2 = 339, - NOT = 340, - AND = 341, - OR = 342, - XOR = 343, - CTRUE = 344, - CFALSE = 345, - IDENTIFIER = 346, - NUMBER = 347, - EQUALS = 348, - NOTEQUAL = 349, - IPV4_ADDR = 350, - IPV6_ADDR = 351, - MODULE = 352, - VERSION_IDENTIFIER = 353, - REQUIRE = 354, - OPTIONAL = 355, - POLICYCAP = 356, - PERMISSIVE = 357, - FILESYSTEM = 358, - DEFAULT_USER = 359, - DEFAULT_ROLE = 360, - DEFAULT_TYPE = 361, - DEFAULT_RANGE = 362, - LOW_HIGH = 363, - LOW = 364, - HIGH = 365, - GLBLUB = 366 - }; -#endif -/* Tokens. */ -#define PATH 258 -#define QPATH 259 -#define FILENAME 260 -#define CLONE 261 -#define COMMON 262 -#define CLASS 263 -#define CONSTRAIN 264 -#define VALIDATETRANS 265 -#define INHERITS 266 -#define SID 267 -#define ROLE 268 -#define ROLEATTRIBUTE 269 -#define ATTRIBUTE_ROLE 270 -#define ROLES 271 -#define TYPEALIAS 272 -#define TYPEATTRIBUTE 273 -#define TYPEBOUNDS 274 -#define TYPE 275 -#define TYPES 276 -#define ALIAS 277 -#define ATTRIBUTE 278 -#define EXPANDATTRIBUTE 279 -#define BOOL 280 -#define TUNABLE 281 -#define IF 282 -#define ELSE 283 -#define TYPE_TRANSITION 284 -#define TYPE_MEMBER 285 -#define TYPE_CHANGE 286 -#define ROLE_TRANSITION 287 -#define RANGE_TRANSITION 288 -#define SENSITIVITY 289 -#define DOMINANCE 290 -#define DOM 291 -#define DOMBY 292 -#define INCOMP 293 -#define CATEGORY 294 -#define LEVEL 295 -#define RANGE 296 -#define MLSCONSTRAIN 297 -#define MLSVALIDATETRANS 298 -#define USER 299 -#define NEVERALLOW 300 -#define ALLOW 301 -#define AUDITALLOW 302 -#define AUDITDENY 303 -#define DONTAUDIT 304 -#define ALLOWXPERM 305 -#define AUDITALLOWXPERM 306 -#define DONTAUDITXPERM 307 -#define NEVERALLOWXPERM 308 -#define SOURCE 309 -#define TARGET 310 -#define SAMEUSER 311 -#define FSCON 312 -#define PORTCON 313 -#define NETIFCON 314 -#define NODECON 315 -#define IBPKEYCON 316 -#define IBENDPORTCON 317 -#define PIRQCON 318 -#define IOMEMCON 319 -#define IOPORTCON 320 -#define PCIDEVICECON 321 -#define DEVICETREECON 322 -#define FSUSEXATTR 323 -#define FSUSETASK 324 -#define FSUSETRANS 325 -#define GENFSCON 326 -#define U1 327 -#define U2 328 -#define U3 329 -#define R1 330 -#define R2 331 -#define R3 332 -#define T1 333 -#define T2 334 -#define T3 335 -#define L1 336 -#define L2 337 -#define H1 338 -#define H2 339 -#define NOT 340 -#define AND 341 -#define OR 342 -#define XOR 343 -#define CTRUE 344 -#define CFALSE 345 -#define IDENTIFIER 346 -#define NUMBER 347 -#define EQUALS 348 -#define NOTEQUAL 349 -#define IPV4_ADDR 350 -#define IPV6_ADDR 351 -#define MODULE 352 -#define VERSION_IDENTIFIER 353 -#define REQUIRE 354 -#define OPTIONAL 355 -#define POLICYCAP 356 -#define PERMISSIVE 357 -#define FILESYSTEM 358 -#define DEFAULT_USER 359 -#define DEFAULT_ROLE 360 -#define DEFAULT_TYPE 361 -#define DEFAULT_RANGE 362 -#define LOW_HIGH 363 -#define LOW 364 -#define HIGH 365 -#define GLBLUB 366 - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -union YYSTYPE -{ -#line 68 "policy_parse.y" /* yacc.c:355 */ - - unsigned int val; - uint64_t val64; - uintptr_t valptr; - void *ptr; - require_func_t require_func; - -#line 372 "y.tab.c" /* yacc.c:355 */ -}; - -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - -extern YYSTYPE yylval; - -int yyparse (void); - -#endif /* !YY_YY_Y_TAB_H_INCLUDED */ - -/* Copy the second part of user declarations. */ - -#line 389 "y.tab.c" /* yacc.c:358 */ - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#else -typedef signed char yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif - -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -# define YY_INITIAL_VALUE(Value) Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 9 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1378 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 122 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 198 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 407 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 817 - -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 366 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 117, 118, 121, 2, 116, 119, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 115, 114, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 112, 2, 113, 120, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111 -}; - -#if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 165, 165, 166, 168, 170, 173, 168, 177, 178, - 180, 183, 184, 186, 189, 191, 192, 194, 195, 197, - 200, 201, 203, 205, 207, 210, 211, 213, 214, 215, - 216, 217, 218, 219, 220, 222, 224, 227, 229, 232, - 234, 237, 239, 241, 243, 245, 247, 249, 252, 253, - 255, 257, 258, 260, 262, 265, 267, 269, 272, 273, - 275, 276, 278, 280, 283, 284, 286, 288, 291, 292, - 294, 295, 297, 300, 303, 304, 306, 307, 308, 309, - 310, 311, 313, 314, 315, 316, 317, 318, 319, 321, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, - 332, 334, 337, 340, 342, 345, 348, 351, 354, 355, - 357, 360, 363, 365, 368, 371, 374, 376, 378, 381, - 384, 387, 390, 393, 396, 399, 403, 406, 408, 410, - 412, 415, 418, 421, 424, 428, 430, 432, 434, 437, - 441, 445, 449, 454, 456, 458, 460, 463, 465, 468, - 469, 470, 471, 472, 473, 474, 475, 476, 478, 481, - 484, 487, 490, 493, 496, 499, 502, 505, 508, 511, - 514, 516, 518, 521, 524, 526, 529, 531, 534, 537, - 538, 540, 541, 543, 544, 546, 549, 552, 554, 557, - 560, 563, 566, 569, 572, 575, 575, 578, 578, 581, - 581, 584, 584, 587, 587, 590, 590, 593, 593, 596, - 596, 599, 599, 602, 605, 605, 608, 608, 611, 614, - 614, 617, 617, 620, 623, 626, 629, 632, 635, 639, - 641, 644, 646, 648, 650, 653, 654, 656, 659, 660, - 662, 663, 665, 668, 668, 670, 671, 673, 674, 675, - 676, 677, 679, 682, 684, 687, 689, 692, 695, 698, - 699, 701, 702, 704, 707, 709, 710, 712, 713, 715, - 717, 720, 721, 723, 724, 726, 728, 731, 732, 734, - 735, 737, 740, 741, 743, 744, 746, 749, 750, 752, - 753, 755, 757, 760, 761, 763, 764, 766, 768, 770, - 773, 774, 776, 777, 779, 781, 781, 783, 786, 789, - 791, 793, 795, 799, 801, 802, 804, 804, 805, 806, - 808, 811, 813, 814, 816, 818, 821, 823, 826, 827, - 829, 831, 833, 835, 837, 840, 843, 846, 846, 849, - 852, 855, 856, 857, 858, 859, 861, 862, 864, 867, - 868, 870, 872, 872, 874, 874, 874, 874, 876, 879, - 881, 884, 886, 889, 892, 895, 898, 901, 904, 909, - 914, 917, 919, 921, 923, 925, 926, 928, 929, 930, - 931, 932, 933, 935, 937, 938, 940, 941, 943, 946, - 947, 948, 949, 950, 951, 952, 953, 954, 956, 958, - 962, 961, 966, 968, 970, 973, 976, 977 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || 0 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "PATH", "QPATH", "FILENAME", "CLONE", - "COMMON", "CLASS", "CONSTRAIN", "VALIDATETRANS", "INHERITS", "SID", - "ROLE", "ROLEATTRIBUTE", "ATTRIBUTE_ROLE", "ROLES", "TYPEALIAS", - "TYPEATTRIBUTE", "TYPEBOUNDS", "TYPE", "TYPES", "ALIAS", "ATTRIBUTE", - "EXPANDATTRIBUTE", "BOOL", "TUNABLE", "IF", "ELSE", "TYPE_TRANSITION", - "TYPE_MEMBER", "TYPE_CHANGE", "ROLE_TRANSITION", "RANGE_TRANSITION", - "SENSITIVITY", "DOMINANCE", "DOM", "DOMBY", "INCOMP", "CATEGORY", - "LEVEL", "RANGE", "MLSCONSTRAIN", "MLSVALIDATETRANS", "USER", - "NEVERALLOW", "ALLOW", "AUDITALLOW", "AUDITDENY", "DONTAUDIT", - "ALLOWXPERM", "AUDITALLOWXPERM", "DONTAUDITXPERM", "NEVERALLOWXPERM", - "SOURCE", "TARGET", "SAMEUSER", "FSCON", "PORTCON", "NETIFCON", - "NODECON", "IBPKEYCON", "IBENDPORTCON", "PIRQCON", "IOMEMCON", - "IOPORTCON", "PCIDEVICECON", "DEVICETREECON", "FSUSEXATTR", "FSUSETASK", - "FSUSETRANS", "GENFSCON", "U1", "U2", "U3", "R1", "R2", "R3", "T1", "T2", - "T3", "L1", "L2", "H1", "H2", "NOT", "AND", "OR", "XOR", "CTRUE", - "CFALSE", "IDENTIFIER", "NUMBER", "EQUALS", "NOTEQUAL", "IPV4_ADDR", - "IPV6_ADDR", "MODULE", "VERSION_IDENTIFIER", "REQUIRE", "OPTIONAL", - "POLICYCAP", "PERMISSIVE", "FILESYSTEM", "DEFAULT_USER", "DEFAULT_ROLE", - "DEFAULT_TYPE", "DEFAULT_RANGE", "LOW_HIGH", "LOW", "HIGH", "GLBLUB", - "'{'", "'}'", "';'", "':'", "','", "'('", "')'", "'-'", "'~'", "'*'", - "$accept", "policy", "base_policy", "$@1", "$@2", "$@3", "classes", - "class_def", "initial_sids", "initial_sid_def", "access_vectors", - "opt_common_perms", "common_perms", "common_perms_def", "av_perms", - "av_perms_def", "opt_default_rules", "default_rules", "default_user_def", - "default_role_def", "default_type_def", "default_range_def", "opt_mls", - "mls", "sensitivities", "sensitivity_def", "alias_def", "dominance", - "opt_categories", "categories", "category_def", "levels", "level_def", - "mlspolicy", "mlspolicy_decl", "mlsconstraint_def", - "mlsvalidatetrans_def", "te_rbac", "te_rbac_decl", "rbac_decl", - "te_decl", "attribute_def", "expandattribute_def", "type_def", - "typealias_def", "typeattribute_def", "typebounds_def", "opt_attr_list", - "bool_def", "tunable_def", "bool_val", "cond_stmt_def", "cond_else", - "cond_expr", "cond_expr_prim", "cond_pol_list", "cond_rule_def", - "cond_transition_def", "cond_te_avtab_def", "cond_allow_def", - "cond_auditallow_def", "cond_auditdeny_def", "cond_dontaudit_def", - "transition_def", "range_trans_def", "te_avtab_def", "allow_def", - "auditallow_def", "auditdeny_def", "dontaudit_def", "neverallow_def", - "xperm_allow_def", "xperm_auditallow_def", "xperm_dontaudit_def", - "xperm_neverallow_def", "attribute_role_def", "role_type_def", - "role_attr_def", "role_dominance", "role_trans_def", "role_allow_def", - "roles", "role_def", "roleattribute_def", "opt_constraints", - "constraints", "constraint_decl", "constraint_def", "validatetrans_def", - "cexpr", "cexpr_prim", "$@4", "$@5", "$@6", "$@7", "$@8", "$@9", "$@10", - "$@11", "$@12", "$@13", "$@14", "$@15", "$@16", "op", "role_mls_op", - "users", "user_def", "opt_mls_user", "initial_sid_contexts", - "initial_sid_context_def", "opt_dev_contexts", "dev_contexts", - "dev_context_def", "pirq_context_def", "iomem_context_def", - "ioport_context_def", "pci_context_def", "dtree_context_def", - "opt_fs_contexts", "fs_contexts", "fs_context_def", "net_contexts", - "opt_port_contexts", "port_contexts", "port_context_def", - "opt_ibpkey_contexts", "ibpkey_contexts", "ibpkey_context_def", - "opt_ibendport_contexts", "ibendport_contexts", "ibendport_context_def", - "opt_netif_contexts", "netif_contexts", "netif_context_def", - "opt_node_contexts", "node_contexts", "node_context_def", "opt_fs_uses", - "fs_uses", "fs_use_def", "opt_genfs_contexts", "genfs_contexts", - "genfs_context_def", "$@17", "ipv4_addr_def", "xperms", - "nested_xperm_set", "nested_xperm_list", "nested_xperm_element", "$@18", - "xperm", "security_context_def", "opt_mls_range_def", "mls_range_def", - "mls_level_def", "id_comma_list", "tilde", "asterisk", "names", "$@19", - "tilde_push", "asterisk_push", "names_push", "identifier_list_push", - "identifier_push", "identifier_list", "nested_id_set", "nested_id_list", - "nested_id_element", "$@20", "identifier", "filesystem", "path", - "filename", "number", "number64", "ipv6_addr", "policycap_def", - "permissive_def", "module_policy", "module_def", "version_identifier", - "avrules_block", "avrule_decls", "avrule_decl", "require_block", - "require_list", "require_decl", "require_class", "require_decl_def", - "require_id_list", "optional_block", "$@21", "optional_else", - "optional_decl", "else_decl", "avrule_user_defs", YY_NULLPTR -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 123, 125, 59, 58, 44, 40, 41, 45, - 126, 42 -}; -# endif - -#define YYPACT_NINF -714 - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-714))) - -#define YYTABLE_NINF -232 - -#define yytable_value_is_error(Yytable_value) \ - 0 - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - -33, -17, 111, -714, 179, -714, 834, -714, 259, -714, - -17, 198, -714, -17, -17, -17, -17, -17, -17, -17, - -17, 93, -17, -17, 92, 93, 93, 93, 93, 93, - 48, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 81, -714, -17, -714, -714, -714, -714, -714, -714, -714, - -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, - -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, - -714, -714, -714, -714, -714, -714, 508, -714, -714, -714, - 113, -714, -714, -714, -714, -714, 126, -714, -17, -714, - 106, -714, 10, -17, 219, 330, -17, -17, 16, 254, - -26, -714, -714, -31, -714, 248, -714, 147, 248, 248, - 92, 92, 186, -714, -714, 93, 93, 93, 93, 93, - 288, 93, 93, 93, 93, 93, 93, 93, 93, 93, - 177, 257, -17, 311, -714, -714, 834, -714, -714, -17, - -714, -714, 350, 356, -714, 93, -17, 265, 286, -714, - -714, 93, 268, 300, 303, 283, 289, -714, -714, -714, - 107, -714, -714, -714, -714, -714, -714, 310, -714, 324, - 328, 249, 70, 92, 92, 92, 92, 92, -714, 347, - 360, 372, 89, 170, 363, 20, -714, 387, 162, 388, - 389, 390, 394, 395, 396, 404, -17, -714, -714, -714, - -714, -714, -714, -714, -714, -714, 22, -714, 358, -17, - -714, 491, -714, 411, 417, 199, -17, 350, -714, -714, - 416, 400, -714, -714, -17, -714, -714, -714, -714, 428, - -714, -17, -714, -714, -714, -17, -714, -714, -714, 249, - 174, 253, -714, -714, 24, 93, 93, 93, 93, 430, - 93, 431, 398, 432, -714, 322, -714, -714, 93, -714, - 93, 93, 93, 93, 93, 93, 93, 93, 93, -714, - -714, -714, -714, 321, 93, -714, -17, 93, 93, 93, - 93, 512, 199, -714, -714, -714, -714, 18, -714, -714, - -714, -714, -714, -714, 93, 93, 93, 93, 93, 93, - 93, 520, -714, -714, -714, -714, -714, -714, -714, -714, - -17, -17, -17, -17, -714, -17, -714, -17, -17, 288, - -714, 93, 93, 93, 93, 93, -17, -17, -17, -17, - -714, -714, -17, 509, 522, -16, -714, 402, 405, 425, - 25, -17, 939, -714, 447, -714, -714, -714, -714, -714, - -17, -17, 93, 93, 93, 93, 93, 93, 93, 439, - -714, 6, 448, 449, 451, 452, -714, 400, 21, 453, - 454, 455, 456, 458, 2, 2, 2, 2, -714, -17, - 459, -714, -714, 462, -714, -714, 461, 463, 464, 465, - 466, 467, 267, 279, 468, 14, -17, -714, 620, -714, - -714, -714, -714, -714, -714, 208, -714, 525, 471, 187, - 469, 470, 472, 473, 474, 476, 477, -714, -714, -714, - 479, -714, -714, -714, -714, -714, -714, -714, -714, -714, - -714, 32, 480, -714, -714, 32, -714, 481, 482, 483, - 545, -714, 834, -714, -714, -714, -714, -714, -714, 484, - 485, 486, 487, 488, 489, -714, -714, 490, 492, -714, - 152, -714, -17, -714, -17, 550, 525, -714, -17, -714, - 93, 93, 93, 93, 93, 93, 93, 119, -714, -714, - 232, -714, 494, -714, -714, -714, -714, -714, -714, -17, - 496, -714, -714, -714, -714, -714, -714, -714, -714, 93, - 93, -714, 475, -714, -714, -714, -714, 202, 28, -17, - 351, -714, -714, 216, -17, -17, -17, 93, 93, 93, - 93, -714, -714, -714, -714, -714, -714, 93, 173, 593, - -714, -714, -714, 497, 376, 93, 93, -714, 450, -714, - -714, -714, -714, 15, 498, 500, 501, 502, 503, 504, - 528, 173, 46, 95, 244, -714, 401, 401, 401, 46, - 401, 401, 401, 401, 401, 46, 46, 46, 173, 173, - 149, -714, -17, 86, -714, -714, -714, -17, 93, 173, - -714, -714, 507, -714, -714, -714, -714, -714, -714, -714, - 151, -714, -714, -714, -714, -714, -714, -714, -714, -714, - -714, -714, 551, -714, -714, 547, 549, -714, -714, 548, - -714, -714, 323, 542, 357, -714, 83, 173, 173, -714, - -17, 528, -714, 352, 571, -714, 339, 173, 157, -714, - -714, 121, 121, 121, 121, -714, 121, 121, 121, 121, - -714, 121, 121, -714, 121, 121, 121, -714, -714, -714, - -714, -714, -714, -714, -714, 543, -714, 515, 528, 245, - -17, -17, 560, 352, -714, -714, -714, 183, -714, 363, - -714, -714, 241, -714, -714, -714, -714, -714, -714, -714, - -714, -714, -714, -714, -714, -714, -714, -714, -17, -17, - -714, -714, -17, -17, -17, 245, 574, 560, -714, -714, - -714, 217, -714, 363, -714, 521, -17, 527, 534, 540, - 493, -17, 346, 583, 574, -714, -714, -714, -714, 228, - -17, -714, -714, -714, -714, -714, -714, -15, 528, 528, - 564, 528, 528, 493, 596, 346, -714, -714, -714, -714, - -714, -714, -17, 598, 583, -714, -714, -714, 546, 80, - -714, 88, -17, -714, 98, 103, -17, -17, 567, 612, - 596, -714, -714, -17, 403, -714, 598, -714, -714, -17, - -714, -714, -17, 528, -714, -714, 564, -714, 528, -714, - -714, -714, -714, 528, -17, -714, 612, -714, -714, -17, - 580, 567, -714, -714, -17, -714, -17, -17, -17, 140, - 528, -714, -714, -17, -17, -714, -714, -714, -714, 528, - -714, -17, -714, -714, -17, -714, -714 -}; - - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_uint16 yydefact[] = -{ - 4, 0, 0, 2, 0, 3, 0, 358, 0, 1, - 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 404, 0, 382, 377, 378, 89, 90, 91, 92, - 93, 94, 95, 96, 379, 97, 98, 99, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 82, 83, 88, - 84, 85, 86, 87, 100, 369, 407, 376, 380, 381, - 0, 364, 308, 371, 373, 372, 0, 10, 0, 9, - 16, 11, 109, 0, 0, 0, 0, 0, 109, 0, - 0, 330, 331, 0, 334, 0, 333, 332, 0, 0, - 0, 0, 0, 124, 125, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 407, 375, 374, 0, 370, 13, 0, - 12, 5, 0, 15, 17, 0, 0, 0, 0, 328, - 167, 0, 0, 0, 0, 109, 0, 101, 355, 357, - 0, 352, 354, 336, 335, 112, 113, 0, 337, 0, - 0, 118, 0, 0, 0, 0, 0, 0, 127, 0, - 0, 0, 0, 0, 0, 0, 174, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 389, 392, 390, - 391, 394, 395, 396, 397, 393, 0, 385, 0, 0, - 368, 0, 406, 0, 0, 26, 0, 14, 20, 18, - 0, 108, 169, 178, 0, 55, 105, 106, 107, 0, - 104, 0, 351, 353, 102, 0, 110, 111, 117, 119, - 120, 121, 122, 123, 0, 0, 0, 0, 0, 0, - 0, 0, 325, 327, 348, 0, 170, 175, 0, 173, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 383, - 384, 386, 398, 0, 0, 400, 0, 0, 0, 0, - 0, 49, 25, 27, 28, 29, 30, 0, 21, 168, - 329, 103, 356, 338, 0, 0, 0, 0, 0, 0, - 0, 116, 126, 128, 129, 135, 136, 137, 138, 130, - 0, 0, 0, 0, 171, 0, 147, 0, 0, 0, - 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 388, 387, 0, 239, 403, 0, 349, 0, 0, 0, - 0, 0, 0, 48, 0, 51, 31, 32, 33, 34, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 114, 0, 0, 0, 0, 0, 324, 326, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 399, 0, - 0, 405, 401, 0, 19, 350, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 81, 0, 74, - 77, 76, 78, 80, 79, 0, 52, 59, 23, 0, - 0, 0, 0, 0, 0, 0, 0, 127, 363, 144, - 0, 145, 146, 172, 148, 177, 162, 158, 159, 160, - 161, 0, 0, 310, 309, 0, 320, 0, 0, 0, - 0, 237, 0, 35, 36, 37, 38, 39, 40, 0, - 0, 0, 0, 0, 0, 47, 54, 0, 0, 75, - 180, 235, 0, 56, 0, 0, 58, 60, 0, 22, - 0, 0, 0, 0, 0, 0, 0, 0, 143, 319, - 0, 314, 318, 163, 312, 311, 164, 165, 166, 0, - 0, 43, 41, 42, 46, 44, 45, 53, 367, 0, - 0, 6, 179, 181, 183, 184, 236, 0, 0, 0, - 0, 64, 61, 0, 0, 0, 0, 0, 0, 0, - 0, 115, 313, 315, 316, 238, 402, 0, 0, 0, - 182, 57, 63, 0, 0, 0, 0, 65, 50, 68, - 70, 71, 24, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 213, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 191, 0, 260, 240, 62, 67, 0, 0, 0, - 69, 132, 0, 133, 134, 139, 140, 141, 142, 317, - 0, 232, 233, 234, 229, 230, 231, 218, 214, 219, - 216, 221, 195, 197, 199, 201, 0, 203, 205, 207, - 209, 211, 0, 0, 0, 188, 0, 0, 0, 186, - 0, 0, 241, 294, 259, 261, 0, 0, 0, 131, - 185, 0, 0, 0, 0, 192, 0, 0, 0, 0, - 193, 0, 0, 194, 0, 0, 0, 223, 227, 224, - 228, 225, 226, 187, 189, 190, 242, 0, 0, 0, - 0, 0, 301, 293, 295, 262, 66, 0, 73, 0, - 339, 340, 0, 343, 215, 341, 220, 217, 222, 196, - 198, 200, 202, 204, 206, 208, 210, 212, 0, 0, - 360, 359, 0, 0, 0, 0, 266, 300, 302, 296, - 72, 0, 346, 0, 344, 0, 0, 0, 0, 0, - 0, 0, 244, 283, 265, 267, 303, 342, 347, 0, - 0, 263, 297, 298, 299, 361, 362, 0, 0, 0, - 0, 0, 0, 0, 272, 243, 245, 247, 248, 249, - 250, 251, 0, 288, 282, 284, 268, 345, 323, 0, - 307, 0, 0, 365, 0, 0, 0, 0, 0, 278, - 271, 273, 246, 0, 0, 264, 287, 289, 285, 0, - 321, 305, 0, 0, 269, 252, 0, 253, 0, 255, - 257, 258, 366, 0, 0, 7, 277, 279, 274, 0, - 0, 0, 290, 322, 0, 304, 0, 0, 0, 0, - 0, 280, 286, 0, 0, 306, 270, 254, 256, 0, - 275, 0, 291, 292, 0, 281, 276 -}; - - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -714, -714, -714, -714, -714, -714, -714, 665, -714, 587, - -714, -714, -714, 535, -714, 478, -714, -714, 397, 399, - 407, 408, -714, -714, -714, 336, -93, -714, -714, -714, - 218, -714, 172, -714, 145, -714, -714, -714, 287, -298, - -273, -714, -714, -714, -714, -714, -714, -52, -714, -714, - 392, -257, -714, -22, -714, 269, -714, -714, -714, -714, - -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, - -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, - -714, 375, -177, -714, -714, -714, 194, -714, -714, -511, - -714, -714, -714, -714, -714, -714, -714, -714, -714, -714, - -714, -714, -714, -714, -112, -169, -714, -359, -714, -714, - 124, -714, -714, -37, -714, -714, -714, -714, -714, -714, - -714, 76, -714, -714, -714, -13, -714, -714, -58, -714, - -714, -83, -714, -714, -40, -714, -714, -60, -714, -714, - 44, -714, -714, 11, -714, -673, 54, -368, -714, 229, - -714, -403, -371, -714, -311, -274, -94, -350, -272, 800, - -714, -714, -714, -168, 8, -183, -341, -41, -714, 552, - -714, -1, 19, -20, 175, 41, -61, -713, -714, -714, - -714, -714, -714, -129, -714, 640, -238, -714, 511, -714, - -714, -714, -252, -714, -714, -714, -714, 590 -}; - - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 2, 3, 4, 215, 529, 11, 12, 90, 91, - 141, 142, 143, 144, 217, 218, 281, 282, 283, 284, - 285, 286, 342, 343, 344, 345, 152, 407, 465, 466, - 467, 510, 511, 538, 539, 540, 541, 398, 399, 44, - 45, 46, 47, 48, 49, 50, 51, 147, 52, 53, - 167, 54, 360, 112, 113, 244, 302, 303, 304, 305, - 306, 307, 308, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 185, 186, 73, 501, 502, 503, 504, 505, 570, - 571, 636, 637, 638, 639, 641, 642, 644, 645, 646, - 631, 633, 632, 634, 596, 597, 460, 133, 380, 573, - 574, 734, 735, 736, 737, 738, 739, 740, 741, 623, - 624, 625, 712, 713, 714, 715, 759, 760, 761, 785, - 786, 787, 743, 744, 745, 765, 766, 767, 662, 663, - 664, 696, 697, 698, 794, 84, 432, 433, 480, 481, - 550, 434, 656, 770, 251, 252, 148, 103, 104, 105, - 235, 672, 673, 674, 701, 675, 335, 106, 160, 161, - 231, 107, 692, 727, 420, 436, 754, 783, 403, 74, - 5, 6, 86, 75, 76, 77, 78, 206, 207, 208, - 209, 273, 79, 334, 382, 80, 383, 135 -}; - - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_int16 yytable[] = -{ - 8, 255, 153, 154, 365, 155, 309, 213, 257, 87, - 409, 418, 92, 93, 94, 95, 96, 97, 98, 99, - 418, 108, 109, 114, 435, 435, 435, 435, 482, 350, - 196, 145, 485, 184, 184, 197, 151, 198, 151, 461, - 590, 131, 199, 366, 400, 200, 156, 201, 202, 85, - 151, 791, 221, 294, 295, 296, 203, 615, 616, 159, - 7, 204, 163, 479, 1, 7, 205, 484, 628, 401, - 297, 298, 299, 300, 7, 7, 7, 482, 804, 392, - 393, 100, 591, 592, 593, 402, 100, 138, 171, 172, - 404, 790, 149, 158, 81, 149, 149, 384, 572, 162, - 400, 506, 164, 229, 749, 440, 654, 655, 598, 114, - 114, 9, 479, 139, 431, 599, 667, 803, 88, 159, - 419, 507, 101, 40, 81, 401, 146, 513, 456, 581, - 351, 211, 146, 256, 425, 269, 394, 301, 214, 594, - 595, 402, 532, 621, 431, 149, 404, 589, 294, 295, - 296, 239, 240, 241, 242, 243, 173, 174, 175, 162, - 120, 499, 500, 176, 177, 297, 298, 299, 300, 617, - 618, 7, 114, 114, 114, 114, 114, 110, 525, 7, - 7, 249, 253, 7, 7, 196, 552, 10, 238, 7, - 197, 257, 198, 130, 7, 268, 132, 199, 7, 771, - 200, 653, 201, 202, 248, 100, 10, 773, 272, 111, - 88, 203, 254, 101, 102, 287, 204, 776, 40, 100, - 232, 205, 778, 290, 367, 136, 158, 553, 554, 555, - 292, 7, 521, 669, 293, 617, 618, 617, 618, 309, - 137, 101, 102, 617, 618, 556, 557, 558, 559, 560, - 561, 562, 563, 564, 565, 566, 567, 600, 568, 809, - 173, 7, 175, 619, 601, 630, 168, 176, 177, 617, - 618, 668, 173, 174, 175, 336, 259, 260, 7, 176, - 177, 670, 670, 670, 670, 250, 670, 670, 670, 670, - 569, 670, 670, 7, 670, 670, 670, 700, 178, 7, - 469, 184, 457, 277, 278, 279, 280, 7, 254, 361, - 362, 363, 364, 490, 253, 531, 253, 149, 706, 254, - 462, 707, 708, 709, 81, 374, 375, 376, 377, 542, - 717, 378, 254, 150, 385, 721, 690, 165, 166, 173, - 395, 747, 176, 177, 431, 522, 176, 177, 691, 408, - 336, 81, 151, 703, 82, 132, 750, 83, 216, 671, - 671, 671, 671, 139, 671, 671, 671, 671, 157, 671, - 671, 210, 671, 671, 671, 449, 450, 451, 253, 222, - 774, 775, 226, 777, 779, 780, 781, 452, 453, 454, - 606, 509, 789, 535, 536, 458, 612, 613, 614, 146, - 223, 795, 224, 230, 463, 647, 648, 649, 385, 729, - 730, 731, 732, 733, 227, 533, 224, 228, 802, 224, - 659, 660, 661, 805, 234, 806, 807, 808, 810, 437, - 438, 439, 812, 813, 319, 331, 320, 332, 236, 651, - 815, 652, 237, 816, 602, 603, 604, 605, 607, 608, - 609, 610, 611, 666, 254, 224, 386, 387, 793, 388, - 389, 336, 245, 508, 676, 677, 678, 336, 679, 680, - 681, 682, 271, 683, 684, 246, 685, 686, 687, 390, - 391, 341, 405, 626, 499, 500, 702, 247, 253, 704, - 576, 577, 535, 536, 594, 595, 725, 726, 82, 782, - 169, 170, 258, 261, 262, 263, 385, 274, 534, 264, - 265, 266, 385, 543, 544, 545, 224, 317, 718, 267, - 702, 13, 14, 15, 275, 16, 17, 18, 19, 276, - 289, 20, 21, 22, 23, 24, 718, 25, 26, 27, - 28, 29, 291, 30, 314, 316, 341, 318, 359, 379, - 381, 417, 132, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 421, 422, 464, 423, 424, 426, 427, 428, - 429, 620, 430, 441, 442, 443, 149, 444, 445, 446, - 447, 448, 455, 468, 470, 471, 489, 472, 473, 474, - 509, 475, 476, 478, 483, 486, 487, 488, 491, 492, - 493, 494, 495, 496, 497, 572, 498, 40, 41, 526, - 42, 575, 583, 524, 584, 585, 586, 587, 588, 657, - 81, 629, 43, -231, 635, 640, 650, 643, 621, 617, - 688, 695, 711, 13, 14, 15, 720, 16, 17, 18, - 19, 722, 742, 20, 21, 22, 23, 24, 723, 25, - 26, 27, 28, 29, 724, 30, 753, 758, 764, 693, - 694, 769, 658, 782, 132, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 784, 82, 89, 140, 219, 346, - 406, 347, 537, 580, 512, 459, 477, 705, 657, 348, - 349, 657, 657, 657, 368, 288, 530, 622, 762, 689, - 665, 746, 788, 801, 768, 657, 792, 699, 716, 523, - 728, 719, 233, 757, 710, 797, 134, 270, 582, 748, - 41, 396, 42, 212, 0, 0, 657, 0, 0, 0, - 0, 0, 0, 0, 397, 0, 0, 0, 0, 0, - 0, 763, 0, 0, 0, 0, 0, 0, 772, 0, - 657, 657, 0, 657, 657, 657, 657, 0, 0, 0, - 0, 0, 657, 0, 0, 0, 0, 0, 253, 751, - 752, 657, 755, 756, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 800, 0, 0, 0, 0, 657, 0, - 0, 0, 0, 657, 0, 657, 657, 657, 657, 0, - 0, 0, 657, 657, 0, 0, 0, 0, 0, 0, - 657, 0, 0, 657, 796, 0, 0, 0, 0, 798, - 0, 0, 0, 0, 799, 115, 116, 117, 118, 119, - 0, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 0, 811, 0, 0, 0, 0, 0, 13, 14, 15, - 814, 16, 17, 18, 19, 0, 0, 20, 21, 22, - 23, 24, 0, 25, 26, 27, 28, 29, 0, 30, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 179, 180, 181, 182, 183, - 0, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 0, 0, 0, 40, 41, 0, 42, 0, 0, 0, - 0, 0, 0, 0, 0, 220, 0, 0, 43, 0, - 0, 225, 13, 14, 15, 0, 16, 17, 18, 19, - 0, 0, 20, 21, 22, 23, 24, 0, 25, 26, - 27, 28, 29, 0, 30, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, - 396, 42, 0, 0, 0, 310, 311, 312, 313, 0, - 315, 0, 0, 397, 0, 0, 0, 0, 321, 0, - 322, 323, 324, 325, 326, 327, 328, 329, 330, 0, - 0, 0, 0, 0, 333, 0, 0, 337, 338, 339, - 340, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 352, 353, 354, 355, 356, 357, - 358, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 369, 370, 371, 372, 373, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 410, 411, 412, 413, 414, 415, 416, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 514, 515, 516, 517, 518, 519, 520, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 527, - 528, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 546, 547, 548, - 549, 0, 0, 0, 0, 0, 0, 551, 0, 0, - 0, 0, 0, 0, 0, 578, 579, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 627 -}; - -static const yytype_int16 yycheck[] = -{ - 1, 184, 96, 97, 315, 98, 244, 136, 185, 10, - 351, 5, 13, 14, 15, 16, 17, 18, 19, 20, - 5, 22, 23, 24, 374, 375, 376, 377, 431, 11, - 8, 21, 435, 13, 13, 13, 22, 15, 22, 398, - 551, 42, 20, 317, 342, 23, 98, 25, 26, 8, - 22, 764, 146, 29, 30, 31, 34, 568, 569, 100, - 91, 39, 103, 431, 97, 91, 44, 435, 579, 342, - 46, 47, 48, 49, 91, 91, 91, 480, 791, 54, - 55, 112, 36, 37, 38, 342, 112, 88, 110, 111, - 342, 764, 93, 119, 92, 96, 97, 113, 12, 100, - 398, 460, 103, 155, 119, 379, 617, 618, 13, 110, - 111, 0, 480, 7, 112, 20, 627, 790, 12, 160, - 114, 462, 120, 99, 92, 398, 116, 468, 114, 114, - 112, 132, 116, 113, 113, 113, 111, 113, 139, 93, - 94, 398, 114, 57, 112, 146, 398, 550, 29, 30, - 31, 173, 174, 175, 176, 177, 86, 87, 88, 160, - 112, 9, 10, 93, 94, 46, 47, 48, 49, 86, - 87, 91, 173, 174, 175, 176, 177, 85, 489, 91, - 91, 182, 183, 91, 91, 8, 13, 8, 118, 91, - 13, 368, 15, 112, 91, 196, 44, 20, 91, 119, - 23, 118, 25, 26, 115, 112, 8, 119, 209, 117, - 12, 34, 91, 120, 121, 216, 39, 119, 99, 112, - 113, 44, 119, 224, 318, 112, 119, 54, 55, 56, - 231, 91, 113, 112, 235, 86, 87, 86, 87, 477, - 114, 120, 121, 86, 87, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 13, 85, 119, - 86, 91, 88, 114, 20, 114, 119, 93, 94, 86, - 87, 114, 86, 87, 88, 276, 114, 115, 91, 93, - 94, 631, 632, 633, 634, 115, 636, 637, 638, 639, - 117, 641, 642, 91, 644, 645, 646, 114, 112, 91, - 113, 13, 395, 104, 105, 106, 107, 91, 91, 310, - 311, 312, 313, 442, 315, 113, 317, 318, 689, 91, - 112, 692, 693, 694, 92, 326, 327, 328, 329, 113, - 113, 332, 91, 114, 335, 706, 91, 89, 90, 86, - 341, 113, 93, 94, 112, 113, 93, 94, 103, 350, - 351, 92, 22, 112, 95, 44, 727, 98, 8, 631, - 632, 633, 634, 7, 636, 637, 638, 639, 114, 641, - 642, 114, 644, 645, 646, 108, 109, 110, 379, 114, - 751, 752, 114, 754, 755, 756, 757, 108, 109, 110, - 559, 40, 763, 42, 43, 396, 565, 566, 567, 116, - 114, 772, 116, 114, 405, 82, 83, 84, 409, 63, - 64, 65, 66, 67, 114, 508, 116, 114, 789, 116, - 68, 69, 70, 794, 114, 796, 797, 798, 799, 375, - 376, 377, 803, 804, 112, 114, 114, 116, 114, 82, - 811, 84, 114, 814, 556, 557, 558, 559, 560, 561, - 562, 563, 564, 114, 91, 116, 54, 55, 769, 54, - 55, 462, 115, 464, 632, 633, 634, 468, 636, 637, - 638, 639, 114, 641, 642, 115, 644, 645, 646, 54, - 55, 34, 35, 577, 9, 10, 669, 115, 489, 672, - 114, 115, 42, 43, 93, 94, 3, 4, 95, 96, - 108, 109, 115, 115, 115, 115, 507, 16, 509, 115, - 115, 115, 513, 514, 515, 516, 116, 119, 701, 115, - 703, 13, 14, 15, 113, 17, 18, 19, 20, 112, - 114, 23, 24, 25, 26, 27, 719, 29, 30, 31, - 32, 33, 114, 35, 114, 114, 34, 115, 28, 40, - 28, 112, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 114, 114, 39, 114, 114, 114, 114, 114, - 114, 572, 114, 114, 112, 114, 577, 114, 114, 114, - 114, 114, 114, 112, 115, 115, 41, 115, 115, 115, - 40, 115, 115, 114, 114, 114, 114, 114, 114, 114, - 114, 114, 114, 114, 114, 12, 114, 99, 100, 113, - 102, 114, 114, 119, 114, 114, 114, 114, 114, 620, - 92, 114, 114, 76, 73, 76, 84, 79, 57, 86, - 115, 71, 58, 13, 14, 15, 115, 17, 18, 19, - 20, 114, 59, 23, 24, 25, 26, 27, 114, 29, - 30, 31, 32, 33, 114, 35, 92, 61, 60, 660, - 661, 115, 621, 96, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 62, 95, 11, 90, 143, 282, - 344, 282, 510, 538, 466, 398, 417, 688, 689, 282, - 282, 692, 693, 694, 319, 217, 502, 573, 735, 658, - 624, 714, 760, 786, 744, 706, 766, 663, 697, 480, - 711, 703, 160, 733, 695, 776, 76, 206, 543, 720, - 100, 101, 102, 133, -1, -1, 727, -1, -1, -1, - -1, -1, -1, -1, 114, -1, -1, -1, -1, -1, - -1, 742, -1, -1, -1, -1, -1, -1, 749, -1, - 751, 752, -1, 754, 755, 756, 757, -1, -1, -1, - -1, -1, 763, -1, -1, -1, -1, -1, 769, 728, - 729, 772, 731, 732, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 784, -1, -1, -1, -1, 789, -1, - -1, -1, -1, 794, -1, 796, 797, 798, 799, -1, - -1, -1, 803, 804, -1, -1, -1, -1, -1, -1, - 811, -1, -1, 814, 773, -1, -1, -1, -1, 778, - -1, -1, -1, -1, 783, 25, 26, 27, 28, 29, - -1, 31, 32, 33, 34, 35, 36, 37, 38, 39, - -1, 800, -1, -1, -1, -1, -1, 13, 14, 15, - 809, 17, 18, 19, 20, -1, -1, 23, 24, 25, - 26, 27, -1, 29, 30, 31, 32, 33, -1, 35, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 45, - 46, 47, 48, 49, 50, 51, 52, 53, -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, 115, 116, 117, 118, 119, - -1, 121, 122, 123, 124, 125, 126, 127, 128, 129, - -1, -1, -1, 99, 100, -1, 102, -1, -1, -1, - -1, -1, -1, -1, -1, 145, -1, -1, 114, -1, - -1, 151, 13, 14, 15, -1, 17, 18, 19, 20, - -1, -1, 23, 24, 25, 26, 27, -1, 29, 30, - 31, 32, 33, -1, 35, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 45, 46, 47, 48, 49, 50, - 51, 52, 53, -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, 100, - 101, 102, -1, -1, -1, 245, 246, 247, 248, -1, - 250, -1, -1, 114, -1, -1, -1, -1, 258, -1, - 260, 261, 262, 263, 264, 265, 266, 267, 268, -1, - -1, -1, -1, -1, 274, -1, -1, 277, 278, 279, - 280, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 294, 295, 296, 297, 298, 299, - 300, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 321, 322, 323, 324, 325, -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, 352, 353, 354, 355, 356, 357, 358, -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, - 470, 471, 472, 473, 474, 475, 476, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 499, - 500, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 517, 518, 519, - 520, -1, -1, -1, -1, -1, -1, 527, -1, -1, - -1, -1, -1, -1, -1, 535, 536, -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, 578 -}; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint16 yystos[] = -{ - 0, 97, 123, 124, 125, 302, 303, 91, 293, 0, - 8, 128, 129, 13, 14, 15, 17, 18, 19, 20, - 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, - 35, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 99, 100, 102, 114, 161, 162, 163, 164, 165, 166, - 167, 168, 170, 171, 173, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 205, 301, 305, 306, 307, 308, 314, - 317, 92, 95, 98, 267, 297, 304, 293, 12, 129, - 130, 131, 293, 293, 293, 293, 293, 293, 293, 293, - 112, 120, 121, 279, 280, 281, 289, 293, 293, 293, - 85, 117, 175, 176, 293, 281, 281, 281, 281, 281, - 112, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 112, 293, 44, 229, 307, 319, 112, 114, 293, 7, - 131, 132, 133, 134, 135, 21, 116, 169, 278, 293, - 114, 22, 148, 278, 278, 148, 169, 114, 119, 289, - 290, 291, 293, 289, 293, 89, 90, 172, 119, 172, - 172, 175, 175, 86, 87, 88, 93, 94, 112, 281, - 281, 281, 281, 281, 13, 203, 204, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 8, 13, 15, 20, - 23, 25, 26, 34, 39, 44, 309, 310, 311, 312, - 114, 293, 319, 305, 293, 126, 8, 136, 137, 135, - 281, 278, 114, 114, 116, 281, 114, 114, 114, 169, - 114, 292, 113, 291, 114, 282, 114, 114, 118, 175, - 175, 175, 175, 175, 177, 115, 115, 115, 115, 293, - 115, 276, 277, 293, 91, 287, 113, 204, 115, 114, - 115, 115, 115, 115, 115, 115, 115, 115, 293, 113, - 310, 114, 293, 313, 16, 113, 112, 104, 105, 106, - 107, 138, 139, 140, 141, 142, 143, 293, 137, 114, - 293, 114, 293, 293, 29, 30, 31, 46, 47, 48, - 49, 113, 178, 179, 180, 181, 182, 183, 184, 308, - 281, 281, 281, 281, 114, 281, 114, 119, 115, 112, - 114, 281, 281, 281, 281, 281, 281, 281, 281, 281, - 281, 114, 116, 281, 315, 288, 293, 281, 281, 281, - 281, 34, 144, 145, 146, 147, 140, 141, 142, 143, - 11, 112, 281, 281, 281, 281, 281, 281, 281, 28, - 174, 293, 293, 293, 293, 276, 277, 278, 203, 281, - 281, 281, 281, 281, 293, 293, 293, 293, 293, 40, - 230, 28, 316, 318, 113, 293, 54, 55, 54, 55, - 54, 55, 54, 55, 111, 293, 101, 114, 159, 160, - 161, 162, 173, 300, 314, 35, 147, 149, 293, 288, - 281, 281, 281, 281, 281, 281, 281, 112, 5, 114, - 296, 114, 114, 114, 114, 113, 114, 114, 114, 114, - 114, 112, 268, 269, 273, 279, 297, 268, 268, 268, - 277, 114, 112, 114, 114, 114, 114, 114, 114, 108, - 109, 110, 108, 109, 110, 114, 114, 148, 293, 160, - 228, 229, 112, 293, 39, 150, 151, 152, 112, 113, - 115, 115, 115, 115, 115, 115, 115, 177, 114, 269, - 270, 271, 273, 114, 269, 273, 114, 114, 114, 41, - 305, 114, 114, 114, 114, 114, 114, 114, 114, 9, - 10, 206, 207, 208, 209, 210, 229, 288, 293, 40, - 153, 154, 152, 288, 281, 281, 281, 281, 281, 281, - 281, 113, 113, 271, 119, 276, 113, 281, 281, 127, - 208, 113, 114, 148, 293, 42, 43, 154, 155, 156, - 157, 158, 113, 293, 293, 293, 281, 281, 281, 281, - 272, 281, 13, 54, 55, 56, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 85, 117, - 211, 212, 12, 231, 232, 114, 114, 115, 281, 281, - 156, 114, 296, 114, 114, 114, 114, 114, 114, 273, - 211, 36, 37, 38, 93, 94, 226, 227, 13, 20, - 13, 20, 226, 226, 226, 226, 227, 226, 226, 226, - 226, 226, 227, 227, 227, 211, 211, 86, 87, 114, - 293, 57, 232, 241, 242, 243, 278, 281, 211, 114, - 114, 222, 224, 223, 225, 73, 213, 214, 215, 216, - 76, 217, 218, 79, 219, 220, 221, 82, 83, 84, - 84, 82, 84, 118, 211, 211, 274, 293, 297, 68, - 69, 70, 260, 261, 262, 243, 114, 211, 114, 112, - 279, 280, 283, 284, 285, 287, 285, 285, 285, 285, - 285, 285, 285, 285, 285, 285, 285, 285, 115, 297, - 91, 103, 294, 293, 293, 71, 263, 264, 265, 262, - 114, 286, 287, 112, 287, 293, 274, 274, 274, 274, - 294, 58, 244, 245, 246, 247, 265, 113, 287, 286, - 115, 274, 114, 114, 114, 3, 4, 295, 293, 63, - 64, 65, 66, 67, 233, 234, 235, 236, 237, 238, - 239, 240, 59, 254, 255, 256, 247, 113, 293, 119, - 274, 297, 297, 92, 298, 297, 297, 295, 61, 248, - 249, 250, 235, 293, 60, 257, 258, 259, 256, 115, - 275, 119, 293, 119, 274, 274, 119, 274, 119, 274, - 274, 274, 96, 299, 62, 251, 252, 253, 250, 274, - 267, 299, 259, 276, 266, 274, 297, 298, 297, 297, - 293, 253, 274, 267, 299, 274, 274, 274, 274, 119, - 274, 297, 274, 274, 297, 274, 274 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint16 yyr1[] = -{ - 0, 122, 123, 123, 125, 126, 127, 124, 128, 128, - 129, 130, 130, 131, 132, 133, 133, 134, 134, 135, - 136, 136, 137, 137, 137, 138, 138, 139, 139, 139, - 139, 139, 139, 139, 139, 140, 140, 141, 141, 142, - 142, 143, 143, 143, 143, 143, 143, 143, 144, 144, - 145, 146, 146, 147, 147, 148, 149, 149, 150, 150, - 151, 151, 152, 152, 153, 153, 154, 154, 155, 155, - 156, 156, 157, 158, 159, 159, 160, 160, 160, 160, - 160, 160, 161, 161, 161, 161, 161, 161, 161, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 163, 164, 165, 165, 166, 167, 168, 169, 169, - 170, 171, 172, 172, 173, 174, 174, 175, 175, 175, - 175, 175, 175, 175, 175, 176, 177, 177, 178, 178, - 178, 179, 179, 179, 179, 180, 180, 180, 180, 181, - 182, 183, 184, 185, 185, 185, 185, 186, 186, 187, - 187, 187, 187, 187, 187, 187, 187, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 201, 202, 203, 203, 204, 204, 205, 206, - 206, 207, 207, 208, 208, 209, 210, 211, 211, 211, - 211, 211, 212, 212, 212, 213, 212, 214, 212, 215, - 212, 216, 212, 217, 212, 218, 212, 219, 212, 220, - 212, 221, 212, 212, 222, 212, 223, 212, 212, 224, - 212, 225, 212, 212, 212, 212, 212, 212, 212, 226, - 226, 227, 227, 227, 227, 228, 228, 229, 230, 230, - 231, 231, 232, 233, 233, 234, 234, 235, 235, 235, - 235, 235, 236, 237, 237, 238, 238, 239, 240, 241, - 241, 242, 242, 243, 244, 245, 245, 246, 246, 247, - 247, 248, 248, 249, 249, 250, 250, 251, 251, 252, - 252, 253, 254, 254, 255, 255, 256, 257, 257, 258, - 258, 259, 259, 260, 260, 261, 261, 262, 262, 262, - 263, 263, 264, 264, 265, 266, 265, 265, 267, 268, - 268, 268, 268, 269, 270, 270, 272, 271, 271, 271, - 273, 274, 275, 275, 276, 276, 277, 277, 278, 278, - 279, 280, 281, 281, 281, 281, 281, 282, 281, 283, - 284, 285, 285, 285, 285, 285, 286, 286, 287, 288, - 288, 289, 290, 290, 291, 292, 291, 291, 293, 294, - 294, 295, 295, 296, 297, 298, 299, 300, 301, 302, - 303, 304, 304, 304, 305, 306, 306, 307, 307, 307, - 307, 307, 307, 308, 309, 309, 310, 310, 311, 312, - 312, 312, 312, 312, 312, 312, 312, 312, 313, 313, - 315, 314, 316, 316, 317, 318, 319, 319 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 0, 0, 0, 19, 1, 2, - 2, 1, 2, 2, 2, 1, 0, 1, 2, 5, - 1, 2, 5, 4, 7, 1, 0, 1, 1, 1, - 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, - 4, 5, 5, 5, 5, 5, 5, 4, 1, 0, - 5, 1, 2, 4, 3, 2, 2, 4, 1, 0, - 1, 2, 4, 3, 1, 2, 5, 3, 1, 2, - 1, 1, 5, 4, 1, 2, 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, 3, 4, 5, 4, 4, 4, 4, 2, 0, - 4, 4, 1, 1, 6, 4, 0, 3, 2, 3, - 3, 3, 3, 3, 1, 1, 2, 0, 1, 1, - 1, 8, 7, 7, 7, 1, 1, 1, 1, 7, - 7, 7, 7, 8, 7, 7, 7, 5, 7, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, - 7, 7, 7, 8, 8, 8, 8, 3, 5, 4, - 4, 5, 7, 4, 1, 2, 3, 5, 4, 1, - 0, 1, 2, 1, 1, 5, 4, 3, 2, 3, - 3, 1, 3, 3, 3, 0, 4, 0, 4, 0, - 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, - 4, 0, 4, 1, 0, 4, 0, 4, 2, 0, - 4, 0, 4, 3, 3, 3, 3, 3, 3, 1, - 1, 1, 1, 1, 1, 1, 2, 6, 4, 0, - 1, 2, 3, 1, 0, 1, 2, 1, 1, 1, - 1, 1, 3, 3, 5, 3, 5, 3, 3, 1, - 0, 1, 2, 5, 3, 1, 0, 1, 2, 4, - 6, 1, 0, 1, 2, 4, 6, 1, 0, 1, - 2, 4, 1, 0, 1, 2, 4, 1, 0, 1, - 2, 4, 4, 1, 0, 1, 2, 4, 4, 4, - 1, 0, 1, 2, 6, 0, 7, 4, 1, 1, - 1, 2, 2, 3, 1, 2, 0, 4, 1, 1, - 1, 6, 2, 0, 3, 1, 3, 1, 1, 3, - 1, 1, 1, 1, 1, 2, 2, 0, 4, 1, - 1, 1, 3, 1, 2, 4, 1, 2, 1, 1, - 2, 3, 1, 2, 1, 0, 3, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 3, 2, - 4, 1, 1, 1, 2, 2, 1, 1, 1, 1, - 1, 1, 1, 4, 2, 1, 2, 3, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, - 0, 6, 4, 0, 1, 1, 2, 0 -}; - - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -/* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - - -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ - -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -{ - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) -{ - unsigned long int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, Rule); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -{ - YYUSE (yyvaluep); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - - - -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; -/* Number of syntax errors so far. */ -int yynerrs; - - -/*----------. -| yyparse. | -`----------*/ - -int -yyparse (void) -{ - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (); - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 4: -#line 168 "policy_parse.y" /* yacc.c:1646 */ - { if (define_policy(pass, 0) == -1) return -1; } -#line 2218 "y.tab.c" /* yacc.c:1646 */ - break; - - case 5: -#line 170 "policy_parse.y" /* yacc.c:1646 */ - { if (pass == 1) { if (policydb_index_classes(policydbp)) return -1; } - else if (pass == 2) { if (policydb_index_others(NULL, policydbp, 0)) return -1; }} -#line 2225 "y.tab.c" /* yacc.c:1646 */ - break; - - case 6: -#line 173 "policy_parse.y" /* yacc.c:1646 */ - { if (pass == 1) { if (policydb_index_bools(policydbp)) return -1;} - else if (pass == 2) { if (policydb_index_others(NULL, policydbp, 0)) return -1;}} -#line 2232 "y.tab.c" /* yacc.c:1646 */ - break; - - case 10: -#line 181 "policy_parse.y" /* yacc.c:1646 */ - {if (define_class()) return -1;} -#line 2238 "y.tab.c" /* yacc.c:1646 */ - break; - - case 13: -#line 187 "policy_parse.y" /* yacc.c:1646 */ - {if (define_initial_sid()) return -1;} -#line 2244 "y.tab.c" /* yacc.c:1646 */ - break; - - case 19: -#line 198 "policy_parse.y" /* yacc.c:1646 */ - {if (define_common_perms()) return -1;} -#line 2250 "y.tab.c" /* yacc.c:1646 */ - break; - - case 22: -#line 204 "policy_parse.y" /* yacc.c:1646 */ - {if (define_av_perms(FALSE)) return -1;} -#line 2256 "y.tab.c" /* yacc.c:1646 */ - break; - - case 23: -#line 206 "policy_parse.y" /* yacc.c:1646 */ - {if (define_av_perms(TRUE)) return -1;} -#line 2262 "y.tab.c" /* yacc.c:1646 */ - break; - - case 24: -#line 208 "policy_parse.y" /* yacc.c:1646 */ - {if (define_av_perms(TRUE)) return -1;} -#line 2268 "y.tab.c" /* yacc.c:1646 */ - break; - - case 35: -#line 223 "policy_parse.y" /* yacc.c:1646 */ - {if (define_default_user(DEFAULT_SOURCE)) return -1; } -#line 2274 "y.tab.c" /* yacc.c:1646 */ - break; - - case 36: -#line 225 "policy_parse.y" /* yacc.c:1646 */ - {if (define_default_user(DEFAULT_TARGET)) return -1; } -#line 2280 "y.tab.c" /* yacc.c:1646 */ - break; - - case 37: -#line 228 "policy_parse.y" /* yacc.c:1646 */ - {if (define_default_role(DEFAULT_SOURCE)) return -1; } -#line 2286 "y.tab.c" /* yacc.c:1646 */ - break; - - case 38: -#line 230 "policy_parse.y" /* yacc.c:1646 */ - {if (define_default_role(DEFAULT_TARGET)) return -1; } -#line 2292 "y.tab.c" /* yacc.c:1646 */ - break; - - case 39: -#line 233 "policy_parse.y" /* yacc.c:1646 */ - {if (define_default_type(DEFAULT_SOURCE)) return -1; } -#line 2298 "y.tab.c" /* yacc.c:1646 */ - break; - - case 40: -#line 235 "policy_parse.y" /* yacc.c:1646 */ - {if (define_default_type(DEFAULT_TARGET)) return -1; } -#line 2304 "y.tab.c" /* yacc.c:1646 */ - break; - - case 41: -#line 238 "policy_parse.y" /* yacc.c:1646 */ - {if (define_default_range(DEFAULT_SOURCE_LOW)) return -1; } -#line 2310 "y.tab.c" /* yacc.c:1646 */ - break; - - case 42: -#line 240 "policy_parse.y" /* yacc.c:1646 */ - {if (define_default_range(DEFAULT_SOURCE_HIGH)) return -1; } -#line 2316 "y.tab.c" /* yacc.c:1646 */ - break; - - case 43: -#line 242 "policy_parse.y" /* yacc.c:1646 */ - {if (define_default_range(DEFAULT_SOURCE_LOW_HIGH)) return -1; } -#line 2322 "y.tab.c" /* yacc.c:1646 */ - break; - - case 44: -#line 244 "policy_parse.y" /* yacc.c:1646 */ - {if (define_default_range(DEFAULT_TARGET_LOW)) return -1; } -#line 2328 "y.tab.c" /* yacc.c:1646 */ - break; - - case 45: -#line 246 "policy_parse.y" /* yacc.c:1646 */ - {if (define_default_range(DEFAULT_TARGET_HIGH)) return -1; } -#line 2334 "y.tab.c" /* yacc.c:1646 */ - break; - - case 46: -#line 248 "policy_parse.y" /* yacc.c:1646 */ - {if (define_default_range(DEFAULT_TARGET_LOW_HIGH)) return -1; } -#line 2340 "y.tab.c" /* yacc.c:1646 */ - break; - - case 47: -#line 250 "policy_parse.y" /* yacc.c:1646 */ - {if (define_default_range(DEFAULT_GLBLUB)) return -1; } -#line 2346 "y.tab.c" /* yacc.c:1646 */ - break; - - case 53: -#line 261 "policy_parse.y" /* yacc.c:1646 */ - {if (define_sens()) return -1;} -#line 2352 "y.tab.c" /* yacc.c:1646 */ - break; - - case 54: -#line 263 "policy_parse.y" /* yacc.c:1646 */ - {if (define_sens()) return -1;} -#line 2358 "y.tab.c" /* yacc.c:1646 */ - break; - - case 56: -#line 268 "policy_parse.y" /* yacc.c:1646 */ - {if (define_dominance()) return -1;} -#line 2364 "y.tab.c" /* yacc.c:1646 */ - break; - - case 57: -#line 270 "policy_parse.y" /* yacc.c:1646 */ - {if (define_dominance()) return -1;} -#line 2370 "y.tab.c" /* yacc.c:1646 */ - break; - - case 62: -#line 279 "policy_parse.y" /* yacc.c:1646 */ - {if (define_category()) return -1;} -#line 2376 "y.tab.c" /* yacc.c:1646 */ - break; - - case 63: -#line 281 "policy_parse.y" /* yacc.c:1646 */ - {if (define_category()) return -1;} -#line 2382 "y.tab.c" /* yacc.c:1646 */ - break; - - case 66: -#line 287 "policy_parse.y" /* yacc.c:1646 */ - {if (define_level()) return -1;} -#line 2388 "y.tab.c" /* yacc.c:1646 */ - break; - - case 67: -#line 289 "policy_parse.y" /* yacc.c:1646 */ - {if (define_level()) return -1;} -#line 2394 "y.tab.c" /* yacc.c:1646 */ - break; - - case 72: -#line 298 "policy_parse.y" /* yacc.c:1646 */ - { if (define_constraint((constraint_expr_t*)(yyvsp[-1].valptr))) return -1; } -#line 2400 "y.tab.c" /* yacc.c:1646 */ - break; - - case 73: -#line 301 "policy_parse.y" /* yacc.c:1646 */ - { if (define_validatetrans((constraint_expr_t*)(yyvsp[-1].valptr))) return -1; } -#line 2406 "y.tab.c" /* yacc.c:1646 */ - break; - - case 101: -#line 335 "policy_parse.y" /* yacc.c:1646 */ - { if (define_attrib()) return -1;} -#line 2412 "y.tab.c" /* yacc.c:1646 */ - break; - - case 102: -#line 338 "policy_parse.y" /* yacc.c:1646 */ - { if (expand_attrib()) return -1;} -#line 2418 "y.tab.c" /* yacc.c:1646 */ - break; - - case 103: -#line 341 "policy_parse.y" /* yacc.c:1646 */ - {if (define_type(1)) return -1;} -#line 2424 "y.tab.c" /* yacc.c:1646 */ - break; - - case 104: -#line 343 "policy_parse.y" /* yacc.c:1646 */ - {if (define_type(0)) return -1;} -#line 2430 "y.tab.c" /* yacc.c:1646 */ - break; - - case 105: -#line 346 "policy_parse.y" /* yacc.c:1646 */ - {if (define_typealias()) return -1;} -#line 2436 "y.tab.c" /* yacc.c:1646 */ - break; - - case 106: -#line 349 "policy_parse.y" /* yacc.c:1646 */ - {if (define_typeattribute()) return -1;} -#line 2442 "y.tab.c" /* yacc.c:1646 */ - break; - - case 107: -#line 352 "policy_parse.y" /* yacc.c:1646 */ - {if (define_typebounds()) return -1;} -#line 2448 "y.tab.c" /* yacc.c:1646 */ - break; - - case 110: -#line 358 "policy_parse.y" /* yacc.c:1646 */ - { if (define_bool_tunable(0)) return -1; } -#line 2454 "y.tab.c" /* yacc.c:1646 */ - break; - - case 111: -#line 361 "policy_parse.y" /* yacc.c:1646 */ - { if (define_bool_tunable(1)) return -1; } -#line 2460 "y.tab.c" /* yacc.c:1646 */ - break; - - case 112: -#line 364 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id("T",0)) return -1; } -#line 2466 "y.tab.c" /* yacc.c:1646 */ - break; - - case 113: -#line 366 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id("F",0)) return -1; } -#line 2472 "y.tab.c" /* yacc.c:1646 */ - break; - - case 114: -#line 369 "policy_parse.y" /* yacc.c:1646 */ - { if (pass == 2) { if (define_conditional((cond_expr_t*)(yyvsp[-4].ptr), (avrule_t*)(yyvsp[-2].ptr), (avrule_t*)(yyvsp[0].ptr)) < 0) return -1; }} -#line 2478 "y.tab.c" /* yacc.c:1646 */ - break; - - case 115: -#line 372 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = (yyvsp[-1].ptr); } -#line 2484 "y.tab.c" /* yacc.c:1646 */ - break; - - case 116: -#line 374 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = NULL; } -#line 2490 "y.tab.c" /* yacc.c:1646 */ - break; - - case 117: -#line 377 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = (yyvsp[-1].ptr);} -#line 2496 "y.tab.c" /* yacc.c:1646 */ - break; - - case 118: -#line 379 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_expr(COND_NOT, (yyvsp[0].ptr), 0); - if ((yyval.ptr) == 0) return -1; } -#line 2503 "y.tab.c" /* yacc.c:1646 */ - break; - - case 119: -#line 382 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_expr(COND_AND, (yyvsp[-2].ptr), (yyvsp[0].ptr)); - if ((yyval.ptr) == 0) return -1; } -#line 2510 "y.tab.c" /* yacc.c:1646 */ - break; - - case 120: -#line 385 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_expr(COND_OR, (yyvsp[-2].ptr), (yyvsp[0].ptr)); - if ((yyval.ptr) == 0) return -1; } -#line 2517 "y.tab.c" /* yacc.c:1646 */ - break; - - case 121: -#line 388 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_expr(COND_XOR, (yyvsp[-2].ptr), (yyvsp[0].ptr)); - if ((yyval.ptr) == 0) return -1; } -#line 2524 "y.tab.c" /* yacc.c:1646 */ - break; - - case 122: -#line 391 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_expr(COND_EQ, (yyvsp[-2].ptr), (yyvsp[0].ptr)); - if ((yyval.ptr) == 0) return -1; } -#line 2531 "y.tab.c" /* yacc.c:1646 */ - break; - - case 123: -#line 394 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_expr(COND_NEQ, (yyvsp[-2].ptr), (yyvsp[0].ptr)); - if ((yyval.ptr) == 0) return -1; } -#line 2538 "y.tab.c" /* yacc.c:1646 */ - break; - - case 124: -#line 397 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = (yyvsp[0].ptr); } -#line 2544 "y.tab.c" /* yacc.c:1646 */ - break; - - case 125: -#line 400 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_expr(COND_BOOL,0, 0); - if ((yyval.ptr) == COND_ERR) return -1; } -#line 2551 "y.tab.c" /* yacc.c:1646 */ - break; - - case 126: -#line 404 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_pol_list((avrule_t *)(yyvsp[-1].ptr), (avrule_t *)(yyvsp[0].ptr)); } -#line 2557 "y.tab.c" /* yacc.c:1646 */ - break; - - case 127: -#line 406 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = NULL; } -#line 2563 "y.tab.c" /* yacc.c:1646 */ - break; - - case 128: -#line 409 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = (yyvsp[0].ptr); } -#line 2569 "y.tab.c" /* yacc.c:1646 */ - break; - - case 129: -#line 411 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = (yyvsp[0].ptr); } -#line 2575 "y.tab.c" /* yacc.c:1646 */ - break; - - case 130: -#line 413 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = NULL; } -#line 2581 "y.tab.c" /* yacc.c:1646 */ - break; - - case 131: -#line 416 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_filename_trans() ; - if ((yyval.ptr) == COND_ERR) return -1;} -#line 2588 "y.tab.c" /* yacc.c:1646 */ - break; - - case 132: -#line 419 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_compute_type(AVRULE_TRANSITION) ; - if ((yyval.ptr) == COND_ERR) return -1;} -#line 2595 "y.tab.c" /* yacc.c:1646 */ - break; - - case 133: -#line 422 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_compute_type(AVRULE_MEMBER) ; - if ((yyval.ptr) == COND_ERR) return -1;} -#line 2602 "y.tab.c" /* yacc.c:1646 */ - break; - - case 134: -#line 425 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_compute_type(AVRULE_CHANGE) ; - if ((yyval.ptr) == COND_ERR) return -1;} -#line 2609 "y.tab.c" /* yacc.c:1646 */ - break; - - case 135: -#line 429 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = (yyvsp[0].ptr); } -#line 2615 "y.tab.c" /* yacc.c:1646 */ - break; - - case 136: -#line 431 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = (yyvsp[0].ptr); } -#line 2621 "y.tab.c" /* yacc.c:1646 */ - break; - - case 137: -#line 433 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = (yyvsp[0].ptr); } -#line 2627 "y.tab.c" /* yacc.c:1646 */ - break; - - case 138: -#line 435 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = (yyvsp[0].ptr); } -#line 2633 "y.tab.c" /* yacc.c:1646 */ - break; - - case 139: -#line 438 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_te_avtab(AVRULE_ALLOWED) ; - if ((yyval.ptr) == COND_ERR) return -1; } -#line 2640 "y.tab.c" /* yacc.c:1646 */ - break; - - case 140: -#line 442 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_te_avtab(AVRULE_AUDITALLOW) ; - if ((yyval.ptr) == COND_ERR) return -1; } -#line 2647 "y.tab.c" /* yacc.c:1646 */ - break; - - case 141: -#line 446 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_te_avtab(AVRULE_AUDITDENY) ; - if ((yyval.ptr) == COND_ERR) return -1; } -#line 2654 "y.tab.c" /* yacc.c:1646 */ - break; - - case 142: -#line 450 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = define_cond_te_avtab(AVRULE_DONTAUDIT); - if ((yyval.ptr) == COND_ERR) return -1; } -#line 2661 "y.tab.c" /* yacc.c:1646 */ - break; - - case 143: -#line 455 "policy_parse.y" /* yacc.c:1646 */ - {if (define_filename_trans()) return -1; } -#line 2667 "y.tab.c" /* yacc.c:1646 */ - break; - - case 144: -#line 457 "policy_parse.y" /* yacc.c:1646 */ - {if (define_compute_type(AVRULE_TRANSITION)) return -1;} -#line 2673 "y.tab.c" /* yacc.c:1646 */ - break; - - case 145: -#line 459 "policy_parse.y" /* yacc.c:1646 */ - {if (define_compute_type(AVRULE_MEMBER)) return -1;} -#line 2679 "y.tab.c" /* yacc.c:1646 */ - break; - - case 146: -#line 461 "policy_parse.y" /* yacc.c:1646 */ - {if (define_compute_type(AVRULE_CHANGE)) return -1;} -#line 2685 "y.tab.c" /* yacc.c:1646 */ - break; - - case 147: -#line 464 "policy_parse.y" /* yacc.c:1646 */ - { if (define_range_trans(0)) return -1; } -#line 2691 "y.tab.c" /* yacc.c:1646 */ - break; - - case 148: -#line 466 "policy_parse.y" /* yacc.c:1646 */ - { if (define_range_trans(1)) return -1; } -#line 2697 "y.tab.c" /* yacc.c:1646 */ - break; - - case 158: -#line 479 "policy_parse.y" /* yacc.c:1646 */ - {if (define_te_avtab(AVRULE_ALLOWED)) return -1; } -#line 2703 "y.tab.c" /* yacc.c:1646 */ - break; - - case 159: -#line 482 "policy_parse.y" /* yacc.c:1646 */ - {if (define_te_avtab(AVRULE_AUDITALLOW)) return -1; } -#line 2709 "y.tab.c" /* yacc.c:1646 */ - break; - - case 160: -#line 485 "policy_parse.y" /* yacc.c:1646 */ - {if (define_te_avtab(AVRULE_AUDITDENY)) return -1; } -#line 2715 "y.tab.c" /* yacc.c:1646 */ - break; - - case 161: -#line 488 "policy_parse.y" /* yacc.c:1646 */ - {if (define_te_avtab(AVRULE_DONTAUDIT)) return -1; } -#line 2721 "y.tab.c" /* yacc.c:1646 */ - break; - - case 162: -#line 491 "policy_parse.y" /* yacc.c:1646 */ - {if (define_te_avtab(AVRULE_NEVERALLOW)) return -1; } -#line 2727 "y.tab.c" /* yacc.c:1646 */ - break; - - case 163: -#line 494 "policy_parse.y" /* yacc.c:1646 */ - {if (define_te_avtab_extended_perms(AVRULE_XPERMS_ALLOWED)) return -1; } -#line 2733 "y.tab.c" /* yacc.c:1646 */ - break; - - case 164: -#line 497 "policy_parse.y" /* yacc.c:1646 */ - {if (define_te_avtab_extended_perms(AVRULE_XPERMS_AUDITALLOW)) return -1; } -#line 2739 "y.tab.c" /* yacc.c:1646 */ - break; - - case 165: -#line 500 "policy_parse.y" /* yacc.c:1646 */ - {if (define_te_avtab_extended_perms(AVRULE_XPERMS_DONTAUDIT)) return -1; } -#line 2745 "y.tab.c" /* yacc.c:1646 */ - break; - - case 166: -#line 503 "policy_parse.y" /* yacc.c:1646 */ - {if (define_te_avtab_extended_perms(AVRULE_XPERMS_NEVERALLOW)) return -1; } -#line 2751 "y.tab.c" /* yacc.c:1646 */ - break; - - case 167: -#line 506 "policy_parse.y" /* yacc.c:1646 */ - {if (define_attrib_role()) return -1; } -#line 2757 "y.tab.c" /* yacc.c:1646 */ - break; - - case 168: -#line 509 "policy_parse.y" /* yacc.c:1646 */ - {if (define_role_types()) return -1;} -#line 2763 "y.tab.c" /* yacc.c:1646 */ - break; - - case 169: -#line 512 "policy_parse.y" /* yacc.c:1646 */ - {if (define_role_attr()) return -1;} -#line 2769 "y.tab.c" /* yacc.c:1646 */ - break; - - case 171: -#line 517 "policy_parse.y" /* yacc.c:1646 */ - {if (define_role_trans(0)) return -1; } -#line 2775 "y.tab.c" /* yacc.c:1646 */ - break; - - case 172: -#line 519 "policy_parse.y" /* yacc.c:1646 */ - {if (define_role_trans(1)) return -1;} -#line 2781 "y.tab.c" /* yacc.c:1646 */ - break; - - case 173: -#line 522 "policy_parse.y" /* yacc.c:1646 */ - {if (define_role_allow()) return -1; } -#line 2787 "y.tab.c" /* yacc.c:1646 */ - break; - - case 174: -#line 525 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = (yyvsp[0].ptr); } -#line 2793 "y.tab.c" /* yacc.c:1646 */ - break; - - case 175: -#line 527 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.ptr) = merge_roles_dom((role_datum_t*)(yyvsp[-1].ptr), (role_datum_t*)(yyvsp[0].ptr)); if ((yyval.ptr) == 0) return -1;} -#line 2799 "y.tab.c" /* yacc.c:1646 */ - break; - - case 176: -#line 530 "policy_parse.y" /* yacc.c:1646 */ - {(yyval.ptr) = define_role_dom(NULL); if ((yyval.ptr) == 0) return -1;} -#line 2805 "y.tab.c" /* yacc.c:1646 */ - break; - - case 177: -#line 532 "policy_parse.y" /* yacc.c:1646 */ - {(yyval.ptr) = define_role_dom((role_datum_t*)(yyvsp[-1].ptr)); if ((yyval.ptr) == 0) return -1;} -#line 2811 "y.tab.c" /* yacc.c:1646 */ - break; - - case 178: -#line 535 "policy_parse.y" /* yacc.c:1646 */ - {if (define_roleattribute()) return -1;} -#line 2817 "y.tab.c" /* yacc.c:1646 */ - break; - - case 185: -#line 547 "policy_parse.y" /* yacc.c:1646 */ - { if (define_constraint((constraint_expr_t*)(yyvsp[-1].valptr))) return -1; } -#line 2823 "y.tab.c" /* yacc.c:1646 */ - break; - - case 186: -#line 550 "policy_parse.y" /* yacc.c:1646 */ - { if (define_validatetrans((constraint_expr_t*)(yyvsp[-1].valptr))) return -1; } -#line 2829 "y.tab.c" /* yacc.c:1646 */ - break; - - case 187: -#line 553 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = (yyvsp[-1].valptr); } -#line 2835 "y.tab.c" /* yacc.c:1646 */ - break; - - case 188: -#line 555 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NOT, (yyvsp[0].valptr), 0); - if ((yyval.valptr) == 0) return -1; } -#line 2842 "y.tab.c" /* yacc.c:1646 */ - break; - - case 189: -#line 558 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_AND, (yyvsp[-2].valptr), (yyvsp[0].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 2849 "y.tab.c" /* yacc.c:1646 */ - break; - - case 190: -#line 561 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_OR, (yyvsp[-2].valptr), (yyvsp[0].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 2856 "y.tab.c" /* yacc.c:1646 */ - break; - - case 191: -#line 564 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = (yyvsp[0].valptr); } -#line 2862 "y.tab.c" /* yacc.c:1646 */ - break; - - case 192: -#line 567 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_ATTR, CEXPR_USER, (yyvsp[-1].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 2869 "y.tab.c" /* yacc.c:1646 */ - break; - - case 193: -#line 570 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_ATTR, CEXPR_ROLE, (yyvsp[-1].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 2876 "y.tab.c" /* yacc.c:1646 */ - break; - - case 194: -#line 573 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_ATTR, CEXPR_TYPE, (yyvsp[-1].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 2883 "y.tab.c" /* yacc.c:1646 */ - break; - - case 195: -#line 575 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(1)) return -1; } -#line 2889 "y.tab.c" /* yacc.c:1646 */ - break; - - case 196: -#line 576 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NAMES, CEXPR_USER, (yyvsp[-2].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 2896 "y.tab.c" /* yacc.c:1646 */ - break; - - case 197: -#line 578 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(1)) return -1; } -#line 2902 "y.tab.c" /* yacc.c:1646 */ - break; - - case 198: -#line 579 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NAMES, (CEXPR_USER | CEXPR_TARGET), (yyvsp[-2].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 2909 "y.tab.c" /* yacc.c:1646 */ - break; - - case 199: -#line 581 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(1)) return -1; } -#line 2915 "y.tab.c" /* yacc.c:1646 */ - break; - - case 200: -#line 582 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NAMES, (CEXPR_USER | CEXPR_XTARGET), (yyvsp[-2].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 2922 "y.tab.c" /* yacc.c:1646 */ - break; - - case 201: -#line 584 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(1)) return -1; } -#line 2928 "y.tab.c" /* yacc.c:1646 */ - break; - - case 202: -#line 585 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NAMES, CEXPR_ROLE, (yyvsp[-2].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 2935 "y.tab.c" /* yacc.c:1646 */ - break; - - case 203: -#line 587 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(1)) return -1; } -#line 2941 "y.tab.c" /* yacc.c:1646 */ - break; - - case 204: -#line 588 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NAMES, (CEXPR_ROLE | CEXPR_TARGET), (yyvsp[-2].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 2948 "y.tab.c" /* yacc.c:1646 */ - break; - - case 205: -#line 590 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(1)) return -1; } -#line 2954 "y.tab.c" /* yacc.c:1646 */ - break; - - case 206: -#line 591 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NAMES, (CEXPR_ROLE | CEXPR_XTARGET), (yyvsp[-2].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 2961 "y.tab.c" /* yacc.c:1646 */ - break; - - case 207: -#line 593 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(1)) return -1; } -#line 2967 "y.tab.c" /* yacc.c:1646 */ - break; - - case 208: -#line 594 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NAMES, CEXPR_TYPE, (yyvsp[-2].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 2974 "y.tab.c" /* yacc.c:1646 */ - break; - - case 209: -#line 596 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(1)) return -1; } -#line 2980 "y.tab.c" /* yacc.c:1646 */ - break; - - case 210: -#line 597 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NAMES, (CEXPR_TYPE | CEXPR_TARGET), (yyvsp[-2].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 2987 "y.tab.c" /* yacc.c:1646 */ - break; - - case 211: -#line 599 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(1)) return -1; } -#line 2993 "y.tab.c" /* yacc.c:1646 */ - break; - - case 212: -#line 600 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NAMES, (CEXPR_TYPE | CEXPR_XTARGET), (yyvsp[-2].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 3000 "y.tab.c" /* yacc.c:1646 */ - break; - - case 213: -#line 603 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_ATTR, CEXPR_USER, CEXPR_EQ); - if ((yyval.valptr) == 0) return -1; } -#line 3007 "y.tab.c" /* yacc.c:1646 */ - break; - - case 214: -#line 605 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(1)) return -1; } -#line 3013 "y.tab.c" /* yacc.c:1646 */ - break; - - case 215: -#line 606 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NAMES, CEXPR_ROLE, CEXPR_EQ); - if ((yyval.valptr) == 0) return -1; } -#line 3020 "y.tab.c" /* yacc.c:1646 */ - break; - - case 216: -#line 608 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(1)) return -1; } -#line 3026 "y.tab.c" /* yacc.c:1646 */ - break; - - case 217: -#line 609 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NAMES, (CEXPR_ROLE | CEXPR_TARGET), CEXPR_EQ); - if ((yyval.valptr) == 0) return -1; } -#line 3033 "y.tab.c" /* yacc.c:1646 */ - break; - - case 218: -#line 612 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_ATTR, CEXPR_ROLE, (yyvsp[0].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 3040 "y.tab.c" /* yacc.c:1646 */ - break; - - case 219: -#line 614 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(1)) return -1; } -#line 3046 "y.tab.c" /* yacc.c:1646 */ - break; - - case 220: -#line 615 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NAMES, CEXPR_TYPE, CEXPR_EQ); - if ((yyval.valptr) == 0) return -1; } -#line 3053 "y.tab.c" /* yacc.c:1646 */ - break; - - case 221: -#line 617 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(1)) return -1; } -#line 3059 "y.tab.c" /* yacc.c:1646 */ - break; - - case 222: -#line 618 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_NAMES, (CEXPR_TYPE | CEXPR_TARGET), CEXPR_EQ); - if ((yyval.valptr) == 0) return -1; } -#line 3066 "y.tab.c" /* yacc.c:1646 */ - break; - - case 223: -#line 621 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_ATTR, CEXPR_L1L2, (yyvsp[-1].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 3073 "y.tab.c" /* yacc.c:1646 */ - break; - - case 224: -#line 624 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_ATTR, CEXPR_L1H2, (yyvsp[-1].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 3080 "y.tab.c" /* yacc.c:1646 */ - break; - - case 225: -#line 627 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_ATTR, CEXPR_H1L2, (yyvsp[-1].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 3087 "y.tab.c" /* yacc.c:1646 */ - break; - - case 226: -#line 630 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_ATTR, CEXPR_H1H2, (yyvsp[-1].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 3094 "y.tab.c" /* yacc.c:1646 */ - break; - - case 227: -#line 633 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_ATTR, CEXPR_L1H1, (yyvsp[-1].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 3101 "y.tab.c" /* yacc.c:1646 */ - break; - - case 228: -#line 636 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = define_cexpr(CEXPR_ATTR, CEXPR_L2H2, (yyvsp[-1].valptr)); - if ((yyval.valptr) == 0) return -1; } -#line 3108 "y.tab.c" /* yacc.c:1646 */ - break; - - case 229: -#line 640 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = CEXPR_EQ; } -#line 3114 "y.tab.c" /* yacc.c:1646 */ - break; - - case 230: -#line 642 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = CEXPR_NEQ; } -#line 3120 "y.tab.c" /* yacc.c:1646 */ - break; - - case 231: -#line 645 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = (yyvsp[0].valptr); } -#line 3126 "y.tab.c" /* yacc.c:1646 */ - break; - - case 232: -#line 647 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = CEXPR_DOM; } -#line 3132 "y.tab.c" /* yacc.c:1646 */ - break; - - case 233: -#line 649 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = CEXPR_DOMBY; } -#line 3138 "y.tab.c" /* yacc.c:1646 */ - break; - - case 234: -#line 651 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.valptr) = CEXPR_INCOMP; } -#line 3144 "y.tab.c" /* yacc.c:1646 */ - break; - - case 237: -#line 657 "policy_parse.y" /* yacc.c:1646 */ - {if (define_user()) return -1;} -#line 3150 "y.tab.c" /* yacc.c:1646 */ - break; - - case 242: -#line 666 "policy_parse.y" /* yacc.c:1646 */ - {if (define_initial_sid_context()) return -1;} -#line 3156 "y.tab.c" /* yacc.c:1646 */ - break; - - case 252: -#line 680 "policy_parse.y" /* yacc.c:1646 */ - {if (define_pirq_context((yyvsp[-1].val))) return -1;} -#line 3162 "y.tab.c" /* yacc.c:1646 */ - break; - - case 253: -#line 683 "policy_parse.y" /* yacc.c:1646 */ - {if (define_iomem_context((yyvsp[-1].val64),(yyvsp[-1].val64))) return -1;} -#line 3168 "y.tab.c" /* yacc.c:1646 */ - break; - - case 254: -#line 685 "policy_parse.y" /* yacc.c:1646 */ - {if (define_iomem_context((yyvsp[-3].val64),(yyvsp[-1].val64))) return -1;} -#line 3174 "y.tab.c" /* yacc.c:1646 */ - break; - - case 255: -#line 688 "policy_parse.y" /* yacc.c:1646 */ - {if (define_ioport_context((yyvsp[-1].val),(yyvsp[-1].val))) return -1;} -#line 3180 "y.tab.c" /* yacc.c:1646 */ - break; - - case 256: -#line 690 "policy_parse.y" /* yacc.c:1646 */ - {if (define_ioport_context((yyvsp[-3].val),(yyvsp[-1].val))) return -1;} -#line 3186 "y.tab.c" /* yacc.c:1646 */ - break; - - case 257: -#line 693 "policy_parse.y" /* yacc.c:1646 */ - {if (define_pcidevice_context((yyvsp[-1].val))) return -1;} -#line 3192 "y.tab.c" /* yacc.c:1646 */ - break; - - case 258: -#line 696 "policy_parse.y" /* yacc.c:1646 */ - {if (define_devicetree_context()) return -1;} -#line 3198 "y.tab.c" /* yacc.c:1646 */ - break; - - case 263: -#line 705 "policy_parse.y" /* yacc.c:1646 */ - {if (define_fs_context((yyvsp[-3].val),(yyvsp[-2].val))) return -1;} -#line 3204 "y.tab.c" /* yacc.c:1646 */ - break; - - case 269: -#line 716 "policy_parse.y" /* yacc.c:1646 */ - {if (define_port_context((yyvsp[-1].val),(yyvsp[-1].val))) return -1;} -#line 3210 "y.tab.c" /* yacc.c:1646 */ - break; - - case 270: -#line 718 "policy_parse.y" /* yacc.c:1646 */ - {if (define_port_context((yyvsp[-3].val),(yyvsp[-1].val))) return -1;} -#line 3216 "y.tab.c" /* yacc.c:1646 */ - break; - - case 275: -#line 727 "policy_parse.y" /* yacc.c:1646 */ - {if (define_ibpkey_context((yyvsp[-1].val),(yyvsp[-1].val))) return -1;} -#line 3222 "y.tab.c" /* yacc.c:1646 */ - break; - - case 276: -#line 729 "policy_parse.y" /* yacc.c:1646 */ - {if (define_ibpkey_context((yyvsp[-3].val),(yyvsp[-1].val))) return -1;} -#line 3228 "y.tab.c" /* yacc.c:1646 */ - break; - - case 281: -#line 738 "policy_parse.y" /* yacc.c:1646 */ - {if (define_ibendport_context((yyvsp[-1].val))) return -1;} -#line 3234 "y.tab.c" /* yacc.c:1646 */ - break; - - case 286: -#line 747 "policy_parse.y" /* yacc.c:1646 */ - {if (define_netif_context()) return -1;} -#line 3240 "y.tab.c" /* yacc.c:1646 */ - break; - - case 291: -#line 756 "policy_parse.y" /* yacc.c:1646 */ - {if (define_ipv4_node_context()) return -1;} -#line 3246 "y.tab.c" /* yacc.c:1646 */ - break; - - case 292: -#line 758 "policy_parse.y" /* yacc.c:1646 */ - {if (define_ipv6_node_context()) return -1;} -#line 3252 "y.tab.c" /* yacc.c:1646 */ - break; - - case 297: -#line 767 "policy_parse.y" /* yacc.c:1646 */ - {if (define_fs_use(SECURITY_FS_USE_XATTR)) return -1;} -#line 3258 "y.tab.c" /* yacc.c:1646 */ - break; - - case 298: -#line 769 "policy_parse.y" /* yacc.c:1646 */ - {if (define_fs_use(SECURITY_FS_USE_TASK)) return -1;} -#line 3264 "y.tab.c" /* yacc.c:1646 */ - break; - - case 299: -#line 771 "policy_parse.y" /* yacc.c:1646 */ - {if (define_fs_use(SECURITY_FS_USE_TRANS)) return -1;} -#line 3270 "y.tab.c" /* yacc.c:1646 */ - break; - - case 304: -#line 780 "policy_parse.y" /* yacc.c:1646 */ - {if (define_genfs_context(1)) return -1;} -#line 3276 "y.tab.c" /* yacc.c:1646 */ - break; - - case 305: -#line 781 "policy_parse.y" /* yacc.c:1646 */ - {insert_id("-", 0);} -#line 3282 "y.tab.c" /* yacc.c:1646 */ - break; - - case 306: -#line 782 "policy_parse.y" /* yacc.c:1646 */ - {if (define_genfs_context(1)) return -1;} -#line 3288 "y.tab.c" /* yacc.c:1646 */ - break; - - case 307: -#line 784 "policy_parse.y" /* yacc.c:1646 */ - {if (define_genfs_context(0)) return -1;} -#line 3294 "y.tab.c" /* yacc.c:1646 */ - break; - - case 308: -#line 787 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id(yytext,0)) return -1; } -#line 3300 "y.tab.c" /* yacc.c:1646 */ - break; - - case 309: -#line 790 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(0)) return -1; } -#line 3306 "y.tab.c" /* yacc.c:1646 */ - break; - - case 310: -#line 792 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(0)) return -1; } -#line 3312 "y.tab.c" /* yacc.c:1646 */ - break; - - case 311: -#line 794 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id("~", 0)) return -1; } -#line 3318 "y.tab.c" /* yacc.c:1646 */ - break; - - case 312: -#line 796 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id("~", 0)) return -1; - if (insert_separator(0)) return -1; } -#line 3325 "y.tab.c" /* yacc.c:1646 */ - break; - - case 316: -#line 804 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id("-", 0)) return -1; } -#line 3331 "y.tab.c" /* yacc.c:1646 */ - break; - - case 320: -#line 809 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id(yytext,0)) return -1; } -#line 3337 "y.tab.c" /* yacc.c:1646 */ - break; - - case 324: -#line 817 "policy_parse.y" /* yacc.c:1646 */ - {if (insert_separator(0)) return -1;} -#line 3343 "y.tab.c" /* yacc.c:1646 */ - break; - - case 325: -#line 819 "policy_parse.y" /* yacc.c:1646 */ - {if (insert_separator(0)) return -1;} -#line 3349 "y.tab.c" /* yacc.c:1646 */ - break; - - case 326: -#line 822 "policy_parse.y" /* yacc.c:1646 */ - {if (insert_separator(0)) return -1;} -#line 3355 "y.tab.c" /* yacc.c:1646 */ - break; - - case 327: -#line 824 "policy_parse.y" /* yacc.c:1646 */ - {if (insert_separator(0)) return -1;} -#line 3361 "y.tab.c" /* yacc.c:1646 */ - break; - - case 332: -#line 834 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(0)) return -1; } -#line 3367 "y.tab.c" /* yacc.c:1646 */ - break; - - case 333: -#line 836 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(0)) return -1; } -#line 3373 "y.tab.c" /* yacc.c:1646 */ - break; - - case 334: -#line 838 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id("*", 0)) return -1; - if (insert_separator(0)) return -1; } -#line 3380 "y.tab.c" /* yacc.c:1646 */ - break; - - case 335: -#line 841 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id("~", 0)) return -1; - if (insert_separator(0)) return -1; } -#line 3387 "y.tab.c" /* yacc.c:1646 */ - break; - - case 336: -#line 844 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id("~", 0)) return -1; - if (insert_separator(0)) return -1; } -#line 3394 "y.tab.c" /* yacc.c:1646 */ - break; - - case 337: -#line 846 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id("-", 0)) return -1; } -#line 3400 "y.tab.c" /* yacc.c:1646 */ - break; - - case 338: -#line 847 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_separator(0)) return -1; } -#line 3406 "y.tab.c" /* yacc.c:1646 */ - break; - - case 339: -#line 850 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id("~", 1)) return -1; } -#line 3412 "y.tab.c" /* yacc.c:1646 */ - break; - - case 340: -#line 853 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id("*", 1)) return -1; } -#line 3418 "y.tab.c" /* yacc.c:1646 */ - break; - - case 348: -#line 865 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id(yytext, 1)) return -1; } -#line 3424 "y.tab.c" /* yacc.c:1646 */ - break; - - case 355: -#line 874 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id("-", 0)) return -1; } -#line 3430 "y.tab.c" /* yacc.c:1646 */ - break; - - case 358: -#line 877 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id(yytext,0)) return -1; } -#line 3436 "y.tab.c" /* yacc.c:1646 */ - break; - - case 359: -#line 880 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id(yytext,0)) return -1; } -#line 3442 "y.tab.c" /* yacc.c:1646 */ - break; - - case 360: -#line 882 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id(yytext,0)) return -1; } -#line 3448 "y.tab.c" /* yacc.c:1646 */ - break; - - case 361: -#line 885 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id(yytext,0)) return -1; } -#line 3454 "y.tab.c" /* yacc.c:1646 */ - break; - - case 362: -#line 887 "policy_parse.y" /* yacc.c:1646 */ - { yytext[strlen(yytext) - 1] = '\0'; if (insert_id(yytext + 1,0)) return -1; } -#line 3460 "y.tab.c" /* yacc.c:1646 */ - break; - - case 363: -#line 890 "policy_parse.y" /* yacc.c:1646 */ - { yytext[strlen(yytext) - 1] = '\0'; if (insert_id(yytext + 1,0)) return -1; } -#line 3466 "y.tab.c" /* yacc.c:1646 */ - break; - - case 364: -#line 893 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.val) = strtoul(yytext,NULL,0); } -#line 3472 "y.tab.c" /* yacc.c:1646 */ - break; - - case 365: -#line 896 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.val64) = strtoull(yytext,NULL,0); } -#line 3478 "y.tab.c" /* yacc.c:1646 */ - break; - - case 366: -#line 899 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id(yytext,0)) return -1; } -#line 3484 "y.tab.c" /* yacc.c:1646 */ - break; - - case 367: -#line 902 "policy_parse.y" /* yacc.c:1646 */ - {if (define_polcap()) return -1;} -#line 3490 "y.tab.c" /* yacc.c:1646 */ - break; - - case 368: -#line 905 "policy_parse.y" /* yacc.c:1646 */ - {if (define_permissive()) return -1;} -#line 3496 "y.tab.c" /* yacc.c:1646 */ - break; - - case 369: -#line 910 "policy_parse.y" /* yacc.c:1646 */ - { if (end_avrule_block(pass) == -1) return -1; - if (policydb_index_others(NULL, policydbp, 0)) return -1; - } -#line 3504 "y.tab.c" /* yacc.c:1646 */ - break; - - case 370: -#line 915 "policy_parse.y" /* yacc.c:1646 */ - { if (define_policy(pass, 1) == -1) return -1; } -#line 3510 "y.tab.c" /* yacc.c:1646 */ - break; - - case 371: -#line 918 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id(yytext,0)) return -1; } -#line 3516 "y.tab.c" /* yacc.c:1646 */ - break; - - case 372: -#line 920 "policy_parse.y" /* yacc.c:1646 */ - { if (insert_id(yytext,0)) return -1; } -#line 3522 "y.tab.c" /* yacc.c:1646 */ - break; - - case 388: -#line 944 "policy_parse.y" /* yacc.c:1646 */ - { if (require_class(pass)) return -1; } -#line 3528 "y.tab.c" /* yacc.c:1646 */ - break; - - case 389: -#line 946 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.require_func) = require_role; } -#line 3534 "y.tab.c" /* yacc.c:1646 */ - break; - - case 390: -#line 947 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.require_func) = require_type; } -#line 3540 "y.tab.c" /* yacc.c:1646 */ - break; - - case 391: -#line 948 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.require_func) = require_attribute; } -#line 3546 "y.tab.c" /* yacc.c:1646 */ - break; - - case 392: -#line 949 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.require_func) = require_attribute_role; } -#line 3552 "y.tab.c" /* yacc.c:1646 */ - break; - - case 393: -#line 950 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.require_func) = require_user; } -#line 3558 "y.tab.c" /* yacc.c:1646 */ - break; - - case 394: -#line 951 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.require_func) = require_bool; } -#line 3564 "y.tab.c" /* yacc.c:1646 */ - break; - - case 395: -#line 952 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.require_func) = require_tunable; } -#line 3570 "y.tab.c" /* yacc.c:1646 */ - break; - - case 396: -#line 953 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.require_func) = require_sens; } -#line 3576 "y.tab.c" /* yacc.c:1646 */ - break; - - case 397: -#line 954 "policy_parse.y" /* yacc.c:1646 */ - { (yyval.require_func) = require_cat; } -#line 3582 "y.tab.c" /* yacc.c:1646 */ - break; - - case 398: -#line 957 "policy_parse.y" /* yacc.c:1646 */ - { if ((yyvsp[-1].require_func) (pass)) return -1; } -#line 3588 "y.tab.c" /* yacc.c:1646 */ - break; - - case 399: -#line 959 "policy_parse.y" /* yacc.c:1646 */ - { if ((yyvsp[-3].require_func) (pass)) return -1; } -#line 3594 "y.tab.c" /* yacc.c:1646 */ - break; - - case 400: -#line 962 "policy_parse.y" /* yacc.c:1646 */ - { if (end_avrule_block(pass) == -1) return -1; } -#line 3600 "y.tab.c" /* yacc.c:1646 */ - break; - - case 401: -#line 964 "policy_parse.y" /* yacc.c:1646 */ - { if (end_optional(pass) == -1) return -1; } -#line 3606 "y.tab.c" /* yacc.c:1646 */ - break; - - case 402: -#line 967 "policy_parse.y" /* yacc.c:1646 */ - { if (end_avrule_block(pass) == -1) return -1; } -#line 3612 "y.tab.c" /* yacc.c:1646 */ - break; - - case 404: -#line 971 "policy_parse.y" /* yacc.c:1646 */ - { if (begin_optional(pass) == -1) return -1; } -#line 3618 "y.tab.c" /* yacc.c:1646 */ - break; - - case 405: -#line 974 "policy_parse.y" /* yacc.c:1646 */ - { if (begin_optional_else(pass) == -1) return -1; } -#line 3624 "y.tab.c" /* yacc.c:1646 */ - break; - - -#line 3628 "y.tab.c" /* yacc.c:1646 */ - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - /* Now 'shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - } - /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - return yyresult; -} diff --git a/checkpolicy/y.tab.h b/checkpolicy/y.tab.h deleted file mode 100644 index c7f8ed13..00000000 --- a/checkpolicy/y.tab.h +++ /dev/null @@ -1,296 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY_YY_Y_TAB_H_INCLUDED -# define YY_YY_Y_TAB_H_INCLUDED -/* Debug traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif -#if YYDEBUG -extern int yydebug; -#endif - -/* Token type. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - enum yytokentype - { - PATH = 258, - QPATH = 259, - FILENAME = 260, - CLONE = 261, - COMMON = 262, - CLASS = 263, - CONSTRAIN = 264, - VALIDATETRANS = 265, - INHERITS = 266, - SID = 267, - ROLE = 268, - ROLEATTRIBUTE = 269, - ATTRIBUTE_ROLE = 270, - ROLES = 271, - TYPEALIAS = 272, - TYPEATTRIBUTE = 273, - TYPEBOUNDS = 274, - TYPE = 275, - TYPES = 276, - ALIAS = 277, - ATTRIBUTE = 278, - EXPANDATTRIBUTE = 279, - BOOL = 280, - TUNABLE = 281, - IF = 282, - ELSE = 283, - TYPE_TRANSITION = 284, - TYPE_MEMBER = 285, - TYPE_CHANGE = 286, - ROLE_TRANSITION = 287, - RANGE_TRANSITION = 288, - SENSITIVITY = 289, - DOMINANCE = 290, - DOM = 291, - DOMBY = 292, - INCOMP = 293, - CATEGORY = 294, - LEVEL = 295, - RANGE = 296, - MLSCONSTRAIN = 297, - MLSVALIDATETRANS = 298, - USER = 299, - NEVERALLOW = 300, - ALLOW = 301, - AUDITALLOW = 302, - AUDITDENY = 303, - DONTAUDIT = 304, - ALLOWXPERM = 305, - AUDITALLOWXPERM = 306, - DONTAUDITXPERM = 307, - NEVERALLOWXPERM = 308, - SOURCE = 309, - TARGET = 310, - SAMEUSER = 311, - FSCON = 312, - PORTCON = 313, - NETIFCON = 314, - NODECON = 315, - IBPKEYCON = 316, - IBENDPORTCON = 317, - PIRQCON = 318, - IOMEMCON = 319, - IOPORTCON = 320, - PCIDEVICECON = 321, - DEVICETREECON = 322, - FSUSEXATTR = 323, - FSUSETASK = 324, - FSUSETRANS = 325, - GENFSCON = 326, - U1 = 327, - U2 = 328, - U3 = 329, - R1 = 330, - R2 = 331, - R3 = 332, - T1 = 333, - T2 = 334, - T3 = 335, - L1 = 336, - L2 = 337, - H1 = 338, - H2 = 339, - NOT = 340, - AND = 341, - OR = 342, - XOR = 343, - CTRUE = 344, - CFALSE = 345, - IDENTIFIER = 346, - NUMBER = 347, - EQUALS = 348, - NOTEQUAL = 349, - IPV4_ADDR = 350, - IPV6_ADDR = 351, - MODULE = 352, - VERSION_IDENTIFIER = 353, - REQUIRE = 354, - OPTIONAL = 355, - POLICYCAP = 356, - PERMISSIVE = 357, - FILESYSTEM = 358, - DEFAULT_USER = 359, - DEFAULT_ROLE = 360, - DEFAULT_TYPE = 361, - DEFAULT_RANGE = 362, - LOW_HIGH = 363, - LOW = 364, - HIGH = 365, - GLBLUB = 366 - }; -#endif -/* Tokens. */ -#define PATH 258 -#define QPATH 259 -#define FILENAME 260 -#define CLONE 261 -#define COMMON 262 -#define CLASS 263 -#define CONSTRAIN 264 -#define VALIDATETRANS 265 -#define INHERITS 266 -#define SID 267 -#define ROLE 268 -#define ROLEATTRIBUTE 269 -#define ATTRIBUTE_ROLE 270 -#define ROLES 271 -#define TYPEALIAS 272 -#define TYPEATTRIBUTE 273 -#define TYPEBOUNDS 274 -#define TYPE 275 -#define TYPES 276 -#define ALIAS 277 -#define ATTRIBUTE 278 -#define EXPANDATTRIBUTE 279 -#define BOOL 280 -#define TUNABLE 281 -#define IF 282 -#define ELSE 283 -#define TYPE_TRANSITION 284 -#define TYPE_MEMBER 285 -#define TYPE_CHANGE 286 -#define ROLE_TRANSITION 287 -#define RANGE_TRANSITION 288 -#define SENSITIVITY 289 -#define DOMINANCE 290 -#define DOM 291 -#define DOMBY 292 -#define INCOMP 293 -#define CATEGORY 294 -#define LEVEL 295 -#define RANGE 296 -#define MLSCONSTRAIN 297 -#define MLSVALIDATETRANS 298 -#define USER 299 -#define NEVERALLOW 300 -#define ALLOW 301 -#define AUDITALLOW 302 -#define AUDITDENY 303 -#define DONTAUDIT 304 -#define ALLOWXPERM 305 -#define AUDITALLOWXPERM 306 -#define DONTAUDITXPERM 307 -#define NEVERALLOWXPERM 308 -#define SOURCE 309 -#define TARGET 310 -#define SAMEUSER 311 -#define FSCON 312 -#define PORTCON 313 -#define NETIFCON 314 -#define NODECON 315 -#define IBPKEYCON 316 -#define IBENDPORTCON 317 -#define PIRQCON 318 -#define IOMEMCON 319 -#define IOPORTCON 320 -#define PCIDEVICECON 321 -#define DEVICETREECON 322 -#define FSUSEXATTR 323 -#define FSUSETASK 324 -#define FSUSETRANS 325 -#define GENFSCON 326 -#define U1 327 -#define U2 328 -#define U3 329 -#define R1 330 -#define R2 331 -#define R3 332 -#define T1 333 -#define T2 334 -#define T3 335 -#define L1 336 -#define L2 337 -#define H1 338 -#define H2 339 -#define NOT 340 -#define AND 341 -#define OR 342 -#define XOR 343 -#define CTRUE 344 -#define CFALSE 345 -#define IDENTIFIER 346 -#define NUMBER 347 -#define EQUALS 348 -#define NOTEQUAL 349 -#define IPV4_ADDR 350 -#define IPV6_ADDR 351 -#define MODULE 352 -#define VERSION_IDENTIFIER 353 -#define REQUIRE 354 -#define OPTIONAL 355 -#define POLICYCAP 356 -#define PERMISSIVE 357 -#define FILESYSTEM 358 -#define DEFAULT_USER 359 -#define DEFAULT_ROLE 360 -#define DEFAULT_TYPE 361 -#define DEFAULT_RANGE 362 -#define LOW_HIGH 363 -#define LOW 364 -#define HIGH 365 -#define GLBLUB 366 - -/* Value type. */ -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED - -union YYSTYPE -{ -#line 68 "policy_parse.y" /* yacc.c:1909 */ - - unsigned int val; - uint64_t val64; - uintptr_t valptr; - void *ptr; - require_func_t require_func; - -#line 284 "y.tab.h" /* yacc.c:1909 */ -}; - -typedef union YYSTYPE YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define YYSTYPE_IS_DECLARED 1 -#endif - - -extern YYSTYPE yylval; - -int yyparse (void); - -#endif /* !YY_YY_Y_TAB_H_INCLUDED */ diff --git a/libsepol/cil/src/cil_lexer.c b/libsepol/cil/src/cil_lexer.c deleted file mode 100644 index 0f8610b1..00000000 --- a/libsepol/cil/src/cil_lexer.c +++ /dev/null @@ -1,1849 +0,0 @@ -#line 2 "libsepol/cil/src/cil_lexer.c" - -#line 4 "libsepol/cil/src/cil_lexer.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define yy_create_buffer cil_yy_create_buffer -#define yy_delete_buffer cil_yy_delete_buffer -#define yy_flex_debug cil_yy_flex_debug -#define yy_init_buffer cil_yy_init_buffer -#define yy_flush_buffer cil_yy_flush_buffer -#define yy_load_buffer_state cil_yy_load_buffer_state -#define yy_switch_to_buffer cil_yy_switch_to_buffer -#define yyin cil_yyin -#define yyleng cil_yyleng -#define yylex cil_yylex -#define yylineno cil_yylineno -#define yyout cil_yyout -#define yyrestart cil_yyrestart -#define yytext cil_yytext -#define yywrap cil_yywrap -#define yyalloc cil_yyalloc -#define yyrealloc cil_yyrealloc -#define yyfree cil_yyfree - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 1 -#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 -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . 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 -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 */ - -/* TODO: this is always defined, so inline it */ -#define yyconst const - -#if defined(__GNUC__) && __GNUC__ >= 3 -#define yynoreturn __attribute__((__noreturn__)) -#else -#define yynoreturn -#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 cil_yyrestart(cil_yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#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 int cil_yyleng; - -extern FILE *cil_yyin, *cil_yyout; - -#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 cil_yytext. */ \ - yy_size_t 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 cil_yytext 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. - */ - int yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int 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 cil_yyrestart()), so that the user can continue scanning by - * just pointing cil_yyin 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 = NULL; /**< 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 cil_yytext is formed. */ -static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int cil_yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = NULL; -static int yy_init = 0; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow cil_yywrap()'s to do buffer switches - * instead of setting up a fresh cil_yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void cil_yyrestart (FILE *input_file ); -void cil_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); -YY_BUFFER_STATE cil_yy_create_buffer (FILE *file,int size ); -void cil_yy_delete_buffer (YY_BUFFER_STATE b ); -void cil_yy_flush_buffer (YY_BUFFER_STATE b ); -void cil_yypush_buffer_state (YY_BUFFER_STATE new_buffer ); -void cil_yypop_buffer_state (void ); - -static void cil_yyensure_buffer_stack (void ); -static void cil_yy_load_buffer_state (void ); -static void cil_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); - -#define YY_FLUSH_BUFFER cil_yy_flush_buffer(YY_CURRENT_BUFFER ) - -YY_BUFFER_STATE cil_yy_scan_buffer (char *base,yy_size_t size ); -YY_BUFFER_STATE cil_yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE cil_yy_scan_bytes (yyconst char *bytes,int len ); - -void *cil_yyalloc (yy_size_t ); -void *cil_yyrealloc (void *,yy_size_t ); -void cil_yyfree (void * ); - -#define yy_new_buffer cil_yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - cil_yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - cil_yy_create_buffer(cil_yyin,YY_BUF_SIZE ); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - cil_yyensure_buffer_stack (); \ - YY_CURRENT_BUFFER_LVALUE = \ - cil_yy_create_buffer(cil_yyin,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 cil_yywrap() (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -FILE *cil_yyin = NULL, *cil_yyout = NULL; - -typedef int yy_state_type; - -extern int cil_yylineno; - -int cil_yylineno = 1; - -extern char *cil_yytext; -#ifdef yytext_ptr -#undef yytext_ptr -#endif -#define yytext_ptr cil_yytext - -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 yynoreturn yy_fatal_error (yyconst char* msg ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up cil_yytext. - */ -#define YY_DO_BEFORE_ACTION \ - (yytext_ptr) = yy_bp; \ - cil_yyleng = (int) (yy_cp - yy_bp); \ - (yy_hold_char) = *yy_cp; \ - *yy_cp = '\0'; \ - (yy_c_buf_p) = yy_cp; - -#define YY_NUM_RULES 10 -#define YY_END_OF_BUFFER 11 -/* 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[20] = - { 0, - 0, 0, 11, 9, 7, 1, 1, 6, 9, 4, - 5, 3, 3, 6, 0, 8, 0, 2, 0 - } ; - -static yyconst YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 5, 6, 5, 5, 5, 5, 5, 7, - 8, 9, 5, 5, 5, 5, 5, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 5, 11, 5, - 5, 5, 5, 5, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 5, 1, 5, 5, 5, 5, 12, 12, 12, 12, - - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 5, 5, 5, 5, 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 YY_CHAR yy_meta[13] = - { 0, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1 - } ; - -static yyconst flex_uint16_t yy_base[21] = - { 0, - 0, 12, 22, 24, 24, 24, 24, 8, 15, 24, - 24, 24, 8, 0, 10, 24, 6, 24, 24, 13 - } ; - -static yyconst flex_int16_t yy_def[21] = - { 0, - 19, 1, 19, 19, 19, 19, 19, 19, 20, 19, - 19, 19, 19, 8, 20, 19, 19, 19, 0, 19 - } ; - -static yyconst flex_uint16_t yy_nxt[37] = - { 0, - 4, 5, 6, 7, 8, 9, 10, 11, 8, 8, - 12, 8, 14, 15, 18, 16, 14, 14, 17, 14, - 16, 19, 13, 3, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19 - } ; - -static yyconst flex_int16_t yy_chk[37] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 8, 20, 17, 15, 8, 8, 13, 8, - 9, 3, 2, 19, 19, 19, 19, 19, 19, 19, - 19, 19, 19, 19, 19, 19 - } ; - -static yy_state_type yy_last_accepting_state; -static char *yy_last_accepting_cpos; - -extern int cil_yy_flex_debug; -int cil_yy_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 *cil_yytext; -#line 1 "libsepol/cil/src/cil_lexer.l" -/* - * Copyright 2011 Tresys Technology, LLC. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY TRESYS TECHNOLOGY, LLC ``AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL TRESYS TECHNOLOGY, LLC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * The views and conclusions contained in the software and documentation are those - * of the authors and should not be interpreted as representing official policies, - * either expressed or implied, of Tresys Technology, LLC. - */ -#line 31 "libsepol/cil/src/cil_lexer.l" - #include - #include - #include "cil_internal.h" - #include "cil_lexer.h" - #include "cil_log.h" - #include "cil_mem.h" - char *value = NULL; - int line = 1; -#define YY_NO_INPUT 1 -#line 521 "libsepol/cil/src/cil_lexer.c" - -#define INITIAL 0 - -#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 -#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 cil_yylex_destroy (void ); - -int cil_yyget_debug (void ); - -void cil_yyset_debug (int debug_flag ); - -YY_EXTRA_TYPE cil_yyget_extra (void ); - -void cil_yyset_extra (YY_EXTRA_TYPE user_defined ); - -FILE *cil_yyget_in (void ); - -void cil_yyset_in (FILE * _in_str ); - -FILE *cil_yyget_out (void ); - -void cil_yyset_out (FILE * _out_str ); - - int cil_yyget_leng (void ); - -char *cil_yyget_text (void ); - -int cil_yyget_lineno (void ); - -void cil_yyset_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 cil_yywrap (void ); -#else -extern int cil_yywrap (void ); -#endif -#endif - -#ifndef YY_NO_UNPUT - -#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 -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#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( cil_yytext, (size_t) cil_yyleng, 1, cil_yyout )) {} } 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 = '*'; \ - int n; \ - for ( n = 0; n < max_size && \ - (c = getc( cil_yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( cil_yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, cil_yyin)) == 0 && ferror(cil_yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(cil_yyin); \ - } \ - }\ -\ - -#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 cil_yylex (void); - -#define YY_DECL int cil_yylex (void) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after cil_yytext and cil_yyleng - * 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 /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - if ( cil_yyleng > 0 ) \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ - (cil_yytext[cil_yyleng - 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 ( ! cil_yyin ) - cil_yyin = stdin; - - if ( ! cil_yyout ) - cil_yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - cil_yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - cil_yy_create_buffer(cil_yyin,YY_BUF_SIZE ); - } - - cil_yy_load_buffer_state( ); - } - - { -#line 56 "libsepol/cil/src/cil_lexer.l" - -#line 742 "libsepol/cil/src/cil_lexer.c" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = (yy_c_buf_p); - - /* Support of cil_yytext. */ - *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 >= 20 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 24 ); - -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: -/* rule 1 can match eol */ -YY_RULE_SETUP -#line 57 "libsepol/cil/src/cil_lexer.l" -line++; return NEWLINE; - YY_BREAK -case 2: -YY_RULE_SETUP -#line 58 "libsepol/cil/src/cil_lexer.l" -value=cil_yytext; return HLL_LINEMARK; - YY_BREAK -case 3: -YY_RULE_SETUP -#line 59 "libsepol/cil/src/cil_lexer.l" -value=cil_yytext; return COMMENT; - YY_BREAK -case 4: -YY_RULE_SETUP -#line 60 "libsepol/cil/src/cil_lexer.l" -value=cil_yytext; return OPAREN; - YY_BREAK -case 5: -YY_RULE_SETUP -#line 61 "libsepol/cil/src/cil_lexer.l" -value=cil_yytext; return CPAREN; - YY_BREAK -case 6: -YY_RULE_SETUP -#line 62 "libsepol/cil/src/cil_lexer.l" -value=cil_yytext; return SYMBOL; - YY_BREAK -case 7: -YY_RULE_SETUP -#line 63 "libsepol/cil/src/cil_lexer.l" -; - YY_BREAK -case 8: -YY_RULE_SETUP -#line 64 "libsepol/cil/src/cil_lexer.l" -value=cil_yytext; return QSTRING; - YY_BREAK -case YY_STATE_EOF(INITIAL): -#line 65 "libsepol/cil/src/cil_lexer.l" -return END_OF_FILE; - YY_BREAK -case 9: -YY_RULE_SETUP -#line 66 "libsepol/cil/src/cil_lexer.l" -value=cil_yytext; return UNKNOWN; - YY_BREAK -case 10: -YY_RULE_SETUP -#line 67 "libsepol/cil/src/cil_lexer.l" -ECHO; - YY_BREAK -#line 855 "libsepol/cil/src/cil_lexer.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 cil_yyin at a new source and called - * cil_yylex(). 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 = cil_yyin; - 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 ( cil_yywrap( ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * cil_yytext, 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 cil_yylex */ - -/* 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); - yy_size_t 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 = (yy_size_t) ((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 - { - int 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 ) - { - int 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. */ - cil_yyrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = NULL; - - 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; - cil_yyrestart(cil_yyin ); - } - - 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 ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cil_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - (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 >= 20 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) 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 >= 20 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - yy_is_jam = (yy_current_state == 19); - - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - -#endif - -#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 */ - int 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. */ - cil_yyrestart(cil_yyin ); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( cil_yywrap( ) ) - return 0; - - 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 cil_yytext */ - (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 cil_yyrestart (FILE * input_file ) -{ - - if ( ! YY_CURRENT_BUFFER ){ - cil_yyensure_buffer_stack (); - YY_CURRENT_BUFFER_LVALUE = - cil_yy_create_buffer(cil_yyin,YY_BUF_SIZE ); - } - - cil_yy_init_buffer(YY_CURRENT_BUFFER,input_file ); - cil_yy_load_buffer_state( ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * - */ - void cil_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -{ - - /* TODO. We should be able to replace this entire function body - * with - * cil_yypop_buffer_state(); - * cil_yypush_buffer_state(new_buffer); - */ - cil_yyensure_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; - cil_yy_load_buffer_state( ); - - /* We don't actually know whether we did this switch during - * EOF (cil_yywrap()) processing, but the only time this flag - * is looked at is after cil_yywrap() is called, so it's safe - * to go ahead and always set it. - */ - (yy_did_buffer_switch_on_eof) = 1; -} - -static void cil_yy_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; - cil_yyin = 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 cil_yy_create_buffer (FILE * file, int size ) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) cil_yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cil_yy_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 *) cil_yyalloc((yy_size_t) (b->yy_buf_size + 2) ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in cil_yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - cil_yy_init_buffer(b,file ); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with cil_yy_create_buffer() - * - */ - void cil_yy_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 ) - cil_yyfree((void *) b->yy_ch_buf ); - - cil_yyfree((void *) b ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a cil_yyrestart() or at EOF. - */ - static void cil_yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) - -{ - int oerrno = errno; - - cil_yy_flush_buffer(b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then cil_yy_init_buffer was _probably_ - * called from cil_yyrestart() 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 cil_yy_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 ) - cil_yy_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 cil_yypush_buffer_state (YY_BUFFER_STATE new_buffer ) -{ - if (new_buffer == NULL) - return; - - cil_yyensure_buffer_stack(); - - /* This block is copied from cil_yy_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 cil_yy_switch_to_buffer. */ - cil_yy_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 cil_yypop_buffer_state (void) -{ - if (!YY_CURRENT_BUFFER) - return; - - cil_yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - if ((yy_buffer_stack_top) > 0) - --(yy_buffer_stack_top); - - if (YY_CURRENT_BUFFER) { - cil_yy_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 cil_yyensure_buffer_stack (void) -{ - int 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; /* After all that talk, this was set to 1 anyways... */ - (yy_buffer_stack) = (struct yy_buffer_state**)cil_yyalloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in cil_yyensure_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. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = (yy_buffer_stack_max) + grow_size; - (yy_buffer_stack) = (struct yy_buffer_state**)cil_yyrealloc - ((yy_buffer_stack), - num_to_alloc * sizeof(struct yy_buffer_state*) - ); - if ( ! (yy_buffer_stack) ) - YY_FATAL_ERROR( "out of dynamic memory in cil_yyensure_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 cil_yy_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 NULL; - - b = (YY_BUFFER_STATE) cil_yyalloc(sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in cil_yy_scan_buffer()" ); - - b->yy_buf_size = (int) (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 = NULL; - 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; - - cil_yy_switch_to_buffer(b ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to cil_yylex() 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 - * cil_yy_scan_bytes() instead. - */ -YY_BUFFER_STATE cil_yy_scan_string (yyconst char * yystr ) -{ - - return cil_yy_scan_bytes(yystr,(int) strlen(yystr) ); -} - -/** Setup the input buffer state to scan the given bytes. The next call to cil_yylex() 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 cil_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = (yy_size_t) (_yybytes_len + 2); - buf = (char *) cil_yyalloc(n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in cil_yy_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 = cil_yy_scan_buffer(buf,n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in cil_yy_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 yynoreturn 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 cil_yytext. */ \ - yy_size_t yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - cil_yytext[cil_yyleng] = (yy_hold_char); \ - (yy_c_buf_p) = cil_yytext + yyless_macro_arg; \ - (yy_hold_char) = *(yy_c_buf_p); \ - *(yy_c_buf_p) = '\0'; \ - cil_yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the current line number. - * - */ -int cil_yyget_lineno (void) -{ - - return cil_yylineno; -} - -/** Get the input stream. - * - */ -FILE *cil_yyget_in (void) -{ - return cil_yyin; -} - -/** Get the output stream. - * - */ -FILE *cil_yyget_out (void) -{ - return cil_yyout; -} - -/** Get the length of the current token. - * - */ -int cil_yyget_leng (void) -{ - return cil_yyleng; -} - -/** Get the current token. - * - */ - -char *cil_yyget_text (void) -{ - return cil_yytext; -} - -/** Set the current line number. - * @param _line_number line number - * - */ -void cil_yyset_lineno (int _line_number ) -{ - - cil_yylineno = _line_number; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param _in_str A readable stream. - * - * @see cil_yy_switch_to_buffer - */ -void cil_yyset_in (FILE * _in_str ) -{ - cil_yyin = _in_str ; -} - -void cil_yyset_out (FILE * _out_str ) -{ - cil_yyout = _out_str ; -} - -int cil_yyget_debug (void) -{ - return cil_yy_flex_debug; -} - -void cil_yyset_debug (int _bdebug ) -{ - cil_yy_flex_debug = _bdebug ; -} - -static int yy_init_globals (void) -{ - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from cil_yylex_destroy(), so don't allocate here. - */ - - (yy_buffer_stack) = NULL; - (yy_buffer_stack_top) = 0; - (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = NULL; - (yy_init) = 0; - (yy_start) = 0; - -/* Defined in main.c */ -#ifdef YY_STDINIT - cil_yyin = stdin; - cil_yyout = stdout; -#else - cil_yyin = NULL; - cil_yyout = NULL; -#endif - - /* For future reference: Set errno on error, since we are called by - * cil_yylex_init() - */ - return 0; -} - -/* cil_yylex_destroy is for both reentrant and non-reentrant scanners. */ -int cil_yylex_destroy (void) -{ - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - cil_yy_delete_buffer(YY_CURRENT_BUFFER ); - YY_CURRENT_BUFFER_LVALUE = NULL; - cil_yypop_buffer_state(); - } - - /* Destroy the stack itself. */ - cil_yyfree((yy_buffer_stack) ); - (yy_buffer_stack) = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * cil_yylex() 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 *cil_yyalloc (yy_size_t size ) -{ - return malloc(size); -} - -void *cil_yyrealloc (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 realloc(ptr, size); -} - -void cil_yyfree (void * ptr ) -{ - free( (char *) ptr ); /* see cil_yyrealloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 67 "libsepol/cil/src/cil_lexer.l" - - - -int cil_lexer_setup(char *buffer, uint32_t size) -{ - size = (yy_size_t)size; - if (cil_yy_scan_buffer(buffer,size) == NULL) { - cil_log(CIL_INFO, "Lexer failed to setup buffer\n"); - return SEPOL_ERR; - } - - line = 1; - - return SEPOL_OK; -} - -void cil_lexer_destroy(void) -{ - cil_yylex_destroy(); -} - -int cil_lexer_next(struct token *tok) -{ - tok->type = cil_yylex(); - tok->value = value; - tok->line = line; - - return SEPOL_OK; -} - -- Gitee