4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
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
16 /* First, we deal with platform-specific or compiler-specific issues. */
18 /* begin standard C headers. */
24 /* end standard C headers. */
26 /* flex integer type definitions */
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t;
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
58 /* Limits of integral types. */
60 #define INT8_MIN (-128)
63 #define INT16_MIN (-32767-1)
66 #define INT32_MIN (-2147483647-1)
69 #define INT8_MAX (127)
72 #define INT16_MAX (32767)
75 #define INT32_MAX (2147483647)
78 #define UINT8_MAX (255U)
81 #define UINT16_MAX (65535U)
84 #define UINT32_MAX (4294967295U)
87 #endif /* ! FLEXINT_H */
91 /* The "const" storage-class-modifier is valid. */
94 #else /* ! __cplusplus */
96 /* C99 requires __STDC__ to be defined as 1. */
97 #if defined (__STDC__)
101 #endif /* defined (__STDC__) */
102 #endif /* ! __cplusplus */
105 #define yyconst const
110 /* Returned upon end-of-file. */
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
118 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
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.
124 #define BEGIN (yy_start) = 1 + 2 *
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
130 #define YY_START (((yy_start) - 1) / 2)
131 #define YYSTATE YY_START
133 /* Action number for EOF rule of a given start state. */
134 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
136 /* Special action meaning "start processing a new file". */
137 #define YY_NEW_FILE yyrestart(yyin )
139 #define YY_END_OF_BUFFER_CHAR 0
141 /* Size of default input buffer. */
143 #define YY_BUF_SIZE 16384
146 /* The state buf must be large enough to hold one state per character in the main buffer.
148 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
150 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
151 #define YY_TYPEDEF_YY_BUFFER_STATE
152 typedef struct yy_buffer_state *YY_BUFFER_STATE;
157 extern FILE *yyin, *yyout;
159 #define EOB_ACT_CONTINUE_SCAN 0
160 #define EOB_ACT_END_OF_FILE 1
161 #define EOB_ACT_LAST_MATCH 2
163 #define YY_LESS_LINENO(n)
165 /* Return all but the first "n" matched characters back to the input stream. */
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 */ \
179 #define unput(c) yyunput( c, (yytext_ptr) )
181 #ifndef YY_TYPEDEF_YY_SIZE_T
182 #define YY_TYPEDEF_YY_SIZE_T
183 typedef size_t yy_size_t;
186 #ifndef YY_STRUCT_YY_BUFFER_STATE
187 #define YY_STRUCT_YY_BUFFER_STATE
188 struct yy_buffer_state
192 char *yy_ch_buf; /* input buffer */
193 char *yy_buf_pos; /* current position in input buffer */
195 /* Size of input buffer in bytes, not including room for EOB
198 yy_size_t yy_buf_size;
200 /* Number of characters read into yy_ch_buf, not including EOB
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
209 int yy_is_our_buffer;
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
216 int yy_is_interactive;
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
224 int yy_bs_lineno; /**< The line count. */
225 int yy_bs_column; /**< The column count. */
227 /* Whether to try to fill the input buffer when we reach the
232 int yy_buffer_status;
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.
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.
246 #define YY_BUFFER_EOF_PENDING 2
249 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
251 /* Stack of input buffers. */
252 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
253 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
254 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
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
260 * Returns the top of the stack, or NULL.
262 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
263 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
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.
269 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
271 /* yy_hold_char holds the character lost when yytext is formed. */
272 static char yy_hold_char;
273 static int yy_n_chars; /* number of characters read into yy_ch_buf */
276 /* Points to current character in buffer. */
277 static char *yy_c_buf_p = (char *) 0;
278 static int yy_init = 0; /* whether we need to initialize */
279 static int yy_start = 0; /* start state number */
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 ...
284 static int yy_did_buffer_switch_on_eof;
286 void yyrestart (FILE *input_file );
287 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
288 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
289 void yy_delete_buffer (YY_BUFFER_STATE b );
290 void yy_flush_buffer (YY_BUFFER_STATE b );
291 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
292 void yypop_buffer_state (void );
294 static void yyensure_buffer_stack (void );
295 static void yy_load_buffer_state (void );
296 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
298 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
300 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
301 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
302 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
304 void *yyalloc (yy_size_t );
305 void *yyrealloc (void *,yy_size_t );
306 void yyfree (void * );
308 #define yy_new_buffer yy_create_buffer
310 #define yy_set_interactive(is_interactive) \
312 if ( ! YY_CURRENT_BUFFER ){ \
313 yyensure_buffer_stack (); \
314 YY_CURRENT_BUFFER_LVALUE = \
315 yy_create_buffer(yyin,YY_BUF_SIZE ); \
317 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
320 #define yy_set_bol(at_bol) \
322 if ( ! YY_CURRENT_BUFFER ){\
323 yyensure_buffer_stack (); \
324 YY_CURRENT_BUFFER_LVALUE = \
325 yy_create_buffer(yyin,YY_BUF_SIZE ); \
327 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
330 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
332 /* Begin user sect3 */
334 typedef unsigned char YY_CHAR;
336 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
338 typedef int yy_state_type;
345 #define yytext_ptr yytext
347 static yy_state_type yy_get_previous_state (void );
348 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
349 static int yy_get_next_buffer (void );
350 static void yy_fatal_error (yyconst char msg[] );
352 /* Done after the current pattern has been matched and before the
353 * corresponding action - sets up yytext.
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; \
360 (yy_c_buf_p) = yy_cp;
362 #define YY_NUM_RULES 43
363 #define YY_END_OF_BUFFER 44
364 /* This struct is not used in this scanner,
365 but its presence is necessary. */
368 flex_int32_t yy_verify;
371 static yyconst flex_int16_t yy_acclist[643] =
373 44, 42, 43, 42, 43, 42, 43, 41, 42, 43,
374 38, 42, 43, 39, 42, 43, 26, 42, 43, 42,
375 43, 41, 42, 43, 41, 42, 43,16411, 41, 42,
376 43,16411, 42, 43, 41, 42, 43, 41, 42, 43,
377 41, 42, 43, 41, 42, 43, 41, 42, 43, 41,
378 42, 43, 41, 42, 43, 41, 42, 43, 41, 42,
379 43, 41, 42, 43, 41, 42, 43, 42, 43, 41,
380 42, 43, 41, 42, 43, 41, 42, 43, 41, 42,
381 43, 41, 42, 43, 41, 42, 43, 41, 42, 43,
382 41, 42, 43, 41, 42, 43, 41, 42, 43, 41,
384 42, 43, 41, 42, 43, 41, 42, 43, 41, 42,
385 43, 41, 42, 43, 41, 42, 43, 41, 42, 43,
386 41, 42, 43, 42, 43, 42, 43, 41, 42, 43,
387 41, 42, 43, 41, 42, 43,16411, 41, 42, 43,
388 16411, 42, 43, 41, 42, 43, 41, 42, 43, 41,
389 42, 43, 41, 42, 43, 41, 42, 43, 41, 42,
390 43, 41, 42, 43, 41, 42, 43, 41, 42, 43,
391 41, 42, 43, 41, 42, 43, 41, 42, 43, 41,
392 42, 43, 41, 42, 43, 41, 42, 43, 41, 42,
393 43, 41, 42, 43, 41, 42, 43, 41, 42, 43,
395 41, 42, 43, 41, 42, 43, 41, 42, 43, 41,
396 42, 43, 41, 42, 43, 41, 42, 43, 41, 42,
397 43, 41, 42, 43, 41, 42, 43, 41, 42, 43,
398 42, 43, 34, 41, 18, 41, 10, 41, 8219, 41,
399 41,16411, 8219, 41, 36, 41, 41, 41, 41, 41,
400 41, 41, 41, 41, 41, 41, 10, 41, 41, 41,
401 41, 37, 41, 4, 41, 41, 5, 41, 41, 41,
402 41, 41, 41, 10, 41, 41, 41, 35, 41, 41,
403 10, 41, 41, 41,16411, 8219, 41, 41, 41, 41,
404 41, 41, 41, 41, 41, 41, 41, 41, 10, 41,
406 41, 41, 41, 41, 4, 41, 41, 5, 41, 41,
407 41, 41, 41, 41, 10, 41, 41, 41, 16, 10,
408 41, 24, 41, 24, 9, 41, 23, 41, 23, 25,
409 41, 41, 41, 41, 41, 7, 41, 41, 41, 41,
410 41, 41, 10, 41, 41, 41, 41, 5, 41, 4,
411 41, 4, 4, 41, 4, 41, 4, 41, 5, 6,
412 41, 5, 5, 41, 41, 41, 41, 10, 41, 41,
413 40, 10, 41, 24, 41, 9, 41, 23, 41, 36,
414 41, 41, 41, 41, 41, 7, 41, 41, 41, 41,
415 41, 41, 10, 41, 41, 41, 41, 5, 41, 41,
417 4, 41, 4, 41, 4, 41, 6, 41, 5, 41,
418 41, 41, 41, 10, 41, 41, 26, 26, 7, 41,
419 11, 7, 41, 3, 41, 8, 41, 7, 7, 41,
420 7, 7, 41, 7, 41, 41, 41, 41, 20, 41,
421 41, 17, 41, 41, 41, 41, 41, 37, 4, 41,
422 2, 41, 6, 5, 6, 6, 6, 41, 41, 5,
423 5, 41, 41, 26, 40, 41, 7, 41, 3, 41,
424 8, 41, 41, 7, 41, 7, 41, 41, 41, 41,
425 20, 41, 41, 17, 41, 41, 41, 41, 41, 41,
426 2, 41, 6, 41, 41, 5, 41, 41, 8, 7,
428 7, 3, 8, 8, 8, 41, 1, 41, 21, 41,
429 41, 20, 41, 41, 41, 41, 41, 41, 31, 37,
430 2, 2, 2, 2, 41, 6, 6, 41, 40, 8,
431 41, 1, 41, 41, 41, 20, 41, 41, 41, 41,
432 41, 41, 2, 41, 6, 41, 28, 8, 1, 24,
433 24, 23, 23, 25, 25, 1, 1, 1, 41, 22,
434 21, 41, 41, 41, 12, 41, 41, 29, 37, 31,
435 2, 28, 35, 40, 40, 1, 41, 41, 41, 41,
436 12, 41, 41, 19, 1, 25, 22, 20, 41, 41,
437 41, 12, 41, 41, 41, 41, 41, 12, 41, 41,
439 13, 41, 41, 41, 41, 13, 41, 41, 15, 41,
440 41, 41, 15, 41, 41, 41, 40, 41, 41, 41,
441 41, 40, 40, 41, 41, 32, 41, 40, 40, 32,
442 41, 14, 32, 33, 33, 36, 40, 40, 32, 40,
446 static yyconst flex_int16_t yy_accept[695] =
448 1, 1, 1, 2, 4, 6, 8, 11, 14, 17,
449 20, 22, 25, 29, 33, 35, 38, 41, 44, 47,
450 50, 53, 56, 59, 62, 65, 68, 70, 73, 76,
451 79, 82, 85, 88, 91, 94, 97, 100, 103, 106,
452 109, 112, 115, 118, 121, 124, 126, 128, 131, 134,
453 138, 142, 144, 147, 150, 153, 156, 159, 162, 165,
454 168, 171, 174, 177, 180, 183, 186, 189, 192, 195,
455 198, 201, 204, 207, 210, 213, 216, 219, 222, 225,
456 228, 231, 233, 233, 234, 235, 235, 235, 236, 236,
457 236, 236, 237, 237, 239, 239, 239, 239, 240, 241,
459 241, 241, 243, 243, 245, 245, 246, 246, 247, 247,
460 248, 248, 249, 249, 250, 251, 252, 253, 254, 255,
461 256, 257, 259, 260, 261, 262, 262, 262, 262, 262,
462 263, 264, 266, 266, 267, 269, 270, 271, 272, 273,
463 274, 276, 277, 278, 278, 278, 279, 279, 280, 280,
464 281, 283, 283, 284, 286, 286, 288, 288, 289, 290,
465 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
466 301, 302, 303, 304, 305, 307, 307, 308, 310, 311,
467 312, 313, 314, 315, 317, 318, 319, 319, 319, 319,
468 319, 319, 320, 320, 320, 320, 320, 320, 322, 324,
470 325, 327, 327, 327, 327, 329, 330, 331, 331, 332,
471 332, 333, 333, 334, 335, 335, 336, 338, 338, 338,
472 338, 338, 338, 338, 338, 339, 340, 341, 342, 343,
473 345, 346, 347, 348, 348, 348, 348, 348, 350, 350,
474 351, 352, 352, 353, 355, 357, 359, 360, 360, 362,
475 363, 365, 366, 367, 368, 370, 371, 371, 371, 371,
476 371, 372, 374, 376, 378, 380, 380, 381, 381, 382,
477 383, 383, 384, 385, 386, 388, 388, 389, 390, 391,
478 392, 393, 395, 396, 397, 398, 400, 401, 401, 403,
479 405, 407, 409, 411, 412, 413, 414, 416, 417, 417,
481 417, 417, 417, 418, 418, 419, 419, 420, 420, 420,
482 420, 421, 421, 421, 421, 421, 421, 421, 421, 422,
483 424, 424, 424, 426, 428, 429, 429, 430, 431, 431,
484 431, 432, 434, 436, 437, 437, 437, 437, 437, 437,
485 437, 438, 439, 441, 441, 442, 444, 445, 446, 447,
486 448, 448, 448, 448, 448, 449, 450, 451, 451, 453,
487 454, 455, 455, 455, 456, 457, 459, 460, 461, 461,
488 463, 464, 464, 465, 465, 465, 465, 465, 466, 466,
489 467, 467, 467, 469, 471, 473, 474, 474, 476, 478,
490 479, 480, 481, 483, 484, 486, 487, 488, 489, 490,
492 491, 493, 495, 496, 498, 499, 499, 499, 499, 500,
493 501, 502, 502, 502, 502, 502, 502, 502, 502, 502,
494 502, 503, 503, 504, 504, 505, 507, 509, 509, 509,
495 509, 509, 509, 510, 511, 512, 512, 514, 514, 515,
496 516, 517, 518, 519, 519, 519, 521, 521, 521, 522,
497 522, 523, 523, 524, 526, 527, 527, 527, 529, 529,
498 529, 529, 529, 529, 529, 529, 530, 530, 530, 532,
499 534, 535, 536, 538, 539, 540, 541, 542, 543, 545,
500 547, 547, 547, 548, 548, 549, 550, 550, 551, 551,
501 552, 552, 553, 553, 554, 554, 555, 555, 556, 556,
503 556, 556, 557, 557, 558, 560, 560, 560, 561, 561,
504 561, 562, 563, 563, 563, 563, 563, 563, 564, 565,
505 567, 568, 570, 570, 571, 572, 572, 572, 574, 574,
506 574, 575, 576, 576, 576, 578, 579, 580, 581, 583,
507 584, 584, 585, 585, 585, 586, 586, 587, 587, 587,
508 588, 588, 588, 589, 589, 589, 589, 589, 590, 591,
509 592, 594, 595, 595, 595, 595, 595, 595, 596, 597,
510 598, 600, 601, 601, 601, 601, 601, 601, 601, 602,
511 602, 602, 602, 602, 603, 604, 604, 604, 604, 604,
512 605, 606, 606, 606, 606, 606, 607, 607, 607, 607,
514 608, 609, 611, 611, 611, 611, 611, 612, 612, 613,
515 615, 615, 615, 615, 615, 616, 617, 617, 617, 617,
516 617, 618, 619, 620, 620, 620, 620, 620, 620, 621,
517 622, 622, 622, 622, 622, 623, 624, 625, 626, 626,
518 626, 626, 626, 626, 628, 628, 628, 628, 628, 629,
519 630, 632, 632, 632, 633, 633, 634, 634, 635, 635,
520 635, 637, 637, 638, 639, 639, 639, 639, 639, 641,
521 641, 641, 641, 641, 641, 641, 641, 641, 641, 641,
522 641, 641, 641, 641, 641, 641, 641, 641, 641, 641,
527 static yyconst flex_int32_t yy_ec[256] =
529 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
530 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
531 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
532 1, 4, 1, 5, 6, 7, 8, 1, 9, 10,
533 11, 12, 13, 1, 14, 15, 16, 17, 18, 19,
534 20, 20, 20, 20, 20, 20, 20, 21, 22, 1,
535 23, 1, 1, 24, 25, 26, 27, 28, 29, 30,
536 31, 32, 33, 33, 33, 34, 35, 36, 37, 38,
537 38, 39, 40, 38, 41, 38, 42, 43, 38, 38,
538 44, 1, 45, 1, 46, 1, 47, 48, 49, 50,
540 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
541 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
542 71, 68, 72, 1, 73, 1, 1, 1, 1, 1,
543 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
544 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
545 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
546 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
547 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
548 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
549 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
551 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
552 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
553 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
554 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
555 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
559 static yyconst flex_int32_t yy_meta[74] =
561 1, 2, 3, 2, 1, 1, 1, 1, 4, 5,
562 1, 1, 6, 7, 8, 9, 10, 10, 10, 10,
563 11, 1, 5, 1, 12, 12, 12, 12, 12, 12,
564 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
565 12, 12, 13, 1, 1, 1, 14, 14, 14, 14,
566 15, 14, 14, 14, 14, 14, 14, 14, 16, 17,
567 17, 17, 17, 17, 16, 16, 16, 16, 16, 18,
571 static yyconst flex_int16_t yy_base[756] =
573 0, 73, 3125, 3806, 122, 131, 0, 135, 3806, 3104,
574 143, 154, 174, 244, 3087, 304, 155, 2960, 2945, 124,
575 162, 144, 182, 186, 203, 212, 374, 434, 168, 161,
576 223, 204, 228, 241, 237, 180, 249, 279, 282, 295,
577 161, 379, 174, 326, 390, 326, 3004, 203, 396, 503,
578 573, 162, 636, 210, 2953, 2942, 242, 389, 314, 408,
579 350, 412, 439, 693, 411, 388, 415, 420, 447, 478,
580 318, 454, 480, 486, 376, 536, 537, 542, 586, 543,
581 592, 600, 2952, 456, 0, 604, 228, 3806, 2990, 750,
582 564, 232, 2984, 2969, 2955, 537, 660, 3806, 2955, 624,
584 422, 0, 2953, 0, 2966, 3806, 0, 774, 0, 824,
585 0, 882, 925, 2853, 2843, 2846, 2851, 2824, 616, 2815,
586 2842, 2841, 2811, 2828, 2816, 2825, 994, 253, 1067, 3806,
587 1094, 1144, 0, 1169, 1218, 648, 652, 678, 2803, 2807,
588 2806, 2801, 2810, 2791, 683, 279, 2859, 395, 2858, 699,
589 494, 345, 591, 1268, 282, 440, 493, 1331, 1381, 2857,
590 1439, 2813, 2808, 706, 538, 544, 704, 2792, 2820, 638,
591 2791, 710, 2800, 1463, 1513, 2850, 1538, 1588, 756, 763,
592 895, 769, 888, 889, 640, 896, 407, 2788, 715, 2840,
593 2777, 3806, 716, 1010, 2845, 2844, 2843, 2829, 2838, 2837,
595 0, 2836, 2835, 2834, 2833, 2832, 775, 794, 798, 901,
596 1635, 1669, 924, 951, 961, 1016, 1719, 942, 2780, 2773,
597 2772, 2785, 2779, 544, 973, 1015, 2760, 602, 2777, 2813,
598 2771, 2767, 1037, 303, 1056, 162, 1790, 1854, 0, 3806,
599 1859, 0, 2810, 2808, 2807, 1075, 1087, 1104, 1908, 2807,
600 2803, 349, 2754, 2749, 2783, 2730, 1115, 743, 2791, 732,
601 2791, 825, 902, 717, 953, 627, 2789, 958, 1099, 1951,
602 2788, 1281, 1286, 1283, 2001, 2787, 1311, 1344, 945, 1270,
603 1064, 1116, 1081, 967, 1337, 2064, 2107, 2786, 1221, 2778,
604 1452, 2156, 1254, 1794, 1453, 1455, 1259, 1255, 666, 2737,
606 1305, 2776, 2775, 2712, 2711, 1324, 2198, 2765, 2764, 2763,
607 2762, 605, 2761, 735, 2760, 715, 1803, 791, 3806, 2259,
608 1802, 1330, 0, 2293, 1381, 1809, 3806, 2290, 2766, 1806,
609 2765, 2763, 2759, 1349, 2704, 2704, 2702, 2700, 2700, 2704,
610 2706, 2705, 598, 820, 816, 0, 2724, 2707, 2708, 2706,
611 536, 774, 673, 1423, 2751, 2744, 1353, 1357, 1834, 935,
612 2742, 911, 1808, 3806, 2742, 2736, 957, 3806, 2684, 0,
613 2684, 1657, 2740, 1463, 1825, 2689, 2669, 2722, 920, 1787,
614 171, 904, 2339, 1042, 2381, 2378, 2720, 1817, 2712, 1849,
615 1821, 1911, 1952, 1943, 1075, 1257, 1078, 1457, 1852, 2100,
617 2428, 1944, 2067, 1147, 2113, 854, 2671, 747, 2114, 2710,
618 2709, 1481, 2708, 2645, 2706, 2643, 2704, 2641, 2695, 1521,
619 3806, 2122, 3806, 2702, 2696, 2693, 2442, 2652, 2645, 1923,
620 2645, 2639, 2628, 2688, 978, 2103, 2687, 1208, 2660, 2637,
621 2626, 2622, 2676, 1007, 1555, 3806, 2674, 1668, 2123, 2190,
622 3806, 2247, 2248, 2663, 2662, 1047, 2610, 0, 2642, 1008,
623 2630, 1690, 2630, 2586, 2577, 1503, 1675, 1033, 2132, 2476,
624 2201, 2511, 2258, 2102, 1945, 2257, 2159, 2379, 2342, 1722,
625 914, 1346, 3806, 1690, 2626, 2376, 2607, 2605, 2542, 2541,
626 2599, 2595, 2527, 2522, 2573, 2564, 2501, 2496, 2549, 2543,
628 2440, 3806, 2547, 2541, 2537, 2482, 2491, 2150, 1063, 2488,
629 3806, 2490, 2520, 2478, 2426, 2462, 2439, 2447, 2401, 1294,
630 2417, 3806, 1922, 3806, 2451, 2388, 1973, 788, 2351, 2346,
631 2384, 1630, 1452, 1480, 2384, 1948, 2131, 2105, 2479, 2512,
632 1086, 3806, 2334, 2293, 2350, 2356, 2355, 2298, 2302, 3806,
633 2296, 2339, 2304, 2252, 2304, 2243, 2209, 2204, 2177, 2170,
634 0, 2143, 2476, 2200, 2111, 833, 1123, 2513, 2375, 2514,
635 1949, 2515, 1219, 2084, 2106, 1221, 2052, 2044, 1809, 2032,
636 1287, 2037, 1982, 2581, 1943, 1910, 1875, 1187, 1709, 2654,
637 2256, 1451, 1861, 1847, 1760, 3806, 1699, 1265, 1710, 2727,
639 1808, 0, 1650, 1620, 1868, 1804, 2800, 2494, 1875, 2004,
640 1826, 1630, 1618, 2514, 1577, 1542, 1541, 1425, 526, 1926,
641 2523, 1440, 1395, 1890, 1326, 1201, 2408, 2119, 1205, 1178,
642 1115, 1156, 1477, 1600, 2524, 2525, 1100, 1014, 1914, 2208,
643 971, 2055, 2507, 0, 979, 895, 905, 2302, 2576, 2577,
644 0, 2002, 790, 3806, 667, 1992, 679, 3806, 542, 510,
645 3806, 1916, 2537, 2568, 2203, 281, 250, 2144, 2570, 2384,
646 146, 1478, 1607, 2075, 2076, 2549, 2595, 2610, 2614, 2617,
647 2629, 2630, 2632, 2635, 2636, 2637, 2638, 2668, 2681, 2170,
648 1711, 2442, 3806, 2870, 2883, 2895, 2913, 2931, 2949, 2964,
650 2981, 2998, 1822, 1887, 2066, 3015, 3033, 2161, 3051, 3069,
651 3087, 3105, 3117, 3135, 3153, 3171, 3189, 3196, 2266, 3210,
652 3225, 3243, 3261, 3279, 3297, 3315, 3327, 3341, 3354, 3372,
653 3390, 3408, 3423, 3437, 3452, 3470, 3485, 3499, 3512, 3530,
654 3548, 3566, 3584, 3602, 3616, 3634, 3648, 3661, 3679, 3697,
655 3715, 3733, 3751, 3769, 3787
658 static yyconst flex_int16_t yy_def[756] =
660 693, 693, 693, 693, 693, 693, 694, 693, 693, 693,
661 695, 694, 696, 696, 697, 694, 16, 16, 16, 16,
662 16, 16, 16, 16, 16, 16, 698, 16, 28, 28,
663 28, 28, 28, 28, 28, 28, 28, 28, 28, 694,
664 694, 694, 694, 694, 694, 699, 693, 700, 700, 701,
665 701, 697, 700, 53, 53, 53, 53, 53, 53, 53,
666 53, 53, 53, 53, 64, 64, 64, 64, 64, 64,
667 64, 64, 64, 64, 64, 700, 700, 700, 700, 700,
668 700, 699, 693, 693, 694, 693, 693, 693, 693, 693,
669 693, 694, 693, 694, 693, 702, 702, 693, 694, 702,
671 693, 14, 693, 694, 697, 693, 703, 694, 704, 693,
672 705, 694, 693, 112, 112, 694, 694, 694, 112, 112,
673 108, 694, 112, 694, 112, 706, 698, 706, 707, 693,
674 694, 693, 708, 694, 694, 694, 694, 694, 694, 694,
675 694, 694, 694, 699, 699, 693, 709, 700, 693, 700,
676 700, 693, 700, 701, 693, 700, 710, 700, 693, 705,
677 158, 161, 161, 700, 700, 700, 161, 161, 158, 700,
678 161, 700, 161, 158, 693, 708, 158, 693, 700, 700,
679 700, 700, 700, 700, 700, 700, 699, 693, 693, 711,
680 712, 693, 713, 713, 693, 693, 693, 694, 694, 693,
682 694, 693, 693, 693, 694, 693, 693, 693, 694, 693,
683 694, 693, 694, 694, 693, 211, 693, 713, 693, 693,
684 693, 693, 693, 693, 694, 694, 694, 694, 694, 694,
685 694, 694, 694, 714, 715, 716, 717, 694, 718, 693,
686 694, 719, 718, 694, 241, 694, 720, 720, 694, 248,
687 694, 694, 694, 694, 694, 694, 699, 693, 721, 693,
688 722, 700, 700, 700, 700, 723, 721, 724, 700, 700,
689 212, 700, 700, 270, 693, 218, 700, 700, 700, 700,
690 700, 700, 700, 700, 700, 700, 700, 719, 700, 287,
691 700, 286, 700, 700, 700, 700, 700, 700, 699, 693,
693 693, 725, 725, 726, 726, 693, 693, 693, 693, 693,
694 694, 693, 693, 693, 693, 693, 693, 693, 693, 694,
695 727, 693, 694, 694, 728, 728, 693, 694, 326, 727,
696 326, 694, 328, 694, 693, 693, 693, 693, 693, 693,
697 694, 694, 694, 693, 694, 694, 694, 694, 694, 694,
698 729, 729, 730, 731, 732, 693, 694, 693, 733, 734,
699 693, 693, 734, 693, 363, 694, 694, 693, 693, 694,
700 694, 699, 693, 693, 693, 693, 693, 735, 693, 700,
701 736, 736, 286, 700, 383, 287, 330, 700, 386, 700,
702 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
704 737, 700, 700, 700, 700, 699, 693, 693, 738, 693,
705 330, 693, 739, 740, 741, 742, 743, 744, 693, 693,
706 693, 738, 693, 422, 422, 694, 694, 693, 693, 693,
707 693, 693, 693, 694, 694, 693, 694, 693, 694, 694,
708 694, 694, 694, 729, 731, 693, 732, 693, 745, 745,
709 693, 745, 745, 694, 693, 693, 693, 694, 693, 699,
710 693, 693, 693, 693, 693, 746, 736, 736, 700, 383,
711 700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
712 699, 693, 693, 693, 693, 747, 739, 739, 740, 740,
713 741, 741, 742, 742, 743, 743, 744, 744, 693, 693,
715 747, 693, 501, 501, 694, 693, 693, 693, 693, 693,
716 693, 694, 748, 693, 693, 693, 693, 694, 694, 694,
717 694, 693, 693, 693, 693, 693, 699, 693, 693, 693,
718 746, 746, 736, 736, 700, 700, 700, 700, 700, 700,
719 699, 693, 693, 693, 693, 693, 693, 693, 693, 693,
720 693, 748, 748, 693, 693, 693, 693, 694, 694, 694,
721 694, 694, 699, 693, 693, 736, 736, 700, 700, 700,
722 700, 700, 699, 693, 693, 693, 693, 693, 693, 693,
723 693, 693, 693, 749, 694, 693, 693, 736, 736, 750,
724 700, 699, 693, 693, 693, 693, 693, 751, 751, 749,
726 600, 694, 693, 693, 736, 736, 750, 751, 607, 700,
727 699, 693, 693, 751, 600, 600, 693, 693, 736, 736,
728 752, 607, 607, 699, 693, 693, 751, 751, 600, 600,
729 693, 693, 736, 736, 752, 752, 607, 607, 699, 693,
730 693, 751, 751, 600, 753, 693, 754, 736, 752, 752,
731 607, 699, 693, 693, 693, 751, 753, 693, 693, 754,
732 693, 736, 752, 752, 699, 693, 693, 736, 752, 699,
733 693, 736, 699, 755, 755, 755, 755, 755, 755, 755,
734 755, 755, 755, 755, 755, 755, 755, 755, 755, 755,
735 693, 693, 0, 693, 693, 693, 693, 693, 693, 693,
737 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
738 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
739 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
740 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
741 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
742 693, 693, 693, 693, 693
745 static yyconst flex_int16_t yy_nxt[3880] =
747 4, 4, 4, 5, 4, 4, 6, 4, 7, 8,
748 9, 10, 11, 7, 4, 4, 12, 13, 14, 14,
749 4, 15, 4, 4, 16, 17, 18, 19, 16, 16,
750 20, 16, 16, 16, 21, 22, 23, 22, 24, 25,
751 22, 26, 22, 27, 4, 4, 28, 29, 30, 31,
752 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
753 42, 41, 41, 43, 44, 41, 41, 41, 45, 41,
754 41, 46, 4, 4, 4, 4, 5, 4, 47, 6,
755 47, 7, 8, 9, 10, 11, 48, 4, 4, 49,
756 50, 51, 51, 4, 52, 4, 4, 53, 54, 55,
758 56, 53, 53, 57, 53, 53, 53, 58, 59, 60,
759 59, 61, 62, 59, 63, 59, 27, 4, 4, 64,
760 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
761 75, 76, 77, 78, 77, 77, 79, 80, 77, 77,
762 77, 81, 77, 77, 82, 4, 83, 84, 84, 84,
763 84, 86, 86, 86, 86, 88, 89, 91, 113, 117,
764 119, 119, 119, 119, 106, 157, 354, 92, 83, 93,
765 94, 113, 107, 106, 95, 96, 96, 97, 119, 119,
766 119, 119, 85, 118, 107, 107, 98, 99, 100, 101,
767 102, 102, 102, 102, 103, 121, 645, 107, 119, 119,
769 119, 119, 119, 119, 119, 119, 355, 136, 120, 135,
770 135, 85, 114, 113, 138, 113, 135, 467, 122, 119,
771 119, 119, 119, 149, 142, 137, 136, 136, 119, 119,
772 119, 119, 85, 135, 135, 135, 123, 190, 85, 85,
773 85, 85, 85, 85, 85, 96, 96, 96, 198, 199,
774 136, 136, 85, 135, 135, 135, 98, 85, 100, 693,
775 102, 102, 102, 102, 693, 125, 234, 162, 124, 136,
776 136, 135, 135, 135, 136, 136, 117, 165, 135, 135,
777 135, 258, 258, 136, 136, 261, 116, 136, 136, 135,
778 135, 135, 135, 135, 135, 136, 136, 130, 206, 191,
780 118, 166, 85, 135, 135, 135, 107, 671, 85, 85,
781 85, 85, 85, 85, 85, 107, 352, 108, 107, 109,
782 110, 110, 110, 110, 111, 136, 136, 107, 136, 136,
783 167, 167, 167, 167, 135, 135, 135, 107, 135, 135,
784 542, 139, 145, 145, 145, 145, 108, 130, 261, 107,
785 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
786 112, 112, 200, 369, 179, 179, 167, 167, 167, 167,
787 178, 178, 178, 108, 126, 127, 127, 127, 126, 126,
788 126, 126, 126, 126, 126, 126, 126, 128, 126, 126,
789 107, 124, 140, 113, 126, 126, 126, 126, 146, 91,
791 171, 107, 107, 85, 85, 167, 167, 167, 167, 150,
792 370, 93, 151, 107, 113, 149, 152, 126, 130, 126,
793 299, 169, 179, 179, 167, 167, 167, 167, 167, 167,
794 167, 167, 178, 178, 179, 168, 178, 178, 206, 141,
795 207, 181, 113, 143, 170, 126, 126, 131, 85, 693,
796 132, 132, 132, 132, 133, 167, 167, 167, 167, 178,
797 149, 179, 179, 178, 178, 178, 179, 179, 180, 178,
798 178, 178, 84, 84, 84, 84, 134, 172, 164, 146,
799 135, 135, 136, 136, 136, 136, 136, 136, 136, 136,
800 136, 136, 173, 179, 179, 267, 268, 178, 178, 178,
802 179, 179, 85, 134, 96, 96, 97, 178, 178, 178,
803 264, 85, 661, 165, 149, 98, 153, 100, 101, 154,
804 154, 154, 154, 155, 179, 179, 179, 179, 106, 178,
805 178, 178, 179, 179, 178, 178, 178, 166, 96, 96,
806 96, 178, 178, 178, 85, 85, 85, 107, 107, 352,
807 85, 85, 85, 107, 107, 183, 149, 149, 149, 107,
808 107, 148, 149, 149, 149, 107, 107, 148, 148, 148,
809 148, 148, 148, 148, 96, 96, 96, 195, 280, 196,
810 130, 85, 182, 633, 197, 98, 148, 100, 693, 154,
811 154, 154, 154, 149, 85, 113, 667, 107, 340, 85,
813 85, 436, 184, 107, 340, 344, 149, 265, 172, 107,
814 280, 149, 149, 187, 413, 107, 145, 145, 145, 145,
815 86, 86, 86, 86, 189, 96, 96, 96, 345, 267,
816 268, 148, 85, 85, 85, 85, 185, 148, 148, 148,
817 148, 148, 148, 148, 85, 186, 85, 107, 85, 158,
818 345, 109, 159, 159, 159, 159, 160, 437, 149, 107,
819 149, 96, 96, 96, 249, 249, 249, 249, 249, 249,
820 249, 249, 146, 202, 264, 203, 414, 354, 158, 406,
821 204, 658, 161, 161, 161, 161, 161, 161, 161, 161,
822 161, 161, 161, 161, 249, 249, 249, 249, 253, 145,
824 145, 145, 145, 257, 283, 158, 174, 85, 693, 175,
825 175, 175, 175, 176, 85, 262, 263, 355, 85, 149,
826 148, 148, 148, 148, 415, 85, 149, 666, 254, 218,
827 149, 301, 301, 301, 301, 177, 218, 149, 146, 178,
828 178, 179, 179, 179, 179, 179, 179, 179, 179, 179,
829 179, 206, 279, 207, 373, 146, 284, 483, 218, 374,
830 375, 484, 177, 111, 85, 109, 193, 193, 193, 193,
831 111, 85, 292, 292, 292, 292, 149, 85, 317, 292,
832 292, 292, 292, 149, 376, 218, 416, 444, 318, 149,
833 258, 258, 111, 377, 419, 318, 194, 194, 194, 194,
835 194, 194, 194, 194, 194, 194, 194, 194, 420, 295,
836 319, 319, 319, 319, 320, 320, 320, 320, 130, 111,
837 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
838 209, 209, 85, 85, 281, 106, 588, 211, 380, 654,
839 85, 85, 85, 85, 212, 149, 438, 439, 213, 213,
840 213, 213, 213, 213, 213, 213, 213, 213, 85, 85,
841 85, 85, 85, 85, 85, 85, 211, 481, 438, 440,
842 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
843 214, 214, 85, 85, 85, 85, 85, 85, 85, 85,
844 85, 85, 85, 211, 85, 216, 85, 85, 217, 217,
846 217, 217, 218, 85, 85, 312, 106, 661, 149, 149,
847 85, 292, 292, 292, 292, 149, 149, 321, 321, 321,
848 321, 466, 149, 466, 216, 369, 146, 541, 214, 214,
849 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
850 323, 323, 323, 323, 363, 296, 659, 364, 297, 264,
851 298, 216, 219, 85, 220, 693, 316, 365, 221, 222,
852 106, 85, 693, 223, 468, 149, 224, 324, 324, 324,
853 324, 457, 368, 149, 219, 85, 220, 325, 325, 325,
854 325, 658, 221, 222, 693, 456, 146, 149, 223, 324,
855 324, 324, 324, 224, 126, 127, 127, 127, 126, 126,
857 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
858 381, 693, 512, 393, 126, 126, 126, 126, 458, 382,
859 444, 341, 527, 218, 398, 655, 307, 307, 307, 307,
860 218, 324, 324, 324, 324, 106, 512, 126, 130, 126,
861 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
862 85, 522, 218, 324, 324, 324, 324, 235, 235, 235,
863 236, 457, 149, 342, 651, 126, 126, 126, 235, 235,
864 235, 236, 85, 126, 126, 126, 126, 126, 126, 218,
865 528, 126, 126, 85, 149, 240, 85, 126, 126, 85,
866 126, 359, 359, 359, 359, 149, 248, 534, 149, 573,
868 130, 149, 350, 360, 360, 360, 360, 85, 364, 250,
869 126, 130, 550, 693, 395, 383, 383, 383, 383, 149,
870 693, 693, 693, 693, 85, 106, 693, 511, 651, 396,
871 476, 372, 372, 372, 372, 397, 149, 362, 126, 126,
872 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
873 238, 238, 85, 239, 693, 85, 240, 241, 146, 646,
874 85, 85, 85, 85, 242, 645, 243, 149, 244, 244,
875 244, 244, 244, 244, 244, 244, 244, 244, 244, 244,
876 244, 244, 244, 244, 244, 244, 245, 146, 589, 106,
877 246, 246, 246, 246, 246, 246, 246, 246, 246, 246,
879 246, 246, 244, 244, 244, 244, 244, 244, 244, 244,
880 244, 244, 244, 245, 244, 135, 135, 135, 135, 135,
881 135, 135, 135, 135, 135, 135, 135, 248, 644, 85,
882 417, 240, 592, 644, 249, 249, 249, 249, 605, 516,
883 250, 149, 251, 251, 251, 251, 251, 251, 251, 251,
884 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
885 251, 517, 85, 85, 368, 85, 641, 85, 252, 96,
886 96, 96, 405, 344, 149, 149, 85, 149, 85, 149,
887 98, 148, 100, 693, 154, 154, 154, 154, 149, 85,
888 149, 146, 418, 264, 85, 614, 394, 384, 384, 384,
890 384, 149, 385, 385, 385, 385, 149, 148, 148, 148,
891 148, 148, 148, 148, 148, 148, 148, 614, 394, 85,
892 399, 408, 408, 408, 408, 514, 148, 385, 385, 385,
893 385, 149, 148, 148, 148, 148, 148, 148, 148, 85,
894 409, 409, 409, 409, 560, 85, 421, 421, 421, 421,
895 514, 149, 85, 385, 385, 385, 385, 149, 561, 391,
896 385, 385, 385, 385, 149, 427, 427, 427, 427, 359,
897 359, 359, 359, 449, 449, 449, 449, 269, 269, 269,
898 269, 269, 269, 269, 269, 269, 269, 269, 269, 85,
899 326, 640, 392, 327, 270, 542, 329, 148, 148, 148,
901 148, 271, 399, 331, 543, 272, 272, 272, 272, 272,
902 272, 272, 272, 272, 272, 148, 148, 148, 148, 148,
903 148, 148, 148, 270, 445, 445, 445, 273, 273, 273,
904 273, 273, 273, 273, 273, 273, 273, 273, 273, 148,
905 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
906 270, 148, 274, 638, 106, 275, 275, 275, 275, 276,
907 85, 85, 240, 85, 611, 85, 91, 446, 401, 401,
908 401, 401, 149, 149, 637, 149, 461, 149, 93, 106,
909 106, 274, 106, 95, 632, 273, 273, 273, 273, 273,
910 273, 273, 273, 273, 273, 273, 273, 486, 486, 486,
912 486, 391, 566, 392, 532, 379, 532, 477, 274, 286,
913 286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
914 286, 85, 239, 146, 499, 240, 287, 647, 647, 148,
915 148, 148, 148, 288, 567, 243, 500, 289, 289, 289,
916 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
917 289, 289, 289, 289, 289, 290, 445, 445, 445, 291,
918 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
919 291, 289, 289, 289, 289, 289, 289, 289, 289, 289,
920 289, 289, 290, 289, 178, 178, 178, 178, 178, 178,
921 178, 178, 178, 178, 178, 178, 85, 248, 631, 446,
923 630, 148, 106, 648, 292, 292, 292, 292, 149, 674,
924 250, 629, 293, 293, 293, 293, 293, 293, 293, 293,
925 293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
926 293, 532, 379, 532, 148, 148, 148, 148, 294, 148,
927 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
928 148, 148, 148, 148, 148, 148, 148, 148, 148, 213,
929 213, 213, 213, 213, 213, 213, 213, 213, 213, 523,
930 523, 523, 626, 460, 460, 460, 460, 106, 625, 146,
931 618, 214, 214, 214, 214, 214, 214, 214, 214, 214,
932 214, 214, 214, 322, 322, 322, 322, 322, 322, 322,
934 322, 322, 322, 202, 617, 203, 544, 544, 544, 544,
935 204, 106, 524, 692, 258, 306, 306, 306, 306, 306,
936 306, 306, 306, 306, 306, 306, 306, 85, 326, 146,
937 85, 327, 328, 533, 329, 85, 85, 85, 85, 330,
938 614, 331, 149, 332, 332, 332, 332, 332, 332, 332,
939 332, 332, 332, 332, 332, 332, 332, 332, 332, 332,
940 332, 333, 614, 606, 613, 334, 334, 334, 334, 334,
941 334, 334, 334, 334, 334, 334, 334, 85, 85, 85,
942 85, 85, 85, 85, 85, 85, 85, 85, 328, 85,
943 126, 235, 235, 235, 236, 85, 126, 126, 126, 126,
945 126, 126, 85, 264, 126, 126, 106, 149, 369, 596,
946 126, 126, 417, 126, 149, 330, 318, 693, 693, 693,
947 693, 693, 330, 318, 693, 85, 693, 327, 462, 85,
948 693, 693, 615, 126, 130, 208, 208, 149, 463, 624,
949 101, 149, 85, 450, 330, 103, 451, 85, 693, 452,
950 85, 85, 85, 85, 616, 404, 453, 85, 693, 595,
951 85, 126, 126, 248, 620, 470, 470, 470, 470, 149,
952 106, 330, 149, 596, 418, 693, 250, 471, 251, 251,
953 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
954 251, 251, 251, 251, 251, 251, 251, 612, 146, 622,
956 210, 210, 478, 639, 252, 357, 357, 357, 357, 357,
957 357, 357, 357, 357, 357, 357, 357, 363, 106, 85,
958 364, 623, 619, 523, 523, 523, 542, 652, 106, 604,
959 365, 149, 366, 366, 366, 366, 366, 366, 366, 366,
960 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
961 366, 85, 85, 85, 364, 436, 85, 85, 367, 85,
962 85, 603, 146, 149, 149, 149, 524, 472, 149, 149,
963 668, 149, 149, 508, 474, 272, 272, 272, 272, 272,
964 272, 272, 272, 272, 272, 634, 146, 508, 508, 563,
965 563, 563, 563, 602, 182, 538, 475, 273, 273, 273,
967 273, 273, 273, 273, 273, 273, 273, 273, 273, 85,
968 326, 473, 85, 327, 386, 665, 329, 148, 148, 148,
969 148, 387, 614, 331, 149, 388, 388, 388, 388, 388,
970 388, 388, 388, 388, 388, 388, 388, 388, 388, 388,
971 388, 388, 388, 389, 614, 146, 598, 390, 390, 390,
972 390, 390, 390, 390, 390, 390, 390, 390, 390, 148,
973 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
974 386, 148, 85, 248, 146, 85, 598, 676, 676, 215,
975 215, 457, 597, 656, 149, 614, 250, 149, 293, 293,
976 293, 293, 293, 293, 293, 293, 293, 293, 293, 293,
978 293, 293, 293, 293, 293, 293, 293, 614, 85, 579,
979 85, 594, 513, 85, 294, 85, 401, 401, 401, 401,
980 149, 85, 149, 422, 547, 149, 423, 149, 480, 424,
981 537, 693, 450, 149, 693, 451, 425, 693, 452, 85,
982 85, 514, 423, 593, 693, 453, 106, 146, 146, 614,
983 515, 149, 149, 400, 400, 400, 400, 400, 400, 400,
984 400, 400, 400, 400, 400, 363, 514, 85, 364, 569,
985 568, 614, 676, 264, 247, 247, 587, 643, 365, 149,
986 402, 402, 402, 402, 402, 402, 402, 402, 402, 402,
987 402, 402, 402, 402, 402, 402, 402, 402, 402, 693,
989 508, 672, 693, 586, 113, 693, 403, 326, 585, 85,
990 327, 330, 693, 329, 508, 508, 670, 540, 330, 561,
991 331, 149, 410, 410, 410, 410, 410, 410, 410, 410,
992 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
993 411, 584, 691, 584, 412, 412, 412, 412, 412, 412,
994 412, 412, 412, 412, 412, 412, 450, 450, 653, 693,
995 693, 436, 693, 693, 85, 85, 85, 330, 326, 693,
996 693, 327, 654, 583, 329, 146, 149, 149, 149, 358,
997 358, 331, 582, 332, 332, 332, 332, 332, 332, 332,
998 332, 332, 332, 332, 332, 332, 332, 332, 332, 332,
1000 332, 332, 422, 483, 106, 423, 610, 581, 424, 544,
1001 544, 544, 544, 580, 553, 425, 539, 426, 426, 426,
1002 426, 426, 426, 426, 426, 426, 426, 426, 426, 426,
1003 426, 426, 426, 426, 426, 426, 334, 334, 334, 334,
1004 334, 334, 334, 334, 334, 334, 334, 334, 326, 553,
1005 85, 327, 451, 662, 329, 579, 578, 577, 576, 575,
1006 502, 331, 149, 388, 388, 388, 388, 388, 388, 388,
1007 388, 388, 388, 388, 388, 388, 388, 388, 388, 388,
1008 388, 388, 113, 85, 574, 501, 379, 85, 502, 148,
1009 422, 503, 85, 423, 502, 149, 424, 673, 504, 149,
1011 565, 564, 364, 425, 149, 469, 469, 469, 469, 469,
1012 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
1013 469, 469, 469, 469, 390, 390, 390, 390, 390, 390,
1014 390, 390, 390, 390, 390, 390, 85, 450, 614, 590,
1015 451, 148, 642, 452, 148, 148, 148, 148, 149, 693,
1016 453, 501, 693, 373, 502, 693, 146, 503, 374, 375,
1017 614, 451, 693, 562, 504, 559, 505, 505, 505, 505,
1018 505, 505, 505, 505, 505, 505, 505, 505, 505, 505,
1019 505, 505, 505, 505, 505, 501, 558, 85, 502, 557,
1020 556, 503, 563, 563, 563, 563, 555, 621, 504, 149,
1022 535, 535, 535, 535, 535, 535, 535, 535, 535, 535,
1023 535, 535, 535, 535, 535, 535, 535, 535, 535, 85,
1024 85, 85, 85, 85, 614, 379, 379, 379, 554, 570,
1025 553, 149, 149, 149, 149, 149, 139, 614, 627, 379,
1026 551, 549, 548, 571, 614, 536, 614, 502, 528, 649,
1027 501, 676, 590, 636, 636, 636, 501, 656, 572, 614,
1028 628, 547, 677, 571, 546, 669, 614, 636, 498, 536,
1029 379, 650, 379, 498, 496, 636, 636, 636, 379, 379,
1030 591, 599, 599, 496, 599, 599, 599, 599, 599, 636,
1031 599, 599, 599, 599, 494, 599, 599, 676, 636, 494,
1033 636, 599, 599, 599, 599, 492, 636, 636, 678, 492,
1034 663, 601, 676, 490, 490, 488, 676, 488, 669, 676,
1035 636, 146, 636, 679, 599, 599, 599, 680, 636, 636,
1036 681, 676, 676, 601, 676, 664, 423, 676, 676, 676,
1037 676, 530, 682, 683, 529, 684, 206, 200, 685, 686,
1038 687, 688, 599, 599, 599, 599, 368, 599, 599, 599,
1039 599, 599, 600, 599, 599, 599, 599, 146, 599, 599,
1040 676, 526, 364, 451, 608, 599, 599, 599, 448, 113,
1041 521, 689, 146, 676, 609, 520, 146, 519, 518, 146,
1042 436, 113, 511, 510, 690, 509, 507, 599, 599, 599,
1044 506, 146, 146, 423, 146, 422, 609, 146, 146, 146,
1045 146, 422, 420, 498, 496, 494, 492, 490, 488, 327,
1046 327, 482, 327, 261, 379, 599, 599, 599, 599, 465,
1047 599, 599, 599, 599, 599, 464, 599, 599, 599, 599,
1048 146, 599, 599, 87, 201, 459, 364, 599, 599, 599,
1049 599, 363, 368, 146, 240, 448, 443, 601, 442, 441,
1050 201, 435, 434, 433, 432, 431, 430, 429, 428, 327,
1051 599, 599, 599, 327, 326, 326, 206, 206, 201, 601,
1052 200, 200, 200, 305, 305, 303, 303, 407, 240, 261,
1053 261, 261, 260, 379, 260, 350, 371, 342, 599, 599,
1055 599, 599, 341, 599, 599, 599, 599, 599, 600, 599,
1056 599, 599, 599, 368, 599, 599, 248, 240, 240, 239,
1057 608, 599, 599, 599, 349, 348, 347, 346, 343, 339,
1058 609, 338, 337, 336, 335, 316, 316, 315, 314, 313,
1059 312, 312, 311, 599, 599, 599, 310, 309, 308, 305,
1060 303, 300, 609, 261, 285, 283, 282, 281, 278, 277,
1061 261, 261, 260, 146, 256, 231, 201, 255, 229, 130,
1062 233, 599, 599, 85, 232, 231, 85, 201, 230, 85,
1063 229, 85, 85, 85, 85, 85, 85, 85, 90, 90,
1064 228, 228, 227, 226, 90, 90, 104, 104, 104, 225,
1066 104, 104, 104, 104, 104, 104, 104, 104, 104, 104,
1067 104, 104, 104, 105, 105, 105, 105, 105, 105, 105,
1068 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1069 105, 129, 129, 129, 129, 129, 129, 129, 129, 129,
1070 129, 129, 129, 129, 129, 129, 129, 129, 129, 144,
1071 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
1072 144, 144, 144, 144, 144, 144, 144, 148, 106, 206,
1073 148, 205, 200, 148, 148, 148, 148, 148, 148, 148,
1074 148, 148, 156, 156, 156, 201, 156, 156, 156, 156,
1075 156, 156, 156, 156, 156, 156, 156, 156, 156, 98,
1077 98, 200, 192, 98, 188, 164, 163, 147, 116, 98,
1078 98, 98, 98, 115, 98, 126, 126, 126, 126, 126,
1079 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
1080 126, 126, 126, 237, 237, 237, 237, 237, 237, 237,
1081 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1082 237, 259, 259, 259, 259, 259, 259, 259, 259, 259,
1083 259, 259, 259, 259, 259, 259, 259, 259, 259, 266,
1084 266, 266, 266, 266, 266, 266, 266, 266, 266, 266,
1085 266, 266, 266, 266, 266, 266, 266, 302, 302, 106,
1086 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
1088 302, 302, 302, 302, 302, 304, 304, 87, 304, 304,
1089 304, 304, 304, 304, 304, 304, 304, 304, 304, 304,
1090 304, 304, 304, 306, 693, 693, 693, 306, 693, 306,
1091 306, 306, 693, 693, 306, 351, 351, 351, 351, 351,
1092 351, 351, 351, 351, 351, 351, 351, 351, 351, 351,
1093 351, 351, 351, 126, 126, 126, 126, 126, 126, 126,
1094 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
1095 126, 353, 353, 353, 353, 353, 353, 353, 353, 353,
1096 353, 353, 353, 353, 353, 353, 353, 353, 353, 237,
1097 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1099 237, 237, 237, 237, 237, 237, 237, 356, 356, 356,
1100 356, 356, 356, 356, 361, 693, 693, 693, 693, 361,
1101 693, 361, 361, 693, 361, 259, 259, 259, 259, 259,
1102 259, 259, 259, 259, 259, 259, 259, 259, 259, 259,
1103 259, 259, 259, 378, 378, 378, 378, 378, 378, 378,
1104 378, 378, 378, 378, 378, 378, 378, 378, 378, 378,
1105 378, 266, 266, 266, 266, 266, 266, 266, 266, 266,
1106 266, 266, 266, 266, 266, 266, 266, 266, 266, 105,
1107 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1108 105, 105, 105, 105, 105, 105, 105, 302, 302, 693,
1110 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
1111 302, 302, 302, 302, 302, 304, 304, 693, 304, 304,
1112 304, 304, 304, 304, 304, 304, 304, 304, 304, 304,
1113 304, 304, 304, 412, 693, 693, 693, 412, 693, 412,
1114 412, 412, 693, 693, 412, 410, 410, 693, 693, 410,
1115 693, 693, 410, 410, 351, 351, 351, 351, 351, 351,
1116 351, 351, 351, 351, 351, 351, 351, 351, 351, 351,
1117 351, 351, 353, 353, 353, 353, 353, 353, 353, 353,
1118 353, 353, 353, 353, 353, 353, 353, 353, 353, 353,
1119 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
1121 126, 126, 126, 126, 126, 126, 126, 126, 447, 447,
1122 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
1123 447, 447, 447, 447, 447, 447, 454, 454, 454, 454,
1124 693, 454, 454, 693, 454, 454, 454, 454, 454, 454,
1125 454, 455, 455, 693, 693, 693, 693, 693, 455, 455,
1126 693, 455, 378, 378, 378, 378, 378, 378, 378, 378,
1127 378, 378, 378, 378, 378, 378, 378, 378, 378, 378,
1128 105, 105, 105, 105, 105, 105, 105, 105, 105, 105,
1129 105, 105, 105, 105, 105, 105, 105, 105, 479, 479,
1130 479, 479, 693, 479, 479, 479, 479, 479, 479, 479,
1132 479, 479, 479, 485, 485, 693, 693, 485, 693, 693,
1133 485, 485, 487, 487, 693, 487, 487, 487, 487, 487,
1134 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
1135 489, 489, 693, 489, 489, 489, 489, 489, 489, 489,
1136 489, 489, 489, 489, 489, 489, 489, 489, 491, 491,
1137 693, 491, 491, 491, 491, 491, 491, 491, 491, 491,
1138 491, 491, 491, 491, 491, 491, 493, 493, 693, 493,
1139 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
1140 493, 493, 493, 493, 495, 495, 693, 495, 495, 495,
1141 495, 495, 495, 495, 495, 495, 495, 495, 495, 495,
1143 495, 495, 497, 497, 693, 497, 497, 497, 497, 497,
1144 497, 497, 497, 497, 497, 497, 497, 497, 497, 497,
1145 525, 525, 693, 693, 525, 693, 693, 525, 525, 525,
1146 525, 525, 525, 525, 531, 531, 531, 531, 531, 531,
1147 531, 531, 531, 531, 531, 531, 531, 531, 531, 531,
1148 531, 531, 545, 545, 693, 693, 545, 693, 693, 545,
1149 545, 552, 552, 693, 552, 552, 552, 552, 552, 552,
1150 552, 552, 552, 552, 552, 552, 552, 552, 552, 600,
1151 600, 693, 600, 600, 600, 600, 600, 600, 600, 600,
1152 600, 600, 600, 600, 600, 600, 600, 607, 607, 693,
1154 607, 607, 607, 607, 607, 607, 607, 607, 607, 607,
1155 607, 607, 607, 607, 607, 599, 599, 693, 599, 599,
1156 599, 599, 599, 599, 599, 599, 599, 599, 599, 599,
1157 599, 599, 599, 635, 635, 635, 635, 635, 635, 635,
1158 635, 635, 635, 635, 635, 635, 635, 635, 635, 635,
1159 635, 657, 657, 657, 657, 657, 657, 657, 657, 657,
1160 657, 657, 657, 657, 657, 657, 657, 657, 657, 660,
1161 660, 660, 660, 660, 660, 660, 660, 660, 660, 660,
1162 660, 660, 660, 660, 660, 660, 660, 675, 675, 675,
1163 675, 675, 675, 675, 675, 675, 675, 675, 675, 675,
1165 675, 675, 675, 675, 675, 3, 693, 693, 693, 693,
1166 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
1167 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
1168 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
1169 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
1170 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
1171 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
1172 693, 693, 693, 693, 693, 693, 693, 693, 693
1175 static yyconst flex_int16_t yy_chk[3880] =
1177 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1178 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1179 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1180 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1181 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1182 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1183 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1184 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
1185 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1186 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1188 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1189 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1190 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1191 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1192 2, 2, 2, 2, 2, 2, 5, 6, 6, 6,
1193 6, 8, 8, 8, 8, 11, 11, 12, 17, 20,
1194 22, 22, 22, 22, 52, 52, 236, 12, 5, 12,
1195 12, 29, 41, 381, 12, 13, 13, 13, 21, 21,
1196 21, 21, 13, 20, 41, 43, 13, 13, 13, 13,
1197 13, 13, 13, 13, 13, 23, 671, 43, 23, 23,
1199 23, 23, 24, 24, 24, 24, 236, 30, 21, 30,
1200 30, 48, 17, 54, 30, 26, 29, 381, 23, 25,
1201 25, 25, 25, 48, 43, 29, 36, 36, 26, 26,
1202 26, 26, 13, 36, 36, 36, 24, 87, 13, 13,
1203 13, 13, 13, 13, 13, 14, 14, 14, 92, 92,
1204 32, 32, 14, 32, 32, 32, 14, 14, 14, 14,
1205 14, 14, 14, 14, 14, 26, 128, 54, 25, 31,
1206 31, 31, 31, 31, 33, 33, 34, 57, 33, 33,
1207 33, 146, 146, 35, 35, 155, 31, 34, 34, 35,
1208 35, 35, 34, 34, 34, 37, 37, 128, 155, 87,
1210 34, 57, 14, 37, 37, 37, 40, 667, 14, 14,
1211 14, 14, 14, 14, 14, 16, 234, 16, 40, 16,
1212 16, 16, 16, 16, 16, 38, 38, 16, 39, 39,
1213 59, 59, 59, 59, 38, 38, 38, 44, 39, 39,
1214 666, 40, 46, 46, 46, 46, 16, 234, 152, 44,
1215 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
1216 16, 16, 152, 252, 71, 71, 61, 61, 61, 61,
1217 71, 71, 71, 16, 27, 27, 27, 27, 27, 27,
1218 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
1219 42, 44, 42, 45, 27, 27, 27, 27, 46, 49,
1221 61, 45, 42, 148, 49, 58, 58, 58, 58, 49,
1222 252, 49, 49, 45, 65, 148, 49, 27, 27, 27,
1223 187, 60, 75, 75, 60, 60, 60, 60, 62, 62,
1224 62, 62, 75, 75, 66, 58, 66, 66, 101, 42,
1225 101, 66, 63, 45, 60, 27, 27, 28, 156, 28,
1226 28, 28, 28, 28, 28, 63, 63, 63, 63, 65,
1227 156, 67, 67, 67, 67, 67, 68, 68, 65, 68,
1228 68, 68, 84, 84, 84, 84, 28, 62, 67, 187,
1229 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
1230 28, 28, 63, 69, 69, 157, 157, 69, 69, 69,
1232 72, 72, 151, 28, 50, 50, 50, 72, 72, 72,
1233 151, 50, 660, 70, 151, 50, 50, 50, 50, 50,
1234 50, 50, 50, 50, 70, 70, 73, 73, 619, 70,
1235 70, 70, 74, 74, 73, 73, 73, 70, 96, 96,
1236 96, 74, 74, 74, 76, 77, 165, 76, 77, 351,
1237 78, 80, 166, 78, 80, 78, 76, 77, 165, 76,
1238 77, 50, 78, 80, 166, 78, 80, 50, 50, 50,
1239 50, 50, 50, 50, 51, 51, 51, 91, 165, 91,
1240 351, 51, 76, 619, 91, 51, 51, 51, 51, 51,
1241 51, 51, 51, 51, 79, 81, 659, 79, 224, 153,
1243 81, 343, 78, 81, 224, 228, 79, 153, 80, 79,
1244 166, 153, 81, 82, 312, 81, 82, 82, 82, 82,
1245 86, 86, 86, 86, 86, 100, 100, 100, 228, 266,
1246 266, 51, 119, 119, 119, 119, 79, 51, 51, 51,
1247 51, 51, 51, 51, 53, 81, 170, 53, 185, 53,
1248 228, 53, 53, 53, 53, 53, 53, 343, 170, 53,
1249 185, 97, 97, 97, 136, 136, 136, 136, 137, 137,
1250 137, 137, 82, 97, 170, 97, 312, 353, 53, 299,
1251 97, 657, 53, 53, 53, 53, 53, 53, 53, 53,
1252 53, 53, 53, 53, 138, 138, 138, 138, 137, 145,
1254 145, 145, 145, 145, 185, 53, 64, 150, 64, 64,
1255 64, 64, 64, 64, 164, 150, 150, 353, 172, 150,
1256 167, 167, 167, 167, 316, 264, 164, 655, 138, 193,
1257 172, 189, 189, 189, 189, 64, 193, 264, 299, 64,
1258 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
1259 64, 314, 164, 314, 258, 145, 172, 408, 193, 258,
1260 258, 408, 64, 90, 179, 90, 90, 90, 90, 90,
1261 90, 180, 179, 179, 179, 179, 179, 182, 207, 180,
1262 180, 180, 180, 180, 260, 193, 316, 352, 207, 182,
1263 528, 528, 90, 260, 318, 207, 90, 90, 90, 90,
1265 90, 90, 90, 90, 90, 90, 90, 90, 318, 180,
1266 208, 208, 208, 208, 209, 209, 209, 209, 352, 90,
1267 108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
1268 108, 108, 110, 262, 182, 566, 566, 110, 262, 653,
1269 110, 110, 110, 110, 110, 262, 344, 345, 110, 110,
1270 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1271 110, 110, 110, 110, 110, 110, 110, 406, 344, 345,
1272 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1273 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
1274 110, 110, 110, 110, 110, 112, 183, 184, 112, 112,
1276 112, 112, 112, 181, 186, 263, 382, 647, 183, 184,
1277 263, 181, 181, 181, 181, 181, 186, 210, 210, 210,
1278 210, 379, 263, 379, 112, 362, 406, 481, 112, 112,
1279 112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
1280 213, 213, 213, 213, 360, 181, 646, 360, 183, 184,
1281 186, 112, 113, 279, 113, 218, 265, 360, 113, 113,
1282 268, 265, 218, 113, 382, 279, 113, 214, 214, 214,
1283 214, 367, 362, 265, 113, 284, 113, 215, 215, 215,
1284 215, 645, 113, 113, 218, 360, 481, 284, 113, 225,
1285 225, 225, 225, 113, 127, 127, 127, 127, 127, 127,
1287 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
1288 268, 218, 435, 279, 127, 127, 127, 127, 367, 268,
1289 444, 225, 460, 194, 284, 641, 194, 194, 194, 194,
1290 194, 226, 226, 226, 226, 468, 435, 127, 127, 127,
1291 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
1292 384, 444, 194, 233, 233, 233, 233, 235, 235, 235,
1293 235, 456, 384, 226, 638, 127, 127, 129, 129, 129,
1294 129, 129, 281, 129, 129, 129, 129, 129, 129, 194,
1295 460, 129, 129, 395, 281, 246, 397, 129, 129, 283,
1296 129, 246, 246, 246, 246, 395, 247, 468, 397, 541,
1298 235, 283, 233, 247, 247, 247, 247, 269, 456, 247,
1299 129, 129, 509, 248, 281, 269, 269, 269, 269, 269,
1300 248, 248, 248, 248, 282, 567, 248, 509, 637, 282,
1301 397, 257, 257, 257, 257, 283, 282, 247, 129, 129,
1302 131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
1303 131, 131, 132, 132, 248, 404, 132, 132, 541, 632,
1304 132, 132, 132, 132, 132, 631, 132, 404, 132, 132,
1305 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
1306 132, 132, 132, 132, 132, 132, 132, 257, 567, 588,
1307 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
1309 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
1310 132, 132, 132, 132, 132, 134, 134, 134, 134, 134,
1311 134, 134, 134, 134, 134, 134, 134, 135, 630, 289,
1312 576, 289, 573, 629, 135, 135, 135, 135, 588, 438,
1313 135, 289, 135, 135, 135, 135, 135, 135, 135, 135,
1314 135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
1315 135, 438, 293, 298, 293, 396, 626, 297, 135, 154,
1316 154, 154, 297, 280, 293, 298, 154, 396, 280, 297,
1317 154, 154, 154, 154, 154, 154, 154, 154, 154, 272,
1318 280, 573, 576, 396, 273, 598, 280, 272, 272, 272,
1320 272, 272, 273, 273, 273, 273, 273, 274, 274, 274,
1321 274, 274, 274, 274, 274, 274, 274, 598, 280, 277,
1322 298, 301, 301, 301, 301, 581, 154, 277, 277, 277,
1323 277, 277, 154, 154, 154, 154, 154, 154, 154, 158,
1324 306, 306, 306, 306, 520, 285, 322, 322, 322, 322,
1325 581, 158, 278, 285, 285, 285, 285, 285, 520, 277,
1326 278, 278, 278, 278, 278, 334, 334, 334, 334, 357,
1327 357, 357, 357, 358, 358, 358, 358, 158, 158, 158,
1328 158, 158, 158, 158, 158, 158, 158, 158, 158, 159,
1329 325, 625, 278, 325, 159, 482, 325, 159, 159, 159,
1331 159, 159, 285, 325, 482, 159, 159, 159, 159, 159,
1332 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
1333 159, 159, 159, 159, 354, 354, 354, 159, 159, 159,
1334 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
1335 159, 159, 159, 159, 159, 159, 159, 159, 159, 159,
1336 159, 159, 161, 623, 533, 161, 161, 161, 161, 161,
1337 291, 295, 291, 296, 592, 398, 374, 354, 291, 291,
1338 291, 291, 291, 295, 622, 296, 374, 398, 374, 633,
1339 672, 161, 534, 374, 618, 161, 161, 161, 161, 161,
1340 161, 161, 161, 161, 161, 161, 161, 412, 412, 412,
1342 412, 295, 533, 296, 466, 466, 466, 398, 161, 174,
1343 174, 174, 174, 174, 174, 174, 174, 174, 174, 174,
1344 174, 175, 175, 592, 420, 175, 175, 633, 672, 175,
1345 175, 175, 175, 175, 534, 175, 420, 175, 175, 175,
1346 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
1347 175, 175, 175, 175, 175, 175, 445, 445, 445, 175,
1348 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
1349 175, 175, 175, 175, 175, 175, 175, 175, 175, 175,
1350 175, 175, 175, 175, 177, 177, 177, 177, 177, 177,
1351 177, 177, 177, 177, 177, 177, 178, 178, 617, 445,
1353 616, 178, 634, 634, 178, 178, 178, 178, 178, 673,
1354 178, 615, 178, 178, 178, 178, 178, 178, 178, 178,
1355 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1356 178, 532, 532, 532, 178, 178, 178, 178, 178, 178,
1357 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
1358 178, 178, 178, 178, 178, 178, 178, 178, 178, 211,
1359 211, 211, 211, 211, 211, 211, 211, 211, 211, 448,
1360 448, 448, 613, 372, 372, 372, 372, 467, 612, 673,
1361 604, 211, 211, 211, 211, 211, 211, 211, 211, 211,
1362 211, 211, 211, 212, 212, 212, 212, 212, 212, 212,
1364 212, 212, 212, 462, 603, 462, 484, 484, 484, 484,
1365 462, 589, 448, 691, 691, 212, 212, 212, 212, 212,
1366 212, 212, 212, 212, 212, 212, 212, 217, 217, 372,
1367 480, 217, 217, 467, 217, 217, 217, 217, 217, 217,
1368 599, 217, 480, 217, 217, 217, 217, 217, 217, 217,
1369 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,
1370 217, 217, 599, 589, 597, 217, 217, 217, 217, 217,
1371 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,
1372 217, 217, 217, 217, 217, 217, 217, 217, 217, 217,
1373 237, 237, 237, 237, 237, 380, 237, 237, 237, 237,
1375 237, 237, 294, 380, 237, 237, 606, 380, 294, 595,
1376 237, 237, 317, 237, 294, 321, 317, 363, 326, 330,
1377 363, 326, 321, 317, 326, 388, 330, 388, 375, 391,
1378 363, 326, 601, 237, 237, 703, 703, 388, 375, 611,
1379 375, 391, 359, 359, 321, 375, 359, 359, 330, 359,
1380 359, 359, 359, 359, 601, 294, 359, 390, 363, 579,
1381 399, 237, 237, 238, 606, 390, 390, 390, 390, 390,
1382 605, 321, 399, 579, 317, 330, 238, 391, 238, 238,
1383 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
1384 238, 238, 238, 238, 238, 238, 238, 594, 611, 609,
1386 704, 704, 399, 624, 238, 241, 241, 241, 241, 241,
1387 241, 241, 241, 241, 241, 241, 241, 249, 662, 392,
1388 249, 609, 605, 523, 523, 523, 593, 639, 620, 587,
1389 249, 392, 249, 249, 249, 249, 249, 249, 249, 249,
1390 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
1391 249, 394, 402, 475, 402, 393, 536, 571, 249, 270,
1392 393, 586, 624, 394, 402, 475, 523, 392, 536, 571,
1393 662, 270, 393, 430, 394, 270, 270, 270, 270, 270,
1394 270, 270, 270, 270, 270, 620, 639, 430, 430, 527,
1395 527, 527, 527, 585, 536, 475, 394, 270, 270, 270,
1397 270, 270, 270, 270, 270, 270, 270, 270, 270, 275,
1398 275, 393, 610, 275, 275, 652, 275, 275, 275, 275,
1399 275, 275, 656, 275, 610, 275, 275, 275, 275, 275,
1400 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
1401 275, 275, 275, 275, 656, 527, 583, 275, 275, 275,
1402 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
1403 275, 275, 275, 275, 275, 275, 275, 275, 275, 275,
1404 275, 275, 286, 286, 652, 403, 582, 674, 675, 705,
1405 705, 403, 580, 642, 286, 642, 286, 403, 286, 286,
1406 286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
1408 286, 286, 286, 286, 286, 286, 286, 642, 400, 578,
1409 474, 577, 436, 538, 286, 287, 400, 400, 400, 400,
1410 400, 405, 474, 409, 575, 538, 409, 287, 403, 409,
1411 474, 422, 449, 405, 422, 449, 409, 422, 449, 537,
1412 469, 436, 469, 574, 422, 449, 668, 674, 675, 628,
1413 436, 537, 469, 287, 287, 287, 287, 287, 287, 287,
1414 287, 287, 287, 287, 287, 292, 436, 477, 292, 538,
1415 537, 628, 690, 405, 708, 708, 565, 628, 292, 477,
1416 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
1417 292, 292, 292, 292, 292, 292, 292, 292, 292, 450,
1419 508, 668, 450, 564, 471, 450, 292, 307, 562, 471,
1420 307, 307, 450, 307, 508, 508, 665, 477, 307, 560,
1421 307, 471, 307, 307, 307, 307, 307, 307, 307, 307,
1422 307, 307, 307, 307, 307, 307, 307, 307, 307, 307,
1423 307, 559, 690, 558, 307, 307, 307, 307, 307, 307,
1424 307, 307, 307, 307, 307, 307, 452, 453, 640, 452,
1425 453, 473, 452, 453, 591, 476, 473, 307, 320, 452,
1426 453, 320, 640, 557, 320, 665, 591, 476, 473, 719,
1427 719, 320, 556, 320, 320, 320, 320, 320, 320, 320,
1428 320, 320, 320, 320, 320, 320, 320, 320, 320, 320,
1430 320, 320, 324, 544, 648, 324, 591, 555, 324, 544,
1431 544, 544, 544, 554, 553, 324, 476, 324, 324, 324,
1432 324, 324, 324, 324, 324, 324, 324, 324, 324, 324,
1433 324, 324, 324, 324, 324, 324, 328, 328, 328, 328,
1434 328, 328, 328, 328, 328, 328, 328, 328, 383, 552,
1435 479, 383, 479, 648, 383, 551, 549, 548, 547, 546,
1436 545, 383, 479, 383, 383, 383, 383, 383, 383, 383,
1437 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
1438 383, 383, 478, 569, 543, 486, 531, 478, 486, 383,
1439 385, 486, 535, 385, 535, 569, 385, 670, 486, 478,
1441 530, 529, 526, 385, 535, 385, 385, 385, 385, 385,
1442 385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
1443 385, 385, 385, 385, 386, 386, 386, 386, 386, 386,
1444 386, 386, 386, 386, 386, 386, 401, 401, 627, 569,
1445 401, 401, 627, 401, 401, 401, 401, 401, 401, 501,
1446 401, 427, 501, 692, 427, 501, 670, 427, 692, 692,
1447 627, 525, 501, 521, 427, 519, 427, 427, 427, 427,
1448 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
1449 427, 427, 427, 427, 427, 470, 518, 539, 470, 517,
1450 516, 470, 563, 563, 563, 563, 515, 608, 470, 539,
1452 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
1453 470, 470, 470, 470, 470, 470, 470, 470, 470, 472,
1454 540, 568, 570, 572, 608, 621, 635, 636, 514, 539,
1455 513, 472, 540, 568, 570, 572, 512, 643, 614, 663,
1456 510, 507, 506, 539, 614, 472, 608, 505, 563, 636,
1457 504, 676, 568, 621, 635, 636, 503, 643, 540, 643,
1458 614, 500, 676, 570, 499, 663, 614, 663, 498, 472,
1459 664, 636, 669, 497, 496, 621, 635, 636, 649, 650,
1460 572, 584, 584, 495, 584, 584, 584, 584, 584, 663,
1461 584, 584, 584, 584, 494, 584, 584, 677, 664, 493,
1463 669, 584, 584, 584, 584, 492, 649, 650, 677, 491,
1464 649, 584, 678, 490, 489, 488, 679, 487, 664, 680,
1465 664, 676, 669, 678, 584, 584, 584, 679, 649, 650,
1466 680, 681, 682, 584, 683, 650, 485, 684, 685, 686,
1467 687, 465, 681, 682, 464, 683, 463, 461, 684, 685,
1468 686, 687, 584, 584, 590, 590, 459, 590, 590, 590,
1469 590, 590, 590, 590, 590, 590, 590, 677, 590, 590,
1470 688, 457, 455, 454, 590, 590, 590, 590, 447, 443,
1471 442, 688, 678, 689, 590, 441, 679, 440, 439, 680,
1472 437, 434, 433, 432, 689, 431, 429, 590, 590, 590,
1474 428, 681, 682, 426, 683, 425, 590, 684, 685, 686,
1475 687, 424, 419, 418, 417, 416, 415, 414, 413, 411,
1476 410, 407, 389, 387, 378, 590, 590, 600, 600, 377,
1477 600, 600, 600, 600, 600, 376, 600, 600, 600, 600,
1478 688, 600, 600, 373, 371, 369, 366, 600, 600, 600,
1479 600, 365, 361, 689, 356, 355, 350, 600, 349, 348,
1480 347, 342, 341, 340, 339, 338, 337, 336, 335, 333,
1481 600, 600, 600, 332, 331, 329, 315, 313, 311, 600,
1482 310, 309, 308, 305, 304, 303, 302, 300, 290, 288,
1483 276, 271, 267, 261, 259, 256, 255, 254, 600, 600,
1485 607, 607, 253, 607, 607, 607, 607, 607, 607, 607,
1486 607, 607, 607, 251, 607, 607, 250, 245, 244, 243,
1487 607, 607, 607, 607, 232, 231, 230, 229, 227, 223,
1488 607, 222, 221, 220, 219, 206, 205, 204, 203, 202,
1489 200, 199, 198, 607, 607, 607, 197, 196, 195, 191,
1490 190, 188, 607, 176, 173, 171, 169, 168, 163, 162,
1491 160, 149, 147, 144, 143, 142, 141, 140, 139, 126,
1492 125, 607, 607, 694, 124, 123, 694, 122, 121, 694,
1493 120, 694, 694, 694, 694, 694, 694, 694, 695, 695,
1494 118, 117, 116, 115, 695, 695, 696, 696, 696, 114,
1496 696, 696, 696, 696, 696, 696, 696, 696, 696, 696,
1497 696, 696, 696, 697, 697, 697, 697, 697, 697, 697,
1498 697, 697, 697, 697, 697, 697, 697, 697, 697, 697,
1499 697, 698, 698, 698, 698, 698, 698, 698, 698, 698,
1500 698, 698, 698, 698, 698, 698, 698, 698, 698, 699,
1501 699, 699, 699, 699, 699, 699, 699, 699, 699, 699,
1502 699, 699, 699, 699, 699, 699, 699, 700, 105, 103,
1503 700, 99, 95, 700, 700, 700, 700, 700, 700, 700,
1504 700, 700, 701, 701, 701, 94, 701, 701, 701, 701,
1505 701, 701, 701, 701, 701, 701, 701, 701, 701, 702,
1507 702, 93, 89, 702, 83, 56, 55, 47, 19, 702,
1508 702, 702, 702, 18, 702, 706, 706, 706, 706, 706,
1509 706, 706, 706, 706, 706, 706, 706, 706, 706, 706,
1510 706, 706, 706, 707, 707, 707, 707, 707, 707, 707,
1511 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
1512 707, 709, 709, 709, 709, 709, 709, 709, 709, 709,
1513 709, 709, 709, 709, 709, 709, 709, 709, 709, 710,
1514 710, 710, 710, 710, 710, 710, 710, 710, 710, 710,
1515 710, 710, 710, 710, 710, 710, 710, 711, 711, 15,
1516 711, 711, 711, 711, 711, 711, 711, 711, 711, 711,
1518 711, 711, 711, 711, 711, 712, 712, 10, 712, 712,
1519 712, 712, 712, 712, 712, 712, 712, 712, 712, 712,
1520 712, 712, 712, 713, 3, 0, 0, 713, 0, 713,
1521 713, 713, 0, 0, 713, 714, 714, 714, 714, 714,
1522 714, 714, 714, 714, 714, 714, 714, 714, 714, 714,
1523 714, 714, 714, 715, 715, 715, 715, 715, 715, 715,
1524 715, 715, 715, 715, 715, 715, 715, 715, 715, 715,
1525 715, 716, 716, 716, 716, 716, 716, 716, 716, 716,
1526 716, 716, 716, 716, 716, 716, 716, 716, 716, 717,
1527 717, 717, 717, 717, 717, 717, 717, 717, 717, 717,
1529 717, 717, 717, 717, 717, 717, 717, 718, 718, 718,
1530 718, 718, 718, 718, 720, 0, 0, 0, 0, 720,
1531 0, 720, 720, 0, 720, 721, 721, 721, 721, 721,
1532 721, 721, 721, 721, 721, 721, 721, 721, 721, 721,
1533 721, 721, 721, 722, 722, 722, 722, 722, 722, 722,
1534 722, 722, 722, 722, 722, 722, 722, 722, 722, 722,
1535 722, 723, 723, 723, 723, 723, 723, 723, 723, 723,
1536 723, 723, 723, 723, 723, 723, 723, 723, 723, 724,
1537 724, 724, 724, 724, 724, 724, 724, 724, 724, 724,
1538 724, 724, 724, 724, 724, 724, 724, 725, 725, 0,
1540 725, 725, 725, 725, 725, 725, 725, 725, 725, 725,
1541 725, 725, 725, 725, 725, 726, 726, 0, 726, 726,
1542 726, 726, 726, 726, 726, 726, 726, 726, 726, 726,
1543 726, 726, 726, 727, 0, 0, 0, 727, 0, 727,
1544 727, 727, 0, 0, 727, 728, 728, 0, 0, 728,
1545 0, 0, 728, 728, 729, 729, 729, 729, 729, 729,
1546 729, 729, 729, 729, 729, 729, 729, 729, 729, 729,
1547 729, 729, 730, 730, 730, 730, 730, 730, 730, 730,
1548 730, 730, 730, 730, 730, 730, 730, 730, 730, 730,
1549 731, 731, 731, 731, 731, 731, 731, 731, 731, 731,
1551 731, 731, 731, 731, 731, 731, 731, 731, 732, 732,
1552 732, 732, 732, 732, 732, 732, 732, 732, 732, 732,
1553 732, 732, 732, 732, 732, 732, 733, 733, 733, 733,
1554 0, 733, 733, 0, 733, 733, 733, 733, 733, 733,
1555 733, 734, 734, 0, 0, 0, 0, 0, 734, 734,
1556 0, 734, 735, 735, 735, 735, 735, 735, 735, 735,
1557 735, 735, 735, 735, 735, 735, 735, 735, 735, 735,
1558 736, 736, 736, 736, 736, 736, 736, 736, 736, 736,
1559 736, 736, 736, 736, 736, 736, 736, 736, 737, 737,
1560 737, 737, 0, 737, 737, 737, 737, 737, 737, 737,
1562 737, 737, 737, 738, 738, 0, 0, 738, 0, 0,
1563 738, 738, 739, 739, 0, 739, 739, 739, 739, 739,
1564 739, 739, 739, 739, 739, 739, 739, 739, 739, 739,
1565 740, 740, 0, 740, 740, 740, 740, 740, 740, 740,
1566 740, 740, 740, 740, 740, 740, 740, 740, 741, 741,
1567 0, 741, 741, 741, 741, 741, 741, 741, 741, 741,
1568 741, 741, 741, 741, 741, 741, 742, 742, 0, 742,
1569 742, 742, 742, 742, 742, 742, 742, 742, 742, 742,
1570 742, 742, 742, 742, 743, 743, 0, 743, 743, 743,
1571 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
1573 743, 743, 744, 744, 0, 744, 744, 744, 744, 744,
1574 744, 744, 744, 744, 744, 744, 744, 744, 744, 744,
1575 745, 745, 0, 0, 745, 0, 0, 745, 745, 745,
1576 745, 745, 745, 745, 746, 746, 746, 746, 746, 746,
1577 746, 746, 746, 746, 746, 746, 746, 746, 746, 746,
1578 746, 746, 747, 747, 0, 0, 747, 0, 0, 747,
1579 747, 748, 748, 0, 748, 748, 748, 748, 748, 748,
1580 748, 748, 748, 748, 748, 748, 748, 748, 748, 749,
1581 749, 0, 749, 749, 749, 749, 749, 749, 749, 749,
1582 749, 749, 749, 749, 749, 749, 749, 750, 750, 0,
1584 750, 750, 750, 750, 750, 750, 750, 750, 750, 750,
1585 750, 750, 750, 750, 750, 751, 751, 0, 751, 751,
1586 751, 751, 751, 751, 751, 751, 751, 751, 751, 751,
1587 751, 751, 751, 752, 752, 752, 752, 752, 752, 752,
1588 752, 752, 752, 752, 752, 752, 752, 752, 752, 752,
1589 752, 753, 753, 753, 753, 753, 753, 753, 753, 753,
1590 753, 753, 753, 753, 753, 753, 753, 753, 753, 754,
1591 754, 754, 754, 754, 754, 754, 754, 754, 754, 754,
1592 754, 754, 754, 754, 754, 754, 754, 755, 755, 755,
1593 755, 755, 755, 755, 755, 755, 755, 755, 755, 755,
1595 755, 755, 755, 755, 755, 693, 693, 693, 693, 693,
1596 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
1597 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
1598 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
1599 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
1600 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
1601 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
1602 693, 693, 693, 693, 693, 693, 693, 693, 693
1605 extern int yy_flex_debug;
1606 int yy_flex_debug = 0;
1608 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
1609 static char *yy_full_match;
1611 static int yy_looking_for_trail_begin = 0;
1612 static int yy_full_lp;
1613 static int *yy_full_state;
1614 #define YY_TRAILING_MASK 0x2000
1615 #define YY_TRAILING_HEAD_MASK 0x4000
1618 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
1619 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
1620 (yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
1621 (yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
1622 yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
1627 #define yymore() yymore_used_but_not_detected
1628 #define YY_MORE_ADJ 0
1629 #define YY_RESTORE_YY_MORE_OFFSET
1634 * parser.l -- lex parser of algebraic chess moves for XBoard
1636 * Copyright 1991 by Digital Equipment Corporation, Maynard,
1639 * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005,
1640 * 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
1642 * The following terms apply to Digital Equipment Corporation's copyright
1643 * interest in XBoard:
1644 * ------------------------------------------------------------------------
1645 * All Rights Reserved
1647 * Permission to use, copy, modify, and distribute this software and its
1648 * documentation for any purpose and without fee is hereby granted,
1649 * provided that the above copyright notice appear in all copies and that
1650 * both that copyright notice and this permission notice appear in
1651 * supporting documentation, and that the name of Digital not be
1652 * used in advertising or publicity pertaining to distribution of the
1653 * software without specific, written prior permission.
1655 * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
1656 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
1657 * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
1658 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
1659 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
1660 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
1662 * ------------------------------------------------------------------------
1664 * The following terms apply to the enhanced version of XBoard
1665 * distributed by the Free Software Foundation:
1666 * ------------------------------------------------------------------------
1668 * GNU XBoard is free software: you can redistribute it and/or modify
1669 * it under the terms of the GNU General Public License as published by
1670 * the Free Software Foundation, either version 3 of the License, or (at
1671 * your option) any later version.
1673 * GNU XBoard is distributed in the hope that it will be useful, but
1674 * WITHOUT ANY WARRANTY; without even the implied warranty of
1675 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1676 * General Public License for more details.
1678 * You should have received a copy of the GNU General Public License
1679 * along with this program. If not, see http://www.gnu.org/licenses/.
1681 *------------------------------------------------------------------------
1682 ** See the file ChangeLog for a revision history. */
1684 /* This parser handles all forms of promotion.
1685 * The parser resolves ambiguous moves by searching and check-testing.
1686 * It also parses comments of the form [anything] or (anything).
1688 * [HGM] Parser extensively modified for bigger boards, Shogi-like syntax,
1689 * and unknow pieces. All pieces are now mandatory upper case, but can be
1690 * any letter A-Z. Files must be lower case (as before), but can run upto 'l'.
1691 * Ranks can be 0-9. The parser returns 0 for off-board files and ranks.
1692 * For an unknown piece (as mover or promotion piece) it returns
1693 * IllegalMove, like it does when the piece doesn't match.
1694 * Promotions can now also be appended Shogi-style, a bare '=' or '+',
1695 * and this is then returned as promotion character. The piece indicator
1696 * can be prefixed by a '+' to indicate it is a promoted piece.
1701 #define NO_CONSTRAINT -1
1704 #define UNPUT_BUF_SIZE YYLMAX
1707 /* yytext is probably a char*, but could be a char[]. yy_text is set
1708 in YY_DECL below, because if yytext is a char*, its value is not
1711 #else /*!FLEX_SCANNER*/
1712 /* yytext is definitely a char[], so yy_text can be set here, statically. */
1713 char *yy_text = (char *) yytext;
1718 /* [AP] use prototypes in function declarations */
1719 #define YY_USE_PROTOS
1721 #ifdef YY_USE_PROTOS
1722 #define YY_PROTO(proto) proto
1724 #define YY_PROTO(proto) ()
1726 /* end of [AP] fix */
1729 #define YY_INPUT(buf, result, max_size) my_yy_input(buf, &result, max_size)
1732 int _yylex YY_PROTO((void)); \
1733 int yylex YY_PROTO((void)) \
1735 int result = _yylex(); \
1736 yy_text = (char *) yytext; \
1739 int _yylex YY_PROTO((void))
1747 /* The includes must be here, below the #undef input */
1752 # include <stdlib.h>
1753 # include <string.h>
1754 #else /* not STDC_HEADERS */
1756 # include <string.h>
1757 # else /* not HAVE_STRING_H */
1758 # include <strings.h>
1759 # endif /* not HAVE_STRING_H */
1760 #endif /* not STDC_HEADERS */
1763 # include <unistd.h>
1766 #if defined(_amigados)
1769 # include <fcntl.h> /* isatty() prototype */
1770 # endif /* HAVE_FCNTL_H */
1771 #endif /* defined(_amigados) */
1774 #include "backend.h"
1775 #include "frontend.h"
1779 extern int PosFlags P((int));
1781 extern Board boards[MAX_MOVES];
1783 int yyskipmoves = FALSE;
1784 char currentMoveString[YYLMAX];
1785 #ifndef FLEX_SCANNER
1786 char unputBuffer[UNPUT_BUF_SIZE];
1791 void my_yy_input P((char *buf, int *result, int max_size));
1792 #else /*!FLEX_SCANNER*/
1793 static int input P((void));
1794 static void output P((int ch));
1795 static void unput P((int ch));
1796 int yylook P((void));
1797 int yyback P((int *, int));
1800 int yywrap P((void));
1801 extern void CopyBoard P((Board to, Board from));
1803 #line 1804 "parser.c"
1807 #ifndef YY_NO_UNISTD_H
1808 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1809 * down here because we want the user's section 1 to have been scanned first.
1810 * The user has a chance to override it with an option.
1815 #ifndef YY_EXTRA_TYPE
1816 #define YY_EXTRA_TYPE void *
1819 static int yy_init_globals (void );
1821 /* Accessor methods to globals.
1822 These are made visible to non-reentrant scanners for convenience. */
1824 int yylex_destroy (void );
1826 int yyget_debug (void );
1828 void yyset_debug (int debug_flag );
1830 YY_EXTRA_TYPE yyget_extra (void );
1832 void yyset_extra (YY_EXTRA_TYPE user_defined );
1834 FILE *yyget_in (void );
1836 void yyset_in (FILE * in_str );
1838 FILE *yyget_out (void );
1840 void yyset_out (FILE * out_str );
1842 int yyget_leng (void );
1844 char *yyget_text (void );
1846 int yyget_lineno (void );
1848 void yyset_lineno (int line_number );
1850 /* Macros after this point can all be overridden by user definitions in
1854 #ifndef YY_SKIP_YYWRAP
1856 extern "C" int yywrap (void );
1858 extern int yywrap (void );
1862 static void yyunput (int c,char *buf_ptr );
1865 static void yy_flex_strncpy (char *,yyconst char *,int );
1868 #ifdef YY_NEED_STRLEN
1869 static int yy_flex_strlen (yyconst char * );
1875 static int yyinput (void );
1877 static int input (void );
1882 /* Amount of stuff to slurp up with each read. */
1883 #ifndef YY_READ_BUF_SIZE
1884 #define YY_READ_BUF_SIZE 8192
1887 /* Copy whatever the last rule matched to the standard output. */
1889 /* This used to be an fputs(), but since the string might contain NUL's,
1890 * we now use fwrite().
1892 #define ECHO fwrite( yytext, yyleng, 1, yyout )
1895 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1896 * is returned in "result".
1899 #define YY_INPUT(buf,result,max_size) \
1900 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1904 for ( n = 0; n < max_size && \
1905 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1906 buf[n] = (char) c; \
1908 buf[n++] = (char) c; \
1909 if ( c == EOF && ferror( yyin ) ) \
1910 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1916 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1918 if( errno != EINTR) \
1920 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1931 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1932 * we don't want an extra ';' after the "return" because that will cause
1933 * some compilers to complain about unreachable statements.
1936 #define yyterminate() return YY_NULL
1939 /* Number of entries by which start-condition stack grows. */
1940 #ifndef YY_START_STACK_INCR
1941 #define YY_START_STACK_INCR 25
1944 /* Report a fatal error. */
1945 #ifndef YY_FATAL_ERROR
1946 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1949 /* end tables serialization structures and prototypes */
1951 /* Default declaration of generated scanner - a define so the user can
1952 * easily add parameters.
1955 #define YY_DECL_IS_OURS 1
1957 extern int yylex (void);
1959 #define YY_DECL int yylex (void)
1960 #endif /* !YY_DECL */
1962 /* Code executed at the beginning of each rule, after yytext and yyleng
1965 #ifndef YY_USER_ACTION
1966 #define YY_USER_ACTION
1969 /* Code executed at the end of each rule. */
1971 #define YY_BREAK break;
1974 #define YY_RULE_SETUP \
1976 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1977 (yytext[yyleng - 1] == '\n'); \
1980 /** The main scanner function which does all the work.
1984 register yy_state_type yy_current_state;
1985 register char *yy_cp, *yy_bp;
1986 register int yy_act;
1988 #line 179 "parser.l"
1991 #line 1992 "parser.c"
2001 /* Create the reject buffer large enough to save one state per allowed character. */
2002 if ( ! (yy_state_buf) )
2003 (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE );
2004 if ( ! (yy_state_buf) )
2005 YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
2008 (yy_start) = 1; /* first start state */
2016 if ( ! YY_CURRENT_BUFFER ) {
2017 yyensure_buffer_stack ();
2018 YY_CURRENT_BUFFER_LVALUE =
2019 yy_create_buffer(yyin,YY_BUF_SIZE );
2022 yy_load_buffer_state( );
2025 while ( 1 ) /* loops until end-of-file is reached */
2027 yy_cp = (yy_c_buf_p);
2029 /* Support of yytext. */
2030 *yy_cp = (yy_hold_char);
2032 /* yy_bp points to the position in yy_ch_buf of the start of
2037 yy_current_state = (yy_start);
2038 yy_current_state += YY_AT_BOL();
2040 (yy_state_ptr) = (yy_state_buf);
2041 *(yy_state_ptr)++ = yy_current_state;
2046 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
2047 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2049 yy_current_state = (int) yy_def[yy_current_state];
2050 if ( yy_current_state >= 694 )
2051 yy_c = yy_meta[(unsigned int) yy_c];
2053 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2054 *(yy_state_ptr)++ = yy_current_state;
2057 while ( yy_base[yy_current_state] != 3806 );
2060 yy_current_state = *--(yy_state_ptr);
2061 (yy_lp) = yy_accept[yy_current_state];
2062 find_rule: /* we branch to this label when backing up */
2063 for ( ; ; ) /* until we find what rule we matched */
2065 if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
2067 yy_act = yy_acclist[(yy_lp)];
2068 if ( yy_act & YY_TRAILING_HEAD_MASK ||
2069 (yy_looking_for_trail_begin) )
2071 if ( yy_act == (yy_looking_for_trail_begin) )
2073 (yy_looking_for_trail_begin) = 0;
2074 yy_act &= ~YY_TRAILING_HEAD_MASK;
2078 else if ( yy_act & YY_TRAILING_MASK )
2080 (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
2081 (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
2085 (yy_full_match) = yy_cp;
2086 (yy_full_state) = (yy_state_ptr);
2087 (yy_full_lp) = (yy_lp);
2094 yy_current_state = *--(yy_state_ptr);
2095 (yy_lp) = yy_accept[yy_current_state];
2098 YY_DO_BEFORE_ACTION;
2100 do_action: /* This label is used only to access EOF actions. */
2103 { /* beginning of action switch */
2106 #line 181 "parser.l"
2109 * Fully-qualified algebraic move, possibly with promotion
2111 int skip1 = 0, skip2 = 0, skip3 = 0, promoted = 0;
2116 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2118 if (yytext[0] == '+') skip1 = skip3 = promoted = 1; /* [HGM] Shogi promoted */
2121 if (yytext[1+skip1] == '/') skip1++;
2123 /* remove the [xX:-] */
2124 if ((yytext[3+skip1] == 'x') || (yytext[3+skip1] == 'X') ||
2125 (yytext[3+skip1] == '-') || (yytext[3+skip1] == ':')) skip2 = 1;
2127 currentMoveString[0] = yytext[1+skip1];
2128 currentMoveString[1] = yytext[2+skip1];
2129 currentMoveString[2] = yytext[3+skip1+skip2];
2130 currentMoveString[3] = yytext[4+skip1+skip2];
2131 currentMoveString[4] = NULLCHAR;
2133 if (appData.debugMode) {
2134 fprintf(debugFP, "Parser Qa1b2: yyleng=%d\n",
2138 if (yyleng-skip1-skip2 > 5) { char c;
2139 if (yytext[yyleng-1] == ')') {
2140 c = currentMoveString[4] = ToLower(yytext[yyleng-2]);
2142 c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
2144 if(c == '+' && gameInfo.variant != VariantShogi) c = currentMoveString[4] = NULLCHAR; // + means check outside Shogi
2145 currentMoveString[5] = NULLCHAR;
2148 if (appData.debugMode) {
2149 fprintf(debugFP, "parser: %s\n", currentMoveString);
2151 /* [HGM] do not allow values beyond board size */
2152 if(currentMoveString[1] - ONE >= BOARD_HEIGHT ||
2153 currentMoveString[1] - ONE < 0 ||
2154 currentMoveString[0] - AAA >= BOARD_RGHT ||
2155 currentMoveString[3] - ONE >= BOARD_HEIGHT ||
2156 currentMoveString[3] - ONE < 0 ||
2157 currentMoveString[2] - AAA >= BOARD_RGHT ||
2158 currentMoveString[0] - AAA < BOARD_LEFT ||
2159 currentMoveString[2] - AAA < BOARD_LEFT )
2160 return ImpossibleMove;
2162 piece = boards[yyboardindex]
2163 [currentMoveString[1] - ONE][currentMoveString[0] - AAA];
2164 if(PieceToChar(piece) == '+' && appData.icsActive) promoted = 1, yytext[skip3] = PieceToChar(DEMOTED piece); // trust ICS
2165 if(promoted) piece = (ChessSquare) (DEMOTED piece);
2166 c = PieceToChar(piece);
2167 if(c == '~') c = PieceToChar((ChessSquare) (DEMOTED piece));
2168 if (ToLower(yytext[skip3]) != ToLower(c))
2169 return (int) IllegalMove;
2171 result = LegalityTest(boards[yyboardindex],
2172 PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
2173 currentMoveString[1] - ONE,
2174 currentMoveString[0] - AAA,
2175 currentMoveString[3] - ONE,
2176 currentMoveString[2] - AAA,
2177 currentMoveString[4]);
2179 if (currentMoveString[4] == NULLCHAR) {
2180 if(result == WhitePromotion || result == BlackPromotion) {
2181 if(gameInfo.variant == VariantCourier || gameInfo.variant == VariantShatranj)
2182 currentMoveString[4] = PieceToChar(BlackFerz);
2183 else if(gameInfo.variant == VariantGreat)
2184 currentMoveString[4] = PieceToChar(BlackMan);
2185 else if(gameInfo.variant == VariantShogi)
2186 currentMoveString[4] = '+';
2188 currentMoveString[4] = PieceToChar(BlackQueen);
2189 } else if(result == WhiteNonPromotion || result == BlackNonPromotion)
2190 currentMoveString[4] = '=';
2191 currentMoveString[5] = NULLCHAR;
2194 return (int) result;
2199 #line 271 "parser.l"
2202 * Simple algebraic move, possibly with promotion
2203 * [HGM] Engine moves are received in this format, with lower-case promoChar!
2208 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2210 /* remove the [xX:-] */
2211 if ((yytext[2] == 'x') || (yytext[2] == 'X') ||
2212 (yytext[2] == '-') || (yytext[2] == ':')) skip = 1;
2214 currentMoveString[0] = yytext[0];
2215 currentMoveString[1] = yytext[1];
2216 currentMoveString[2] = yytext[2+skip];
2217 currentMoveString[3] = yytext[3+skip];
2218 currentMoveString[4] = NULLCHAR;
2220 if (yyleng-skip > 4) { char c;
2221 if (yytext[yyleng-1] == ')') {
2222 c = currentMoveString[4] = ToLower(yytext[yyleng-2]);
2224 c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
2226 if(c == '+' && gameInfo.variant != VariantShogi) currentMoveString[4] = NULLCHAR; // + means check outside Shogi
2227 currentMoveString[5] = NULLCHAR;
2230 /* [HGM] do not allow values beyond board size */
2231 if(currentMoveString[1] - ONE >= BOARD_HEIGHT ||
2232 currentMoveString[1] - ONE < 0 ||
2233 currentMoveString[0] - AAA >= BOARD_RGHT ||
2234 currentMoveString[3] - ONE >= BOARD_HEIGHT ||
2235 currentMoveString[3] - ONE < 0 ||
2236 currentMoveString[2] - AAA >= BOARD_RGHT ||
2237 currentMoveString[0] - AAA < BOARD_LEFT ||
2238 currentMoveString[2] - AAA < BOARD_LEFT )
2239 return ImpossibleMove;
2241 result = LegalityTest(boards[yyboardindex],
2242 PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
2243 currentMoveString[1] - ONE,
2244 currentMoveString[0] - AAA,
2245 currentMoveString[3] - ONE,
2246 currentMoveString[2] - AAA,
2247 currentMoveString[4]);
2249 if (currentMoveString[4] == NULLCHAR) {
2250 if(result == WhitePromotion || result == BlackPromotion) {
2251 if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier || gameInfo.variant == VariantMakruk)
2252 currentMoveString[4] = PieceToChar(BlackFerz);
2253 else if(gameInfo.variant == VariantGreat)
2254 currentMoveString[4] = PieceToChar(BlackMan);
2255 else if(gameInfo.variant == VariantShogi)
2256 currentMoveString[4] = '+'; // Queen might not be defined in mini variants!
2258 currentMoveString[4] = PieceToChar(BlackQueen);
2259 } else if(result == WhiteNonPromotion || result == BlackNonPromotion)
2260 currentMoveString[4] = '=';
2261 currentMoveString[5] = NULLCHAR;
2262 } else if(appData.testLegality && gameInfo.variant != VariantSChess && // strip off unnecessary and false promo characters
2263 !(result == WhitePromotion || result == BlackPromotion ||
2264 result == WhiteNonPromotion || result == BlackNonPromotion)) currentMoveString[4] = NULLCHAR;
2266 return (int) result;
2271 #line 340 "parser.l"
2274 * Simple algebraic move, in capitals
2275 * [HGM] Some Xiangqi engines use this format ('ICCS notation'). So no promotions!
2280 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2282 /* remove the [xX:-] */
2283 if ((yytext[2] == 'x') || (yytext[2] == 'X') ||
2284 (yytext[2] == '-') || (yytext[2] == ':')) skip = 1;
2286 currentMoveString[0] = yytext[0]+32;
2287 currentMoveString[1] = yytext[1];
2288 currentMoveString[2] = yytext[2+skip]+32;
2289 currentMoveString[3] = yytext[3+skip];
2290 currentMoveString[4] = NULLCHAR;
2292 /* [HGM] do not allow values beyond board size */
2293 if(currentMoveString[1] - ONE >= BOARD_HEIGHT ||
2294 currentMoveString[1] - ONE < 0 ||
2295 currentMoveString[0] - AAA >= BOARD_RGHT ||
2296 currentMoveString[3] - ONE >= BOARD_HEIGHT ||
2297 currentMoveString[3] - ONE < 0 ||
2298 currentMoveString[2] - AAA >= BOARD_RGHT ||
2299 currentMoveString[0] - AAA < BOARD_LEFT ||
2300 currentMoveString[2] - AAA < BOARD_LEFT )
2301 return ImpossibleMove;
2303 result = LegalityTest(boards[yyboardindex],
2304 PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
2305 currentMoveString[1] - ONE,
2306 currentMoveString[0] - AAA,
2307 currentMoveString[3] - ONE,
2308 currentMoveString[2] - AAA,
2309 currentMoveString[4]);
2311 return (int) result;
2316 #line 382 "parser.l"
2319 * Pawn move, possibly with promotion
2321 DisambiguateClosure cl;
2324 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2326 /* remove the =() */
2327 if (yytext[2] == '=' && yytext[3] != NULLCHAR) skip++;
2328 if (yytext[2+skip] == '(') skip++;
2330 cl.pieceIn = WhiteOnMove(yyboardindex) ? WhitePawn : BlackPawn;
2332 cl.ffIn = yytext[0] - AAA;
2333 cl.rtIn = yytext[1] - ONE;
2334 cl.ftIn = yytext[0] - AAA;
2335 cl.promoCharIn = ToLower(yytext[2+skip]);
2336 if(cl.promoCharIn == '+' && gameInfo.variant != VariantShogi) cl.promoCharIn = NULLCHAR; // + means check outside Shogi
2338 /* [HGM] do not allow values beyond board size */
2339 if(cl.rtIn >= BOARD_HEIGHT ||
2341 cl.ffIn >= BOARD_RGHT ||
2342 cl.ftIn < BOARD_LEFT )
2343 return ImpossibleMove;
2345 Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);
2347 currentMoveString[0] = cl.ff + AAA;
2348 currentMoveString[1] = cl.rf + ONE;
2349 currentMoveString[2] = cl.ft + AAA;
2350 currentMoveString[3] = cl.rt + ONE;
2351 currentMoveString[4] = cl.promoChar;
2352 currentMoveString[5] = NULLCHAR;
2354 return (int) cl.kind;
2359 #line 423 "parser.l"
2362 * Pawn capture, possibly with promotion, possibly ambiguous
2364 DisambiguateClosure cl;
2365 int skip1 = 0, skip2 = 0;
2367 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2369 /* remove trailing ep or e.p. (nonstandard PGN) */
2370 if (yytext[yyleng-1] == 'p') {
2372 yytext[yyleng] = NULLCHAR;
2373 } else if (yytext[yyleng-1] == '.') {
2375 yytext[yyleng] = NULLCHAR;
2378 /* remove the [xX:-] and =() */
2379 if ((yytext[1] == 'x') || (yytext[1] == 'X')
2380 || (yytext[1] == ':') || (yytext[1] == '-')) skip1 = 1;
2381 if (yytext[2+skip1] == '=' && yytext[3+skip1] != NULLCHAR) skip2++;
2382 if (yytext[2+skip1+skip2] == '(') skip2++;
2384 cl.pieceIn = WhiteOnMove(yyboardindex) ? WhitePawn : BlackPawn;
2386 cl.ffIn = yytext[0] - AAA;
2388 cl.ftIn = yytext[1+skip1] - AAA;
2389 cl.promoCharIn = yytext[2+skip1+skip2];
2390 if(cl.promoCharIn == '+' && gameInfo.variant != VariantShogi) cl.promoCharIn = NULLCHAR; // + means check outside Shogi
2392 /* [HGM] do not allow values beyond board size */
2393 if(cl.ffIn >= BOARD_RGHT ||
2394 cl.ffIn < BOARD_LEFT ||
2395 cl.ftIn >= BOARD_RGHT ||
2396 cl.ftIn < BOARD_LEFT )
2397 return ImpossibleMove;
2399 Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);
2401 currentMoveString[0] = cl.ff + AAA;
2402 currentMoveString[1] = cl.rf + ONE;
2403 currentMoveString[2] = cl.ft + AAA;
2404 currentMoveString[3] = cl.rt + ONE;
2405 currentMoveString[4] = cl.promoChar;
2406 currentMoveString[5] = NULLCHAR;
2408 return (int) cl.kind;
2413 #line 474 "parser.l"
2416 * unambiguously abbreviated Pawn capture, possibly with promotion
2419 ChessMove result; char c;
2421 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2423 /* remove trailing ep or e.p. (nonstandard PGN) */
2424 if (yytext[yyleng-1] == 'p') {
2426 yytext[yyleng] = NULLCHAR;
2427 } else if (yytext[yyleng-1] == '.') {
2429 yytext[yyleng] = NULLCHAR;
2432 /* remove the [xX:-] */
2433 if ((yytext[1] == 'x') || (yytext[1] == 'X')
2434 || (yytext[1] == ':') || (yytext[1] == '-')) skip = 1;
2436 currentMoveString[0] = yytext[0];
2437 currentMoveString[2] = yytext[1+skip];
2438 currentMoveString[3] = yytext[2+skip];
2440 /* [HGM] do not allow values beyond board size */
2441 if(currentMoveString[0] - AAA >= BOARD_RGHT ||
2442 currentMoveString[3] - ONE >= BOARD_HEIGHT ||
2443 currentMoveString[3] - ONE < 0 ||
2444 currentMoveString[2] - AAA >= BOARD_RGHT ||
2445 currentMoveString[0] - AAA < BOARD_LEFT ||
2446 currentMoveString[2] - AAA < BOARD_LEFT )
2447 return ImpossibleMove;
2449 if (gameInfo.variant == VariantXiangqi && /* [HGM] In Xiangqi rank stays same */
2450 currentMoveString[0] != currentMoveString[2] ) {
2451 currentMoveString[1] = yytext[2+skip];
2453 if (WhiteOnMove(yyboardindex)) {
2454 if (yytext[2+skip] == ONE) return (int) ImpossibleMove;
2455 currentMoveString[1] = yytext[2+skip] - 1;
2456 if(boards[yyboardindex][currentMoveString[1]-ONE][currentMoveString[0]-AAA] != WhitePawn)
2457 return ImpossibleMove;
2459 currentMoveString[1] = currentMoveString[3] + 1;
2460 if (currentMoveString[3] == ONE+BOARD_HEIGHT-1) return (int) ImpossibleMove;
2461 if(boards[yyboardindex][currentMoveString[1]-ONE][currentMoveString[0]-AAA] != BlackPawn)
2462 return ImpossibleMove;
2464 if (yyleng-skip > 3) {
2465 if (yytext[yyleng-1] == ')')
2466 c = currentMoveString[4] = ToLower(yytext[yyleng-2]);
2468 c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
2469 currentMoveString[5] = NULLCHAR;
2470 if(c == '+' && gameInfo.variant != VariantShogi) c = currentMoveString[4] = NULLCHAR; // + means check outside Shogi
2472 currentMoveString[4] = NULLCHAR;
2475 result = LegalityTest(boards[yyboardindex],
2476 PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
2477 currentMoveString[1] - ONE,
2478 currentMoveString[0] - AAA,
2479 currentMoveString[3] - ONE,
2480 currentMoveString[2] - AAA,
2481 currentMoveString[4]);
2483 if (currentMoveString[4] == NULLCHAR) {
2484 if(result == WhitePromotion || result == BlackPromotion) {
2485 currentMoveString[4] = PieceToChar(BlackQueen);
2486 // [HGM] shatranj: take care of variants without Queen
2487 if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier || gameInfo.variant == VariantMakruk)
2488 currentMoveString[4] = PieceToChar(BlackFerz);
2489 if(gameInfo.variant == VariantGreat)
2490 currentMoveString[4] = PieceToChar(BlackMan);
2491 if(gameInfo.variant == VariantShogi)
2492 currentMoveString[4] = '+';
2493 } else if(result == WhiteNonPromotion || result == BlackNonPromotion)
2494 currentMoveString[4] = '=';
2495 currentMoveString[5] = NULLCHAR;
2498 if (result != IllegalMove) return (int) result;
2500 /* Special case: improperly written en passant capture */
2501 if (WhiteOnMove(yyboardindex)) {
2502 if (currentMoveString[3] == '5') {
2503 currentMoveString[1] = '5';
2504 currentMoveString[3] = '6';
2506 return (int) IllegalMove;
2509 if (currentMoveString[3] == '4') {
2510 currentMoveString[1] = '4';
2511 currentMoveString[3] = '3';
2513 return (int) IllegalMove;
2517 result = LegalityTest(boards[yyboardindex],
2518 PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
2519 currentMoveString[1] - ONE,
2520 currentMoveString[0] - AAA,
2521 currentMoveString[3] - ONE,
2522 currentMoveString[2] - AAA,
2523 currentMoveString[4]);
2525 if (result == WhiteCapturesEnPassant || result == BlackCapturesEnPassant)
2526 return (int) result;
2527 else { // [HGM] all very nice, but this messed up the input move that we might want to accept with legality testing off...
2528 if (WhiteOnMove(yyboardindex)) // undo the damage
2529 currentMoveString[1]--, currentMoveString[3]--;
2530 else currentMoveString[1]++, currentMoveString[3]++;
2531 return (int) IllegalMove;
2537 #line 595 "parser.l"
2540 * piece move, possibly ambiguous
2542 DisambiguateClosure cl;
2543 int skip = 0, skip2 = 0, promoted = 0;
2545 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2547 if(yytext[0] == '+') promoted = skip = skip2 = 1;
2549 /* remove the [xX:-] */
2550 if ((yytext[1+skip] == 'x') || (yytext[1+skip] == 'X')
2551 || (yytext[1+skip] == ':') || (yytext[1+skip] == '-')) skip++;
2553 if (WhiteOnMove(yyboardindex)) {
2554 cl.pieceIn = CharToPiece(ToUpper(yytext[skip2]));
2556 cl.pieceIn = CharToPiece(ToLower(yytext[skip2]));
2558 if(promoted) cl.pieceIn = (ChessSquare) (PROMOTED cl.pieceIn);
2562 cl.rtIn = yytext[2+skip] - ONE;
2563 cl.ftIn = yytext[1+skip] - AAA;
2564 cl.promoCharIn = NULLCHAR;
2566 if(yyleng-skip > 3) /* [HGM] in some variants pieces promote */
2567 cl.promoCharIn = yytext[yyleng-1-(yytext[yyleng-1]==')')];
2568 if(cl.promoCharIn == '+' && gameInfo.variant != VariantShogi) cl.promoCharIn = NULLCHAR; // + means check outside Shogi
2570 if (appData.debugMode) {
2571 fprintf(debugFP, "Parser Qa1: yyleng=%d, %d(%d,%d)-(%d,%d) = %d (%c)\n",
2573 cl.pieceIn,cl.ffIn,cl.rfIn,cl.ftIn,cl.rtIn,cl.promoCharIn,cl.promoCharIn?cl.promoCharIn:' ');
2576 /* [HGM] but do not allow values beyond board size */
2577 if(cl.rtIn >= BOARD_HEIGHT ||
2579 cl.ftIn >= BOARD_RGHT ||
2580 cl.ftIn < BOARD_LEFT )
2581 return ImpossibleMove;
2583 Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);
2585 currentMoveString[0] = cl.ff + AAA;
2586 currentMoveString[1] = cl.rf + ONE;
2587 currentMoveString[2] = cl.ft + AAA;
2588 currentMoveString[3] = cl.rt + ONE;
2589 currentMoveString[4] = cl.promoChar;
2590 currentMoveString[5] = NULLCHAR;
2592 return (int) cl.kind;
2597 #line 652 "parser.l"
2600 * piece move with rank or file disambiguator
2602 DisambiguateClosure cl;
2603 int skip = 0, skip2 = 0; int promoted=0;
2605 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2607 if(yytext[0]=='+') promoted = skip = skip2 = 1;
2609 /* remove the [xX:-] */
2610 if ((yytext[2+skip] == 'x') || (yytext[2+skip] == 'X')
2611 || (yytext[2+skip] == ':') || (yytext[2+skip] == '-')) skip++;
2613 if (WhiteOnMove(yyboardindex)) {
2614 cl.pieceIn = CharToPiece(ToUpper(yytext[skip2]));
2616 cl.pieceIn = CharToPiece(ToLower(yytext[skip2]));
2618 if(promoted) cl.pieceIn = (ChessSquare) (PROMOTED cl.pieceIn);
2620 if (isalpha(yytext[1+skip2])) {
2622 cl.ffIn = yytext[1+skip2] - AAA;
2624 if(cl.ffIn >= BOARD_RGHT ||
2625 cl.ffIn < BOARD_LEFT ) return 0;
2627 cl.rfIn = yytext[1+skip2] - ONE;
2629 if(cl.rfIn >= BOARD_HEIGHT ||
2630 cl.rfIn < 0) return 0;
2632 cl.rtIn = yytext[3+skip] - ONE;
2633 cl.ftIn = yytext[2+skip] - AAA;
2634 cl.promoCharIn = NULLCHAR;
2636 if(yyleng-skip > 4) /* [HGM] in some variants pieces promote */
2637 cl.promoCharIn = yytext[yyleng-1-(yytext[yyleng-1]==')')];
2638 if(cl.promoCharIn == '+' && gameInfo.variant != VariantShogi) cl.promoCharIn = NULLCHAR; // + means check outside Shogi
2640 /* [HGM] do not allow values beyond board size */
2641 if(cl.rtIn >= BOARD_HEIGHT ||
2643 cl.ftIn >= BOARD_RGHT ||
2644 cl.ftIn < BOARD_LEFT )
2645 return ImpossibleMove;
2647 Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);
2649 currentMoveString[0] = cl.ff + AAA;
2650 currentMoveString[1] = cl.rf + ONE;
2651 currentMoveString[2] = cl.ft + AAA;
2652 currentMoveString[3] = cl.rt + ONE;
2653 currentMoveString[4] = cl.promoChar;
2654 currentMoveString[5] = NULLCHAR;
2656 return (int) cl.kind;
2661 #line 713 "parser.l"
2665 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2667 /* [HGM] all squares referenced to board edges in stead of absolute */
2668 if (WhiteOnMove(yyboardindex)) {
2669 if (boards[yyboardindex][0][(BOARD_WIDTH-1)>>1] == WhiteKing) {
2670 /* ICS wild castling */
2672 ff = (BOARD_WIDTH-1)>>1;
2677 ff = BOARD_WIDTH>>1;
2682 if (boards[yyboardindex][BOARD_HEIGHT-1][(BOARD_WIDTH-1)>>1] == BlackKing) {
2683 /* ICS wild castling */
2684 rf = BOARD_HEIGHT-1;
2685 ff = (BOARD_WIDTH-1)>>1;
2686 rt = BOARD_HEIGHT-1;
2689 rf = BOARD_HEIGHT-1;
2690 ff = BOARD_WIDTH>>1;
2691 rt = BOARD_HEIGHT-1;
2695 if(PosFlags(0) & F_FRC_TYPE_CASTLING) {
2697 if (WhiteOnMove(yyboardindex)) {
2698 ff = initialRights[2];
2699 ft = initialRights[1];
2701 ff = initialRights[5];
2702 ft = initialRights[4];
2704 if (appData.debugMode)
2706 fprintf(debugFP, "Parser FRC long %d %d\n", ff, ft);
2708 if(ff < 0 || ft < 0) return 0;
2710 sprintf(currentMoveString, "%c%c%c%c",ff+AAA,rf+ONE,ft+AAA,rt+ONE);
2711 if (appData.debugMode) {
2712 fprintf(debugFP, "long castling %d %d\n", ff, ft);
2714 return (int) LegalityTest(boards[yyboardindex],
2715 PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: e.p.!
2716 rf, ff, rt, ft, NULLCHAR);
2721 #line 770 "parser.l"
2725 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2727 if (WhiteOnMove(yyboardindex)) {
2728 if (boards[yyboardindex][0][(BOARD_WIDTH-1)>>1] == WhiteKing) {
2729 /* ICS wild castling */
2731 ff = (BOARD_WIDTH-1)>>1;
2736 ff = BOARD_WIDTH>>1;
2741 if (boards[yyboardindex][BOARD_HEIGHT-1][(BOARD_WIDTH-1)>>1] == BlackKing) {
2742 /* ICS wild castling */
2743 rf = BOARD_HEIGHT-1;
2744 ff = (BOARD_WIDTH-1)>>1;
2745 rt = BOARD_HEIGHT-1;
2748 rf = BOARD_HEIGHT-1;
2749 ff = BOARD_WIDTH>>1;
2750 rt = BOARD_HEIGHT-1;
2754 if(PosFlags(0) & F_FRC_TYPE_CASTLING) {
2755 if (WhiteOnMove(yyboardindex)) {
2756 ff = initialRights[2];
2757 ft = initialRights[0];
2759 ff = initialRights[5];
2760 ft = initialRights[3];
2762 if (appData.debugMode) {
2763 fprintf(debugFP, "Parser FRC short %d %d\n", ff, ft);
2765 if(ff < 0 || ft < 0) return 0;
2767 sprintf(currentMoveString, "%c%c%c%c",ff+AAA,rf+ONE,ft+AAA,rt+ONE);
2768 if (appData.debugMode) {
2769 fprintf(debugFP, "short castling %d %d\n", ff, ft);
2772 return (int) LegalityTest(boards[yyboardindex],
2773 PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: e.p.!
2774 rf, ff, rt, ft, NULLCHAR);
2779 #line 825 "parser.l"
2782 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2784 /* Bughouse piece drop. */
2785 currentMoveString[1] = '@';
2786 currentMoveString[2] = yytext[2];
2787 currentMoveString[3] = yytext[3];
2788 currentMoveString[4] = NULLCHAR;
2790 if (appData.debugMode) {
2791 fprintf(debugFP, "Drop: %s\n", currentMoveString);
2793 /* [HGM] do not allow values beyond board size */
2794 if(currentMoveString[3] - ONE >= BOARD_HEIGHT ||
2795 currentMoveString[2] - AAA >= BOARD_WIDTH )
2796 return ImpossibleMove;
2798 if (WhiteOnMove(yyboardindex)) {
2799 currentMoveString[0] = ToUpper(yytext[0]);
2801 currentMoveString[0] = ToLower(yytext[0]);
2803 if(CharToPiece(currentMoveString[0]) == EmptySquare) return ImpossibleMove; // Unknown piece;
2805 return LegalityTest(boards[yyboardindex], PosFlags(yyboardindex), DROP_RANK, // [HGM] does drops now too
2806 CharToPiece(currentMoveString[0]), currentMoveString[3] - ONE, currentMoveString[2] - AAA, NULLCHAR);
2811 #line 854 "parser.l"
2813 if (WhiteOnMove(yyboardindex))
2814 return (int) BlackWins;
2816 return (int) WhiteWins;
2821 #line 861 "parser.l"
2823 return (int) (ToUpper(yytext[0]) == 'W' ? BlackWins : WhiteWins);
2828 #line 865 "parser.l"
2830 return (int) GameUnfinished;
2835 #line 869 "parser.l"
2837 return (int) GameIsDrawn;
2842 #line 873 "parser.l"
2844 return (int) GameIsDrawn;
2849 #line 877 "parser.l"
2851 if (WhiteOnMove(yyboardindex))
2852 return (int) BlackWins;
2854 return (int) WhiteWins;
2859 #line 884 "parser.l"
2861 if (WhiteOnMove(yyboardindex))
2862 return (int) BlackWins;
2864 return (int) WhiteWins;
2869 #line 891 "parser.l"
2871 return (int) GameIsDrawn;
2876 #line 895 "parser.l"
2878 return (int) GameIsDrawn;
2883 #line 899 "parser.l"
2885 return (int) (ToUpper(yytext[0]) == 'W' ? WhiteWins : BlackWins);
2890 #line 903 "parser.l"
2892 return (int) (ToUpper(yytext[0]) == 'W' ? BlackWins : WhiteWins);
2896 /* rule 23 can match eol */
2898 #line 907 "parser.l"
2900 return (int) WhiteWins;
2904 /* rule 24 can match eol */
2906 #line 911 "parser.l"
2908 return (int) BlackWins;
2912 /* rule 25 can match eol */
2914 #line 915 "parser.l"
2916 return (int) GameIsDrawn;
2920 /* rule 26 can match eol */
2922 #line 919 "parser.l"
2924 return (int) GameUnfinished;
2928 /* rule 27 can match eol */
2930 #line 923 "parser.l"
2933 if ((yyleng == 1) && (yytext[0] == '1'))
2934 return (int) MoveNumberOne;
2935 else return (int) Nothing; // [HGM] make sure something is returned, for gathering parsed text
2940 #line 930 "parser.l"
2942 /* elapsed time indication, e.g. (0:12) or {10:21.071} */
2943 return (int) ElapsedTime;
2947 /* rule 29 can match eol */
2949 #line 935 "parser.l"
2951 /* position diagram enclosed in [-- --] */
2952 return (int) PositionDiagram;
2956 /* rule 30 can match eol */
2957 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
2958 (yy_c_buf_p) = yy_cp -= 1;
2959 YY_DO_BEFORE_ACTION; /* set up yytext again */
2961 #line 940 "parser.l"
2963 /* position diagram enclosed in {-- --} */
2964 return (int) PositionDiagram;
2968 /* rule 31 can match eol */
2970 #line 945 "parser.l"
2972 return (int) PGNTag;
2977 #line 949 "parser.l"
2979 return (int) GNUChessGame;
2983 /* rule 33 can match eol */
2984 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
2985 (yy_c_buf_p) = yy_cp -= 1;
2986 YY_DO_BEFORE_ACTION; /* set up yytext again */
2988 #line 953 "parser.l"
2990 return (int) XBoardGame;
2995 #line 957 "parser.l"
2996 { /* numeric annotation glyph */
3001 /* rule 35 can match eol */
3003 #line 961 "parser.l"
3004 { /* anything in {} */
3005 return (int) Comment;
3009 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
3010 (yy_c_buf_p) = yy_cp -= 1;
3011 YY_DO_BEFORE_ACTION; /* set up yytext again */
3013 #line 965 "parser.l"
3014 { /* ; to end of line */
3015 return (int) Comment;
3019 /* rule 37 can match eol */
3021 #line 969 "parser.l"
3022 { /* anything in [] */
3023 return (int) Comment;
3028 #line 973 "parser.l"
3029 { /* Opening parentheses */
3035 #line 977 "parser.l"
3036 { /* closing parentheses */
3041 /* rule 40 can match eol */
3043 #line 981 "parser.l"
3045 return (int) Nothing; /* Skip mail headers */
3050 #line 985 "parser.l"
3052 return (int) Nothing; /* Skip random words */
3056 /* rule 42 can match eol */
3058 #line 989 "parser.l"
3060 return (int) Nothing; /* Skip everything else */
3065 #line 993 "parser.l"
3068 #line 3069 "parser.c"
3069 case YY_STATE_EOF(INITIAL):
3072 case YY_END_OF_BUFFER:
3074 /* Amount of text matched not including the EOB char. */
3075 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
3077 /* Undo the effects of YY_DO_BEFORE_ACTION. */
3078 *yy_cp = (yy_hold_char);
3079 YY_RESTORE_YY_MORE_OFFSET
3081 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
3083 /* We're scanning a new file or input source. It's
3084 * possible that this happened because the user
3085 * just pointed yyin at a new source and called
3086 * yylex(). If so, then we have to assure
3087 * consistency between YY_CURRENT_BUFFER and our
3088 * globals. Here is the right place to do so, because
3089 * this is the first action (other than possibly a
3090 * back-up) that will match for the new input source.
3092 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3093 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
3094 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
3097 /* Note that here we test for yy_c_buf_p "<=" to the position
3098 * of the first EOB in the buffer, since yy_c_buf_p will
3099 * already have been incremented past the NUL character
3100 * (since all states make transitions on EOB to the
3101 * end-of-buffer state). Contrast this with the test
3104 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3105 { /* This was really a NUL. */
3106 yy_state_type yy_next_state;
3108 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
3110 yy_current_state = yy_get_previous_state( );
3112 /* Okay, we're now positioned to make the NUL
3113 * transition. We couldn't have
3114 * yy_get_previous_state() go ahead and do it
3115 * for us because it doesn't know how to deal
3116 * with the possibility of jamming (and we don't
3117 * want to build jamming into it because then it
3118 * will run more slowly).
3121 yy_next_state = yy_try_NUL_trans( yy_current_state );
3123 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3125 if ( yy_next_state )
3127 /* Consume the NUL. */
3128 yy_cp = ++(yy_c_buf_p);
3129 yy_current_state = yy_next_state;
3135 yy_cp = (yy_c_buf_p);
3136 goto yy_find_action;
3140 else switch ( yy_get_next_buffer( ) )
3142 case EOB_ACT_END_OF_FILE:
3144 (yy_did_buffer_switch_on_eof) = 0;
3148 /* Note: because we've taken care in
3149 * yy_get_next_buffer() to have set up
3150 * yytext, we can now set up
3151 * yy_c_buf_p so that if some total
3152 * hoser (like flex itself) wants to
3153 * call the scanner after we return the
3154 * YY_NULL, it'll still work - another
3155 * YY_NULL will get returned.
3157 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
3159 yy_act = YY_STATE_EOF(YY_START);
3165 if ( ! (yy_did_buffer_switch_on_eof) )
3171 case EOB_ACT_CONTINUE_SCAN:
3173 (yytext_ptr) + yy_amount_of_matched_text;
3175 yy_current_state = yy_get_previous_state( );
3177 yy_cp = (yy_c_buf_p);
3178 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3181 case EOB_ACT_LAST_MATCH:
3183 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
3185 yy_current_state = yy_get_previous_state( );
3187 yy_cp = (yy_c_buf_p);
3188 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3189 goto yy_find_action;
3196 "fatal flex scanner internal error--no action found" );
3197 } /* end of action switch */
3198 } /* end of scanning one token */
3199 } /* end of yylex */
3201 /* yy_get_next_buffer - try to read in a new buffer
3203 * Returns a code representing an action:
3204 * EOB_ACT_LAST_MATCH -
3205 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
3206 * EOB_ACT_END_OF_FILE - end of file
3208 static int yy_get_next_buffer (void)
3210 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
3211 register char *source = (yytext_ptr);
3212 register int number_to_move, i;
3215 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
3217 "fatal flex scanner internal error--end of buffer missed" );
3219 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
3220 { /* Don't try to fill the buffer, so this is an EOF. */
3221 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
3223 /* We matched a single character, the EOB, so
3224 * treat this as a final EOF.
3226 return EOB_ACT_END_OF_FILE;
3231 /* We matched some text prior to the EOB, first
3234 return EOB_ACT_LAST_MATCH;
3238 /* Try to read more data. */
3240 /* First move last chars to start of buffer. */
3241 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
3243 for ( i = 0; i < number_to_move; ++i )
3244 *(dest++) = *(source++);
3246 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
3247 /* don't do the read, it's not guaranteed to return an EOF,
3250 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
3255 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
3257 while ( num_to_read <= 0 )
3258 { /* Not enough room in the buffer - grow it. */
3261 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
3265 if ( num_to_read > YY_READ_BUF_SIZE )
3266 num_to_read = YY_READ_BUF_SIZE;
3268 /* Read in more data. */
3269 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
3270 (yy_n_chars), (size_t) num_to_read );
3272 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3275 if ( (yy_n_chars) == 0 )
3277 if ( number_to_move == YY_MORE_ADJ )
3279 ret_val = EOB_ACT_END_OF_FILE;
3285 ret_val = EOB_ACT_LAST_MATCH;
3286 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
3287 YY_BUFFER_EOF_PENDING;
3292 ret_val = EOB_ACT_CONTINUE_SCAN;
3294 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
3295 /* Extend the array by 50%, plus the number we really need. */
3296 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
3297 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
3298 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3299 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
3302 (yy_n_chars) += number_to_move;
3303 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
3304 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
3306 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
3311 /* yy_get_previous_state - get the state just before the EOB char was reached */
3313 static yy_state_type yy_get_previous_state (void)
3315 register yy_state_type yy_current_state;
3316 register char *yy_cp;
3318 yy_current_state = (yy_start);
3319 yy_current_state += YY_AT_BOL();
3321 (yy_state_ptr) = (yy_state_buf);
3322 *(yy_state_ptr)++ = yy_current_state;
3324 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
3326 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
3327 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3329 yy_current_state = (int) yy_def[yy_current_state];
3330 if ( yy_current_state >= 694 )
3331 yy_c = yy_meta[(unsigned int) yy_c];
3333 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3334 *(yy_state_ptr)++ = yy_current_state;
3337 return yy_current_state;
3340 /* yy_try_NUL_trans - try to make a transition on the NUL character
3343 * next_state = yy_try_NUL_trans( current_state );
3345 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
3347 register int yy_is_jam;
3349 register YY_CHAR yy_c = 1;
3350 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3352 yy_current_state = (int) yy_def[yy_current_state];
3353 if ( yy_current_state >= 694 )
3354 yy_c = yy_meta[(unsigned int) yy_c];
3356 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3357 yy_is_jam = (yy_current_state == 693);
3359 *(yy_state_ptr)++ = yy_current_state;
3361 return yy_is_jam ? 0 : yy_current_state;
3364 static void yyunput (int c, register char * yy_bp )
3366 register char *yy_cp;
3368 yy_cp = (yy_c_buf_p);
3370 /* undo effects of setting up yytext */
3371 *yy_cp = (yy_hold_char);
3373 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3374 { /* need to shift things up to make room */
3375 /* +2 for EOB chars. */
3376 register int number_to_move = (yy_n_chars) + 2;
3377 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
3378 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
3379 register char *source =
3380 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
3382 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3383 *--dest = *--source;
3385 yy_cp += (int) (dest - source);
3386 yy_bp += (int) (dest - source);
3387 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
3388 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
3390 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3391 YY_FATAL_ERROR( "flex scanner push-back overflow" );
3394 *--yy_cp = (char) c;
3396 (yytext_ptr) = yy_bp;
3397 (yy_hold_char) = *yy_cp;
3398 (yy_c_buf_p) = yy_cp;
3403 static int yyinput (void)
3405 static int input (void)
3411 *(yy_c_buf_p) = (yy_hold_char);
3413 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
3415 /* yy_c_buf_p now points to the character we want to return.
3416 * If this occurs *before* the EOB characters, then it's a
3417 * valid NUL; if not, then we've hit the end of the buffer.
3419 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3420 /* This was really a NUL. */
3421 *(yy_c_buf_p) = '\0';
3424 { /* need more input */
3425 int offset = (yy_c_buf_p) - (yytext_ptr);
3428 switch ( yy_get_next_buffer( ) )
3430 case EOB_ACT_LAST_MATCH:
3431 /* This happens because yy_g_n_b()
3432 * sees that we've accumulated a
3433 * token and flags that we need to
3434 * try matching the token before
3435 * proceeding. But for input(),
3436 * there's no matching to consider.
3437 * So convert the EOB_ACT_LAST_MATCH
3438 * to EOB_ACT_END_OF_FILE.
3441 /* Reset buffer status. */
3446 case EOB_ACT_END_OF_FILE:
3451 if ( ! (yy_did_buffer_switch_on_eof) )
3460 case EOB_ACT_CONTINUE_SCAN:
3461 (yy_c_buf_p) = (yytext_ptr) + offset;
3467 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
3468 *(yy_c_buf_p) = '\0'; /* preserve yytext */
3469 (yy_hold_char) = *++(yy_c_buf_p);
3471 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
3475 #endif /* ifndef YY_NO_INPUT */
3477 /** Immediately switch to a different input stream.
3478 * @param input_file A readable stream.
3480 * @note This function does not reset the start condition to @c INITIAL .
3482 void yyrestart (FILE * input_file )
3485 if ( ! YY_CURRENT_BUFFER ){
3486 yyensure_buffer_stack ();
3487 YY_CURRENT_BUFFER_LVALUE =
3488 yy_create_buffer(yyin,YY_BUF_SIZE );
3491 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
3492 yy_load_buffer_state( );
3495 /** Switch to a different input buffer.
3496 * @param new_buffer The new input buffer.
3499 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
3502 /* TODO. We should be able to replace this entire function body
3504 * yypop_buffer_state();
3505 * yypush_buffer_state(new_buffer);
3507 yyensure_buffer_stack ();
3508 if ( YY_CURRENT_BUFFER == new_buffer )
3511 if ( YY_CURRENT_BUFFER )
3513 /* Flush out information for old buffer. */
3514 *(yy_c_buf_p) = (yy_hold_char);
3515 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3516 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3519 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3520 yy_load_buffer_state( );
3522 /* We don't actually know whether we did this switch during
3523 * EOF (yywrap()) processing, but the only time this flag
3524 * is looked at is after yywrap() is called, so it's safe
3525 * to go ahead and always set it.
3527 (yy_did_buffer_switch_on_eof) = 1;
3530 static void yy_load_buffer_state (void)
3532 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3533 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3534 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3535 (yy_hold_char) = *(yy_c_buf_p);
3538 /** Allocate and initialize an input buffer state.
3539 * @param file A readable stream.
3540 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3542 * @return the allocated buffer state.
3544 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
3548 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
3550 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3552 b->yy_buf_size = size;
3554 /* yy_ch_buf has to be 2 characters longer than the size given because
3555 * we need to put in 2 end-of-buffer characters.
3557 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
3558 if ( ! b->yy_ch_buf )
3559 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3561 b->yy_is_our_buffer = 1;
3563 yy_init_buffer(b,file );
3568 /** Destroy the buffer.
3569 * @param b a buffer created with yy_create_buffer()
3572 void yy_delete_buffer (YY_BUFFER_STATE b )
3578 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3579 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3581 if ( b->yy_is_our_buffer )
3582 yyfree((void *) b->yy_ch_buf );
3584 yyfree((void *) b );
3588 extern int isatty (int );
3589 #endif /* __cplusplus */
3591 /* Initializes or reinitializes a buffer.
3592 * This function is sometimes called more than once on the same buffer,
3593 * such as during a yyrestart() or at EOF.
3595 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
3600 yy_flush_buffer(b );
3602 b->yy_input_file = file;
3603 b->yy_fill_buffer = 1;
3605 /* If b is the current buffer, then yy_init_buffer was _probably_
3606 * called from yyrestart() or through yy_get_next_buffer.
3607 * In that case, we don't want to reset the lineno or column.
3609 if (b != YY_CURRENT_BUFFER){
3610 b->yy_bs_lineno = 1;
3611 b->yy_bs_column = 0;
3614 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3619 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3620 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3623 void yy_flush_buffer (YY_BUFFER_STATE b )
3630 /* We always need two end-of-buffer characters. The first causes
3631 * a transition to the end-of-buffer state. The second causes
3632 * a jam in that state.
3634 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3635 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3637 b->yy_buf_pos = &b->yy_ch_buf[0];
3640 b->yy_buffer_status = YY_BUFFER_NEW;
3642 if ( b == YY_CURRENT_BUFFER )
3643 yy_load_buffer_state( );
3646 /** Pushes the new state onto the stack. The new state becomes
3647 * the current state. This function will allocate the stack
3649 * @param new_buffer The new state.
3652 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
3654 if (new_buffer == NULL)
3657 yyensure_buffer_stack();
3659 /* This block is copied from yy_switch_to_buffer. */
3660 if ( YY_CURRENT_BUFFER )
3662 /* Flush out information for old buffer. */
3663 *(yy_c_buf_p) = (yy_hold_char);
3664 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3665 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3668 /* Only push if top exists. Otherwise, replace top. */
3669 if (YY_CURRENT_BUFFER)
3670 (yy_buffer_stack_top)++;
3671 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3673 /* copied from yy_switch_to_buffer. */
3674 yy_load_buffer_state( );
3675 (yy_did_buffer_switch_on_eof) = 1;
3678 /** Removes and deletes the top of the stack, if present.
3679 * The next element becomes the new top.
3682 void yypop_buffer_state (void)
3684 if (!YY_CURRENT_BUFFER)
3687 yy_delete_buffer(YY_CURRENT_BUFFER );
3688 YY_CURRENT_BUFFER_LVALUE = NULL;
3689 if ((yy_buffer_stack_top) > 0)
3690 --(yy_buffer_stack_top);
3692 if (YY_CURRENT_BUFFER) {
3693 yy_load_buffer_state( );
3694 (yy_did_buffer_switch_on_eof) = 1;
3698 /* Allocates the stack if it does not exist.
3699 * Guarantees space for at least one push.
3701 static void yyensure_buffer_stack (void)
3705 if (!(yy_buffer_stack)) {
3707 /* First allocation is just for 2 elements, since we don't know if this
3708 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3709 * immediate realloc on the next call.
3712 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
3713 (num_to_alloc * sizeof(struct yy_buffer_state*)
3715 if ( ! (yy_buffer_stack) )
3716 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3718 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3720 (yy_buffer_stack_max) = num_to_alloc;
3721 (yy_buffer_stack_top) = 0;
3725 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3727 /* Increase the buffer to prepare for a possible push. */
3728 int grow_size = 8 /* arbitrary grow size */;
3730 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3731 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
3733 num_to_alloc * sizeof(struct yy_buffer_state*)
3735 if ( ! (yy_buffer_stack) )
3736 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3738 /* zero only the new slots.*/
3739 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3740 (yy_buffer_stack_max) = num_to_alloc;
3744 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3745 * @param base the character buffer
3746 * @param size the size in bytes of the character buffer
3748 * @return the newly allocated buffer state object.
3750 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
3755 base[size-2] != YY_END_OF_BUFFER_CHAR ||
3756 base[size-1] != YY_END_OF_BUFFER_CHAR )
3757 /* They forgot to leave room for the EOB's. */
3760 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
3762 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3764 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
3765 b->yy_buf_pos = b->yy_ch_buf = base;
3766 b->yy_is_our_buffer = 0;
3767 b->yy_input_file = 0;
3768 b->yy_n_chars = b->yy_buf_size;
3769 b->yy_is_interactive = 0;
3771 b->yy_fill_buffer = 0;
3772 b->yy_buffer_status = YY_BUFFER_NEW;
3774 yy_switch_to_buffer(b );
3779 /** Setup the input buffer state to scan a string. The next call to yylex() will
3780 * scan from a @e copy of @a str.
3781 * @param yystr a NUL-terminated string to scan
3783 * @return the newly allocated buffer state object.
3784 * @note If you want to scan bytes that may contain NUL values, then use
3785 * yy_scan_bytes() instead.
3787 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
3790 return yy_scan_bytes(yystr,strlen(yystr) );
3793 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3794 * scan from a @e copy of @a bytes.
3795 * @param bytes the byte buffer to scan
3796 * @param len the number of bytes in the buffer pointed to by @a bytes.
3798 * @return the newly allocated buffer state object.
3800 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
3807 /* Get memory for full buffer, including space for trailing EOB's. */
3808 n = _yybytes_len + 2;
3809 buf = (char *) yyalloc(n );
3811 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3813 for ( i = 0; i < _yybytes_len; ++i )
3814 buf[i] = yybytes[i];
3816 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3818 b = yy_scan_buffer(buf,n );
3820 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3822 /* It's okay to grow etc. this buffer, and we should throw it
3823 * away when we're done.
3825 b->yy_is_our_buffer = 1;
3830 #ifndef YY_EXIT_FAILURE
3831 #define YY_EXIT_FAILURE 2
3834 static void yy_fatal_error (yyconst char* msg )
3836 (void) fprintf( stderr, "%s\n", msg );
3837 exit( YY_EXIT_FAILURE );
3840 /* Redefine yyless() so it works in section 3 code. */
3846 /* Undo effects of setting up yytext. */ \
3847 int yyless_macro_arg = (n); \
3848 YY_LESS_LINENO(yyless_macro_arg);\
3849 yytext[yyleng] = (yy_hold_char); \
3850 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3851 (yy_hold_char) = *(yy_c_buf_p); \
3852 *(yy_c_buf_p) = '\0'; \
3853 yyleng = yyless_macro_arg; \
3857 /* Accessor methods (get/set functions) to struct members. */
3859 /** Get the current line number.
3862 int yyget_lineno (void)
3868 /** Get the input stream.
3871 FILE *yyget_in (void)
3876 /** Get the output stream.
3879 FILE *yyget_out (void)
3884 /** Get the length of the current token.
3887 int yyget_leng (void)
3892 /** Get the current token.
3896 char *yyget_text (void)
3901 /** Set the current line number.
3902 * @param line_number
3905 void yyset_lineno (int line_number )
3908 yylineno = line_number;
3911 /** Set the input stream. This does not discard the current
3913 * @param in_str A readable stream.
3915 * @see yy_switch_to_buffer
3917 void yyset_in (FILE * in_str )
3922 void yyset_out (FILE * out_str )
3927 int yyget_debug (void)
3929 return yy_flex_debug;
3932 void yyset_debug (int bdebug )
3934 yy_flex_debug = bdebug ;
3937 static int yy_init_globals (void)
3939 /* Initialization is the same as for the non-reentrant scanner.
3940 * This function is called from yylex_destroy(), so don't allocate here.
3943 (yy_buffer_stack) = 0;
3944 (yy_buffer_stack_top) = 0;
3945 (yy_buffer_stack_max) = 0;
3946 (yy_c_buf_p) = (char *) 0;
3952 (yy_full_match) = 0;
3955 /* Defined in main.c */
3964 /* For future reference: Set errno on error, since we are called by
3970 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3971 int yylex_destroy (void)
3974 /* Pop the buffer stack, destroying each element. */
3975 while(YY_CURRENT_BUFFER){
3976 yy_delete_buffer(YY_CURRENT_BUFFER );
3977 YY_CURRENT_BUFFER_LVALUE = NULL;
3978 yypop_buffer_state();
3981 /* Destroy the stack itself. */
3982 yyfree((yy_buffer_stack) );
3983 (yy_buffer_stack) = NULL;
3985 yyfree ( (yy_state_buf) );
3986 (yy_state_buf) = NULL;
3988 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3989 * yylex() is called, initialization will occur. */
3996 * Internal utility routines.
4000 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
4003 for ( i = 0; i < n; ++i )
4008 #ifdef YY_NEED_STRLEN
4009 static int yy_flex_strlen (yyconst char * s )
4012 for ( n = 0; s[n]; ++n )
4019 void *yyalloc (yy_size_t size )
4021 return (void *) malloc( size );
4024 void *yyrealloc (void * ptr, yy_size_t size )
4026 /* The cast to (char *) in the following accommodates both
4027 * implementations that use char* generic pointers, and those
4028 * that use void* generic pointers. It works with the latter
4029 * because both ANSI C and C++ allow castless assignment from
4030 * any pointer type to void*, and deal with argument conversions
4031 * as though doing an assignment.
4033 return (void *) realloc( (char *) ptr, size );
4036 void yyfree (void * ptr )
4038 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
4041 #define YYTABLES_NAME "yytables"
4043 #line 993 "parser.l"
4048 static char *StringToLex;
4050 #ifndef FLEX_SCANNER
4057 if (StringToLex != NULL) {
4059 if (ret == NULLCHAR)
4063 } else if (unputCount > 0) {
4064 ret = unputBuffer[--unputCount];
4076 * Return offset of next pattern within current file
4080 int offset = ftell(lexFP) - unputCount;
4088 static void output(ch)
4091 if(appData.debugMode) fprintf(debugFP, "PARSER BUG: unmatched character '%c' (0%o)\n",
4095 static void unput(ch)
4098 if (ch == 0) return;
4099 if (StringToLex != NULL) {
4102 if (unputCount >= UNPUT_BUF_SIZE)
4103 if(appData.debugMode) fprintf(debugFP, "PARSER BUG: unput buffer overflow '%c' (0%o)\n",
4105 unputBuffer[unputCount++] = ch;
4109 /* Get ready to lex from a new file. Kludge below sticks
4110 an artificial newline at the front of the file, which the
4111 above grammar ignores, but which makes ^ at start of pattern
4112 match at the real start of the file.
4120 unput('\n'); /* kludge */
4123 /* Get ready to lex from a string. ^ at start of pattern WON'T
4124 match at the start of the string!
4133 #endif /*!FLEX_SCANNER*/
4136 void my_yy_input(buf, result, max_size)
4143 if (StringToLex != NULL) {
4145 while (*StringToLex != NULLCHAR) {
4146 *buf++ = *StringToLex++;
4152 count = fread(buf, 1, max_size, yyin);
4162 static YY_BUFFER_STATE my_file_buffer = NULL;
4165 Return offset of next pattern in the current file.
4169 int pos = yy_c_buf_p - YY_CURRENT_BUFFER->yy_ch_buf;
4171 return(ftell(YY_CURRENT_BUFFER->yy_input_file) -
4179 if (my_file_buffer != NULL)
4180 yy_delete_buffer(my_file_buffer);
4182 my_file_buffer = yy_create_buffer(stdin,YY_BUF_SIZE);
4183 yy_switch_to_buffer(my_file_buffer);
4189 if (my_file_buffer != NULL)
4190 yy_delete_buffer(my_file_buffer);
4192 my_file_buffer = yy_create_buffer(f,YY_BUF_SIZE);
4193 yy_switch_to_buffer(my_file_buffer);
4195 #endif /*FLEX_SCANNER*/
4202 /* Parse a move from the given string s */
4203 /* ^ at start of pattern WON'T work here unless using flex */
4204 ChessMove yylexstr(boardIndex, s, text, len)
4205 int boardIndex, len;
4209 char *oldStringToLex;
4211 YY_BUFFER_STATE buffer, oldBuffer;
4214 yyboardindex = boardIndex;
4215 oldStringToLex = StringToLex;
4218 buffer = yy_create_buffer(stdin,YY_BUF_SIZE);
4219 oldBuffer = YY_CURRENT_BUFFER;
4220 yy_switch_to_buffer(buffer);
4221 #endif /*FLEX_SCANNER*/
4223 ret = (ChessMove) Myylex();
4224 strncpy(text, yy_text, len-1); // [HGM] vari: yy_text is not available to caller after buffer switch ?!?
4225 text[len-1] = NULLCHAR;
4228 if (oldBuffer != NULL)
4229 yy_switch_to_buffer(oldBuffer);
4230 yy_delete_buffer(buffer);
4231 #endif /*FLEX_SCANNER*/
4232 StringToLex = oldStringToLex;
4238 { // [HGM] wrapper for yylex, which treats nesting of parentheses
4239 int symbol, nestingLevel = 0, i=0;
4241 static char buf[256*MSG_SIZ];
4243 do { // eat away anything not at level 0
4245 if(symbol == Open) nestingLevel++;
4246 if(nestingLevel) { // save all parsed text between (and including) the ()
4247 for(p=yytext; *p && i<256*MSG_SIZ-2;) buf[i++] = *p++;
4250 if(symbol == 0) break; // ran into EOF
4251 if(symbol == Close) symbol = Comment, nestingLevel--;
4252 } while(nestingLevel || symbol == Nothing);
4253 yy_text = buf[0] ? buf : (char*)yytext;