/* * Copyright (c) 1986-2007 Purdue University * All rights reserved. * * Developed by: Daniel Trinkle * Department of Computer Science, Purdue University * http://www.cs.purdue.edu/ * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal with the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * o Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimers. * * o Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimers in the * documentation and/or other materials provided with the distribution. * * o Neither the names of Daniel Trinkle, Purdue University, nor the * names of its contributors may be used to endorse or promote products * derived from this Software without specific prior written * permission. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. */ /* * detex [-e environment-list] [-c] [-l] [-n] [-s] [-t] [-w] [file[.tex] ] * * This program is used to remove TeX or LaTeX constructs from a text * file. */ #include "detex.h" #ifdef KPATHSEA #include #include #include #include #include #include #include #ifdef HAVE_SYS_PARAM_H #include #endif #else /* KPATHSEA */ #ifdef HAVE_STRING_H #include #else #include #define strrchr rindex #endif #ifndef MAXPATHLEN #include #endif #define PATH_MAX MAXPATHLEN #ifdef OS2 #include #endif #ifdef WIN32 #include #include #endif #endif /* KPATHSEA */ #line 84 "lex.yy.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. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up 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 */ typedef unsigned char YY_CHAR; FILE *yyin = NULL, *yyout = NULL; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #ifdef yytext_ptr #undef yytext_ptr #endif #define yytext_ptr 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'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 173 #define YY_END_OF_BUFFER 174 /* 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[1362] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 144, 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 166, 166, 0, 0, 0, 0, 0, 0, 139, 139, 0, 0, 174, 173, 92, 91, 90, 107, 105, 107, 106, 107, 107, 119, 122, 121, 120, 128, 130, 129, 113, 110, 109, 112, 113, 113, 158, 158, 159, 158, 158, 108, 1, 158, 158, 158, 157, 158, 146, 151, 154, 146, 155, 148, 145, 144, 142, 141, 145, 145, 143, 12, 12, 173, 11, 12, 102, 100, 101, 102, 102, 18, 16, 17, 15, 14, 15, 97, 95, 96, 97, 97, 115, 117, 116, 124, 126, 125, 164, 161, 162, 163, 166, 165, 170, 167, 168, 169, 172, 171, 6, 6, 7, 139, 44, 43, 46, 104, 0, 0, 0, 0, 0, 0, 0, 119, 121, 128, 129, 111, 0, 0, 0, 0, 0, 0, 0, 160, 0, 147, 103, 1, 152, 153, 149, 157, 0, 156, 138, 136, 93, 135, 135, 135, 135, 98, 137, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 150, 0, 0, 0, 144, 143, 142, 141, 141, 0, 140, 0, 0, 11, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 16, 14, 0, 94, 0, 0, 0, 0, 0, 0, 0, 115, 116, 124, 125, 163, 166, 6, 0, 44, 0, 45, 0, 106, 0, 0, 0, 0, 0, 0, 0, 112, 0, 0, 0, 0, 0, 0, 0, 149, 156, 135, 135, 133, 133, 137, 0, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 0, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 132, 0, 137, 135, 135, 135, 135, 135, 135, 89, 135, 71, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 78, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 135, 135, 135, 135, 135, 135, 67, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 57, 135, 135, 135, 135, 135, 135, 33, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 85, 135, 135, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 135, 135, 135, 135, 3, 135, 135, 135, 135, 48, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 73, 127, 0, 0, 0, 0, 0, 74, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 57, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 131, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 0, 112, 0, 135, 135, 135, 135, 135, 0, 0, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 0, 0, 0, 0, 0, 135, 135, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 37, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 35, 135, 0, 0, 0, 0, 0, 135, 0, 0, 0, 0, 0, 101, 0, 96, 0, 0, 0, 0, 135, 135, 135, 135, 135, 0, 0, 64, 135, 135, 58, 135, 135, 135, 135, 135, 135, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 135, 114, 0, 19, 19, 135, 75, 135, 135, 135, 135, 135, 135, 76, 135, 135, 135, 135, 135, 135, 135, 34, 135, 59, 135, 135, 135, 135, 135, 135, 123, 135, 135, 135, 135, 135, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 135, 135, 0, 135, 66, 58, 50, 135, 135, 135, 53, 83, 135, 0, 22, 22, 22, 22, 0, 0, 0, 0, 0, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 36, 135, 135, 135, 135, 38, 59, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 0, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 135, 135, 0, 135, 135, 135, 135, 51, 0, 84, 0, 0, 22, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 135, 134, 135, 135, 135, 26, 135, 52, 77, 62, 135, 135, 39, 41, 135, 27, 135, 135, 135, 135, 135, 135, 135, 49, 135, 135, 0, 0, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 9, 0, 4, 0, 135, 135, 135, 135, 0, 0, 0, 135, 135, 135, 135, 0, 0, 0, 22, 22, 0, 0, 0, 0, 0, 23, 72, 135, 135, 0, 86, 81, 135, 32, 62, 40, 135, 39, 79, 31, 135, 29, 135, 135, 60, 135, 135, 70, 0, 0, 20, 20, 0, 0, 0, 0, 0, 21, 10, 0, 135, 135, 135, 28, 0, 0, 0, 0, 0, 0, 135, 47, 135, 135, 0, 0, 0, 22, 22, 0, 0, 0, 0, 135, 118, 0, 135, 135, 30, 82, 135, 60, 135, 135, 0, 0, 20, 20, 0, 0, 0, 0, 0, 135, 135, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 135, 135, 0, 0, 22, 22, 0, 0, 0, 0, 0, 0, 0, 0, 135, 134, 135, 87, 63, 135, 135, 0, 0, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 135, 135, 0, 0, 0, 0, 0, 24, 0, 69, 68, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 135, 135, 63, 61, 55, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 5, 135, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 22, 22, 22, 0, 0, 0, 0, 0, 0, 0, 0, 135, 88, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 2, 0, 22, 22, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 42, 20, 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, 22, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ; static yyconst YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 5, 1, 1, 6, 7, 1, 8, 9, 10, 11, 12, 13, 14, 15, 1, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 1, 1, 18, 19, 20, 5, 21, 22, 23, 23, 23, 24, 23, 23, 23, 23, 23, 23, 25, 23, 23, 26, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 27, 28, 29, 1, 1, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 25, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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[60] = { 0, 1, 2, 3, 2, 1, 1, 1, 4, 1, 1, 1, 1, 5, 6, 1, 6, 6, 1, 6, 1, 7, 8, 8, 8, 8, 8, 1, 9, 10, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 11, 1, 12, 1 } ; static yyconst flex_uint16_t yy_base[1416] = { 0, 0, 0, 0, 1, 2, 6, 14, 29, 11, 33, 40, 45, 93, 0, 152, 0, 211, 0, 268, 271, 319, 0, 16, 25, 376, 379, 381, 384, 387, 398, 20, 378, 3307, 3306, 390, 403, 26, 37, 46, 49, 3318, 3317, 23, 24, 3332, 3337, 3337, 3337, 3337, 3337, 3337, 3325, 3337, 236, 3280, 0, 3337, 3326, 3337, 0, 3337, 3325, 3337, 3337, 3337, 3337, 266, 3277, 3337, 3324, 3337, 3297, 3294, 3317, 0, 3314, 3308, 3306, 22, 3311, 461, 3288, 396, 3337, 3337, 3337, 3337, 519, 3314, 0, 287, 0, 3260, 3337, 522, 525, 0, 528, 3337, 3337, 3337, 504, 3265, 3337, 0, 3337, 3337, 3311, 3278, 3337, 3337, 3337, 410, 3262, 0, 3337, 3308, 0, 3337, 3307, 3337, 3337, 3337, 3306, 0, 3337, 3337, 3337, 3337, 3337, 3337, 3337, 0, 0, 3273, 3337, 0, 3337, 278, 3337, 3272, 3263, 3270, 3273, 3268, 36, 3270, 0, 3298, 0, 3297, 3337, 3264, 3255, 3262, 3265, 3260, 244, 3262, 3291, 3259, 3337, 3337, 0, 3337, 3337, 3277, 45, 3281, 3268, 3337, 3337, 3337, 0, 68, 532, 535, 3337, 265, 384, 6, 274, 258, 3208, 267, 250, 546, 3215, 552, 390, 559, 3218, 391, 564, 393, 3186, 36, 3337, 550, 416, 556, 572, 3167, 3203, 0, 0, 592, 0, 582, 605, 0, 616, 3166, 3157, 3164, 3153, 3337, 3150, 3134, 3141, 3142, 3137, 353, 3139, 0, 3157, 3107, 3337, 3114, 3099, 3105, 3108, 2897, 405, 2899, 0, 2927, 0, 2926, 3337, 0, 0, 2885, 0, 621, 627, 2881, 3337, 2880, 2880, 2878, 2881, 265, 2874, 2875, 3337, 2874, 2874, 2872, 2874, 384, 2867, 2875, 3337, 2905, 0, 630, 633, 3337, 2885, 2882, 2876, 2872, 2876, 2876, 2857, 2864, 2868, 2869, 2867, 2856, 514, 369, 2854, 535, 2851, 2865, 2853, 2853, 2842, 413, 2854, 603, 2839, 2835, 2841, 2853, 408, 2852, 2847, 2849, 2827, 2836, 2839, 2826, 542, 599, 586, 2823, 2834, 2827, 2837, 2821, 2821, 3337, 2820, 2820, 2818, 2821, 595, 2814, 2827, 2813, 3337, 2812, 2812, 2810, 2813, 610, 2806, 2819, 2804, 2803, 2802, 2814, 2800, 2799, 2797, 2809, 2794, 646, 3337, 2813, 3337, 624, 2802, 503, 2795, 2804, 2794, 2798, 2786, 0, 2790, 2788, 2779, 2778, 2787, 2794, 2789, 2782, 2783, 2767, 2773, 2780, 2779, 2778, 628, 2777, 640, 2763, 2769, 2774, 2769, 2776, 2771, 2752, 2763, 2753, 629, 2753, 2755, 632, 2750, 2750, 621, 2765, 2757, 2764, 665, 2736, 2743, 2753, 2750, 2758, 2740, 2739, 2738, 2750, 3337, 2736, 2735, 2734, 2746, 681, 2731, 2744, 2739, 2723, 2722, 2735, 2734, 2719, 2732, 2722, 2717, 2716, 2711, 2715, 2708, 2717, 2706, 2705, 0, 2706, 2709, 2709, 2706, 2711, 2700, 2704, 2700, 2711, 2696, 2692, 2688, 2691, 736, 2698, 2706, 2690, 2692, 2692, 2699, 2702, 646, 2694, 2686, 2718, 2693, 2692, 2674, 2670, 2675, 2691, 0, 2687, 2678, 2671, 2679, 2669, 2674, 2678, 2671, 2678, 388, 2671, 2658, 2658, 2670, 0, 2655, 2666, 3337, 2651, 2652, 2661, 2664, 2645, 2658, 2657, 2641, 2640, 2653, 2652, 2637, 693, 696, 2641, 2635, 2634, 2647, 2637, 2627, 2625, 2638, 3337, 2629, 2628, 668, 2625, 703, 2634, 2624, 2609, 2627, 2629, 2625, 2624, 2611, 2622, 2611, 2611, 763, 2619, 2605, 2618, 0, 0, 790, 696, 670, 817, 0, 0, 2604, 2614, 666, 2597, 2604, 2595, 2601, 2609, 2594, 2595, 2588, 3337, 2608, 2602, 2600, 2597, 2596, 2586, 2597, 2584, 2577, 2579, 680, 0, 2577, 2579, 2572, 2585, 2585, 2572, 2584, 2561, 2580, 864, 2577, 2576, 2579, 718, 2559, 2563, 2557, 2556, 2569, 2559, 2553, 2552, 2565, 721, 2564, 2559, 2546, 2556, 2544, 2540, 2539, 2543, 2551, 2550, 725, 739, 2538, 2542, 2537, 2530, 2532, 2542, 2531, 2541, 2541, 2536, 2521, 891, 718, 686, 918, 0, 752, 2534, 2532, 729, 714, 741, 2521, 684, 2531, 2522, 2520, 2520, 610, 2516, 758, 2525, 2523, 2516, 2510, 2512, 2513, 2514, 2507, 2511, 2492, 2514, 0, 2496, 2490, 2493, 2504, 2502, 2480, 2487, 2487, 2481, 2486, 2487, 2486, 2481, 2468, 2482, 2485, 2466, 2466, 2471, 2474, 0, 2467, 965, 753, 766, 992, 0, 784, 795, 2469, 811, 808, 2466, 2469, 2457, 2467, 2455, 2452, 2452, 2447, 2457, 2455, 2440, 2446, 2455, 820, 2442, 0, 2438, 2442, 2465, 2419, 2422, 2416, 2419, 2428, 2427, 2424, 810, 768, 773, 2412, 767, 2421, 2408, 2406, 2406, 641, 2402, 840, 827, 834, 1039, 2394, 759, 800, 843, 868, 2411, 0, 2407, 2388, 2383, 2380, 2396, 2383, 0, 2384, 2379, 2365, 2385, 2373, 2370, 2368, 0, 2358, 2388, 2349, 2343, 2345, 2349, 2353, 2335, 0, 2339, 2335, 2338, 2317, 2325, 2325, 858, 841, 844, 2309, 806, 2319, 2299, 2304, 2296, 851, 2288, 884, 908, 914, 1066, 928, 911, 2289, 921, 0, 2281, 2275, 2274, 2278, 2266, 2270, 2261, 2265, 2266, 2266, 2267, 0, 3337, 0, 2247, 856, 2234, 0, 0, 565, 847, 894, 942, 971, 987, 0, 925, 885, 1093, 0, 2236, 2238, 2234, 2226, 2221, 2228, 2215, 2220, 2207, 2147, 2158, 2153, 0, 2146, 2146, 2134, 2132, 0, 3337, 2149, 2140, 2128, 2139, 34, 236, 268, 336, 431, 475, 492, 523, 911, 1002, 1015, 1019, 1046, 0, 939, 942, 1140, 0, 1071, 0, 1082, 559, 1100, 567, 577, 614, 615, 643, 996, 665, 674, 692, 730, 725, 0, 0, 3337, 762, 787, 1103, 1109, 986, 945, 955, 796, 943, 821, 835, 848, 857, 916, 864, 1118, 892, 912, 906, 951, 949, 941, 949, 0, 944, 0, 0, 1000, 959, 983, 1004, 0, 973, 0, 992, 995, 997, 1001, 1007, 996, 996, 0, 997, 1024, 1023, 1022, 1162, 1166, 1084, 1049, 1055, 1031, 1081, 1043, 1026, 1046, 1048, 1082, 1047, 1187, 1064, 1190, 3337, 3337, 1193, 3337, 1067, 1069, 1069, 1084, 1086, 1196, 1251, 1087, 1092, 1086, 1103, 1082, 1108, 1096, 1097, 1199, 1216, 1133, 1231, 1235, 1267, 1139, 3337, 0, 1107, 1099, 1145, 0, 0, 1120, 0, 3337, 0, 1124, 3337, 0, 0, 1122, 0, 1130, 1136, 1172, 1145, 1132, 0, 1144, 1156, 1279, 1288, 1193, 1292, 1296, 1300, 1173, 3337, 3337, 1174, 1174, 1167, 1174, 0, 0, 1207, 1209, 1357, 0, 1192, 1174, 0, 1182, 1190, 1180, 1190, 1194, 1353, 1404, 1204, 1205, 1217, 1235, 1209, 0, 1221, 1222, 1225, 0, 0, 1224, 3337, 1228, 1234, 1228, 1236, 1367, 1448, 1247, 1246, 1258, 1266, 1246, 1268, 1261, 0, 1298, 1294, 1301, 1274, 1289, 1286, 1270, 1283, 1285, 1295, 1287, 1380, 1292, 0, 1292, 1308, 1298, 1492, 1519, 1384, 1332, 1335, 1546, 0, 1310, 1312, 1325, 1328, 1324, 3337, 1322, 0, 1355, 1325, 1342, 1330, 1593, 1620, 1432, 1364, 1377, 1647, 0, 1342, 1347, 1361, 1365, 1439, 1360, 1375, 1407, 1468, 1482, 1499, 1389, 3337, 1365, 0, 0, 1694, 0, 1513, 1438, 1423, 1721, 0, 1441, 1428, 1431, 1372, 1426, 1393, 1389, 1390, 1395, 1433, 1416, 1476, 1417, 1421, 1444, 1768, 1440, 1426, 3337, 1470, 0, 1806, 0, 1526, 1472, 1482, 1833, 0, 1536, 1495, 1526, 1446, 1472, 1466, 1466, 1482, 1490, 1521, 1492, 1562, 1489, 1497, 1521, 1880, 1570, 3337, 1511, 0, 1517, 1518, 1543, 1537, 1596, 0, 1586, 1567, 1573, 1522, 1573, 1541, 1535, 1549, 1551, 1578, 1567, 1614, 1597, 1627, 1636, 1663, 1571, 1918, 1945, 1642, 1626, 1609, 1972, 0, 1572, 0, 3337, 0, 1640, 1636, 1642, 1588, 1628, 1613, 1607, 1625, 1629, 1639, 1628, 1672, 1674, 1710, 1715, 1725, 1629, 2019, 2046, 1731, 1715, 1677, 2073, 0, 0, 1640, 1635, 1665, 1668, 1737, 1696, 1704, 1740, 1743, 1784, 2120, 0, 1788, 1733, 1742, 2147, 0, 1762, 1745, 1758, 1656, 1760, 1669, 1684, 1708, 1723, 1748, 1723, 1796, 2195, 1787, 1809, 1812, 1837, 2253, 0, 1856, 1827, 1789, 2280, 0, 1836, 1808, 1812, 1749, 1814, 1767, 1764, 1776, 1789, 1812, 1787, 1860, 1805, 1809, 1837, 2327, 1866, 1886, 0, 1888, 1854, 1857, 1832, 1858, 1852, 1845, 1850, 1857, 1874, 1861, 1907, 1896, 1913, 1922, 1939, 0, 0, 1935, 0, 1935, 1928, 1937, 1882, 1898, 1895, 1903, 1915, 1921, 1933, 1922, 1966, 1967, 1988, 1996, 2025, 1924, 2365, 2392, 1999, 1978, 1992, 2419, 0, 2049, 1996, 2067, 2082, 2096, 2078, 1999, 2099, 2107, 2125, 2466, 0, 2258, 2077, 2002, 2493, 0, 2126, 2009, 2023, 1934, 2023, 1952, 1943, 1967, 1990, 2010, 1992, 2269, 2540, 2276, 2581, 2290, 0, 2129, 2056, 2062, 1997, 2054, 2011, 2002, 2023, 2026, 2081, 2050, 2287, 2100, 2304, 2333, 2347, 2622, 2355, 2663, 2368, 2136, 2361, 2381, 2398, 2704, 2761, 2429, 2818, 2442, 2471, 2875, 2272, 3337, 2933, 2945, 2957, 2969, 2981, 2993, 3005, 3017, 3029, 3041, 3053, 3065, 3077, 3089, 3101, 3113, 3125, 3137, 3147, 3157, 3166, 3174, 3183, 3185, 2096, 2105, 3193, 3203, 3213, 3225, 3237, 3244, 3246, 3254, 2111, 2123, 2125, 2139, 2147, 2148, 2150, 3266, 2151, 2152, 2153, 2158, 2161, 2162, 2163, 2164, 2165, 3278, 2166, 2167 } ; static yyconst flex_int16_t yy_def[1416] = { 0, 1362, 1362, 1363, 1363, 1364, 1364, 1365, 1365, 1366, 1366, 1367, 1367, 1361, 13, 1361, 15, 1361, 17, 1368, 1368, 1361, 21, 1369, 1369, 1370, 1370, 1371, 1371, 1372, 1372, 1373, 1373, 1374, 1374, 1375, 1375, 1376, 1376, 1377, 1377, 1362, 1362, 1378, 1378, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1379, 1361, 1361, 1361, 1380, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1381, 1361, 1361, 1361, 1361, 1382, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1383, 1384, 1385, 1361, 1361, 1361, 1361, 1386, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1387, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1388, 1361, 1361, 1389, 1361, 1361, 1361, 1361, 1361, 1361, 1390, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1391, 1391, 1361, 1361, 1392, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1379, 1361, 1380, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1381, 1361, 1361, 1361, 1361, 1393, 1382, 1361, 1361, 1361, 1394, 1394, 1394, 1394, 1361, 1361, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1383, 1383, 1384, 1385, 1361, 1361, 1386, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1387, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1388, 1361, 1389, 1361, 1361, 1390, 1391, 1361, 1392, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1393, 1394, 1394, 1361, 1361, 1361, 1395, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1395, 1361, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1361, 1361, 1361, 1361, 1396, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1361, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1394, 1394, 1394, 1394, 1394, 1361, 1361, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1361, 1361, 1361, 1361, 1397, 1394, 1394, 1394, 523, 605, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1396, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1361, 1361, 1361, 1361, 1398, 1394, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1394, 1394, 1394, 1394, 1394, 1361, 1361, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 600, 687, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1397, 1361, 1361, 1361, 1394, 1394, 605, 1361, 1361, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 654, 739, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1398, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1399, 1361, 1361, 1361, 1361, 1394, 1394, 1394, 1394, 1394, 1361, 1394, 1394, 1361, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 687, 1361, 1361, 1397, 1397, 701, 1361, 1361, 1361, 1400, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1361, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 739, 1361, 1361, 1398, 1398, 753, 1361, 1361, 1361, 1401, 1361, 1402, 1361, 1399, 1361, 1361, 1394, 1394, 1394, 1394, 1394, 1361, 1394, 1394, 1394, 1394, 1394, 1403, 1361, 1361, 1361, 1397, 1397, 787, 853, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1400, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1361, 1361, 1398, 1398, 828, 897, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1401, 1402, 1361, 1361, 1361, 1361, 1361, 1361, 1394, 1394, 1394, 1394, 1361, 1361, 1361, 1394, 1394, 1394, 1394, 1403, 1361, 1361, 1397, 1397, 853, 1361, 1361, 1400, 935, 1361, 1394, 1394, 1394, 1361, 1394, 1394, 1394, 1394, 1361, 1394, 1394, 1361, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1394, 1361, 1361, 1398, 1398, 897, 1361, 1361, 1401, 967, 1361, 1361, 1361, 1394, 1394, 1394, 1394, 921, 1361, 1361, 1361, 1404, 1361, 1394, 1394, 1394, 1394, 1361, 1361, 1361, 1397, 1397, 1361, 1361, 935, 935, 1394, 1394, 1361, 1394, 1394, 1394, 1394, 1394, 1361, 1394, 1394, 1361, 1361, 1398, 1398, 1361, 1361, 967, 967, 1361, 1394, 1394, 1394, 979, 1018, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1404, 1361, 1394, 1394, 1394, 1361, 1361, 990, 1035, 1361, 1361, 1361, 1405, 1361, 1361, 935, 935, 1394, 1361, 1394, 1394, 1394, 1394, 1394, 1361, 1361, 1009, 1054, 1361, 1361, 1361, 1406, 1361, 1361, 967, 967, 1361, 1394, 1394, 1018, 1361, 1361, 1404, 1071, 1361, 1361, 1394, 1394, 1361, 1035, 1077, 1361, 1361, 1361, 1407, 1040, 1084, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1405, 1361, 1361, 935, 935, 1394, 1394, 1361, 1394, 1394, 1361, 1054, 1105, 1361, 1361, 1361, 1408, 1059, 1112, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1406, 1361, 1361, 967, 967, 1361, 1361, 1394, 1394, 1361, 1361, 1071, 1071, 1361, 1077, 1082, 1138, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1407, 1084, 1361, 1361, 1405, 1361, 1361, 1099, 1155, 1361, 1361, 1361, 1409, 1394, 1394, 1361, 1105, 1110, 1166, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1408, 1112, 1361, 1361, 1406, 1361, 1361, 1127, 1183, 1361, 1361, 1361, 1410, 1394, 1361, 1361, 1071, 1071, 1361, 1361, 1138, 1361, 1361, 1405, 1361, 1155, 1201, 1361, 1361, 1361, 1411, 1160, 1208, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1409, 1361, 1166, 1361, 1361, 1406, 1361, 1183, 1225, 1361, 1361, 1361, 1412, 1188, 1232, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1410, 1361, 1361, 1071, 1071, 1361, 1405, 1201, 1206, 1251, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1411, 1208, 1361, 1361, 1409, 1413, 1220, 1406, 1225, 1230, 1271, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1412, 1232, 1361, 1361, 1410, 1361, 1361, 1247, 1288, 1361, 1361, 1361, 1414, 1405, 1251, 1361, 1361, 1409, 1406, 1271, 1361, 1361, 1410, 1361, 1288, 1305, 1361, 1361, 1361, 1415, 1293, 1312, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1414, 1405, 1409, 1406, 1410, 1305, 1310, 1329, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1415, 1312, 1361, 1361, 1414, 1361, 1409, 1361, 1410, 1329, 1361, 1361, 1414, 1409, 1410, 1414, 1361, 1225, 1414, 1414, 1307, 0, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361 } ; static yyconst flex_uint16_t yy_nxt[3397] = { 0, 1361, 1361, 48, 48, 51, 1361, 1361, 52, 51, 1361, 1361, 52, 61, 62, 61, 57, 58, 57, 108, 53, 53, 53, 46, 53, 53, 53, 57, 108, 46, 54, 57, 58, 57, 54, 61, 62, 61, 168, 168, 46, 273, 57, 64, 109, 274, 65, 122, 64, 134, 55, 65, 134, 109, 55, 132, 49, 49, 66, 66, 66, 168, 168, 66, 66, 66, 132, 61, 67, 61, 57, 305, 59, 67, 135, 252, 123, 135, 124, 138, 138, 139, 139, 885, 306, 57, 253, 59, 68, 61, 267, 61, 267, 68, 69, 70, 71, 72, 73, 74, 75, 76, 69, 69, 69, 69, 77, 78, 69, 79, 79, 69, 69, 69, 69, 80, 80, 80, 80, 80, 69, 81, 69, 82, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 83, 84, 85, 86, 87, 88, 89, 88, 87, 87, 87, 90, 87, 87, 87, 87, 87, 90, 87, 91, 91, 87, 90, 87, 91, 91, 91, 91, 91, 91, 87, 92, 87, 90, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 93, 87, 87, 87, 94, 95, 96, 95, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 97, 97, 97, 97, 97, 94, 94, 94, 94, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 98, 94, 94, 94, 100, 152, 141, 100, 142, 270, 143, 144, 145, 245, 246, 245, 260, 146, 886, 101, 101, 101, 101, 101, 101, 271, 278, 261, 206, 102, 333, 283, 102, 281, 206, 279, 153, 284, 154, 206, 155, 156, 157, 334, 282, 275, 276, 158, 887, 103, 206, 277, 103, 104, 104, 46, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 105, 105, 105, 105, 105, 104, 104, 104, 104, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 104, 104, 106, 104, 111, 888, 46, 111, 116, 117, 116, 116, 117, 116, 119, 120, 119, 319, 46, 112, 112, 112, 112, 112, 112, 119, 120, 119, 320, 113, 122, 46, 113, 199, 358, 199, 200, 201, 201, 359, 267, 337, 128, 272, 267, 228, 289, 292, 553, 114, 290, 293, 114, 302, 338, 128, 303, 307, 307, 123, 294, 124, 116, 554, 116, 116, 379, 116, 119, 328, 119, 129, 229, 130, 230, 369, 231, 232, 233, 119, 329, 119, 380, 234, 129, 370, 130, 171, 171, 889, 172, 171, 171, 171, 171, 173, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, 174, 175, 174, 174, 176, 177, 178, 179, 171, 171, 180, 181, 182, 183, 184, 185, 174, 186, 187, 188, 189, 174, 190, 191, 192, 174, 193, 194, 195, 196, 197, 174, 174, 174, 174, 171, 171, 171, 171, 202, 890, 202, 209, 209, 209, 209, 209, 209, 212, 212, 212, 217, 268, 269, 268, 268, 269, 268, 891, 218, 420, 219, 421, 220, 221, 222, 268, 269, 268, 422, 223, 355, 268, 269, 268, 356, 357, 267, 892, 268, 269, 268, 213, 200, 201, 201, 361, 362, 214, 308, 201, 201, 202, 203, 202, 215, 210, 216, 363, 210, 388, 287, 209, 209, 209, 389, 912, 285, 269, 288, 847, 269, 267, 295, 296, 297, 915, 298, 206, 309, 390, 390, 269, 299, 206, 212, 212, 212, 269, 206, 267, 300, 301, 307, 307, 269, 212, 212, 212, 848, 206, 245, 246, 245, 916, 397, 203, 245, 246, 245, 341, 342, 341, 268, 269, 268, 210, 372, 398, 213, 402, 705, 309, 917, 373, 214, 341, 342, 341, 374, 213, 469, 215, 403, 216, 415, 214, 705, 416, 442, 459, 443, 918, 215, 470, 216, 464, 444, 460, 447, 448, 417, 780, 418, 445, 465, 461, 532, 466, 390, 390, 487, 487, 487, 605, 605, 342, 449, 780, 269, 919, 533, 534, 487, 487, 487, 573, 573, 573, 581, 687, 687, 342, 584, 584, 584, 619, 582, 309, 522, 523, 523, 639, 922, 620, 705, 640, 923, 659, 659, 659, 573, 573, 573, 705, 584, 584, 584, 1361, 1361, 641, 599, 600, 600, 924, 488, 520, 520, 520, 674, 674, 674, 1361, 605, 605, 574, 521, 488, 521, 522, 523, 523, 699, 699, 699, 704, 704, 585, 706, 706, 706, 700, 524, 597, 597, 597, 653, 654, 654, 925, 574, 675, 926, 598, 660, 598, 599, 600, 600, 585, 739, 739, 1361, 1361, 751, 751, 751, 779, 779, 601, 520, 520, 520, 752, 790, 754, 754, 754, 780, 928, 521, 791, 521, 522, 523, 523, 701, 780, 757, 757, 757, 659, 659, 659, 704, 704, 524, 606, 606, 606, 674, 674, 674, 1361, 687, 687, 929, 699, 699, 699, 607, 523, 523, 758, 699, 699, 699, 821, 753, 933, 781, 781, 781, 706, 706, 706, 821, 608, 609, 610, 611, 755, 675, 933, 612, 1361, 1361, 613, 820, 820, 614, 779, 779, 615, 651, 651, 651, 660, 706, 706, 706, 1361, 739, 739, 652, 933, 652, 653, 654, 654, 782, 701, 821, 783, 822, 822, 822, 844, 701, 933, 655, 597, 597, 597, 781, 781, 781, 933, 821, 853, 853, 598, 845, 598, 599, 600, 600, 933, 751, 751, 751, 830, 830, 830, 751, 751, 751, 601, 688, 688, 688, 757, 757, 757, 823, 820, 820, 824, 754, 754, 754, 689, 600, 600, 849, 938, 831, 850, 786, 787, 787, 939, 781, 781, 781, 940, 758, 933, 690, 691, 692, 693, 827, 828, 828, 694, 897, 897, 695, 1361, 1361, 696, 753, 933, 697, 651, 651, 651, 753, 932, 932, 781, 781, 781, 933, 652, 941, 652, 653, 654, 654, 942, 849, 933, 755, 850, 943, 781, 781, 781, 944, 655, 740, 740, 740, 945, 920, 920, 920, 1361, 853, 853, 822, 822, 822, 741, 654, 654, 851, 946, 947, 782, 948, 949, 783, 822, 822, 822, 950, 822, 822, 822, 742, 743, 744, 745, 852, 782, 951, 746, 783, 952, 747, 953, 954, 748, 955, 956, 749, 784, 784, 784, 893, 957, 958, 894, 822, 822, 822, 785, 921, 785, 786, 787, 787, 893, 895, 959, 894, 823, 960, 961, 824, 1361, 1361, 788, 825, 825, 825, 964, 964, 830, 830, 830, 965, 965, 826, 965, 826, 827, 828, 828, 910, 910, 910, 896, 823, 965, 965, 824, 965, 970, 829, 854, 854, 854, 831, 1361, 897, 897, 913, 913, 913, 781, 781, 781, 855, 787, 787, 781, 781, 781, 965, 965, 971, 972, 973, 974, 934, 934, 934, 965, 975, 856, 857, 858, 859, 981, 982, 965, 860, 983, 984, 861, 985, 986, 862, 987, 911, 863, 898, 898, 898, 782, 930, 988, 783, 932, 932, 782, 995, 996, 783, 899, 828, 828, 914, 931, 935, 997, 998, 936, 822, 822, 822, 999, 822, 822, 822, 1000, 900, 901, 902, 903, 937, 1001, 864, 904, 994, 1002, 905, 1003, 1004, 906, 1005, 1006, 907, 966, 966, 966, 910, 910, 910, 913, 913, 913, 920, 920, 920, 781, 781, 781, 823, 962, 1007, 824, 823, 964, 964, 824, 908, 1014, 1013, 1015, 963, 1016, 781, 781, 781, 1017, 978, 979, 979, 1018, 1018, 1030, 1031, 967, 1032, 1033, 968, 934, 934, 934, 848, 934, 934, 934, 1034, 782, 1035, 1042, 783, 969, 1043, 1046, 911, 989, 1047, 914, 921, 976, 976, 976, 864, 1048, 782, 1049, 1044, 783, 1050, 977, 990, 977, 978, 979, 979, 934, 934, 934, 1051, 991, 864, 1052, 992, 991, 1053, 980, 992, 822, 822, 822, 1054, 1045, 1061, 1062, 1065, 937, 822, 822, 822, 937, 966, 966, 966, 908, 966, 966, 966, 1063, 966, 966, 966, 908, 993, 1066, 1067, 935, 1361, 1361, 936, 1361, 1018, 1018, 1064, 1068, 1068, 1069, 1069, 823, 1069, 1069, 824, 937, 1069, 1069, 1069, 1008, 823, 1069, 1069, 824, 1010, 1074, 1009, 1011, 1010, 1012, 1075, 1011, 967, 1076, 1069, 968, 1077, 1039, 1040, 1040, 969, 1084, 1084, 1096, 969, 781, 781, 781, 969, 1019, 1019, 1019, 1097, 1100, 864, 1101, 1102, 864, 1103, 822, 822, 822, 1020, 979, 979, 1098, 1099, 1104, 1105, 1058, 1059, 1059, 1070, 1070, 1070, 1124, 1037, 1037, 1037, 1021, 1022, 1023, 1024, 1112, 1112, 782, 1025, 1125, 783, 1026, 908, 1036, 1027, 1130, 908, 1028, 1037, 1037, 1037, 823, 1131, 1126, 824, 1127, 1136, 1055, 1038, 1151, 1038, 1039, 1040, 1040, 1071, 1068, 1068, 1072, 849, 1151, 1029, 850, 1135, 1151, 1041, 1151, 1056, 1056, 1056, 1151, 1073, 1138, 1138, 1128, 1128, 1128, 1361, 1361, 782, 1150, 1150, 783, 1056, 1056, 1056, 1081, 1082, 1082, 1361, 1084, 1084, 1151, 1057, 1151, 1057, 1058, 1059, 1059, 1151, 1154, 1151, 1155, 1070, 1070, 1070, 1162, 893, 1163, 1060, 894, 1152, 1152, 1152, 1164, 1151, 864, 1070, 1070, 1070, 1109, 1110, 1110, 823, 1179, 1156, 824, 1078, 1078, 1078, 1129, 1166, 1166, 1179, 1070, 1070, 1070, 1038, 1179, 1038, 1039, 1040, 1040, 1132, 1361, 1361, 1133, 1179, 1079, 1079, 1079, 1153, 1179, 1041, 1079, 1079, 1079, 1132, 1179, 1073, 1133, 1107, 1107, 1107, 1080, 1179, 1080, 1081, 1082, 1082, 1179, 1134, 1182, 1073, 1071, 1178, 1178, 1072, 1183, 1190, 1083, 1085, 1085, 1085, 1361, 1112, 1112, 1179, 849, 1191, 1073, 850, 1192, 908, 1086, 1040, 1040, 1180, 1180, 1180, 1198, 893, 1184, 1179, 894, 1128, 1128, 1128, 1198, 1029, 1198, 1087, 1088, 1089, 1090, 1029, 1361, 1361, 1091, 1193, 1194, 1092, 1197, 1197, 1093, 1198, 1198, 1094, 1106, 1106, 1106, 1195, 1195, 1195, 1361, 1138, 1138, 1181, 1057, 1198, 1057, 1058, 1059, 1059, 1198, 1198, 1150, 1150, 1198, 1199, 1199, 1199, 1201, 1220, 1060, 1107, 1107, 1107, 1208, 1208, 1198, 1129, 1152, 1152, 1152, 1108, 1222, 1108, 1109, 1110, 1110, 1152, 1152, 1152, 1159, 1160, 1160, 1157, 1157, 1157, 1222, 1111, 1113, 1113, 1113, 1361, 1361, 1196, 1361, 1166, 1166, 1221, 1221, 1222, 1222, 1114, 1059, 1059, 1152, 1152, 1152, 1222, 849, 1222, 1222, 1222, 1222, 1223, 1223, 1223, 1225, 849, 1115, 1116, 1117, 1118, 1244, 991, 1245, 1119, 992, 1222, 1120, 1178, 1178, 1121, 1232, 1232, 1122, 1137, 1137, 1137, 1248, 937, 1264, 1200, 1264, 1029, 1153, 1080, 1029, 1080, 1081, 1082, 1082, 1180, 1180, 1180, 1246, 1247, 1180, 1180, 1180, 1197, 1197, 1083, 1139, 1139, 1139, 1264, 1180, 1180, 1180, 1187, 1188, 1188, 1185, 1185, 1185, 1140, 1082, 1082, 1195, 1195, 1195, 1199, 1199, 1199, 1199, 1199, 1199, 1205, 1206, 1206, 1264, 893, 1141, 1142, 1143, 1144, 893, 1251, 1251, 1145, 1361, 1361, 1146, 1224, 1264, 1147, 1181, 1264, 1148, 1157, 1157, 1157, 1010, 1263, 1263, 1011, 1361, 1208, 1208, 1158, 1264, 1158, 1159, 1160, 1160, 1152, 1152, 1152, 969, 1203, 1203, 1203, 1264, 1284, 1196, 1161, 1264, 1265, 1265, 1265, 1284, 1264, 1221, 1221, 1271, 1271, 864, 1165, 1165, 1165, 1223, 1223, 1223, 1223, 1223, 1223, 1284, 1108, 1284, 1108, 1109, 1110, 1110, 1361, 1361, 1153, 1249, 1283, 1283, 991, 1284, 1284, 992, 1111, 1167, 1167, 1167, 1266, 1180, 1180, 1180, 1229, 1230, 1230, 1284, 937, 1284, 1168, 1110, 1110, 1361, 1232, 1232, 937, 1287, 1284, 1288, 1227, 1227, 1227, 1284, 1285, 1285, 1285, 1169, 1170, 1171, 1172, 1248, 1361, 1361, 1173, 1296, 1296, 1174, 1029, 1297, 1175, 1181, 1269, 1176, 1185, 1185, 1185, 1289, 1297, 1297, 1152, 1152, 1152, 1297, 1186, 1297, 1186, 1187, 1188, 1188, 1010, 1297, 1297, 1011, 1286, 1361, 1251, 1251, 1297, 1297, 1189, 1298, 1298, 1298, 1263, 1263, 969, 1265, 1265, 1265, 969, 908, 1202, 1202, 1202, 1297, 1265, 1265, 1265, 1302, 1153, 1302, 1158, 1302, 1158, 1159, 1160, 1160, 1295, 1180, 1180, 1180, 1302, 1265, 1265, 1265, 1361, 1361, 1161, 1203, 1203, 1203, 1361, 1271, 1271, 1301, 1301, 991, 1302, 1204, 1302, 1204, 1205, 1206, 1206, 1302, 991, 937, 1302, 1302, 1303, 1303, 1303, 937, 1305, 1207, 1209, 1209, 1209, 1181, 1299, 1342, 937, 1266, 1302, 1283, 1283, 1300, 1342, 1210, 1160, 1160, 1285, 1285, 1285, 1292, 1293, 1293, 1342, 937, 1285, 1285, 1285, 1290, 1290, 1290, 1211, 1212, 1213, 1214, 1312, 1312, 1342, 1215, 1296, 1296, 1216, 1301, 1301, 1217, 1329, 1329, 1218, 1226, 1226, 1226, 969, 1361, 1361, 1285, 1285, 1285, 1010, 1186, 1342, 1186, 1187, 1188, 1188, 1342, 1010, 1341, 1341, 1132, 1350, 1342, 1133, 1350, 969, 1189, 1227, 1227, 1227, 1152, 1152, 1152, 969, 1350, 1342, 1073, 1228, 1342, 1228, 1229, 1230, 1230, 1304, 1342, 1350, 1286, 1350, 1298, 1298, 1298, 1361, 1361, 1231, 1233, 1233, 1233, 1349, 1349, 1180, 1180, 1180, 969, 1298, 1298, 1298, 1350, 1234, 1188, 1188, 1153, 1309, 1310, 1310, 1350, 1350, 1324, 1265, 1265, 1265, 1303, 1303, 1303, 211, 1235, 1236, 1237, 1238, 1303, 1303, 1303, 1239, 225, 1350, 1240, 1341, 1341, 1241, 616, 1181, 1242, 1250, 1250, 1250, 937, 1326, 1285, 1285, 1285, 1350, 698, 1204, 750, 1204, 1205, 1206, 1206, 1266, 1325, 937, 1361, 1312, 1312, 1361, 1329, 1329, 833, 1207, 1252, 1252, 1252, 1349, 1349, 937, 864, 908, 969, 909, 1029, 1095, 1123, 1253, 1206, 1206, 969, 1149, 1286, 1327, 1177, 1219, 1243, 1262, 1282, 1323, 1340, 884, 883, 882, 1254, 1255, 1256, 1257, 969, 881, 880, 1258, 879, 878, 1259, 877, 876, 1260, 875, 874, 1261, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1268, 1268, 1268, 1268, 1268, 1268, 1267, 1267, 1267, 1267, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 1268, 873, 1267, 1267, 1267, 1270, 1270, 1270, 872, 871, 1307, 1307, 1307, 870, 869, 1228, 868, 1228, 1229, 1230, 1230, 1343, 1343, 1343, 1360, 1360, 1360, 867, 1265, 1265, 1265, 1231, 1272, 1272, 1272, 866, 865, 846, 843, 1351, 1351, 1351, 1285, 1285, 1285, 1273, 1230, 1230, 842, 841, 1132, 840, 839, 1133, 838, 837, 1343, 1343, 1343, 836, 835, 1344, 1274, 1275, 1276, 1277, 1073, 1361, 1266, 1278, 324, 315, 1279, 834, 832, 1280, 1346, 1073, 1281, 1290, 1290, 1290, 1286, 821, 937, 1343, 1343, 1343, 821, 1291, 1348, 1291, 1292, 1293, 1293, 1073, 1132, 821, 969, 1343, 1343, 1343, 821, 821, 821, 1294, 819, 1265, 1265, 1265, 818, 817, 1073, 1351, 1351, 1351, 1029, 1306, 1306, 1306, 1285, 1285, 1285, 816, 815, 1132, 814, 1291, 813, 1291, 1292, 1293, 1293, 1351, 1351, 1351, 1352, 812, 811, 1344, 810, 1073, 809, 1294, 1307, 1307, 1307, 1266, 808, 807, 1343, 1343, 1343, 1353, 1308, 1073, 1308, 1309, 1310, 1310, 1286, 806, 805, 937, 804, 803, 1354, 802, 801, 1073, 1311, 1313, 1313, 1313, 800, 799, 969, 798, 797, 796, 795, 1343, 1343, 1343, 1314, 1293, 1293, 794, 793, 1073, 1344, 1355, 792, 789, 1357, 1357, 1357, 780, 780, 780, 780, 1315, 1316, 1317, 1318, 780, 1073, 780, 1319, 778, 777, 1320, 776, 775, 1321, 774, 773, 1322, 1328, 1328, 1328, 1344, 772, 1343, 1343, 1343, 771, 770, 1308, 1358, 1308, 1309, 1310, 1310, 1010, 769, 768, 1073, 767, 766, 765, 764, 763, 256, 1311, 1330, 1330, 1330, 248, 762, 969, 324, 761, 315, 760, 759, 756, 738, 1331, 1310, 1310, 737, 736, 1344, 735, 734, 733, 732, 731, 1359, 730, 729, 728, 727, 726, 1332, 1333, 1334, 1335, 1073, 725, 724, 1336, 723, 722, 1337, 721, 720, 1338, 719, 718, 1339, 1345, 1345, 1345, 717, 716, 715, 714, 713, 712, 711, 1080, 710, 1080, 1081, 1082, 1082, 709, 708, 707, 705, 705, 705, 705, 705, 705, 703, 1083, 702, 686, 685, 684, 683, 682, 681, 680, 679, 678, 677, 676, 673, 1153, 1347, 1347, 1347, 672, 671, 670, 669, 256, 668, 248, 1108, 667, 1108, 1109, 1110, 1110, 666, 665, 324, 664, 324, 663, 315, 662, 315, 661, 1111, 658, 657, 656, 650, 649, 648, 647, 646, 645, 644, 643, 642, 638, 1181, 1345, 1345, 1345, 637, 636, 635, 634, 633, 632, 631, 1080, 630, 1080, 1081, 1082, 1082, 629, 628, 627, 626, 625, 624, 623, 622, 621, 618, 1083, 617, 604, 603, 602, 596, 595, 594, 593, 592, 591, 590, 589, 588, 849, 1347, 1347, 1347, 587, 586, 583, 580, 579, 578, 256, 1108, 577, 1108, 1109, 1110, 1110, 256, 576, 248, 575, 248, 572, 571, 570, 569, 568, 1111, 567, 566, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 893, 1356, 1356, 1356, 552, 551, 550, 549, 548, 547, 546, 1204, 545, 1204, 1205, 1206, 1206, 544, 543, 542, 541, 540, 539, 538, 537, 536, 535, 1207, 531, 530, 529, 528, 527, 526, 525, 519, 518, 517, 516, 515, 514, 1266, 513, 512, 511, 510, 509, 508, 507, 506, 505, 504, 503, 502, 501, 500, 499, 937, 1357, 1357, 1357, 498, 497, 496, 495, 494, 493, 492, 1228, 491, 1228, 1229, 1230, 1230, 490, 489, 486, 485, 484, 483, 482, 481, 480, 479, 1231, 478, 477, 476, 475, 474, 473, 472, 471, 468, 467, 463, 462, 458, 1286, 457, 456, 455, 454, 453, 452, 451, 450, 446, 441, 440, 439, 438, 437, 436, 969, 1356, 1356, 1356, 435, 434, 433, 432, 431, 430, 429, 1204, 428, 1204, 1205, 1206, 1206, 427, 426, 425, 424, 423, 419, 344, 414, 413, 412, 1207, 411, 410, 409, 408, 407, 406, 405, 404, 324, 324, 401, 324, 324, 991, 400, 399, 315, 315, 396, 315, 315, 395, 394, 393, 392, 391, 387, 386, 385, 937, 1360, 1360, 1360, 384, 383, 382, 381, 378, 377, 376, 1308, 375, 1308, 1309, 1310, 1310, 371, 368, 367, 366, 365, 364, 360, 354, 353, 352, 1311, 351, 350, 349, 348, 347, 346, 345, 344, 271, 1361, 340, 339, 256, 1344, 256, 336, 256, 256, 335, 248, 248, 332, 248, 248, 331, 239, 237, 330, 327, 1073, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, 148, 326, 325, 148, 324, 148, 148, 148, 148, 148, 150, 323, 322, 150, 150, 150, 150, 150, 150, 150, 164, 164, 226, 164, 164, 164, 164, 164, 164, 164, 164, 164, 170, 321, 318, 317, 170, 205, 316, 315, 205, 205, 205, 205, 205, 205, 205, 314, 205, 207, 313, 207, 207, 207, 208, 208, 236, 312, 311, 236, 236, 236, 236, 236, 236, 236, 238, 310, 204, 238, 238, 238, 238, 238, 238, 238, 241, 241, 241, 241, 241, 241, 241, 241, 241, 203, 241, 241, 242, 242, 242, 242, 242, 242, 242, 242, 304, 242, 242, 242, 244, 244, 244, 244, 244, 244, 244, 244, 244, 244, 265, 291, 286, 280, 265, 266, 266, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 927, 927, 927, 927, 927, 927, 927, 927, 927, 169, 927, 927, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 1267, 169, 1267, 264, 263, 160, 262, 259, 258, 257, 256, 255, 151, 149, 254, 251, 250, 249, 248, 247, 243, 240, 239, 237, 235, 227, 226, 224, 203, 204, 198, 169, 167, 166, 165, 163, 162, 161, 160, 159, 151, 149, 147, 140, 1361, 136, 136, 126, 126, 45, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361 } ; static yyconst flex_int16_t yy_chk[3397] = { 0, 0, 0, 3, 4, 5, 0, 0, 5, 6, 0, 0, 6, 9, 9, 9, 7, 7, 7, 23, 5, 5, 5, 31, 6, 6, 6, 7, 24, 37, 5, 8, 8, 8, 6, 10, 10, 10, 79, 79, 38, 181, 8, 11, 23, 181, 11, 31, 12, 39, 5, 12, 40, 24, 6, 37, 3, 4, 11, 11, 11, 168, 168, 12, 12, 12, 38, 9, 11, 9, 7, 197, 7, 12, 39, 146, 31, 40, 31, 43, 44, 43, 44, 812, 197, 8, 146, 8, 11, 10, 175, 10, 175, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 19, 67, 54, 20, 54, 179, 54, 54, 54, 139, 139, 139, 158, 54, 813, 19, 19, 19, 20, 20, 20, 179, 183, 158, 91, 19, 253, 186, 20, 185, 91, 183, 67, 186, 67, 91, 67, 67, 67, 253, 185, 182, 182, 67, 814, 19, 91, 182, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 25, 815, 32, 26, 27, 27, 27, 28, 28, 28, 29, 29, 29, 223, 35, 25, 25, 25, 26, 26, 26, 30, 30, 30, 223, 25, 32, 36, 26, 83, 283, 83, 83, 83, 83, 283, 180, 261, 35, 180, 180, 113, 190, 193, 466, 25, 190, 193, 26, 195, 261, 36, 195, 200, 200, 32, 193, 32, 27, 466, 27, 28, 298, 28, 29, 234, 29, 35, 113, 35, 113, 291, 113, 113, 113, 30, 234, 30, 298, 113, 36, 291, 36, 81, 81, 816, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 88, 817, 88, 95, 95, 95, 96, 96, 96, 98, 98, 98, 102, 176, 176, 176, 177, 177, 177, 818, 102, 347, 102, 347, 102, 102, 102, 187, 187, 187, 347, 102, 282, 189, 189, 189, 282, 282, 177, 819, 191, 191, 191, 98, 199, 199, 199, 285, 285, 98, 201, 201, 201, 202, 88, 202, 98, 95, 98, 285, 96, 306, 189, 209, 209, 209, 306, 833, 187, 176, 189, 778, 177, 191, 194, 194, 194, 835, 194, 207, 201, 308, 308, 187, 194, 207, 210, 210, 210, 189, 207, 194, 194, 194, 307, 307, 191, 212, 212, 212, 778, 207, 245, 245, 245, 836, 320, 202, 246, 246, 246, 267, 267, 267, 268, 268, 268, 209, 293, 320, 210, 329, 614, 307, 837, 293, 210, 341, 341, 341, 293, 212, 386, 210, 329, 210, 345, 212, 614, 345, 368, 380, 368, 838, 212, 386, 212, 383, 368, 380, 370, 370, 345, 696, 345, 368, 383, 380, 446, 383, 390, 390, 405, 405, 405, 522, 522, 267, 370, 696, 268, 839, 446, 446, 487, 487, 487, 488, 488, 488, 500, 599, 599, 341, 502, 502, 502, 528, 500, 390, 521, 521, 521, 548, 841, 528, 609, 548, 842, 563, 563, 563, 573, 573, 573, 609, 584, 584, 584, 606, 606, 548, 598, 598, 598, 843, 405, 438, 438, 438, 585, 585, 585, 605, 605, 605, 488, 438, 487, 438, 438, 438, 438, 602, 602, 602, 607, 607, 502, 616, 616, 616, 602, 438, 514, 514, 514, 652, 652, 652, 844, 573, 585, 845, 514, 563, 514, 514, 514, 514, 584, 653, 653, 688, 688, 656, 656, 656, 689, 689, 514, 520, 520, 520, 656, 703, 657, 657, 657, 691, 849, 520, 703, 520, 520, 520, 520, 602, 691, 660, 660, 660, 659, 659, 659, 704, 704, 520, 523, 523, 523, 674, 674, 674, 687, 687, 687, 850, 699, 699, 699, 523, 523, 523, 660, 700, 700, 700, 743, 656, 856, 698, 698, 698, 705, 705, 705, 743, 523, 523, 523, 523, 657, 674, 858, 523, 740, 740, 523, 741, 741, 523, 779, 779, 523, 559, 559, 559, 659, 706, 706, 706, 739, 739, 739, 559, 859, 559, 559, 559, 559, 698, 699, 748, 698, 750, 750, 750, 774, 700, 860, 559, 597, 597, 597, 780, 780, 780, 861, 748, 786, 786, 597, 774, 597, 597, 597, 597, 863, 751, 751, 751, 755, 755, 755, 752, 752, 752, 597, 600, 600, 600, 757, 757, 757, 750, 820, 820, 750, 754, 754, 754, 600, 600, 600, 780, 865, 755, 780, 785, 785, 785, 866, 781, 781, 781, 867, 757, 862, 600, 600, 600, 600, 826, 826, 826, 600, 827, 827, 600, 854, 854, 600, 751, 862, 600, 651, 651, 651, 752, 855, 855, 782, 782, 782, 857, 651, 868, 651, 651, 651, 651, 869, 781, 857, 754, 781, 870, 783, 783, 783, 871, 651, 654, 654, 654, 873, 840, 840, 840, 853, 853, 853, 821, 821, 821, 654, 654, 654, 782, 876, 877, 782, 878, 879, 782, 822, 822, 822, 881, 823, 823, 823, 654, 654, 654, 654, 783, 783, 883, 654, 783, 884, 654, 885, 886, 654, 887, 888, 654, 701, 701, 701, 821, 889, 891, 821, 824, 824, 824, 701, 840, 701, 701, 701, 701, 822, 823, 892, 822, 823, 893, 894, 823, 898, 898, 701, 753, 753, 753, 899, 899, 830, 830, 830, 900, 902, 753, 903, 753, 753, 753, 753, 832, 832, 832, 824, 824, 904, 905, 824, 907, 909, 753, 787, 787, 787, 830, 897, 897, 897, 834, 834, 834, 851, 851, 851, 787, 787, 787, 852, 852, 852, 901, 906, 915, 916, 917, 918, 864, 864, 864, 901, 919, 787, 787, 787, 787, 922, 923, 906, 787, 924, 925, 787, 926, 927, 787, 928, 832, 787, 828, 828, 828, 851, 851, 929, 851, 932, 932, 852, 939, 940, 852, 828, 828, 828, 834, 852, 864, 941, 944, 864, 895, 895, 895, 948, 896, 896, 896, 952, 828, 828, 828, 828, 864, 954, 936, 828, 936, 955, 828, 956, 957, 828, 958, 960, 828, 908, 908, 908, 910, 910, 910, 913, 913, 913, 920, 920, 920, 930, 930, 930, 895, 895, 961, 895, 896, 964, 964, 896, 968, 971, 968, 972, 896, 973, 931, 931, 931, 974, 977, 977, 977, 978, 978, 981, 982, 908, 984, 985, 908, 933, 933, 933, 986, 934, 934, 934, 987, 930, 988, 991, 930, 908, 992, 995, 910, 930, 997, 913, 920, 921, 921, 921, 993, 998, 931, 999, 993, 931, 1002, 921, 931, 921, 921, 921, 921, 935, 935, 935, 1004, 933, 994, 1005, 933, 934, 1006, 921, 934, 962, 962, 962, 1007, 994, 1010, 1011, 1014, 933, 963, 963, 963, 934, 965, 965, 965, 1012, 966, 966, 966, 1012, 967, 967, 967, 1013, 935, 1015, 1016, 935, 1019, 1019, 935, 1018, 1018, 1018, 1013, 1020, 1020, 1021, 1023, 962, 1022, 1024, 962, 935, 1025, 1026, 1027, 962, 963, 1022, 1028, 963, 965, 1030, 963, 965, 966, 967, 1032, 966, 967, 1033, 1027, 967, 1034, 1038, 1038, 1038, 965, 1039, 1039, 1042, 966, 989, 989, 989, 967, 979, 979, 979, 1043, 1046, 1044, 1048, 1050, 1045, 1051, 1008, 1008, 1008, 979, 979, 979, 1044, 1045, 1052, 1053, 1057, 1057, 1057, 1029, 1029, 1029, 1061, 1037, 1037, 1037, 979, 979, 979, 979, 1058, 1058, 989, 979, 1062, 989, 979, 1063, 989, 979, 1066, 1064, 979, 990, 990, 990, 1008, 1067, 1063, 1008, 1064, 1074, 1008, 990, 1087, 990, 990, 990, 990, 1029, 1068, 1068, 1029, 1037, 1089, 1072, 1037, 1072, 1090, 990, 1091, 1056, 1056, 1056, 1092, 1029, 1081, 1081, 1065, 1065, 1065, 1085, 1085, 990, 1086, 1086, 990, 1009, 1009, 1009, 1080, 1080, 1080, 1084, 1084, 1084, 1088, 1009, 1094, 1009, 1009, 1009, 1009, 1093, 1096, 1088, 1097, 1069, 1069, 1069, 1100, 1056, 1101, 1009, 1056, 1095, 1095, 1095, 1103, 1093, 1098, 1070, 1070, 1070, 1108, 1108, 1108, 1009, 1115, 1098, 1009, 1035, 1035, 1035, 1065, 1109, 1109, 1117, 1071, 1071, 1071, 1035, 1116, 1035, 1035, 1035, 1035, 1069, 1113, 1113, 1069, 1116, 1079, 1079, 1079, 1095, 1118, 1035, 1036, 1036, 1036, 1070, 1119, 1069, 1070, 1107, 1107, 1107, 1036, 1120, 1036, 1036, 1036, 1036, 1122, 1071, 1124, 1070, 1071, 1114, 1114, 1071, 1125, 1130, 1036, 1040, 1040, 1040, 1112, 1112, 1112, 1121, 1079, 1132, 1071, 1079, 1133, 1126, 1040, 1040, 1040, 1123, 1123, 1123, 1141, 1107, 1126, 1121, 1107, 1128, 1128, 1128, 1143, 1135, 1144, 1040, 1040, 1040, 1040, 1134, 1139, 1139, 1040, 1134, 1135, 1040, 1140, 1140, 1040, 1145, 1146, 1040, 1054, 1054, 1054, 1136, 1136, 1136, 1138, 1138, 1138, 1123, 1054, 1142, 1054, 1054, 1054, 1054, 1147, 1148, 1150, 1150, 1142, 1149, 1149, 1149, 1154, 1162, 1054, 1055, 1055, 1055, 1159, 1159, 1147, 1128, 1151, 1151, 1151, 1055, 1169, 1055, 1055, 1055, 1055, 1152, 1152, 1152, 1158, 1158, 1158, 1157, 1157, 1157, 1171, 1055, 1059, 1059, 1059, 1167, 1167, 1136, 1166, 1166, 1166, 1168, 1168, 1172, 1170, 1059, 1059, 1059, 1153, 1153, 1153, 1173, 1151, 1170, 1174, 1175, 1176, 1177, 1177, 1177, 1182, 1152, 1059, 1059, 1059, 1059, 1191, 1157, 1192, 1059, 1157, 1175, 1059, 1178, 1178, 1059, 1187, 1187, 1059, 1077, 1077, 1077, 1196, 1157, 1211, 1153, 1213, 1193, 1153, 1077, 1194, 1077, 1077, 1077, 1077, 1179, 1179, 1179, 1193, 1194, 1180, 1180, 1180, 1197, 1197, 1077, 1082, 1082, 1082, 1214, 1181, 1181, 1181, 1186, 1186, 1186, 1185, 1185, 1185, 1082, 1082, 1082, 1195, 1195, 1195, 1198, 1198, 1198, 1199, 1199, 1199, 1204, 1204, 1204, 1215, 1179, 1082, 1082, 1082, 1082, 1180, 1205, 1205, 1082, 1209, 1209, 1082, 1181, 1216, 1082, 1181, 1218, 1082, 1099, 1099, 1099, 1185, 1210, 1210, 1185, 1208, 1208, 1208, 1099, 1217, 1099, 1099, 1099, 1099, 1200, 1200, 1200, 1185, 1203, 1203, 1203, 1212, 1235, 1195, 1099, 1217, 1219, 1219, 1219, 1237, 1212, 1221, 1221, 1229, 1229, 1099, 1105, 1105, 1105, 1222, 1222, 1222, 1223, 1223, 1223, 1238, 1105, 1239, 1105, 1105, 1105, 1105, 1233, 1233, 1200, 1200, 1234, 1234, 1203, 1240, 1242, 1203, 1105, 1110, 1110, 1110, 1219, 1224, 1224, 1224, 1228, 1228, 1228, 1241, 1203, 1236, 1110, 1110, 1110, 1232, 1232, 1232, 1219, 1244, 1236, 1245, 1227, 1227, 1227, 1241, 1243, 1243, 1243, 1110, 1110, 1110, 1110, 1248, 1252, 1252, 1110, 1253, 1253, 1110, 1246, 1254, 1110, 1224, 1224, 1110, 1127, 1127, 1127, 1246, 1256, 1257, 1249, 1249, 1249, 1255, 1127, 1258, 1127, 1127, 1127, 1127, 1227, 1259, 1255, 1227, 1243, 1251, 1251, 1251, 1261, 1260, 1127, 1262, 1262, 1262, 1263, 1263, 1227, 1264, 1264, 1264, 1243, 1127, 1155, 1155, 1155, 1260, 1265, 1265, 1265, 1274, 1249, 1276, 1155, 1275, 1155, 1155, 1155, 1155, 1249, 1269, 1269, 1269, 1275, 1266, 1266, 1266, 1272, 1272, 1155, 1156, 1156, 1156, 1271, 1271, 1271, 1273, 1273, 1264, 1277, 1156, 1278, 1156, 1156, 1156, 1156, 1279, 1265, 1262, 1280, 1281, 1282, 1282, 1282, 1264, 1287, 1156, 1160, 1160, 1160, 1269, 1266, 1315, 1265, 1266, 1280, 1283, 1283, 1269, 1317, 1160, 1160, 1160, 1284, 1284, 1284, 1291, 1291, 1291, 1318, 1266, 1285, 1285, 1285, 1290, 1290, 1290, 1160, 1160, 1160, 1160, 1292, 1292, 1319, 1160, 1296, 1296, 1160, 1301, 1301, 1160, 1309, 1309, 1160, 1183, 1183, 1183, 1282, 1313, 1313, 1286, 1286, 1286, 1284, 1183, 1320, 1183, 1183, 1183, 1183, 1322, 1285, 1314, 1314, 1290, 1332, 1321, 1290, 1334, 1284, 1183, 1184, 1184, 1184, 1295, 1295, 1295, 1285, 1335, 1316, 1290, 1184, 1321, 1184, 1184, 1184, 1184, 1286, 1316, 1336, 1286, 1337, 1297, 1297, 1297, 1330, 1330, 1184, 1188, 1188, 1188, 1331, 1331, 1300, 1300, 1300, 1286, 1298, 1298, 1298, 1333, 1188, 1188, 1188, 1295, 1308, 1308, 1308, 1339, 1333, 1295, 1299, 1299, 1299, 1302, 1302, 1302, 1386, 1188, 1188, 1188, 1188, 1303, 1303, 1303, 1188, 1387, 1338, 1188, 1341, 1341, 1188, 1396, 1300, 1188, 1201, 1201, 1201, 1297, 1300, 1304, 1304, 1304, 1338, 1397, 1201, 1398, 1201, 1201, 1201, 1201, 1299, 1299, 1298, 1312, 1312, 1312, 1329, 1329, 1329, 1399, 1201, 1206, 1206, 1206, 1349, 1349, 1299, 1400, 1401, 1302, 1402, 1404, 1405, 1406, 1206, 1206, 1206, 1303, 1407, 1304, 1304, 1408, 1409, 1410, 1411, 1412, 1414, 1415, 811, 810, 809, 1206, 1206, 1206, 1206, 1304, 808, 805, 1206, 804, 803, 1206, 802, 800, 1206, 799, 798, 1206, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 1220, 797, 1220, 1220, 1220, 1225, 1225, 1225, 796, 795, 1307, 1307, 1307, 794, 793, 1225, 792, 1225, 1225, 1225, 1225, 1323, 1323, 1323, 1360, 1360, 1360, 791, 1325, 1325, 1325, 1225, 1230, 1230, 1230, 790, 789, 775, 773, 1340, 1340, 1340, 1327, 1327, 1327, 1230, 1230, 1230, 769, 768, 1307, 767, 766, 1307, 765, 764, 1342, 1342, 1342, 763, 762, 1323, 1230, 1230, 1230, 1230, 1307, 1360, 1325, 1230, 761, 760, 1230, 759, 756, 1230, 1325, 1323, 1230, 1247, 1247, 1247, 1327, 749, 1325, 1343, 1343, 1343, 747, 1247, 1327, 1247, 1247, 1247, 1247, 1340, 1342, 746, 1327, 1344, 1344, 1344, 745, 744, 742, 1247, 738, 1346, 1346, 1346, 737, 736, 1342, 1350, 1350, 1350, 1247, 1288, 1288, 1288, 1348, 1348, 1348, 735, 734, 1343, 733, 1288, 731, 1288, 1288, 1288, 1288, 1351, 1351, 1351, 1344, 730, 729, 1344, 728, 1343, 727, 1288, 1289, 1289, 1289, 1346, 726, 725, 1352, 1352, 1352, 1346, 1289, 1344, 1289, 1289, 1289, 1289, 1348, 724, 722, 1346, 721, 720, 1348, 719, 718, 1350, 1289, 1293, 1293, 1293, 717, 716, 1348, 714, 713, 712, 711, 1355, 1355, 1355, 1293, 1293, 1293, 710, 709, 1351, 1352, 1352, 707, 702, 1357, 1357, 1357, 697, 695, 694, 693, 1293, 1293, 1293, 1293, 692, 1352, 690, 1293, 686, 685, 1293, 684, 683, 1293, 682, 681, 1293, 1305, 1305, 1305, 1355, 680, 1358, 1358, 1358, 679, 678, 1305, 1355, 1305, 1305, 1305, 1305, 1357, 677, 675, 1355, 673, 672, 671, 670, 669, 668, 1305, 1310, 1310, 1310, 667, 666, 1357, 665, 664, 663, 662, 661, 658, 650, 1310, 1310, 1310, 648, 647, 1358, 646, 645, 644, 643, 642, 1358, 641, 640, 639, 638, 637, 1310, 1310, 1310, 1310, 1358, 636, 635, 1310, 634, 633, 1310, 632, 631, 1310, 630, 629, 1310, 1324, 1324, 1324, 627, 626, 625, 624, 623, 622, 621, 1324, 620, 1324, 1324, 1324, 1324, 619, 618, 617, 615, 613, 612, 611, 610, 608, 604, 1324, 603, 596, 595, 594, 593, 592, 591, 590, 589, 588, 587, 586, 583, 1324, 1326, 1326, 1326, 582, 581, 580, 579, 578, 577, 576, 1326, 575, 1326, 1326, 1326, 1326, 574, 572, 571, 570, 569, 568, 567, 566, 565, 564, 1326, 562, 561, 560, 558, 557, 556, 555, 554, 553, 552, 551, 550, 547, 1326, 1345, 1345, 1345, 546, 545, 544, 543, 542, 541, 540, 1345, 539, 1345, 1345, 1345, 1345, 538, 536, 535, 534, 533, 532, 531, 530, 529, 527, 1345, 526, 517, 516, 515, 513, 512, 511, 510, 509, 508, 507, 506, 505, 1345, 1347, 1347, 1347, 504, 503, 501, 499, 498, 496, 495, 1347, 494, 1347, 1347, 1347, 1347, 493, 492, 491, 490, 489, 486, 485, 484, 483, 482, 1347, 481, 480, 479, 478, 477, 476, 475, 473, 472, 470, 469, 468, 467, 1347, 1353, 1353, 1353, 465, 464, 463, 462, 461, 460, 459, 1353, 458, 1353, 1353, 1353, 1353, 457, 455, 454, 453, 452, 451, 450, 449, 448, 447, 1353, 445, 444, 443, 442, 441, 440, 439, 437, 436, 435, 434, 433, 432, 1353, 431, 430, 429, 428, 427, 426, 425, 423, 422, 421, 420, 419, 418, 417, 416, 1353, 1354, 1354, 1354, 415, 414, 413, 412, 411, 410, 409, 1354, 408, 1354, 1354, 1354, 1354, 407, 406, 404, 403, 402, 401, 399, 398, 397, 396, 1354, 395, 394, 393, 392, 391, 389, 388, 387, 385, 384, 382, 381, 379, 1354, 378, 377, 376, 375, 374, 373, 372, 371, 369, 367, 366, 365, 364, 363, 362, 1354, 1356, 1356, 1356, 361, 360, 359, 358, 357, 356, 355, 1356, 354, 1356, 1356, 1356, 1356, 352, 351, 350, 349, 348, 346, 343, 340, 339, 338, 1356, 337, 336, 335, 334, 333, 332, 331, 330, 328, 327, 326, 325, 323, 1356, 322, 321, 319, 318, 317, 316, 314, 313, 312, 311, 310, 309, 305, 304, 303, 1356, 1359, 1359, 1359, 302, 301, 300, 299, 297, 296, 295, 1359, 294, 1359, 1359, 1359, 1359, 292, 290, 289, 288, 287, 286, 284, 281, 280, 279, 1359, 278, 277, 276, 275, 274, 273, 272, 271, 270, 265, 263, 262, 260, 1359, 259, 258, 257, 255, 254, 252, 251, 250, 249, 247, 243, 239, 237, 235, 233, 1359, 1362, 1362, 1362, 1362, 1362, 1362, 1362, 1362, 1362, 1362, 1362, 1362, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1364, 1365, 1365, 1365, 1365, 1365, 1365, 1365, 1365, 1365, 1365, 1365, 1365, 1366, 1366, 1366, 1366, 1366, 1366, 1366, 1366, 1366, 1366, 1366, 1366, 1367, 1367, 1367, 1367, 1367, 1367, 1367, 1367, 1367, 1367, 1367, 1367, 1368, 1368, 1368, 1368, 1368, 1368, 1368, 1368, 1368, 1368, 1368, 1368, 1369, 1369, 1369, 1369, 1369, 1369, 1369, 1369, 1369, 1369, 1369, 1369, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1371, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1374, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1376, 1376, 1376, 1376, 1376, 1376, 1376, 1376, 1376, 1376, 1376, 1376, 1377, 1377, 1377, 1377, 1377, 1377, 1377, 1377, 1377, 1377, 1377, 1377, 1378, 1378, 1378, 1378, 1378, 1378, 1378, 1378, 1378, 1378, 1378, 1378, 1379, 232, 231, 1379, 230, 1379, 1379, 1379, 1379, 1379, 1380, 229, 227, 1380, 1380, 1380, 1380, 1380, 1380, 1380, 1381, 1381, 226, 1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381, 1381, 1382, 224, 222, 221, 1382, 1383, 220, 219, 1383, 1383, 1383, 1383, 1383, 1383, 1383, 218, 1383, 1384, 216, 1384, 1384, 1384, 1385, 1385, 1388, 215, 214, 1388, 1388, 1388, 1388, 1388, 1388, 1388, 1389, 213, 204, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 1390, 203, 1390, 1390, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 1391, 196, 1391, 1391, 1391, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1392, 1393, 192, 188, 184, 1393, 1394, 1394, 1395, 1395, 1395, 1395, 1395, 1395, 1395, 1395, 1395, 1395, 1395, 1395, 1403, 1403, 1403, 1403, 1403, 1403, 1403, 1403, 1403, 170, 1403, 1403, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 1413, 169, 1413, 167, 161, 160, 159, 157, 156, 155, 154, 153, 151, 149, 147, 145, 144, 143, 142, 141, 135, 124, 120, 117, 114, 109, 108, 103, 93, 89, 82, 80, 78, 77, 76, 74, 73, 72, 70, 68, 62, 58, 55, 52, 45, 42, 41, 34, 33, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361 } ; 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 char *yytext; #line 1 "detex.l" #line 89 "detex.l" #undef IGNORE #define LaBEGIN if (fLatex) BEGIN #define IGNORE if (fSpace && !fWord) putchar(' ') #define NOUN if (fSpace && !fWord && !fReplace) putchar(' '); else {if (fReplace) printf("noun");} #define VERBNOUN if (fReplace) printf(" verbs noun"); /* puts a verb and a noun to make grammar checking work */ #define SPACE if (!fWord) putchar(' ') #define NEWLINE if (!fWord) putchar('\n') #define LATEX fLatex=!fForcetex #define KILLARGS(x) cArgs=x; LaBEGIN LaMacro #define STRIPARGS(x) cArgs=x; LaBEGIN LaMacro2 #define CITE(x) if (fLatex && !fCite) KILLARGS(x) #define NO_MALLOC_DECL void AddInclude(char *sbFile); void ErrorExit(const char *sb1); void UsageExit(void); void IncludeFile(char *sbFile); void InputFile(char *sbFile); void SetEnvIgnore(const char *sbEnvList); #ifndef KPATHSEA void SetInputPaths(void); #endif void Warning(const char *sb1, const char *sb2); int BeginEnv(const char *sbEnv); int EndEnv(const char *sbEnv); int InList(char *sbFile); int SeparateList(char *sbList, char *rgsbList[] ,char chSep, int csbMax); FILE *TexOpen(char *sbFile); char *SafeMalloc(int cch, const char *sbMessage); #ifndef KPATHSEA char *getenv(); #ifndef NO_MALLOC_DECL char *malloc(); #endif #ifdef OS2 void yyless(int); void OS2UsageExit(void); #endif #endif /* KPATHSEA */ char *rgsbEnvIgnore[MAXENVS]; /* list of environments ignored */ char *rgsbIncList[MAXINCLIST]; /* list of includeonly files */ char *rgsbInputPaths[MAXINPUTPATHS]; /* list of input paths in order */ char sbCurrentIgnoredEnv[CCHMAXENV]; /* current environment being ignored */ char *sbProgName; /* name we were invoked with */ #ifndef NOFILE /* might be defined in */ #define NOFILE 256 #endif FILE *rgfp[NOFILE+1]; /* stack of input/include files */ int cfp = 0; /* count of files in stack */ int cOpenBrace = 0; /* count of `{' in and */ int cArgs = 0; /* argument connt in */ int csbEnvIgnore; /* count of environments ignored */ int csbIncList = 0; /* count of includeonly files */ int csbInputPaths; /* count of input paths */ int fLatex = 0; /* flag to indicated delatex */ int fWord = 0; /* flag for -w option */ int fFollow = 1; /* flag to follow input/include */ int fCite = 0; /* flag to echo \cite and \ref args */ int fSpace = 0; /* flag to replace \cs with space */ int fForcetex = 0; /* flag to inhibit latex mode */ int fShowPictures = 0; /* flag to show picture names */ int fReplace = 0; /* flag to replace envirnments with "noun" */ int currBracesLevel = 0; int footnoteLevel = -100; #ifdef FLEX_SCANNER /* flex has contexts for buffers that need to be switched when file changes * otherwise output contains imported files in reverse order. Weird, but * true. */ YY_BUFFER_STATE rgsb[NOFILE + 1]; /* flex context stack */ int csb = 0; /* depth of flex context stack */ #endif /* FLEX_SCANNER */ #line 1825 "lex.yy.c" #define INITIAL 0 #define Define 1 #define Display 2 #define IncludeOnly 3 #define Input 4 #define Math 5 #define Normal 6 #define Control 7 #define LaBegin 8 #define LaDisplay 9 #define LaEnd 10 #define LaEnv 11 #define LaFormula 12 #define LaInclude 13 #define LaSubfile 14 #define LaMacro 15 #define LaOptArg 16 #define LaMacro2 17 #define LaOptArg2 18 #define LaVerbatim 19 #define LaBreak 20 #define LaPicture 21 #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 static void yyunput (int c,char *buf_ptr ); #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 = '*'; \ size_t 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, 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 187 "detex.l" #line 2066 "lex.yy.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 >= 1362 ) 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_current_state != 1361 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 188 "detex.l" /* ignore comments */ ; YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP #line 190 "detex.l" {LATEX; IGNORE;} YY_BREAK case 3: YY_RULE_SETUP #line 192 "detex.l" /* environment start */ {LaBEGIN LaBegin; IGNORE;} YY_BREAK case 4: /* rule 4 can match eol */ YY_RULE_SETUP #line 194 "detex.l" { if (BeginEnv("verbatim")) BEGIN LaEnv; else BEGIN LaVerbatim; IGNORE; } YY_BREAK case 5: /* rule 5 can match eol */ YY_RULE_SETUP #line 201 "detex.l" /* verbatim mode */ {BEGIN Normal; IGNORE;} YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP #line 202 "detex.l" ECHO; YY_BREAK case 7: YY_RULE_SETUP #line 203 "detex.l" ECHO; YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP #line 205 "detex.l" { KILLARGS(1); if (BeginEnv("minipage")) BEGIN LaEnv; else BEGIN LaMacro; /* Normal; */ IGNORE; } YY_BREAK case 9: /* rule 9 can match eol */ YY_RULE_SETUP #line 213 "detex.l" { if (BeginEnv("table")) BEGIN LaEnv; else BEGIN Normal; IGNORE; } YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP #line 221 "detex.l" { if (BeginEnv("figure")) BEGIN LaEnv; else BEGIN Normal; IGNORE; } YY_BREAK case 11: YY_RULE_SETUP #line 229 "detex.l" { if (BeginEnv(yytext)) BEGIN LaEnv; else BEGIN Normal; IGNORE; } YY_BREAK /*"\n" NEWLINE;*/ case 12: YY_RULE_SETUP #line 236 "detex.l" ; YY_BREAK case 13: YY_RULE_SETUP #line 238 "detex.l" /* absorb some environments */ {LaBEGIN LaEnd; IGNORE;} YY_BREAK case 14: /* rule 14 can match eol */ YY_RULE_SETUP #line 239 "detex.l" ;/*NEWLINE;*/ YY_BREAK case 15: YY_RULE_SETUP #line 240 "detex.l" ; YY_BREAK case 16: YY_RULE_SETUP #line 242 "detex.l" /* end environment */ { if (EndEnv(yytext)) BEGIN Normal; IGNORE; } YY_BREAK case 17: YY_RULE_SETUP #line 246 "detex.l" {BEGIN LaEnv; IGNORE;} YY_BREAK /*"\n" NEWLINE;*/ case 18: YY_RULE_SETUP #line 248 "detex.l" ; YY_BREAK case 19: /* rule 19 can match eol */ YY_RULE_SETUP #line 250 "detex.l" ; YY_BREAK case 20: /* rule 20 can match eol */ YY_RULE_SETUP #line 251 "detex.l" ; YY_BREAK case 21: /* rule 21 can match eol */ YY_RULE_SETUP #line 252 "detex.l" ; YY_BREAK case 22: /* rule 22 can match eol */ YY_RULE_SETUP #line 253 "detex.l" ; YY_BREAK case 23: /* rule 23 can match eol */ YY_RULE_SETUP #line 254 "detex.l" ; YY_BREAK case 24: /* rule 24 can match eol */ YY_RULE_SETUP #line 255 "detex.l" ; YY_BREAK case 25: YY_RULE_SETUP #line 256 "detex.l" ; /* hack to fix \begin{minipage}{300pt} */ YY_BREAK case 26: YY_RULE_SETUP #line 258 "detex.l" { KILLARGS(1); } YY_BREAK case 27: YY_RULE_SETUP #line 259 "detex.l" { KILLARGS(2); } YY_BREAK case 28: YY_RULE_SETUP #line 260 "detex.l" { KILLARGS(2); } YY_BREAK case 29: YY_RULE_SETUP #line 261 "detex.l" { KILLARGS(2); } YY_BREAK case 30: YY_RULE_SETUP #line 262 "detex.l" { KILLARGS(2); } YY_BREAK case 31: YY_RULE_SETUP #line 263 "detex.l" { KILLARGS(2); } YY_BREAK case 32: YY_RULE_SETUP #line 264 "detex.l" { KILLARGS(1); } YY_BREAK case 33: YY_RULE_SETUP #line 265 "detex.l" { KILLARGS(1); } YY_BREAK case 34: YY_RULE_SETUP #line 266 "detex.l" { KILLARGS(2); } YY_BREAK case 35: YY_RULE_SETUP #line 267 "detex.l" { KILLARGS(1); } YY_BREAK case 36: YY_RULE_SETUP #line 268 "detex.l" { STRIPARGS(2); } YY_BREAK case 37: YY_RULE_SETUP #line 269 "detex.l" { KILLARGS(1); } YY_BREAK case 38: YY_RULE_SETUP #line 270 "detex.l" { STRIPARGS(2); } YY_BREAK case 39: YY_RULE_SETUP #line 271 "detex.l" { KILLARGS(2); } YY_BREAK case 40: YY_RULE_SETUP #line 272 "detex.l" ; YY_BREAK case 41: YY_RULE_SETUP #line 273 "detex.l" { KILLARGS(1); } YY_BREAK case 42: /* rule 42 can match eol */ YY_RULE_SETUP #line 274 "detex.l" { LaBEGIN LaPicture; } YY_BREAK case 43: YY_RULE_SETUP #line 276 "detex.l" ; YY_BREAK case 44: /* rule 44 can match eol */ YY_RULE_SETUP #line 277 "detex.l" { if(fShowPictures) { printf("", yytext); } } YY_BREAK case 45: /* rule 45 can match eol */ YY_RULE_SETUP #line 278 "detex.l" BEGIN Normal; YY_BREAK case 46: YY_RULE_SETUP #line 279 "detex.l" BEGIN Normal; YY_BREAK case 47: YY_RULE_SETUP #line 281 "detex.l" { KILLARGS(3); } YY_BREAK case 48: YY_RULE_SETUP #line 282 "detex.l" { KILLARGS(1); } YY_BREAK case 49: YY_RULE_SETUP #line 283 "detex.l" { KILLARGS(2); } YY_BREAK case 50: YY_RULE_SETUP #line 284 "detex.l" { KILLARGS(2); } YY_BREAK case 51: YY_RULE_SETUP #line 285 "detex.l" { KILLARGS(3); } YY_BREAK case 52: YY_RULE_SETUP #line 286 "detex.l" { KILLARGS(1); } YY_BREAK case 53: YY_RULE_SETUP #line 287 "detex.l" { STRIPARGS(1); } YY_BREAK case 54: YY_RULE_SETUP #line 288 "detex.l" { KILLARGS(1); } YY_BREAK case 55: YY_RULE_SETUP #line 289 "detex.l" { KILLARGS(1); } YY_BREAK case 56: YY_RULE_SETUP #line 290 "detex.l" { KILLARGS(3); } YY_BREAK case 57: YY_RULE_SETUP #line 292 "detex.l" ;/*NEWLINE;*/ YY_BREAK case 58: YY_RULE_SETUP #line 293 "detex.l" ;/*NEWLINE;*/ YY_BREAK case 59: YY_RULE_SETUP #line 294 "detex.l" ;/*NEWLINE;*/ YY_BREAK case 60: YY_RULE_SETUP #line 295 "detex.l" ;/*NEWLINE;*/ YY_BREAK case 61: YY_RULE_SETUP #line 296 "detex.l" ;/*NEWLINE;*/ YY_BREAK case 62: YY_RULE_SETUP #line 297 "detex.l" ;/*NEWLINE;*/ YY_BREAK case 63: YY_RULE_SETUP #line 298 "detex.l" ;/*NEWLINE;*/ YY_BREAK case 64: YY_RULE_SETUP #line 300 "detex.l" /* ignore args */ {KILLARGS(1); IGNORE;} YY_BREAK case 65: YY_RULE_SETUP #line 301 "detex.l" /* of these \cs */ {KILLARGS(1); IGNORE;} YY_BREAK case 66: YY_RULE_SETUP #line 302 "detex.l" {KILLARGS(1); IGNORE;} YY_BREAK case 67: YY_RULE_SETUP #line 303 "detex.l" {KILLARGS(1);} /* kill space before */ YY_BREAK case 68: YY_RULE_SETUP #line 304 "detex.l" {LATEX; KILLARGS(1); IGNORE;} YY_BREAK case 69: YY_RULE_SETUP #line 305 "detex.l" {LATEX; KILLARGS(1); IGNORE;} YY_BREAK case 70: YY_RULE_SETUP #line 306 "detex.l" {KILLARGS(1); IGNORE;} YY_BREAK case 71: YY_RULE_SETUP #line 307 "detex.l" {KILLARGS(1); IGNORE;} YY_BREAK case 72: YY_RULE_SETUP #line 308 "detex.l" {KILLARGS(1);} YY_BREAK case 73: YY_RULE_SETUP #line 309 "detex.l" {KILLARGS(1);} YY_BREAK /*"\\footnote" {KILLARGS(1); SPACE;}*/ case 74: YY_RULE_SETUP #line 311 "detex.l" {KILLARGS(1); IGNORE;} YY_BREAK case 75: YY_RULE_SETUP #line 312 "detex.l" {CITE(1); IGNORE;} YY_BREAK case 76: YY_RULE_SETUP #line 313 "detex.l" {CITE(1); IGNORE;} YY_BREAK case 77: YY_RULE_SETUP #line 314 "detex.l" {KILLARGS(1); IGNORE;} YY_BREAK case 78: YY_RULE_SETUP #line 315 "detex.l" {CITE(1); IGNORE;} YY_BREAK case 79: YY_RULE_SETUP #line 316 "detex.l" {KILLARGS(2); IGNORE;} YY_BREAK case 80: YY_RULE_SETUP #line 317 "detex.l" {KILLARGS(2); IGNORE;} YY_BREAK case 81: YY_RULE_SETUP #line 318 "detex.l" { KILLARGS(1); } YY_BREAK case 82: YY_RULE_SETUP #line 319 "detex.l" { KILLARGS(2); } YY_BREAK case 83: YY_RULE_SETUP #line 321 "detex.l" {KILLARGS(1);} YY_BREAK case 84: /* rule 84 can match eol */ YY_RULE_SETUP #line 323 "detex.l" { putchar('('); footnoteLevel = currBracesLevel; ++currBracesLevel; } YY_BREAK case 85: YY_RULE_SETUP #line 328 "detex.l" /* ignore \verb... */ { if (fLatex) { char verbchar, c; verbchar = input(); while ((c = input()) != verbchar) /*if (c == '\n') NEWLINE;*/ putchar(c); } IGNORE; } YY_BREAK case 86: YY_RULE_SETUP #line 339 "detex.l" { LATEX; KILLARGS(2); } YY_BREAK case 87: YY_RULE_SETUP #line 340 "detex.l" { LATEX; KILLARGS(2); } YY_BREAK case 88: YY_RULE_SETUP #line 341 "detex.l" { LATEX; KILLARGS(3); } YY_BREAK case 89: YY_RULE_SETUP #line 343 "detex.l" /* ignore def begin */ {BEGIN Define; IGNORE;} YY_BREAK case 90: YY_RULE_SETUP #line 344 "detex.l" BEGIN Normal; YY_BREAK case 91: /* rule 91 can match eol */ YY_RULE_SETUP #line 345 "detex.l" NEWLINE; YY_BREAK case 92: YY_RULE_SETUP #line 346 "detex.l" ; YY_BREAK case 93: YY_RULE_SETUP #line 348 "detex.l" /* formula mode */ {LaBEGIN LaFormula; NOUN;} YY_BREAK case 94: YY_RULE_SETUP #line 349 "detex.l" BEGIN Normal; YY_BREAK case 95: /* rule 95 can match eol */ YY_RULE_SETUP #line 350 "detex.l" NEWLINE; YY_BREAK case 96: YY_RULE_SETUP #line 351 "detex.l" VERBNOUN; YY_BREAK case 97: YY_RULE_SETUP #line 352 "detex.l" ; YY_BREAK case 98: YY_RULE_SETUP #line 354 "detex.l" /* display mode */ {LaBEGIN LaDisplay; NOUN;} YY_BREAK case 99: YY_RULE_SETUP #line 355 "detex.l" BEGIN Normal; YY_BREAK case 100: /* rule 100 can match eol */ YY_RULE_SETUP #line 356 "detex.l" NEWLINE; YY_BREAK case 101: YY_RULE_SETUP #line 357 "detex.l" VERBNOUN; YY_BREAK case 102: YY_RULE_SETUP #line 358 "detex.l" ; YY_BREAK case 103: YY_RULE_SETUP #line 360 "detex.l" /* display mode */ {BEGIN Display; NOUN;} YY_BREAK case 104: YY_RULE_SETUP #line 361 "detex.l" BEGIN Normal; YY_BREAK case 105: /* rule 105 can match eol */ YY_RULE_SETUP #line 362 "detex.l" NEWLINE; YY_BREAK case 106: YY_RULE_SETUP #line 363 "detex.l" VERBNOUN; YY_BREAK case 107: YY_RULE_SETUP #line 364 "detex.l" ; YY_BREAK case 108: YY_RULE_SETUP #line 366 "detex.l" /* math mode */ {BEGIN Math; NOUN;} YY_BREAK case 109: YY_RULE_SETUP #line 367 "detex.l" BEGIN Normal; YY_BREAK case 110: /* rule 110 can match eol */ YY_RULE_SETUP #line 368 "detex.l" NEWLINE; YY_BREAK case 111: YY_RULE_SETUP #line 369 "detex.l" ; YY_BREAK case 112: YY_RULE_SETUP #line 370 "detex.l" VERBNOUN; YY_BREAK case 113: YY_RULE_SETUP #line 371 "detex.l" ; YY_BREAK case 114: YY_RULE_SETUP #line 373 "detex.l" /* process files */ {LaBEGIN LaInclude; IGNORE;} YY_BREAK case 115: YY_RULE_SETUP #line 374 "detex.l" { IncludeFile(yytext); BEGIN Normal; } YY_BREAK case 116: /* rule 116 can match eol */ YY_RULE_SETUP #line 377 "detex.l" NEWLINE; YY_BREAK case 117: YY_RULE_SETUP #line 378 "detex.l" ; YY_BREAK case 118: YY_RULE_SETUP #line 380 "detex.l" {BEGIN IncludeOnly; IGNORE;} YY_BREAK case 119: YY_RULE_SETUP #line 381 "detex.l" AddInclude(yytext); YY_BREAK case 120: YY_RULE_SETUP #line 382 "detex.l" { if (csbIncList == 0) rgsbIncList[csbIncList++] = '\0'; BEGIN Normal; } YY_BREAK case 121: /* rule 121 can match eol */ YY_RULE_SETUP #line 386 "detex.l" NEWLINE; YY_BREAK case 122: YY_RULE_SETUP #line 387 "detex.l" ; YY_BREAK case 123: YY_RULE_SETUP #line 389 "detex.l" /* process files */ {LaBEGIN LaSubfile; IGNORE;} YY_BREAK case 124: YY_RULE_SETUP #line 390 "detex.l" { IncludeFile(yytext); BEGIN Normal; } YY_BREAK case 125: /* rule 125 can match eol */ YY_RULE_SETUP #line 393 "detex.l" NEWLINE; YY_BREAK case 126: YY_RULE_SETUP #line 394 "detex.l" ; YY_BREAK case 127: YY_RULE_SETUP #line 396 "detex.l" {BEGIN Input; IGNORE;} YY_BREAK case 128: YY_RULE_SETUP #line 397 "detex.l" { InputFile(yytext); BEGIN Normal; } YY_BREAK case 129: /* rule 129 can match eol */ YY_RULE_SETUP #line 400 "detex.l" NEWLINE; YY_BREAK case 130: YY_RULE_SETUP #line 401 "detex.l" ; YY_BREAK /* escaping commands */ case 131: YY_RULE_SETUP #line 404 "detex.l" putchar('/'); YY_BREAK case 132: /* rule 132 can match eol */ YY_RULE_SETUP #line 406 "detex.l" /* handle ligatures */ {(void)printf("%.2s", yytext+1);} YY_BREAK case 133: /* rule 133 can match eol */ YY_RULE_SETUP #line 407 "detex.l" {(void)printf("%.1s", yytext+1);} YY_BREAK case 134: YY_RULE_SETUP #line 408 "detex.l" {NEWLINE;} /*BEGIN LaBreak;*/ YY_BREAK case 135: YY_RULE_SETUP #line 410 "detex.l" /* ignore other \cs */ {BEGIN Control; IGNORE;} YY_BREAK case 136: YY_RULE_SETUP #line 411 "detex.l" SPACE; YY_BREAK case 137: /* rule 137 can match eol */ YY_RULE_SETUP #line 412 "detex.l" NEWLINE; YY_BREAK case 138: YY_RULE_SETUP #line 413 "detex.l" IGNORE; YY_BREAK case 139: YY_RULE_SETUP #line 414 "detex.l" { if (yytext==NULL || strlen(yytext)==0 || atoi(yytext)>=0) NEWLINE; BEGIN Normal; } YY_BREAK case 140: YY_RULE_SETUP #line 420 "detex.l" IGNORE; YY_BREAK case 141: YY_RULE_SETUP #line 421 "detex.l" IGNORE; YY_BREAK case 142: /* rule 142 can match eol */ YY_RULE_SETUP #line 422 "detex.l" {BEGIN Normal; /*NEWLINE;*/} YY_BREAK case 143: YY_RULE_SETUP #line 423 "detex.l" {++currBracesLevel;BEGIN Normal; IGNORE;} YY_BREAK case 144: YY_RULE_SETUP #line 424 "detex.l" {BEGIN Normal; IGNORE;} YY_BREAK case 145: YY_RULE_SETUP #line 425 "detex.l" {yyless(0);BEGIN Normal;} YY_BREAK case 146: YY_RULE_SETUP #line 427 "detex.l" /* special characters */ IGNORE; YY_BREAK case 147: YY_RULE_SETUP #line 428 "detex.l" IGNORE; YY_BREAK case 148: YY_RULE_SETUP #line 429 "detex.l" SPACE; YY_BREAK case 149: YY_RULE_SETUP #line 430 "detex.l" putchar('-'); YY_BREAK case 150: YY_RULE_SETUP #line 431 "detex.l" putchar('"'); YY_BREAK case 151: YY_RULE_SETUP #line 432 "detex.l" putchar('\''); YY_BREAK case 152: YY_RULE_SETUP #line 433 "detex.l" putchar('"'); YY_BREAK case 153: YY_RULE_SETUP #line 434 "detex.l" putchar('"'); YY_BREAK /* braces */ case 154: YY_RULE_SETUP #line 437 "detex.l" { ++currBracesLevel; } YY_BREAK case 155: YY_RULE_SETUP #line 439 "detex.l" { --currBracesLevel; if (currBracesLevel == footnoteLevel) { putchar(')'); footnoteLevel = -100; } SPACE;} YY_BREAK case 156: YY_RULE_SETUP #line 446 "detex.l" { if (fWord) (void)printf("%s\n", yytext); else ECHO; } YY_BREAK case 157: YY_RULE_SETUP #line 451 "detex.l" if (!fWord) ECHO; YY_BREAK case 158: YY_RULE_SETUP #line 452 "detex.l" if (!fWord) ECHO; YY_BREAK case 159: /* rule 159 can match eol */ YY_RULE_SETUP #line 453 "detex.l" if (!fWord) NEWLINE; YY_BREAK case 160: YY_RULE_SETUP #line 454 "detex.l" if (!fWord) putchar('\t'); YY_BREAK case 161: YY_RULE_SETUP #line 456 "detex.l" { BEGIN LaOptArg; } YY_BREAK case 162: YY_RULE_SETUP #line 457 "detex.l" { cOpenBrace++; } YY_BREAK case 163: /* rule 163 can match eol */ YY_RULE_SETUP #line 458 "detex.l" { cOpenBrace--; if (cOpenBrace == 0) { if (--cArgs==0) BEGIN Normal; } } YY_BREAK case 164: YY_RULE_SETUP #line 465 "detex.l" ; YY_BREAK case 165: YY_RULE_SETUP #line 466 "detex.l" BEGIN LaMacro; YY_BREAK case 166: /* rule 166 can match eol */ YY_RULE_SETUP #line 467 "detex.l" ; YY_BREAK case 167: YY_RULE_SETUP #line 469 "detex.l" { BEGIN LaOptArg2; } YY_BREAK case 168: YY_RULE_SETUP #line 470 "detex.l" { if (cOpenBrace == 0) { if (--cArgs==0) { BEGIN Normal; cOpenBrace--; } } cOpenBrace++; } YY_BREAK case 169: YY_RULE_SETUP #line 480 "detex.l" { cOpenBrace--; } YY_BREAK case 170: YY_RULE_SETUP #line 481 "detex.l" ; YY_BREAK case 171: YY_RULE_SETUP #line 482 "detex.l" BEGIN LaMacro2; YY_BREAK case 172: YY_RULE_SETUP #line 483 "detex.l" ; YY_BREAK case 173: YY_RULE_SETUP #line 484 "detex.l" ECHO; YY_BREAK #line 3106 "lex.yy.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(Define): case YY_STATE_EOF(Display): case YY_STATE_EOF(IncludeOnly): case YY_STATE_EOF(Input): case YY_STATE_EOF(Math): case YY_STATE_EOF(Normal): case YY_STATE_EOF(Control): case YY_STATE_EOF(LaBegin): case YY_STATE_EOF(LaDisplay): case YY_STATE_EOF(LaEnd): case YY_STATE_EOF(LaEnv): case YY_STATE_EOF(LaFormula): case YY_STATE_EOF(LaInclude): case YY_STATE_EOF(LaSubfile): case YY_STATE_EOF(LaMacro): case YY_STATE_EOF(LaOptArg): case YY_STATE_EOF(LaMacro2): case YY_STATE_EOF(LaOptArg2): case YY_STATE_EOF(LaVerbatim): case YY_STATE_EOF(LaBreak): case YY_STATE_EOF(LaPicture): 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_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); 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); int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { 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,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 (((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,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 >= 1362 ) 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 >= 1362 ) 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 == 1361); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT static void yyunput (int c, char * yy_bp ) { char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ int number_to_move = (yy_n_chars) + 2; char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #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 = (yy_size_t)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(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 = 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 = 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. */ \ int 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 484 "detex.l" /****** ** main -- ** Set sbProgName to the base of arg 0. ** Set the input paths. ** Check for options ** -c echo LaTeX \cite, \ref, and \pageref values ** -e list of LaTeX environments to ignore ** -l force latex mode ** -n do not follow \input and \include ** -s replace control sequences with space ** -t force tex mode ** -w word only output ** Set the list of LaTeX environments to ignore. ** Process each input file. ** If no input files are specified on the command line, process stdin. ******/ int main(int cArgs, char *rgsbArgs[]) { char *pch, sbBadOpt[2]; const char *sbEnvList = DEFAULTENV; int fSawFile = 0, iArgs = 1; /* get base name and decide what we are doing, detex or delatex */ #ifdef OS2 char drive[_MAX_DRIVE], dir[_MAX_DIR]; char fname[_MAX_FNAME], ext[_MAX_EXT]; #ifdef __EMX__ _wildcard(&cArgs, &rgsbArgs); _response(&cArgs, &rgsbArgs); #endif _splitpath (rgsbArgs[0], drive, dir, fname, ext); sbProgName = strlwr(fname); #elif defined(KPATHSEA) kpse_set_program_name (rgsbArgs[0], NULL); sbProgName = kpse_program_name; #else if ((sbProgName = strrchr(rgsbArgs[0], '/')) != NULL) sbProgName++; else sbProgName = rgsbArgs[0]; #endif if (strcmp("delatex",sbProgName) == 0) fLatex = 1; #ifndef KPATHSEA /* set rgsbInputPaths for use with TexOpen() */ SetInputPaths(); #endif /* process command line options */ while (iArgs < cArgs && *(pch = rgsbArgs[iArgs]) == CHOPT) { while (*++pch) switch (*pch) { case CHCITEOPT: fCite = 1; break; case CHENVOPT: if (++iArgs >= cArgs) { ErrorExit("-e option requires an argument"); } sbEnvList = rgsbArgs[iArgs]; break; case CHLATEXOPT: fLatex = 1; break; case CHNOFOLLOWOPT: fFollow = 0; break; case CHSPACEOPT: fSpace = 1; break; case CHTEXOPT: fForcetex = 1; break; case CHWORDOPT: fWord = 1; break; case CHREPLACE: fReplace = 1; break; default: sbBadOpt[0] = *pch; sbBadOpt[1] = '\0'; Warning("unknown option ignored -", sbBadOpt); UsageExit(); } iArgs++; } SetEnvIgnore(sbEnvList); #ifdef WIN32 _setmode(fileno(stdout), _O_BINARY); #endif /* process input files */ for (; iArgs < cArgs; iArgs++) { fSawFile++; if ((yyin = TexOpen(rgsbArgs[iArgs])) == NULL) { Warning("can't open file", rgsbArgs[iArgs]); continue;; } BEGIN Normal; (void)yylex(); } /* if there were no input files, assume stdin */ if (!fSawFile) { yyin = stdin; #ifdef OS2 if (isatty(fileno(stdin))) OS2UsageExit(); #endif BEGIN Normal; (void)yylex(); } #ifndef FLEX_SCANNER if (YYSTATE != Normal) ErrorExit("input contains an unterminated mode or environment"); #endif return(0); } #ifdef FLEX_SCANNER #undef yywrap #endif /****** ** yywrap -- handles EOF for lex. Check to see if the stack of open files ** has anything on it. If it does, set yyin to the to value. If not ** return the termination signal for lex. ******/ int yywrap(void) { (void)fclose(yyin); #ifdef FLEX_SCANNER /* Pop context state */ if (csb > 0) { yy_delete_buffer(YY_CURRENT_BUFFER ); yy_switch_to_buffer(rgsb[--csb] ); } #endif /* FLEX_SCANNER */ if (cfp > 0) { yyin = rgfp[--cfp]; return(0); } return(1); } #ifdef OS2 /****** ** yyless -- return characters to the input stream. Some systems don't have ** a yyless routine ******/ void yyless(int n) { int i = strlen(yytext); while (i > n) unput(yytext[--i]); yytext[yyleng = n] = '\0'; } #endif /****** ** SetEnvIgnore -- sets rgsbEnvIgnore to the values indicated by the ** sbEnvList. ******/ void SetEnvIgnore(const char *sbEnvList) { char *sb; sb = SafeMalloc(strlen(sbEnvList) + 1, "malloc for SetEnvIgnore failed"); (void) strcpy(sb, sbEnvList); csbEnvIgnore = SeparateList(sb, rgsbEnvIgnore, CHENVSEP, MAXENVS); if (csbEnvIgnore == my_ERROR) ErrorExit("The environment list contains too many environments"); } /****** ** BeginEnv -- checks to see if sbEnv is in the list rgsbEnvIgnore. If it ** is, sbCurrentIgnoredEnv is set to sbEnv. ******/ int BeginEnv(const char *sbEnv) { int i; if (!fLatex) return(0); for (i = 0; i < csbEnvIgnore; ++i) if (strcmp(sbEnv, rgsbEnvIgnore[i]) == 0) { (void)strcpy(sbCurrentIgnoredEnv, sbEnv); return(1); } return(0); } /****** ** EndEnv -- checks to see if sbEnv is the current environment being ignored. ******/ int EndEnv(const char *sbEnv) { if (!fLatex) return(0); if (strcmp(sbEnv, sbCurrentIgnoredEnv) == 0) return(1); return(0); } /****** ** InputFile -- push the current yyin and open sbFile. If the open fails, ** the sbFile is ignored. ******/ void InputFile(char *sbFile) { FILE *TexOpen(); if (!fFollow) return; rgfp[cfp++] = yyin; if ((yyin = TexOpen(sbFile)) == NULL) { Warning("can't open \\input file", sbFile); yyin = rgfp[--cfp]; return; } #ifdef FLEX_SCANNER rgsb[csb++] = YY_CURRENT_BUFFER; yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE ) ); #endif /* FLEX_SCANNER */ } /****** ** IncludeFile -- if sbFile is not in the rgsbIncList, push current yyin ** and open sbFile. If the open fails, the sbFile is ignored. ******/ void IncludeFile(char *sbFile) { FILE *TexOpen(); if (!fFollow) return; if (!InList(sbFile)) return; rgfp[cfp++] = yyin; if ((yyin = TexOpen(sbFile)) == NULL) { Warning("can't open \\include file", sbFile); yyin = rgfp[--cfp]; return; } #ifdef FLEX_SCANNER rgsb[csb++] = YY_CURRENT_BUFFER; yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE ) ); #endif /* FLEX_SCANNER */ } /****** ** AddInclude -- adds sbFile to the rgsbIncList and increments csbIncList. ** If the include list is too long, sbFile is ignored. ******/ void AddInclude(char *sbFile) { if (!fFollow) return; if (csbIncList >= MAXINCLIST) Warning("\\includeonly list is too long, ignoring", sbFile); rgsbIncList[csbIncList] = SafeMalloc(strlen(sbFile) + 1, "malloc for AddInclude failed"); (void)strcpy(rgsbIncList[csbIncList++], sbFile); } /****** ** InList -- checks to see if sbFile is in the rgsbIncList. If there is ** no list, all files are assumed to be "in the list". ******/ int InList(char *sbFile) { char *pch, sbBase[PATH_MAX]; int i; if (csbIncList == 0) /* no list */ return(1); (void)strcpy(sbBase, sbFile); if ((pch = strrchr(sbBase, '.')) != NULL) *pch = '\0'; i = 0; while ((i < csbIncList) && rgsbIncList[i]) if (strcmp(rgsbIncList[i++], sbBase) == 0) return(1); return(0); } #ifndef KPATHSEA /****** ** SetInputPaths -- sets rgsbInputPaths to the values indicated by the ** TEXINPUTS environment variable if set or else DEFAULTINPUTS. If ** the user's TEXINPUTS has a leading ':' prepend the DEFAULTINPUTS ** to the path, if there is a trailing ':' append the DEFAULTINPUTS. ** This is consistent with the most recent TeX. However, this ** routine does not honor the '//' construct (expand subdirs). ******/ void SetInputPaths(void) { const char *sb; char *sbPaths; int cchDefaults, cchPaths; cchDefaults = strlen(DEFAULTINPUTS); #ifdef OS2 if ((sb = getenv("TEXINPUT")) == NULL) #endif if ((sb = getenv("TEXINPUTS")) == NULL) sb = DEFAULTINPUTS; cchPaths = strlen(sb); if (sb[0] == CHPATHSEP) cchPaths += cchDefaults; if (sb[strlen(sb) - 1] == CHPATHSEP) cchPaths += cchDefaults; sbPaths = SafeMalloc(cchPaths + 1, "malloc for SetInputPaths failed"); sbPaths[0] = '\0'; if (sb[0] == CHPATHSEP) (void)strcat(sbPaths, DEFAULTINPUTS); (void)strcat(sbPaths, sb); if (sb[strlen(sb) - 1] == CHPATHSEP) (void)strcat(sbPaths, DEFAULTINPUTS); csbInputPaths = SeparateList(sbPaths, rgsbInputPaths, CHPATHSEP, MAXINPUTPATHS); if (csbInputPaths == my_ERROR) #ifdef OS2 ErrorExit("TEXINPUT(S) environment variable has too many paths"); #else ErrorExit("TEXINPUTS environment variable has too many paths"); #endif } #endif /****** ** SeparateList -- takes a chSep separated list sbList, replaces the ** chSep's with NULLs and sets rgsbList[i] to the beginning of ** the ith word in sbList. The number of words is returned. A ** my_ERROR is returned if there are more than csbMax words. ******/ int SeparateList(char *sbList, char *rgsbList[], char chSep, int csbMax) { int csbList = 0; while (sbList && *sbList && csbList < csbMax) { rgsbList[csbList++] = sbList; if ((sbList = strchr(sbList, chSep))) { *sbList++ = '\0'; } } return(sbList && *sbList ? my_ERROR : csbList); } /****** ** TexOpen -- tries to open sbFile in each of the rgsbInputPaths in turn. ** For each input path the following order is used: ** file.tex - must be as named, if not there go to the next path ** file.ext - random extension, try it ** file - base name, add .tex and try it ** file - try it as is ** Notice that if file exists in the first path and file.tex exists in ** one of the other paths, file in the first path is what is opened. ** If the sbFile begins with a '/', no paths are searched. ******/ FILE * TexOpen(char *sbFile) { char *sbNew; #ifndef KPATHSEA char *pch; FILE *fp; int iPath; static char sbFullPath[PATH_MAX]; for (iPath = 0; iPath < csbInputPaths; iPath++) { #ifdef OS2 if (*sbFile == '/' || *sbFile == '\\' || strchr(sbFile, ':')) { /* absolute path */ #else if (*sbFile == '/') { /* absolute path */ #endif (void)sprintf(sbFullPath, "%s", sbFile); iPath = csbInputPaths; /* only check once */ } else (void)sprintf(sbFullPath, "%s/%s", rgsbInputPaths[iPath], sbFile); #ifdef OS2 pch = sbFullPath; while (pch = strchr(pch, '\\')) *pch = '/'; #endif /* If sbFile ends in .tex then it must be there */ if ((pch = strrchr(sbFullPath, '.')) != NULL && (strcmp(pch, ".tex") == 0)) { if ((fp = fopen(sbFullPath, "r")) != NULL) return(fp); else continue; } /* if . then try to open it. the '.' represents */ /* the beginning of an extension if it is not the first */ /* character and it does not follow a '.' or a '/' */ if (pch != NULL && pch > &(sbFullPath[0]) && *(pch - 1) != '.' && *(pch - 1) != '/' && (fp = fopen(sbFullPath, "r")) != NULL) { return(fp); } /* just base name, add .tex to the name */ sbNew = SafeMalloc(strlen(sbFullPath) + 5, "malloc for TexOpen failed"); (void)strcpy(sbNew, sbFullPath); (void)strcat(sbNew, ".tex"); if ((fp = fopen(sbNew, "r")) != NULL) { free(sbNew); return(fp); } free(sbNew); /* try sbFile regardless */ if ((fp = fopen(sbFullPath, "r")) != NULL) return(fp); } return NULL; #else sbNew = kpse_find_file (sbFile, kpse_tex_format, false); if (sbNew == NULL) return NULL; return fopen (sbNew, "r"); #endif } /****** ** SafeMalloc -- wrapper around malloc() to check for failure. ******/ char * SafeMalloc(int cch, const char *sbMessage) { char *sb; if ((sb = (char *)malloc((unsigned)cch)) == NULL) ErrorExit(sbMessage); return(sb); } /****** ** Warning -- print a warning message preceded by the program name. ******/ void Warning(const char *sb1, const char *sb2) { (void)fprintf(stderr, "%s: warning: %s %s\n", sbProgName, sb1, sb2); } /****** ** ErrorExit -- print an error message preceded by the program name. ** Stdout is flushed and detex exits. ******/ void ErrorExit(const char *sb1) { (void)fflush(stdout); (void)fprintf(stderr, "%s: error: %s\n", sbProgName, sb1); exit(1); } /****** ** UsageExit -- print OS/2 usage message and exit. ******/ void UsageExit(void) { (void)printf("\n%s [ -clnrstw ] [ -e environment-list ] [ filename[.tex] ... ]\n", sbProgName); puts(" -c echo LaTeX \\cite, \\ref, and \\pageref values\n \ -e list of LaTeX environments to ignore\n \ -l force latex mode\n \ -n do not follow \\input, \\include and \\subfile\n \ -r replace math with \"noun\" and \"noun verbs noun\" to preserve grammar\n \ -s replace control sequences with space\n \ -t force tex mode\n \ -w word only output"); exit(0); }