lex.c revision 350952b9
1 2#line 3 "lex.c" 3 4#define YY_INT_ALIGNED short int 5 6/* A lexical scanner generated by flex */ 7 8#define FLEX_SCANNER 9#define YY_FLEX_MAJOR_VERSION 2 10#define YY_FLEX_MINOR_VERSION 5 11#define YY_FLEX_SUBMINOR_VERSION 35 12#if YY_FLEX_SUBMINOR_VERSION > 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.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__) && __STDC_VERSION__ >= 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_MACROS 39#define __STDC_LIMIT_MACROS 1 40#endif 41 42#include <inttypes.h> 43typedef int8_t flex_int8_t; 44typedef uint8_t flex_uint8_t; 45typedef int16_t flex_int16_t; 46typedef uint16_t flex_uint16_t; 47typedef int32_t flex_int32_t; 48typedef uint32_t flex_uint32_t; 49#else 50typedef signed char flex_int8_t; 51typedef short int flex_int16_t; 52typedef int flex_int32_t; 53typedef unsigned char flex_uint8_t; 54typedef unsigned short int flex_uint16_t; 55typedef unsigned int flex_uint32_t; 56#endif /* ! C99 */ 57 58/* Limits of integral types. */ 59#ifndef INT8_MIN 60#define INT8_MIN (-128) 61#endif 62#ifndef INT16_MIN 63#define INT16_MIN (-32767-1) 64#endif 65#ifndef INT32_MIN 66#define INT32_MIN (-2147483647-1) 67#endif 68#ifndef INT8_MAX 69#define INT8_MAX (127) 70#endif 71#ifndef INT16_MAX 72#define INT16_MAX (32767) 73#endif 74#ifndef INT32_MAX 75#define INT32_MAX (2147483647) 76#endif 77#ifndef UINT8_MAX 78#define UINT8_MAX (255U) 79#endif 80#ifndef UINT16_MAX 81#define UINT16_MAX (65535U) 82#endif 83#ifndef UINT32_MAX 84#define UINT32_MAX (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__) 98 99#define YY_USE_CONST 100 101#endif /* defined (__STDC__) */ 102#endif /* ! __cplusplus */ 103 104#ifdef YY_USE_CONST 105#define yyconst const 106#else 107#define yyconst 108#endif 109 110/* Returned upon end-of-file. */ 111#define YY_NULL 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) 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 * 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) 131#define YYSTATE YY_START 132 133/* Action number for EOF rule of a given start state. */ 134#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 135 136/* Special action meaning "start processing a new file". */ 137#define YY_NEW_FILE yyrestart(yyin ) 138 139#define YY_END_OF_BUFFER_CHAR 0 140 141/* Size of default input buffer. */ 142#ifndef YY_BUF_SIZE 143#define YY_BUF_SIZE 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 ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 149 150#ifndef YY_TYPEDEF_YY_BUFFER_STATE 151#define YY_TYPEDEF_YY_BUFFER_STATE 152typedef struct yy_buffer_state *YY_BUFFER_STATE; 153#endif 154 155extern int yyleng; 156 157extern FILE *yyin, *yyout; 158 159#define EOB_ACT_CONTINUE_SCAN 0 160#define EOB_ACT_END_OF_FILE 1 161#define EOB_ACT_LAST_MATCH 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) \ 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_ADJ; \ 175 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 176 } \ 177 while ( 0 ) 178 179#define unput(c) yyunput( c, (yytext_ptr) ) 180 181#ifndef YY_TYPEDEF_YY_SIZE_T 182#define YY_TYPEDEF_YY_SIZE_T 183typedef size_t yy_size_t; 184#endif 185 186#ifndef YY_STRUCT_YY_BUFFER_STATE 187#define YY_STRUCT_YY_BUFFER_STATE 188struct 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_NEW 0 235#define YY_BUFFER_NORMAL 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_PENDING 2 247 248 }; 249#endif /* !YY_STRUCT_YY_BUFFER_STATE */ 250 251/* Stack of input buffers. */ 252static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 253static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 254static 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) \ 263 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 264 : NULL) 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)] 270 271/* yy_hold_char holds the character lost when yytext is formed. */ 272static char yy_hold_char; 273static int yy_n_chars; /* number of characters read into yy_ch_buf */ 274int yyleng; 275 276/* Points to current character in buffer. */ 277static char *yy_c_buf_p = (char *) 0; 278static int yy_init = 0; /* whether we need to initialize */ 279static 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 */ 284static int yy_did_buffer_switch_on_eof; 285 286void yyrestart (FILE *input_file ); 287void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 288YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); 289void yy_delete_buffer (YY_BUFFER_STATE b ); 290void yy_flush_buffer (YY_BUFFER_STATE b ); 291void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); 292void yypop_buffer_state (void ); 293 294static void yyensure_buffer_stack (void ); 295static void yy_load_buffer_state (void ); 296static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); 297 298#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) 299 300YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); 301YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); 302YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); 303 304void *yyalloc (yy_size_t ); 305void *yyrealloc (void *,yy_size_t ); 306void yyfree (void * ); 307 308#define yy_new_buffer yy_create_buffer 309 310#define yy_set_interactive(is_interactive) \ 311 { \ 312 if ( ! YY_CURRENT_BUFFER ){ \ 313 yyensure_buffer_stack (); \ 314 YY_CURRENT_BUFFER_LVALUE = \ 315 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 316 } \ 317 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 318 } 319 320#define yy_set_bol(at_bol) \ 321 { \ 322 if ( ! YY_CURRENT_BUFFER ){\ 323 yyensure_buffer_stack (); \ 324 YY_CURRENT_BUFFER_LVALUE = \ 325 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 326 } \ 327 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 328 } 329 330#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 331 332/* Begin user sect3 */ 333 334typedef unsigned char YY_CHAR; 335 336FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 337 338typedef int yy_state_type; 339 340extern int yylineno; 341 342int yylineno = 1; 343 344extern char *yytext; 345#define yytext_ptr yytext 346 347static yy_state_type yy_get_previous_state (void ); 348static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); 349static int yy_get_next_buffer (void ); 350static void yy_fatal_error (yyconst 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 \ 356 (yytext_ptr) = 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_RULES 72 363#define YY_END_OF_BUFFER 73 364/* This struct is not used in this scanner, 365 but its presence is necessary. */ 366struct yy_trans_info 367 { 368 flex_int32_t yy_verify; 369 flex_int32_t yy_nxt; 370 }; 371static yyconst flex_int16_t yy_accept[420] = 372 { 0, 373 0, 0, 73, 70, 68, 69, 70, 70, 65, 70, 374 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 375 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 376 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 377 70, 70, 0, 66, 70, 70, 0, 67, 65, 70, 378 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 379 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 380 70, 70, 70, 70, 70, 10, 70, 70, 70, 70, 381 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 382 70, 70, 70, 70, 66, 0, 70, 0, 66, 70, 383 384 4, 70, 70, 70, 70, 70, 70, 70, 70, 70, 385 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 386 70, 70, 70, 70, 70, 11, 70, 70, 70, 70, 387 70, 70, 70, 70, 70, 70, 70, 70, 1, 18, 388 70, 70, 70, 70, 70, 9, 70, 70, 66, 0, 389 70, 70, 70, 70, 70, 41, 70, 70, 70, 6, 390 70, 70, 70, 70, 70, 63, 70, 70, 70, 70, 391 70, 70, 70, 70, 17, 8, 70, 70, 70, 70, 392 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 393 19, 70, 70, 6, 70, 70, 70, 70, 70, 45, 394 395 70, 56, 3, 70, 70, 70, 70, 70, 12, 70, 396 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 397 70, 44, 70, 70, 70, 70, 70, 70, 70, 70, 398 70, 70, 70, 70, 70, 70, 70, 70, 70, 46, 399 51, 70, 48, 70, 70, 70, 70, 70, 70, 70, 400 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 401 70, 70, 13, 70, 70, 70, 70, 70, 70, 70, 402 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 403 70, 70, 70, 70, 70, 70, 70, 55, 70, 70, 404 70, 70, 70, 70, 70, 53, 70, 70, 70, 70, 405 406 70, 70, 70, 70, 70, 70, 40, 70, 70, 70, 407 70, 64, 70, 70, 26, 70, 70, 70, 70, 70, 408 70, 70, 70, 70, 54, 70, 70, 70, 39, 20, 409 70, 70, 62, 70, 70, 52, 70, 70, 2, 31, 410 70, 70, 70, 70, 70, 70, 70, 70, 57, 70, 411 70, 23, 70, 70, 70, 70, 70, 30, 49, 70, 412 70, 70, 70, 21, 70, 70, 47, 70, 70, 43, 413 36, 60, 37, 70, 70, 14, 61, 70, 70, 22, 414 70, 70, 70, 32, 70, 70, 5, 59, 70, 38, 415 70, 58, 70, 33, 70, 16, 70, 70, 70, 70, 416 417 34, 42, 7, 70, 27, 35, 70, 29, 70, 70, 418 24, 15, 70, 28, 70, 70, 25, 50, 0 419 } ; 420 421static yyconst flex_int32_t yy_ec[256] = 422 { 0, 423 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 425 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 426 1, 2, 1, 4, 5, 1, 1, 1, 1, 1, 427 1, 1, 1, 1, 1, 1, 1, 6, 7, 6, 428 6, 6, 6, 8, 6, 9, 6, 1, 1, 1, 429 1, 1, 1, 1, 10, 11, 12, 13, 14, 15, 430 16, 1, 17, 18, 1, 19, 20, 21, 22, 23, 431 1, 24, 25, 26, 1, 1, 27, 28, 1, 1, 432 1, 29, 1, 1, 1, 1, 30, 31, 32, 33, 433 434 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 435 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 436 54, 1, 1, 1, 1, 1, 1, 1, 1, 1, 437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 438 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 439 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 444 445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 449 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 450 1, 1, 1, 1, 1 451 } ; 452 453static yyconst flex_int32_t yy_meta[55] = 454 { 0, 455 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 456 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 457 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 458 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 459 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 460 1, 1, 1, 1 461 } ; 462 463static yyconst flex_int16_t yy_base[427] = 464 { 0, 465 0, 0, 498, 0, 499, 499, 53, 56, 54, 21, 466 35, 36, 37, 24, 34, 463, 44, 452, 457, 456, 467 44, 46, 56, 48, 61, 45, 455, 448, 461, 71, 468 460, 443, 58, 445, 69, 440, 70, 436, 451, 450, 469 0, 114, 103, 0, 117, 120, 480, 499, 118, 449, 470 449, 448, 428, 429, 432, 432, 441, 429, 425, 422, 471 421, 436, 428, 86, 425, 418, 436, 414, 426, 420, 472 413, 418, 87, 438, 429, 111, 411, 423, 426, 414, 473 410, 404, 402, 408, 401, 408, 410, 399, 405, 402, 474 397, 398, 401, 93, 499, 135, 145, 126, 148, 154, 475 476 136, 399, 400, 405, 389, 389, 389, 405, 380, 396, 477 401, 393, 387, 388, 379, 393, 394, 408, 388, 389, 478 379, 387, 386, 386, 373, 0, 398, 381, 369, 371, 479 379, 380, 386, 367, 355, 369, 390, 363, 0, 0, 480 367, 359, 354, 368, 368, 0, 346, 358, 137, 141, 481 355, 363, 352, 359, 353, 0, 344, 359, 344, 144, 482 349, 348, 337, 365, 139, 0, 350, 336, 342, 349, 483 335, 333, 111, 333, 0, 0, 349, 343, 327, 325, 484 324, 340, 332, 338, 165, 337, 328, 336, 335, 322, 485 0, 333, 327, 347, 121, 312, 311, 328, 313, 0, 486 487 305, 0, 0, 311, 314, 315, 317, 320, 0, 320, 488 308, 301, 301, 302, 310, 317, 320, 296, 295, 294, 489 304, 0, 293, 327, 305, 304, 303, 293, 297, 292, 490 286, 294, 293, 286, 295, 294, 293, 294, 295, 0, 491 0, 283, 0, 280, 288, 287, 286, 275, 277, 283, 492 265, 285, 266, 300, 279, 270, 269, 255, 264, 263, 493 270, 271, 0, 250, 249, 269, 252, 270, 274, 251, 494 250, 247, 263, 264, 261, 251, 248, 252, 257, 252, 495 234, 237, 249, 250, 247, 235, 234, 0, 230, 245, 496 248, 243, 233, 226, 244, 0, 219, 238, 230, 220, 497 498 226, 234, 214, 225, 224, 215, 0, 215, 213, 212, 499 212, 0, 225, 210, 0, 216, 222, 212, 205, 211, 500 203, 213, 216, 216, 0, 199, 199, 203, 0, 0, 501 198, 210, 0, 195, 206, 0, 207, 197, 0, 0, 502 190, 204, 203, 199, 198, 196, 199, 198, 0, 191, 503 155, 0, 181, 199, 194, 164, 184, 0, 0, 192, 504 191, 191, 174, 0, 185, 177, 0, 187, 169, 0, 505 0, 0, 0, 174, 185, 0, 0, 170, 182, 0, 506 172, 171, 205, 0, 176, 178, 0, 0, 176, 0, 507 166, 0, 200, 0, 162, 0, 174, 173, 168, 136, 508 509 0, 0, 0, 149, 0, 0, 140, 0, 123, 101, 510 0, 0, 80, 0, 75, 43, 0, 0, 499, 70, 511 191, 193, 195, 197, 199, 201 512 } ; 513 514static yyconst flex_int16_t yy_def[427] = 515 { 0, 516 419, 1, 419, 420, 419, 419, 421, 422, 420, 420, 517 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 518 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 519 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 520 420, 421, 423, 420, 424, 422, 425, 419, 420, 420, 521 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 522 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 523 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 524 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 525 420, 420, 420, 420, 419, 426, 421, 423, 421, 424, 526 527 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 528 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 529 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 530 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 531 420, 420, 420, 420, 420, 420, 420, 420, 423, 426, 532 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 533 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 534 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 535 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 536 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 537 538 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 539 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 540 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 541 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 542 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 543 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 544 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 545 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 546 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 547 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 548 549 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 550 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 551 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 552 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 553 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 554 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 555 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 556 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 557 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 558 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 559 560 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 561 420, 420, 420, 420, 420, 420, 420, 420, 0, 419, 562 419, 419, 419, 419, 419, 419 563 } ; 564 565static yyconst flex_int16_t yy_nxt[554] = 566 { 0, 567 4, 5, 6, 7, 8, 9, 9, 9, 9, 10, 568 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 569 21, 22, 23, 24, 25, 26, 27, 28, 4, 10, 570 29, 30, 31, 32, 33, 4, 4, 34, 18, 4, 571 19, 4, 35, 36, 37, 4, 38, 39, 40, 4, 572 4, 4, 28, 4, 43, 43, 44, 47, 48, 49, 573 49, 49, 49, 50, 52, 55, 59, 51, 53, 61, 574 41, 63, 56, 72, 62, 418, 57, 64, 88, 58, 575 60, 45, 89, 65, 54, 67, 68, 73, 74, 77, 576 75, 83, 76, 78, 85, 93, 79, 84, 72, 80, 577 578 55, 64, 81, 77, 86, 82, 95, 65, 417, 87, 579 79, 57, 94, 416, 92, 43, 43, 44, 98, 43, 580 99, 47, 48, 49, 49, 49, 49, 130, 115, 95, 581 125, 96, 116, 126, 131, 127, 125, 43, 149, 126, 582 95, 415, 45, 43, 149, 100, 43, 43, 44, 43, 583 43, 44, 151, 204, 96, 98, 43, 99, 220, 152, 584 205, 211, 221, 150, 378, 96, 206, 212, 213, 150, 585 383, 414, 384, 45, 231, 393, 45, 394, 379, 232, 586 413, 412, 100, 233, 411, 212, 213, 234, 235, 236, 587 237, 42, 42, 46, 46, 43, 43, 97, 97, 47, 588 589 47, 98, 98, 410, 409, 408, 407, 406, 405, 404, 590 403, 402, 401, 400, 399, 398, 397, 396, 395, 392, 591 391, 390, 389, 388, 387, 386, 385, 382, 381, 380, 592 377, 376, 375, 374, 373, 372, 371, 370, 369, 368, 593 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 594 357, 356, 355, 354, 353, 352, 351, 350, 349, 348, 595 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 596 337, 336, 335, 334, 333, 332, 331, 330, 329, 328, 597 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 598 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 599 600 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 601 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 602 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 603 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 604 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 605 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 606 247, 246, 245, 205, 244, 243, 242, 241, 240, 239, 607 238, 230, 229, 228, 227, 226, 225, 224, 223, 222, 608 219, 218, 217, 216, 215, 214, 210, 209, 208, 207, 609 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 610 611 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, 612 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 613 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 614 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 615 153, 148, 147, 146, 145, 144, 143, 142, 141, 140, 616 139, 138, 137, 136, 135, 134, 133, 132, 129, 128, 617 124, 123, 122, 121, 120, 119, 118, 117, 114, 113, 618 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 619 102, 101, 48, 88, 85, 84, 76, 68, 61, 59, 620 52, 91, 90, 71, 70, 69, 66, 419, 3, 419, 621 622 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 623 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 624 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 625 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 626 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 627 419, 419, 419 628 } ; 629 630static yyconst flex_int16_t yy_chk[554] = 631 { 0, 632 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 633 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 634 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 635 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 636 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 637 1, 1, 1, 1, 7, 7, 7, 8, 8, 9, 638 9, 9, 9, 10, 11, 12, 13, 10, 11, 14, 639 420, 15, 12, 21, 14, 416, 12, 15, 26, 12, 640 13, 7, 26, 15, 11, 17, 17, 21, 22, 23, 641 22, 24, 22, 23, 25, 33, 23, 24, 35, 23, 642 643 30, 33, 23, 37, 25, 23, 43, 33, 415, 25, 644 37, 30, 35, 413, 30, 42, 42, 42, 45, 45, 645 45, 46, 46, 49, 49, 49, 49, 76, 64, 98, 646 73, 43, 64, 73, 76, 73, 94, 96, 96, 94, 647 149, 410, 42, 150, 150, 45, 97, 97, 97, 99, 648 99, 99, 101, 160, 98, 100, 100, 100, 173, 101, 649 160, 165, 173, 96, 351, 149, 160, 195, 195, 150, 650 356, 409, 356, 97, 185, 369, 99, 369, 351, 185, 651 407, 404, 100, 185, 400, 165, 165, 185, 185, 185, 652 185, 421, 421, 422, 422, 423, 423, 424, 424, 425, 653 654 425, 426, 426, 399, 398, 397, 395, 393, 391, 389, 655 386, 385, 383, 382, 381, 379, 378, 375, 374, 368, 656 366, 365, 363, 362, 361, 360, 357, 355, 354, 353, 657 350, 348, 347, 346, 345, 344, 343, 342, 341, 338, 658 337, 335, 334, 332, 331, 328, 327, 326, 324, 323, 659 322, 321, 320, 319, 318, 317, 316, 314, 313, 311, 660 310, 309, 308, 306, 305, 304, 303, 302, 301, 300, 661 299, 298, 297, 295, 294, 293, 292, 291, 290, 289, 662 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 663 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 664 665 267, 266, 265, 264, 262, 261, 260, 259, 258, 257, 666 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 667 246, 245, 244, 242, 239, 238, 237, 236, 235, 234, 668 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 669 223, 221, 220, 219, 218, 217, 216, 215, 214, 213, 670 212, 211, 210, 208, 207, 206, 205, 204, 201, 199, 671 198, 197, 196, 194, 193, 192, 190, 189, 188, 187, 672 186, 184, 183, 182, 181, 180, 179, 178, 177, 174, 673 172, 171, 170, 169, 168, 167, 164, 163, 162, 161, 674 159, 158, 157, 155, 154, 153, 152, 151, 148, 147, 675 676 145, 144, 143, 142, 141, 138, 137, 136, 135, 134, 677 133, 132, 131, 130, 129, 128, 127, 125, 124, 123, 678 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 679 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 680 102, 93, 92, 91, 90, 89, 88, 87, 86, 85, 681 84, 83, 82, 81, 80, 79, 78, 77, 75, 74, 682 72, 71, 70, 69, 68, 67, 66, 65, 63, 62, 683 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 684 51, 50, 47, 40, 39, 38, 36, 34, 32, 31, 685 29, 28, 27, 20, 19, 18, 16, 3, 419, 419, 686 687 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 688 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 689 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 690 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 691 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 692 419, 419, 419 693 } ; 694 695static yy_state_type yy_last_accepting_state; 696static char *yy_last_accepting_cpos; 697 698extern int yy_flex_debug; 699int yy_flex_debug = 0; 700 701/* The intent behind this definition is that it'll catch 702 * any uses of REJECT which flex missed. 703 */ 704#define REJECT reject_used_but_not_detected 705#define yymore() yymore_used_but_not_detected 706#define YY_MORE_ADJ 0 707#define YY_RESTORE_YY_MORE_OFFSET 708char *yytext; 709#line 1 "lex.l" 710/* $XConsortium: lex.l,v 1.8 94/03/31 20:40:44 rws Exp $ */ 711/* $XFree86: xc/programs/xgc/lex.l,v 1.3 2000/04/05 18:14:07 dawes Exp $ */ 712/* 713** lex file for xgc syntax 714*/ 715/* Lots of stuff stolen from gwm's wool.lex */ 716#line 10 "lex.l" 717 718#include <X11/X.h> 719#include <stdlib.h> 720#include "gram.h" 721#include "constants.h" 722#if defined(FLEX_SCANNER) && !defined(YY_FLEX_LEX_COMPAT) && !defined(__UNIXOS2__) 723int yylineno; 724#endif 725#line 726 "lex.c" 726 727#define INITIAL 0 728 729#ifndef YY_NO_UNISTD_H 730/* Special case for "unistd.h", since it is non-ANSI. We include it way 731 * down here because we want the user's section 1 to have been scanned first. 732 * The user has a chance to override it with an option. 733 */ 734#include <unistd.h> 735#endif 736 737#ifndef YY_EXTRA_TYPE 738#define YY_EXTRA_TYPE void * 739#endif 740 741static int yy_init_globals (void ); 742 743/* Accessor methods to globals. 744 These are made visible to non-reentrant scanners for convenience. */ 745 746int yylex_destroy (void ); 747 748int yyget_debug (void ); 749 750void yyset_debug (int debug_flag ); 751 752YY_EXTRA_TYPE yyget_extra (void ); 753 754void yyset_extra (YY_EXTRA_TYPE user_defined ); 755 756FILE *yyget_in (void ); 757 758void yyset_in (FILE * in_str ); 759 760FILE *yyget_out (void ); 761 762void yyset_out (FILE * out_str ); 763 764int yyget_leng (void ); 765 766char *yyget_text (void ); 767 768int yyget_lineno (void ); 769 770void yyset_lineno (int line_number ); 771 772/* Macros after this point can all be overridden by user definitions in 773 * section 1. 774 */ 775 776#ifndef YY_SKIP_YYWRAP 777#ifdef __cplusplus 778extern "C" int yywrap (void ); 779#else 780extern int yywrap (void ); 781#endif 782#endif 783 784 static void yyunput (int c,char *buf_ptr ); 785 786#ifndef yytext_ptr 787static void yy_flex_strncpy (char *,yyconst char *,int ); 788#endif 789 790#ifdef YY_NEED_STRLEN 791static int yy_flex_strlen (yyconst char * ); 792#endif 793 794#ifndef YY_NO_INPUT 795 796#ifdef __cplusplus 797static int yyinput (void ); 798#else 799static int input (void ); 800#endif 801 802#endif 803 804/* Amount of stuff to slurp up with each read. */ 805#ifndef YY_READ_BUF_SIZE 806#define YY_READ_BUF_SIZE 8192 807#endif 808 809/* Copy whatever the last rule matched to the standard output. */ 810#ifndef ECHO 811/* This used to be an fputs(), but since the string might contain NUL's, 812 * we now use fwrite(). 813 */ 814#define ECHO fwrite( yytext, yyleng, 1, yyout ) 815#endif 816 817/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 818 * is returned in "result". 819 */ 820#ifndef YY_INPUT 821#define YY_INPUT(buf,result,max_size) \ 822 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 823 { \ 824 int c = '*'; \ 825 int n; \ 826 for ( n = 0; n < max_size && \ 827 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 828 buf[n] = (char) c; \ 829 if ( c == '\n' ) \ 830 buf[n++] = (char) c; \ 831 if ( c == EOF && ferror( yyin ) ) \ 832 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 833 result = n; \ 834 } \ 835 else \ 836 { \ 837 errno=0; \ 838 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 839 { \ 840 if( errno != EINTR) \ 841 { \ 842 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 843 break; \ 844 } \ 845 errno=0; \ 846 clearerr(yyin); \ 847 } \ 848 }\ 849\ 850 851#endif 852 853/* No semi-colon after return; correct usage is to write "yyterminate();" - 854 * we don't want an extra ';' after the "return" because that will cause 855 * some compilers to complain about unreachable statements. 856 */ 857#ifndef yyterminate 858#define yyterminate() return YY_NULL 859#endif 860 861/* Number of entries by which start-condition stack grows. */ 862#ifndef YY_START_STACK_INCR 863#define YY_START_STACK_INCR 25 864#endif 865 866/* Report a fatal error. */ 867#ifndef YY_FATAL_ERROR 868#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 869#endif 870 871/* end tables serialization structures and prototypes */ 872 873/* Default declaration of generated scanner - a define so the user can 874 * easily add parameters. 875 */ 876#ifndef YY_DECL 877#define YY_DECL_IS_OURS 1 878 879extern int yylex (void); 880 881#define YY_DECL int yylex (void) 882#endif /* !YY_DECL */ 883 884/* Code executed at the beginning of each rule, after yytext and yyleng 885 * have been set up. 886 */ 887#ifndef YY_USER_ACTION 888#define YY_USER_ACTION 889#endif 890 891/* Code executed at the end of each rule. */ 892#ifndef YY_BREAK 893#define YY_BREAK break; 894#endif 895 896#define YY_RULE_SETUP \ 897 YY_USER_ACTION 898 899/** The main scanner function which does all the work. 900 */ 901YY_DECL 902{ 903 register yy_state_type yy_current_state; 904 register char *yy_cp, *yy_bp; 905 register int yy_act; 906 907#line 27 "lex.l" 908 909 910#line 911 "lex.c" 911 912 if ( !(yy_init) ) 913 { 914 (yy_init) = 1; 915 916#ifdef YY_USER_INIT 917 YY_USER_INIT; 918#endif 919 920 if ( ! (yy_start) ) 921 (yy_start) = 1; /* first start state */ 922 923 if ( ! yyin ) 924 yyin = stdin; 925 926 if ( ! yyout ) 927 yyout = stdout; 928 929 if ( ! YY_CURRENT_BUFFER ) { 930 yyensure_buffer_stack (); 931 YY_CURRENT_BUFFER_LVALUE = 932 yy_create_buffer(yyin,YY_BUF_SIZE ); 933 } 934 935 yy_load_buffer_state( ); 936 } 937 938 while ( 1 ) /* loops until end-of-file is reached */ 939 { 940 yy_cp = (yy_c_buf_p); 941 942 /* Support of yytext. */ 943 *yy_cp = (yy_hold_char); 944 945 /* yy_bp points to the position in yy_ch_buf of the start of 946 * the current run. 947 */ 948 yy_bp = yy_cp; 949 950 yy_current_state = (yy_start); 951yy_match: 952 do 953 { 954 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 955 if ( yy_accept[yy_current_state] ) 956 { 957 (yy_last_accepting_state) = yy_current_state; 958 (yy_last_accepting_cpos) = yy_cp; 959 } 960 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 961 { 962 yy_current_state = (int) yy_def[yy_current_state]; 963 if ( yy_current_state >= 420 ) 964 yy_c = yy_meta[(unsigned int) yy_c]; 965 } 966 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 967 ++yy_cp; 968 } 969 while ( yy_base[yy_current_state] != 499 ); 970 971yy_find_action: 972 yy_act = yy_accept[yy_current_state]; 973 if ( yy_act == 0 ) 974 { /* have to back up */ 975 yy_cp = (yy_last_accepting_cpos); 976 yy_current_state = (yy_last_accepting_state); 977 yy_act = yy_accept[yy_current_state]; 978 } 979 980 YY_DO_BEFORE_ACTION; 981 982do_action: /* This label is used only to access EOF actions. */ 983 984 switch ( yy_act ) 985 { /* beginning of action switch */ 986 case 0: /* must back up */ 987 /* undo the effects of YY_DO_BEFORE_ACTION */ 988 *yy_cp = (yy_hold_char); 989 yy_cp = (yy_last_accepting_cpos); 990 yy_current_state = (yy_last_accepting_state); 991 goto yy_find_action; 992 993case 1: 994YY_RULE_SETUP 995#line 29 "lex.l" 996{ return (RUN); } 997 YY_BREAK 998case 2: 999YY_RULE_SETUP 1000#line 31 "lex.l" 1001{ return (FUNCTION); } 1002 YY_BREAK 1003case 3: 1004YY_RULE_SETUP 1005#line 32 "lex.l" 1006{ yylval.num = GXclear; 1007 return (FUNCTIONTYPE); } 1008 YY_BREAK 1009case 4: 1010YY_RULE_SETUP 1011#line 34 "lex.l" 1012{ yylval.num = GXand; 1013 return (FUNCTIONTYPE); } 1014 YY_BREAK 1015case 5: 1016YY_RULE_SETUP 1017#line 36 "lex.l" 1018{ yylval.num = GXandReverse; 1019 return (FUNCTIONTYPE); } 1020 YY_BREAK 1021case 6: 1022YY_RULE_SETUP 1023#line 38 "lex.l" 1024{ yylval.num = GXcopy; 1025 return (FUNCTIONTYPE); } 1026 YY_BREAK 1027case 7: 1028YY_RULE_SETUP 1029#line 40 "lex.l" 1030{ yylval.num = GXandInverted; 1031 return (FUNCTIONTYPE); } 1032 YY_BREAK 1033case 8: 1034YY_RULE_SETUP 1035#line 42 "lex.l" 1036{ yylval.num = GXnoop; 1037 return (FUNCTIONTYPE); } 1038 YY_BREAK 1039case 9: 1040YY_RULE_SETUP 1041#line 44 "lex.l" 1042{ yylval.num = GXxor; 1043 return (FUNCTIONTYPE); } 1044 YY_BREAK 1045case 10: 1046YY_RULE_SETUP 1047#line 46 "lex.l" 1048{ yylval.num = GXor; 1049 return (FUNCTIONTYPE); } 1050 YY_BREAK 1051case 11: 1052YY_RULE_SETUP 1053#line 48 "lex.l" 1054{ yylval.num = GXnor; 1055 return (FUNCTIONTYPE); } 1056 YY_BREAK 1057case 12: 1058YY_RULE_SETUP 1059#line 50 "lex.l" 1060{ yylval.num = GXequiv; 1061 return (FUNCTIONTYPE); } 1062 YY_BREAK 1063case 13: 1064YY_RULE_SETUP 1065#line 52 "lex.l" 1066{ yylval.num = GXinvert; 1067 return (FUNCTIONTYPE); } 1068 YY_BREAK 1069case 14: 1070YY_RULE_SETUP 1071#line 54 "lex.l" 1072{ yylval.num = GXorReverse; 1073 return (FUNCTIONTYPE); } 1074 YY_BREAK 1075case 15: 1076YY_RULE_SETUP 1077#line 56 "lex.l" 1078{ yylval.num = GXcopyInverted; 1079 return (FUNCTIONTYPE); } 1080 YY_BREAK 1081case 16: 1082YY_RULE_SETUP 1083#line 58 "lex.l" 1084{ yylval.num = GXorInverted; 1085 return (FUNCTIONTYPE); } 1086 YY_BREAK 1087case 17: 1088YY_RULE_SETUP 1089#line 60 "lex.l" 1090{ yylval.num = GXnand; 1091 return (FUNCTIONTYPE); } 1092 YY_BREAK 1093case 18: 1094YY_RULE_SETUP 1095#line 62 "lex.l" 1096{ yylval.num = GXset; 1097 return (FUNCTIONTYPE); } 1098 YY_BREAK 1099case 19: 1100YY_RULE_SETUP 1101#line 65 "lex.l" 1102{ return (TEST); } 1103 YY_BREAK 1104case 20: 1105YY_RULE_SETUP 1106#line 66 "lex.l" 1107{ yylval.num = CopyArea; 1108 return (TESTTYPE); } 1109 YY_BREAK 1110case 21: 1111YY_RULE_SETUP 1112#line 68 "lex.l" 1113{ yylval.num = CopyPlane; 1114 return (TESTTYPE); } 1115 YY_BREAK 1116case 22: 1117YY_RULE_SETUP 1118#line 70 "lex.l" 1119{ yylval.num = PolyPoint; 1120 return (TESTTYPE); } 1121 YY_BREAK 1122case 23: 1123YY_RULE_SETUP 1124#line 72 "lex.l" 1125{ yylval.num = PolyLine; 1126 return (TESTTYPE); } 1127 YY_BREAK 1128case 24: 1129YY_RULE_SETUP 1130#line 74 "lex.l" 1131{ yylval.num = PolySegment; 1132 return (TESTTYPE); } 1133 YY_BREAK 1134case 25: 1135YY_RULE_SETUP 1136#line 76 "lex.l" 1137{ yylval.num = PolyRectangle; 1138 return (TESTTYPE); } 1139 YY_BREAK 1140case 26: 1141YY_RULE_SETUP 1142#line 78 "lex.l" 1143{ yylval.num = PolyArc; 1144 return (TESTTYPE); } 1145 YY_BREAK 1146case 27: 1147YY_RULE_SETUP 1148#line 80 "lex.l" 1149{ yylval.num = FillPolygon; 1150 return (TESTTYPE); } 1151 YY_BREAK 1152case 28: 1153YY_RULE_SETUP 1154#line 82 "lex.l" 1155{ yylval.num = PolyFillRect; 1156 return (TESTTYPE); } 1157 YY_BREAK 1158case 29: 1159YY_RULE_SETUP 1160#line 84 "lex.l" 1161{ yylval.num = PolyFillArc; 1162 return (TESTTYPE); } 1163 YY_BREAK 1164case 30: 1165YY_RULE_SETUP 1166#line 86 "lex.l" 1167{ yylval.num = PutImage; 1168 return (TESTTYPE); } 1169 YY_BREAK 1170case 31: 1171YY_RULE_SETUP 1172#line 88 "lex.l" 1173{ yylval.num = GetImage; 1174 return (TESTTYPE); } 1175 YY_BREAK 1176case 32: 1177YY_RULE_SETUP 1178#line 90 "lex.l" 1179{ yylval.num = PolyText8; 1180 return (TESTTYPE); } 1181 YY_BREAK 1182case 33: 1183YY_RULE_SETUP 1184#line 92 "lex.l" 1185{ yylval.num = ImageText8; 1186 return (TESTTYPE); } 1187 YY_BREAK 1188case 34: 1189YY_RULE_SETUP 1190#line 94 "lex.l" 1191{ yylval.num = PolyText16; 1192 return (TESTTYPE); } 1193 YY_BREAK 1194case 35: 1195YY_RULE_SETUP 1196#line 96 "lex.l" 1197{ yylval.num = ImageText16; 1198 return (TESTTYPE); } 1199 YY_BREAK 1200case 36: 1201YY_RULE_SETUP 1202#line 99 "lex.l" 1203{ return (LINESTYLE); } 1204 YY_BREAK 1205case 37: 1206YY_RULE_SETUP 1207#line 100 "lex.l" 1208{ yylval.num = LineOnOffDash; 1209 return (LINESTYLETYPE); } 1210 YY_BREAK 1211case 38: 1212YY_RULE_SETUP 1213#line 102 "lex.l" 1214{ yylval.num = LineDoubleDash; 1215 return (LINESTYLETYPE); } 1216 YY_BREAK 1217case 39: 1218YY_RULE_SETUP 1219#line 105 "lex.l" 1220{ return (CAPSTYLE); } 1221 YY_BREAK 1222case 40: 1223YY_RULE_SETUP 1224#line 106 "lex.l" 1225{ yylval.num = CapNotLast; 1226 return (CAPSTYLETYPE); } 1227 YY_BREAK 1228case 41: 1229YY_RULE_SETUP 1230#line 108 "lex.l" 1231{ yylval.num = CapButt; 1232 return (CAPSTYLETYPE); } 1233 YY_BREAK 1234case 42: 1235YY_RULE_SETUP 1236#line 110 "lex.l" 1237{ yylval.num = CapProjecting; 1238 return (CAPSTYLETYPE); } 1239 YY_BREAK 1240case 43: 1241YY_RULE_SETUP 1242#line 113 "lex.l" 1243{ return (JOINSTYLE); } 1244 YY_BREAK 1245case 44: 1246YY_RULE_SETUP 1247#line 114 "lex.l" 1248{ yylval.num = JoinMiter; 1249 return (JOINSTYLETYPE); } 1250 YY_BREAK 1251case 45: 1252YY_RULE_SETUP 1253#line 116 "lex.l" 1254{ yylval.num = JoinBevel; 1255 return (JOINSTYLETYPE); } 1256 YY_BREAK 1257case 46: 1258YY_RULE_SETUP 1259#line 119 "lex.l" 1260{ return (ROUND); } 1261 YY_BREAK 1262case 47: 1263YY_RULE_SETUP 1264#line 121 "lex.l" 1265{ return (FILLSTYLE); } 1266 YY_BREAK 1267case 48: 1268YY_RULE_SETUP 1269#line 122 "lex.l" 1270{ yylval.num = FillTiled; 1271 return (FILLSTYLETYPE); } 1272 YY_BREAK 1273case 49: 1274YY_RULE_SETUP 1275#line 124 "lex.l" 1276{ yylval.num = FillStippled; 1277 return (FILLSTYLETYPE); } 1278 YY_BREAK 1279case 50: 1280YY_RULE_SETUP 1281#line 126 "lex.l" 1282{ yylval.num = FillOpaqueStippled; 1283 return (FILLSTYLETYPE); } 1284 YY_BREAK 1285case 51: 1286YY_RULE_SETUP 1287#line 129 "lex.l" 1288{ return (SOLID); } 1289 YY_BREAK 1290case 52: 1291YY_RULE_SETUP 1292#line 131 "lex.l" 1293{ return (FILLRULE); } 1294 YY_BREAK 1295case 53: 1296YY_RULE_SETUP 1297#line 132 "lex.l" 1298{ yylval.num = EvenOddRule; 1299 return (FILLRULETYPE); } 1300 YY_BREAK 1301case 54: 1302YY_RULE_SETUP 1303#line 134 "lex.l" 1304{ yylval.num = WindingRule; 1305 return (FILLRULETYPE); } 1306 YY_BREAK 1307case 55: 1308YY_RULE_SETUP 1309#line 137 "lex.l" 1310{ return (ARCMODE); } 1311 YY_BREAK 1312case 56: 1313YY_RULE_SETUP 1314#line 138 "lex.l" 1315{ yylval.num = ArcChord; 1316 return (ARCMODETYPE); } 1317 YY_BREAK 1318case 57: 1319YY_RULE_SETUP 1320#line 140 "lex.l" 1321{ yylval.num = ArcPieSlice; 1322 return (ARCMODETYPE); } 1323 YY_BREAK 1324case 58: 1325YY_RULE_SETUP 1326#line 143 "lex.l" 1327{ return (FOREGROUND); } 1328 YY_BREAK 1329case 59: 1330YY_RULE_SETUP 1331#line 144 "lex.l" 1332{ return (BACKGROUND); } 1333 YY_BREAK 1334case 60: 1335YY_RULE_SETUP 1336#line 145 "lex.l" 1337{ return (LINEWIDTH); } 1338 YY_BREAK 1339case 61: 1340YY_RULE_SETUP 1341#line 146 "lex.l" 1342{ return (PLANEMASK); } 1343 YY_BREAK 1344case 62: 1345YY_RULE_SETUP 1346#line 147 "lex.l" 1347{ return (DASHLIST); } 1348 YY_BREAK 1349case 63: 1350YY_RULE_SETUP 1351#line 148 "lex.l" 1352{ return (FONT); } 1353 YY_BREAK 1354case 64: 1355YY_RULE_SETUP 1356#line 149 "lex.l" 1357{ return (PERCENT); } 1358 YY_BREAK 1359case 65: 1360YY_RULE_SETUP 1361#line 151 "lex.l" 1362{ (void) sscanf ((char *)yytext, "%d", &yylval.num); 1363 return (NUMBER); } 1364 YY_BREAK 1365case 66: 1366/* rule 66 can match eol */ 1367YY_RULE_SETUP 1368#line 153 "lex.l" 1369{ yylval.ptr = (char *) yytext; 1370 return (STRING); } 1371 YY_BREAK 1372case 67: 1373/* rule 67 can match eol */ 1374YY_RULE_SETUP 1375#line 155 "lex.l" 1376{ ; } 1377 YY_BREAK 1378case 68: 1379YY_RULE_SETUP 1380#line 156 "lex.l" 1381{ ; } 1382 YY_BREAK 1383case 69: 1384/* rule 69 can match eol */ 1385YY_RULE_SETUP 1386#line 157 "lex.l" 1387{ return ('\n'); } 1388 YY_BREAK 1389case 70: 1390YY_RULE_SETUP 1391#line 159 "lex.l" 1392{ yylval.ptr = (char *) yytext; 1393 return (STRING); } 1394 YY_BREAK 1395case 71: 1396YY_RULE_SETUP 1397#line 162 "lex.l" 1398{ fprintf(stderr, 1399 "xgc: bad character `%s', line %d\n", 1400 yytext, yylineno); } 1401 YY_BREAK 1402case 72: 1403YY_RULE_SETUP 1404#line 166 "lex.l" 1405ECHO; 1406 YY_BREAK 1407#line 1408 "lex.c" 1408case YY_STATE_EOF(INITIAL): 1409 yyterminate(); 1410 1411 case YY_END_OF_BUFFER: 1412 { 1413 /* Amount of text matched not including the EOB char. */ 1414 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; 1415 1416 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 1417 *yy_cp = (yy_hold_char); 1418 YY_RESTORE_YY_MORE_OFFSET 1419 1420 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 1421 { 1422 /* We're scanning a new file or input source. It's 1423 * possible that this happened because the user 1424 * just pointed yyin at a new source and called 1425 * yylex(). If so, then we have to assure 1426 * consistency between YY_CURRENT_BUFFER and our 1427 * globals. Here is the right place to do so, because 1428 * this is the first action (other than possibly a 1429 * back-up) that will match for the new input source. 1430 */ 1431 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1432 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; 1433 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 1434 } 1435 1436 /* Note that here we test for yy_c_buf_p "<=" to the position 1437 * of the first EOB in the buffer, since yy_c_buf_p will 1438 * already have been incremented past the NUL character 1439 * (since all states make transitions on EOB to the 1440 * end-of-buffer state). Contrast this with the test 1441 * in input(). 1442 */ 1443 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 1444 { /* This was really a NUL. */ 1445 yy_state_type yy_next_state; 1446 1447 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; 1448 1449 yy_current_state = yy_get_previous_state( ); 1450 1451 /* Okay, we're now positioned to make the NUL 1452 * transition. We couldn't have 1453 * yy_get_previous_state() go ahead and do it 1454 * for us because it doesn't know how to deal 1455 * with the possibility of jamming (and we don't 1456 * want to build jamming into it because then it 1457 * will run more slowly). 1458 */ 1459 1460 yy_next_state = yy_try_NUL_trans( yy_current_state ); 1461 1462 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1463 1464 if ( yy_next_state ) 1465 { 1466 /* Consume the NUL. */ 1467 yy_cp = ++(yy_c_buf_p); 1468 yy_current_state = yy_next_state; 1469 goto yy_match; 1470 } 1471 1472 else 1473 { 1474 yy_cp = (yy_c_buf_p); 1475 goto yy_find_action; 1476 } 1477 } 1478 1479 else switch ( yy_get_next_buffer( ) ) 1480 { 1481 case EOB_ACT_END_OF_FILE: 1482 { 1483 (yy_did_buffer_switch_on_eof) = 0; 1484 1485 if ( yywrap( ) ) 1486 { 1487 /* Note: because we've taken care in 1488 * yy_get_next_buffer() to have set up 1489 * yytext, we can now set up 1490 * yy_c_buf_p so that if some total 1491 * hoser (like flex itself) wants to 1492 * call the scanner after we return the 1493 * YY_NULL, it'll still work - another 1494 * YY_NULL will get returned. 1495 */ 1496 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; 1497 1498 yy_act = YY_STATE_EOF(YY_START); 1499 goto do_action; 1500 } 1501 1502 else 1503 { 1504 if ( ! (yy_did_buffer_switch_on_eof) ) 1505 YY_NEW_FILE; 1506 } 1507 break; 1508 } 1509 1510 case EOB_ACT_CONTINUE_SCAN: 1511 (yy_c_buf_p) = 1512 (yytext_ptr) + yy_amount_of_matched_text; 1513 1514 yy_current_state = yy_get_previous_state( ); 1515 1516 yy_cp = (yy_c_buf_p); 1517 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1518 goto yy_match; 1519 1520 case EOB_ACT_LAST_MATCH: 1521 (yy_c_buf_p) = 1522 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; 1523 1524 yy_current_state = yy_get_previous_state( ); 1525 1526 yy_cp = (yy_c_buf_p); 1527 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1528 goto yy_find_action; 1529 } 1530 break; 1531 } 1532 1533 default: 1534 YY_FATAL_ERROR( 1535 "fatal flex scanner internal error--no action found" ); 1536 } /* end of action switch */ 1537 } /* end of scanning one token */ 1538} /* end of yylex */ 1539 1540/* yy_get_next_buffer - try to read in a new buffer 1541 * 1542 * Returns a code representing an action: 1543 * EOB_ACT_LAST_MATCH - 1544 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 1545 * EOB_ACT_END_OF_FILE - end of file 1546 */ 1547static int yy_get_next_buffer (void) 1548{ 1549 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 1550 register char *source = (yytext_ptr); 1551 register int number_to_move, i; 1552 int ret_val; 1553 1554 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) 1555 YY_FATAL_ERROR( 1556 "fatal flex scanner internal error--end of buffer missed" ); 1557 1558 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 1559 { /* Don't try to fill the buffer, so this is an EOF. */ 1560 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) 1561 { 1562 /* We matched a single character, the EOB, so 1563 * treat this as a final EOF. 1564 */ 1565 return EOB_ACT_END_OF_FILE; 1566 } 1567 1568 else 1569 { 1570 /* We matched some text prior to the EOB, first 1571 * process it. 1572 */ 1573 return EOB_ACT_LAST_MATCH; 1574 } 1575 } 1576 1577 /* Try to read more data. */ 1578 1579 /* First move last chars to start of buffer. */ 1580 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; 1581 1582 for ( i = 0; i < number_to_move; ++i ) 1583 *(dest++) = *(source++); 1584 1585 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1586 /* don't do the read, it's not guaranteed to return an EOF, 1587 * just force an EOF 1588 */ 1589 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; 1590 1591 else 1592 { 1593 int num_to_read = 1594 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 1595 1596 while ( num_to_read <= 0 ) 1597 { /* Not enough room in the buffer - grow it. */ 1598 1599 /* just a shorter name for the current buffer */ 1600 YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 1601 1602 int yy_c_buf_p_offset = 1603 (int) ((yy_c_buf_p) - b->yy_ch_buf); 1604 1605 if ( b->yy_is_our_buffer ) 1606 { 1607 int new_size = b->yy_buf_size * 2; 1608 1609 if ( new_size <= 0 ) 1610 b->yy_buf_size += b->yy_buf_size / 8; 1611 else 1612 b->yy_buf_size *= 2; 1613 1614 b->yy_ch_buf = (char *) 1615 /* Include room in for 2 EOB chars. */ 1616 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); 1617 } 1618 else 1619 /* Can't grow it, we don't own it. */ 1620 b->yy_ch_buf = 0; 1621 1622 if ( ! b->yy_ch_buf ) 1623 YY_FATAL_ERROR( 1624 "fatal error - scanner input buffer overflow" ); 1625 1626 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; 1627 1628 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - 1629 number_to_move - 1; 1630 1631 } 1632 1633 if ( num_to_read > YY_READ_BUF_SIZE ) 1634 num_to_read = YY_READ_BUF_SIZE; 1635 1636 /* Read in more data. */ 1637 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 1638 (yy_n_chars), (size_t) num_to_read ); 1639 1640 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1641 } 1642 1643 if ( (yy_n_chars) == 0 ) 1644 { 1645 if ( number_to_move == YY_MORE_ADJ ) 1646 { 1647 ret_val = EOB_ACT_END_OF_FILE; 1648 yyrestart(yyin ); 1649 } 1650 1651 else 1652 { 1653 ret_val = EOB_ACT_LAST_MATCH; 1654 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = 1655 YY_BUFFER_EOF_PENDING; 1656 } 1657 } 1658 1659 else 1660 ret_val = EOB_ACT_CONTINUE_SCAN; 1661 1662 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { 1663 /* Extend the array by 50%, plus the number we really need. */ 1664 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); 1665 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); 1666 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 1667 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); 1668 } 1669 1670 (yy_n_chars) += number_to_move; 1671 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; 1672 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; 1673 1674 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 1675 1676 return ret_val; 1677} 1678 1679/* yy_get_previous_state - get the state just before the EOB char was reached */ 1680 1681 static yy_state_type yy_get_previous_state (void) 1682{ 1683 register yy_state_type yy_current_state; 1684 register char *yy_cp; 1685 1686 yy_current_state = (yy_start); 1687 1688 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) 1689 { 1690 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 1691 if ( yy_accept[yy_current_state] ) 1692 { 1693 (yy_last_accepting_state) = yy_current_state; 1694 (yy_last_accepting_cpos) = yy_cp; 1695 } 1696 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1697 { 1698 yy_current_state = (int) yy_def[yy_current_state]; 1699 if ( yy_current_state >= 420 ) 1700 yy_c = yy_meta[(unsigned int) yy_c]; 1701 } 1702 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1703 } 1704 1705 return yy_current_state; 1706} 1707 1708/* yy_try_NUL_trans - try to make a transition on the NUL character 1709 * 1710 * synopsis 1711 * next_state = yy_try_NUL_trans( current_state ); 1712 */ 1713 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) 1714{ 1715 register int yy_is_jam; 1716 register char *yy_cp = (yy_c_buf_p); 1717 1718 register YY_CHAR yy_c = 1; 1719 if ( yy_accept[yy_current_state] ) 1720 { 1721 (yy_last_accepting_state) = yy_current_state; 1722 (yy_last_accepting_cpos) = yy_cp; 1723 } 1724 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1725 { 1726 yy_current_state = (int) yy_def[yy_current_state]; 1727 if ( yy_current_state >= 420 ) 1728 yy_c = yy_meta[(unsigned int) yy_c]; 1729 } 1730 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1731 yy_is_jam = (yy_current_state == 419); 1732 1733 return yy_is_jam ? 0 : yy_current_state; 1734} 1735 1736 static void yyunput (int c, register char * yy_bp ) 1737{ 1738 register char *yy_cp; 1739 1740 yy_cp = (yy_c_buf_p); 1741 1742 /* undo effects of setting up yytext */ 1743 *yy_cp = (yy_hold_char); 1744 1745 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 1746 { /* need to shift things up to make room */ 1747 /* +2 for EOB chars. */ 1748 register int number_to_move = (yy_n_chars) + 2; 1749 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 1750 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; 1751 register char *source = 1752 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; 1753 1754 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 1755 *--dest = *--source; 1756 1757 yy_cp += (int) (dest - source); 1758 yy_bp += (int) (dest - source); 1759 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = 1760 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; 1761 1762 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 1763 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 1764 } 1765 1766 *--yy_cp = (char) c; 1767 1768 (yytext_ptr) = yy_bp; 1769 (yy_hold_char) = *yy_cp; 1770 (yy_c_buf_p) = yy_cp; 1771} 1772 1773#ifndef YY_NO_INPUT 1774#ifdef __cplusplus 1775 static int yyinput (void) 1776#else 1777 static int input (void) 1778#endif 1779 1780{ 1781 int c; 1782 1783 *(yy_c_buf_p) = (yy_hold_char); 1784 1785 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) 1786 { 1787 /* yy_c_buf_p now points to the character we want to return. 1788 * If this occurs *before* the EOB characters, then it's a 1789 * valid NUL; if not, then we've hit the end of the buffer. 1790 */ 1791 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 1792 /* This was really a NUL. */ 1793 *(yy_c_buf_p) = '\0'; 1794 1795 else 1796 { /* need more input */ 1797 int offset = (yy_c_buf_p) - (yytext_ptr); 1798 ++(yy_c_buf_p); 1799 1800 switch ( yy_get_next_buffer( ) ) 1801 { 1802 case EOB_ACT_LAST_MATCH: 1803 /* This happens because yy_g_n_b() 1804 * sees that we've accumulated a 1805 * token and flags that we need to 1806 * try matching the token before 1807 * proceeding. But for input(), 1808 * there's no matching to consider. 1809 * So convert the EOB_ACT_LAST_MATCH 1810 * to EOB_ACT_END_OF_FILE. 1811 */ 1812 1813 /* Reset buffer status. */ 1814 yyrestart(yyin ); 1815 1816 /*FALLTHROUGH*/ 1817 1818 case EOB_ACT_END_OF_FILE: 1819 { 1820 if ( yywrap( ) ) 1821 return EOF; 1822 1823 if ( ! (yy_did_buffer_switch_on_eof) ) 1824 YY_NEW_FILE; 1825#ifdef __cplusplus 1826 return yyinput(); 1827#else 1828 return input(); 1829#endif 1830 } 1831 1832 case EOB_ACT_CONTINUE_SCAN: 1833 (yy_c_buf_p) = (yytext_ptr) + offset; 1834 break; 1835 } 1836 } 1837 } 1838 1839 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 1840 *(yy_c_buf_p) = '\0'; /* preserve yytext */ 1841 (yy_hold_char) = *++(yy_c_buf_p); 1842 1843 return c; 1844} 1845#endif /* ifndef YY_NO_INPUT */ 1846 1847/** Immediately switch to a different input stream. 1848 * @param input_file A readable stream. 1849 * 1850 * @note This function does not reset the start condition to @c INITIAL . 1851 */ 1852 void yyrestart (FILE * input_file ) 1853{ 1854 1855 if ( ! YY_CURRENT_BUFFER ){ 1856 yyensure_buffer_stack (); 1857 YY_CURRENT_BUFFER_LVALUE = 1858 yy_create_buffer(yyin,YY_BUF_SIZE ); 1859 } 1860 1861 yy_init_buffer(YY_CURRENT_BUFFER,input_file ); 1862 yy_load_buffer_state( ); 1863} 1864 1865/** Switch to a different input buffer. 1866 * @param new_buffer The new input buffer. 1867 * 1868 */ 1869 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) 1870{ 1871 1872 /* TODO. We should be able to replace this entire function body 1873 * with 1874 * yypop_buffer_state(); 1875 * yypush_buffer_state(new_buffer); 1876 */ 1877 yyensure_buffer_stack (); 1878 if ( YY_CURRENT_BUFFER == new_buffer ) 1879 return; 1880 1881 if ( YY_CURRENT_BUFFER ) 1882 { 1883 /* Flush out information for old buffer. */ 1884 *(yy_c_buf_p) = (yy_hold_char); 1885 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 1886 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 1887 } 1888 1889 YY_CURRENT_BUFFER_LVALUE = new_buffer; 1890 yy_load_buffer_state( ); 1891 1892 /* We don't actually know whether we did this switch during 1893 * EOF (yywrap()) processing, but the only time this flag 1894 * is looked at is after yywrap() is called, so it's safe 1895 * to go ahead and always set it. 1896 */ 1897 (yy_did_buffer_switch_on_eof) = 1; 1898} 1899 1900static void yy_load_buffer_state (void) 1901{ 1902 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1903 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 1904 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 1905 (yy_hold_char) = *(yy_c_buf_p); 1906} 1907 1908/** Allocate and initialize an input buffer state. 1909 * @param file A readable stream. 1910 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 1911 * 1912 * @return the allocated buffer state. 1913 */ 1914 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) 1915{ 1916 YY_BUFFER_STATE b; 1917 1918 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 1919 if ( ! b ) 1920 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1921 1922 b->yy_buf_size = size; 1923 1924 /* yy_ch_buf has to be 2 characters longer than the size given because 1925 * we need to put in 2 end-of-buffer characters. 1926 */ 1927 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); 1928 if ( ! b->yy_ch_buf ) 1929 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1930 1931 b->yy_is_our_buffer = 1; 1932 1933 yy_init_buffer(b,file ); 1934 1935 return b; 1936} 1937 1938/** Destroy the buffer. 1939 * @param b a buffer created with yy_create_buffer() 1940 * 1941 */ 1942 void yy_delete_buffer (YY_BUFFER_STATE b ) 1943{ 1944 1945 if ( ! b ) 1946 return; 1947 1948 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ 1949 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; 1950 1951 if ( b->yy_is_our_buffer ) 1952 yyfree((void *) b->yy_ch_buf ); 1953 1954 yyfree((void *) b ); 1955} 1956 1957#ifndef __cplusplus 1958extern int isatty (int ); 1959#endif /* __cplusplus */ 1960 1961/* Initializes or reinitializes a buffer. 1962 * This function is sometimes called more than once on the same buffer, 1963 * such as during a yyrestart() or at EOF. 1964 */ 1965 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) 1966 1967{ 1968 int oerrno = errno; 1969 1970 yy_flush_buffer(b ); 1971 1972 b->yy_input_file = file; 1973 b->yy_fill_buffer = 1; 1974 1975 /* If b is the current buffer, then yy_init_buffer was _probably_ 1976 * called from yyrestart() or through yy_get_next_buffer. 1977 * In that case, we don't want to reset the lineno or column. 1978 */ 1979 if (b != YY_CURRENT_BUFFER){ 1980 b->yy_bs_lineno = 1; 1981 b->yy_bs_column = 0; 1982 } 1983 1984 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1985 1986 errno = oerrno; 1987} 1988 1989/** Discard all buffered characters. On the next scan, YY_INPUT will be called. 1990 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 1991 * 1992 */ 1993 void yy_flush_buffer (YY_BUFFER_STATE b ) 1994{ 1995 if ( ! b ) 1996 return; 1997 1998 b->yy_n_chars = 0; 1999 2000 /* We always need two end-of-buffer characters. The first causes 2001 * a transition to the end-of-buffer state. The second causes 2002 * a jam in that state. 2003 */ 2004 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 2005 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 2006 2007 b->yy_buf_pos = &b->yy_ch_buf[0]; 2008 2009 b->yy_at_bol = 1; 2010 b->yy_buffer_status = YY_BUFFER_NEW; 2011 2012 if ( b == YY_CURRENT_BUFFER ) 2013 yy_load_buffer_state( ); 2014} 2015 2016/** Pushes the new state onto the stack. The new state becomes 2017 * the current state. This function will allocate the stack 2018 * if necessary. 2019 * @param new_buffer The new state. 2020 * 2021 */ 2022void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) 2023{ 2024 if (new_buffer == NULL) 2025 return; 2026 2027 yyensure_buffer_stack(); 2028 2029 /* This block is copied from yy_switch_to_buffer. */ 2030 if ( YY_CURRENT_BUFFER ) 2031 { 2032 /* Flush out information for old buffer. */ 2033 *(yy_c_buf_p) = (yy_hold_char); 2034 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 2035 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 2036 } 2037 2038 /* Only push if top exists. Otherwise, replace top. */ 2039 if (YY_CURRENT_BUFFER) 2040 (yy_buffer_stack_top)++; 2041 YY_CURRENT_BUFFER_LVALUE = new_buffer; 2042 2043 /* copied from yy_switch_to_buffer. */ 2044 yy_load_buffer_state( ); 2045 (yy_did_buffer_switch_on_eof) = 1; 2046} 2047 2048/** Removes and deletes the top of the stack, if present. 2049 * The next element becomes the new top. 2050 * 2051 */ 2052void yypop_buffer_state (void) 2053{ 2054 if (!YY_CURRENT_BUFFER) 2055 return; 2056 2057 yy_delete_buffer(YY_CURRENT_BUFFER ); 2058 YY_CURRENT_BUFFER_LVALUE = NULL; 2059 if ((yy_buffer_stack_top) > 0) 2060 --(yy_buffer_stack_top); 2061 2062 if (YY_CURRENT_BUFFER) { 2063 yy_load_buffer_state( ); 2064 (yy_did_buffer_switch_on_eof) = 1; 2065 } 2066} 2067 2068/* Allocates the stack if it does not exist. 2069 * Guarantees space for at least one push. 2070 */ 2071static void yyensure_buffer_stack (void) 2072{ 2073 int num_to_alloc; 2074 2075 if (!(yy_buffer_stack)) { 2076 2077 /* First allocation is just for 2 elements, since we don't know if this 2078 * scanner will even need a stack. We use 2 instead of 1 to avoid an 2079 * immediate realloc on the next call. 2080 */ 2081 num_to_alloc = 1; 2082 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc 2083 (num_to_alloc * sizeof(struct yy_buffer_state*) 2084 ); 2085 if ( ! (yy_buffer_stack) ) 2086 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 2087 2088 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 2089 2090 (yy_buffer_stack_max) = num_to_alloc; 2091 (yy_buffer_stack_top) = 0; 2092 return; 2093 } 2094 2095 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 2096 2097 /* Increase the buffer to prepare for a possible push. */ 2098 int grow_size = 8 /* arbitrary grow size */; 2099 2100 num_to_alloc = (yy_buffer_stack_max) + grow_size; 2101 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc 2102 ((yy_buffer_stack), 2103 num_to_alloc * sizeof(struct yy_buffer_state*) 2104 ); 2105 if ( ! (yy_buffer_stack) ) 2106 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 2107 2108 /* zero only the new slots.*/ 2109 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 2110 (yy_buffer_stack_max) = num_to_alloc; 2111 } 2112} 2113 2114/** Setup the input buffer state to scan directly from a user-specified character buffer. 2115 * @param base the character buffer 2116 * @param size the size in bytes of the character buffer 2117 * 2118 * @return the newly allocated buffer state object. 2119 */ 2120YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) 2121{ 2122 YY_BUFFER_STATE b; 2123 2124 if ( size < 2 || 2125 base[size-2] != YY_END_OF_BUFFER_CHAR || 2126 base[size-1] != YY_END_OF_BUFFER_CHAR ) 2127 /* They forgot to leave room for the EOB's. */ 2128 return 0; 2129 2130 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 2131 if ( ! b ) 2132 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 2133 2134 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ 2135 b->yy_buf_pos = b->yy_ch_buf = base; 2136 b->yy_is_our_buffer = 0; 2137 b->yy_input_file = 0; 2138 b->yy_n_chars = b->yy_buf_size; 2139 b->yy_is_interactive = 0; 2140 b->yy_at_bol = 1; 2141 b->yy_fill_buffer = 0; 2142 b->yy_buffer_status = YY_BUFFER_NEW; 2143 2144 yy_switch_to_buffer(b ); 2145 2146 return b; 2147} 2148 2149/** Setup the input buffer state to scan a string. The next call to yylex() will 2150 * scan from a @e copy of @a str. 2151 * @param yystr a NUL-terminated string to scan 2152 * 2153 * @return the newly allocated buffer state object. 2154 * @note If you want to scan bytes that may contain NUL values, then use 2155 * yy_scan_bytes() instead. 2156 */ 2157YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) 2158{ 2159 2160 return yy_scan_bytes(yystr,strlen(yystr) ); 2161} 2162 2163/** Setup the input buffer state to scan the given bytes. The next call to yylex() will 2164 * scan from a @e copy of @a bytes. 2165 * @param bytes the byte buffer to scan 2166 * @param len the number of bytes in the buffer pointed to by @a bytes. 2167 * 2168 * @return the newly allocated buffer state object. 2169 */ 2170YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) 2171{ 2172 YY_BUFFER_STATE b; 2173 char *buf; 2174 yy_size_t n; 2175 int i; 2176 2177 /* Get memory for full buffer, including space for trailing EOB's. */ 2178 n = _yybytes_len + 2; 2179 buf = (char *) yyalloc(n ); 2180 if ( ! buf ) 2181 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 2182 2183 for ( i = 0; i < _yybytes_len; ++i ) 2184 buf[i] = yybytes[i]; 2185 2186 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; 2187 2188 b = yy_scan_buffer(buf,n ); 2189 if ( ! b ) 2190 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 2191 2192 /* It's okay to grow etc. this buffer, and we should throw it 2193 * away when we're done. 2194 */ 2195 b->yy_is_our_buffer = 1; 2196 2197 return b; 2198} 2199 2200#ifndef YY_EXIT_FAILURE 2201#define YY_EXIT_FAILURE 2 2202#endif 2203 2204static void yy_fatal_error (yyconst char* msg ) 2205{ 2206 (void) fprintf( stderr, "%s\n", msg ); 2207 exit( YY_EXIT_FAILURE ); 2208} 2209 2210/* Redefine yyless() so it works in section 3 code. */ 2211 2212#undef yyless 2213#define yyless(n) \ 2214 do \ 2215 { \ 2216 /* Undo effects of setting up yytext. */ \ 2217 int yyless_macro_arg = (n); \ 2218 YY_LESS_LINENO(yyless_macro_arg);\ 2219 yytext[yyleng] = (yy_hold_char); \ 2220 (yy_c_buf_p) = yytext + yyless_macro_arg; \ 2221 (yy_hold_char) = *(yy_c_buf_p); \ 2222 *(yy_c_buf_p) = '\0'; \ 2223 yyleng = yyless_macro_arg; \ 2224 } \ 2225 while ( 0 ) 2226 2227/* Accessor methods (get/set functions) to struct members. */ 2228 2229/** Get the current line number. 2230 * 2231 */ 2232int yyget_lineno (void) 2233{ 2234 2235 return yylineno; 2236} 2237 2238/** Get the input stream. 2239 * 2240 */ 2241FILE *yyget_in (void) 2242{ 2243 return yyin; 2244} 2245 2246/** Get the output stream. 2247 * 2248 */ 2249FILE *yyget_out (void) 2250{ 2251 return yyout; 2252} 2253 2254/** Get the length of the current token. 2255 * 2256 */ 2257int yyget_leng (void) 2258{ 2259 return yyleng; 2260} 2261 2262/** Get the current token. 2263 * 2264 */ 2265 2266char *yyget_text (void) 2267{ 2268 return yytext; 2269} 2270 2271/** Set the current line number. 2272 * @param line_number 2273 * 2274 */ 2275void yyset_lineno (int line_number ) 2276{ 2277 2278 yylineno = line_number; 2279} 2280 2281/** Set the input stream. This does not discard the current 2282 * input buffer. 2283 * @param in_str A readable stream. 2284 * 2285 * @see yy_switch_to_buffer 2286 */ 2287void yyset_in (FILE * in_str ) 2288{ 2289 yyin = in_str ; 2290} 2291 2292void yyset_out (FILE * out_str ) 2293{ 2294 yyout = out_str ; 2295} 2296 2297int yyget_debug (void) 2298{ 2299 return yy_flex_debug; 2300} 2301 2302void yyset_debug (int bdebug ) 2303{ 2304 yy_flex_debug = bdebug ; 2305} 2306 2307static int yy_init_globals (void) 2308{ 2309 /* Initialization is the same as for the non-reentrant scanner. 2310 * This function is called from yylex_destroy(), so don't allocate here. 2311 */ 2312 2313 (yy_buffer_stack) = 0; 2314 (yy_buffer_stack_top) = 0; 2315 (yy_buffer_stack_max) = 0; 2316 (yy_c_buf_p) = (char *) 0; 2317 (yy_init) = 0; 2318 (yy_start) = 0; 2319 2320/* Defined in main.c */ 2321#ifdef YY_STDINIT 2322 yyin = stdin; 2323 yyout = stdout; 2324#else 2325 yyin = (FILE *) 0; 2326 yyout = (FILE *) 0; 2327#endif 2328 2329 /* For future reference: Set errno on error, since we are called by 2330 * yylex_init() 2331 */ 2332 return 0; 2333} 2334 2335/* yylex_destroy is for both reentrant and non-reentrant scanners. */ 2336int yylex_destroy (void) 2337{ 2338 2339 /* Pop the buffer stack, destroying each element. */ 2340 while(YY_CURRENT_BUFFER){ 2341 yy_delete_buffer(YY_CURRENT_BUFFER ); 2342 YY_CURRENT_BUFFER_LVALUE = NULL; 2343 yypop_buffer_state(); 2344 } 2345 2346 /* Destroy the stack itself. */ 2347 yyfree((yy_buffer_stack) ); 2348 (yy_buffer_stack) = NULL; 2349 2350 /* Reset the globals. This is important in a non-reentrant scanner so the next time 2351 * yylex() is called, initialization will occur. */ 2352 yy_init_globals( ); 2353 2354 return 0; 2355} 2356 2357/* 2358 * Internal utility routines. 2359 */ 2360 2361#ifndef yytext_ptr 2362static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 2363{ 2364 register int i; 2365 for ( i = 0; i < n; ++i ) 2366 s1[i] = s2[i]; 2367} 2368#endif 2369 2370#ifdef YY_NEED_STRLEN 2371static int yy_flex_strlen (yyconst char * s ) 2372{ 2373 register int n; 2374 for ( n = 0; s[n]; ++n ) 2375 ; 2376 2377 return n; 2378} 2379#endif 2380 2381void *yyalloc (yy_size_t size ) 2382{ 2383 return (void *) malloc( size ); 2384} 2385 2386void *yyrealloc (void * ptr, yy_size_t size ) 2387{ 2388 /* The cast to (char *) in the following accommodates both 2389 * implementations that use char* generic pointers, and those 2390 * that use void* generic pointers. It works with the latter 2391 * because both ANSI C and C++ allow castless assignment from 2392 * any pointer type to void*, and deal with argument conversions 2393 * as though doing an assignment. 2394 */ 2395 return (void *) realloc( (char *) ptr, size ); 2396} 2397 2398void yyfree (void * ptr ) 2399{ 2400 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ 2401} 2402 2403#define YYTABLES_NAME "yytables" 2404 2405#line 166 "lex.l" 2406 2407 2408 2409#ifndef yywrap 2410int yywrap(void) { return (1); } 2411#endif 2412 2413