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 34
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 /* The following is because we cannot portably get our hands on size_t
182 * (without autoconf's help, which isn't available because we want
183 * flex-generated scanners to compile on their own).
184 * Given that the standard has decreed that size_t exists since 1989,
185 * I guess we can afford to depend on it. Manoj.
188 #ifndef YY_TYPEDEF_YY_SIZE_T
189 #define YY_TYPEDEF_YY_SIZE_T
190 typedef size_t yy_size_t;
193 #ifndef YY_STRUCT_YY_BUFFER_STATE
194 #define YY_STRUCT_YY_BUFFER_STATE
195 struct yy_buffer_state
199 char *yy_ch_buf; /* input buffer */
200 char *yy_buf_pos; /* current position in input buffer */
202 /* Size of input buffer in bytes, not including room for EOB
205 yy_size_t yy_buf_size;
207 /* Number of characters read into yy_ch_buf, not including EOB
212 /* Whether we "own" the buffer - i.e., we know we created it,
213 * and can realloc() it to grow it, and should free() it to
216 int yy_is_our_buffer;
218 /* Whether this is an "interactive" input source; if so, and
219 * if we're using stdio for input, then we want to use getc()
220 * instead of fread(), to make sure we stop fetching input after
223 int yy_is_interactive;
225 /* Whether we're considered to be at the beginning of a line.
226 * If so, '^' rules will be active on the next match, otherwise
231 int yy_bs_lineno; /**< The line count. */
232 int yy_bs_column; /**< The column count. */
234 /* Whether to try to fill the input buffer when we reach the
239 int yy_buffer_status;
241 #define YY_BUFFER_NEW 0
242 #define YY_BUFFER_NORMAL 1
243 /* When an EOF's been seen but there's still some text to process
244 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
245 * shouldn't try reading from the input source any more. We might
246 * still have a bunch of tokens to match, though, because of
247 * possible backing-up.
249 * When we actually see the EOF, we change the status to "new"
250 * (via yyrestart()), so that the user can continue scanning by
251 * just pointing yyin at a new input file.
253 #define YY_BUFFER_EOF_PENDING 2
256 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
258 /* Stack of input buffers. */
259 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
260 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
261 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
263 /* We provide macros for accessing buffer states in case in the
264 * future we want to put the buffer states in a more general
267 * Returns the top of the stack, or NULL.
269 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
270 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
273 /* Same as previous macro, but useful when we know that the buffer stack is not
274 * NULL or when we need an lvalue. For internal use only.
276 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
278 /* yy_hold_char holds the character lost when yytext is formed. */
279 static char yy_hold_char;
280 static int yy_n_chars; /* number of characters read into yy_ch_buf */
283 /* Points to current character in buffer. */
284 static char *yy_c_buf_p = (char *) 0;
285 static int yy_init = 0; /* whether we need to initialize */
286 static int yy_start = 0; /* start state number */
288 /* Flag which is used to allow yywrap()'s to do buffer switches
289 * instead of setting up a fresh yyin. A bit of a hack ...
291 static int yy_did_buffer_switch_on_eof;
293 void yyrestart (FILE *input_file );
294 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
295 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
296 void yy_delete_buffer (YY_BUFFER_STATE b );
297 void yy_flush_buffer (YY_BUFFER_STATE b );
298 void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
299 void yypop_buffer_state (void );
301 static void yyensure_buffer_stack (void );
302 static void yy_load_buffer_state (void );
303 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
305 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
307 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
308 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
309 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
311 void *yyalloc (yy_size_t );
312 void *yyrealloc (void *,yy_size_t );
313 void yyfree (void * );
315 #define yy_new_buffer yy_create_buffer
317 #define yy_set_interactive(is_interactive) \
319 if ( ! YY_CURRENT_BUFFER ){ \
320 yyensure_buffer_stack (); \
321 YY_CURRENT_BUFFER_LVALUE = \
322 yy_create_buffer(yyin,YY_BUF_SIZE ); \
324 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
327 #define yy_set_bol(at_bol) \
329 if ( ! YY_CURRENT_BUFFER ){\
330 yyensure_buffer_stack (); \
331 YY_CURRENT_BUFFER_LVALUE = \
332 yy_create_buffer(yyin,YY_BUF_SIZE ); \
334 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
337 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
339 /* Begin user sect3 */
341 typedef unsigned char YY_CHAR;
343 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
345 typedef int yy_state_type;
352 #define yytext_ptr yytext
354 static yy_state_type yy_get_previous_state (void );
355 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
356 static int yy_get_next_buffer (void );
357 static void yy_fatal_error (yyconst char msg[] );
359 /* Done after the current pattern has been matched and before the
360 * corresponding action - sets up yytext.
362 #define YY_DO_BEFORE_ACTION \
363 (yytext_ptr) = yy_bp; \
364 yyleng = (size_t) (yy_cp - yy_bp); \
365 (yy_hold_char) = *yy_cp; \
367 (yy_c_buf_p) = yy_cp;
369 #define YY_NUM_RULES 42
370 #define YY_END_OF_BUFFER 43
371 /* This struct is not used in this scanner,
372 but its presence is necessary. */
375 flex_int32_t yy_verify;
378 static yyconst flex_int16_t yy_acclist[602] =
380 43, 41, 42, 41, 42, 41, 42, 40, 41, 42,
381 41, 42, 25, 41, 42, 41, 42, 40, 41, 42,
382 40, 41, 42,16410, 40, 41, 42,16410, 41, 42,
383 40, 41, 42, 40, 41, 42, 40, 41, 42, 40,
384 41, 42, 40, 41, 42, 40, 41, 42, 40, 41,
385 42, 40, 41, 42, 40, 41, 42, 40, 41, 42,
386 41, 42, 40, 41, 42, 40, 41, 42, 40, 41,
387 42, 40, 41, 42, 40, 41, 42, 40, 41, 42,
388 40, 41, 42, 40, 41, 42, 40, 41, 42, 40,
389 41, 42, 40, 41, 42, 40, 41, 42, 40, 41,
391 42, 40, 41, 42, 40, 41, 42, 40, 41, 42,
392 40, 41, 42, 41, 42, 41, 42, 40, 41, 42,
393 40, 41, 42, 40, 41, 42,16410, 40, 41, 42,
394 16410, 41, 42, 40, 41, 42, 40, 41, 42, 40,
395 41, 42, 40, 41, 42, 40, 41, 42, 40, 41,
396 42, 40, 41, 42, 40, 41, 42, 40, 41, 42,
397 40, 41, 42, 40, 41, 42, 40, 41, 42, 40,
398 41, 42, 40, 41, 42, 40, 41, 42, 40, 41,
399 42, 40, 41, 42, 40, 41, 42, 40, 41, 42,
400 40, 41, 42, 40, 41, 42, 40, 41, 42, 40,
402 41, 42, 40, 41, 42, 40, 41, 42, 40, 41,
403 42, 40, 41, 42, 41, 42, 33, 40, 17, 40,
404 9, 40, 40, 40,16410, 8218, 40, 35, 40, 40,
405 40, 40, 40, 40, 40, 40, 40, 40, 9, 40,
406 40, 40, 40, 36, 40, 3, 40, 40, 4, 40,
407 40, 40, 40, 40, 40, 9, 40, 40, 40, 34,
408 40, 40, 9, 40, 40, 40,16410, 8218, 40, 40,
409 40, 40, 40, 40, 40, 40, 40, 40, 40, 9,
410 40, 40, 40, 40, 40, 3, 40, 40, 4, 40,
411 40, 40, 40, 40, 40, 9, 40, 40, 40, 15,
413 9, 40, 23, 40, 23, 8, 40, 8218, 22, 40,
414 22, 24, 40, 40, 40, 6, 40, 40, 40, 40,
415 40, 40, 9, 40, 40, 40, 40, 4, 40, 40,
416 3, 3, 40, 3, 40, 40, 4, 5, 40, 4,
417 4, 40, 40, 40, 40, 9, 40, 40, 34, 39,
418 9, 40, 23, 40, 8, 40, 22, 40, 35, 40,
419 40, 40, 6, 40, 40, 40, 40, 40, 40, 9,
420 40, 40, 40, 40, 4, 40, 40, 3, 40, 3,
421 40, 40, 5, 40, 4, 40, 40, 40, 40, 9,
422 40, 40, 38, 38, 38, 37, 25, 25, 6, 40,
424 10, 6, 40, 7, 40, 6, 40, 6, 40, 40,
425 40, 19, 40, 40, 16, 40, 40, 40, 40, 40,
426 36, 3, 3, 2, 40, 5, 4, 5, 5, 40,
427 40, 4, 4, 40, 40, 25, 39, 40, 6, 40,
428 7, 40, 40, 40, 40, 40, 19, 40, 40, 16,
429 40, 40, 40, 40, 40, 2, 40, 5, 40, 40,
430 4, 40, 40, 38, 7, 7, 1, 40, 20, 40,
431 40, 19, 40, 40, 40, 40, 40, 40, 30, 36,
432 2, 2, 2, 40, 5, 5, 5, 40, 39, 1,
433 40, 40, 40, 19, 40, 40, 40, 40, 40, 40,
435 2, 40, 5, 40, 27, 38, 1, 23, 23, 22,
436 22, 24, 24, 1, 1, 40, 21, 20, 40, 40,
437 40, 11, 40, 40, 28, 36, 30, 2, 2, 27,
438 34, 39, 39, 1, 40, 40, 40, 40, 11, 40,
439 40, 18, 1, 24, 1, 21, 19, 40, 40, 40,
440 11, 40, 40, 40, 40, 40, 11, 40, 40, 12,
441 40, 40, 40, 40, 12, 40, 40, 14, 40, 40,
442 40, 14, 40, 40, 40, 39, 40, 40, 40, 40,
443 39, 39, 40, 40, 31, 40, 39, 39, 31, 40,
444 13, 31, 32, 32, 35, 39, 39, 31, 39, 34,
449 static yyconst flex_int16_t yy_accept[689] =
451 1, 1, 1, 2, 4, 6, 8, 11, 13, 16,
452 18, 21, 25, 29, 31, 34, 37, 40, 43, 46,
453 49, 52, 55, 58, 61, 63, 66, 69, 72, 75,
454 78, 81, 84, 87, 90, 93, 96, 99, 102, 105,
455 108, 111, 114, 116, 118, 121, 124, 128, 132, 134,
456 137, 140, 143, 146, 149, 152, 155, 158, 161, 164,
457 167, 170, 173, 176, 179, 182, 185, 188, 191, 194,
458 197, 200, 203, 206, 209, 212, 215, 217, 217, 218,
459 219, 219, 219, 219, 219, 220, 220, 220, 220, 221,
460 221, 223, 223, 223, 223, 224, 224, 224, 226, 226,
462 228, 228, 229, 229, 230, 230, 231, 231, 232, 232,
463 233, 234, 235, 236, 237, 238, 239, 241, 242, 243,
464 244, 244, 244, 244, 244, 245, 246, 248, 248, 249,
465 251, 252, 253, 254, 255, 256, 258, 259, 260, 260,
466 260, 260, 261, 261, 262, 262, 263, 265, 265, 266,
467 268, 268, 270, 270, 271, 272, 272, 273, 274, 275,
468 276, 277, 278, 279, 280, 282, 283, 284, 285, 286,
469 288, 288, 289, 291, 292, 293, 294, 295, 296, 298,
470 299, 300, 300, 300, 300, 300, 300, 300, 300, 300,
471 300, 300, 300, 301, 301, 301, 301, 301, 301, 303,
473 305, 306, 308, 309, 309, 309, 309, 311, 312, 313,
474 313, 314, 314, 315, 315, 316, 316, 318, 318, 318,
475 318, 318, 318, 318, 319, 320, 321, 322, 323, 325,
476 326, 327, 328, 328, 328, 328, 328, 330, 330, 331,
477 331, 332, 334, 336, 337, 338, 338, 340, 341, 343,
478 344, 345, 346, 348, 349, 350, 350, 350, 350, 350,
479 351, 353, 355, 357, 359, 359, 360, 360, 361, 362,
480 362, 363, 365, 366, 367, 368, 369, 370, 372, 373,
481 374, 375, 377, 378, 378, 380, 382, 383, 385, 387,
482 388, 389, 390, 392, 393, 393, 393, 394, 395, 395,
484 395, 396, 396, 396, 397, 397, 397, 398, 398, 399,
485 399, 400, 400, 400, 400, 401, 401, 401, 401, 401,
486 401, 401, 401, 402, 404, 404, 406, 407, 408, 408,
487 409, 410, 410, 410, 410, 410, 410, 410, 411, 412,
488 414, 414, 415, 417, 418, 419, 420, 421, 421, 421,
489 421, 421, 422, 423, 423, 424, 426, 427, 428, 428,
490 428, 429, 431, 432, 433, 433, 435, 436, 436, 437,
491 437, 437, 437, 437, 438, 438, 439, 439, 439, 441,
492 443, 444, 444, 445, 446, 447, 449, 450, 452, 453,
493 454, 455, 456, 458, 460, 461, 463, 464, 464, 464,
495 464, 464, 465, 465, 465, 465, 465, 466, 466, 466,
496 466, 466, 466, 466, 466, 466, 466, 467, 469, 469,
497 469, 469, 469, 469, 470, 471, 472, 472, 474, 474,
498 475, 476, 477, 478, 479, 479, 479, 481, 481, 481,
499 482, 482, 483, 485, 486, 486, 487, 487, 489, 489,
500 489, 489, 489, 489, 489, 489, 490, 490, 490, 492,
501 493, 494, 496, 497, 498, 499, 500, 501, 503, 505,
502 505, 505, 505, 505, 505, 505, 507, 507, 508, 508,
503 509, 509, 510, 510, 511, 511, 512, 512, 513, 513,
504 514, 514, 514, 514, 515, 517, 517, 517, 518, 518,
506 518, 519, 520, 520, 520, 520, 520, 520, 521, 522,
507 524, 525, 527, 527, 528, 529, 530, 530, 530, 532,
508 532, 532, 533, 534, 534, 534, 536, 537, 538, 539,
509 541, 542, 542, 543, 543, 543, 543, 543, 544, 544,
510 545, 546, 546, 546, 547, 547, 547, 548, 548, 548,
511 548, 548, 549, 550, 551, 553, 554, 554, 554, 554,
512 554, 554, 555, 556, 557, 559, 560, 560, 560, 560,
513 560, 560, 560, 561, 561, 561, 561, 561, 562, 563,
514 563, 563, 563, 563, 564, 565, 565, 565, 565, 565,
515 566, 566, 566, 566, 567, 568, 570, 570, 570, 570,
517 570, 571, 571, 572, 574, 574, 574, 574, 574, 575,
518 576, 576, 576, 576, 576, 577, 578, 579, 579, 579,
519 579, 579, 579, 580, 581, 581, 581, 581, 581, 582,
520 583, 584, 585, 585, 585, 585, 585, 585, 587, 587,
521 587, 587, 587, 588, 589, 591, 591, 591, 592, 592,
522 593, 593, 594, 594, 594, 596, 596, 597, 598, 598,
523 598, 598, 598, 600, 600, 600, 600, 600, 600, 600,
524 600, 600, 600, 600, 600, 600, 600, 600, 600, 600,
525 600, 600, 600, 600, 600, 601, 602, 602
528 static yyconst flex_int32_t yy_ec[256] =
530 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
531 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
532 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
533 1, 4, 1, 5, 6, 7, 8, 1, 9, 10,
534 11, 12, 13, 1, 14, 15, 16, 17, 18, 19,
535 20, 20, 20, 20, 20, 20, 20, 21, 22, 1,
536 23, 1, 1, 24, 25, 26, 27, 28, 29, 30,
537 31, 32, 33, 33, 34, 35, 36, 37, 38, 34,
538 34, 39, 40, 33, 41, 33, 42, 43, 33, 33,
539 44, 1, 45, 1, 46, 1, 47, 48, 49, 50,
541 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
542 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
543 71, 68, 72, 1, 73, 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,
550 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,
556 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
560 static yyconst flex_int32_t yy_meta[74] =
562 1, 2, 3, 2, 1, 1, 1, 1, 4, 5,
563 6, 1, 7, 8, 1, 1, 9, 9, 9, 9,
564 10, 1, 11, 1, 12, 12, 12, 12, 12, 12,
565 12, 12, 13, 12, 13, 13, 12, 12, 12, 13,
566 13, 12, 14, 1, 1, 1, 15, 15, 15, 15,
567 16, 15, 15, 15, 15, 15, 15, 15, 17, 18,
568 18, 18, 18, 18, 17, 17, 17, 17, 17, 19,
572 static yyconst flex_int16_t yy_base[767] =
574 0, 73, 3814, 3815, 122, 131, 0, 142, 3809, 140,
575 151, 171, 162, 3809, 231, 159, 3757, 3746, 119, 3762,
576 143, 3757, 3741, 190, 301, 361, 211, 207, 279, 215,
577 224, 284, 243, 286, 301, 303, 305, 3759, 232, 3754,
578 3738, 264, 351, 3799, 149, 379, 430, 351, 255, 493,
579 212, 3748, 3737, 327, 3753, 157, 3748, 3732, 331, 555,
580 372, 245, 378, 351, 468, 530, 475, 477, 505, 523,
581 508, 576, 578, 385, 579, 610, 615, 3744, 372, 0,
582 3786, 309, 630, 431, 3815, 3782, 675, 575, 405, 3776,
583 3776, 3774, 450, 639, 3774, 472, 165, 640, 3773, 0,
585 3786, 3815, 0, 699, 0, 744, 0, 648, 787, 652,
586 656, 3649, 3636, 3591, 693, 3601, 3594, 697, 3584, 664,
587 3585, 856, 352, 929, 3815, 956, 1006, 0, 1031, 1080,
588 660, 717, 721, 3563, 3567, 3551, 3514, 3523, 435, 3504,
589 757, 3572, 3571, 497, 3496, 517, 607, 550, 681, 1130,
590 160, 518, 554, 1193, 1238, 3477, 686, 762, 787, 764,
591 617, 676, 750, 3424, 803, 816, 864, 835, 1262, 1312,
592 3439, 1337, 1387, 874, 888, 895, 700, 823, 865, 762,
593 866, 885, 3360, 583, 610, 626, 652, 676, 944, 949,
594 3394, 3260, 3815, 882, 1190, 3328, 3286, 3281, 3270, 3279,
596 3278, 0, 3815, 3277, 3266, 3263, 3262, 3182, 799, 830,
597 900, 958, 1412, 928, 962, 966, 1457, 3130, 3120, 3119,
598 3130, 3108, 382, 970, 1075, 3071, 759, 2895, 2927, 2884,
599 2880, 1108, 572, 1213, 739, 1527, 1591, 0, 1596, 0,
600 2927, 2844, 2843, 974, 1202, 1246, 1645, 2840, 2838, 238,
601 2799, 2797, 2814, 2743, 3815, 1210, 1084, 2630, 211, 2628,
602 1121, 1132, 606, 1253, 697, 2626, 895, 1217, 1688, 2624,
603 1258, 1733, 1467, 1472, 901, 1536, 1252, 1532, 1535, 1538,
604 1549, 1795, 1800, 2623, 810, 2615, 1556, 1849, 1259, 1573,
605 1473, 1474, 1541, 1543, 1583, 2574, 3815, 778, 832, 913,
607 985, 989, 1007, 3815, 1593, 2613, 2612, 2549, 2548, 1281,
608 1646, 2568, 2554, 2550, 2550, 585, 2549, 367, 2487, 636,
609 1680, 1125, 3815, 2480, 1679, 2479, 2463, 1854, 1678, 3815,
610 1287, 2407, 2407, 2403, 2401, 2401, 2402, 2404, 2403, 968,
611 510, 598, 0, 2421, 2405, 2406, 2405, 1007, 1161, 1046,
612 1354, 2450, 2443, 1455, 3815, 1694, 1510, 2442, 1161, 1585,
613 1700, 2441, 1209, 3815, 2389, 0, 2389, 1789, 2445, 1577,
614 1711, 2401, 2386, 2443, 403, 1709, 1281, 374, 1131, 1710,
615 1866, 2441, 1741, 819, 1744, 1921, 1746, 1315, 1686, 1789,
616 1748, 1793, 1754, 1852, 1917, 1571, 1919, 1930, 2392, 1127,
618 2431, 1221, 1244, 1392, 1421, 1486, 2418, 1620, 2429, 2366,
619 2427, 2361, 2422, 2359, 2413, 1923, 3815, 1994, 2381, 2377,
620 1452, 2377, 2372, 2361, 2421, 1266, 1919, 2420, 688, 2394,
621 2370, 2359, 2358, 2412, 1684, 1660, 3815, 2406, 1891, 933,
622 1388, 1579, 2399, 2398, 1462, 3815, 2346, 0, 2379, 1928,
623 2371, 1645, 2371, 2328, 2321, 1603, 1495, 1269, 2029, 1941,
624 1925, 1943, 1928, 1939, 1932, 1947, 1950, 1954, 1957, 1971,
625 1350, 1515, 2374, 1568, 1573, 3815, 1976, 1756, 2373, 2372,
626 2309, 2308, 2369, 2368, 2305, 2304, 2365, 2357, 2287, 2285,
627 2341, 2337, 1959, 1966, 2344, 2293, 2302, 1746, 760, 2299,
629 3815, 2304, 2334, 2293, 2267, 2308, 2285, 2292, 2262, 1655,
630 2274, 3815, 1995, 3815, 2301, 3815, 2294, 2070, 2297, 2243,
631 2232, 2279, 1791, 1814, 1812, 1991, 2032, 2065, 2071, 2072,
632 2073, 1974, 3815, 2230, 2269, 1647, 2089, 2268, 2274, 2271,
633 3815, 2214, 2215, 3815, 2181, 2228, 2221, 2169, 2225, 2188,
634 2161, 2184, 2156, 2164, 0, 2141, 2093, 2197, 2133, 1836,
635 1662, 2074, 2076, 2082, 2095, 2106, 2002, 2130, 2146, 1724,
636 2016, 1985, 2033, 1997, 958, 2003, 1946, 2172, 1919, 1903,
637 1880, 1767, 1842, 2245, 2108, 2004, 1805, 1815, 1814, 3815,
638 1794, 1920, 1960, 2318, 2077, 0, 1788, 1630, 2046, 598,
640 2391, 2114, 2097, 2110, 2125, 1592, 1532, 2109, 1524, 1460,
641 1444, 1439, 1810, 758, 2118, 1443, 1374, 2132, 1261, 1257,
642 2094, 2095, 1253, 1188, 1154, 1199, 2130, 1866, 2139, 2166,
643 1117, 1053, 2147, 2087, 995, 2122, 2155, 0, 1027, 895,
644 924, 2152, 2206, 2212, 0, 2154, 839, 3815, 821, 2158,
645 787, 3815, 567, 501, 3815, 2155, 2209, 2232, 2219, 380,
646 362, 1838, 2233, 2220, 288, 2197, 1969, 2005, 2157, 2270,
647 2274, 2292, 2293, 2294, 2296, 2297, 2299, 2300, 2301, 2302,
648 2332, 2345, 2347, 2199, 190, 3815, 3815, 2461, 2480, 2493,
649 2507, 2526, 2545, 2561, 2580, 2599, 2617, 1883, 1994, 1999,
651 2635, 2654, 2030, 2673, 2692, 2711, 2730, 2749, 2768, 2787,
652 2806, 2825, 2837, 2856, 2875, 2894, 2913, 2921, 2148, 2931,
653 2947, 2966, 2985, 3004, 3023, 3042, 3061, 3080, 3099, 3118,
654 3137, 3156, 3168, 3187, 3206, 3225, 3244, 3260, 3275, 3291,
655 3310, 3326, 3345, 3364, 3383, 3402, 3421, 3440, 3459, 3478,
656 3497, 3516, 3535, 3554, 3569, 3588, 3607, 3622, 3636, 3655,
657 3674, 3693, 3712, 3731, 3750, 3769
660 static yyconst flex_int16_t yy_def[767] =
662 687, 687, 687, 687, 687, 687, 688, 689, 687, 690,
663 688, 687, 12, 691, 688, 15, 15, 15, 15, 15,
664 15, 15, 15, 15, 692, 688, 26, 26, 26, 26,
665 26, 26, 26, 26, 26, 26, 26, 688, 688, 688,
666 688, 688, 693, 687, 694, 694, 687, 47, 691, 694,
667 50, 50, 50, 50, 50, 50, 50, 50, 50, 694,
668 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
669 60, 694, 694, 694, 694, 694, 693, 687, 687, 688,
670 695, 696, 695, 687, 687, 687, 687, 687, 688, 687,
671 688, 687, 697, 697, 688, 697, 687, 12, 687, 688,
673 691, 687, 698, 688, 699, 688, 700, 106, 687, 106,
674 106, 688, 688, 688, 106, 104, 688, 106, 688, 106,
675 701, 692, 701, 702, 687, 688, 687, 703, 688, 688,
676 688, 688, 688, 688, 688, 688, 688, 688, 693, 704,
677 693, 687, 705, 694, 687, 694, 694, 687, 694, 687,
678 687, 694, 706, 694, 154, 700, 155, 155, 155, 694,
679 694, 694, 155, 154, 694, 155, 694, 155, 154, 687,
680 703, 154, 687, 694, 694, 694, 694, 694, 694, 694,
681 694, 693, 687, 707, 708, 708, 709, 710, 707, 707,
682 711, 712, 687, 713, 713, 687, 687, 687, 688, 688,
684 687, 688, 687, 687, 687, 687, 688, 687, 687, 687,
685 688, 687, 688, 713, 688, 687, 688, 687, 687, 687,
686 687, 687, 687, 688, 688, 688, 688, 688, 688, 688,
687 688, 688, 714, 715, 716, 717, 688, 718, 688, 719,
688 718, 688, 239, 688, 720, 720, 688, 246, 688, 688,
689 688, 688, 688, 688, 687, 693, 687, 721, 687, 722,
690 694, 694, 694, 694, 723, 721, 724, 694, 694, 214,
691 694, 269, 694, 694, 694, 694, 694, 694, 694, 694,
692 694, 694, 269, 719, 694, 283, 694, 282, 694, 694,
693 694, 694, 694, 694, 693, 687, 687, 725, 726, 727,
695 728, 725, 729, 687, 730, 731, 731, 732, 732, 687,
696 733, 687, 687, 687, 688, 687, 687, 687, 687, 687,
697 687, 687, 687, 688, 733, 688, 687, 688, 325, 687,
698 688, 687, 687, 687, 687, 687, 687, 688, 688, 688,
699 687, 688, 688, 688, 688, 688, 688, 734, 734, 735,
700 736, 737, 687, 687, 687, 738, 739, 687, 687, 739,
701 739, 688, 688, 687, 687, 688, 688, 693, 687, 687,
702 687, 687, 687, 740, 687, 694, 741, 741, 694, 694,
703 283, 329, 694, 694, 694, 694, 694, 694, 694, 694,
704 694, 694, 742, 694, 694, 694, 694, 693, 687, 727,
706 743, 744, 728, 745, 729, 730, 687, 687, 746, 747,
707 748, 749, 750, 751, 687, 687, 687, 688, 687, 687,
708 687, 687, 687, 687, 688, 688, 687, 688, 687, 688,
709 688, 688, 688, 688, 752, 753, 687, 754, 687, 755,
710 755, 755, 688, 687, 687, 687, 687, 688, 687, 693,
711 687, 687, 687, 687, 687, 756, 741, 741, 694, 694,
712 694, 694, 694, 694, 694, 694, 694, 694, 694, 693,
713 687, 744, 757, 728, 745, 687, 730, 758, 746, 746,
714 747, 747, 748, 748, 749, 749, 750, 750, 751, 751,
715 687, 687, 758, 758, 688, 687, 687, 687, 687, 687,
717 687, 688, 759, 687, 687, 687, 687, 688, 688, 688,
718 688, 687, 687, 687, 687, 687, 687, 693, 687, 687,
719 687, 756, 756, 741, 741, 694, 694, 694, 694, 694,
720 694, 693, 687, 687, 757, 744, 730, 687, 687, 687,
721 687, 687, 687, 687, 687, 759, 759, 687, 687, 687,
722 687, 688, 688, 688, 688, 688, 693, 687, 687, 741,
723 741, 694, 694, 694, 694, 694, 693, 687, 687, 687,
724 687, 687, 687, 687, 687, 687, 687, 760, 688, 687,
725 687, 741, 741, 761, 694, 693, 687, 687, 687, 687,
726 687, 762, 762, 760, 594, 688, 687, 687, 741, 741,
728 761, 762, 601, 694, 693, 687, 687, 762, 594, 594,
729 687, 687, 741, 741, 763, 601, 601, 693, 687, 687,
730 762, 762, 594, 594, 687, 687, 741, 741, 763, 763,
731 601, 601, 693, 687, 687, 762, 762, 594, 764, 687,
732 765, 741, 763, 763, 601, 693, 687, 687, 687, 762,
733 764, 687, 687, 765, 687, 741, 763, 763, 693, 687,
734 687, 741, 763, 693, 687, 741, 693, 766, 766, 766,
735 766, 766, 766, 766, 766, 766, 766, 766, 766, 766,
736 766, 766, 766, 766, 687, 687, 0, 687, 687, 687,
737 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
739 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
740 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
741 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
742 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
743 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
744 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
745 687, 687, 687, 687, 687, 687
748 static yyconst flex_int16_t yy_nxt[3889] =
750 4, 4, 4, 5, 4, 4, 6, 4, 7, 8,
751 4, 9, 10, 7, 4, 4, 11, 12, 13, 13,
752 4, 14, 4, 4, 15, 16, 17, 18, 15, 15,
753 19, 15, 15, 15, 15, 20, 15, 21, 22, 23,
754 15, 24, 15, 25, 4, 4, 26, 27, 28, 29,
755 30, 31, 32, 33, 34, 35, 36, 37, 38, 7,
756 39, 7, 7, 40, 41, 7, 7, 7, 42, 7,
757 7, 43, 4, 4, 4, 4, 5, 4, 44, 6,
758 44, 7, 8, 4, 9, 10, 45, 4, 4, 46,
759 47, 48, 48, 4, 49, 4, 4, 50, 51, 52,
761 53, 50, 50, 54, 50, 50, 50, 50, 55, 50,
762 56, 57, 58, 50, 59, 50, 25, 4, 4, 60,
763 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
764 71, 72, 45, 73, 45, 45, 74, 75, 45, 45,
765 45, 76, 45, 45, 77, 4, 78, 79, 79, 79,
766 79, 82, 85, 86, 88, 113, 116, 80, 83, 83,
767 83, 83, 109, 260, 89, 93, 90, 91, 78, 145,
768 164, 92, 93, 93, 94, 80, 208, 687, 114, 80,
769 117, 208, 687, 209, 95, 96, 97, 98, 98, 98,
770 98, 99, 686, 109, 165, 100, 100, 100, 100, 100,
772 100, 100, 100, 80, 100, 80, 80, 100, 100, 100,
773 80, 80, 100, 80, 109, 109, 110, 100, 100, 100,
774 100, 100, 100, 100, 100, 100, 100, 100, 100, 80,
775 100, 100, 100, 100, 100, 80, 80, 80, 80, 80,
776 80, 80, 103, 120, 104, 135, 105, 106, 106, 106,
777 106, 107, 365, 131, 103, 130, 130, 102, 153, 130,
778 133, 131, 131, 372, 130, 130, 130, 109, 132, 158,
779 131, 131, 373, 104, 130, 130, 130, 108, 108, 108,
780 108, 108, 108, 108, 108, 108, 108, 108, 108, 131,
781 131, 174, 136, 173, 173, 130, 130, 130, 176, 366,
783 104, 121, 122, 122, 122, 121, 121, 121, 121, 121,
784 121, 121, 121, 121, 123, 121, 121, 138, 187, 188,
785 113, 121, 121, 121, 121, 131, 131, 130, 130, 130,
786 131, 131, 131, 131, 109, 130, 130, 130, 639, 130,
787 130, 130, 112, 114, 121, 125, 121, 131, 131, 131,
788 131, 131, 131, 140, 93, 130, 130, 130, 130, 130,
789 130, 130, 130, 161, 144, 233, 687, 141, 141, 141,
790 141, 145, 121, 121, 126, 109, 102, 127, 127, 127,
791 127, 128, 88, 208, 168, 209, 162, 80, 79, 79,
792 79, 79, 146, 80, 90, 147, 125, 174, 174, 148,
794 173, 173, 173, 129, 456, 145, 456, 130, 130, 131,
795 131, 131, 131, 131, 131, 131, 131, 131, 131, 665,
796 173, 199, 200, 142, 174, 174, 173, 173, 173, 175,
797 129, 93, 93, 94, 458, 180, 337, 140, 80, 533,
798 191, 160, 337, 149, 96, 97, 150, 150, 150, 150,
799 151, 93, 93, 93, 152, 152, 152, 152, 152, 152,
800 152, 152, 144, 152, 144, 144, 152, 152, 152, 144,
801 144, 152, 144, 93, 93, 93, 152, 152, 152, 152,
802 152, 152, 152, 152, 152, 152, 152, 152, 144, 152,
803 152, 152, 152, 152, 144, 144, 144, 144, 144, 144,
805 144, 80, 192, 655, 103, 80, 154, 142, 105, 155,
806 155, 155, 155, 156, 174, 174, 103, 145, 173, 173,
807 173, 174, 174, 174, 174, 80, 80, 173, 173, 173,
808 173, 173, 173, 261, 262, 154, 429, 145, 145, 157,
809 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
810 157, 174, 174, 260, 174, 174, 266, 267, 429, 173,
811 173, 173, 154, 80, 173, 173, 161, 201, 169, 174,
812 174, 170, 170, 170, 170, 171, 174, 174, 173, 173,
813 173, 173, 173, 173, 80, 349, 80, 80, 196, 162,
814 197, 178, 185, 297, 409, 198, 145, 172, 145, 145,
816 102, 173, 173, 174, 174, 174, 174, 174, 174, 174,
817 174, 174, 174, 109, 80, 80, 125, 140, 80, 187,
818 298, 661, 177, 263, 172, 80, 145, 145, 182, 430,
819 145, 141, 141, 141, 141, 187, 298, 145, 179, 185,
820 93, 93, 93, 93, 167, 411, 189, 189, 189, 189,
821 190, 431, 204, 80, 205, 687, 410, 276, 614, 206,
822 687, 300, 301, 181, 217, 217, 217, 217, 217, 217,
823 217, 217, 217, 217, 217, 217, 247, 247, 247, 247,
824 217, 217, 217, 217, 80, 303, 304, 142, 107, 80,
825 105, 194, 194, 194, 194, 107, 145, 264, 224, 266,
827 267, 145, 272, 272, 272, 272, 225, 412, 80, 217,
828 217, 217, 217, 217, 217, 217, 217, 107, 232, 506,
829 145, 195, 195, 195, 195, 195, 195, 195, 195, 195,
830 195, 195, 195, 247, 247, 247, 247, 247, 247, 247,
831 247, 507, 276, 351, 107, 211, 211, 211, 211, 211,
832 211, 211, 211, 211, 211, 211, 211, 213, 228, 140,
833 102, 230, 341, 251, 214, 277, 272, 272, 272, 272,
834 80, 252, 80, 141, 141, 141, 141, 256, 272, 272,
835 272, 272, 145, 352, 145, 342, 213, 303, 304, 652,
836 215, 215, 215, 215, 215, 215, 215, 215, 215, 215,
838 215, 215, 321, 272, 272, 272, 272, 342, 273, 544,
839 275, 80, 322, 213, 218, 277, 219, 628, 80, 322,
840 355, 220, 221, 145, 501, 222, 279, 80, 223, 142,
841 145, 80, 272, 272, 272, 272, 218, 274, 219, 145,
842 263, 300, 301, 145, 220, 221, 323, 323, 323, 323,
843 222, 272, 272, 272, 272, 223, 121, 122, 122, 122,
844 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
845 121, 121, 80, 80, 80, 460, 121, 121, 121, 121,
846 279, 660, 80, 293, 145, 145, 145, 140, 648, 281,
847 288, 288, 288, 288, 145, 214, 80, 102, 295, 121,
849 125, 121, 214, 80, 288, 288, 288, 288, 145, 80,
850 280, 288, 288, 288, 288, 145, 324, 324, 324, 324,
851 294, 145, 401, 402, 214, 263, 655, 121, 121, 121,
852 234, 234, 234, 235, 291, 121, 121, 121, 121, 121,
853 121, 687, 441, 121, 121, 292, 653, 377, 687, 121,
854 121, 214, 121, 185, 297, 442, 378, 142, 185, 297,
855 189, 189, 189, 189, 190, 305, 305, 305, 305, 386,
856 687, 427, 121, 125, 325, 325, 325, 325, 326, 326,
857 326, 326, 327, 327, 327, 327, 326, 326, 326, 326,
858 356, 356, 356, 356, 404, 188, 504, 687, 303, 304,
860 121, 121, 237, 237, 237, 237, 237, 237, 237, 237,
861 237, 237, 237, 237, 80, 238, 404, 188, 338, 239,
862 349, 504, 80, 80, 80, 80, 240, 428, 241, 652,
863 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
864 242, 242, 242, 242, 242, 242, 242, 242, 243, 649,
865 351, 125, 244, 244, 244, 244, 244, 244, 244, 244,
866 244, 244, 244, 244, 80, 80, 80, 80, 80, 80,
867 80, 80, 80, 80, 80, 239, 80, 130, 130, 130,
868 130, 130, 130, 130, 130, 130, 130, 130, 130, 246,
869 352, 326, 326, 326, 326, 369, 247, 247, 247, 247,
871 370, 371, 248, 645, 249, 249, 249, 249, 249, 249,
872 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
873 249, 249, 249, 339, 326, 326, 326, 326, 415, 80,
874 250, 93, 93, 93, 376, 316, 401, 402, 80, 80,
875 80, 145, 416, 144, 96, 645, 150, 150, 150, 150,
876 145, 145, 145, 330, 152, 152, 152, 152, 152, 152,
877 152, 152, 144, 152, 144, 144, 152, 152, 152, 144,
878 144, 152, 144, 347, 435, 365, 152, 152, 152, 152,
879 152, 152, 152, 152, 152, 152, 152, 152, 144, 152,
880 152, 152, 152, 152, 144, 144, 144, 144, 144, 144,
882 144, 80, 640, 214, 639, 125, 311, 311, 311, 311,
883 214, 246, 140, 145, 234, 234, 234, 235, 357, 357,
884 357, 357, 364, 447, 248, 80, 368, 368, 368, 368,
885 473, 474, 214, 379, 379, 379, 379, 145, 638, 268,
886 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
887 268, 269, 359, 404, 188, 687, 320, 125, 270, 214,
888 80, 80, 687, 687, 687, 687, 80, 80, 687, 364,
889 448, 102, 145, 145, 380, 380, 380, 380, 145, 145,
890 269, 638, 142, 102, 271, 271, 271, 271, 271, 271,
891 271, 271, 271, 271, 271, 271, 687, 407, 407, 407,
893 407, 502, 388, 418, 418, 418, 418, 269, 282, 282,
894 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
895 80, 238, 635, 80, 502, 283, 634, 457, 144, 144,
896 144, 144, 284, 525, 241, 145, 285, 285, 285, 285,
897 285, 285, 285, 285, 285, 285, 285, 285, 285, 285,
898 285, 285, 285, 285, 286, 436, 436, 436, 287, 287,
899 287, 287, 287, 287, 287, 287, 287, 287, 287, 287,
900 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
901 144, 283, 144, 173, 173, 173, 173, 173, 173, 173,
902 173, 173, 173, 173, 173, 80, 246, 687, 437, 533,
904 144, 473, 474, 288, 288, 288, 288, 145, 534, 248,
905 687, 289, 289, 289, 289, 289, 289, 289, 289, 289,
906 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
907 404, 188, 632, 144, 144, 144, 144, 290, 144, 144,
908 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
909 144, 144, 144, 144, 144, 144, 144, 144, 215, 215,
910 215, 215, 215, 215, 215, 215, 215, 215, 215, 215,
911 328, 440, 440, 440, 440, 80, 447, 329, 631, 330,
912 80, 80, 80, 380, 380, 380, 380, 145, 380, 380,
913 380, 380, 145, 145, 145, 185, 476, 102, 626, 328,
915 477, 625, 498, 331, 331, 331, 331, 331, 331, 331,
916 331, 331, 331, 331, 331, 384, 498, 498, 624, 360,
917 385, 384, 385, 446, 473, 474, 328, 121, 234, 234,
918 234, 235, 361, 121, 121, 121, 121, 121, 121, 341,
919 80, 121, 121, 80, 80, 389, 80, 121, 121, 80,
920 121, 80, 145, 524, 397, 145, 145, 80, 145, 623,
921 445, 145, 387, 145, 80, 380, 380, 380, 380, 145,
922 121, 125, 393, 393, 393, 393, 145, 404, 188, 80,
923 88, 80, 473, 474, 387, 140, 620, 365, 441, 390,
924 451, 145, 90, 145, 687, 391, 398, 92, 121, 121,
926 246, 687, 185, 297, 523, 375, 523, 687, 392, 406,
927 406, 406, 406, 248, 392, 249, 249, 249, 249, 249,
928 249, 249, 249, 249, 249, 249, 249, 249, 249, 249,
929 249, 249, 249, 249, 396, 687, 478, 478, 478, 478,
930 619, 250, 244, 244, 244, 244, 244, 244, 244, 244,
931 244, 244, 244, 244, 360, 142, 473, 474, 204, 329,
932 205, 436, 436, 436, 102, 206, 329, 361, 330, 362,
933 362, 362, 362, 362, 362, 362, 362, 362, 362, 362,
934 362, 362, 362, 362, 362, 362, 362, 362, 329, 413,
935 612, 687, 329, 322, 80, 363, 80, 435, 687, 329,
937 322, 687, 80, 441, 437, 554, 145, 80, 145, 360,
938 80, 80, 80, 80, 452, 329, 442, 80, 80, 555,
939 687, 329, 687, 263, 453, 263, 97, 583, 512, 145,
940 145, 99, 417, 413, 271, 271, 271, 271, 271, 271,
941 271, 271, 271, 271, 271, 271, 381, 687, 329, 80,
942 687, 414, 80, 382, 80, 330, 80, 459, 459, 459,
943 459, 145, 80, 441, 145, 493, 145, 144, 145, 102,
944 144, 144, 144, 144, 145, 381, 442, 463, 494, 383,
945 383, 383, 383, 383, 383, 383, 383, 383, 383, 383,
946 383, 140, 523, 375, 523, 414, 498, 80, 466, 464,
948 461, 80, 381, 80, 246, 450, 450, 450, 450, 145,
949 498, 498, 102, 145, 102, 145, 102, 248, 599, 289,
950 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
951 289, 289, 289, 289, 289, 289, 289, 289, 102, 582,
952 102, 465, 611, 467, 102, 290, 287, 287, 287, 287,
953 287, 287, 287, 287, 287, 287, 287, 287, 360, 607,
954 80, 142, 446, 590, 560, 606, 561, 627, 102, 642,
955 533, 361, 145, 394, 394, 394, 394, 394, 394, 394,
956 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
957 394, 394, 513, 513, 513, 666, 600, 210, 210, 395,
959 331, 331, 331, 331, 331, 331, 331, 331, 331, 331,
960 331, 331, 383, 383, 383, 383, 383, 383, 383, 383,
961 383, 383, 383, 383, 427, 80, 491, 80, 503, 80,
962 140, 447, 140, 80, 598, 514, 80, 145, 492, 145,
963 80, 145, 518, 470, 109, 145, 427, 80, 145, 80,
964 608, 80, 145, 109, 597, 80, 528, 504, 80, 145,
965 527, 145, 80, 145, 516, 80, 505, 145, 687, 596,
966 145, 668, 608, 140, 145, 493, 140, 145, 469, 263,
967 462, 687, 504, 527, 532, 185, 297, 567, 687, 529,
968 608, 530, 537, 537, 537, 537, 513, 513, 513, 80,
970 519, 541, 142, 493, 140, 531, 140, 670, 212, 212,
971 592, 145, 608, 216, 216, 586, 494, 605, 495, 495,
972 495, 495, 495, 495, 495, 495, 495, 495, 495, 495,
973 495, 495, 495, 495, 495, 495, 495, 80, 493, 514,
974 80, 142, 592, 142, 245, 245, 142, 591, 102, 145,
975 573, 494, 145, 526, 526, 526, 526, 526, 526, 526,
976 526, 526, 526, 526, 526, 526, 526, 526, 526, 526,
977 526, 526, 140, 80, 142, 588, 142, 255, 177, 80,
978 80, 80, 80, 589, 80, 145, 557, 557, 557, 557,
979 80, 145, 145, 145, 145, 140, 145, 590, 185, 476,
981 613, 609, 145, 80, 562, 537, 537, 537, 537, 557,
982 557, 557, 557, 584, 80, 145, 80, 615, 80, 566,
983 375, 616, 564, 610, 608, 608, 145, 140, 145, 636,
984 145, 565, 102, 621, 140, 563, 565, 647, 618, 608,
985 584, 375, 142, 617, 608, 633, 608, 608, 630, 140,
986 650, 648, 608, 637, 102, 622, 140, 102, 604, 670,
987 646, 608, 354, 354, 540, 519, 608, 659, 375, 630,
988 630, 585, 593, 593, 608, 593, 593, 593, 593, 593,
989 641, 593, 593, 593, 593, 608, 593, 593, 608, 587,
990 643, 630, 593, 593, 593, 593, 630, 142, 581, 102,
992 580, 670, 595, 656, 142, 650, 579, 608, 375, 662,
993 608, 375, 644, 555, 375, 593, 593, 593, 630, 142,
994 578, 140, 140, 578, 595, 577, 142, 576, 575, 255,
995 574, 547, 664, 667, 375, 375, 630, 663, 547, 630,
996 573, 657, 630, 593, 593, 593, 593, 641, 593, 593,
997 593, 593, 593, 594, 593, 593, 593, 593, 630, 593,
998 593, 630, 630, 630, 630, 602, 593, 593, 593, 572,
999 658, 685, 670, 571, 570, 603, 670, 569, 541, 536,
1000 568, 375, 663, 671, 630, 630, 559, 672, 593, 593,
1001 593, 142, 142, 558, 670, 670, 670, 603, 670, 670,
1003 257, 670, 670, 670, 670, 673, 674, 675, 446, 676,
1004 677, 516, 678, 679, 680, 681, 593, 593, 593, 593,
1005 556, 593, 593, 593, 593, 593, 553, 593, 593, 593,
1006 593, 552, 593, 593, 670, 551, 550, 549, 593, 593,
1007 593, 593, 255, 548, 547, 682, 255, 670, 595, 670,
1008 134, 545, 543, 542, 541, 540, 539, 490, 683, 490,
1009 684, 593, 593, 593, 255, 255, 255, 488, 255, 255,
1010 595, 255, 255, 255, 255, 488, 486, 486, 484, 484,
1011 482, 482, 480, 480, 536, 521, 520, 208, 201, 593,
1012 593, 593, 593, 364, 593, 593, 593, 593, 593, 594,
1014 593, 593, 593, 593, 255, 593, 593, 517, 446, 516,
1015 439, 602, 593, 593, 593, 109, 511, 255, 510, 255,
1016 509, 603, 508, 427, 109, 501, 500, 499, 497, 496,
1017 416, 490, 488, 486, 593, 593, 593, 484, 482, 480,
1018 417, 297, 471, 603, 260, 375, 455, 454, 84, 202,
1019 449, 446, 364, 355, 439, 434, 433, 432, 202, 426,
1020 425, 424, 593, 593, 80, 423, 422, 421, 80, 80,
1021 420, 419, 80, 80, 80, 80, 80, 80, 80, 80,
1022 81, 81, 81, 81, 81, 330, 81, 81, 81, 81,
1023 81, 81, 81, 81, 81, 81, 81, 81, 81, 87,
1025 87, 417, 330, 208, 87, 87, 87, 101, 101, 101,
1026 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1027 101, 101, 101, 101, 101, 101, 124, 124, 124, 124,
1028 124, 124, 124, 124, 124, 124, 124, 124, 124, 124,
1029 124, 124, 124, 124, 124, 139, 139, 139, 139, 139,
1030 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
1031 139, 139, 139, 139, 144, 208, 202, 201, 144, 144,
1032 144, 201, 144, 144, 144, 144, 144, 144, 144, 144,
1033 184, 184, 184, 184, 184, 201, 184, 184, 184, 184,
1034 184, 184, 184, 184, 184, 184, 184, 184, 184, 186,
1036 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
1037 186, 186, 186, 186, 186, 186, 186, 186, 203, 203,
1038 309, 309, 307, 307, 399, 355, 260, 260, 203, 259,
1039 375, 203, 203, 259, 203, 121, 121, 121, 121, 121,
1040 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
1041 121, 121, 121, 121, 236, 236, 236, 236, 236, 236,
1042 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1043 236, 236, 236, 140, 140, 140, 140, 140, 140, 140,
1044 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
1045 140, 140, 258, 258, 258, 258, 258, 258, 258, 258,
1047 258, 258, 258, 258, 258, 258, 258, 258, 258, 258,
1048 258, 265, 265, 265, 265, 265, 265, 265, 265, 265,
1049 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
1050 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
1051 184, 184, 184, 184, 184, 184, 184, 184, 184, 186,
1052 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
1053 186, 186, 186, 186, 186, 186, 186, 186, 299, 299,
1054 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
1055 299, 299, 299, 299, 299, 299, 299, 302, 302, 302,
1056 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
1058 302, 302, 302, 302, 302, 302, 306, 306, 347, 306,
1059 306, 306, 306, 306, 306, 306, 306, 306, 306, 306,
1060 306, 306, 306, 306, 306, 308, 308, 367, 308, 308,
1061 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
1062 308, 308, 308, 308, 310, 339, 310, 338, 364, 246,
1063 310, 310, 310, 355, 355, 310, 348, 348, 348, 348,
1064 348, 348, 348, 348, 348, 348, 348, 348, 348, 348,
1065 348, 348, 348, 348, 348, 121, 121, 121, 121, 121,
1066 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
1067 121, 121, 121, 121, 350, 350, 350, 350, 350, 350,
1069 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
1070 350, 350, 350, 236, 236, 236, 236, 236, 236, 236,
1071 236, 236, 236, 236, 236, 236, 236, 236, 236, 236,
1072 236, 236, 353, 353, 353, 358, 238, 346, 345, 358,
1073 344, 358, 358, 358, 358, 343, 358, 258, 258, 258,
1074 258, 258, 258, 258, 258, 258, 258, 258, 258, 258,
1075 258, 258, 258, 258, 258, 258, 374, 374, 374, 374,
1076 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
1077 374, 374, 374, 374, 374, 265, 265, 265, 265, 265,
1078 265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
1080 265, 265, 265, 265, 101, 101, 101, 101, 101, 101,
1081 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1082 101, 101, 101, 302, 302, 302, 302, 302, 302, 302,
1083 302, 302, 302, 302, 302, 302, 302, 302, 302, 302,
1084 302, 302, 299, 299, 299, 299, 299, 299, 299, 299,
1085 299, 299, 299, 299, 299, 299, 299, 299, 299, 299,
1086 299, 400, 400, 400, 400, 400, 400, 400, 400, 400,
1087 400, 400, 400, 400, 400, 400, 400, 400, 400, 400,
1088 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
1089 403, 403, 403, 403, 403, 403, 403, 403, 403, 405,
1091 405, 405, 405, 405, 405, 405, 405, 405, 405, 405,
1092 405, 405, 405, 405, 405, 405, 405, 405, 184, 184,
1093 184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
1094 184, 184, 184, 184, 184, 184, 184, 306, 306, 340,
1095 306, 306, 306, 306, 306, 306, 306, 306, 306, 306,
1096 306, 306, 306, 306, 306, 306, 308, 308, 336, 308,
1097 308, 308, 308, 308, 308, 308, 308, 308, 308, 308,
1098 308, 308, 308, 308, 308, 408, 335, 408, 408, 334,
1099 333, 408, 408, 408, 332, 320, 408, 348, 348, 348,
1100 348, 348, 348, 348, 348, 348, 348, 348, 348, 348,
1102 348, 348, 348, 348, 348, 348, 350, 350, 350, 350,
1103 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
1104 350, 350, 350, 350, 350, 121, 121, 121, 121, 121,
1105 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
1106 121, 121, 121, 121, 438, 438, 438, 438, 438, 438,
1107 438, 438, 438, 438, 438, 438, 438, 438, 438, 438,
1108 438, 438, 438, 443, 443, 320, 319, 443, 443, 318,
1109 443, 443, 443, 443, 443, 443, 443, 443, 443, 444,
1110 317, 316, 316, 315, 314, 444, 444, 444, 444, 313,
1111 444, 374, 374, 374, 374, 374, 374, 374, 374, 374,
1113 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
1114 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
1115 101, 101, 101, 101, 101, 101, 101, 101, 101, 468,
1116 468, 312, 309, 468, 468, 468, 468, 468, 468, 468,
1117 468, 468, 468, 468, 468, 401, 401, 401, 401, 401,
1118 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
1119 401, 401, 401, 401, 472, 472, 472, 472, 472, 472,
1120 472, 472, 472, 472, 472, 472, 472, 472, 472, 472,
1121 472, 472, 472, 475, 475, 475, 475, 475, 475, 475,
1122 475, 475, 475, 475, 475, 475, 475, 475, 475, 475,
1124 475, 475, 479, 479, 307, 479, 479, 479, 479, 479,
1125 479, 479, 479, 479, 479, 479, 479, 479, 479, 479,
1126 479, 481, 481, 296, 481, 481, 481, 481, 481, 481,
1127 481, 481, 481, 481, 481, 481, 481, 481, 481, 481,
1128 483, 483, 260, 483, 483, 483, 483, 483, 483, 483,
1129 483, 483, 483, 483, 483, 483, 483, 483, 483, 485,
1130 485, 278, 485, 485, 485, 485, 485, 485, 485, 485,
1131 485, 485, 485, 485, 485, 485, 485, 485, 487, 487,
1132 260, 487, 487, 487, 487, 487, 487, 487, 487, 487,
1133 487, 487, 487, 487, 487, 487, 487, 489, 489, 260,
1135 489, 489, 489, 489, 489, 489, 489, 489, 489, 489,
1136 489, 489, 489, 489, 489, 489, 348, 348, 348, 348,
1137 348, 348, 348, 348, 348, 348, 348, 348, 348, 348,
1138 348, 348, 348, 348, 348, 121, 121, 121, 121, 121,
1139 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
1140 121, 121, 121, 121, 438, 438, 438, 438, 438, 438,
1141 438, 438, 438, 438, 438, 438, 438, 438, 438, 438,
1142 438, 438, 438, 515, 259, 257, 255, 254, 230, 515,
1143 515, 515, 515, 515, 515, 515, 515, 515, 522, 522,
1144 522, 522, 522, 522, 522, 522, 522, 522, 522, 522,
1146 522, 522, 522, 522, 522, 522, 522, 535, 535, 535,
1147 535, 202, 535, 535, 535, 535, 535, 535, 535, 535,
1148 535, 535, 535, 535, 535, 535, 538, 253, 228, 125,
1149 231, 202, 538, 538, 538, 538, 546, 546, 229, 546,
1150 546, 546, 546, 546, 546, 546, 546, 546, 546, 546,
1151 546, 546, 546, 546, 546, 594, 594, 227, 594, 594,
1152 594, 594, 594, 594, 594, 594, 594, 594, 594, 594,
1153 594, 594, 594, 594, 601, 601, 227, 601, 601, 601,
1154 601, 601, 601, 601, 601, 601, 601, 601, 601, 601,
1155 601, 601, 601, 593, 593, 226, 593, 593, 593, 593,
1157 593, 593, 593, 593, 593, 593, 593, 593, 593, 593,
1158 593, 593, 629, 629, 629, 629, 629, 629, 629, 629,
1159 629, 629, 629, 629, 629, 629, 629, 629, 629, 629,
1160 629, 651, 651, 651, 651, 651, 651, 651, 651, 651,
1161 651, 651, 651, 651, 651, 651, 651, 651, 651, 651,
1162 654, 654, 654, 654, 654, 654, 654, 654, 654, 654,
1163 654, 654, 654, 654, 654, 654, 654, 654, 654, 669,
1164 669, 669, 669, 669, 669, 669, 669, 669, 669, 669,
1165 669, 669, 669, 669, 669, 669, 669, 669, 102, 208,
1166 207, 201, 202, 201, 193, 185, 183, 167, 166, 163,
1168 160, 159, 143, 119, 137, 134, 119, 118, 115, 112,
1169 111, 102, 84, 687, 3, 687, 687, 687, 687, 687,
1170 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
1171 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
1172 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
1173 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
1174 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
1175 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
1176 687, 687, 687, 687, 687, 687, 687, 687
1179 static yyconst flex_int16_t yy_chk[3889] =
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, 1, 1, 1, 1, 1, 1, 1,
1185 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1186 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1187 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1188 1, 1, 1, 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,
1192 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1193 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1194 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1195 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1196 2, 2, 2, 2, 2, 2, 5, 6, 6, 6,
1197 6, 8, 10, 10, 11, 19, 21, 45, 8, 8,
1198 8, 8, 16, 151, 11, 13, 11, 11, 5, 45,
1199 56, 11, 12, 12, 12, 13, 151, 13, 19, 12,
1200 21, 97, 13, 97, 12, 12, 12, 12, 12, 12,
1201 12, 12, 685, 24, 56, 12, 12, 12, 12, 12,
1203 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
1204 12, 12, 12, 12, 27, 51, 16, 12, 12, 12,
1205 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
1206 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
1207 12, 12, 15, 24, 15, 39, 15, 15, 15, 15,
1208 15, 15, 250, 28, 15, 28, 28, 49, 49, 27,
1209 28, 30, 30, 259, 30, 30, 30, 42, 27, 51,
1210 31, 31, 259, 15, 31, 31, 31, 15, 15, 15,
1211 15, 15, 15, 15, 15, 15, 15, 15, 15, 33,
1212 33, 62, 39, 62, 62, 33, 33, 33, 62, 250,
1214 15, 25, 25, 25, 25, 25, 25, 25, 25, 25,
1215 25, 25, 25, 25, 25, 25, 25, 42, 82, 82,
1216 32, 25, 25, 25, 25, 29, 29, 29, 29, 29,
1217 32, 32, 34, 34, 59, 32, 32, 32, 665, 34,
1218 34, 34, 29, 32, 25, 25, 25, 35, 35, 36,
1219 36, 37, 37, 43, 48, 35, 35, 35, 36, 36,
1220 36, 37, 37, 54, 48, 123, 48, 43, 43, 43,
1221 43, 48, 25, 25, 26, 61, 378, 26, 26, 26,
1222 26, 26, 46, 318, 59, 318, 54, 46, 79, 79,
1223 79, 79, 46, 74, 46, 46, 123, 64, 64, 46,
1225 64, 64, 64, 26, 375, 74, 375, 26, 26, 26,
1226 26, 26, 26, 26, 26, 26, 26, 26, 26, 661,
1227 61, 89, 89, 43, 63, 63, 63, 63, 63, 61,
1228 26, 47, 47, 47, 378, 74, 223, 139, 47, 660,
1229 84, 63, 223, 47, 47, 47, 47, 47, 47, 47,
1230 47, 93, 93, 93, 47, 47, 47, 47, 47, 47,
1231 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
1232 47, 47, 47, 96, 96, 96, 47, 47, 47, 47,
1233 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
1234 47, 47, 47, 47, 47, 47, 47, 47, 47, 47,
1236 47, 50, 84, 654, 50, 144, 50, 139, 50, 50,
1237 50, 50, 50, 50, 65, 65, 50, 144, 65, 65,
1238 65, 67, 67, 68, 68, 146, 152, 67, 67, 67,
1239 68, 68, 68, 146, 146, 50, 341, 146, 152, 50,
1240 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,
1241 50, 69, 69, 148, 71, 71, 153, 153, 341, 69,
1242 69, 69, 50, 60, 71, 71, 66, 148, 60, 70,
1243 70, 60, 60, 60, 60, 60, 66, 66, 70, 70,
1244 70, 66, 66, 66, 72, 233, 73, 75, 88, 66,
1245 88, 73, 184, 184, 316, 88, 72, 60, 73, 75,
1247 600, 60, 60, 60, 60, 60, 60, 60, 60, 60,
1248 60, 60, 60, 76, 263, 147, 233, 77, 76, 185,
1249 185, 653, 72, 147, 60, 161, 263, 147, 77, 342,
1250 76, 77, 77, 77, 77, 186, 186, 161, 73, 83,
1251 94, 94, 94, 98, 75, 320, 83, 83, 83, 83,
1252 83, 342, 94, 98, 94, 98, 316, 161, 600, 94,
1253 98, 187, 187, 76, 108, 108, 108, 108, 110, 110,
1254 110, 110, 111, 111, 111, 111, 131, 131, 131, 131,
1255 120, 120, 120, 120, 162, 188, 188, 77, 87, 149,
1256 87, 87, 87, 87, 87, 87, 162, 149, 110, 265,
1258 265, 149, 157, 157, 157, 157, 111, 320, 177, 115,
1259 115, 115, 115, 118, 118, 118, 118, 87, 120, 429,
1260 177, 87, 87, 87, 87, 87, 87, 87, 87, 87,
1261 87, 87, 87, 132, 132, 132, 132, 133, 133, 133,
1262 133, 429, 162, 235, 87, 104, 104, 104, 104, 104,
1263 104, 104, 104, 104, 104, 104, 104, 106, 115, 141,
1264 614, 118, 227, 132, 106, 177, 163, 163, 163, 163,
1265 180, 133, 160, 141, 141, 141, 141, 141, 158, 158,
1266 158, 158, 180, 235, 160, 227, 106, 298, 298, 651,
1267 106, 106, 106, 106, 106, 106, 106, 106, 106, 106,
1269 106, 106, 209, 159, 159, 159, 159, 227, 158, 499,
1270 160, 165, 209, 106, 109, 163, 109, 614, 285, 209,
1271 285, 109, 109, 165, 499, 109, 180, 384, 109, 141,
1272 285, 178, 166, 166, 166, 166, 109, 159, 109, 384,
1273 165, 299, 299, 178, 109, 109, 210, 210, 210, 210,
1274 109, 168, 168, 168, 168, 109, 122, 122, 122, 122,
1275 122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
1276 122, 122, 167, 179, 181, 384, 122, 122, 122, 122,
1277 166, 649, 174, 178, 167, 179, 181, 182, 647, 168,
1278 174, 174, 174, 174, 174, 194, 175, 267, 182, 122,
1280 122, 122, 194, 176, 175, 175, 175, 175, 175, 275,
1281 167, 176, 176, 176, 176, 176, 211, 211, 211, 211,
1282 181, 275, 300, 300, 194, 179, 641, 122, 122, 124,
1283 124, 124, 124, 124, 175, 124, 124, 124, 124, 124,
1284 124, 214, 440, 124, 124, 176, 640, 267, 214, 124,
1285 124, 194, 124, 189, 189, 440, 267, 182, 190, 190,
1286 189, 189, 189, 189, 189, 190, 190, 190, 190, 275,
1287 214, 340, 124, 124, 212, 212, 212, 212, 215, 215,
1288 215, 215, 216, 216, 216, 216, 224, 224, 224, 224,
1289 244, 244, 244, 244, 301, 301, 575, 214, 302, 302,
1291 124, 124, 126, 126, 126, 126, 126, 126, 126, 126,
1292 126, 126, 126, 126, 127, 127, 303, 303, 224, 127,
1293 348, 575, 127, 127, 127, 127, 127, 340, 127, 639,
1294 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
1295 127, 127, 127, 127, 127, 127, 127, 127, 127, 635,
1296 350, 348, 127, 127, 127, 127, 127, 127, 127, 127,
1297 127, 127, 127, 127, 127, 127, 127, 127, 127, 127,
1298 127, 127, 127, 127, 127, 127, 127, 129, 129, 129,
1299 129, 129, 129, 129, 129, 129, 129, 129, 129, 130,
1300 350, 225, 225, 225, 225, 257, 130, 130, 130, 130,
1302 257, 257, 130, 632, 130, 130, 130, 130, 130, 130,
1303 130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
1304 130, 130, 130, 225, 232, 232, 232, 232, 322, 261,
1305 130, 150, 150, 150, 261, 262, 400, 400, 150, 379,
1306 262, 261, 322, 150, 150, 631, 150, 150, 150, 150,
1307 150, 379, 262, 379, 150, 150, 150, 150, 150, 150,
1308 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1309 150, 150, 150, 232, 349, 359, 150, 150, 150, 150,
1310 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1311 150, 150, 150, 150, 150, 150, 150, 150, 150, 150,
1313 150, 154, 626, 195, 625, 349, 195, 195, 195, 195,
1314 195, 245, 256, 154, 234, 234, 234, 234, 245, 245,
1315 245, 245, 359, 363, 245, 268, 256, 256, 256, 256,
1316 402, 402, 195, 268, 268, 268, 268, 268, 624, 154,
1317 154, 154, 154, 154, 154, 154, 154, 154, 154, 154,
1318 154, 155, 245, 403, 403, 246, 264, 234, 155, 195,
1319 277, 264, 246, 246, 246, 246, 271, 289, 246, 289,
1320 363, 458, 277, 264, 271, 271, 271, 271, 271, 289,
1321 155, 623, 256, 377, 155, 155, 155, 155, 155, 155,
1322 155, 155, 155, 155, 155, 155, 246, 310, 310, 310,
1324 310, 426, 277, 331, 331, 331, 331, 155, 169, 169,
1325 169, 169, 169, 169, 169, 169, 169, 169, 169, 169,
1326 170, 170, 620, 388, 426, 170, 619, 377, 170, 170,
1327 170, 170, 170, 458, 170, 388, 170, 170, 170, 170,
1328 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
1329 170, 170, 170, 170, 170, 351, 351, 351, 170, 170,
1330 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
1331 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
1332 170, 170, 170, 172, 172, 172, 172, 172, 172, 172,
1333 172, 172, 172, 172, 172, 173, 173, 441, 351, 471,
1335 173, 404, 404, 173, 173, 173, 173, 173, 471, 173,
1336 441, 173, 173, 173, 173, 173, 173, 173, 173, 173,
1337 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
1338 405, 405, 617, 173, 173, 173, 173, 173, 173, 173,
1339 173, 173, 173, 173, 173, 173, 173, 173, 173, 173,
1340 173, 173, 173, 173, 173, 173, 173, 173, 213, 213,
1341 213, 213, 213, 213, 213, 213, 213, 213, 213, 213,
1342 217, 354, 354, 354, 354, 273, 445, 217, 616, 217,
1343 274, 291, 292, 273, 273, 273, 273, 273, 274, 274,
1344 274, 274, 274, 291, 292, 406, 406, 457, 612, 217,
1346 406, 611, 421, 217, 217, 217, 217, 217, 217, 217,
1347 217, 217, 217, 217, 217, 273, 421, 421, 610, 357,
1348 274, 291, 292, 445, 472, 472, 217, 236, 236, 236,
1349 236, 236, 357, 236, 236, 236, 236, 236, 236, 276,
1350 278, 236, 236, 279, 276, 278, 280, 236, 236, 293,
1351 236, 294, 278, 457, 293, 279, 276, 281, 280, 609,
1352 357, 293, 276, 294, 287, 281, 281, 281, 281, 281,
1353 236, 236, 287, 287, 287, 287, 287, 474, 474, 396,
1354 370, 290, 475, 475, 276, 295, 607, 290, 442, 279,
1355 370, 396, 370, 290, 360, 280, 295, 370, 236, 236,
1357 237, 442, 305, 305, 456, 456, 456, 360, 294, 305,
1358 305, 305, 305, 237, 281, 237, 237, 237, 237, 237,
1359 237, 237, 237, 237, 237, 237, 237, 237, 237, 237,
1360 237, 237, 237, 237, 290, 360, 408, 408, 408, 408,
1361 606, 237, 239, 239, 239, 239, 239, 239, 239, 239,
1362 239, 239, 239, 239, 247, 295, 536, 536, 452, 311,
1363 452, 436, 436, 436, 561, 452, 311, 247, 311, 247,
1364 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
1365 247, 247, 247, 247, 247, 247, 247, 247, 311, 321,
1366 598, 329, 325, 321, 389, 247, 269, 435, 329, 325,
1368 321, 325, 356, 356, 436, 510, 389, 356, 269, 361,
1369 356, 356, 356, 356, 371, 311, 356, 376, 380, 510,
1370 329, 325, 361, 389, 371, 376, 371, 561, 435, 376,
1371 380, 371, 380, 570, 269, 269, 269, 269, 269, 269,
1372 269, 269, 269, 269, 269, 269, 272, 329, 325, 383,
1373 361, 321, 385, 272, 387, 272, 391, 383, 383, 383,
1374 383, 383, 393, 393, 385, 478, 387, 393, 391, 582,
1375 393, 393, 393, 393, 393, 272, 393, 387, 478, 272,
1376 272, 272, 272, 272, 272, 272, 272, 272, 272, 272,
1377 272, 368, 523, 523, 523, 570, 498, 390, 391, 387,
1379 385, 392, 272, 282, 282, 368, 368, 368, 368, 390,
1380 498, 498, 613, 392, 525, 282, 524, 282, 582, 282,
1381 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
1382 282, 282, 282, 282, 282, 282, 282, 282, 560, 560,
1383 662, 390, 597, 392, 583, 282, 283, 283, 283, 283,
1384 283, 283, 283, 283, 283, 283, 283, 283, 288, 591,
1385 394, 368, 394, 589, 524, 588, 525, 613, 628, 628,
1386 587, 288, 394, 288, 288, 288, 288, 288, 288, 288,
1387 288, 288, 288, 288, 288, 288, 288, 288, 288, 288,
1388 288, 288, 439, 439, 439, 662, 583, 698, 698, 288,
1390 328, 328, 328, 328, 328, 328, 328, 328, 328, 328,
1391 328, 328, 381, 381, 381, 381, 381, 381, 381, 381,
1392 381, 381, 381, 381, 386, 395, 416, 397, 427, 386,
1393 450, 395, 398, 461, 581, 439, 463, 395, 416, 397,
1394 465, 386, 450, 398, 460, 461, 462, 464, 463, 460,
1395 592, 462, 465, 467, 580, 466, 463, 427, 467, 464,
1396 461, 460, 468, 462, 468, 469, 427, 466, 493, 579,
1397 467, 667, 592, 470, 468, 494, 532, 469, 395, 397,
1398 386, 493, 427, 461, 470, 477, 477, 532, 494, 464,
1399 593, 465, 477, 477, 477, 477, 513, 513, 513, 526,
1401 450, 526, 398, 418, 567, 466, 586, 668, 699, 699,
1402 577, 526, 593, 700, 700, 567, 418, 586, 418, 418,
1403 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
1404 418, 418, 418, 418, 418, 418, 418, 459, 459, 513,
1405 527, 667, 576, 470, 703, 703, 532, 574, 599, 459,
1406 572, 459, 527, 459, 459, 459, 459, 459, 459, 459,
1407 459, 459, 459, 459, 459, 459, 459, 459, 459, 459,
1408 459, 459, 518, 528, 567, 571, 586, 668, 527, 529,
1409 530, 531, 562, 573, 563, 528, 518, 518, 518, 518,
1410 564, 529, 530, 531, 562, 557, 563, 573, 537, 537,
1412 599, 595, 564, 565, 528, 537, 537, 537, 537, 557,
1413 557, 557, 557, 562, 566, 565, 585, 602, 604, 531,
1414 615, 603, 530, 595, 621, 622, 566, 605, 585, 621,
1415 604, 564, 627, 608, 618, 529, 530, 634, 605, 608,
1416 563, 629, 518, 603, 602, 618, 621, 622, 615, 633,
1417 636, 634, 636, 622, 642, 608, 646, 656, 585, 669,
1418 633, 608, 719, 719, 569, 557, 602, 646, 630, 629,
1419 615, 566, 578, 578, 636, 578, 578, 578, 578, 578,
1420 627, 578, 578, 578, 578, 637, 578, 578, 650, 568,
1421 630, 629, 578, 578, 578, 578, 630, 605, 559, 666,
1423 558, 684, 578, 642, 618, 637, 556, 637, 643, 656,
1424 650, 657, 630, 554, 644, 578, 578, 578, 630, 633,
1425 553, 659, 664, 552, 578, 551, 646, 550, 549, 669,
1426 548, 547, 659, 664, 658, 663, 643, 657, 546, 657,
1427 545, 643, 644, 578, 578, 584, 584, 666, 584, 584,
1428 584, 584, 584, 584, 584, 584, 584, 584, 643, 584,
1429 584, 657, 658, 663, 644, 584, 584, 584, 584, 543,
1430 644, 684, 670, 542, 540, 584, 671, 539, 538, 535,
1431 534, 522, 658, 670, 658, 663, 521, 671, 584, 584,
1432 584, 659, 664, 520, 672, 673, 674, 584, 675, 676,
1434 519, 677, 678, 679, 680, 672, 673, 674, 517, 675,
1435 676, 515, 677, 678, 679, 680, 584, 584, 594, 594,
1436 511, 594, 594, 594, 594, 594, 509, 594, 594, 594,
1437 594, 508, 594, 594, 681, 507, 506, 505, 594, 594,
1438 594, 594, 670, 504, 503, 681, 671, 682, 594, 683,
1439 502, 500, 497, 496, 495, 492, 491, 490, 682, 489,
1440 683, 594, 594, 594, 672, 673, 674, 488, 675, 676,
1441 594, 677, 678, 679, 680, 487, 486, 485, 484, 483,
1442 482, 481, 480, 479, 473, 455, 454, 453, 451, 594,
1443 594, 601, 601, 449, 601, 601, 601, 601, 601, 601,
1445 601, 601, 601, 601, 681, 601, 601, 447, 444, 443,
1446 438, 601, 601, 601, 601, 434, 433, 682, 432, 683,
1447 431, 601, 430, 428, 425, 424, 423, 422, 420, 419,
1448 415, 414, 413, 412, 601, 601, 601, 411, 410, 409,
1449 407, 401, 399, 601, 382, 374, 373, 372, 369, 367,
1450 365, 362, 358, 353, 352, 347, 346, 345, 344, 339,
1451 338, 337, 601, 601, 688, 336, 335, 334, 688, 688,
1452 333, 332, 688, 688, 688, 688, 688, 688, 688, 688,
1453 689, 689, 689, 689, 689, 327, 689, 689, 689, 689,
1454 689, 689, 689, 689, 689, 689, 689, 689, 689, 690,
1456 690, 326, 324, 319, 690, 690, 690, 691, 691, 691,
1457 691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
1458 691, 691, 691, 691, 691, 691, 692, 692, 692, 692,
1459 692, 692, 692, 692, 692, 692, 692, 692, 692, 692,
1460 692, 692, 692, 692, 692, 693, 693, 693, 693, 693,
1461 693, 693, 693, 693, 693, 693, 693, 693, 693, 693,
1462 693, 693, 693, 693, 694, 317, 315, 314, 694, 694,
1463 694, 313, 694, 694, 694, 694, 694, 694, 694, 694,
1464 695, 695, 695, 695, 695, 312, 695, 695, 695, 695,
1465 695, 695, 695, 695, 695, 695, 695, 695, 695, 696,
1467 696, 696, 696, 696, 696, 696, 696, 696, 696, 696,
1468 696, 696, 696, 696, 696, 696, 696, 696, 697, 697,
1469 309, 308, 307, 306, 296, 286, 284, 270, 697, 266,
1470 260, 697, 697, 258, 697, 701, 701, 701, 701, 701,
1471 701, 701, 701, 701, 701, 701, 701, 701, 701, 701,
1472 701, 701, 701, 701, 702, 702, 702, 702, 702, 702,
1473 702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
1474 702, 702, 702, 704, 704, 704, 704, 704, 704, 704,
1475 704, 704, 704, 704, 704, 704, 704, 704, 704, 704,
1476 704, 704, 705, 705, 705, 705, 705, 705, 705, 705,
1478 705, 705, 705, 705, 705, 705, 705, 705, 705, 705,
1479 705, 706, 706, 706, 706, 706, 706, 706, 706, 706,
1480 706, 706, 706, 706, 706, 706, 706, 706, 706, 706,
1481 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
1482 707, 707, 707, 707, 707, 707, 707, 707, 707, 708,
1483 708, 708, 708, 708, 708, 708, 708, 708, 708, 708,
1484 708, 708, 708, 708, 708, 708, 708, 708, 709, 709,
1485 709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
1486 709, 709, 709, 709, 709, 709, 709, 710, 710, 710,
1487 710, 710, 710, 710, 710, 710, 710, 710, 710, 710,
1489 710, 710, 710, 710, 710, 710, 711, 711, 254, 711,
1490 711, 711, 711, 711, 711, 711, 711, 711, 711, 711,
1491 711, 711, 711, 711, 711, 712, 712, 253, 712, 712,
1492 712, 712, 712, 712, 712, 712, 712, 712, 712, 712,
1493 712, 712, 712, 712, 713, 252, 713, 251, 249, 248,
1494 713, 713, 713, 243, 242, 713, 714, 714, 714, 714,
1495 714, 714, 714, 714, 714, 714, 714, 714, 714, 714,
1496 714, 714, 714, 714, 714, 715, 715, 715, 715, 715,
1497 715, 715, 715, 715, 715, 715, 715, 715, 715, 715,
1498 715, 715, 715, 715, 716, 716, 716, 716, 716, 716,
1500 716, 716, 716, 716, 716, 716, 716, 716, 716, 716,
1501 716, 716, 716, 717, 717, 717, 717, 717, 717, 717,
1502 717, 717, 717, 717, 717, 717, 717, 717, 717, 717,
1503 717, 717, 718, 718, 718, 720, 241, 231, 230, 720,
1504 229, 720, 720, 720, 720, 228, 720, 721, 721, 721,
1505 721, 721, 721, 721, 721, 721, 721, 721, 721, 721,
1506 721, 721, 721, 721, 721, 721, 722, 722, 722, 722,
1507 722, 722, 722, 722, 722, 722, 722, 722, 722, 722,
1508 722, 722, 722, 722, 722, 723, 723, 723, 723, 723,
1509 723, 723, 723, 723, 723, 723, 723, 723, 723, 723,
1511 723, 723, 723, 723, 724, 724, 724, 724, 724, 724,
1512 724, 724, 724, 724, 724, 724, 724, 724, 724, 724,
1513 724, 724, 724, 725, 725, 725, 725, 725, 725, 725,
1514 725, 725, 725, 725, 725, 725, 725, 725, 725, 725,
1515 725, 725, 726, 726, 726, 726, 726, 726, 726, 726,
1516 726, 726, 726, 726, 726, 726, 726, 726, 726, 726,
1517 726, 727, 727, 727, 727, 727, 727, 727, 727, 727,
1518 727, 727, 727, 727, 727, 727, 727, 727, 727, 727,
1519 728, 728, 728, 728, 728, 728, 728, 728, 728, 728,
1520 728, 728, 728, 728, 728, 728, 728, 728, 728, 729,
1522 729, 729, 729, 729, 729, 729, 729, 729, 729, 729,
1523 729, 729, 729, 729, 729, 729, 729, 729, 730, 730,
1524 730, 730, 730, 730, 730, 730, 730, 730, 730, 730,
1525 730, 730, 730, 730, 730, 730, 730, 731, 731, 226,
1526 731, 731, 731, 731, 731, 731, 731, 731, 731, 731,
1527 731, 731, 731, 731, 731, 731, 732, 732, 222, 732,
1528 732, 732, 732, 732, 732, 732, 732, 732, 732, 732,
1529 732, 732, 732, 732, 732, 733, 221, 733, 733, 220,
1530 219, 733, 733, 733, 218, 208, 733, 734, 734, 734,
1531 734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
1533 734, 734, 734, 734, 734, 734, 735, 735, 735, 735,
1534 735, 735, 735, 735, 735, 735, 735, 735, 735, 735,
1535 735, 735, 735, 735, 735, 736, 736, 736, 736, 736,
1536 736, 736, 736, 736, 736, 736, 736, 736, 736, 736,
1537 736, 736, 736, 736, 737, 737, 737, 737, 737, 737,
1538 737, 737, 737, 737, 737, 737, 737, 737, 737, 737,
1539 737, 737, 737, 738, 738, 207, 206, 738, 738, 205,
1540 738, 738, 738, 738, 738, 738, 738, 738, 738, 739,
1541 204, 201, 200, 199, 198, 739, 739, 739, 739, 197,
1542 739, 740, 740, 740, 740, 740, 740, 740, 740, 740,
1544 740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
1545 741, 741, 741, 741, 741, 741, 741, 741, 741, 741,
1546 741, 741, 741, 741, 741, 741, 741, 741, 741, 742,
1547 742, 196, 192, 742, 742, 742, 742, 742, 742, 742,
1548 742, 742, 742, 742, 742, 743, 743, 743, 743, 743,
1549 743, 743, 743, 743, 743, 743, 743, 743, 743, 743,
1550 743, 743, 743, 743, 744, 744, 744, 744, 744, 744,
1551 744, 744, 744, 744, 744, 744, 744, 744, 744, 744,
1552 744, 744, 744, 745, 745, 745, 745, 745, 745, 745,
1553 745, 745, 745, 745, 745, 745, 745, 745, 745, 745,
1555 745, 745, 746, 746, 191, 746, 746, 746, 746, 746,
1556 746, 746, 746, 746, 746, 746, 746, 746, 746, 746,
1557 746, 747, 747, 183, 747, 747, 747, 747, 747, 747,
1558 747, 747, 747, 747, 747, 747, 747, 747, 747, 747,
1559 748, 748, 171, 748, 748, 748, 748, 748, 748, 748,
1560 748, 748, 748, 748, 748, 748, 748, 748, 748, 749,
1561 749, 164, 749, 749, 749, 749, 749, 749, 749, 749,
1562 749, 749, 749, 749, 749, 749, 749, 749, 750, 750,
1563 156, 750, 750, 750, 750, 750, 750, 750, 750, 750,
1564 750, 750, 750, 750, 750, 750, 750, 751, 751, 145,
1566 751, 751, 751, 751, 751, 751, 751, 751, 751, 751,
1567 751, 751, 751, 751, 751, 751, 752, 752, 752, 752,
1568 752, 752, 752, 752, 752, 752, 752, 752, 752, 752,
1569 752, 752, 752, 752, 752, 753, 753, 753, 753, 753,
1570 753, 753, 753, 753, 753, 753, 753, 753, 753, 753,
1571 753, 753, 753, 753, 754, 754, 754, 754, 754, 754,
1572 754, 754, 754, 754, 754, 754, 754, 754, 754, 754,
1573 754, 754, 754, 755, 143, 142, 140, 138, 137, 755,
1574 755, 755, 755, 755, 755, 755, 755, 755, 756, 756,
1575 756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
1577 756, 756, 756, 756, 756, 756, 756, 757, 757, 757,
1578 757, 136, 757, 757, 757, 757, 757, 757, 757, 757,
1579 757, 757, 757, 757, 757, 757, 758, 135, 134, 121,
1580 119, 117, 758, 758, 758, 758, 759, 759, 116, 759,
1581 759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
1582 759, 759, 759, 759, 759, 760, 760, 114, 760, 760,
1583 760, 760, 760, 760, 760, 760, 760, 760, 760, 760,
1584 760, 760, 760, 760, 761, 761, 113, 761, 761, 761,
1585 761, 761, 761, 761, 761, 761, 761, 761, 761, 761,
1586 761, 761, 761, 762, 762, 112, 762, 762, 762, 762,
1588 762, 762, 762, 762, 762, 762, 762, 762, 762, 762,
1589 762, 762, 763, 763, 763, 763, 763, 763, 763, 763,
1590 763, 763, 763, 763, 763, 763, 763, 763, 763, 763,
1591 763, 764, 764, 764, 764, 764, 764, 764, 764, 764,
1592 764, 764, 764, 764, 764, 764, 764, 764, 764, 764,
1593 765, 765, 765, 765, 765, 765, 765, 765, 765, 765,
1594 765, 765, 765, 765, 765, 765, 765, 765, 765, 766,
1595 766, 766, 766, 766, 766, 766, 766, 766, 766, 766,
1596 766, 766, 766, 766, 766, 766, 766, 766, 101, 99,
1597 95, 92, 91, 90, 86, 81, 78, 58, 57, 55,
1599 53, 52, 44, 41, 40, 38, 23, 22, 20, 18,
1600 17, 14, 9, 3, 687, 687, 687, 687, 687, 687,
1601 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
1602 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
1603 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
1604 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
1605 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
1606 687, 687, 687, 687, 687, 687, 687, 687, 687, 687,
1607 687, 687, 687, 687, 687, 687, 687, 687
1610 extern int yy_flex_debug;
1611 int yy_flex_debug = 0;
1613 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
1614 static char *yy_full_match;
1616 static int yy_looking_for_trail_begin = 0;
1617 static int yy_full_lp;
1618 static int *yy_full_state;
1619 #define YY_TRAILING_MASK 0x2000
1620 #define YY_TRAILING_HEAD_MASK 0x4000
1623 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
1624 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
1625 (yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
1626 (yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
1627 yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
1632 #define yymore() yymore_used_but_not_detected
1633 #define YY_MORE_ADJ 0
1634 #define YY_RESTORE_YY_MORE_OFFSET
1639 * parser.l -- lex parser of algebraic chess moves for XBoard
\r
1641 * Copyright 1991 by Digital Equipment Corporation, Maynard,
\r
1644 * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005,
\r
1645 * 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
\r
1647 * The following terms apply to Digital Equipment Corporation's copyright
\r
1648 * interest in XBoard:
\r
1649 * ------------------------------------------------------------------------
\r
1650 * All Rights Reserved
\r
1652 * Permission to use, copy, modify, and distribute this software and its
\r
1653 * documentation for any purpose and without fee is hereby granted,
\r
1654 * provided that the above copyright notice appear in all copies and that
\r
1655 * both that copyright notice and this permission notice appear in
\r
1656 * supporting documentation, and that the name of Digital not be
\r
1657 * used in advertising or publicity pertaining to distribution of the
\r
1658 * software without specific, written prior permission.
\r
1660 * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
\r
1661 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
\r
1662 * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
\r
1663 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
\r
1664 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
\r
1665 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
\r
1667 * ------------------------------------------------------------------------
\r
1669 * The following terms apply to the enhanced version of XBoard
\r
1670 * distributed by the Free Software Foundation:
\r
1671 * ------------------------------------------------------------------------
\r
1673 * GNU XBoard is free software: you can redistribute it and/or modify
\r
1674 * it under the terms of the GNU General Public License as published by
\r
1675 * the Free Software Foundation, either version 3 of the License, or (at
\r
1676 * your option) any later version.
\r
1678 * GNU XBoard is distributed in the hope that it will be useful, but
\r
1679 * WITHOUT ANY WARRANTY; without even the implied warranty of
\r
1680 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
\r
1681 * General Public License for more details.
\r
1683 * You should have received a copy of the GNU General Public License
\r
1684 * along with this program. If not, see http://www.gnu.org/licenses/.
\r
1686 *------------------------------------------------------------------------
\r
1687 ** See the file ChangeLog for a revision history. */
\r
1689 /* This parser handles all forms of promotion.
\r
1690 * The parser resolves ambiguous moves by searching and check-testing.
\r
1691 * It also parses comments of the form [anything] or (anything).
\r
1693 * [HGM] Parser extensively modified for bigger boards, Shogi-like syntax,
\r
1694 * and unknow pieces. All pieces are now mandatory upper case, but can be
\r
1695 * any letter A-Z. Files must be lower case (as before), but can run upto 'l'.
\r
1696 * Ranks can be 0-9. The parser returns 0 for off-board files and ranks.
\r
1697 * For an unknown piece (as mover or promotion piece) it returns
\r
1698 * IllegalMove, like it does when the piece doesn't match.
\r
1699 * Promotions can now also be appended Shogi-style, a bare '=' or '+',
\r
1700 * and this is then returned as promotion character. The piece indicator
\r
1701 * can be prefixed by a '+' to indicate it is a promoted piece.
\r
1704 #include "config.h"
\r
1706 #define NO_CONSTRAINT -1
\r
1708 #define YYLMAX 4096
\r
1709 #define UNPUT_BUF_SIZE YYLMAX
\r
1711 #ifdef FLEX_SCANNER
\r
1712 /* yytext is probably a char*, but could be a char[]. yy_text is set
\r
1713 in YY_DECL below, because if yytext is a char*, its value is not
\r
1716 #else /*!FLEX_SCANNER*/
\r
1717 /* yytext is definitely a char[], so yy_text can be set here, statically. */
\r
1718 char *yy_text = (char *) yytext;
\r
1721 #ifdef FLEX_SCANNER
\r
1722 /* This is flex */
\r
1723 /* [AP] use prototypes in function declarations */
\r
1724 #define YY_USE_PROTOS
\r
1726 #ifdef YY_USE_PROTOS
\r
1727 #define YY_PROTO(proto) proto
\r
1729 #define YY_PROTO(proto) ()
\r
1731 /* end of [AP] fix */
\r
1734 #define YY_INPUT(buf, result, max_size) my_yy_input(buf, &result, max_size)
\r
1737 int _yylex YY_PROTO((void)); \
\r
1738 int yylex YY_PROTO((void)) \
\r
1740 int result = _yylex(); \
\r
1741 yy_text = (char *) yytext; \
\r
1744 int _yylex YY_PROTO((void))
\r
1752 /* The includes must be here, below the #undef input */
\r
1754 #include <ctype.h>
\r
1757 # include <stdlib.h>
\r
1758 # include <string.h>
\r
1759 #else /* not STDC_HEADERS */
\r
1760 # if HAVE_STRING_H
\r
1761 # include <string.h>
\r
1762 # else /* not HAVE_STRING_H */
\r
1763 # include <strings.h>
\r
1764 # endif /* not HAVE_STRING_H */
\r
1765 #endif /* not STDC_HEADERS */
\r
1768 # include <unistd.h>
\r
1771 #if defined(_amigados)
\r
1772 # include <errno.h>
\r
1774 # include <fcntl.h> /* isatty() prototype */
\r
1775 # endif /* HAVE_FCNTL_H */
\r
1776 #endif /* defined(_amigados) */
\r
1778 #include "common.h"
\r
1779 #include "backend.h"
\r
1780 #include "frontend.h"
\r
1781 #include "parser.h"
\r
1782 #include "moves.h"
\r
1784 extern int PosFlags P((int));
\r
1786 extern Board boards[MAX_MOVES];
\r
1788 int yyskipmoves = FALSE;
\r
1789 char currentMoveString[YYLMAX];
\r
1790 #ifndef FLEX_SCANNER
\r
1791 char unputBuffer[UNPUT_BUF_SIZE];
\r
1792 int unputCount = 0;
\r
1795 #ifdef FLEX_SCANNER
\r
1796 void my_yy_input P((char *buf, int *result, int max_size));
\r
1797 #else /*!FLEX_SCANNER*/
\r
1798 static int input P((void));
\r
1799 static void output P((int ch));
\r
1800 static void unput P((int ch));
\r
1801 int yylook P((void));
\r
1802 int yyback P((int *, int));
\r
1805 int yywrap P((void));
\r
1806 extern void CopyBoard P((Board to, Board from));
\r
1808 #line 1809 "parser.c"
1812 #ifndef YY_NO_UNISTD_H
1813 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1814 * down here because we want the user's section 1 to have been scanned first.
1815 * The user has a chance to override it with an option.
1820 #ifndef YY_EXTRA_TYPE
1821 #define YY_EXTRA_TYPE void *
1824 static int yy_init_globals (void );
1826 /* Macros after this point can all be overridden by user definitions in
1830 #ifndef YY_SKIP_YYWRAP
1832 extern "C" int yywrap (void );
1834 extern int yywrap (void );
1838 static void yyunput (int c,char *buf_ptr );
1841 static void yy_flex_strncpy (char *,yyconst char *,int );
1844 #ifdef YY_NEED_STRLEN
1845 static int yy_flex_strlen (yyconst char * );
1851 static int yyinput (void );
1853 static int input (void );
1858 /* Amount of stuff to slurp up with each read. */
1859 #ifndef YY_READ_BUF_SIZE
1860 #define YY_READ_BUF_SIZE 8192
1863 /* Copy whatever the last rule matched to the standard output. */
1865 /* This used to be an fputs(), but since the string might contain NUL's,
1866 * we now use fwrite().
1868 #define ECHO fwrite( yytext, yyleng, 1, yyout )
1871 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1872 * is returned in "result".
1875 #define YY_INPUT(buf,result,max_size) \
1876 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1880 for ( n = 0; n < max_size && \
1881 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1882 buf[n] = (char) c; \
1884 buf[n++] = (char) c; \
1885 if ( c == EOF && ferror( yyin ) ) \
1886 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1892 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1894 if( errno != EINTR) \
1896 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1907 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1908 * we don't want an extra ';' after the "return" because that will cause
1909 * some compilers to complain about unreachable statements.
1912 #define yyterminate() return YY_NULL
1915 /* Number of entries by which start-condition stack grows. */
1916 #ifndef YY_START_STACK_INCR
1917 #define YY_START_STACK_INCR 25
1920 /* Report a fatal error. */
1921 #ifndef YY_FATAL_ERROR
1922 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1925 /* end tables serialization structures and prototypes */
1927 /* Default declaration of generated scanner - a define so the user can
1928 * easily add parameters.
1931 #define YY_DECL_IS_OURS 1
1933 extern int yylex (void);
1935 #define YY_DECL int yylex (void)
1936 #endif /* !YY_DECL */
1938 /* Code executed at the beginning of each rule, after yytext and yyleng
1941 #ifndef YY_USER_ACTION
1942 #define YY_USER_ACTION
1945 /* Code executed at the end of each rule. */
1947 #define YY_BREAK break;
1950 #define YY_RULE_SETUP \
1952 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1953 (yytext[yyleng - 1] == '\n'); \
1956 /** The main scanner function which does all the work.
1960 register yy_state_type yy_current_state;
1961 register char *yy_cp, *yy_bp;
1962 register int yy_act;
1964 #line 179 "parser.l"
1967 #line 1968 "parser.c"
1977 /* Create the reject buffer large enough to save one state per allowed character. */
1978 if ( ! (yy_state_buf) )
1979 (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE );
1980 if ( ! (yy_state_buf) )
1981 YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
1984 (yy_start) = 1; /* first start state */
1992 if ( ! YY_CURRENT_BUFFER ) {
1993 yyensure_buffer_stack ();
1994 YY_CURRENT_BUFFER_LVALUE =
1995 yy_create_buffer(yyin,YY_BUF_SIZE );
1998 yy_load_buffer_state( );
2001 while ( 1 ) /* loops until end-of-file is reached */
2003 yy_cp = (yy_c_buf_p);
2005 /* Support of yytext. */
2006 *yy_cp = (yy_hold_char);
2008 /* yy_bp points to the position in yy_ch_buf of the start of
2013 yy_current_state = (yy_start);
2014 yy_current_state += YY_AT_BOL();
2016 (yy_state_ptr) = (yy_state_buf);
2017 *(yy_state_ptr)++ = yy_current_state;
2022 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
2023 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2025 yy_current_state = (int) yy_def[yy_current_state];
2026 if ( yy_current_state >= 688 )
2027 yy_c = yy_meta[(unsigned int) yy_c];
2029 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2030 *(yy_state_ptr)++ = yy_current_state;
2033 while ( yy_base[yy_current_state] != 3815 );
2036 yy_current_state = *--(yy_state_ptr);
2037 (yy_lp) = yy_accept[yy_current_state];
2038 find_rule: /* we branch to this label when backing up */
2039 for ( ; ; ) /* until we find what rule we matched */
2041 if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
2043 yy_act = yy_acclist[(yy_lp)];
2044 if ( yy_act & YY_TRAILING_HEAD_MASK ||
2045 (yy_looking_for_trail_begin) )
2047 if ( yy_act == (yy_looking_for_trail_begin) )
2049 (yy_looking_for_trail_begin) = 0;
2050 yy_act &= ~YY_TRAILING_HEAD_MASK;
2054 else if ( yy_act & YY_TRAILING_MASK )
2056 (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
2057 (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
2061 (yy_full_match) = yy_cp;
2062 (yy_full_state) = (yy_state_ptr);
2063 (yy_full_lp) = (yy_lp);
2070 yy_current_state = *--(yy_state_ptr);
2071 (yy_lp) = yy_accept[yy_current_state];
2074 YY_DO_BEFORE_ACTION;
2076 do_action: /* This label is used only to access EOF actions. */
2079 { /* beginning of action switch */
2082 #line 181 "parser.l"
2085 * Fully-qualified algebraic move, possibly with promotion
\r
2087 int skip1 = 0, skip2 = 0, skip3 = 0, promoted = 0;
\r
2088 ChessSquare piece;
\r
2092 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
\r
2094 if (yytext[0] == '+') skip1 = skip3 = promoted = 1; /* [HGM] Shogi promoted */
\r
2096 /* remove the / */
\r
2097 if (yytext[1+skip1] == '/') skip1++;
\r
2099 /* remove the [xX:-] */
\r
2100 if ((yytext[3+skip1] == 'x') || (yytext[3+skip1] == 'X') ||
\r
2101 (yytext[3+skip1] == '-') || (yytext[3+skip1] == ':')) skip2 = 1;
\r
2103 currentMoveString[0] = yytext[1+skip1];
\r
2104 currentMoveString[1] = yytext[2+skip1];
\r
2105 currentMoveString[2] = yytext[3+skip1+skip2];
\r
2106 currentMoveString[3] = yytext[4+skip1+skip2];
\r
2107 currentMoveString[4] = NULLCHAR;
\r
2109 if (appData.debugMode) {
\r
2110 fprintf(debugFP, "Parser Qa1b2: yyleng=%d\n",
\r
2114 if (yyleng-skip1-skip2 > 5) { char c;
\r
2115 if (yytext[yyleng-1] == ')') {
\r
2116 c = currentMoveString[4] = ToLower(yytext[yyleng-2]);
\r
2118 c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
\r
2120 currentMoveString[5] = NULLCHAR;
\r
2121 if(c != '=' && c != '+' && CharToPiece(c) == EmptySquare)
\r
2122 return IllegalMove; /* [HGM] promotion to invalid piece */
\r
2125 if (appData.debugMode) {
\r
2126 fprintf(debugFP, "parser: %s\n", currentMoveString);
\r
2128 /* [HGM] do not allow values beyond board size */
\r
2129 if(currentMoveString[1] - ONE >= BOARD_HEIGHT ||
\r
2130 currentMoveString[1] - ONE < 0 ||
\r
2131 currentMoveString[0] - AAA >= BOARD_RGHT ||
\r
2132 currentMoveString[3] - ONE >= BOARD_HEIGHT ||
\r
2133 currentMoveString[3] - ONE < 0 ||
\r
2134 currentMoveString[2] - AAA >= BOARD_RGHT ||
\r
2135 currentMoveString[0] - AAA < BOARD_LEFT ||
\r
2136 currentMoveString[2] - AAA < BOARD_LEFT )
\r
2139 piece = boards[yyboardindex]
\r
2140 [currentMoveString[1] - ONE][currentMoveString[0] - AAA];
\r
2141 if(promoted) piece = (ChessSquare) (DEMOTED piece);
\r
2142 c = PieceToChar(piece);
\r
2143 if(c == '~') c = PieceToChar((ChessSquare) (DEMOTED piece));
\r
2144 if (ToLower(yytext[skip3]) != ToLower(c))
\r
2145 return (int) IllegalMove;
\r
2147 result = LegalityTest(boards[yyboardindex],
\r
2148 PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
\r
2149 currentMoveString[1] - ONE,
\r
2150 currentMoveString[0] - AAA,
\r
2151 currentMoveString[3] - ONE,
\r
2152 currentMoveString[2] - AAA,
\r
2153 currentMoveString[4]);
\r
2155 if (currentMoveString[4] == NULLCHAR &&
\r
2156 (result == WhitePromotionKnight || result == BlackPromotionKnight ||
\r
2157 result == WhitePromotionQueen || result == BlackPromotionQueen)) {
\r
2158 currentMoveString[4] = PieceToChar(BlackQueen);
\r
2159 currentMoveString[5] = NULLCHAR;
\r
2162 return (int) result;
\r
2167 #line 263 "parser.l"
2170 * Simple algebraic move, possibly with promotion
\r
2171 * [HGM] Engine moves are received in this format, with lower-case promoChar!
\r
2176 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
\r
2178 /* remove the [xX:-] */
\r
2179 if ((yytext[2] == 'x') || (yytext[2] == 'X') ||
\r
2180 (yytext[2] == '-') || (yytext[2] == ':')) skip = 1;
\r
2182 currentMoveString[0] = yytext[0];
\r
2183 currentMoveString[1] = yytext[1];
\r
2184 currentMoveString[2] = yytext[2+skip];
\r
2185 currentMoveString[3] = yytext[3+skip];
\r
2186 currentMoveString[4] = NULLCHAR;
\r
2188 if (yyleng-skip > 4) { char c;
\r
2189 if (yytext[yyleng-1] == ')') {
\r
2190 c = currentMoveString[4] = ToLower(yytext[yyleng-2]);
\r
2192 c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
\r
2194 currentMoveString[5] = NULLCHAR;
\r
2195 if(c != '=' && c != '+' && CharToPiece(c) == EmptySquare)
\r
2196 return IllegalMove;
\r
2199 /* [HGM] do not allow values beyond board size */
\r
2200 if(currentMoveString[1] - ONE >= BOARD_HEIGHT ||
\r
2201 currentMoveString[1] - ONE < 0 ||
\r
2202 currentMoveString[0] - AAA >= BOARD_RGHT ||
\r
2203 currentMoveString[3] - ONE >= BOARD_HEIGHT ||
\r
2204 currentMoveString[3] - ONE < 0 ||
\r
2205 currentMoveString[2] - AAA >= BOARD_RGHT ||
\r
2206 currentMoveString[0] - AAA < BOARD_LEFT ||
\r
2207 currentMoveString[2] - AAA < BOARD_LEFT )
\r
2210 result = LegalityTest(boards[yyboardindex],
\r
2211 PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
\r
2212 currentMoveString[1] - ONE,
\r
2213 currentMoveString[0] - AAA,
\r
2214 currentMoveString[3] - ONE,
\r
2215 currentMoveString[2] - AAA,
\r
2216 currentMoveString[4]);
\r
2218 if (currentMoveString[4] == NULLCHAR &&
\r
2219 (result == WhitePromotionKnight || result == BlackPromotionKnight ||
\r
2220 result == WhitePromotionQueen || result == BlackPromotionQueen)) {
\r
2221 if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier || gameInfo.variant == VariantMakruk)
\r
2222 currentMoveString[4] = PieceToChar(BlackFerz);
\r
2223 else if(gameInfo.variant == VariantGreat)
\r
2224 currentMoveString[4] = PieceToChar(BlackMan);
\r
2226 currentMoveString[4] = PieceToChar(BlackQueen);
\r
2227 currentMoveString[5] = NULLCHAR;
\r
2230 return (int) result;
\r
2235 #line 328 "parser.l"
2238 * Pawn move, possibly with promotion
\r
2240 DisambiguateClosure cl;
\r
2241 int skip = 0; char c;
\r
2243 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
\r
2245 /* remove the =() */
\r
2246 if (yytext[2] == '=' && yytext[3] != NULLCHAR) skip++;
\r
2247 if (yytext[2+skip] == '(') skip++;
\r
2249 cl.pieceIn = WhiteOnMove(yyboardindex) ? WhitePawn : BlackPawn;
\r
2251 cl.ffIn = yytext[0] - AAA;
\r
2252 cl.rtIn = yytext[1] - ONE;
\r
2253 cl.ftIn = yytext[0] - AAA;
\r
2254 c = cl.promoCharIn = yytext[2+skip];
\r
2256 /* [HGM] do not allow values beyond board size */
\r
2257 if(cl.rtIn >= BOARD_HEIGHT ||
\r
2259 cl.ffIn >= BOARD_RGHT ||
\r
2260 cl.ftIn < BOARD_LEFT )
\r
2263 if(c != '=' && c != '+' && c != NULLCHAR && CharToPiece(c) == EmptySquare)
\r
2264 return IllegalMove;
\r
2267 Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);
\r
2269 currentMoveString[0] = cl.ff + AAA;
\r
2270 currentMoveString[1] = cl.rf + ONE;
\r
2271 currentMoveString[2] = cl.ft + AAA;
\r
2272 currentMoveString[3] = cl.rt + ONE;
\r
2273 currentMoveString[4] = cl.promoChar;
\r
2274 currentMoveString[5] = NULLCHAR;
\r
2276 return (int) cl.kind;
\r
2281 #line 372 "parser.l"
2284 * Pawn capture, possibly with promotion, possibly ambiguous
\r
2286 DisambiguateClosure cl;
\r
2287 int skip1 = 0, skip2 = 0; char c;
\r
2289 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
\r
2291 /* remove trailing ep or e.p. (nonstandard PGN) */
\r
2292 if (yytext[yyleng-1] == 'p') {
\r
2294 yytext[yyleng] = NULLCHAR;
\r
2295 } else if (yytext[yyleng-1] == '.') {
\r
2297 yytext[yyleng] = NULLCHAR;
\r
2300 /* remove the [xX:-] and =() */
\r
2301 if ((yytext[1] == 'x') || (yytext[1] == 'X')
\r
2302 || (yytext[1] == ':') || (yytext[1] == '-')) skip1 = 1;
\r
2303 if (yytext[2+skip1] == '=' && yytext[3+skip1] != NULLCHAR) skip2++;
\r
2304 if (yytext[2+skip1+skip2] == '(') skip2++;
\r
2306 cl.pieceIn = WhiteOnMove(yyboardindex) ? WhitePawn : BlackPawn;
\r
2308 cl.ffIn = yytext[0] - AAA;
\r
2310 cl.ftIn = yytext[1+skip1] - AAA;
\r
2311 c = cl.promoCharIn = yytext[2+skip1+skip2];
\r
2313 /* [HGM] do not allow values beyond board size */
\r
2314 if(cl.ffIn >= BOARD_RGHT ||
\r
2315 cl.ffIn < BOARD_LEFT ||
\r
2316 cl.ftIn >= BOARD_RGHT ||
\r
2317 cl.ftIn < BOARD_LEFT )
\r
2320 if(c != '=' && c != '+' && c != NULLCHAR && CharToPiece(c) == EmptySquare)
\r
2321 return IllegalMove;
\r
2323 Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);
\r
2325 currentMoveString[0] = cl.ff + AAA;
\r
2326 currentMoveString[1] = cl.rf + ONE;
\r
2327 currentMoveString[2] = cl.ft + AAA;
\r
2328 currentMoveString[3] = cl.rt + ONE;
\r
2329 currentMoveString[4] = cl.promoChar;
\r
2330 currentMoveString[5] = NULLCHAR;
\r
2332 return (int) cl.kind;
\r
2337 #line 425 "parser.l"
2340 * unambiguously abbreviated Pawn capture, possibly with promotion
\r
2343 ChessMove result; char c;
\r
2345 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
\r
2347 /* remove trailing ep or e.p. (nonstandard PGN) */
\r
2348 if (yytext[yyleng-1] == 'p') {
\r
2350 yytext[yyleng] = NULLCHAR;
\r
2351 } else if (yytext[yyleng-1] == '.') {
\r
2353 yytext[yyleng] = NULLCHAR;
\r
2356 /* remove the [xX:-] */
\r
2357 if ((yytext[1] == 'x') || (yytext[1] == 'X')
\r
2358 || (yytext[1] == ':') || (yytext[1] == '-')) skip = 1;
\r
2360 currentMoveString[0] = yytext[0];
\r
2361 currentMoveString[2] = yytext[1+skip];
\r
2362 currentMoveString[3] = yytext[2+skip];
\r
2364 /* [HGM] do not allow values beyond board size */
\r
2365 if(currentMoveString[0] - AAA >= BOARD_RGHT ||
\r
2366 currentMoveString[3] - ONE >= BOARD_HEIGHT ||
\r
2367 currentMoveString[3] - ONE < 0 ||
\r
2368 currentMoveString[2] - AAA >= BOARD_RGHT ||
\r
2369 currentMoveString[0] - AAA < BOARD_LEFT ||
\r
2370 currentMoveString[2] - AAA < BOARD_LEFT )
\r
2373 if (gameInfo.variant == VariantXiangqi && /* [HGM] In Xiangqi rank stays same */
\r
2374 currentMoveString[0] != currentMoveString[2] ) {
\r
2375 currentMoveString[1] = yytext[2+skip];
\r
2377 if (WhiteOnMove(yyboardindex)) {
\r
2378 if (yytext[2+skip] == ONE) return (int) ImpossibleMove;
\r
2379 currentMoveString[1] = yytext[2+skip] - 1;
\r
2380 if(boards[yyboardindex][currentMoveString[1]-ONE][currentMoveString[0]-AAA] != WhitePawn)
\r
2381 return ImpossibleMove;
\r
2383 currentMoveString[1] = currentMoveString[3] + 1;
\r
2384 if (currentMoveString[3] == ONE+BOARD_HEIGHT-1) return (int) ImpossibleMove;
\r
2385 if(boards[yyboardindex][currentMoveString[1]-ONE][currentMoveString[0]-AAA] != BlackPawn)
\r
2386 return ImpossibleMove;
\r
2388 if (yyleng-skip > 3) {
\r
2389 if (yytext[yyleng-1] == ')')
\r
2390 c = currentMoveString[4] = ToLower(yytext[yyleng-2]);
\r
2392 c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
\r
2393 currentMoveString[5] = NULLCHAR;
\r
2394 if(c != '=' && c != '+' && CharToPiece(c) == EmptySquare)
\r
2395 return IllegalMove;
\r
2397 currentMoveString[4] = NULLCHAR;
\r
2400 result = LegalityTest(boards[yyboardindex],
\r
2401 PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
\r
2402 currentMoveString[1] - ONE,
\r
2403 currentMoveString[0] - AAA,
\r
2404 currentMoveString[3] - ONE,
\r
2405 currentMoveString[2] - AAA,
\r
2406 currentMoveString[4]);
\r
2408 if (currentMoveString[4] == NULLCHAR &&
\r
2409 (result == WhitePromotionQueen || result == BlackPromotionQueen ||
\r
2410 result == WhitePromotionKnight || result == BlackPromotionKnight)) {
\r
2411 currentMoveString[4] = PieceToChar(BlackQueen);
\r
2412 // [HGM] shatranj: take care of variants without Queen
\r
2413 if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier || gameInfo.variant == VariantMakruk)
\r
2414 currentMoveString[4] = PieceToChar(BlackFerz);
\r
2415 if(gameInfo.variant == VariantGreat)
\r
2416 currentMoveString[4] = PieceToChar(BlackMan);
\r
2417 currentMoveString[5] = NULLCHAR;
\r
2420 if (result != IllegalMove) return (int) result;
\r
2422 /* Special case: improperly written en passant capture */
\r
2423 if (WhiteOnMove(yyboardindex)) {
\r
2424 if (currentMoveString[3] == '5') {
\r
2425 currentMoveString[1] = '5';
\r
2426 currentMoveString[3] = '6';
\r
2428 return (int) IllegalMove;
\r
2431 if (currentMoveString[3] == '4') {
\r
2432 currentMoveString[1] = '4';
\r
2433 currentMoveString[3] = '3';
\r
2435 return (int) IllegalMove;
\r
2439 result = LegalityTest(boards[yyboardindex],
\r
2440 PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
\r
2441 currentMoveString[1] - ONE,
\r
2442 currentMoveString[0] - AAA,
\r
2443 currentMoveString[3] - ONE,
\r
2444 currentMoveString[2] - AAA,
\r
2445 currentMoveString[4]);
\r
2447 if (result == WhiteCapturesEnPassant || result == BlackCapturesEnPassant)
\r
2448 return (int) result;
\r
2450 return (int) IllegalMove;
\r
2455 #line 540 "parser.l"
2458 * piece move, possibly ambiguous
\r
2460 DisambiguateClosure cl;
\r
2461 int skip = 0, skip2 = 0, promoted = 0;
\r
2463 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
\r
2465 if(yytext[0] == '+') promoted = skip = skip2 = 1;
\r
2467 /* remove the [xX:-] */
\r
2468 if ((yytext[1+skip] == 'x') || (yytext[1+skip] == 'X')
\r
2469 || (yytext[1+skip] == ':') || (yytext[1+skip] == '-')) skip++;
\r
2471 if (WhiteOnMove(yyboardindex)) {
\r
2472 cl.pieceIn = CharToPiece(ToUpper(yytext[skip2]));
\r
2474 cl.pieceIn = CharToPiece(ToLower(yytext[skip2]));
\r
2476 if(promoted) cl.pieceIn = (ChessSquare) (PROMOTED cl.pieceIn);
\r
2480 cl.rtIn = yytext[2+skip] - ONE;
\r
2481 cl.ftIn = yytext[1+skip] - AAA;
\r
2482 cl.promoCharIn = NULLCHAR;
\r
2484 if(yyleng-skip > 3) /* [HGM] can have Shogi-style promotion */
\r
2485 cl.promoCharIn = yytext[yyleng-1];
\r
2487 if (appData.debugMode) {
\r
2488 fprintf(debugFP, "Parser Qa1: yyleng=%d, %d(%d,%d)-(%d,%d) = %d (%c)\n",
\r
2490 cl.pieceIn,cl.ffIn,cl.rfIn,cl.ftIn,cl.rtIn,cl.promoCharIn,cl.promoCharIn?cl.promoCharIn:' ');
\r
2493 /* [HGM] but do not allow values beyond board size */
\r
2494 if(cl.rtIn >= BOARD_HEIGHT ||
\r
2496 cl.ftIn >= BOARD_RGHT ||
\r
2497 cl.ftIn < BOARD_LEFT )
\r
2500 Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);
\r
2502 currentMoveString[0] = cl.ff + AAA;
\r
2503 currentMoveString[1] = cl.rf + ONE;
\r
2504 currentMoveString[2] = cl.ft + AAA;
\r
2505 currentMoveString[3] = cl.rt + ONE;
\r
2506 currentMoveString[4] = cl.promoChar;
\r
2507 currentMoveString[5] = NULLCHAR;
\r
2509 return (int) cl.kind;
\r
2514 #line 596 "parser.l"
2517 * piece move with rank or file disambiguator
\r
2519 DisambiguateClosure cl;
\r
2520 int skip = 0, skip2 = 0; int promoted=0;
\r
2522 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
\r
2524 if(yytext[0]=='+') promoted = skip = skip2 = 1;
\r
2526 /* remove the [xX:-] */
\r
2527 if ((yytext[2+skip] == 'x') || (yytext[2+skip] == 'X')
\r
2528 || (yytext[2+skip] == ':') || (yytext[2+skip] == '-')) skip++;
\r
2530 if (WhiteOnMove(yyboardindex)) {
\r
2531 cl.pieceIn = CharToPiece(ToUpper(yytext[skip2]));
\r
2533 cl.pieceIn = CharToPiece(ToLower(yytext[skip2]));
\r
2535 if(promoted) cl.pieceIn = (ChessSquare) (PROMOTED cl.pieceIn);
\r
2537 if (isalpha(yytext[1+skip2])) {
\r
2539 cl.ffIn = yytext[1+skip2] - AAA;
\r
2541 if(cl.ffIn >= BOARD_RGHT ||
\r
2542 cl.ffIn < BOARD_LEFT ) return 0;
\r
2544 cl.rfIn = yytext[1+skip2] - ONE;
\r
2546 if(cl.rfIn >= BOARD_HEIGHT ||
\r
2547 cl.rfIn < 0) return 0;
\r
2549 cl.rtIn = yytext[3+skip] - ONE;
\r
2550 cl.ftIn = yytext[2+skip] - AAA;
\r
2551 cl.promoCharIn = NULLCHAR;
\r
2553 if(yyleng-skip > 4) /* [HGM] can have Shogi-style promotion */
\r
2554 cl.promoCharIn = yytext[yyleng-1];
\r
2556 /* [HGM] do not allow values beyond board size */
\r
2557 if(cl.rtIn >= BOARD_HEIGHT ||
\r
2559 cl.ftIn >= BOARD_RGHT ||
\r
2560 cl.ftIn < BOARD_LEFT )
\r
2563 Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);
\r
2565 currentMoveString[0] = cl.ff + AAA;
\r
2566 currentMoveString[1] = cl.rf + ONE;
\r
2567 currentMoveString[2] = cl.ft + AAA;
\r
2568 currentMoveString[3] = cl.rt + ONE;
\r
2569 currentMoveString[4] = cl.promoChar;
\r
2570 currentMoveString[5] = NULLCHAR;
\r
2572 return (int) cl.kind;
\r
2577 #line 656 "parser.l"
2579 int rf, ff, rt, ft;
\r
2581 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
\r
2583 /* [HGM] all squares referenced to board edges in stead of absolute */
\r
2584 if (WhiteOnMove(yyboardindex)) {
\r
2585 if (boards[yyboardindex][0][(BOARD_WIDTH-1)>>1] == WhiteKing) {
\r
2586 /* ICS wild castling */
\r
2588 ff = (BOARD_WIDTH-1)>>1;
\r
2590 ft = BOARD_RGHT-3;
\r
2593 ff = BOARD_WIDTH>>1;
\r
2595 ft = BOARD_LEFT+2;
\r
2598 if (boards[yyboardindex][BOARD_HEIGHT-1][(BOARD_WIDTH-1)>>1] == BlackKing) {
\r
2599 /* ICS wild castling */
\r
2600 rf = BOARD_HEIGHT-1;
\r
2601 ff = (BOARD_WIDTH-1)>>1;
\r
2602 rt = BOARD_HEIGHT-1;
\r
2603 ft = BOARD_RGHT-3;
\r
2605 rf = BOARD_HEIGHT-1;
\r
2606 ff = BOARD_WIDTH>>1;
\r
2607 rt = BOARD_HEIGHT-1;
\r
2608 ft = BOARD_LEFT+2;
\r
2611 if(PosFlags(0) & F_FRC_TYPE_CASTLING) {
2612 if (WhiteOnMove(yyboardindex)) {
\r
2613 ff = initialRights[2];
\r
2614 ft = initialRights[1];
\r
2616 ff = initialRights[5];
\r
2617 ft = initialRights[4];
\r
2619 if (appData.debugMode)
\r
2621 fprintf(debugFP, "Parser FRC long %d %d\n", ff, ft);
\r
2623 if(ff < 0 || ft < 0) return 0;
\r
2625 sprintf(currentMoveString, "%c%c%c%c",ff+AAA,rf+ONE,ft+AAA,rt+ONE);
\r
2626 if (appData.debugMode) {
\r
2627 fprintf(debugFP, "long castling %d %d\n", ff, ft);
\r
2629 return (int) LegalityTest(boards[yyboardindex],
\r
2630 PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: e.p.!
\r
2631 rf, ff, rt, ft, NULLCHAR);
\r
2636 #line 712 "parser.l"
2638 int rf, ff, rt, ft;
\r
2640 if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
\r
2642 if (WhiteOnMove(yyboardindex)) {
\r
2643 if (boards[yyboardindex][0][(BOARD_WIDTH-1)>>1] == WhiteKing) {
\r
2644 /* ICS wild castling */
\r
2646 ff = (BOARD_WIDTH-1)>>1;
\r
2648 ft = BOARD_LEFT+1;
\r
2651 ff = BOARD_WIDTH>>1;
\r
2653 ft = BOARD_RGHT-2;
\r
2656 if (boards[yyboardindex][BOARD_HEIGHT-1][(BOARD_WIDTH-1)>>1] == BlackKing) {
\r
2657 /* ICS wild castling */
\r
2658 rf = BOARD_HEIGHT-1;
\r
2659 ff = (BOARD_WIDTH-1)>>1;
\r
2660 rt = BOARD_HEIGHT-1;
\r
2661 ft = BOARD_LEFT+1;
\r
2663 rf = BOARD_HEIGHT-1;
\r
2664 ff = BOARD_WIDTH>>1;
\r
2665 rt = BOARD_HEIGHT-1;
\r
2666 ft = BOARD_RGHT-2;
\r
2669 if(PosFlags(0) & F_FRC_TYPE_CASTLING) {
2670 if (WhiteOnMove(yyboardindex)) {
\r
2671 ff = initialRights[2];
\r
2672 ft = initialRights[0];
\r
2674 ff = initialRights[5];
\r
2675 ft = initialRights[3];
\r
2677 if (appData.debugMode) {
\r
2678 fprintf(debugFP, "Parser FRC short %d %d\n", ff, ft);
\r
2680 if(ff < 0 || ft < 0) return 0;
\r
2682 sprintf(currentMoveString, "%c%c%c%c",ff+AAA,rf+ONE,ft+AAA,rt+ONE);
\r
2683 if (appData.debugMode) {
\r
2684 fprintf(debugFP, "short castling %d %d\n", ff, ft);
\r
2687 return (int) LegalityTest(boards[yyboardindex],
\r
2688 PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: e.p.!
\r
2689 rf, ff, rt, ft, NULLCHAR);
\r
2694 #line 767 "parser.l"
2696 /* Bughouse piece drop. No legality checking for now. */
\r
2697 currentMoveString[1] = '@';
\r
2698 currentMoveString[2] = yytext[2];
\r
2699 currentMoveString[3] = yytext[3];
\r
2700 currentMoveString[4] = NULLCHAR;
\r
2702 if (appData.debugMode) {
\r
2703 fprintf(debugFP, "Drop: %s\n", currentMoveString);
\r
2705 /* [HGM] do not allow values beyond board size */
\r
2706 if(currentMoveString[3] - ONE >= BOARD_HEIGHT ||
\r
2707 currentMoveString[2] - AAA >= BOARD_WIDTH )
\r
2710 if (WhiteOnMove(yyboardindex)) {
\r
2711 currentMoveString[0] = ToUpper(yytext[0]);
\r
2712 return (int) WhiteDrop;
\r
2714 currentMoveString[0] = ToLower(yytext[0]);
\r
2715 return (int) BlackDrop;
\r
2721 #line 791 "parser.l"
2723 if (WhiteOnMove(yyboardindex))
\r
2724 return (int) BlackWins;
\r
2726 return (int) WhiteWins;
\r
2731 #line 798 "parser.l"
2733 return (int) (ToUpper(yytext[0]) == 'W' ? BlackWins : WhiteWins);
\r
2738 #line 802 "parser.l"
2740 return (int) GameUnfinished;
\r
2745 #line 806 "parser.l"
2747 return (int) GameIsDrawn;
\r
2752 #line 810 "parser.l"
2754 return (int) GameIsDrawn;
\r
2759 #line 814 "parser.l"
2761 if (WhiteOnMove(yyboardindex))
\r
2762 return (int) BlackWins;
\r
2764 return (int) WhiteWins;
\r
2769 #line 821 "parser.l"
2771 if (WhiteOnMove(yyboardindex))
\r
2772 return (int) BlackWins;
\r
2774 return (int) WhiteWins;
\r
2779 #line 828 "parser.l"
2781 return (int) GameIsDrawn;
\r
2786 #line 832 "parser.l"
2788 return (int) GameIsDrawn;
\r
2793 #line 836 "parser.l"
2795 return (int) (ToUpper(yytext[0]) == 'W' ? WhiteWins : BlackWins);
\r
2800 #line 840 "parser.l"
2802 return (int) (ToUpper(yytext[0]) == 'W' ? BlackWins : WhiteWins);
\r
2807 #line 844 "parser.l"
2809 return (int) WhiteWins;
\r
2814 #line 848 "parser.l"
2816 return (int) BlackWins;
\r
2821 #line 852 "parser.l"
2823 return (int) GameIsDrawn;
\r
2828 #line 856 "parser.l"
2830 return (int) GameUnfinished;
\r
2834 /* rule 26 can match eol */
2836 #line 860 "parser.l"
2838 /* move numbers */
\r
2839 if ((yyleng == 1) && (yytext[0] == '1'))
\r
2840 return (int) MoveNumberOne;
\r
2845 #line 866 "parser.l"
2847 /* elapsed time indication, e.g. (0:12) or {10:21.071} */
\r
2848 return (int) ElapsedTime;
\r
2852 /* rule 28 can match eol */
2854 #line 871 "parser.l"
2856 /* position diagram enclosed in [-- --] */
\r
2857 return (int) PositionDiagram;
\r
2861 /* rule 29 can match eol */
2862 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
2863 (yy_c_buf_p) = yy_cp -= 1;
2864 YY_DO_BEFORE_ACTION; /* set up yytext again */
2866 #line 876 "parser.l"
2868 /* position diagram enclosed in {-- --} */
\r
2869 return (int) PositionDiagram;
\r
2873 /* rule 30 can match eol */
2875 #line 881 "parser.l"
2877 return (int) PGNTag;
\r
2882 #line 885 "parser.l"
2884 return (int) GNUChessGame;
\r
2888 /* rule 32 can match eol */
2889 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
2890 (yy_c_buf_p) = yy_cp -= 1;
2891 YY_DO_BEFORE_ACTION; /* set up yytext again */
2893 #line 889 "parser.l"
2895 return (int) XBoardGame;
\r
2900 #line 893 "parser.l"
2901 { /* numeric annotation glyph */
\r
2906 /* rule 34 can match eol */
2908 #line 897 "parser.l"
2909 { /* anything in {} */
\r
2910 return (int) Comment;
\r
2914 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
2915 (yy_c_buf_p) = yy_cp -= 1;
2916 YY_DO_BEFORE_ACTION; /* set up yytext again */
2918 #line 901 "parser.l"
2919 { /* ; to end of line */
\r
2920 return (int) Comment;
\r
2924 /* rule 36 can match eol */
2926 #line 905 "parser.l"
2927 { /* anything in [] */
\r
2928 return (int) Comment;
\r
2932 /* rule 37 can match eol */
2934 #line 909 "parser.l"
2935 { /* very nested () */
\r
2936 return (int) Comment;
\r
2940 /* rule 38 can match eol */
2942 #line 913 "parser.l"
2943 { /* >=2 chars in () */
\r
2944 return (int) Comment;
\r
2948 /* rule 39 can match eol */
2950 #line 917 "parser.l"
2952 /* Skip mail headers */
\r
2957 #line 921 "parser.l"
2959 /* Skip random words */
\r
2963 /* rule 41 can match eol */
2965 #line 925 "parser.l"
2967 /* Skip everything else */
\r
2972 #line 929 "parser.l"
2975 #line 2976 "parser.c"
2976 case YY_STATE_EOF(INITIAL):
2979 case YY_END_OF_BUFFER:
2981 /* Amount of text matched not including the EOB char. */
2982 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2984 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2985 *yy_cp = (yy_hold_char);
2986 YY_RESTORE_YY_MORE_OFFSET
2988 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2990 /* We're scanning a new file or input source. It's
2991 * possible that this happened because the user
2992 * just pointed yyin at a new source and called
2993 * yylex(). If so, then we have to assure
2994 * consistency between YY_CURRENT_BUFFER and our
2995 * globals. Here is the right place to do so, because
2996 * this is the first action (other than possibly a
2997 * back-up) that will match for the new input source.
2999 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3000 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
3001 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
3004 /* Note that here we test for yy_c_buf_p "<=" to the position
3005 * of the first EOB in the buffer, since yy_c_buf_p will
3006 * already have been incremented past the NUL character
3007 * (since all states make transitions on EOB to the
3008 * end-of-buffer state). Contrast this with the test
3011 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3012 { /* This was really a NUL. */
3013 yy_state_type yy_next_state;
3015 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
3017 yy_current_state = yy_get_previous_state( );
3019 /* Okay, we're now positioned to make the NUL
3020 * transition. We couldn't have
3021 * yy_get_previous_state() go ahead and do it
3022 * for us because it doesn't know how to deal
3023 * with the possibility of jamming (and we don't
3024 * want to build jamming into it because then it
3025 * will run more slowly).
3028 yy_next_state = yy_try_NUL_trans( yy_current_state );
3030 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3032 if ( yy_next_state )
3034 /* Consume the NUL. */
3035 yy_cp = ++(yy_c_buf_p);
3036 yy_current_state = yy_next_state;
3042 yy_cp = (yy_c_buf_p);
3043 goto yy_find_action;
3047 else switch ( yy_get_next_buffer( ) )
3049 case EOB_ACT_END_OF_FILE:
3051 (yy_did_buffer_switch_on_eof) = 0;
3055 /* Note: because we've taken care in
3056 * yy_get_next_buffer() to have set up
3057 * yytext, we can now set up
3058 * yy_c_buf_p so that if some total
3059 * hoser (like flex itself) wants to
3060 * call the scanner after we return the
3061 * YY_NULL, it'll still work - another
3062 * YY_NULL will get returned.
3064 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
3066 yy_act = YY_STATE_EOF(YY_START);
3072 if ( ! (yy_did_buffer_switch_on_eof) )
3078 case EOB_ACT_CONTINUE_SCAN:
3080 (yytext_ptr) + yy_amount_of_matched_text;
3082 yy_current_state = yy_get_previous_state( );
3084 yy_cp = (yy_c_buf_p);
3085 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3088 case EOB_ACT_LAST_MATCH:
3090 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
3092 yy_current_state = yy_get_previous_state( );
3094 yy_cp = (yy_c_buf_p);
3095 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3096 goto yy_find_action;
3103 "fatal flex scanner internal error--no action found" );
3104 } /* end of action switch */
3105 } /* end of scanning one token */
3106 } /* end of yylex */
3108 /* yy_get_next_buffer - try to read in a new buffer
3110 * Returns a code representing an action:
3111 * EOB_ACT_LAST_MATCH -
3112 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
3113 * EOB_ACT_END_OF_FILE - end of file
3115 static int yy_get_next_buffer (void)
3117 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
3118 register char *source = (yytext_ptr);
3119 register int number_to_move, i;
3122 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
3124 "fatal flex scanner internal error--end of buffer missed" );
3126 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
3127 { /* Don't try to fill the buffer, so this is an EOF. */
3128 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
3130 /* We matched a single character, the EOB, so
3131 * treat this as a final EOF.
3133 return EOB_ACT_END_OF_FILE;
3138 /* We matched some text prior to the EOB, first
3141 return EOB_ACT_LAST_MATCH;
3145 /* Try to read more data. */
3147 /* First move last chars to start of buffer. */
3148 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
3150 for ( i = 0; i < number_to_move; ++i )
3151 *(dest++) = *(source++);
3153 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
3154 /* don't do the read, it's not guaranteed to return an EOF,
3157 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
3162 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
3164 while ( num_to_read <= 0 )
3165 { /* Not enough room in the buffer - grow it. */
3168 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
3172 if ( num_to_read > YY_READ_BUF_SIZE )
3173 num_to_read = YY_READ_BUF_SIZE;
3175 /* Read in more data. */
3176 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
3177 (yy_n_chars), (size_t) num_to_read );
3179 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3182 if ( (yy_n_chars) == 0 )
3184 if ( number_to_move == YY_MORE_ADJ )
3186 ret_val = EOB_ACT_END_OF_FILE;
3192 ret_val = EOB_ACT_LAST_MATCH;
3193 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
3194 YY_BUFFER_EOF_PENDING;
3199 ret_val = EOB_ACT_CONTINUE_SCAN;
3201 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
3202 /* Extend the array by 50%, plus the number we really need. */
3203 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
3204 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
3205 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3206 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
3209 (yy_n_chars) += number_to_move;
3210 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
3211 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
3213 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
3218 /* yy_get_previous_state - get the state just before the EOB char was reached */
3220 static yy_state_type yy_get_previous_state (void)
3222 register yy_state_type yy_current_state;
3223 register char *yy_cp;
3225 yy_current_state = (yy_start);
3226 yy_current_state += YY_AT_BOL();
3228 (yy_state_ptr) = (yy_state_buf);
3229 *(yy_state_ptr)++ = yy_current_state;
3231 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
3233 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
3234 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3236 yy_current_state = (int) yy_def[yy_current_state];
3237 if ( yy_current_state >= 688 )
3238 yy_c = yy_meta[(unsigned int) yy_c];
3240 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3241 *(yy_state_ptr)++ = yy_current_state;
3244 return yy_current_state;
3247 /* yy_try_NUL_trans - try to make a transition on the NUL character
3250 * next_state = yy_try_NUL_trans( current_state );
3252 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
3254 register int yy_is_jam;
3256 register YY_CHAR yy_c = 1;
3257 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3259 yy_current_state = (int) yy_def[yy_current_state];
3260 if ( yy_current_state >= 688 )
3261 yy_c = yy_meta[(unsigned int) yy_c];
3263 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3264 yy_is_jam = (yy_current_state == 687);
3266 *(yy_state_ptr)++ = yy_current_state;
3268 return yy_is_jam ? 0 : yy_current_state;
3271 static void yyunput (int c, register char * yy_bp )
3273 register char *yy_cp;
3275 yy_cp = (yy_c_buf_p);
3277 /* undo effects of setting up yytext */
3278 *yy_cp = (yy_hold_char);
3280 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3281 { /* need to shift things up to make room */
3282 /* +2 for EOB chars. */
3283 register int number_to_move = (yy_n_chars) + 2;
3284 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
3285 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
3286 register char *source =
3287 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
3289 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3290 *--dest = *--source;
3292 yy_cp += (int) (dest - source);
3293 yy_bp += (int) (dest - source);
3294 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
3295 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
3297 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3298 YY_FATAL_ERROR( "flex scanner push-back overflow" );
3301 *--yy_cp = (char) c;
3303 (yytext_ptr) = yy_bp;
3304 (yy_hold_char) = *yy_cp;
3305 (yy_c_buf_p) = yy_cp;
3310 static int yyinput (void)
3312 static int input (void)
3318 *(yy_c_buf_p) = (yy_hold_char);
3320 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
3322 /* yy_c_buf_p now points to the character we want to return.
3323 * If this occurs *before* the EOB characters, then it's a
3324 * valid NUL; if not, then we've hit the end of the buffer.
3326 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3327 /* This was really a NUL. */
3328 *(yy_c_buf_p) = '\0';
3331 { /* need more input */
3332 int offset = (yy_c_buf_p) - (yytext_ptr);
3335 switch ( yy_get_next_buffer( ) )
3337 case EOB_ACT_LAST_MATCH:
3338 /* This happens because yy_g_n_b()
3339 * sees that we've accumulated a
3340 * token and flags that we need to
3341 * try matching the token before
3342 * proceeding. But for input(),
3343 * there's no matching to consider.
3344 * So convert the EOB_ACT_LAST_MATCH
3345 * to EOB_ACT_END_OF_FILE.
3348 /* Reset buffer status. */
3353 case EOB_ACT_END_OF_FILE:
3358 if ( ! (yy_did_buffer_switch_on_eof) )
3367 case EOB_ACT_CONTINUE_SCAN:
3368 (yy_c_buf_p) = (yytext_ptr) + offset;
3374 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
3375 *(yy_c_buf_p) = '\0'; /* preserve yytext */
3376 (yy_hold_char) = *++(yy_c_buf_p);
3378 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
3382 #endif /* ifndef YY_NO_INPUT */
3384 /** Immediately switch to a different input stream.
3385 * @param input_file A readable stream.
3387 * @note This function does not reset the start condition to @c INITIAL .
3389 void yyrestart (FILE * input_file )
3392 if ( ! YY_CURRENT_BUFFER ){
3393 yyensure_buffer_stack ();
3394 YY_CURRENT_BUFFER_LVALUE =
3395 yy_create_buffer(yyin,YY_BUF_SIZE );
3398 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
3399 yy_load_buffer_state( );
3402 /** Switch to a different input buffer.
3403 * @param new_buffer The new input buffer.
3406 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
3409 /* TODO. We should be able to replace this entire function body
3411 * yypop_buffer_state();
3412 * yypush_buffer_state(new_buffer);
3414 yyensure_buffer_stack ();
3415 if ( YY_CURRENT_BUFFER == new_buffer )
3418 if ( YY_CURRENT_BUFFER )
3420 /* Flush out information for old buffer. */
3421 *(yy_c_buf_p) = (yy_hold_char);
3422 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3423 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3426 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3427 yy_load_buffer_state( );
3429 /* We don't actually know whether we did this switch during
3430 * EOF (yywrap()) processing, but the only time this flag
3431 * is looked at is after yywrap() is called, so it's safe
3432 * to go ahead and always set it.
3434 (yy_did_buffer_switch_on_eof) = 1;
3437 static void yy_load_buffer_state (void)
3439 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3440 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3441 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3442 (yy_hold_char) = *(yy_c_buf_p);
3445 /** Allocate and initialize an input buffer state.
3446 * @param file A readable stream.
3447 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3449 * @return the allocated buffer state.
3451 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
3455 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
3457 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3459 b->yy_buf_size = size;
3461 /* yy_ch_buf has to be 2 characters longer than the size given because
3462 * we need to put in 2 end-of-buffer characters.
3464 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
3465 if ( ! b->yy_ch_buf )
3466 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3468 b->yy_is_our_buffer = 1;
3470 yy_init_buffer(b,file );
3475 /** Destroy the buffer.
3476 * @param b a buffer created with yy_create_buffer()
3479 void yy_delete_buffer (YY_BUFFER_STATE b )
3485 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3486 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3488 if ( b->yy_is_our_buffer )
3489 yyfree((void *) b->yy_ch_buf );
3491 yyfree((void *) b );
3495 extern int isatty (int );
3496 #endif /* __cplusplus */
3498 /* Initializes or reinitializes a buffer.
3499 * This function is sometimes called more than once on the same buffer,
3500 * such as during a yyrestart() or at EOF.
3502 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
3507 yy_flush_buffer(b );
3509 b->yy_input_file = file;
3510 b->yy_fill_buffer = 1;
3512 /* If b is the current buffer, then yy_init_buffer was _probably_
3513 * called from yyrestart() or through yy_get_next_buffer.
3514 * In that case, we don't want to reset the lineno or column.
3516 if (b != YY_CURRENT_BUFFER){
3517 b->yy_bs_lineno = 1;
3518 b->yy_bs_column = 0;
3521 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3526 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3527 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3530 void yy_flush_buffer (YY_BUFFER_STATE b )
3537 /* We always need two end-of-buffer characters. The first causes
3538 * a transition to the end-of-buffer state. The second causes
3539 * a jam in that state.
3541 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3542 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3544 b->yy_buf_pos = &b->yy_ch_buf[0];
3547 b->yy_buffer_status = YY_BUFFER_NEW;
3549 if ( b == YY_CURRENT_BUFFER )
3550 yy_load_buffer_state( );
3553 /** Pushes the new state onto the stack. The new state becomes
3554 * the current state. This function will allocate the stack
3556 * @param new_buffer The new state.
3559 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
3561 if (new_buffer == NULL)
3564 yyensure_buffer_stack();
3566 /* This block is copied from yy_switch_to_buffer. */
3567 if ( YY_CURRENT_BUFFER )
3569 /* Flush out information for old buffer. */
3570 *(yy_c_buf_p) = (yy_hold_char);
3571 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3572 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3575 /* Only push if top exists. Otherwise, replace top. */
3576 if (YY_CURRENT_BUFFER)
3577 (yy_buffer_stack_top)++;
3578 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3580 /* copied from yy_switch_to_buffer. */
3581 yy_load_buffer_state( );
3582 (yy_did_buffer_switch_on_eof) = 1;
3585 /** Removes and deletes the top of the stack, if present.
3586 * The next element becomes the new top.
3589 void yypop_buffer_state (void)
3591 if (!YY_CURRENT_BUFFER)
3594 yy_delete_buffer(YY_CURRENT_BUFFER );
3595 YY_CURRENT_BUFFER_LVALUE = NULL;
3596 if ((yy_buffer_stack_top) > 0)
3597 --(yy_buffer_stack_top);
3599 if (YY_CURRENT_BUFFER) {
3600 yy_load_buffer_state( );
3601 (yy_did_buffer_switch_on_eof) = 1;
3605 /* Allocates the stack if it does not exist.
3606 * Guarantees space for at least one push.
3608 static void yyensure_buffer_stack (void)
3612 if (!(yy_buffer_stack)) {
3614 /* First allocation is just for 2 elements, since we don't know if this
3615 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3616 * immediate realloc on the next call.
3619 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
3620 (num_to_alloc * sizeof(struct yy_buffer_state*)
3622 if ( ! (yy_buffer_stack) )
3623 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3625 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3627 (yy_buffer_stack_max) = num_to_alloc;
3628 (yy_buffer_stack_top) = 0;
3632 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3634 /* Increase the buffer to prepare for a possible push. */
3635 int grow_size = 8 /* arbitrary grow size */;
3637 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3638 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
3640 num_to_alloc * sizeof(struct yy_buffer_state*)
3642 if ( ! (yy_buffer_stack) )
3643 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3645 /* zero only the new slots.*/
3646 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3647 (yy_buffer_stack_max) = num_to_alloc;
3651 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3652 * @param base the character buffer
3653 * @param size the size in bytes of the character buffer
3655 * @return the newly allocated buffer state object.
3657 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
3662 base[size-2] != YY_END_OF_BUFFER_CHAR ||
3663 base[size-1] != YY_END_OF_BUFFER_CHAR )
3664 /* They forgot to leave room for the EOB's. */
3667 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
3669 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3671 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
3672 b->yy_buf_pos = b->yy_ch_buf = base;
3673 b->yy_is_our_buffer = 0;
3674 b->yy_input_file = 0;
3675 b->yy_n_chars = b->yy_buf_size;
3676 b->yy_is_interactive = 0;
3678 b->yy_fill_buffer = 0;
3679 b->yy_buffer_status = YY_BUFFER_NEW;
3681 yy_switch_to_buffer(b );
3686 /** Setup the input buffer state to scan a string. The next call to yylex() will
3687 * scan from a @e copy of @a str.
3688 * @param yystr a NUL-terminated string to scan
3690 * @return the newly allocated buffer state object.
3691 * @note If you want to scan bytes that may contain NUL values, then use
3692 * yy_scan_bytes() instead.
3694 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
3697 return yy_scan_bytes(yystr,strlen(yystr) );
3700 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3701 * scan from a @e copy of @a bytes.
3702 * @param bytes the byte buffer to scan
3703 * @param len the number of bytes in the buffer pointed to by @a bytes.
3705 * @return the newly allocated buffer state object.
3707 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
3714 /* Get memory for full buffer, including space for trailing EOB's. */
3715 n = _yybytes_len + 2;
3716 buf = (char *) yyalloc(n );
3718 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3720 for ( i = 0; i < _yybytes_len; ++i )
3721 buf[i] = yybytes[i];
3723 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3725 b = yy_scan_buffer(buf,n );
3727 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3729 /* It's okay to grow etc. this buffer, and we should throw it
3730 * away when we're done.
3732 b->yy_is_our_buffer = 1;
3737 #ifndef YY_EXIT_FAILURE
3738 #define YY_EXIT_FAILURE 2
3741 static void yy_fatal_error (yyconst char* msg )
3743 (void) fprintf( stderr, "%s\n", msg );
3744 exit( YY_EXIT_FAILURE );
3747 /* Redefine yyless() so it works in section 3 code. */
3753 /* Undo effects of setting up yytext. */ \
3754 int yyless_macro_arg = (n); \
3755 YY_LESS_LINENO(yyless_macro_arg);\
3756 yytext[yyleng] = (yy_hold_char); \
3757 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3758 (yy_hold_char) = *(yy_c_buf_p); \
3759 *(yy_c_buf_p) = '\0'; \
3760 yyleng = yyless_macro_arg; \
3764 /* Accessor methods (get/set functions) to struct members. */
3766 /** Get the current line number.
3769 int yyget_lineno (void)
3775 /** Get the input stream.
3778 FILE *yyget_in (void)
3783 /** Get the output stream.
3786 FILE *yyget_out (void)
3791 /** Get the length of the current token.
3794 int yyget_leng (void)
3799 /** Get the current token.
3803 char *yyget_text (void)
3808 /** Set the current line number.
3809 * @param line_number
3812 void yyset_lineno (int line_number )
3815 yylineno = line_number;
3818 /** Set the input stream. This does not discard the current
3820 * @param in_str A readable stream.
3822 * @see yy_switch_to_buffer
3824 void yyset_in (FILE * in_str )
3829 void yyset_out (FILE * out_str )
3834 int yyget_debug (void)
3836 return yy_flex_debug;
3839 void yyset_debug (int bdebug )
3841 yy_flex_debug = bdebug ;
3844 static int yy_init_globals (void)
3846 /* Initialization is the same as for the non-reentrant scanner.
3847 * This function is called from yylex_destroy(), so don't allocate here.
3850 (yy_buffer_stack) = 0;
3851 (yy_buffer_stack_top) = 0;
3852 (yy_buffer_stack_max) = 0;
3853 (yy_c_buf_p) = (char *) 0;
3859 (yy_full_match) = 0;
3862 /* Defined in main.c */
3871 /* For future reference: Set errno on error, since we are called by
3877 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3878 int yylex_destroy (void)
3881 /* Pop the buffer stack, destroying each element. */
3882 while(YY_CURRENT_BUFFER){
3883 yy_delete_buffer(YY_CURRENT_BUFFER );
3884 YY_CURRENT_BUFFER_LVALUE = NULL;
3885 yypop_buffer_state();
3888 /* Destroy the stack itself. */
3889 yyfree((yy_buffer_stack) );
3890 (yy_buffer_stack) = NULL;
3892 yyfree ( (yy_state_buf) );
3893 (yy_state_buf) = NULL;
3895 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3896 * yylex() is called, initialization will occur. */
3903 * Internal utility routines.
3907 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3910 for ( i = 0; i < n; ++i )
3915 #ifdef YY_NEED_STRLEN
3916 static int yy_flex_strlen (yyconst char * s )
3919 for ( n = 0; s[n]; ++n )
3926 void *yyalloc (yy_size_t size )
3928 return (void *) malloc( size );
3931 void *yyrealloc (void * ptr, yy_size_t size )
3933 /* The cast to (char *) in the following accommodates both
3934 * implementations that use char* generic pointers, and those
3935 * that use void* generic pointers. It works with the latter
3936 * because both ANSI C and C++ allow castless assignment from
3937 * any pointer type to void*, and deal with argument conversions
3938 * as though doing an assignment.
3940 return (void *) realloc( (char *) ptr, size );
3943 void yyfree (void * ptr )
3945 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3948 #define YYTABLES_NAME "yytables"
3950 #line 929 "parser.l"
3955 static char *StringToLex;
\r
3957 #ifndef FLEX_SCANNER
\r
3958 static FILE *lexFP;
\r
3960 static int input()
\r
3964 if (StringToLex != NULL) {
\r
3965 ret = *StringToLex;
\r
3966 if (ret == NULLCHAR)
\r
3970 } else if (unputCount > 0) {
\r
3971 ret = unputBuffer[--unputCount];
\r
3973 ret = fgetc(lexFP);
\r
3983 * Return offset of next pattern within current file
\r
3987 int offset = ftell(lexFP) - unputCount;
\r
3995 static void output(ch)
\r
3998 if(appData.debugMode) fprintf(debugFP, "PARSER BUG: unmatched character '%c' (0%o)\n",
\r
4002 static void unput(ch)
\r
4005 if (ch == 0) return;
\r
4006 if (StringToLex != NULL) {
\r
4009 if (unputCount >= UNPUT_BUF_SIZE)
\r
4010 if(appData.debugMode) fprintf(debugFP, "PARSER BUG: unput buffer overflow '%c' (0%o)\n",
\r
4012 unputBuffer[unputCount++] = ch;
\r
4016 /* Get ready to lex from a new file. Kludge below sticks
\r
4017 an artificial newline at the front of the file, which the
\r
4018 above grammar ignores, but which makes ^ at start of pattern
\r
4019 match at the real start of the file.
\r
4025 StringToLex = NULL;
\r
4027 unput('\n'); /* kludge */
\r
4030 /* Get ready to lex from a string. ^ at start of pattern WON'T
\r
4031 match at the start of the string!
\r
4040 #endif /*!FLEX_SCANNER*/
\r
4042 #ifdef FLEX_SCANNER
\r
4043 void my_yy_input(buf, result, max_size)
\r
4050 if (StringToLex != NULL) {
\r
4052 while (*StringToLex != NULLCHAR) {
\r
4053 *buf++ = *StringToLex++;
\r
4059 count = fread(buf, 1, max_size, yyin);
\r
4061 *result = YY_NULL;
\r
4069 static YY_BUFFER_STATE my_file_buffer = NULL;
\r
4072 Return offset of next pattern in the current file.
\r
4076 int pos = yy_c_buf_p - YY_CURRENT_BUFFER->yy_ch_buf;
\r
4078 return(ftell(YY_CURRENT_BUFFER->yy_input_file) -
\r
4079 yy_n_chars + pos);
\r
4086 if (my_file_buffer != NULL)
\r
4087 yy_delete_buffer(my_file_buffer);
\r
4089 my_file_buffer = yy_create_buffer(stdin,YY_BUF_SIZE);
\r
4090 yy_switch_to_buffer(my_file_buffer);
\r
4096 if (my_file_buffer != NULL)
\r
4097 yy_delete_buffer(my_file_buffer);
\r
4098 StringToLex = NULL;
\r
4099 my_file_buffer = yy_create_buffer(f,YY_BUF_SIZE);
\r
4100 yy_switch_to_buffer(my_file_buffer);
\r
4102 #endif /*FLEX_SCANNER*/
\r
4109 /* Parse a move from the given string s */
\r
4110 /* ^ at start of pattern WON'T work here unless using flex */
\r
4111 ChessMove yylexstr(boardIndex, s, text, len)
\r
4112 int boardIndex, len;
\r
4116 char *oldStringToLex;
\r
4117 #ifdef FLEX_SCANNER
\r
4118 YY_BUFFER_STATE buffer, oldBuffer;
\r
4121 yyboardindex = boardIndex;
\r
4122 oldStringToLex = StringToLex;
\r
4124 #ifdef FLEX_SCANNER
\r
4125 buffer = yy_create_buffer(stdin,YY_BUF_SIZE);
\r
4126 oldBuffer = YY_CURRENT_BUFFER;
\r
4127 yy_switch_to_buffer(buffer);
\r
4128 #endif /*FLEX_SCANNER*/
\r
4130 ret = (ChessMove) yylex();
4131 strncpy(text, yy_text, len-1); // [HGM] vari: yy_text is not available to caller after buffer switch ?!?
4132 text[len-1] = NULLCHAR;
\r
4134 #ifdef FLEX_SCANNER
\r
4135 if (oldBuffer != NULL)
\r
4136 yy_switch_to_buffer(oldBuffer);
\r
4137 yy_delete_buffer(buffer);
\r
4138 #endif /*FLEX_SCANNER*/
\r
4139 StringToLex = oldStringToLex;
\r