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