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