Changes needed to compile master branch.
[xboard.git] / winboard / parser.c
1
2 #line 3 "parser.c"
3
4 #define  YY_INT_ALIGNED short int
5
6 /* A lexical scanner generated by flex */
7
8 #define FLEX_SCANNER
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11 #define YY_FLEX_SUBMINOR_VERSION 35
12 #if YY_FLEX_SUBMINOR_VERSION > 0
13 #define FLEX_BETA
14 #endif
15
16 /* First, we deal with  platform-specific or compiler-specific issues. */
17
18 /* begin standard C headers. */
19 #include <stdio.h>
20 #include <string.h>
21 #include <errno.h>
22 #include <stdlib.h>
23
24 /* end standard C headers. */
25
26 /* flex integer type definitions */
27
28 #ifndef FLEXINT_H
29 #define FLEXINT_H
30
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
34
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36  * if you want the limit (max/min) macros for int types. 
37  */
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
40 #endif
41
42 #include <inttypes.h>
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
49 #else
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t; 
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
56 #endif /* ! C99 */
57
58 /* Limits of integral types. */
59 #ifndef INT8_MIN
60 #define INT8_MIN               (-128)
61 #endif
62 #ifndef INT16_MIN
63 #define INT16_MIN              (-32767-1)
64 #endif
65 #ifndef INT32_MIN
66 #define INT32_MIN              (-2147483647-1)
67 #endif
68 #ifndef INT8_MAX
69 #define INT8_MAX               (127)
70 #endif
71 #ifndef INT16_MAX
72 #define INT16_MAX              (32767)
73 #endif
74 #ifndef INT32_MAX
75 #define INT32_MAX              (2147483647)
76 #endif
77 #ifndef UINT8_MAX
78 #define UINT8_MAX              (255U)
79 #endif
80 #ifndef UINT16_MAX
81 #define UINT16_MAX             (65535U)
82 #endif
83 #ifndef UINT32_MAX
84 #define UINT32_MAX             (4294967295U)
85 #endif
86
87 #endif /* ! FLEXINT_H */
88
89 #ifdef __cplusplus
90
91 /* The "const" storage-class-modifier is valid. */
92 #define YY_USE_CONST
93
94 #else   /* ! __cplusplus */
95
96 /* C99 requires __STDC__ to be defined as 1. */
97 #if defined (__STDC__)
98
99 #define YY_USE_CONST
100
101 #endif  /* defined (__STDC__) */
102 #endif  /* ! __cplusplus */
103
104 #ifdef YY_USE_CONST
105 #define yyconst const
106 #else
107 #define yyconst
108 #endif
109
110 /* Returned upon end-of-file. */
111 #define YY_NULL 0
112
113 /* Promotes a possibly negative, possibly signed char to an unsigned
114  * integer for use as an array index.  If the signed char is negative,
115  * we want to instead treat it as an 8-bit unsigned char, hence the
116  * double cast.
117  */
118 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
119
120 /* Enter a start condition.  This macro really ought to take a parameter,
121  * but we do it the disgusting crufty way forced on us by the ()-less
122  * definition of BEGIN.
123  */
124 #define BEGIN (yy_start) = 1 + 2 *
125
126 /* Translate the current start state into a value that can be later handed
127  * to BEGIN to return to the state.  The YYSTATE alias is for lex
128  * compatibility.
129  */
130 #define YY_START (((yy_start) - 1) / 2)
131 #define YYSTATE YY_START
132
133 /* Action number for EOF rule of a given start state. */
134 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
135
136 /* Special action meaning "start processing a new file". */
137 #define YY_NEW_FILE yyrestart(yyin  )
138
139 #define YY_END_OF_BUFFER_CHAR 0
140
141 /* Size of default input buffer. */
142 #ifndef YY_BUF_SIZE
143 #define YY_BUF_SIZE 16384
144 #endif
145
146 /* The state buf must be large enough to hold one state per character in the main buffer.
147  */
148 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
149
150 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
151 #define YY_TYPEDEF_YY_BUFFER_STATE
152 typedef struct yy_buffer_state *YY_BUFFER_STATE;
153 #endif
154
155 extern int yyleng;
156
157 extern FILE *yyin, *yyout;
158
159 #define EOB_ACT_CONTINUE_SCAN 0
160 #define EOB_ACT_END_OF_FILE 1
161 #define EOB_ACT_LAST_MATCH 2
162
163     #define YY_LESS_LINENO(n)
164     
165 /* Return all but the first "n" matched characters back to the input stream. */
166 #define yyless(n) \
167         do \
168                 { \
169                 /* Undo effects of setting up yytext. */ \
170         int yyless_macro_arg = (n); \
171         YY_LESS_LINENO(yyless_macro_arg);\
172                 *yy_cp = (yy_hold_char); \
173                 YY_RESTORE_YY_MORE_OFFSET \
174                 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
175                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
176                 } \
177         while ( 0 )
178
179 #define unput(c) yyunput( c, (yytext_ptr)  )
180
181 #ifndef YY_TYPEDEF_YY_SIZE_T
182 #define YY_TYPEDEF_YY_SIZE_T
183 typedef size_t yy_size_t;
184 #endif
185
186 #ifndef YY_STRUCT_YY_BUFFER_STATE
187 #define YY_STRUCT_YY_BUFFER_STATE
188 struct yy_buffer_state
189         {
190         FILE *yy_input_file;
191
192         char *yy_ch_buf;                /* input buffer */
193         char *yy_buf_pos;               /* current position in input buffer */
194
195         /* Size of input buffer in bytes, not including room for EOB
196          * characters.
197          */
198         yy_size_t yy_buf_size;
199
200         /* Number of characters read into yy_ch_buf, not including EOB
201          * characters.
202          */
203         int yy_n_chars;
204
205         /* Whether we "own" the buffer - i.e., we know we created it,
206          * and can realloc() it to grow it, and should free() it to
207          * delete it.
208          */
209         int yy_is_our_buffer;
210
211         /* Whether this is an "interactive" input source; if so, and
212          * if we're using stdio for input, then we want to use getc()
213          * instead of fread(), to make sure we stop fetching input after
214          * each newline.
215          */
216         int yy_is_interactive;
217
218         /* Whether we're considered to be at the beginning of a line.
219          * If so, '^' rules will be active on the next match, otherwise
220          * not.
221          */
222         int yy_at_bol;
223
224     int yy_bs_lineno; /**< The line count. */
225     int yy_bs_column; /**< The column count. */
226     
227         /* Whether to try to fill the input buffer when we reach the
228          * end of it.
229          */
230         int yy_fill_buffer;
231
232         int yy_buffer_status;
233
234 #define YY_BUFFER_NEW 0
235 #define YY_BUFFER_NORMAL 1
236         /* When an EOF's been seen but there's still some text to process
237          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
238          * shouldn't try reading from the input source any more.  We might
239          * still have a bunch of tokens to match, though, because of
240          * possible backing-up.
241          *
242          * When we actually see the EOF, we change the status to "new"
243          * (via yyrestart()), so that the user can continue scanning by
244          * just pointing yyin at a new input file.
245          */
246 #define YY_BUFFER_EOF_PENDING 2
247
248         };
249 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
250
251 /* Stack of input buffers. */
252 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
253 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
254 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
255
256 /* We provide macros for accessing buffer states in case in the
257  * future we want to put the buffer states in a more general
258  * "scanner state".
259  *
260  * Returns the top of the stack, or NULL.
261  */
262 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
263                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
264                           : NULL)
265
266 /* Same as previous macro, but useful when we know that the buffer stack is not
267  * NULL or when we need an lvalue. For internal use only.
268  */
269 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
270
271 /* yy_hold_char holds the character lost when yytext is formed. */
272 static char yy_hold_char;
273 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
274 int yyleng;
275
276 /* Points to current character in buffer. */
277 static char *yy_c_buf_p = (char *) 0;
278 static int yy_init = 0;         /* whether we need to initialize */
279 static int yy_start = 0;        /* start state number */
280
281 /* Flag which is used to allow yywrap()'s to do buffer switches
282  * instead of setting up a fresh yyin.  A bit of a hack ...
283  */
284 static int yy_did_buffer_switch_on_eof;
285
286 void yyrestart (FILE *input_file  );
287 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
288 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
289 void yy_delete_buffer (YY_BUFFER_STATE b  );
290 void yy_flush_buffer (YY_BUFFER_STATE b  );
291 void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
292 void yypop_buffer_state (void );
293
294 static void yyensure_buffer_stack (void );
295 static void yy_load_buffer_state (void );
296 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
297
298 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
299
300 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
301 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
302 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
303
304 void *yyalloc (yy_size_t  );
305 void *yyrealloc (void *,yy_size_t  );
306 void yyfree (void *  );
307
308 #define yy_new_buffer yy_create_buffer
309
310 #define yy_set_interactive(is_interactive) \
311         { \
312         if ( ! YY_CURRENT_BUFFER ){ \
313         yyensure_buffer_stack (); \
314                 YY_CURRENT_BUFFER_LVALUE =    \
315             yy_create_buffer(yyin,YY_BUF_SIZE ); \
316         } \
317         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
318         }
319
320 #define yy_set_bol(at_bol) \
321         { \
322         if ( ! YY_CURRENT_BUFFER ){\
323         yyensure_buffer_stack (); \
324                 YY_CURRENT_BUFFER_LVALUE =    \
325             yy_create_buffer(yyin,YY_BUF_SIZE ); \
326         } \
327         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
328         }
329
330 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
331
332 /* Begin user sect3 */
333
334 typedef unsigned char YY_CHAR;
335
336 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
337
338 typedef int yy_state_type;
339
340 extern int yylineno;
341
342 int yylineno = 1;
343
344 extern char *yytext;
345 #define yytext_ptr yytext
346
347 static yy_state_type yy_get_previous_state (void );
348 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
349 static int yy_get_next_buffer (void );
350 static void yy_fatal_error (yyconst char msg[]  );
351
352 /* Done after the current pattern has been matched and before the
353  * corresponding action - sets up yytext.
354  */
355 #define YY_DO_BEFORE_ACTION \
356         (yytext_ptr) = yy_bp; \
357         yyleng = (size_t) (yy_cp - yy_bp); \
358         (yy_hold_char) = *yy_cp; \
359         *yy_cp = '\0'; \
360         (yy_c_buf_p) = yy_cp;
361
362 #define YY_NUM_RULES 42
363 #define YY_END_OF_BUFFER 43
364 /* This struct is not used in this scanner,
365    but its presence is necessary. */
366 struct yy_trans_info
367         {
368         flex_int32_t yy_verify;
369         flex_int32_t yy_nxt;
370         };
371 static yyconst flex_int16_t yy_acclist[602] =
372     {   0,
373        43,   41,   42,   41,   42,   41,   42,   40,   41,   42,
374        41,   42,   25,   41,   42,   41,   42,   40,   41,   42,
375        40,   41,   42,16410,   40,   41,   42,16410,   41,   42,
376        40,   41,   42,   40,   41,   42,   40,   41,   42,   40,
377        41,   42,   40,   41,   42,   40,   41,   42,   40,   41,
378        42,   40,   41,   42,   40,   41,   42,   40,   41,   42,
379        41,   42,   40,   41,   42,   40,   41,   42,   40,   41,
380        42,   40,   41,   42,   40,   41,   42,   40,   41,   42,
381        40,   41,   42,   40,   41,   42,   40,   41,   42,   40,
382        41,   42,   40,   41,   42,   40,   41,   42,   40,   41,
383
384        42,   40,   41,   42,   40,   41,   42,   40,   41,   42,
385        40,   41,   42,   41,   42,   41,   42,   40,   41,   42,
386        40,   41,   42,   40,   41,   42,16410,   40,   41,   42,
387     16410,   41,   42,   40,   41,   42,   40,   41,   42,   40,
388        41,   42,   40,   41,   42,   40,   41,   42,   40,   41,
389        42,   40,   41,   42,   40,   41,   42,   40,   41,   42,
390        40,   41,   42,   40,   41,   42,   40,   41,   42,   40,
391        41,   42,   40,   41,   42,   40,   41,   42,   40,   41,
392        42,   40,   41,   42,   40,   41,   42,   40,   41,   42,
393        40,   41,   42,   40,   41,   42,   40,   41,   42,   40,
394
395        41,   42,   40,   41,   42,   40,   41,   42,   40,   41,
396        42,   40,   41,   42,   41,   42,   33,   40,   17,   40,
397         9,   40,   40,   40,16410, 8218,   40,   35,   40,   40,
398        40,   40,   40,   40,   40,   40,   40,   40,    9,   40,
399        40,   40,   40,   36,   40,    3,   40,   40,    4,   40,
400        40,   40,   40,   40,   40,    9,   40,   40,   40,   34,
401        40,   40,    9,   40,   40,   40,16410, 8218,   40,   40,
402        40,   40,   40,   40,   40,   40,   40,   40,   40,    9,
403        40,   40,   40,   40,   40,    3,   40,   40,    4,   40,
404        40,   40,   40,   40,   40,    9,   40,   40,   40,   15,
405
406         9,   40,   23,   40,   23,    8,   40, 8218,   22,   40,
407        22,   24,   40,   40,   40,    6,   40,   40,   40,   40,
408        40,   40,    9,   40,   40,   40,   40,    4,   40,   40,
409         3,    3,   40,    3,   40,   40,    4,    5,   40,    4,
410         4,   40,   40,   40,   40,    9,   40,   40,   34,   39,
411         9,   40,   23,   40,    8,   40,   22,   40,   35,   40,
412        40,   40,    6,   40,   40,   40,   40,   40,   40,    9,
413        40,   40,   40,   40,    4,   40,   40,    3,   40,    3,
414        40,   40,    5,   40,    4,   40,   40,   40,   40,    9,
415        40,   40,   38,   38,   38,   37,   25,   25,    6,   40,
416
417        10,    6,   40,    7,   40,    6,   40,    6,   40,   40,
418        40,   19,   40,   40,   16,   40,   40,   40,   40,   40,
419        36,    3,    3,    2,   40,    5,    4,    5,    5,   40,
420        40,    4,    4,   40,   40,   25,   39,   40,    6,   40,
421         7,   40,   40,   40,   40,   40,   19,   40,   40,   16,
422        40,   40,   40,   40,   40,    2,   40,    5,   40,   40,
423         4,   40,   40,   38,    7,    7,    1,   40,   20,   40,
424        40,   19,   40,   40,   40,   40,   40,   40,   30,   36,
425         2,    2,    2,   40,    5,    5,    5,   40,   39,    1,
426        40,   40,   40,   19,   40,   40,   40,   40,   40,   40,
427
428         2,   40,    5,   40,   27,   38,    1,   23,   23,   22,
429        22,   24,   24,    1,    1,   40,   21,   20,   40,   40,
430        40,   11,   40,   40,   28,   36,   30,    2,    2,   27,
431        34,   39,   39,    1,   40,   40,   40,   40,   11,   40,
432        40,   18,    1,   24,    1,   21,   19,   40,   40,   40,
433        11,   40,   40,   40,   40,   40,   11,   40,   40,   12,
434        40,   40,   40,   40,   12,   40,   40,   14,   40,   40,
435        40,   14,   40,   40,   40,   39,   40,   40,   40,   40,
436        39,   39,   40,   40,   31,   40,   39,   39,   31,   40,
437        13,   31,   32,   32,   35,   39,   39,   31,   39,   34,
438
439        29
440     } ;
441
442 static yyconst flex_int16_t yy_accept[689] =
443     {   0,
444         1,    1,    1,    2,    4,    6,    8,   11,   13,   16,
445        18,   21,   25,   29,   31,   34,   37,   40,   43,   46,
446        49,   52,   55,   58,   61,   63,   66,   69,   72,   75,
447        78,   81,   84,   87,   90,   93,   96,   99,  102,  105,
448       108,  111,  114,  116,  118,  121,  124,  128,  132,  134,
449       137,  140,  143,  146,  149,  152,  155,  158,  161,  164,
450       167,  170,  173,  176,  179,  182,  185,  188,  191,  194,
451       197,  200,  203,  206,  209,  212,  215,  217,  217,  218,
452       219,  219,  219,  219,  219,  220,  220,  220,  220,  221,
453       221,  223,  223,  223,  223,  224,  224,  224,  226,  226,
454
455       228,  228,  229,  229,  230,  230,  231,  231,  232,  232,
456       233,  234,  235,  236,  237,  238,  239,  241,  242,  243,
457       244,  244,  244,  244,  244,  245,  246,  248,  248,  249,
458       251,  252,  253,  254,  255,  256,  258,  259,  260,  260,
459       260,  260,  261,  261,  262,  262,  263,  265,  265,  266,
460       268,  268,  270,  270,  271,  272,  272,  273,  274,  275,
461       276,  277,  278,  279,  280,  282,  283,  284,  285,  286,
462       288,  288,  289,  291,  292,  293,  294,  295,  296,  298,
463       299,  300,  300,  300,  300,  300,  300,  300,  300,  300,
464       300,  300,  300,  301,  301,  301,  301,  301,  301,  303,
465
466       305,  306,  308,  309,  309,  309,  309,  311,  312,  313,
467       313,  314,  314,  315,  315,  316,  316,  318,  318,  318,
468       318,  318,  318,  318,  319,  320,  321,  322,  323,  325,
469       326,  327,  328,  328,  328,  328,  328,  330,  330,  331,
470       331,  332,  334,  336,  337,  338,  338,  340,  341,  343,
471       344,  345,  346,  348,  349,  350,  350,  350,  350,  350,
472       351,  353,  355,  357,  359,  359,  360,  360,  361,  362,
473       362,  363,  365,  366,  367,  368,  369,  370,  372,  373,
474       374,  375,  377,  378,  378,  380,  382,  383,  385,  387,
475       388,  389,  390,  392,  393,  393,  393,  394,  395,  395,
476
477       395,  396,  396,  396,  397,  397,  397,  398,  398,  399,
478       399,  400,  400,  400,  400,  401,  401,  401,  401,  401,
479       401,  401,  401,  402,  404,  404,  406,  407,  408,  408,
480       409,  410,  410,  410,  410,  410,  410,  410,  411,  412,
481       414,  414,  415,  417,  418,  419,  420,  421,  421,  421,
482       421,  421,  422,  423,  423,  424,  426,  427,  428,  428,
483       428,  429,  431,  432,  433,  433,  435,  436,  436,  437,
484       437,  437,  437,  437,  438,  438,  439,  439,  439,  441,
485       443,  444,  444,  445,  446,  447,  449,  450,  452,  453,
486       454,  455,  456,  458,  460,  461,  463,  464,  464,  464,
487
488       464,  464,  465,  465,  465,  465,  465,  466,  466,  466,
489       466,  466,  466,  466,  466,  466,  466,  467,  469,  469,
490       469,  469,  469,  469,  470,  471,  472,  472,  474,  474,
491       475,  476,  477,  478,  479,  479,  479,  481,  481,  481,
492       482,  482,  483,  485,  486,  486,  487,  487,  489,  489,
493       489,  489,  489,  489,  489,  489,  490,  490,  490,  492,
494       493,  494,  496,  497,  498,  499,  500,  501,  503,  505,
495       505,  505,  505,  505,  505,  505,  507,  507,  508,  508,
496       509,  509,  510,  510,  511,  511,  512,  512,  513,  513,
497       514,  514,  514,  514,  515,  517,  517,  517,  518,  518,
498
499       518,  519,  520,  520,  520,  520,  520,  520,  521,  522,
500       524,  525,  527,  527,  528,  529,  530,  530,  530,  532,
501       532,  532,  533,  534,  534,  534,  536,  537,  538,  539,
502       541,  542,  542,  543,  543,  543,  543,  543,  544,  544,
503       545,  546,  546,  546,  547,  547,  547,  548,  548,  548,
504       548,  548,  549,  550,  551,  553,  554,  554,  554,  554,
505       554,  554,  555,  556,  557,  559,  560,  560,  560,  560,
506       560,  560,  560,  561,  561,  561,  561,  561,  562,  563,
507       563,  563,  563,  563,  564,  565,  565,  565,  565,  565,
508       566,  566,  566,  566,  567,  568,  570,  570,  570,  570,
509
510       570,  571,  571,  572,  574,  574,  574,  574,  574,  575,
511       576,  576,  576,  576,  576,  577,  578,  579,  579,  579,
512       579,  579,  579,  580,  581,  581,  581,  581,  581,  582,
513       583,  584,  585,  585,  585,  585,  585,  585,  587,  587,
514       587,  587,  587,  588,  589,  591,  591,  591,  592,  592,
515       593,  593,  594,  594,  594,  596,  596,  597,  598,  598,
516       598,  598,  598,  600,  600,  600,  600,  600,  600,  600,
517       600,  600,  600,  600,  600,  600,  600,  600,  600,  600,
518       600,  600,  600,  600,  600,  601,  602,  602
519     } ;
520
521 static yyconst flex_int32_t yy_ec[256] =
522     {   0,
523         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
524         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
525         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
526         1,    4,    1,    5,    6,    7,    8,    1,    9,   10,
527        11,   12,   13,    1,   14,   15,   16,   17,   18,   19,
528        20,   20,   20,   20,   20,   20,   20,   21,   22,    1,
529        23,    1,    1,   24,   25,   26,   27,   28,   29,   30,
530        31,   32,   33,   33,   34,   35,   36,   37,   38,   34,
531        34,   39,   40,   33,   41,   33,   42,   43,   33,   33,
532        44,    1,   45,    1,   46,    1,   47,   48,   49,   50,
533
534        51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
535        61,   62,   63,   64,   65,   66,   67,   68,   69,   70,
536        71,   68,   72,    1,   73,    1,    1,    1,    1,    1,
537         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
538         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
539         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
540         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
541         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
542         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
543         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
544
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
551     } ;
552
553 static yyconst flex_int32_t yy_meta[74] =
554     {   0,
555         1,    2,    3,    2,    1,    1,    1,    1,    4,    5,
556         6,    1,    7,    8,    1,    1,    9,    9,    9,    9,
557        10,    1,   11,    1,   12,   12,   12,   12,   12,   12,
558        12,   12,   13,   12,   13,   13,   12,   12,   12,   13,
559        13,   12,   14,    1,    1,    1,   15,   15,   15,   15,
560        16,   15,   15,   15,   15,   15,   15,   15,   17,   18,
561        18,   18,   18,   18,   17,   17,   17,   17,   17,   19,
562        17,    1,    1
563     } ;
564
565 static yyconst flex_int16_t yy_base[767] =
566     {   0,
567         0,   73, 3814, 3815,  122,  131,    0,  142, 3809,  140,
568       151,  171,  162, 3809,  231,  159, 3757, 3746,  119, 3762,
569       143, 3757, 3741,  190,  301,  361,  211,  207,  279,  215,
570       224,  284,  243,  286,  301,  303,  305, 3759,  232, 3754,
571      3738,  264,  351, 3799,  149,  379,  430,  351,  255,  493,
572       212, 3748, 3737,  327, 3753,  157, 3748, 3732,  331,  555,
573       372,  245,  378,  351,  468,  530,  475,  477,  505,  523,
574       508,  576,  578,  385,  579,  610,  615, 3744,  372,    0,
575      3786,  309,  630,  431, 3815, 3782,  675,  575,  405, 3776,
576      3776, 3774,  450,  639, 3774,  472,  165,  640, 3773,    0,
577
578      3786, 3815,    0,  699,    0,  744,    0,  648,  787,  652,
579       656, 3649, 3636, 3591,  693, 3601, 3594,  697, 3584,  664,
580      3585,  856,  352,  929, 3815,  956, 1006,    0, 1031, 1080,
581       660,  717,  721, 3563, 3567, 3551, 3514, 3523,  435, 3504,
582       757, 3572, 3571,  497, 3496,  517,  607,  550,  681, 1130,
583       160,  518,  554, 1193, 1238, 3477,  686,  762,  787,  764,
584       617,  676,  750, 3424,  803,  816,  864,  835, 1262, 1312,
585      3439, 1337, 1387,  874,  888,  895,  700,  823,  865,  762,
586       866,  885, 3360,  583,  610,  626,  652,  676,  944,  949,
587      3394, 3260, 3815,  882, 1190, 3328, 3286, 3281, 3270, 3279,
588
589      3278,    0, 3815, 3277, 3266, 3263, 3262, 3182,  799,  830,
590       900,  958, 1412,  928,  962,  966, 1457, 3130, 3120, 3119,
591      3130, 3108,  382,  970, 1075, 3071,  759, 2895, 2927, 2884,
592      2880, 1108,  572, 1213,  739, 1527, 1591,    0, 1596,    0,
593      2927, 2844, 2843,  974, 1202, 1246, 1645, 2840, 2838,  238,
594      2799, 2797, 2814, 2743, 3815, 1210, 1084, 2630,  211, 2628,
595      1121, 1132,  606, 1253,  697, 2626,  895, 1217, 1688, 2624,
596      1258, 1733, 1467, 1472,  901, 1536, 1252, 1532, 1535, 1538,
597      1549, 1795, 1800, 2623,  810, 2615, 1556, 1849, 1259, 1573,
598      1473, 1474, 1541, 1543, 1583, 2574, 3815,  778,  832,  913,
599
600       985,  989, 1007, 3815, 1593, 2613, 2612, 2549, 2548, 1281,
601      1646, 2568, 2554, 2550, 2550,  585, 2549,  367, 2487,  636,
602      1680, 1125, 3815, 2480, 1679, 2479, 2463, 1854, 1678, 3815,
603      1287, 2407, 2407, 2403, 2401, 2401, 2402, 2404, 2403,  968,
604       510,  598,    0, 2421, 2405, 2406, 2405, 1007, 1161, 1046,
605      1354, 2450, 2443, 1455, 3815, 1694, 1510, 2442, 1161, 1585,
606      1700, 2441, 1209, 3815, 2389,    0, 2389, 1789, 2445, 1577,
607      1711, 2401, 2386, 2443,  403, 1709, 1281,  374, 1131, 1710,
608      1866, 2441, 1741,  819, 1744, 1921, 1746, 1315, 1686, 1789,
609      1748, 1793, 1754, 1852, 1917, 1571, 1919, 1930, 2392, 1127,
610
611      2431, 1221, 1244, 1392, 1421, 1486, 2418, 1620, 2429, 2366,
612      2427, 2361, 2422, 2359, 2413, 1923, 3815, 1994, 2381, 2377,
613      1452, 2377, 2372, 2361, 2421, 1266, 1919, 2420,  688, 2394,
614      2370, 2359, 2358, 2412, 1684, 1660, 3815, 2406, 1891,  933,
615      1388, 1579, 2399, 2398, 1462, 3815, 2346,    0, 2379, 1928,
616      2371, 1645, 2371, 2328, 2321, 1603, 1495, 1269, 2029, 1941,
617      1925, 1943, 1928, 1939, 1932, 1947, 1950, 1954, 1957, 1971,
618      1350, 1515, 2374, 1568, 1573, 3815, 1976, 1756, 2373, 2372,
619      2309, 2308, 2369, 2368, 2305, 2304, 2365, 2357, 2287, 2285,
620      2341, 2337, 1959, 1966, 2344, 2293, 2302, 1746,  760, 2299,
621
622      3815, 2304, 2334, 2293, 2267, 2308, 2285, 2292, 2262, 1655,
623      2274, 3815, 1995, 3815, 2301, 3815, 2294, 2070, 2297, 2243,
624      2232, 2279, 1791, 1814, 1812, 1991, 2032, 2065, 2071, 2072,
625      2073, 1974, 3815, 2230, 2269, 1647, 2089, 2268, 2274, 2271,
626      3815, 2214, 2215, 3815, 2181, 2228, 2221, 2169, 2225, 2188,
627      2161, 2184, 2156, 2164,    0, 2141, 2093, 2197, 2133, 1836,
628      1662, 2074, 2076, 2082, 2095, 2106, 2002, 2130, 2146, 1724,
629      2016, 1985, 2033, 1997,  958, 2003, 1946, 2172, 1919, 1903,
630      1880, 1767, 1842, 2245, 2108, 2004, 1805, 1815, 1814, 3815,
631      1794, 1920, 1960, 2318, 2077,    0, 1788, 1630, 2046,  598,
632
633      2391, 2114, 2097, 2110, 2125, 1592, 1532, 2109, 1524, 1460,
634      1444, 1439, 1810,  758, 2118, 1443, 1374, 2132, 1261, 1257,
635      2094, 2095, 1253, 1188, 1154, 1199, 2130, 1866, 2139, 2166,
636      1117, 1053, 2147, 2087,  995, 2122, 2155,    0, 1027,  895,
637       924, 2152, 2206, 2212,    0, 2154,  839, 3815,  821, 2158,
638       787, 3815,  567,  501, 3815, 2155, 2209, 2232, 2219,  380,
639       362, 1838, 2233, 2220,  288, 2197, 1969, 2005, 2157, 2270,
640      2274, 2292, 2293, 2294, 2296, 2297, 2299, 2300, 2301, 2302,
641      2332, 2345, 2347, 2199,  190, 3815, 3815, 2461, 2480, 2493,
642      2507, 2526, 2545, 2561, 2580, 2599, 2617, 1883, 1994, 1999,
643
644      2635, 2654, 2030, 2673, 2692, 2711, 2730, 2749, 2768, 2787,
645      2806, 2825, 2837, 2856, 2875, 2894, 2913, 2921, 2148, 2931,
646      2947, 2966, 2985, 3004, 3023, 3042, 3061, 3080, 3099, 3118,
647      3137, 3156, 3168, 3187, 3206, 3225, 3244, 3260, 3275, 3291,
648      3310, 3326, 3345, 3364, 3383, 3402, 3421, 3440, 3459, 3478,
649      3497, 3516, 3535, 3554, 3569, 3588, 3607, 3622, 3636, 3655,
650      3674, 3693, 3712, 3731, 3750, 3769
651     } ;
652
653 static yyconst flex_int16_t yy_def[767] =
654     {   0,
655       687,  687,  687,  687,  687,  687,  688,  689,  687,  690,
656       688,  687,   12,  691,  688,   15,   15,   15,   15,   15,
657        15,   15,   15,   15,  692,  688,   26,   26,   26,   26,
658        26,   26,   26,   26,   26,   26,   26,  688,  688,  688,
659       688,  688,  693,  687,  694,  694,  687,   47,  691,  694,
660        50,   50,   50,   50,   50,   50,   50,   50,   50,  694,
661        60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
662        60,  694,  694,  694,  694,  694,  693,  687,  687,  688,
663       695,  696,  695,  687,  687,  687,  687,  687,  688,  687,
664       688,  687,  697,  697,  688,  697,  687,   12,  687,  688,
665
666       691,  687,  698,  688,  699,  688,  700,  106,  687,  106,
667       106,  688,  688,  688,  106,  104,  688,  106,  688,  106,
668       701,  692,  701,  702,  687,  688,  687,  703,  688,  688,
669       688,  688,  688,  688,  688,  688,  688,  688,  693,  704,
670       693,  687,  705,  694,  687,  694,  694,  687,  694,  687,
671       687,  694,  706,  694,  154,  700,  155,  155,  155,  694,
672       694,  694,  155,  154,  694,  155,  694,  155,  154,  687,
673       703,  154,  687,  694,  694,  694,  694,  694,  694,  694,
674       694,  693,  687,  707,  708,  708,  709,  710,  707,  707,
675       711,  712,  687,  713,  713,  687,  687,  687,  688,  688,
676
677       687,  688,  687,  687,  687,  687,  688,  687,  687,  687,
678       688,  687,  688,  713,  688,  687,  688,  687,  687,  687,
679       687,  687,  687,  688,  688,  688,  688,  688,  688,  688,
680       688,  688,  714,  715,  716,  717,  688,  718,  688,  719,
681       718,  688,  239,  688,  720,  720,  688,  246,  688,  688,
682       688,  688,  688,  688,  687,  693,  687,  721,  687,  722,
683       694,  694,  694,  694,  723,  721,  724,  694,  694,  214,
684       694,  269,  694,  694,  694,  694,  694,  694,  694,  694,
685       694,  694,  269,  719,  694,  283,  694,  282,  694,  694,
686       694,  694,  694,  694,  693,  687,  687,  725,  726,  727,
687
688       728,  725,  729,  687,  730,  731,  731,  732,  732,  687,
689       733,  687,  687,  687,  688,  687,  687,  687,  687,  687,
690       687,  687,  687,  688,  733,  688,  687,  688,  325,  687,
691       688,  687,  687,  687,  687,  687,  687,  688,  688,  688,
692       687,  688,  688,  688,  688,  688,  688,  734,  734,  735,
693       736,  737,  687,  687,  687,  738,  739,  687,  687,  739,
694       739,  688,  688,  687,  687,  688,  688,  693,  687,  687,
695       687,  687,  687,  740,  687,  694,  741,  741,  694,  694,
696       283,  329,  694,  694,  694,  694,  694,  694,  694,  694,
697       694,  694,  742,  694,  694,  694,  694,  693,  687,  727,
698
699       743,  744,  728,  745,  729,  730,  687,  687,  746,  747,
700       748,  749,  750,  751,  687,  687,  687,  688,  687,  687,
701       687,  687,  687,  687,  688,  688,  687,  688,  687,  688,
702       688,  688,  688,  688,  752,  753,  687,  754,  687,  755,
703       755,  755,  688,  687,  687,  687,  687,  688,  687,  693,
704       687,  687,  687,  687,  687,  756,  741,  741,  694,  694,
705       694,  694,  694,  694,  694,  694,  694,  694,  694,  693,
706       687,  744,  757,  728,  745,  687,  730,  758,  746,  746,
707       747,  747,  748,  748,  749,  749,  750,  750,  751,  751,
708       687,  687,  758,  758,  688,  687,  687,  687,  687,  687,
709
710       687,  688,  759,  687,  687,  687,  687,  688,  688,  688,
711       688,  687,  687,  687,  687,  687,  687,  693,  687,  687,
712       687,  756,  756,  741,  741,  694,  694,  694,  694,  694,
713       694,  693,  687,  687,  757,  744,  730,  687,  687,  687,
714       687,  687,  687,  687,  687,  759,  759,  687,  687,  687,
715       687,  688,  688,  688,  688,  688,  693,  687,  687,  741,
716       741,  694,  694,  694,  694,  694,  693,  687,  687,  687,
717       687,  687,  687,  687,  687,  687,  687,  760,  688,  687,
718       687,  741,  741,  761,  694,  693,  687,  687,  687,  687,
719       687,  762,  762,  760,  594,  688,  687,  687,  741,  741,
720
721       761,  762,  601,  694,  693,  687,  687,  762,  594,  594,
722       687,  687,  741,  741,  763,  601,  601,  693,  687,  687,
723       762,  762,  594,  594,  687,  687,  741,  741,  763,  763,
724       601,  601,  693,  687,  687,  762,  762,  594,  764,  687,
725       765,  741,  763,  763,  601,  693,  687,  687,  687,  762,
726       764,  687,  687,  765,  687,  741,  763,  763,  693,  687,
727       687,  741,  763,  693,  687,  741,  693,  766,  766,  766,
728       766,  766,  766,  766,  766,  766,  766,  766,  766,  766,
729       766,  766,  766,  766,  687,  687,    0,  687,  687,  687,
730       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
731
732       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
733       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
734       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
735       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
736       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
737       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
738       687,  687,  687,  687,  687,  687
739     } ;
740
741 static yyconst flex_int16_t yy_nxt[3889] =
742     {   0,
743         4,    4,    4,    5,    4,    4,    6,    4,    7,    8,
744         4,    9,   10,    7,    4,    4,   11,   12,   13,   13,
745         4,   14,    4,    4,   15,   16,   17,   18,   15,   15,
746        19,   15,   15,   15,   15,   20,   15,   21,   22,   23,
747        15,   24,   15,   25,    4,    4,   26,   27,   28,   29,
748        30,   31,   32,   33,   34,   35,   36,   37,   38,    7,
749        39,    7,    7,   40,   41,    7,    7,    7,   42,    7,
750         7,   43,    4,    4,    4,    4,    5,    4,   44,    6,
751        44,    7,    8,    4,    9,   10,   45,    4,    4,   46,
752        47,   48,   48,    4,   49,    4,    4,   50,   51,   52,
753
754        53,   50,   50,   54,   50,   50,   50,   50,   55,   50,
755        56,   57,   58,   50,   59,   50,   25,    4,    4,   60,
756        61,   62,   63,   64,   65,   66,   67,   68,   69,   70,
757        71,   72,   45,   73,   45,   45,   74,   75,   45,   45,
758        45,   76,   45,   45,   77,    4,   78,   79,   79,   79,
759        79,   82,   85,   86,   88,  113,  116,   80,   83,   83,
760        83,   83,  109,  260,   89,   93,   90,   91,   78,  145,
761       164,   92,   93,   93,   94,   80,  208,  687,  114,   80,
762       117,  208,  687,  209,   95,   96,   97,   98,   98,   98,
763        98,   99,  686,  109,  165,  100,  100,  100,  100,  100,
764
765       100,  100,  100,   80,  100,   80,   80,  100,  100,  100,
766        80,   80,  100,   80,  109,  109,  110,  100,  100,  100,
767       100,  100,  100,  100,  100,  100,  100,  100,  100,   80,
768       100,  100,  100,  100,  100,   80,   80,   80,   80,   80,
769        80,   80,  103,  120,  104,  135,  105,  106,  106,  106,
770       106,  107,  365,  131,  103,  130,  130,  102,  153,  130,
771       133,  131,  131,  372,  130,  130,  130,  109,  132,  158,
772       131,  131,  373,  104,  130,  130,  130,  108,  108,  108,
773       108,  108,  108,  108,  108,  108,  108,  108,  108,  131,
774       131,  174,  136,  173,  173,  130,  130,  130,  176,  366,
775
776       104,  121,  122,  122,  122,  121,  121,  121,  121,  121,
777       121,  121,  121,  121,  123,  121,  121,  138,  187,  188,
778       113,  121,  121,  121,  121,  131,  131,  130,  130,  130,
779       131,  131,  131,  131,  109,  130,  130,  130,  639,  130,
780       130,  130,  112,  114,  121,  125,  121,  131,  131,  131,
781       131,  131,  131,  140,   93,  130,  130,  130,  130,  130,
782       130,  130,  130,  161,  144,  233,  687,  141,  141,  141,
783       141,  145,  121,  121,  126,  109,  102,  127,  127,  127,
784       127,  128,   88,  208,  168,  209,  162,   80,   79,   79,
785        79,   79,  146,   80,   90,  147,  125,  174,  174,  148,
786
787       173,  173,  173,  129,  456,  145,  456,  130,  130,  131,
788       131,  131,  131,  131,  131,  131,  131,  131,  131,  665,
789       173,  199,  200,  142,  174,  174,  173,  173,  173,  175,
790       129,   93,   93,   94,  458,  180,  337,  140,   80,  533,
791       191,  160,  337,  149,   96,   97,  150,  150,  150,  150,
792       151,   93,   93,   93,  152,  152,  152,  152,  152,  152,
793       152,  152,  144,  152,  144,  144,  152,  152,  152,  144,
794       144,  152,  144,   93,   93,   93,  152,  152,  152,  152,
795       152,  152,  152,  152,  152,  152,  152,  152,  144,  152,
796       152,  152,  152,  152,  144,  144,  144,  144,  144,  144,
797
798       144,   80,  192,  655,  103,   80,  154,  142,  105,  155,
799       155,  155,  155,  156,  174,  174,  103,  145,  173,  173,
800       173,  174,  174,  174,  174,   80,   80,  173,  173,  173,
801       173,  173,  173,  261,  262,  154,  429,  145,  145,  157,
802       157,  157,  157,  157,  157,  157,  157,  157,  157,  157,
803       157,  174,  174,  260,  174,  174,  266,  267,  429,  173,
804       173,  173,  154,   80,  173,  173,  161,  201,  169,  174,
805       174,  170,  170,  170,  170,  171,  174,  174,  173,  173,
806       173,  173,  173,  173,   80,  349,   80,   80,  196,  162,
807       197,  178,  185,  297,  409,  198,  145,  172,  145,  145,
808
809       102,  173,  173,  174,  174,  174,  174,  174,  174,  174,
810       174,  174,  174,  109,   80,   80,  125,  140,   80,  187,
811       298,  661,  177,  263,  172,   80,  145,  145,  182,  430,
812       145,  141,  141,  141,  141,  187,  298,  145,  179,  185,
813        93,   93,   93,   93,  167,  411,  189,  189,  189,  189,
814       190,  431,  204,   80,  205,  687,  410,  276,  614,  206,
815       687,  300,  301,  181,  217,  217,  217,  217,  217,  217,
816       217,  217,  217,  217,  217,  217,  247,  247,  247,  247,
817       217,  217,  217,  217,   80,  303,  304,  142,  107,   80,
818       105,  194,  194,  194,  194,  107,  145,  264,  224,  266,
819
820       267,  145,  272,  272,  272,  272,  225,  412,   80,  217,
821       217,  217,  217,  217,  217,  217,  217,  107,  232,  506,
822       145,  195,  195,  195,  195,  195,  195,  195,  195,  195,
823       195,  195,  195,  247,  247,  247,  247,  247,  247,  247,
824       247,  507,  276,  351,  107,  211,  211,  211,  211,  211,
825       211,  211,  211,  211,  211,  211,  211,  213,  228,  140,
826       102,  230,  341,  251,  214,  277,  272,  272,  272,  272,
827        80,  252,   80,  141,  141,  141,  141,  256,  272,  272,
828       272,  272,  145,  352,  145,  342,  213,  303,  304,  652,
829       215,  215,  215,  215,  215,  215,  215,  215,  215,  215,
830
831       215,  215,  321,  272,  272,  272,  272,  342,  273,  544,
832       275,   80,  322,  213,  218,  277,  219,  628,   80,  322,
833       355,  220,  221,  145,  501,  222,  279,   80,  223,  142,
834       145,   80,  272,  272,  272,  272,  218,  274,  219,  145,
835       263,  300,  301,  145,  220,  221,  323,  323,  323,  323,
836       222,  272,  272,  272,  272,  223,  121,  122,  122,  122,
837       121,  121,  121,  121,  121,  121,  121,  121,  121,  121,
838       121,  121,   80,   80,   80,  460,  121,  121,  121,  121,
839       279,  660,   80,  293,  145,  145,  145,  140,  648,  281,
840       288,  288,  288,  288,  145,  214,   80,  102,  295,  121,
841
842       125,  121,  214,   80,  288,  288,  288,  288,  145,   80,
843       280,  288,  288,  288,  288,  145,  324,  324,  324,  324,
844       294,  145,  401,  402,  214,  263,  655,  121,  121,  121,
845       234,  234,  234,  235,  291,  121,  121,  121,  121,  121,
846       121,  687,  441,  121,  121,  292,  653,  377,  687,  121,
847       121,  214,  121,  185,  297,  442,  378,  142,  185,  297,
848       189,  189,  189,  189,  190,  305,  305,  305,  305,  386,
849       687,  427,  121,  125,  325,  325,  325,  325,  326,  326,
850       326,  326,  327,  327,  327,  327,  326,  326,  326,  326,
851       356,  356,  356,  356,  404,  188,  504,  687,  303,  304,
852
853       121,  121,  237,  237,  237,  237,  237,  237,  237,  237,
854       237,  237,  237,  237,   80,  238,  404,  188,  338,  239,
855       349,  504,   80,   80,   80,   80,  240,  428,  241,  652,
856       242,  242,  242,  242,  242,  242,  242,  242,  242,  242,
857       242,  242,  242,  242,  242,  242,  242,  242,  243,  649,
858       351,  125,  244,  244,  244,  244,  244,  244,  244,  244,
859       244,  244,  244,  244,   80,   80,   80,   80,   80,   80,
860        80,   80,   80,   80,   80,  239,   80,  130,  130,  130,
861       130,  130,  130,  130,  130,  130,  130,  130,  130,  246,
862       352,  326,  326,  326,  326,  369,  247,  247,  247,  247,
863
864       370,  371,  248,  645,  249,  249,  249,  249,  249,  249,
865       249,  249,  249,  249,  249,  249,  249,  249,  249,  249,
866       249,  249,  249,  339,  326,  326,  326,  326,  415,   80,
867       250,   93,   93,   93,  376,  316,  401,  402,   80,   80,
868        80,  145,  416,  144,   96,  645,  150,  150,  150,  150,
869       145,  145,  145,  330,  152,  152,  152,  152,  152,  152,
870       152,  152,  144,  152,  144,  144,  152,  152,  152,  144,
871       144,  152,  144,  347,  435,  365,  152,  152,  152,  152,
872       152,  152,  152,  152,  152,  152,  152,  152,  144,  152,
873       152,  152,  152,  152,  144,  144,  144,  144,  144,  144,
874
875       144,   80,  640,  214,  639,  125,  311,  311,  311,  311,
876       214,  246,  140,  145,  234,  234,  234,  235,  357,  357,
877       357,  357,  364,  447,  248,   80,  368,  368,  368,  368,
878       473,  474,  214,  379,  379,  379,  379,  145,  638,  268,
879       268,  268,  268,  268,  268,  268,  268,  268,  268,  268,
880       268,  269,  359,  404,  188,  687,  320,  125,  270,  214,
881        80,   80,  687,  687,  687,  687,   80,   80,  687,  364,
882       448,  102,  145,  145,  380,  380,  380,  380,  145,  145,
883       269,  638,  142,  102,  271,  271,  271,  271,  271,  271,
884       271,  271,  271,  271,  271,  271,  687,  407,  407,  407,
885
886       407,  502,  388,  418,  418,  418,  418,  269,  282,  282,
887       282,  282,  282,  282,  282,  282,  282,  282,  282,  282,
888        80,  238,  635,   80,  502,  283,  634,  457,  144,  144,
889       144,  144,  284,  525,  241,  145,  285,  285,  285,  285,
890       285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
891       285,  285,  285,  285,  286,  436,  436,  436,  287,  287,
892       287,  287,  287,  287,  287,  287,  287,  287,  287,  287,
893       144,  144,  144,  144,  144,  144,  144,  144,  144,  144,
894       144,  283,  144,  173,  173,  173,  173,  173,  173,  173,
895       173,  173,  173,  173,  173,   80,  246,  687,  437,  533,
896
897       144,  473,  474,  288,  288,  288,  288,  145,  534,  248,
898       687,  289,  289,  289,  289,  289,  289,  289,  289,  289,
899       289,  289,  289,  289,  289,  289,  289,  289,  289,  289,
900       404,  188,  632,  144,  144,  144,  144,  290,  144,  144,
901       144,  144,  144,  144,  144,  144,  144,  144,  144,  144,
902       144,  144,  144,  144,  144,  144,  144,  144,  215,  215,
903       215,  215,  215,  215,  215,  215,  215,  215,  215,  215,
904       328,  440,  440,  440,  440,   80,  447,  329,  631,  330,
905        80,   80,   80,  380,  380,  380,  380,  145,  380,  380,
906       380,  380,  145,  145,  145,  185,  476,  102,  626,  328,
907
908       477,  625,  498,  331,  331,  331,  331,  331,  331,  331,
909       331,  331,  331,  331,  331,  384,  498,  498,  624,  360,
910       385,  384,  385,  446,  473,  474,  328,  121,  234,  234,
911       234,  235,  361,  121,  121,  121,  121,  121,  121,  341,
912        80,  121,  121,   80,   80,  389,   80,  121,  121,   80,
913       121,   80,  145,  524,  397,  145,  145,   80,  145,  623,
914       445,  145,  387,  145,   80,  380,  380,  380,  380,  145,
915       121,  125,  393,  393,  393,  393,  145,  404,  188,   80,
916        88,   80,  473,  474,  387,  140,  620,  365,  441,  390,
917       451,  145,   90,  145,  687,  391,  398,   92,  121,  121,
918
919       246,  687,  185,  297,  523,  375,  523,  687,  392,  406,
920       406,  406,  406,  248,  392,  249,  249,  249,  249,  249,
921       249,  249,  249,  249,  249,  249,  249,  249,  249,  249,
922       249,  249,  249,  249,  396,  687,  478,  478,  478,  478,
923       619,  250,  244,  244,  244,  244,  244,  244,  244,  244,
924       244,  244,  244,  244,  360,  142,  473,  474,  204,  329,
925       205,  436,  436,  436,  102,  206,  329,  361,  330,  362,
926       362,  362,  362,  362,  362,  362,  362,  362,  362,  362,
927       362,  362,  362,  362,  362,  362,  362,  362,  329,  413,
928       612,  687,  329,  322,   80,  363,   80,  435,  687,  329,
929
930       322,  687,   80,  441,  437,  554,  145,   80,  145,  360,
931        80,   80,   80,   80,  452,  329,  442,   80,   80,  555,
932       687,  329,  687,  263,  453,  263,   97,  583,  512,  145,
933       145,   99,  417,  413,  271,  271,  271,  271,  271,  271,
934       271,  271,  271,  271,  271,  271,  381,  687,  329,   80,
935       687,  414,   80,  382,   80,  330,   80,  459,  459,  459,
936       459,  145,   80,  441,  145,  493,  145,  144,  145,  102,
937       144,  144,  144,  144,  145,  381,  442,  463,  494,  383,
938       383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
939       383,  140,  523,  375,  523,  414,  498,   80,  466,  464,
940
941       461,   80,  381,   80,  246,  450,  450,  450,  450,  145,
942       498,  498,  102,  145,  102,  145,  102,  248,  599,  289,
943       289,  289,  289,  289,  289,  289,  289,  289,  289,  289,
944       289,  289,  289,  289,  289,  289,  289,  289,  102,  582,
945       102,  465,  611,  467,  102,  290,  287,  287,  287,  287,
946       287,  287,  287,  287,  287,  287,  287,  287,  360,  607,
947        80,  142,  446,  590,  560,  606,  561,  627,  102,  642,
948       533,  361,  145,  394,  394,  394,  394,  394,  394,  394,
949       394,  394,  394,  394,  394,  394,  394,  394,  394,  394,
950       394,  394,  513,  513,  513,  666,  600,  210,  210,  395,
951
952       331,  331,  331,  331,  331,  331,  331,  331,  331,  331,
953       331,  331,  383,  383,  383,  383,  383,  383,  383,  383,
954       383,  383,  383,  383,  427,   80,  491,   80,  503,   80,
955       140,  447,  140,   80,  598,  514,   80,  145,  492,  145,
956        80,  145,  518,  470,  109,  145,  427,   80,  145,   80,
957       608,   80,  145,  109,  597,   80,  528,  504,   80,  145,
958       527,  145,   80,  145,  516,   80,  505,  145,  687,  596,
959       145,  668,  608,  140,  145,  493,  140,  145,  469,  263,
960       462,  687,  504,  527,  532,  185,  297,  567,  687,  529,
961       608,  530,  537,  537,  537,  537,  513,  513,  513,   80,
962
963       519,  541,  142,  493,  140,  531,  140,  670,  212,  212,
964       592,  145,  608,  216,  216,  586,  494,  605,  495,  495,
965       495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
966       495,  495,  495,  495,  495,  495,  495,   80,  493,  514,
967        80,  142,  592,  142,  245,  245,  142,  591,  102,  145,
968       573,  494,  145,  526,  526,  526,  526,  526,  526,  526,
969       526,  526,  526,  526,  526,  526,  526,  526,  526,  526,
970       526,  526,  140,   80,  142,  588,  142,  255,  177,   80,
971        80,   80,   80,  589,   80,  145,  557,  557,  557,  557,
972        80,  145,  145,  145,  145,  140,  145,  590,  185,  476,
973
974       613,  609,  145,   80,  562,  537,  537,  537,  537,  557,
975       557,  557,  557,  584,   80,  145,   80,  615,   80,  566,
976       375,  616,  564,  610,  608,  608,  145,  140,  145,  636,
977       145,  565,  102,  621,  140,  563,  565,  647,  618,  608,
978       584,  375,  142,  617,  608,  633,  608,  608,  630,  140,
979       650,  648,  608,  637,  102,  622,  140,  102,  604,  670,
980       646,  608,  354,  354,  540,  519,  608,  659,  375,  630,
981       630,  585,  593,  593,  608,  593,  593,  593,  593,  593,
982       641,  593,  593,  593,  593,  608,  593,  593,  608,  587,
983       643,  630,  593,  593,  593,  593,  630,  142,  581,  102,
984
985       580,  670,  595,  656,  142,  650,  579,  608,  375,  662,
986       608,  375,  644,  555,  375,  593,  593,  593,  630,  142,
987       578,  140,  140,  578,  595,  577,  142,  576,  575,  255,
988       574,  547,  664,  667,  375,  375,  630,  663,  547,  630,
989       573,  657,  630,  593,  593,  593,  593,  641,  593,  593,
990       593,  593,  593,  594,  593,  593,  593,  593,  630,  593,
991       593,  630,  630,  630,  630,  602,  593,  593,  593,  572,
992       658,  685,  670,  571,  570,  603,  670,  569,  541,  536,
993       568,  375,  663,  671,  630,  630,  559,  672,  593,  593,
994       593,  142,  142,  558,  670,  670,  670,  603,  670,  670,
995
996       257,  670,  670,  670,  670,  673,  674,  675,  446,  676,
997       677,  516,  678,  679,  680,  681,  593,  593,  593,  593,
998       556,  593,  593,  593,  593,  593,  553,  593,  593,  593,
999       593,  552,  593,  593,  670,  551,  550,  549,  593,  593,
1000       593,  593,  255,  548,  547,  682,  255,  670,  595,  670,
1001       134,  545,  543,  542,  541,  540,  539,  490,  683,  490,
1002       684,  593,  593,  593,  255,  255,  255,  488,  255,  255,
1003       595,  255,  255,  255,  255,  488,  486,  486,  484,  484,
1004       482,  482,  480,  480,  536,  521,  520,  208,  201,  593,
1005       593,  593,  593,  364,  593,  593,  593,  593,  593,  594,
1006
1007       593,  593,  593,  593,  255,  593,  593,  517,  446,  516,
1008       439,  602,  593,  593,  593,  109,  511,  255,  510,  255,
1009       509,  603,  508,  427,  109,  501,  500,  499,  497,  496,
1010       416,  490,  488,  486,  593,  593,  593,  484,  482,  480,
1011       417,  297,  471,  603,  260,  375,  455,  454,   84,  202,
1012       449,  446,  364,  355,  439,  434,  433,  432,  202,  426,
1013       425,  424,  593,  593,   80,  423,  422,  421,   80,   80,
1014       420,  419,   80,   80,   80,   80,   80,   80,   80,   80,
1015        81,   81,   81,   81,   81,  330,   81,   81,   81,   81,
1016        81,   81,   81,   81,   81,   81,   81,   81,   81,   87,
1017
1018        87,  417,  330,  208,   87,   87,   87,  101,  101,  101,
1019       101,  101,  101,  101,  101,  101,  101,  101,  101,  101,
1020       101,  101,  101,  101,  101,  101,  124,  124,  124,  124,
1021       124,  124,  124,  124,  124,  124,  124,  124,  124,  124,
1022       124,  124,  124,  124,  124,  139,  139,  139,  139,  139,
1023       139,  139,  139,  139,  139,  139,  139,  139,  139,  139,
1024       139,  139,  139,  139,  144,  208,  202,  201,  144,  144,
1025       144,  201,  144,  144,  144,  144,  144,  144,  144,  144,
1026       184,  184,  184,  184,  184,  201,  184,  184,  184,  184,
1027       184,  184,  184,  184,  184,  184,  184,  184,  184,  186,
1028
1029       186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
1030       186,  186,  186,  186,  186,  186,  186,  186,  203,  203,
1031       309,  309,  307,  307,  399,  355,  260,  260,  203,  259,
1032       375,  203,  203,  259,  203,  121,  121,  121,  121,  121,
1033       121,  121,  121,  121,  121,  121,  121,  121,  121,  121,
1034       121,  121,  121,  121,  236,  236,  236,  236,  236,  236,
1035       236,  236,  236,  236,  236,  236,  236,  236,  236,  236,
1036       236,  236,  236,  140,  140,  140,  140,  140,  140,  140,
1037       140,  140,  140,  140,  140,  140,  140,  140,  140,  140,
1038       140,  140,  258,  258,  258,  258,  258,  258,  258,  258,
1039
1040       258,  258,  258,  258,  258,  258,  258,  258,  258,  258,
1041       258,  265,  265,  265,  265,  265,  265,  265,  265,  265,
1042       265,  265,  265,  265,  265,  265,  265,  265,  265,  265,
1043       184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
1044       184,  184,  184,  184,  184,  184,  184,  184,  184,  186,
1045       186,  186,  186,  186,  186,  186,  186,  186,  186,  186,
1046       186,  186,  186,  186,  186,  186,  186,  186,  299,  299,
1047       299,  299,  299,  299,  299,  299,  299,  299,  299,  299,
1048       299,  299,  299,  299,  299,  299,  299,  302,  302,  302,
1049       302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
1050
1051       302,  302,  302,  302,  302,  302,  306,  306,  347,  306,
1052       306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
1053       306,  306,  306,  306,  306,  308,  308,  367,  308,  308,
1054       308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
1055       308,  308,  308,  308,  310,  339,  310,  338,  364,  246,
1056       310,  310,  310,  355,  355,  310,  348,  348,  348,  348,
1057       348,  348,  348,  348,  348,  348,  348,  348,  348,  348,
1058       348,  348,  348,  348,  348,  121,  121,  121,  121,  121,
1059       121,  121,  121,  121,  121,  121,  121,  121,  121,  121,
1060       121,  121,  121,  121,  350,  350,  350,  350,  350,  350,
1061
1062       350,  350,  350,  350,  350,  350,  350,  350,  350,  350,
1063       350,  350,  350,  236,  236,  236,  236,  236,  236,  236,
1064       236,  236,  236,  236,  236,  236,  236,  236,  236,  236,
1065       236,  236,  353,  353,  353,  358,  238,  346,  345,  358,
1066       344,  358,  358,  358,  358,  343,  358,  258,  258,  258,
1067       258,  258,  258,  258,  258,  258,  258,  258,  258,  258,
1068       258,  258,  258,  258,  258,  258,  374,  374,  374,  374,
1069       374,  374,  374,  374,  374,  374,  374,  374,  374,  374,
1070       374,  374,  374,  374,  374,  265,  265,  265,  265,  265,
1071       265,  265,  265,  265,  265,  265,  265,  265,  265,  265,
1072
1073       265,  265,  265,  265,  101,  101,  101,  101,  101,  101,
1074       101,  101,  101,  101,  101,  101,  101,  101,  101,  101,
1075       101,  101,  101,  302,  302,  302,  302,  302,  302,  302,
1076       302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
1077       302,  302,  299,  299,  299,  299,  299,  299,  299,  299,
1078       299,  299,  299,  299,  299,  299,  299,  299,  299,  299,
1079       299,  400,  400,  400,  400,  400,  400,  400,  400,  400,
1080       400,  400,  400,  400,  400,  400,  400,  400,  400,  400,
1081       403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
1082       403,  403,  403,  403,  403,  403,  403,  403,  403,  405,
1083
1084       405,  405,  405,  405,  405,  405,  405,  405,  405,  405,
1085       405,  405,  405,  405,  405,  405,  405,  405,  184,  184,
1086       184,  184,  184,  184,  184,  184,  184,  184,  184,  184,
1087       184,  184,  184,  184,  184,  184,  184,  306,  306,  340,
1088       306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
1089       306,  306,  306,  306,  306,  306,  308,  308,  336,  308,
1090       308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
1091       308,  308,  308,  308,  308,  408,  335,  408,  408,  334,
1092       333,  408,  408,  408,  332,  320,  408,  348,  348,  348,
1093       348,  348,  348,  348,  348,  348,  348,  348,  348,  348,
1094
1095       348,  348,  348,  348,  348,  348,  350,  350,  350,  350,
1096       350,  350,  350,  350,  350,  350,  350,  350,  350,  350,
1097       350,  350,  350,  350,  350,  121,  121,  121,  121,  121,
1098       121,  121,  121,  121,  121,  121,  121,  121,  121,  121,
1099       121,  121,  121,  121,  438,  438,  438,  438,  438,  438,
1100       438,  438,  438,  438,  438,  438,  438,  438,  438,  438,
1101       438,  438,  438,  443,  443,  320,  319,  443,  443,  318,
1102       443,  443,  443,  443,  443,  443,  443,  443,  443,  444,
1103       317,  316,  316,  315,  314,  444,  444,  444,  444,  313,
1104       444,  374,  374,  374,  374,  374,  374,  374,  374,  374,
1105
1106       374,  374,  374,  374,  374,  374,  374,  374,  374,  374,
1107       101,  101,  101,  101,  101,  101,  101,  101,  101,  101,
1108       101,  101,  101,  101,  101,  101,  101,  101,  101,  468,
1109       468,  312,  309,  468,  468,  468,  468,  468,  468,  468,
1110       468,  468,  468,  468,  468,  401,  401,  401,  401,  401,
1111       401,  401,  401,  401,  401,  401,  401,  401,  401,  401,
1112       401,  401,  401,  401,  472,  472,  472,  472,  472,  472,
1113       472,  472,  472,  472,  472,  472,  472,  472,  472,  472,
1114       472,  472,  472,  475,  475,  475,  475,  475,  475,  475,
1115       475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
1116
1117       475,  475,  479,  479,  307,  479,  479,  479,  479,  479,
1118       479,  479,  479,  479,  479,  479,  479,  479,  479,  479,
1119       479,  481,  481,  296,  481,  481,  481,  481,  481,  481,
1120       481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
1121       483,  483,  260,  483,  483,  483,  483,  483,  483,  483,
1122       483,  483,  483,  483,  483,  483,  483,  483,  483,  485,
1123       485,  278,  485,  485,  485,  485,  485,  485,  485,  485,
1124       485,  485,  485,  485,  485,  485,  485,  485,  487,  487,
1125       260,  487,  487,  487,  487,  487,  487,  487,  487,  487,
1126       487,  487,  487,  487,  487,  487,  487,  489,  489,  260,
1127
1128       489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
1129       489,  489,  489,  489,  489,  489,  348,  348,  348,  348,
1130       348,  348,  348,  348,  348,  348,  348,  348,  348,  348,
1131       348,  348,  348,  348,  348,  121,  121,  121,  121,  121,
1132       121,  121,  121,  121,  121,  121,  121,  121,  121,  121,
1133       121,  121,  121,  121,  438,  438,  438,  438,  438,  438,
1134       438,  438,  438,  438,  438,  438,  438,  438,  438,  438,
1135       438,  438,  438,  515,  259,  257,  255,  254,  230,  515,
1136       515,  515,  515,  515,  515,  515,  515,  515,  522,  522,
1137       522,  522,  522,  522,  522,  522,  522,  522,  522,  522,
1138
1139       522,  522,  522,  522,  522,  522,  522,  535,  535,  535,
1140       535,  202,  535,  535,  535,  535,  535,  535,  535,  535,
1141       535,  535,  535,  535,  535,  535,  538,  253,  228,  125,
1142       231,  202,  538,  538,  538,  538,  546,  546,  229,  546,
1143       546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
1144       546,  546,  546,  546,  546,  594,  594,  227,  594,  594,
1145       594,  594,  594,  594,  594,  594,  594,  594,  594,  594,
1146       594,  594,  594,  594,  601,  601,  227,  601,  601,  601,
1147       601,  601,  601,  601,  601,  601,  601,  601,  601,  601,
1148       601,  601,  601,  593,  593,  226,  593,  593,  593,  593,
1149
1150       593,  593,  593,  593,  593,  593,  593,  593,  593,  593,
1151       593,  593,  629,  629,  629,  629,  629,  629,  629,  629,
1152       629,  629,  629,  629,  629,  629,  629,  629,  629,  629,
1153       629,  651,  651,  651,  651,  651,  651,  651,  651,  651,
1154       651,  651,  651,  651,  651,  651,  651,  651,  651,  651,
1155       654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
1156       654,  654,  654,  654,  654,  654,  654,  654,  654,  669,
1157       669,  669,  669,  669,  669,  669,  669,  669,  669,  669,
1158       669,  669,  669,  669,  669,  669,  669,  669,  102,  208,
1159       207,  201,  202,  201,  193,  185,  183,  167,  166,  163,
1160
1161       160,  159,  143,  119,  137,  134,  119,  118,  115,  112,
1162       111,  102,   84,  687,    3,  687,  687,  687,  687,  687,
1163       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
1164       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
1165       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
1166       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
1167       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
1168       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
1169       687,  687,  687,  687,  687,  687,  687,  687
1170     } ;
1171
1172 static yyconst flex_int16_t yy_chk[3889] =
1173     {   0,
1174         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1175         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1176         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1177         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1178         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1179         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1180         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
1181         1,    1,    1,    2,    2,    2,    2,    2,    2,    2,
1182         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
1183         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
1184
1185         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
1186         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
1187         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
1188         2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
1189         2,    2,    2,    2,    2,    2,    5,    6,    6,    6,
1190         6,    8,   10,   10,   11,   19,   21,   45,    8,    8,
1191         8,    8,   16,  151,   11,   13,   11,   11,    5,   45,
1192        56,   11,   12,   12,   12,   13,  151,   13,   19,   12,
1193        21,   97,   13,   97,   12,   12,   12,   12,   12,   12,
1194        12,   12,  685,   24,   56,   12,   12,   12,   12,   12,
1195
1196        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
1197        12,   12,   12,   12,   27,   51,   16,   12,   12,   12,
1198        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
1199        12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
1200        12,   12,   15,   24,   15,   39,   15,   15,   15,   15,
1201        15,   15,  250,   28,   15,   28,   28,   49,   49,   27,
1202        28,   30,   30,  259,   30,   30,   30,   42,   27,   51,
1203        31,   31,  259,   15,   31,   31,   31,   15,   15,   15,
1204        15,   15,   15,   15,   15,   15,   15,   15,   15,   33,
1205        33,   62,   39,   62,   62,   33,   33,   33,   62,  250,
1206
1207        15,   25,   25,   25,   25,   25,   25,   25,   25,   25,
1208        25,   25,   25,   25,   25,   25,   25,   42,   82,   82,
1209        32,   25,   25,   25,   25,   29,   29,   29,   29,   29,
1210        32,   32,   34,   34,   59,   32,   32,   32,  665,   34,
1211        34,   34,   29,   32,   25,   25,   25,   35,   35,   36,
1212        36,   37,   37,   43,   48,   35,   35,   35,   36,   36,
1213        36,   37,   37,   54,   48,  123,   48,   43,   43,   43,
1214        43,   48,   25,   25,   26,   61,  378,   26,   26,   26,
1215        26,   26,   46,  318,   59,  318,   54,   46,   79,   79,
1216        79,   79,   46,   74,   46,   46,  123,   64,   64,   46,
1217
1218        64,   64,   64,   26,  375,   74,  375,   26,   26,   26,
1219        26,   26,   26,   26,   26,   26,   26,   26,   26,  661,
1220        61,   89,   89,   43,   63,   63,   63,   63,   63,   61,
1221        26,   47,   47,   47,  378,   74,  223,  139,   47,  660,
1222        84,   63,  223,   47,   47,   47,   47,   47,   47,   47,
1223        47,   93,   93,   93,   47,   47,   47,   47,   47,   47,
1224        47,   47,   47,   47,   47,   47,   47,   47,   47,   47,
1225        47,   47,   47,   96,   96,   96,   47,   47,   47,   47,
1226        47,   47,   47,   47,   47,   47,   47,   47,   47,   47,
1227        47,   47,   47,   47,   47,   47,   47,   47,   47,   47,
1228
1229        47,   50,   84,  654,   50,  144,   50,  139,   50,   50,
1230        50,   50,   50,   50,   65,   65,   50,  144,   65,   65,
1231        65,   67,   67,   68,   68,  146,  152,   67,   67,   67,
1232        68,   68,   68,  146,  146,   50,  341,  146,  152,   50,
1233        50,   50,   50,   50,   50,   50,   50,   50,   50,   50,
1234        50,   69,   69,  148,   71,   71,  153,  153,  341,   69,
1235        69,   69,   50,   60,   71,   71,   66,  148,   60,   70,
1236        70,   60,   60,   60,   60,   60,   66,   66,   70,   70,
1237        70,   66,   66,   66,   72,  233,   73,   75,   88,   66,
1238        88,   73,  184,  184,  316,   88,   72,   60,   73,   75,
1239
1240       600,   60,   60,   60,   60,   60,   60,   60,   60,   60,
1241        60,   60,   60,   76,  263,  147,  233,   77,   76,  185,
1242       185,  653,   72,  147,   60,  161,  263,  147,   77,  342,
1243        76,   77,   77,   77,   77,  186,  186,  161,   73,   83,
1244        94,   94,   94,   98,   75,  320,   83,   83,   83,   83,
1245        83,  342,   94,   98,   94,   98,  316,  161,  600,   94,
1246        98,  187,  187,   76,  108,  108,  108,  108,  110,  110,
1247       110,  110,  111,  111,  111,  111,  131,  131,  131,  131,
1248       120,  120,  120,  120,  162,  188,  188,   77,   87,  149,
1249        87,   87,   87,   87,   87,   87,  162,  149,  110,  265,
1250
1251       265,  149,  157,  157,  157,  157,  111,  320,  177,  115,
1252       115,  115,  115,  118,  118,  118,  118,   87,  120,  429,
1253       177,   87,   87,   87,   87,   87,   87,   87,   87,   87,
1254        87,   87,   87,  132,  132,  132,  132,  133,  133,  133,
1255       133,  429,  162,  235,   87,  104,  104,  104,  104,  104,
1256       104,  104,  104,  104,  104,  104,  104,  106,  115,  141,
1257       614,  118,  227,  132,  106,  177,  163,  163,  163,  163,
1258       180,  133,  160,  141,  141,  141,  141,  141,  158,  158,
1259       158,  158,  180,  235,  160,  227,  106,  298,  298,  651,
1260       106,  106,  106,  106,  106,  106,  106,  106,  106,  106,
1261
1262       106,  106,  209,  159,  159,  159,  159,  227,  158,  499,
1263       160,  165,  209,  106,  109,  163,  109,  614,  285,  209,
1264       285,  109,  109,  165,  499,  109,  180,  384,  109,  141,
1265       285,  178,  166,  166,  166,  166,  109,  159,  109,  384,
1266       165,  299,  299,  178,  109,  109,  210,  210,  210,  210,
1267       109,  168,  168,  168,  168,  109,  122,  122,  122,  122,
1268       122,  122,  122,  122,  122,  122,  122,  122,  122,  122,
1269       122,  122,  167,  179,  181,  384,  122,  122,  122,  122,
1270       166,  649,  174,  178,  167,  179,  181,  182,  647,  168,
1271       174,  174,  174,  174,  174,  194,  175,  267,  182,  122,
1272
1273       122,  122,  194,  176,  175,  175,  175,  175,  175,  275,
1274       167,  176,  176,  176,  176,  176,  211,  211,  211,  211,
1275       181,  275,  300,  300,  194,  179,  641,  122,  122,  124,
1276       124,  124,  124,  124,  175,  124,  124,  124,  124,  124,
1277       124,  214,  440,  124,  124,  176,  640,  267,  214,  124,
1278       124,  194,  124,  189,  189,  440,  267,  182,  190,  190,
1279       189,  189,  189,  189,  189,  190,  190,  190,  190,  275,
1280       214,  340,  124,  124,  212,  212,  212,  212,  215,  215,
1281       215,  215,  216,  216,  216,  216,  224,  224,  224,  224,
1282       244,  244,  244,  244,  301,  301,  575,  214,  302,  302,
1283
1284       124,  124,  126,  126,  126,  126,  126,  126,  126,  126,
1285       126,  126,  126,  126,  127,  127,  303,  303,  224,  127,
1286       348,  575,  127,  127,  127,  127,  127,  340,  127,  639,
1287       127,  127,  127,  127,  127,  127,  127,  127,  127,  127,
1288       127,  127,  127,  127,  127,  127,  127,  127,  127,  635,
1289       350,  348,  127,  127,  127,  127,  127,  127,  127,  127,
1290       127,  127,  127,  127,  127,  127,  127,  127,  127,  127,
1291       127,  127,  127,  127,  127,  127,  127,  129,  129,  129,
1292       129,  129,  129,  129,  129,  129,  129,  129,  129,  130,
1293       350,  225,  225,  225,  225,  257,  130,  130,  130,  130,
1294
1295       257,  257,  130,  632,  130,  130,  130,  130,  130,  130,
1296       130,  130,  130,  130,  130,  130,  130,  130,  130,  130,
1297       130,  130,  130,  225,  232,  232,  232,  232,  322,  261,
1298       130,  150,  150,  150,  261,  262,  400,  400,  150,  379,
1299       262,  261,  322,  150,  150,  631,  150,  150,  150,  150,
1300       150,  379,  262,  379,  150,  150,  150,  150,  150,  150,
1301       150,  150,  150,  150,  150,  150,  150,  150,  150,  150,
1302       150,  150,  150,  232,  349,  359,  150,  150,  150,  150,
1303       150,  150,  150,  150,  150,  150,  150,  150,  150,  150,
1304       150,  150,  150,  150,  150,  150,  150,  150,  150,  150,
1305
1306       150,  154,  626,  195,  625,  349,  195,  195,  195,  195,
1307       195,  245,  256,  154,  234,  234,  234,  234,  245,  245,
1308       245,  245,  359,  363,  245,  268,  256,  256,  256,  256,
1309       402,  402,  195,  268,  268,  268,  268,  268,  624,  154,
1310       154,  154,  154,  154,  154,  154,  154,  154,  154,  154,
1311       154,  155,  245,  403,  403,  246,  264,  234,  155,  195,
1312       277,  264,  246,  246,  246,  246,  271,  289,  246,  289,
1313       363,  458,  277,  264,  271,  271,  271,  271,  271,  289,
1314       155,  623,  256,  377,  155,  155,  155,  155,  155,  155,
1315       155,  155,  155,  155,  155,  155,  246,  310,  310,  310,
1316
1317       310,  426,  277,  331,  331,  331,  331,  155,  169,  169,
1318       169,  169,  169,  169,  169,  169,  169,  169,  169,  169,
1319       170,  170,  620,  388,  426,  170,  619,  377,  170,  170,
1320       170,  170,  170,  458,  170,  388,  170,  170,  170,  170,
1321       170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
1322       170,  170,  170,  170,  170,  351,  351,  351,  170,  170,
1323       170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
1324       170,  170,  170,  170,  170,  170,  170,  170,  170,  170,
1325       170,  170,  170,  172,  172,  172,  172,  172,  172,  172,
1326       172,  172,  172,  172,  172,  173,  173,  441,  351,  471,
1327
1328       173,  404,  404,  173,  173,  173,  173,  173,  471,  173,
1329       441,  173,  173,  173,  173,  173,  173,  173,  173,  173,
1330       173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
1331       405,  405,  617,  173,  173,  173,  173,  173,  173,  173,
1332       173,  173,  173,  173,  173,  173,  173,  173,  173,  173,
1333       173,  173,  173,  173,  173,  173,  173,  173,  213,  213,
1334       213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
1335       217,  354,  354,  354,  354,  273,  445,  217,  616,  217,
1336       274,  291,  292,  273,  273,  273,  273,  273,  274,  274,
1337       274,  274,  274,  291,  292,  406,  406,  457,  612,  217,
1338
1339       406,  611,  421,  217,  217,  217,  217,  217,  217,  217,
1340       217,  217,  217,  217,  217,  273,  421,  421,  610,  357,
1341       274,  291,  292,  445,  472,  472,  217,  236,  236,  236,
1342       236,  236,  357,  236,  236,  236,  236,  236,  236,  276,
1343       278,  236,  236,  279,  276,  278,  280,  236,  236,  293,
1344       236,  294,  278,  457,  293,  279,  276,  281,  280,  609,
1345       357,  293,  276,  294,  287,  281,  281,  281,  281,  281,
1346       236,  236,  287,  287,  287,  287,  287,  474,  474,  396,
1347       370,  290,  475,  475,  276,  295,  607,  290,  442,  279,
1348       370,  396,  370,  290,  360,  280,  295,  370,  236,  236,
1349
1350       237,  442,  305,  305,  456,  456,  456,  360,  294,  305,
1351       305,  305,  305,  237,  281,  237,  237,  237,  237,  237,
1352       237,  237,  237,  237,  237,  237,  237,  237,  237,  237,
1353       237,  237,  237,  237,  290,  360,  408,  408,  408,  408,
1354       606,  237,  239,  239,  239,  239,  239,  239,  239,  239,
1355       239,  239,  239,  239,  247,  295,  536,  536,  452,  311,
1356       452,  436,  436,  436,  561,  452,  311,  247,  311,  247,
1357       247,  247,  247,  247,  247,  247,  247,  247,  247,  247,
1358       247,  247,  247,  247,  247,  247,  247,  247,  311,  321,
1359       598,  329,  325,  321,  389,  247,  269,  435,  329,  325,
1360
1361       321,  325,  356,  356,  436,  510,  389,  356,  269,  361,
1362       356,  356,  356,  356,  371,  311,  356,  376,  380,  510,
1363       329,  325,  361,  389,  371,  376,  371,  561,  435,  376,
1364       380,  371,  380,  570,  269,  269,  269,  269,  269,  269,
1365       269,  269,  269,  269,  269,  269,  272,  329,  325,  383,
1366       361,  321,  385,  272,  387,  272,  391,  383,  383,  383,
1367       383,  383,  393,  393,  385,  478,  387,  393,  391,  582,
1368       393,  393,  393,  393,  393,  272,  393,  387,  478,  272,
1369       272,  272,  272,  272,  272,  272,  272,  272,  272,  272,
1370       272,  368,  523,  523,  523,  570,  498,  390,  391,  387,
1371
1372       385,  392,  272,  282,  282,  368,  368,  368,  368,  390,
1373       498,  498,  613,  392,  525,  282,  524,  282,  582,  282,
1374       282,  282,  282,  282,  282,  282,  282,  282,  282,  282,
1375       282,  282,  282,  282,  282,  282,  282,  282,  560,  560,
1376       662,  390,  597,  392,  583,  282,  283,  283,  283,  283,
1377       283,  283,  283,  283,  283,  283,  283,  283,  288,  591,
1378       394,  368,  394,  589,  524,  588,  525,  613,  628,  628,
1379       587,  288,  394,  288,  288,  288,  288,  288,  288,  288,
1380       288,  288,  288,  288,  288,  288,  288,  288,  288,  288,
1381       288,  288,  439,  439,  439,  662,  583,  698,  698,  288,
1382
1383       328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
1384       328,  328,  381,  381,  381,  381,  381,  381,  381,  381,
1385       381,  381,  381,  381,  386,  395,  416,  397,  427,  386,
1386       450,  395,  398,  461,  581,  439,  463,  395,  416,  397,
1387       465,  386,  450,  398,  460,  461,  462,  464,  463,  460,
1388       592,  462,  465,  467,  580,  466,  463,  427,  467,  464,
1389       461,  460,  468,  462,  468,  469,  427,  466,  493,  579,
1390       467,  667,  592,  470,  468,  494,  532,  469,  395,  397,
1391       386,  493,  427,  461,  470,  477,  477,  532,  494,  464,
1392       593,  465,  477,  477,  477,  477,  513,  513,  513,  526,
1393
1394       450,  526,  398,  418,  567,  466,  586,  668,  699,  699,
1395       577,  526,  593,  700,  700,  567,  418,  586,  418,  418,
1396       418,  418,  418,  418,  418,  418,  418,  418,  418,  418,
1397       418,  418,  418,  418,  418,  418,  418,  459,  459,  513,
1398       527,  667,  576,  470,  703,  703,  532,  574,  599,  459,
1399       572,  459,  527,  459,  459,  459,  459,  459,  459,  459,
1400       459,  459,  459,  459,  459,  459,  459,  459,  459,  459,
1401       459,  459,  518,  528,  567,  571,  586,  668,  527,  529,
1402       530,  531,  562,  573,  563,  528,  518,  518,  518,  518,
1403       564,  529,  530,  531,  562,  557,  563,  573,  537,  537,
1404
1405       599,  595,  564,  565,  528,  537,  537,  537,  537,  557,
1406       557,  557,  557,  562,  566,  565,  585,  602,  604,  531,
1407       615,  603,  530,  595,  621,  622,  566,  605,  585,  621,
1408       604,  564,  627,  608,  618,  529,  530,  634,  605,  608,
1409       563,  629,  518,  603,  602,  618,  621,  622,  615,  633,
1410       636,  634,  636,  622,  642,  608,  646,  656,  585,  669,
1411       633,  608,  719,  719,  569,  557,  602,  646,  630,  629,
1412       615,  566,  578,  578,  636,  578,  578,  578,  578,  578,
1413       627,  578,  578,  578,  578,  637,  578,  578,  650,  568,
1414       630,  629,  578,  578,  578,  578,  630,  605,  559,  666,
1415
1416       558,  684,  578,  642,  618,  637,  556,  637,  643,  656,
1417       650,  657,  630,  554,  644,  578,  578,  578,  630,  633,
1418       553,  659,  664,  552,  578,  551,  646,  550,  549,  669,
1419       548,  547,  659,  664,  658,  663,  643,  657,  546,  657,
1420       545,  643,  644,  578,  578,  584,  584,  666,  584,  584,
1421       584,  584,  584,  584,  584,  584,  584,  584,  643,  584,
1422       584,  657,  658,  663,  644,  584,  584,  584,  584,  543,
1423       644,  684,  670,  542,  540,  584,  671,  539,  538,  535,
1424       534,  522,  658,  670,  658,  663,  521,  671,  584,  584,
1425       584,  659,  664,  520,  672,  673,  674,  584,  675,  676,
1426
1427       519,  677,  678,  679,  680,  672,  673,  674,  517,  675,
1428       676,  515,  677,  678,  679,  680,  584,  584,  594,  594,
1429       511,  594,  594,  594,  594,  594,  509,  594,  594,  594,
1430       594,  508,  594,  594,  681,  507,  506,  505,  594,  594,
1431       594,  594,  670,  504,  503,  681,  671,  682,  594,  683,
1432       502,  500,  497,  496,  495,  492,  491,  490,  682,  489,
1433       683,  594,  594,  594,  672,  673,  674,  488,  675,  676,
1434       594,  677,  678,  679,  680,  487,  486,  485,  484,  483,
1435       482,  481,  480,  479,  473,  455,  454,  453,  451,  594,
1436       594,  601,  601,  449,  601,  601,  601,  601,  601,  601,
1437
1438       601,  601,  601,  601,  681,  601,  601,  447,  444,  443,
1439       438,  601,  601,  601,  601,  434,  433,  682,  432,  683,
1440       431,  601,  430,  428,  425,  424,  423,  422,  420,  419,
1441       415,  414,  413,  412,  601,  601,  601,  411,  410,  409,
1442       407,  401,  399,  601,  382,  374,  373,  372,  369,  367,
1443       365,  362,  358,  353,  352,  347,  346,  345,  344,  339,
1444       338,  337,  601,  601,  688,  336,  335,  334,  688,  688,
1445       333,  332,  688,  688,  688,  688,  688,  688,  688,  688,
1446       689,  689,  689,  689,  689,  327,  689,  689,  689,  689,
1447       689,  689,  689,  689,  689,  689,  689,  689,  689,  690,
1448
1449       690,  326,  324,  319,  690,  690,  690,  691,  691,  691,
1450       691,  691,  691,  691,  691,  691,  691,  691,  691,  691,
1451       691,  691,  691,  691,  691,  691,  692,  692,  692,  692,
1452       692,  692,  692,  692,  692,  692,  692,  692,  692,  692,
1453       692,  692,  692,  692,  692,  693,  693,  693,  693,  693,
1454       693,  693,  693,  693,  693,  693,  693,  693,  693,  693,
1455       693,  693,  693,  693,  694,  317,  315,  314,  694,  694,
1456       694,  313,  694,  694,  694,  694,  694,  694,  694,  694,
1457       695,  695,  695,  695,  695,  312,  695,  695,  695,  695,
1458       695,  695,  695,  695,  695,  695,  695,  695,  695,  696,
1459
1460       696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
1461       696,  696,  696,  696,  696,  696,  696,  696,  697,  697,
1462       309,  308,  307,  306,  296,  286,  284,  270,  697,  266,
1463       260,  697,  697,  258,  697,  701,  701,  701,  701,  701,
1464       701,  701,  701,  701,  701,  701,  701,  701,  701,  701,
1465       701,  701,  701,  701,  702,  702,  702,  702,  702,  702,
1466       702,  702,  702,  702,  702,  702,  702,  702,  702,  702,
1467       702,  702,  702,  704,  704,  704,  704,  704,  704,  704,
1468       704,  704,  704,  704,  704,  704,  704,  704,  704,  704,
1469       704,  704,  705,  705,  705,  705,  705,  705,  705,  705,
1470
1471       705,  705,  705,  705,  705,  705,  705,  705,  705,  705,
1472       705,  706,  706,  706,  706,  706,  706,  706,  706,  706,
1473       706,  706,  706,  706,  706,  706,  706,  706,  706,  706,
1474       707,  707,  707,  707,  707,  707,  707,  707,  707,  707,
1475       707,  707,  707,  707,  707,  707,  707,  707,  707,  708,
1476       708,  708,  708,  708,  708,  708,  708,  708,  708,  708,
1477       708,  708,  708,  708,  708,  708,  708,  708,  709,  709,
1478       709,  709,  709,  709,  709,  709,  709,  709,  709,  709,
1479       709,  709,  709,  709,  709,  709,  709,  710,  710,  710,
1480       710,  710,  710,  710,  710,  710,  710,  710,  710,  710,
1481
1482       710,  710,  710,  710,  710,  710,  711,  711,  254,  711,
1483       711,  711,  711,  711,  711,  711,  711,  711,  711,  711,
1484       711,  711,  711,  711,  711,  712,  712,  253,  712,  712,
1485       712,  712,  712,  712,  712,  712,  712,  712,  712,  712,
1486       712,  712,  712,  712,  713,  252,  713,  251,  249,  248,
1487       713,  713,  713,  243,  242,  713,  714,  714,  714,  714,
1488       714,  714,  714,  714,  714,  714,  714,  714,  714,  714,
1489       714,  714,  714,  714,  714,  715,  715,  715,  715,  715,
1490       715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
1491       715,  715,  715,  715,  716,  716,  716,  716,  716,  716,
1492
1493       716,  716,  716,  716,  716,  716,  716,  716,  716,  716,
1494       716,  716,  716,  717,  717,  717,  717,  717,  717,  717,
1495       717,  717,  717,  717,  717,  717,  717,  717,  717,  717,
1496       717,  717,  718,  718,  718,  720,  241,  231,  230,  720,
1497       229,  720,  720,  720,  720,  228,  720,  721,  721,  721,
1498       721,  721,  721,  721,  721,  721,  721,  721,  721,  721,
1499       721,  721,  721,  721,  721,  721,  722,  722,  722,  722,
1500       722,  722,  722,  722,  722,  722,  722,  722,  722,  722,
1501       722,  722,  722,  722,  722,  723,  723,  723,  723,  723,
1502       723,  723,  723,  723,  723,  723,  723,  723,  723,  723,
1503
1504       723,  723,  723,  723,  724,  724,  724,  724,  724,  724,
1505       724,  724,  724,  724,  724,  724,  724,  724,  724,  724,
1506       724,  724,  724,  725,  725,  725,  725,  725,  725,  725,
1507       725,  725,  725,  725,  725,  725,  725,  725,  725,  725,
1508       725,  725,  726,  726,  726,  726,  726,  726,  726,  726,
1509       726,  726,  726,  726,  726,  726,  726,  726,  726,  726,
1510       726,  727,  727,  727,  727,  727,  727,  727,  727,  727,
1511       727,  727,  727,  727,  727,  727,  727,  727,  727,  727,
1512       728,  728,  728,  728,  728,  728,  728,  728,  728,  728,
1513       728,  728,  728,  728,  728,  728,  728,  728,  728,  729,
1514
1515       729,  729,  729,  729,  729,  729,  729,  729,  729,  729,
1516       729,  729,  729,  729,  729,  729,  729,  729,  730,  730,
1517       730,  730,  730,  730,  730,  730,  730,  730,  730,  730,
1518       730,  730,  730,  730,  730,  730,  730,  731,  731,  226,
1519       731,  731,  731,  731,  731,  731,  731,  731,  731,  731,
1520       731,  731,  731,  731,  731,  731,  732,  732,  222,  732,
1521       732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
1522       732,  732,  732,  732,  732,  733,  221,  733,  733,  220,
1523       219,  733,  733,  733,  218,  208,  733,  734,  734,  734,
1524       734,  734,  734,  734,  734,  734,  734,  734,  734,  734,
1525
1526       734,  734,  734,  734,  734,  734,  735,  735,  735,  735,
1527       735,  735,  735,  735,  735,  735,  735,  735,  735,  735,
1528       735,  735,  735,  735,  735,  736,  736,  736,  736,  736,
1529       736,  736,  736,  736,  736,  736,  736,  736,  736,  736,
1530       736,  736,  736,  736,  737,  737,  737,  737,  737,  737,
1531       737,  737,  737,  737,  737,  737,  737,  737,  737,  737,
1532       737,  737,  737,  738,  738,  207,  206,  738,  738,  205,
1533       738,  738,  738,  738,  738,  738,  738,  738,  738,  739,
1534       204,  201,  200,  199,  198,  739,  739,  739,  739,  197,
1535       739,  740,  740,  740,  740,  740,  740,  740,  740,  740,
1536
1537       740,  740,  740,  740,  740,  740,  740,  740,  740,  740,
1538       741,  741,  741,  741,  741,  741,  741,  741,  741,  741,
1539       741,  741,  741,  741,  741,  741,  741,  741,  741,  742,
1540       742,  196,  192,  742,  742,  742,  742,  742,  742,  742,
1541       742,  742,  742,  742,  742,  743,  743,  743,  743,  743,
1542       743,  743,  743,  743,  743,  743,  743,  743,  743,  743,
1543       743,  743,  743,  743,  744,  744,  744,  744,  744,  744,
1544       744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
1545       744,  744,  744,  745,  745,  745,  745,  745,  745,  745,
1546       745,  745,  745,  745,  745,  745,  745,  745,  745,  745,
1547
1548       745,  745,  746,  746,  191,  746,  746,  746,  746,  746,
1549       746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
1550       746,  747,  747,  183,  747,  747,  747,  747,  747,  747,
1551       747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
1552       748,  748,  171,  748,  748,  748,  748,  748,  748,  748,
1553       748,  748,  748,  748,  748,  748,  748,  748,  748,  749,
1554       749,  164,  749,  749,  749,  749,  749,  749,  749,  749,
1555       749,  749,  749,  749,  749,  749,  749,  749,  750,  750,
1556       156,  750,  750,  750,  750,  750,  750,  750,  750,  750,
1557       750,  750,  750,  750,  750,  750,  750,  751,  751,  145,
1558
1559       751,  751,  751,  751,  751,  751,  751,  751,  751,  751,
1560       751,  751,  751,  751,  751,  751,  752,  752,  752,  752,
1561       752,  752,  752,  752,  752,  752,  752,  752,  752,  752,
1562       752,  752,  752,  752,  752,  753,  753,  753,  753,  753,
1563       753,  753,  753,  753,  753,  753,  753,  753,  753,  753,
1564       753,  753,  753,  753,  754,  754,  754,  754,  754,  754,
1565       754,  754,  754,  754,  754,  754,  754,  754,  754,  754,
1566       754,  754,  754,  755,  143,  142,  140,  138,  137,  755,
1567       755,  755,  755,  755,  755,  755,  755,  755,  756,  756,
1568       756,  756,  756,  756,  756,  756,  756,  756,  756,  756,
1569
1570       756,  756,  756,  756,  756,  756,  756,  757,  757,  757,
1571       757,  136,  757,  757,  757,  757,  757,  757,  757,  757,
1572       757,  757,  757,  757,  757,  757,  758,  135,  134,  121,
1573       119,  117,  758,  758,  758,  758,  759,  759,  116,  759,
1574       759,  759,  759,  759,  759,  759,  759,  759,  759,  759,
1575       759,  759,  759,  759,  759,  760,  760,  114,  760,  760,
1576       760,  760,  760,  760,  760,  760,  760,  760,  760,  760,
1577       760,  760,  760,  760,  761,  761,  113,  761,  761,  761,
1578       761,  761,  761,  761,  761,  761,  761,  761,  761,  761,
1579       761,  761,  761,  762,  762,  112,  762,  762,  762,  762,
1580
1581       762,  762,  762,  762,  762,  762,  762,  762,  762,  762,
1582       762,  762,  763,  763,  763,  763,  763,  763,  763,  763,
1583       763,  763,  763,  763,  763,  763,  763,  763,  763,  763,
1584       763,  764,  764,  764,  764,  764,  764,  764,  764,  764,
1585       764,  764,  764,  764,  764,  764,  764,  764,  764,  764,
1586       765,  765,  765,  765,  765,  765,  765,  765,  765,  765,
1587       765,  765,  765,  765,  765,  765,  765,  765,  765,  766,
1588       766,  766,  766,  766,  766,  766,  766,  766,  766,  766,
1589       766,  766,  766,  766,  766,  766,  766,  766,  101,   99,
1590        95,   92,   91,   90,   86,   81,   78,   58,   57,   55,
1591
1592        53,   52,   44,   41,   40,   38,   23,   22,   20,   18,
1593        17,   14,    9,    3,  687,  687,  687,  687,  687,  687,
1594       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
1595       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
1596       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
1597       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
1598       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
1599       687,  687,  687,  687,  687,  687,  687,  687,  687,  687,
1600       687,  687,  687,  687,  687,  687,  687,  687
1601     } ;
1602
1603 extern int yy_flex_debug;
1604 int yy_flex_debug = 0;
1605
1606 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
1607 static char *yy_full_match;
1608 static int yy_lp;
1609 static int yy_looking_for_trail_begin = 0;
1610 static int yy_full_lp;
1611 static int *yy_full_state;
1612 #define YY_TRAILING_MASK 0x2000
1613 #define YY_TRAILING_HEAD_MASK 0x4000
1614 #define REJECT \
1615 { \
1616 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
1617 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
1618 (yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
1619 (yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
1620 yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
1621 ++(yy_lp); \
1622 goto find_rule; \
1623 }
1624
1625 #define yymore() yymore_used_but_not_detected
1626 #define YY_MORE_ADJ 0
1627 #define YY_RESTORE_YY_MORE_OFFSET
1628 char *yytext;
1629 /*
1630  * parser.l -- lex parser of algebraic chess moves for XBoard
1631  *
1632  * Copyright 1991 by Digital Equipment Corporation, Maynard,
1633  * Massachusetts.
1634  *
1635  * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005,
1636  * 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
1637  *
1638  * The following terms apply to Digital Equipment Corporation's copyright
1639  * interest in XBoard:
1640  * ------------------------------------------------------------------------
1641  * All Rights Reserved
1642  *
1643  * Permission to use, copy, modify, and distribute this software and its
1644  * documentation for any purpose and without fee is hereby granted,
1645  * provided that the above copyright notice appear in all copies and that
1646  * both that copyright notice and this permission notice appear in
1647  * supporting documentation, and that the name of Digital not be
1648  * used in advertising or publicity pertaining to distribution of the
1649  * software without specific, written prior permission.
1650  *
1651  * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
1652  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
1653  * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
1654  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
1655  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
1656  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
1657  * SOFTWARE.
1658  * ------------------------------------------------------------------------
1659  *
1660  * The following terms apply to the enhanced version of XBoard
1661  * distributed by the Free Software Foundation:
1662  * ------------------------------------------------------------------------
1663  *
1664  * GNU XBoard is free software: you can redistribute it and/or modify
1665  * it under the terms of the GNU General Public License as published by
1666  * the Free Software Foundation, either version 3 of the License, or (at
1667  * your option) any later version.
1668  *
1669  * GNU XBoard is distributed in the hope that it will be useful, but
1670  * WITHOUT ANY WARRANTY; without even the implied warranty of
1671  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1672  * General Public License for more details.
1673  *
1674  * You should have received a copy of the GNU General Public License
1675  * along with this program. If not, see http://www.gnu.org/licenses/.  
1676  *
1677  *------------------------------------------------------------------------
1678  ** See the file ChangeLog for a revision history.  */
1679
1680 /* This parser handles all forms of promotion.
1681  * The parser resolves ambiguous moves by searching and check-testing.
1682  * It also parses comments of the form [anything] or (anything).
1683  *
1684  * [HGM] Parser extensively modified for bigger boards, Shogi-like syntax,
1685  * and unknow pieces. All pieces are now mandatory upper case, but can be
1686  * any letter A-Z. Files must be lower case (as before), but can run upto 'l'.
1687  * Ranks can be 0-9. The parser returns 0 for off-board files and ranks.
1688  * For an unknown piece (as mover or promotion piece) it returns
1689  * IllegalMove, like it does when the piece doesn't match.
1690  * Promotions can now also be appended Shogi-style, a bare '=' or '+',
1691  * and this is then returned as promotion character. The piece indicator
1692  * can be prefixed by a '+' to indicate it is a promoted piece.
1693  */
1694
1695 #include "config.h"
1696
1697 #define NO_CONSTRAINT   -1
1698 #undef YYLMAX
1699 #define YYLMAX                  4096
1700 #define UNPUT_BUF_SIZE          YYLMAX
1701
1702 #ifdef FLEX_SCANNER
1703 /* yytext is probably a char*, but could be a char[].  yy_text is set
1704    in YY_DECL below, because if yytext is a char*, its value is not
1705    constant. */
1706 char *yy_text;
1707 #else /*!FLEX_SCANNER*/
1708 /* yytext is definitely a char[], so yy_text can be set here, statically. */
1709 char *yy_text = (char *) yytext;
1710 #endif
1711
1712 #ifdef FLEX_SCANNER
1713 /* This is flex */
1714 /* [AP] use prototypes in function declarations */
1715 #define YY_USE_PROTOS
1716
1717 #ifdef YY_USE_PROTOS
1718 #define YY_PROTO(proto) proto
1719 #else
1720 #define YY_PROTO(proto) ()
1721 #endif
1722 /* end of [AP] fix */
1723
1724 #undef YY_INPUT
1725 #define YY_INPUT(buf, result, max_size) my_yy_input(buf, &result, max_size)
1726 #undef YY_DECL
1727 #define YY_DECL                     \
1728     int _yylex YY_PROTO((void));    \
1729     int yylex YY_PROTO((void))      \
1730     {                               \
1731         int result = _yylex();      \
1732         yy_text = (char *) yytext;  \
1733         return(result);             \
1734     }                               \
1735     int _yylex YY_PROTO((void))
1736 #else
1737 /* This is lex */
1738 #undef input
1739 #undef output
1740 #undef unput
1741 #endif
1742
1743 /* The includes must be here, below the #undef input */
1744
1745 #include <ctype.h>
1746
1747 #if STDC_HEADERS
1748 # include <stdlib.h>
1749 # include <string.h>
1750 #else /* not STDC_HEADERS */
1751 # if HAVE_STRING_H
1752 #  include <string.h>
1753 # else /* not HAVE_STRING_H */
1754 #  include <strings.h>
1755 # endif /* not HAVE_STRING_H */
1756 #endif /* not STDC_HEADERS */
1757
1758 #if HAVE_UNISTD_H
1759 # include <unistd.h>
1760 #endif
1761
1762 #if defined(_amigados)
1763 # include <errno.h>
1764 # if HAVE_FCNTL_H
1765 #  include <fcntl.h>    /*  isatty() prototype  */
1766 # endif /*  HAVE_FCNTL_H        */
1767 #endif  /*  defined(_amigados)  */
1768
1769 #include "common.h"
1770 #include "backend.h"
1771 #include "frontend.h"
1772 #include "parser.h"
1773 #include "moves.h"
1774
1775 extern int PosFlags P((int));
1776
1777 extern Board    boards[MAX_MOVES];
1778 int             yyboardindex;
1779 int             yyskipmoves = FALSE;
1780 char            currentMoveString[YYLMAX];
1781 #ifndef FLEX_SCANNER
1782 char            unputBuffer[UNPUT_BUF_SIZE];
1783 int             unputCount = 0;
1784 #endif
1785
1786 #ifdef FLEX_SCANNER
1787 void my_yy_input P((char *buf, int *result, int max_size));
1788 #else /*!FLEX_SCANNER*/
1789 static int input P((void));
1790 static void output P((int ch));
1791 static void unput P((int ch));
1792 int yylook P((void));
1793 int yyback P((int *, int));
1794 #endif
1795 #undef yywrap
1796 int yywrap P((void));
1797 extern void CopyBoard P((Board to, Board from));
1798
1799 #define INITIAL 0
1800
1801 #ifndef YY_NO_UNISTD_H
1802 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1803  * down here because we want the user's section 1 to have been scanned first.
1804  * The user has a chance to override it with an option.
1805  */
1806 #include <unistd.h>
1807 #endif
1808
1809 #ifndef YY_EXTRA_TYPE
1810 #define YY_EXTRA_TYPE void *
1811 #endif
1812
1813 static int yy_init_globals (void );
1814
1815 /* Accessor methods to globals.
1816    These are made visible to non-reentrant scanners for convenience. */
1817
1818 int yylex_destroy (void );
1819
1820 int yyget_debug (void );
1821
1822 void yyset_debug (int debug_flag  );
1823
1824 YY_EXTRA_TYPE yyget_extra (void );
1825
1826 void yyset_extra (YY_EXTRA_TYPE user_defined  );
1827
1828 FILE *yyget_in (void );
1829
1830 void yyset_in  (FILE * in_str  );
1831
1832 FILE *yyget_out (void );
1833
1834 void yyset_out  (FILE * out_str  );
1835
1836 int yyget_leng (void );
1837
1838 char *yyget_text (void );
1839
1840 int yyget_lineno (void );
1841
1842 void yyset_lineno (int line_number  );
1843
1844 /* Macros after this point can all be overridden by user definitions in
1845  * section 1.
1846  */
1847
1848 #ifndef YY_SKIP_YYWRAP
1849 #ifdef __cplusplus
1850 extern "C" int yywrap (void );
1851 #else
1852 extern int yywrap (void );
1853 #endif
1854 #endif
1855
1856     static void yyunput (int c,char *buf_ptr  );
1857     
1858 #ifndef yytext_ptr
1859 static void yy_flex_strncpy (char *,yyconst char *,int );
1860 #endif
1861
1862 #ifdef YY_NEED_STRLEN
1863 static int yy_flex_strlen (yyconst char * );
1864 #endif
1865
1866 #ifndef YY_NO_INPUT
1867
1868 #ifdef __cplusplus
1869 static int yyinput (void );
1870 #else
1871 static int input (void );
1872 #endif
1873
1874 #endif
1875
1876 /* Amount of stuff to slurp up with each read. */
1877 #ifndef YY_READ_BUF_SIZE
1878 #define YY_READ_BUF_SIZE 8192
1879 #endif
1880
1881 /* Copy whatever the last rule matched to the standard output. */
1882 #ifndef ECHO
1883 /* This used to be an fputs(), but since the string might contain NUL's,
1884  * we now use fwrite().
1885  */
1886 #define ECHO fwrite( yytext, yyleng, 1, yyout )
1887 #endif
1888
1889 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
1890  * is returned in "result".
1891  */
1892 #ifndef YY_INPUT
1893 #define YY_INPUT(buf,result,max_size) \
1894         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1895                 { \
1896                 int c = '*'; \
1897                 int n; \
1898                 for ( n = 0; n < max_size && \
1899                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1900                         buf[n] = (char) c; \
1901                 if ( c == '\n' ) \
1902                         buf[n++] = (char) c; \
1903                 if ( c == EOF && ferror( yyin ) ) \
1904                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
1905                 result = n; \
1906                 } \
1907         else \
1908                 { \
1909                 errno=0; \
1910                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1911                         { \
1912                         if( errno != EINTR) \
1913                                 { \
1914                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1915                                 break; \
1916                                 } \
1917                         errno=0; \
1918                         clearerr(yyin); \
1919                         } \
1920                 }\
1921 \
1922
1923 #endif
1924
1925 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1926  * we don't want an extra ';' after the "return" because that will cause
1927  * some compilers to complain about unreachable statements.
1928  */
1929 #ifndef yyterminate
1930 #define yyterminate() return YY_NULL
1931 #endif
1932
1933 /* Number of entries by which start-condition stack grows. */
1934 #ifndef YY_START_STACK_INCR
1935 #define YY_START_STACK_INCR 25
1936 #endif
1937
1938 /* Report a fatal error. */
1939 #ifndef YY_FATAL_ERROR
1940 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1941 #endif
1942
1943 /* end tables serialization structures and prototypes */
1944
1945 /* Default declaration of generated scanner - a define so the user can
1946  * easily add parameters.
1947  */
1948 #ifndef YY_DECL
1949 #define YY_DECL_IS_OURS 1
1950
1951 extern int yylex (void);
1952
1953 #define YY_DECL int yylex (void)
1954 #endif /* !YY_DECL */
1955
1956 /* Code executed at the beginning of each rule, after yytext and yyleng
1957  * have been set up.
1958  */
1959 #ifndef YY_USER_ACTION
1960 #define YY_USER_ACTION
1961 #endif
1962
1963 /* Code executed at the end of each rule. */
1964 #ifndef YY_BREAK
1965 #define YY_BREAK break;
1966 #endif
1967
1968 #define YY_RULE_SETUP \
1969         if ( yyleng > 0 ) \
1970                 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1971                                 (yytext[yyleng - 1] == '\n'); \
1972         YY_USER_ACTION
1973
1974 /** The main scanner function which does all the work.
1975  */
1976 YY_DECL
1977 {
1978         register yy_state_type yy_current_state;
1979         register char *yy_cp, *yy_bp;
1980         register int yy_act;
1981     
1982         if ( !(yy_init) )
1983                 {
1984                 (yy_init) = 1;
1985
1986 #ifdef YY_USER_INIT
1987                 YY_USER_INIT;
1988 #endif
1989
1990         /* Create the reject buffer large enough to save one state per allowed character. */
1991         if ( ! (yy_state_buf) )
1992             (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  );
1993             if ( ! (yy_state_buf) )
1994                 YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
1995
1996                 if ( ! (yy_start) )
1997                         (yy_start) = 1; /* first start state */
1998
1999                 if ( ! yyin )
2000                         yyin = stdin;
2001
2002                 if ( ! yyout )
2003                         yyout = stdout;
2004
2005                 if ( ! YY_CURRENT_BUFFER ) {
2006                         yyensure_buffer_stack ();
2007                         YY_CURRENT_BUFFER_LVALUE =
2008                                 yy_create_buffer(yyin,YY_BUF_SIZE );
2009                 }
2010
2011                 yy_load_buffer_state( );
2012                 }
2013
2014         while ( 1 )             /* loops until end-of-file is reached */
2015                 {
2016                 yy_cp = (yy_c_buf_p);
2017
2018                 /* Support of yytext. */
2019                 *yy_cp = (yy_hold_char);
2020
2021                 /* yy_bp points to the position in yy_ch_buf of the start of
2022                  * the current run.
2023                  */
2024                 yy_bp = yy_cp;
2025
2026                 yy_current_state = (yy_start);
2027                 yy_current_state += YY_AT_BOL();
2028
2029                 (yy_state_ptr) = (yy_state_buf);
2030                 *(yy_state_ptr)++ = yy_current_state;
2031
2032 yy_match:
2033                 do
2034                         {
2035                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
2036                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2037                                 {
2038                                 yy_current_state = (int) yy_def[yy_current_state];
2039                                 if ( yy_current_state >= 688 )
2040                                         yy_c = yy_meta[(unsigned int) yy_c];
2041                                 }
2042                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2043                         *(yy_state_ptr)++ = yy_current_state;
2044                         ++yy_cp;
2045                         }
2046                 while ( yy_base[yy_current_state] != 3815 );
2047
2048 yy_find_action:
2049                 yy_current_state = *--(yy_state_ptr);
2050                 (yy_lp) = yy_accept[yy_current_state];
2051 find_rule: /* we branch to this label when backing up */
2052                 for ( ; ; ) /* until we find what rule we matched */
2053                         {
2054                         if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
2055                                 {
2056                                 yy_act = yy_acclist[(yy_lp)];
2057                                 if ( yy_act & YY_TRAILING_HEAD_MASK ||
2058                                      (yy_looking_for_trail_begin) )
2059                                         {
2060                                         if ( yy_act == (yy_looking_for_trail_begin) )
2061                                                 {
2062                                                 (yy_looking_for_trail_begin) = 0;
2063                                                 yy_act &= ~YY_TRAILING_HEAD_MASK;
2064                                                 break;
2065                                                 }
2066                                         }
2067                                 else if ( yy_act & YY_TRAILING_MASK )
2068                                         {
2069                                         (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
2070                                         (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
2071                                         }
2072                                 else
2073                                         {
2074                                         (yy_full_match) = yy_cp;
2075                                         (yy_full_state) = (yy_state_ptr);
2076                                         (yy_full_lp) = (yy_lp);
2077                                         break;
2078                                         }
2079                                 ++(yy_lp);
2080                                 goto find_rule;
2081                                 }
2082                         --yy_cp;
2083                         yy_current_state = *--(yy_state_ptr);
2084                         (yy_lp) = yy_accept[yy_current_state];
2085                         }
2086
2087                 YY_DO_BEFORE_ACTION;
2088
2089 do_action:      /* This label is used only to access EOF actions. */
2090
2091                 switch ( yy_act )
2092         { /* beginning of action switch */
2093 case 1:
2094 YY_RULE_SETUP
2095 {
2096     /*
2097      * Fully-qualified algebraic move, possibly with promotion
2098      */
2099     int skip1 = 0, skip2 = 0, skip3 = 0, promoted = 0;
2100     ChessSquare piece;
2101     ChessMove result;
2102     char c;
2103     
2104     if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2105
2106     if (yytext[0] == '+') skip1 = skip3 = promoted = 1; /* [HGM] Shogi promoted */
2107
2108     /* remove the / */
2109     if (yytext[1+skip1] == '/')  skip1++; 
2110     
2111     /* remove the [xX:-] */
2112     if ((yytext[3+skip1] == 'x') || (yytext[3+skip1] == 'X') ||
2113         (yytext[3+skip1] == '-') || (yytext[3+skip1] == ':')) skip2 = 1;
2114     
2115     currentMoveString[0] = yytext[1+skip1];
2116     currentMoveString[1] = yytext[2+skip1];
2117     currentMoveString[2] = yytext[3+skip1+skip2];
2118     currentMoveString[3] = yytext[4+skip1+skip2];
2119     currentMoveString[4] = NULLCHAR;
2120     
2121     if (appData.debugMode) {
2122         fprintf(debugFP, "Parser Qa1b2: yyleng=%d\n",
2123         yyleng);
2124     }
2125
2126     if (yyleng-skip1-skip2 > 5) { char c;
2127         if (yytext[yyleng-1] == ')') {
2128             c = currentMoveString[4] = ToLower(yytext[yyleng-2]);
2129         } else {
2130             c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
2131         }
2132         currentMoveString[5] = NULLCHAR;
2133         if(c != '=' && c != '+' && CharToPiece(c) == EmptySquare)
2134             return IllegalMove; /* [HGM] promotion to invalid piece */
2135     }
2136
2137     if (appData.debugMode) {
2138         fprintf(debugFP, "parser: %s\n", currentMoveString);
2139     }
2140     /* [HGM] do not allow values beyond board size */
2141     if(currentMoveString[1] - ONE >= BOARD_HEIGHT ||
2142        currentMoveString[1] - ONE <  0            ||
2143        currentMoveString[0] - AAA >= BOARD_RGHT   ||
2144        currentMoveString[3] - ONE >= BOARD_HEIGHT ||
2145        currentMoveString[3] - ONE <  0            ||
2146        currentMoveString[2] - AAA >= BOARD_RGHT   ||
2147        currentMoveString[0] - AAA <  BOARD_LEFT   ||
2148        currentMoveString[2] - AAA <  BOARD_LEFT     )
2149       return 0;
2150
2151     piece = boards[yyboardindex]
2152       [currentMoveString[1] - ONE][currentMoveString[0] - AAA];
2153     if(promoted) piece = (ChessSquare) (DEMOTED piece);
2154     c = PieceToChar(piece);
2155     if(c == '~') c = PieceToChar((ChessSquare) (DEMOTED piece));
2156     if (ToLower(yytext[skip3]) != ToLower(c))
2157       return (int) IllegalMove;
2158
2159     result = LegalityTest(boards[yyboardindex],
2160                           PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
2161                           currentMoveString[1] - ONE,
2162                           currentMoveString[0] - AAA,
2163                           currentMoveString[3] - ONE,
2164                           currentMoveString[2] - AAA,
2165                           currentMoveString[4]);
2166
2167     if (currentMoveString[4] == NULLCHAR &&
2168         (result == WhitePromotionKnight || result == BlackPromotionKnight ||
2169          result == WhitePromotionQueen  || result == BlackPromotionQueen)) {
2170         currentMoveString[4] = PieceToChar(BlackQueen);
2171         currentMoveString[5] = NULLCHAR;
2172     }
2173
2174     return (int) result;
2175 }
2176         YY_BREAK
2177 case 2:
2178 YY_RULE_SETUP
2179 {
2180     /*
2181      * Simple algebraic move, possibly with promotion
2182      * [HGM] Engine moves are received in this format, with lower-case promoChar!
2183      */
2184     int skip = 0;
2185     ChessMove result;
2186
2187     if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2188
2189     /* remove the [xX:-] */
2190     if ((yytext[2] == 'x') || (yytext[2] == 'X') ||
2191         (yytext[2] == '-') || (yytext[2] == ':')) skip = 1;
2192
2193     currentMoveString[0] = yytext[0];
2194     currentMoveString[1] = yytext[1];
2195     currentMoveString[2] = yytext[2+skip];
2196     currentMoveString[3] = yytext[3+skip];
2197     currentMoveString[4] = NULLCHAR;
2198
2199     if (yyleng-skip > 4) { char c;
2200         if (yytext[yyleng-1] == ')') {
2201             c = currentMoveString[4] = ToLower(yytext[yyleng-2]);
2202         } else {
2203             c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
2204         }
2205         currentMoveString[5] = NULLCHAR;
2206         if(c != '=' && c != '+' && CharToPiece(c) == EmptySquare)
2207             return IllegalMove;
2208     }
2209
2210     /* [HGM] do not allow values beyond board size */
2211     if(currentMoveString[1] - ONE >= BOARD_HEIGHT ||
2212        currentMoveString[1] - ONE <  0            ||
2213        currentMoveString[0] - AAA >= BOARD_RGHT   ||
2214        currentMoveString[3] - ONE >= BOARD_HEIGHT ||
2215        currentMoveString[3] - ONE <  0            ||
2216        currentMoveString[2] - AAA >= BOARD_RGHT   ||
2217        currentMoveString[0] - AAA <  BOARD_LEFT   ||
2218        currentMoveString[2] - AAA <  BOARD_LEFT     )
2219       return 0;
2220
2221     result = LegalityTest(boards[yyboardindex],
2222                           PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
2223                           currentMoveString[1] - ONE,
2224                           currentMoveString[0] - AAA,
2225                           currentMoveString[3] - ONE,
2226                           currentMoveString[2] - AAA,
2227                           currentMoveString[4]);
2228
2229     if (currentMoveString[4] == NULLCHAR &&
2230         (result == WhitePromotionKnight || result == BlackPromotionKnight ||
2231          result == WhitePromotionQueen  || result == BlackPromotionQueen)) {
2232         if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier)
2233             currentMoveString[4] = PieceToChar(BlackFerz);
2234         else if(gameInfo.variant == VariantGreat)
2235             currentMoveString[4] = PieceToChar(BlackMan);
2236         else
2237             currentMoveString[4] = PieceToChar(BlackQueen);
2238         currentMoveString[5] = NULLCHAR;
2239     }
2240
2241     return (int) result;
2242 }
2243         YY_BREAK
2244 case 3:
2245 YY_RULE_SETUP
2246 {
2247     /*
2248      * Pawn move, possibly with promotion
2249      */
2250     DisambiguateClosure cl;
2251     int skip = 0; char c;
2252
2253     if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2254
2255     /* remove the =() */
2256     if (yytext[2] == '=' && yytext[3] != NULLCHAR) skip++;
2257     if (yytext[2+skip] == '(') skip++;
2258
2259     cl.pieceIn = WhiteOnMove(yyboardindex) ? WhitePawn : BlackPawn;
2260     cl.rfIn = -1;
2261     cl.ffIn = yytext[0] - AAA;
2262     cl.rtIn = yytext[1] - ONE;
2263     cl.ftIn = yytext[0] - AAA;
2264     c = cl.promoCharIn = yytext[2+skip];
2265
2266     /* [HGM] do not allow values beyond board size */
2267     if(cl.rtIn >= BOARD_HEIGHT ||
2268        cl.rtIn <  0            ||
2269        cl.ffIn >= BOARD_RGHT   ||
2270        cl.ftIn <  BOARD_LEFT     )
2271       return 0;
2272
2273     if(c != '=' && c != '+' && c != NULLCHAR && CharToPiece(c) == EmptySquare)
2274       return IllegalMove;
2275
2276     Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);
2277
2278     currentMoveString[0] = cl.ff + AAA;
2279     currentMoveString[1] = cl.rf + ONE;
2280     currentMoveString[2] = cl.ft + AAA;
2281     currentMoveString[3] = cl.rt + ONE;
2282     currentMoveString[4] = cl.promoChar;
2283     currentMoveString[5] = NULLCHAR;
2284
2285     return (int) cl.kind;
2286 }
2287         YY_BREAK
2288 case 4:
2289 YY_RULE_SETUP
2290 {
2291     /*
2292      * Pawn capture, possibly with promotion, possibly ambiguous
2293      */
2294     DisambiguateClosure cl;
2295     int skip1 = 0, skip2 = 0; char c;
2296
2297     if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2298
2299     /* remove trailing ep or e.p. (nonstandard PGN) */
2300     if (yytext[yyleng-1] == 'p') {
2301       yyleng -= 2;
2302       yytext[yyleng] = NULLCHAR;
2303     } else if (yytext[yyleng-1] == '.') {
2304       yyleng -= 4;
2305       yytext[yyleng] = NULLCHAR;
2306     }
2307
2308     /* remove the [xX:-] and =() */
2309     if ((yytext[1] == 'x') || (yytext[1] == 'X')
2310         || (yytext[1] == ':') || (yytext[1] == '-')) skip1 = 1;
2311     if (yytext[2+skip1] == '=' && yytext[3+skip1] != NULLCHAR) skip2++;
2312     if (yytext[2+skip1+skip2] == '(') skip2++;
2313
2314     cl.pieceIn = WhiteOnMove(yyboardindex) ? WhitePawn : BlackPawn;
2315     cl.rfIn = -1;
2316     cl.ffIn = yytext[0] - AAA;
2317     cl.rtIn = -1;
2318     cl.ftIn = yytext[1+skip1] - AAA;
2319     c = cl.promoCharIn = yytext[2+skip1+skip2];
2320
2321     /* [HGM] do not allow values beyond board size */
2322     if(cl.ffIn >= BOARD_RGHT  ||
2323        cl.ffIn <  BOARD_LEFT  ||
2324        cl.ftIn >= BOARD_RGHT  ||
2325        cl.ftIn <  BOARD_LEFT     )
2326       return 0;
2327
2328     if(c != '=' && c != '+' && c != NULLCHAR && CharToPiece(c) == EmptySquare)
2329       return IllegalMove;
2330
2331     Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);
2332
2333     currentMoveString[0] = cl.ff + AAA;
2334     currentMoveString[1] = cl.rf + ONE;
2335     currentMoveString[2] = cl.ft + AAA;
2336     currentMoveString[3] = cl.rt + ONE;
2337     currentMoveString[4] = cl.promoChar;
2338     currentMoveString[5] = NULLCHAR;
2339
2340     return (int) cl.kind;
2341 }
2342         YY_BREAK
2343 case 5:
2344 YY_RULE_SETUP
2345 {
2346     /*
2347      * unambiguously abbreviated Pawn capture, possibly with promotion
2348      */
2349     int skip = 0;
2350     ChessMove result; char c;
2351
2352     if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2353
2354     /* remove trailing ep or e.p. (nonstandard PGN) */
2355     if (yytext[yyleng-1] == 'p') {
2356       yyleng -= 2;
2357       yytext[yyleng] = NULLCHAR;
2358     } else if (yytext[yyleng-1] == '.') {
2359       yyleng -= 4;
2360       yytext[yyleng] = NULLCHAR;
2361     }
2362
2363     /* remove the [xX:-] */
2364     if ((yytext[1] == 'x') || (yytext[1] == 'X')
2365         || (yytext[1] == ':') || (yytext[1] == '-')) skip = 1;
2366
2367     currentMoveString[0] = yytext[0];
2368     currentMoveString[2] = yytext[1+skip];
2369     currentMoveString[3] = yytext[2+skip];
2370
2371     /* [HGM] do not allow values beyond board size */
2372     if(currentMoveString[0] - AAA >= BOARD_RGHT   ||
2373        currentMoveString[3] - ONE >= BOARD_HEIGHT ||
2374        currentMoveString[3] - ONE <  0            ||
2375        currentMoveString[2] - AAA >= BOARD_RGHT   ||
2376        currentMoveString[0] - AAA <  BOARD_LEFT   ||
2377        currentMoveString[2] - AAA <  BOARD_LEFT     )
2378       return 0;
2379
2380     if (gameInfo.variant == VariantXiangqi && /* [HGM] In Xiangqi rank stays same */
2381          currentMoveString[0] != currentMoveString[2] ) {
2382         currentMoveString[1] = yytext[2+skip];
2383     } else 
2384     if (WhiteOnMove(yyboardindex)) {
2385         if (yytext[2+skip] == ONE) return (int) ImpossibleMove;
2386         currentMoveString[1] = yytext[2+skip] - 1;
2387         if(boards[yyboardindex][currentMoveString[1]-ONE][currentMoveString[0]-AAA] != WhitePawn) 
2388                 return ImpossibleMove;
2389     } else {
2390         currentMoveString[1] = currentMoveString[3] + 1;
2391         if (currentMoveString[3] == ONE+BOARD_HEIGHT-1) return (int) ImpossibleMove;
2392         if(boards[yyboardindex][currentMoveString[1]-ONE][currentMoveString[0]-AAA] != BlackPawn) 
2393                 return ImpossibleMove;
2394     }
2395     if (yyleng-skip > 3) {
2396         if (yytext[yyleng-1] == ')')
2397           c = currentMoveString[4] = ToLower(yytext[yyleng-2]);
2398         else
2399           c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
2400         currentMoveString[5] = NULLCHAR;
2401         if(c != '=' && c != '+' && CharToPiece(c) == EmptySquare)
2402             return IllegalMove;
2403     } else {
2404         currentMoveString[4] = NULLCHAR;
2405     }
2406
2407     result = LegalityTest(boards[yyboardindex],
2408                           PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
2409                           currentMoveString[1] - ONE,
2410                           currentMoveString[0] - AAA,
2411                           currentMoveString[3] - ONE,
2412                           currentMoveString[2] - AAA,
2413                           currentMoveString[4]);
2414
2415     if (currentMoveString[4] == NULLCHAR &&
2416         (result == WhitePromotionQueen  || result == BlackPromotionQueen ||
2417          result == WhitePromotionKnight || result == BlackPromotionKnight)) {
2418         currentMoveString[4] = PieceToChar(BlackQueen);
2419         // [HGM] shatranj: take care of variants without Queen
2420         if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier)
2421             currentMoveString[4] = PieceToChar(BlackFerz);
2422         if(gameInfo.variant == VariantGreat)
2423             currentMoveString[4] = PieceToChar(BlackMan);
2424         currentMoveString[5] = NULLCHAR;
2425     }
2426
2427     if (result != IllegalMove) return (int) result;
2428
2429     /* Special case: improperly written en passant capture */
2430     if (WhiteOnMove(yyboardindex)) {
2431         if (currentMoveString[3] == '5') {
2432             currentMoveString[1] = '5';
2433             currentMoveString[3] = '6';
2434         } else {
2435             return (int) IllegalMove;
2436         }
2437     } else {
2438         if (currentMoveString[3] == '4') {
2439             currentMoveString[1] = '4';
2440             currentMoveString[3] = '3';
2441         } else {
2442             return (int) IllegalMove;
2443         }
2444     }
2445
2446     result = LegalityTest(boards[yyboardindex],
2447                           PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
2448                           currentMoveString[1] - ONE,
2449                           currentMoveString[0] - AAA,
2450                           currentMoveString[3] - ONE,
2451                           currentMoveString[2] - AAA,
2452                           currentMoveString[4]);
2453
2454     if (result == WhiteCapturesEnPassant || result == BlackCapturesEnPassant)
2455       return (int) result;
2456     else
2457       return (int) IllegalMove;
2458 }
2459         YY_BREAK
2460 case 6:
2461 YY_RULE_SETUP
2462 {
2463     /*
2464      * piece move, possibly ambiguous
2465      */
2466     DisambiguateClosure cl;
2467     int skip = 0, skip2 = 0, promoted = 0;
2468
2469     if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2470
2471     if(yytext[0] == '+') promoted = skip = skip2 = 1;
2472
2473     /* remove the [xX:-] */
2474     if ((yytext[1+skip] == 'x') || (yytext[1+skip] == 'X')
2475         || (yytext[1+skip] == ':') || (yytext[1+skip] == '-')) skip++;
2476
2477     if (WhiteOnMove(yyboardindex)) {
2478         cl.pieceIn = CharToPiece(ToUpper(yytext[skip2]));
2479     } else {
2480         cl.pieceIn = CharToPiece(ToLower(yytext[skip2]));
2481     }
2482     if(promoted) cl.pieceIn = (ChessSquare) (PROMOTED cl.pieceIn);
2483
2484     cl.rfIn = -1;
2485     cl.ffIn = -1;
2486     cl.rtIn = yytext[2+skip] - ONE;
2487     cl.ftIn = yytext[1+skip] - AAA;
2488     cl.promoCharIn = NULLCHAR;
2489
2490     if(yyleng-skip > 3) /* [HGM] can have Shogi-style promotion */
2491         cl.promoCharIn = yytext[yyleng-1];
2492
2493     if (appData.debugMode) {
2494         fprintf(debugFP, "Parser Qa1: yyleng=%d,  %d(%d,%d)-(%d,%d) = %d (%c)\n",
2495         yyleng,
2496         cl.pieceIn,cl.ffIn,cl.rfIn,cl.ftIn,cl.rtIn,cl.promoCharIn,cl.promoCharIn?cl.promoCharIn:' ');
2497     }
2498
2499     /* [HGM] but do not allow values beyond board size */
2500     if(cl.rtIn >= BOARD_HEIGHT ||
2501        cl.rtIn <  0            ||
2502        cl.ftIn >= BOARD_RGHT   ||
2503        cl.ftIn <  BOARD_LEFT     )
2504       return 0;
2505
2506     Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);
2507
2508     currentMoveString[0] = cl.ff + AAA;
2509     currentMoveString[1] = cl.rf + ONE;
2510     currentMoveString[2] = cl.ft + AAA;
2511     currentMoveString[3] = cl.rt + ONE;
2512     currentMoveString[4] = cl.promoChar;
2513     currentMoveString[5] = NULLCHAR;
2514
2515     return (int) cl.kind;
2516 }
2517         YY_BREAK
2518 case 7:
2519 YY_RULE_SETUP
2520 {
2521     /*
2522      * piece move with rank or file disambiguator
2523      */
2524     DisambiguateClosure cl;
2525     int skip = 0, skip2 = 0; int promoted=0;
2526
2527     if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2528
2529     if(yytext[0]=='+') promoted = skip = skip2 = 1;
2530
2531     /* remove the [xX:-] */
2532     if ((yytext[2+skip] == 'x') || (yytext[2+skip] == 'X')
2533         || (yytext[2+skip] == ':') || (yytext[2+skip] == '-')) skip++;
2534
2535     if (WhiteOnMove(yyboardindex)) {
2536         cl.pieceIn = CharToPiece(ToUpper(yytext[skip2]));
2537     } else {
2538         cl.pieceIn = CharToPiece(ToLower(yytext[skip2]));
2539     }
2540     if(promoted) cl.pieceIn = (ChessSquare) (PROMOTED cl.pieceIn);
2541
2542     if (isalpha(yytext[1+skip2])) {
2543         cl.rfIn = -1;
2544         cl.ffIn = yytext[1+skip2] - AAA;
2545        
2546         if(cl.ffIn >= BOARD_RGHT ||
2547            cl.ffIn <  BOARD_LEFT   ) return 0;
2548     } else {
2549         cl.rfIn = yytext[1+skip2] - ONE;
2550         cl.ffIn = -1;
2551         if(cl.rfIn >= BOARD_HEIGHT ||
2552            cl.rfIn <  0) return 0;
2553     }
2554     cl.rtIn = yytext[3+skip] - ONE;
2555     cl.ftIn = yytext[2+skip] - AAA;
2556     cl.promoCharIn = NULLCHAR;
2557
2558     if(yyleng-skip > 4) /* [HGM] can have Shogi-style promotion */
2559         cl.promoCharIn = yytext[yyleng-1];
2560
2561     /* [HGM] do not allow values beyond board size */
2562     if(cl.rtIn >= BOARD_HEIGHT ||
2563        cl.rtIn <  0            ||
2564        cl.ftIn >= BOARD_RGHT   ||
2565        cl.ftIn <  BOARD_LEFT     )
2566       return 0;
2567
2568     Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);
2569
2570     currentMoveString[0] = cl.ff + AAA;
2571     currentMoveString[1] = cl.rf + ONE;
2572     currentMoveString[2] = cl.ft + AAA;
2573     currentMoveString[3] = cl.rt + ONE;
2574     currentMoveString[4] = cl.promoChar;
2575     currentMoveString[5] = NULLCHAR;
2576
2577     return (int) cl.kind;
2578 }
2579         YY_BREAK
2580 case 8:
2581 YY_RULE_SETUP
2582 {
2583     int rf, ff, rt, ft;
2584
2585     if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2586
2587     /* [HGM] all squares referenced to board edges in stead of absolute */
2588     if (WhiteOnMove(yyboardindex)) {
2589         if (boards[yyboardindex][0][(BOARD_WIDTH-1)>>1] == WhiteKing) {
2590             /* ICS wild castling */
2591             rf = 0;
2592             ff = (BOARD_WIDTH-1)>>1;
2593             rt = 0;
2594             ft = BOARD_RGHT-3;
2595         } else {
2596             rf = 0;
2597             ff = BOARD_WIDTH>>1;
2598             rt = 0;
2599             ft = BOARD_LEFT+2;
2600         }
2601     } else{ 
2602         if (boards[yyboardindex][BOARD_HEIGHT-1][(BOARD_WIDTH-1)>>1] == BlackKing) {
2603             /* ICS wild castling */
2604             rf = BOARD_HEIGHT-1;
2605             ff = (BOARD_WIDTH-1)>>1;
2606             rt = BOARD_HEIGHT-1;
2607             ft = BOARD_RGHT-3;
2608         } else {
2609             rf = BOARD_HEIGHT-1;
2610             ff = BOARD_WIDTH>>1;
2611             rt = BOARD_HEIGHT-1;
2612             ft = BOARD_LEFT+2;
2613         }
2614     }
2615     if(gameInfo.variant == VariantFischeRandom) {
2616         if (WhiteOnMove(yyboardindex)) {
2617             ff = initialRights[2];
2618             ft = initialRights[1];
2619         } else {
2620             ff = initialRights[5];
2621             ft = initialRights[4];
2622         }
2623         if (appData.debugMode) 
2624         {
2625           fprintf(debugFP, "Parser FRC long %d %d\n", ff, ft);
2626         };
2627         if(ff < 0 || ft < 0) return 0;
2628     }
2629     sprintf(currentMoveString, "%c%c%c%c",ff+AAA,rf+ONE,ft+AAA,rt+ONE);
2630     if (appData.debugMode) {
2631         fprintf(debugFP, "long castling %d %d\n", ff, ft);
2632     }
2633     return (int) LegalityTest(boards[yyboardindex],
2634                               PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: e.p.!
2635                               rf, ff, rt, ft, NULLCHAR);
2636 }
2637         YY_BREAK
2638 case 9:
2639 YY_RULE_SETUP
2640 {
2641     int rf, ff, rt, ft;
2642
2643     if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
2644
2645     if (WhiteOnMove(yyboardindex)) {
2646         if (boards[yyboardindex][0][(BOARD_WIDTH-1)>>1] == WhiteKing) {
2647             /* ICS wild castling */
2648             rf = 0;
2649             ff = (BOARD_WIDTH-1)>>1;
2650             rt = 0;
2651             ft = BOARD_LEFT+1;
2652         } else {
2653             rf = 0;
2654             ff = BOARD_WIDTH>>1;
2655             rt = 0;
2656             ft = BOARD_RGHT-2;
2657         }
2658     } else {
2659         if (boards[yyboardindex][BOARD_HEIGHT-1][(BOARD_WIDTH-1)>>1] == BlackKing) {
2660             /* ICS wild castling */
2661             rf = BOARD_HEIGHT-1;
2662             ff = (BOARD_WIDTH-1)>>1;
2663             rt = BOARD_HEIGHT-1;
2664             ft = BOARD_LEFT+1;
2665         } else {
2666             rf = BOARD_HEIGHT-1;
2667             ff = BOARD_WIDTH>>1;
2668             rt = BOARD_HEIGHT-1;
2669             ft = BOARD_RGHT-2;
2670         }
2671     }
2672     if(gameInfo.variant == VariantFischeRandom) {
2673         if (WhiteOnMove(yyboardindex)) {
2674             ff = initialRights[2];
2675             ft = initialRights[0];
2676         } else {
2677             ff = initialRights[5];
2678             ft = initialRights[3];
2679         }
2680     if (appData.debugMode) {
2681         fprintf(debugFP, "Parser FRC short %d %d\n", ff, ft);
2682     }
2683         if(ff < 0 || ft < 0) return 0;
2684     }
2685     sprintf(currentMoveString, "%c%c%c%c",ff+AAA,rf+ONE,ft+AAA,rt+ONE);
2686     if (appData.debugMode) {
2687         fprintf(debugFP, "short castling %d %d\n", ff, ft);
2688     }
2689
2690     return (int) LegalityTest(boards[yyboardindex],
2691                               PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: e.p.!
2692                               rf, ff, rt, ft, NULLCHAR);
2693 }
2694         YY_BREAK
2695 case 10:
2696 YY_RULE_SETUP
2697 {
2698     /* Bughouse piece drop.  No legality checking for now. */
2699     currentMoveString[1] = '@';
2700     currentMoveString[2] = yytext[2];
2701     currentMoveString[3] = yytext[3];
2702     currentMoveString[4] = NULLCHAR;
2703
2704     if (appData.debugMode) {
2705         fprintf(debugFP, "Drop: %s\n", currentMoveString);
2706     }
2707     /* [HGM] do not allow values beyond board size */
2708     if(currentMoveString[3] - ONE >= BOARD_HEIGHT ||
2709        currentMoveString[2] - AAA >= BOARD_WIDTH     )
2710       return 0;
2711
2712     if (WhiteOnMove(yyboardindex)) {
2713         currentMoveString[0] = ToUpper(yytext[0]);
2714         return (int) WhiteDrop;
2715     } else {
2716         currentMoveString[0] = ToLower(yytext[0]);
2717         return (int) BlackDrop;
2718     }
2719 }
2720         YY_BREAK
2721 case 11:
2722 YY_RULE_SETUP
2723 {
2724     if (WhiteOnMove(yyboardindex))
2725       return (int) BlackWins;
2726     else
2727       return (int) WhiteWins;
2728 }
2729         YY_BREAK
2730 case 12:
2731 YY_RULE_SETUP
2732 {
2733     return (int) (ToUpper(yytext[0]) == 'W' ? BlackWins : WhiteWins);
2734 }
2735         YY_BREAK
2736 case 13:
2737 YY_RULE_SETUP
2738 {
2739     return (int) GameUnfinished;
2740 }
2741         YY_BREAK
2742 case 14:
2743 YY_RULE_SETUP
2744 {
2745     return (int) GameIsDrawn;
2746 }
2747         YY_BREAK
2748 case 15:
2749 YY_RULE_SETUP
2750 {
2751     return (int) GameIsDrawn;
2752 }
2753         YY_BREAK
2754 case 16:
2755 YY_RULE_SETUP
2756 {
2757     if (WhiteOnMove(yyboardindex))
2758       return (int) BlackWins;
2759     else
2760       return (int) WhiteWins;
2761 }
2762         YY_BREAK
2763 case 17:
2764 YY_RULE_SETUP
2765 {
2766     if (WhiteOnMove(yyboardindex))
2767       return (int) BlackWins;
2768     else
2769       return (int) WhiteWins;
2770 }
2771         YY_BREAK
2772 case 18:
2773 YY_RULE_SETUP
2774 {
2775     return (int) GameIsDrawn;
2776 }
2777         YY_BREAK
2778 case 19:
2779 YY_RULE_SETUP
2780 {
2781     return (int) GameIsDrawn;
2782 }
2783         YY_BREAK
2784 case 20:
2785 YY_RULE_SETUP
2786
2787     return (int) (ToUpper(yytext[0]) == 'W' ? WhiteWins : BlackWins);
2788 }
2789         YY_BREAK
2790 case 21:
2791 YY_RULE_SETUP
2792
2793     return (int) (ToUpper(yytext[0]) == 'W' ? BlackWins : WhiteWins);
2794 }
2795         YY_BREAK
2796 case 22:
2797 YY_RULE_SETUP
2798
2799     return (int) WhiteWins;
2800 }
2801         YY_BREAK
2802 case 23:
2803 YY_RULE_SETUP
2804
2805     return (int) BlackWins;
2806 }
2807         YY_BREAK
2808 case 24:
2809 YY_RULE_SETUP
2810 {
2811     return (int) GameIsDrawn;
2812 }
2813         YY_BREAK
2814 case 25:
2815 YY_RULE_SETUP
2816 {
2817     return (int) GameUnfinished;
2818 }
2819         YY_BREAK
2820 case 26:
2821 /* rule 26 can match eol */
2822 YY_RULE_SETUP
2823 {
2824     /* move numbers */
2825     if ((yyleng == 1) && (yytext[0] == '1'))
2826       return (int) MoveNumberOne;
2827 }
2828         YY_BREAK
2829 case 27:
2830 YY_RULE_SETUP
2831 {
2832     /* elapsed time indication, e.g. (0:12) or {10:21.071} */ 
2833     return (int) ElapsedTime;
2834 }
2835         YY_BREAK
2836 case 28:
2837 /* rule 28 can match eol */
2838 YY_RULE_SETUP
2839 {
2840     /* position diagram enclosed in [-- --] */
2841     return (int) PositionDiagram;
2842 }
2843         YY_BREAK
2844 case 29:
2845 /* rule 29 can match eol */
2846 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
2847 (yy_c_buf_p) = yy_cp -= 1;
2848 YY_DO_BEFORE_ACTION; /* set up yytext again */
2849 YY_RULE_SETUP
2850 {
2851     /* position diagram enclosed in {-- --} */
2852     return (int) PositionDiagram;
2853 }
2854         YY_BREAK
2855 case 30:
2856 /* rule 30 can match eol */
2857 YY_RULE_SETUP
2858 {
2859     return (int) PGNTag;
2860 }    
2861         YY_BREAK
2862 case 31:
2863 YY_RULE_SETUP
2864 {
2865     return (int) GNUChessGame;
2866 }
2867         YY_BREAK
2868 case 32:
2869 /* rule 32 can match eol */
2870 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
2871 (yy_c_buf_p) = yy_cp -= 1;
2872 YY_DO_BEFORE_ACTION; /* set up yytext again */
2873 YY_RULE_SETUP
2874 {
2875     return (int) XBoardGame;
2876 }
2877         YY_BREAK
2878 case 33:
2879 YY_RULE_SETUP
2880 {                               /* numeric annotation glyph */
2881     return (int) NAG;
2882 }
2883         YY_BREAK
2884 case 34:
2885 /* rule 34 can match eol */
2886 YY_RULE_SETUP
2887 {                               /* anything in {} */
2888     return (int) Comment; 
2889 }
2890         YY_BREAK
2891 case 35:
2892 *yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
2893 (yy_c_buf_p) = yy_cp -= 1;
2894 YY_DO_BEFORE_ACTION; /* set up yytext again */
2895 YY_RULE_SETUP
2896 {                                          /* ; to end of line */
2897     return (int) Comment;
2898 }
2899         YY_BREAK
2900 case 36:
2901 /* rule 36 can match eol */
2902 YY_RULE_SETUP
2903 {                               /* anything in [] */
2904     return (int) Comment; 
2905 }
2906         YY_BREAK
2907 case 37:
2908 /* rule 37 can match eol */
2909 YY_RULE_SETUP
2910 { /* very nested () */
2911     return (int) Comment; 
2912 }
2913         YY_BREAK
2914 case 38:
2915 /* rule 38 can match eol */
2916 YY_RULE_SETUP
2917 {                               /* >=2 chars in () */
2918     return (int) Comment; 
2919 }       
2920         YY_BREAK
2921 case 39:
2922 /* rule 39 can match eol */
2923 YY_RULE_SETUP
2924 {
2925         /* Skip mail headers */
2926 }
2927         YY_BREAK
2928 case 40:
2929 YY_RULE_SETUP
2930 {
2931         /* Skip random words */
2932 }
2933         YY_BREAK
2934 case 41:
2935 /* rule 41 can match eol */
2936 YY_RULE_SETUP
2937 {
2938         /* Skip everything else */
2939 }
2940         YY_BREAK
2941 case 42:
2942 YY_RULE_SETUP
2943 ECHO;
2944         YY_BREAK
2945                         case YY_STATE_EOF(INITIAL):
2946                                 yyterminate();
2947
2948         case YY_END_OF_BUFFER:
2949                 {
2950                 /* Amount of text matched not including the EOB char. */
2951                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2952
2953                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2954                 *yy_cp = (yy_hold_char);
2955                 YY_RESTORE_YY_MORE_OFFSET
2956
2957                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2958                         {
2959                         /* We're scanning a new file or input source.  It's
2960                          * possible that this happened because the user
2961                          * just pointed yyin at a new source and called
2962                          * yylex().  If so, then we have to assure
2963                          * consistency between YY_CURRENT_BUFFER and our
2964                          * globals.  Here is the right place to do so, because
2965                          * this is the first action (other than possibly a
2966                          * back-up) that will match for the new input source.
2967                          */
2968                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2969                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2970                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2971                         }
2972
2973                 /* Note that here we test for yy_c_buf_p "<=" to the position
2974                  * of the first EOB in the buffer, since yy_c_buf_p will
2975                  * already have been incremented past the NUL character
2976                  * (since all states make transitions on EOB to the
2977                  * end-of-buffer state).  Contrast this with the test
2978                  * in input().
2979                  */
2980                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2981                         { /* This was really a NUL. */
2982                         yy_state_type yy_next_state;
2983
2984                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2985
2986                         yy_current_state = yy_get_previous_state(  );
2987
2988                         /* Okay, we're now positioned to make the NUL
2989                          * transition.  We couldn't have
2990                          * yy_get_previous_state() go ahead and do it
2991                          * for us because it doesn't know how to deal
2992                          * with the possibility of jamming (and we don't
2993                          * want to build jamming into it because then it
2994                          * will run more slowly).
2995                          */
2996
2997                         yy_next_state = yy_try_NUL_trans( yy_current_state );
2998
2999                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3000
3001                         if ( yy_next_state )
3002                                 {
3003                                 /* Consume the NUL. */
3004                                 yy_cp = ++(yy_c_buf_p);
3005                                 yy_current_state = yy_next_state;
3006                                 goto yy_match;
3007                                 }
3008
3009                         else
3010                                 {
3011                                 yy_cp = (yy_c_buf_p);
3012                                 goto yy_find_action;
3013                                 }
3014                         }
3015
3016                 else switch ( yy_get_next_buffer(  ) )
3017                         {
3018                         case EOB_ACT_END_OF_FILE:
3019                                 {
3020                                 (yy_did_buffer_switch_on_eof) = 0;
3021
3022                                 if ( yywrap( ) )
3023                                         {
3024                                         /* Note: because we've taken care in
3025                                          * yy_get_next_buffer() to have set up
3026                                          * yytext, we can now set up
3027                                          * yy_c_buf_p so that if some total
3028                                          * hoser (like flex itself) wants to
3029                                          * call the scanner after we return the
3030                                          * YY_NULL, it'll still work - another
3031                                          * YY_NULL will get returned.
3032                                          */
3033                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
3034
3035                                         yy_act = YY_STATE_EOF(YY_START);
3036                                         goto do_action;
3037                                         }
3038
3039                                 else
3040                                         {
3041                                         if ( ! (yy_did_buffer_switch_on_eof) )
3042                                                 YY_NEW_FILE;
3043                                         }
3044                                 break;
3045                                 }
3046
3047                         case EOB_ACT_CONTINUE_SCAN:
3048                                 (yy_c_buf_p) =
3049                                         (yytext_ptr) + yy_amount_of_matched_text;
3050
3051                                 yy_current_state = yy_get_previous_state(  );
3052
3053                                 yy_cp = (yy_c_buf_p);
3054                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3055                                 goto yy_match;
3056
3057                         case EOB_ACT_LAST_MATCH:
3058                                 (yy_c_buf_p) =
3059                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
3060
3061                                 yy_current_state = yy_get_previous_state(  );
3062
3063                                 yy_cp = (yy_c_buf_p);
3064                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3065                                 goto yy_find_action;
3066                         }
3067                 break;
3068                 }
3069
3070         default:
3071                 YY_FATAL_ERROR(
3072                         "fatal flex scanner internal error--no action found" );
3073         } /* end of action switch */
3074                 } /* end of scanning one token */
3075 } /* end of yylex */
3076
3077 /* yy_get_next_buffer - try to read in a new buffer
3078  *
3079  * Returns a code representing an action:
3080  *      EOB_ACT_LAST_MATCH -
3081  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
3082  *      EOB_ACT_END_OF_FILE - end of file
3083  */
3084 static int yy_get_next_buffer (void)
3085 {
3086         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
3087         register char *source = (yytext_ptr);
3088         register int number_to_move, i;
3089         int ret_val;
3090
3091         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
3092                 YY_FATAL_ERROR(
3093                 "fatal flex scanner internal error--end of buffer missed" );
3094
3095         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
3096                 { /* Don't try to fill the buffer, so this is an EOF. */
3097                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
3098                         {
3099                         /* We matched a single character, the EOB, so
3100                          * treat this as a final EOF.
3101                          */
3102                         return EOB_ACT_END_OF_FILE;
3103                         }
3104
3105                 else
3106                         {
3107                         /* We matched some text prior to the EOB, first
3108                          * process it.
3109                          */
3110                         return EOB_ACT_LAST_MATCH;
3111                         }
3112                 }
3113
3114         /* Try to read more data. */
3115
3116         /* First move last chars to start of buffer. */
3117         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
3118
3119         for ( i = 0; i < number_to_move; ++i )
3120                 *(dest++) = *(source++);
3121
3122         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
3123                 /* don't do the read, it's not guaranteed to return an EOF,
3124                  * just force an EOF
3125                  */
3126                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
3127
3128         else
3129                 {
3130                         int num_to_read =
3131                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
3132
3133                 while ( num_to_read <= 0 )
3134                         { /* Not enough room in the buffer - grow it. */
3135
3136                         YY_FATAL_ERROR(
3137 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
3138
3139                         }
3140
3141                 if ( num_to_read > YY_READ_BUF_SIZE )
3142                         num_to_read = YY_READ_BUF_SIZE;
3143
3144                 /* Read in more data. */
3145                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
3146                         (yy_n_chars), (size_t) num_to_read );
3147
3148                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3149                 }
3150
3151         if ( (yy_n_chars) == 0 )
3152                 {
3153                 if ( number_to_move == YY_MORE_ADJ )
3154                         {
3155                         ret_val = EOB_ACT_END_OF_FILE;
3156                         yyrestart(yyin  );
3157                         }
3158
3159                 else
3160                         {
3161                         ret_val = EOB_ACT_LAST_MATCH;
3162                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
3163                                 YY_BUFFER_EOF_PENDING;
3164                         }
3165                 }
3166
3167         else
3168                 ret_val = EOB_ACT_CONTINUE_SCAN;
3169
3170         if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
3171                 /* Extend the array by 50%, plus the number we really need. */
3172                 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
3173                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
3174                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3175                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
3176         }
3177
3178         (yy_n_chars) += number_to_move;
3179         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
3180         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
3181
3182         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
3183
3184         return ret_val;
3185 }
3186
3187 /* yy_get_previous_state - get the state just before the EOB char was reached */
3188
3189     static yy_state_type yy_get_previous_state (void)
3190 {
3191         register yy_state_type yy_current_state;
3192         register char *yy_cp;
3193     
3194         yy_current_state = (yy_start);
3195         yy_current_state += YY_AT_BOL();
3196
3197         (yy_state_ptr) = (yy_state_buf);
3198         *(yy_state_ptr)++ = yy_current_state;
3199
3200         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
3201                 {
3202                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
3203                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3204                         {
3205                         yy_current_state = (int) yy_def[yy_current_state];
3206                         if ( yy_current_state >= 688 )
3207                                 yy_c = yy_meta[(unsigned int) yy_c];
3208                         }
3209                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3210                 *(yy_state_ptr)++ = yy_current_state;
3211                 }
3212
3213         return yy_current_state;
3214 }
3215
3216 /* yy_try_NUL_trans - try to make a transition on the NUL character
3217  *
3218  * synopsis
3219  *      next_state = yy_try_NUL_trans( current_state );
3220  */
3221     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
3222 {
3223         register int yy_is_jam;
3224     
3225         register YY_CHAR yy_c = 1;
3226         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3227                 {
3228                 yy_current_state = (int) yy_def[yy_current_state];
3229                 if ( yy_current_state >= 688 )
3230                         yy_c = yy_meta[(unsigned int) yy_c];
3231                 }
3232         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3233         yy_is_jam = (yy_current_state == 687);
3234         if ( ! yy_is_jam )
3235                 *(yy_state_ptr)++ = yy_current_state;
3236
3237         return yy_is_jam ? 0 : yy_current_state;
3238 }
3239
3240     static void yyunput (int c, register char * yy_bp )
3241 {
3242         register char *yy_cp;
3243     
3244     yy_cp = (yy_c_buf_p);
3245
3246         /* undo effects of setting up yytext */
3247         *yy_cp = (yy_hold_char);
3248
3249         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3250                 { /* need to shift things up to make room */
3251                 /* +2 for EOB chars. */
3252                 register int number_to_move = (yy_n_chars) + 2;
3253                 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
3254                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
3255                 register char *source =
3256                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
3257
3258                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3259                         *--dest = *--source;
3260
3261                 yy_cp += (int) (dest - source);
3262                 yy_bp += (int) (dest - source);
3263                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
3264                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
3265
3266                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3267                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
3268                 }
3269
3270         *--yy_cp = (char) c;
3271
3272         (yytext_ptr) = yy_bp;
3273         (yy_hold_char) = *yy_cp;
3274         (yy_c_buf_p) = yy_cp;
3275 }
3276
3277 #ifndef YY_NO_INPUT
3278 #ifdef __cplusplus
3279     static int yyinput (void)
3280 #else
3281     static int input  (void)
3282 #endif
3283
3284 {
3285         int c;
3286     
3287         *(yy_c_buf_p) = (yy_hold_char);
3288
3289         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
3290                 {
3291                 /* yy_c_buf_p now points to the character we want to return.
3292                  * If this occurs *before* the EOB characters, then it's a
3293                  * valid NUL; if not, then we've hit the end of the buffer.
3294                  */
3295                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3296                         /* This was really a NUL. */
3297                         *(yy_c_buf_p) = '\0';
3298
3299                 else
3300                         { /* need more input */
3301                         int offset = (yy_c_buf_p) - (yytext_ptr);
3302                         ++(yy_c_buf_p);
3303
3304                         switch ( yy_get_next_buffer(  ) )
3305                                 {
3306                                 case EOB_ACT_LAST_MATCH:
3307                                         /* This happens because yy_g_n_b()
3308                                          * sees that we've accumulated a
3309                                          * token and flags that we need to
3310                                          * try matching the token before
3311                                          * proceeding.  But for input(),
3312                                          * there's no matching to consider.
3313                                          * So convert the EOB_ACT_LAST_MATCH
3314                                          * to EOB_ACT_END_OF_FILE.
3315                                          */
3316
3317                                         /* Reset buffer status. */
3318                                         yyrestart(yyin );
3319
3320                                         /*FALLTHROUGH*/
3321
3322                                 case EOB_ACT_END_OF_FILE:
3323                                         {
3324                                         if ( yywrap( ) )
3325                                                 return EOF;
3326
3327                                         if ( ! (yy_did_buffer_switch_on_eof) )
3328                                                 YY_NEW_FILE;
3329 #ifdef __cplusplus
3330                                         return yyinput();
3331 #else
3332                                         return input();
3333 #endif
3334                                         }
3335
3336                                 case EOB_ACT_CONTINUE_SCAN:
3337                                         (yy_c_buf_p) = (yytext_ptr) + offset;
3338                                         break;
3339                                 }
3340                         }
3341                 }
3342
3343         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
3344         *(yy_c_buf_p) = '\0';   /* preserve yytext */
3345         (yy_hold_char) = *++(yy_c_buf_p);
3346
3347         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
3348
3349         return c;
3350 }
3351 #endif  /* ifndef YY_NO_INPUT */
3352
3353 /** Immediately switch to a different input stream.
3354  * @param input_file A readable stream.
3355  * 
3356  * @note This function does not reset the start condition to @c INITIAL .
3357  */
3358     void yyrestart  (FILE * input_file )
3359 {
3360     
3361         if ( ! YY_CURRENT_BUFFER ){
3362         yyensure_buffer_stack ();
3363                 YY_CURRENT_BUFFER_LVALUE =
3364             yy_create_buffer(yyin,YY_BUF_SIZE );
3365         }
3366
3367         yy_init_buffer(YY_CURRENT_BUFFER,input_file );
3368         yy_load_buffer_state( );
3369 }
3370
3371 /** Switch to a different input buffer.
3372  * @param new_buffer The new input buffer.
3373  * 
3374  */
3375     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
3376 {
3377     
3378         /* TODO. We should be able to replace this entire function body
3379          * with
3380          *              yypop_buffer_state();
3381          *              yypush_buffer_state(new_buffer);
3382      */
3383         yyensure_buffer_stack ();
3384         if ( YY_CURRENT_BUFFER == new_buffer )
3385                 return;
3386
3387         if ( YY_CURRENT_BUFFER )
3388                 {
3389                 /* Flush out information for old buffer. */
3390                 *(yy_c_buf_p) = (yy_hold_char);
3391                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3392                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3393                 }
3394
3395         YY_CURRENT_BUFFER_LVALUE = new_buffer;
3396         yy_load_buffer_state( );
3397
3398         /* We don't actually know whether we did this switch during
3399          * EOF (yywrap()) processing, but the only time this flag
3400          * is looked at is after yywrap() is called, so it's safe
3401          * to go ahead and always set it.
3402          */
3403         (yy_did_buffer_switch_on_eof) = 1;
3404 }
3405
3406 static void yy_load_buffer_state  (void)
3407 {
3408         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3409         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3410         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3411         (yy_hold_char) = *(yy_c_buf_p);
3412 }
3413
3414 /** Allocate and initialize an input buffer state.
3415  * @param file A readable stream.
3416  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3417  * 
3418  * @return the allocated buffer state.
3419  */
3420     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
3421 {
3422         YY_BUFFER_STATE b;
3423     
3424         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
3425         if ( ! b )
3426                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3427
3428         b->yy_buf_size = size;
3429
3430         /* yy_ch_buf has to be 2 characters longer than the size given because
3431          * we need to put in 2 end-of-buffer characters.
3432          */
3433         b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
3434         if ( ! b->yy_ch_buf )
3435                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
3436
3437         b->yy_is_our_buffer = 1;
3438
3439         yy_init_buffer(b,file );
3440
3441         return b;
3442 }
3443
3444 /** Destroy the buffer.
3445  * @param b a buffer created with yy_create_buffer()
3446  * 
3447  */
3448     void yy_delete_buffer (YY_BUFFER_STATE  b )
3449 {
3450     
3451         if ( ! b )
3452                 return;
3453
3454         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3455                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3456
3457         if ( b->yy_is_our_buffer )
3458                 yyfree((void *) b->yy_ch_buf  );
3459
3460         yyfree((void *) b  );
3461 }
3462
3463 #ifndef __cplusplus
3464 extern int isatty (int );
3465 #endif /* __cplusplus */
3466     
3467 /* Initializes or reinitializes a buffer.
3468  * This function is sometimes called more than once on the same buffer,
3469  * such as during a yyrestart() or at EOF.
3470  */
3471     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
3472
3473 {
3474         int oerrno = errno;
3475     
3476         yy_flush_buffer(b );
3477
3478         b->yy_input_file = file;
3479         b->yy_fill_buffer = 1;
3480
3481     /* If b is the current buffer, then yy_init_buffer was _probably_
3482      * called from yyrestart() or through yy_get_next_buffer.
3483      * In that case, we don't want to reset the lineno or column.
3484      */
3485     if (b != YY_CURRENT_BUFFER){
3486         b->yy_bs_lineno = 1;
3487         b->yy_bs_column = 0;
3488     }
3489
3490         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3491     
3492         errno = oerrno;
3493 }
3494
3495 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3496  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3497  * 
3498  */
3499     void yy_flush_buffer (YY_BUFFER_STATE  b )
3500 {
3501         if ( ! b )
3502                 return;
3503
3504         b->yy_n_chars = 0;
3505
3506         /* We always need two end-of-buffer characters.  The first causes
3507          * a transition to the end-of-buffer state.  The second causes
3508          * a jam in that state.
3509          */
3510         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3511         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3512
3513         b->yy_buf_pos = &b->yy_ch_buf[0];
3514
3515         b->yy_at_bol = 1;
3516         b->yy_buffer_status = YY_BUFFER_NEW;
3517
3518         if ( b == YY_CURRENT_BUFFER )
3519                 yy_load_buffer_state( );
3520 }
3521
3522 /** Pushes the new state onto the stack. The new state becomes
3523  *  the current state. This function will allocate the stack
3524  *  if necessary.
3525  *  @param new_buffer The new state.
3526  *  
3527  */
3528 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
3529 {
3530         if (new_buffer == NULL)
3531                 return;
3532
3533         yyensure_buffer_stack();
3534
3535         /* This block is copied from yy_switch_to_buffer. */
3536         if ( YY_CURRENT_BUFFER )
3537                 {
3538                 /* Flush out information for old buffer. */
3539                 *(yy_c_buf_p) = (yy_hold_char);
3540                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3541                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3542                 }
3543
3544         /* Only push if top exists. Otherwise, replace top. */
3545         if (YY_CURRENT_BUFFER)
3546                 (yy_buffer_stack_top)++;
3547         YY_CURRENT_BUFFER_LVALUE = new_buffer;
3548
3549         /* copied from yy_switch_to_buffer. */
3550         yy_load_buffer_state( );
3551         (yy_did_buffer_switch_on_eof) = 1;
3552 }
3553
3554 /** Removes and deletes the top of the stack, if present.
3555  *  The next element becomes the new top.
3556  *  
3557  */
3558 void yypop_buffer_state (void)
3559 {
3560         if (!YY_CURRENT_BUFFER)
3561                 return;
3562
3563         yy_delete_buffer(YY_CURRENT_BUFFER );
3564         YY_CURRENT_BUFFER_LVALUE = NULL;
3565         if ((yy_buffer_stack_top) > 0)
3566                 --(yy_buffer_stack_top);
3567
3568         if (YY_CURRENT_BUFFER) {
3569                 yy_load_buffer_state( );
3570                 (yy_did_buffer_switch_on_eof) = 1;
3571         }
3572 }
3573
3574 /* Allocates the stack if it does not exist.
3575  *  Guarantees space for at least one push.
3576  */
3577 static void yyensure_buffer_stack (void)
3578 {
3579         int num_to_alloc;
3580     
3581         if (!(yy_buffer_stack)) {
3582
3583                 /* First allocation is just for 2 elements, since we don't know if this
3584                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
3585                  * immediate realloc on the next call.
3586          */
3587                 num_to_alloc = 1;
3588                 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
3589                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
3590                                                                 );
3591                 if ( ! (yy_buffer_stack) )
3592                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3593                                                                   
3594                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3595                                 
3596                 (yy_buffer_stack_max) = num_to_alloc;
3597                 (yy_buffer_stack_top) = 0;
3598                 return;
3599         }
3600
3601         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3602
3603                 /* Increase the buffer to prepare for a possible push. */
3604                 int grow_size = 8 /* arbitrary grow size */;
3605
3606                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
3607                 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
3608                                                                 ((yy_buffer_stack),
3609                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
3610                                                                 );
3611                 if ( ! (yy_buffer_stack) )
3612                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3613
3614                 /* zero only the new slots.*/
3615                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3616                 (yy_buffer_stack_max) = num_to_alloc;
3617         }
3618 }
3619
3620 /** Setup the input buffer state to scan directly from a user-specified character buffer.
3621  * @param base the character buffer
3622  * @param size the size in bytes of the character buffer
3623  * 
3624  * @return the newly allocated buffer state object. 
3625  */
3626 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
3627 {
3628         YY_BUFFER_STATE b;
3629     
3630         if ( size < 2 ||
3631              base[size-2] != YY_END_OF_BUFFER_CHAR ||
3632              base[size-1] != YY_END_OF_BUFFER_CHAR )
3633                 /* They forgot to leave room for the EOB's. */
3634                 return 0;
3635
3636         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
3637         if ( ! b )
3638                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3639
3640         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
3641         b->yy_buf_pos = b->yy_ch_buf = base;
3642         b->yy_is_our_buffer = 0;
3643         b->yy_input_file = 0;
3644         b->yy_n_chars = b->yy_buf_size;
3645         b->yy_is_interactive = 0;
3646         b->yy_at_bol = 1;
3647         b->yy_fill_buffer = 0;
3648         b->yy_buffer_status = YY_BUFFER_NEW;
3649
3650         yy_switch_to_buffer(b  );
3651
3652         return b;
3653 }
3654
3655 /** Setup the input buffer state to scan a string. The next call to yylex() will
3656  * scan from a @e copy of @a str.
3657  * @param yystr a NUL-terminated string to scan
3658  * 
3659  * @return the newly allocated buffer state object.
3660  * @note If you want to scan bytes that may contain NUL values, then use
3661  *       yy_scan_bytes() instead.
3662  */
3663 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
3664 {
3665     
3666         return yy_scan_bytes(yystr,strlen(yystr) );
3667 }
3668
3669 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3670  * scan from a @e copy of @a bytes.
3671  * @param bytes the byte buffer to scan
3672  * @param len the number of bytes in the buffer pointed to by @a bytes.
3673  * 
3674  * @return the newly allocated buffer state object.
3675  */
3676 YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
3677 {
3678         YY_BUFFER_STATE b;
3679         char *buf;
3680         yy_size_t n;
3681         int i;
3682     
3683         /* Get memory for full buffer, including space for trailing EOB's. */
3684         n = _yybytes_len + 2;
3685         buf = (char *) yyalloc(n  );
3686         if ( ! buf )
3687                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3688
3689         for ( i = 0; i < _yybytes_len; ++i )
3690                 buf[i] = yybytes[i];
3691
3692         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3693
3694         b = yy_scan_buffer(buf,n );
3695         if ( ! b )
3696                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3697
3698         /* It's okay to grow etc. this buffer, and we should throw it
3699          * away when we're done.
3700          */
3701         b->yy_is_our_buffer = 1;
3702
3703         return b;
3704 }
3705
3706 #ifndef YY_EXIT_FAILURE
3707 #define YY_EXIT_FAILURE 2
3708 #endif
3709
3710 static void yy_fatal_error (yyconst char* msg )
3711 {
3712         (void) fprintf( stderr, "%s\n", msg );
3713         exit( YY_EXIT_FAILURE );
3714 }
3715
3716 /* Redefine yyless() so it works in section 3 code. */
3717
3718 #undef yyless
3719 #define yyless(n) \
3720         do \
3721                 { \
3722                 /* Undo effects of setting up yytext. */ \
3723         int yyless_macro_arg = (n); \
3724         YY_LESS_LINENO(yyless_macro_arg);\
3725                 yytext[yyleng] = (yy_hold_char); \
3726                 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3727                 (yy_hold_char) = *(yy_c_buf_p); \
3728                 *(yy_c_buf_p) = '\0'; \
3729                 yyleng = yyless_macro_arg; \
3730                 } \
3731         while ( 0 )
3732
3733 /* Accessor  methods (get/set functions) to struct members. */
3734
3735 /** Get the current line number.
3736  * 
3737  */
3738 int yyget_lineno  (void)
3739 {
3740         
3741     return yylineno;
3742 }
3743
3744 /** Get the input stream.
3745  * 
3746  */
3747 FILE *yyget_in  (void)
3748 {
3749         return yyin;
3750 }
3751
3752 /** Get the output stream.
3753  * 
3754  */
3755 FILE *yyget_out  (void)
3756 {
3757         return yyout;
3758 }
3759
3760 /** Get the length of the current token.
3761  * 
3762  */
3763 int yyget_leng  (void)
3764 {
3765         return yyleng;
3766 }
3767
3768 /** Get the current token.
3769  * 
3770  */
3771
3772 char *yyget_text  (void)
3773 {
3774         return yytext;
3775 }
3776
3777 /** Set the current line number.
3778  * @param line_number
3779  * 
3780  */
3781 void yyset_lineno (int  line_number )
3782 {
3783     
3784     yylineno = line_number;
3785 }
3786
3787 /** Set the input stream. This does not discard the current
3788  * input buffer.
3789  * @param in_str A readable stream.
3790  * 
3791  * @see yy_switch_to_buffer
3792  */
3793 void yyset_in (FILE *  in_str )
3794 {
3795         yyin = in_str ;
3796 }
3797
3798 void yyset_out (FILE *  out_str )
3799 {
3800         yyout = out_str ;
3801 }
3802
3803 int yyget_debug  (void)
3804 {
3805         return yy_flex_debug;
3806 }
3807
3808 void yyset_debug (int  bdebug )
3809 {
3810         yy_flex_debug = bdebug ;
3811 }
3812
3813 static int yy_init_globals (void)
3814 {
3815         /* Initialization is the same as for the non-reentrant scanner.
3816      * This function is called from yylex_destroy(), so don't allocate here.
3817      */
3818
3819     (yy_buffer_stack) = 0;
3820     (yy_buffer_stack_top) = 0;
3821     (yy_buffer_stack_max) = 0;
3822     (yy_c_buf_p) = (char *) 0;
3823     (yy_init) = 0;
3824     (yy_start) = 0;
3825
3826     (yy_state_buf) = 0;
3827     (yy_state_ptr) = 0;
3828     (yy_full_match) = 0;
3829     (yy_lp) = 0;
3830
3831 /* Defined in main.c */
3832 #ifdef YY_STDINIT
3833     yyin = stdin;
3834     yyout = stdout;
3835 #else
3836     yyin = (FILE *) 0;
3837     yyout = (FILE *) 0;
3838 #endif
3839
3840     /* For future reference: Set errno on error, since we are called by
3841      * yylex_init()
3842      */
3843     return 0;
3844 }
3845
3846 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3847 int yylex_destroy  (void)
3848 {
3849     
3850     /* Pop the buffer stack, destroying each element. */
3851         while(YY_CURRENT_BUFFER){
3852                 yy_delete_buffer(YY_CURRENT_BUFFER  );
3853                 YY_CURRENT_BUFFER_LVALUE = NULL;
3854                 yypop_buffer_state();
3855         }
3856
3857         /* Destroy the stack itself. */
3858         yyfree((yy_buffer_stack) );
3859         (yy_buffer_stack) = NULL;
3860
3861     yyfree ( (yy_state_buf) );
3862     (yy_state_buf)  = NULL;
3863
3864     /* Reset the globals. This is important in a non-reentrant scanner so the next time
3865      * yylex() is called, initialization will occur. */
3866     yy_init_globals( );
3867
3868     return 0;
3869 }
3870
3871 /*
3872  * Internal utility routines.
3873  */
3874
3875 #ifndef yytext_ptr
3876 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3877 {
3878         register int i;
3879         for ( i = 0; i < n; ++i )
3880                 s1[i] = s2[i];
3881 }
3882 #endif
3883
3884 #ifdef YY_NEED_STRLEN
3885 static int yy_flex_strlen (yyconst char * s )
3886 {
3887         register int n;
3888         for ( n = 0; s[n]; ++n )
3889                 ;
3890
3891         return n;
3892 }
3893 #endif
3894
3895 void *yyalloc (yy_size_t  size )
3896 {
3897         return (void *) malloc( size );
3898 }
3899
3900 void *yyrealloc  (void * ptr, yy_size_t  size )
3901 {
3902         /* The cast to (char *) in the following accommodates both
3903          * implementations that use char* generic pointers, and those
3904          * that use void* generic pointers.  It works with the latter
3905          * because both ANSI C and C++ allow castless assignment from
3906          * any pointer type to void*, and deal with argument conversions
3907          * as though doing an assignment.
3908          */
3909         return (void *) realloc( (char *) ptr, size );
3910 }
3911
3912 void yyfree (void * ptr )
3913 {
3914         free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
3915 }
3916
3917 #define YYTABLES_NAME "yytables"
3918
3919 static char *StringToLex;
3920
3921 #ifndef FLEX_SCANNER
3922 static FILE *lexFP;
3923
3924 static int input()
3925 {
3926     int ret;
3927     
3928     if (StringToLex != NULL) {
3929         ret = *StringToLex;
3930         if (ret == NULLCHAR)
3931           ret = EOF;
3932         else
3933           StringToLex++;
3934     } else if (unputCount > 0) {
3935         ret = unputBuffer[--unputCount];
3936     } else {
3937         ret = fgetc(lexFP);
3938     }    
3939
3940     if (ret == EOF) 
3941       return 0;
3942     else
3943       return ret;
3944 }
3945
3946 /*
3947  * Return offset of next pattern within current file
3948  */
3949 int yyoffset()
3950 {
3951     int offset = ftell(lexFP) - unputCount;
3952
3953     if (offset < 0) {
3954         offset = 0;
3955     }
3956     return(offset);
3957 }
3958  
3959 static void output(ch)
3960      int ch;
3961 {
3962     if(appData.debugMode) fprintf(debugFP, "PARSER BUG: unmatched character '%c' (0%o)\n",
3963             ch, ch);
3964 }
3965
3966 static void unput(ch)
3967      int ch;
3968 {
3969     if (ch == 0) return;
3970     if (StringToLex != NULL) {
3971         StringToLex--;
3972     } else {
3973         if (unputCount >= UNPUT_BUF_SIZE)
3974           if(appData.debugMode) fprintf(debugFP, "PARSER BUG: unput buffer overflow '%c' (0%o)\n",
3975                   ch, ch);
3976         unputBuffer[unputCount++] = ch;
3977     }
3978 }
3979
3980 /* Get ready to lex from a new file.  Kludge below sticks
3981    an artificial newline at the front of the file, which the
3982    above grammar ignores, but which makes ^ at start of pattern
3983    match at the real start of the file.
3984 */
3985 void yynewfile(f)
3986      FILE *f;
3987 {
3988     lexFP = f;
3989     StringToLex = NULL;
3990     unputCount = 0;
3991     unput('\n'); /* kludge */
3992 }
3993
3994 /* Get ready to lex from a string.  ^ at start of pattern WON'T
3995    match at the start of the string!
3996 */
3997 void yynewstr(s)
3998      char *s;
3999 {
4000     lexFP = NULL;
4001     StringToLex = s;
4002     unputCount = 0;
4003 }
4004 #endif /*!FLEX_SCANNER*/
4005
4006 #ifdef FLEX_SCANNER
4007 void my_yy_input(buf, result, max_size)
4008      char *buf;
4009      int *result;
4010      int max_size;
4011 {
4012     int count;
4013
4014     if (StringToLex != NULL) {
4015         count = 0;
4016         while (*StringToLex != NULLCHAR) {
4017             *buf++ = *StringToLex++;
4018             count++;
4019         }
4020         *result = count;
4021         return;
4022     } else {
4023         count = fread(buf, 1, max_size, yyin);
4024         if (count == 0) {
4025             *result = YY_NULL;
4026         } else {
4027             *result = count;
4028         }
4029         return;
4030     }    
4031 }
4032
4033 static YY_BUFFER_STATE my_file_buffer = NULL;
4034
4035 /*
4036     Return offset of next pattern in the current file.
4037 */
4038 int yyoffset()
4039 {
4040     int pos = yy_c_buf_p - YY_CURRENT_BUFFER->yy_ch_buf;
4041
4042     return(ftell(YY_CURRENT_BUFFER->yy_input_file) -
4043          yy_n_chars + pos);
4044 }
4045
4046 void yynewstr(s)
4047      char *s;
4048 {
4049     if (my_file_buffer != NULL)
4050       yy_delete_buffer(my_file_buffer);
4051     StringToLex = s;
4052     my_file_buffer = yy_create_buffer(stdin,YY_BUF_SIZE);
4053     yy_switch_to_buffer(my_file_buffer);
4054 }
4055
4056 void yynewfile(f)
4057      FILE *f;
4058 {
4059     if (my_file_buffer != NULL)
4060       yy_delete_buffer(my_file_buffer);
4061     StringToLex = NULL;
4062     my_file_buffer = yy_create_buffer(f,YY_BUF_SIZE);
4063     yy_switch_to_buffer(my_file_buffer);
4064 }
4065 #endif /*FLEX_SCANNER*/
4066
4067 int yywrap()
4068 {
4069     return TRUE;
4070 }
4071
4072 /* Parse a move from the given string s */
4073 /* ^ at start of pattern WON'T work here unless using flex */
4074 ChessMove yylexstr(boardIndex, s)
4075      int boardIndex;
4076      char *s;
4077 {
4078     ChessMove ret;
4079     char *oldStringToLex;
4080 #ifdef FLEX_SCANNER
4081     YY_BUFFER_STATE buffer, oldBuffer;
4082 #endif
4083     
4084     yyboardindex = boardIndex;
4085     oldStringToLex = StringToLex;
4086     StringToLex = s;
4087 #ifdef FLEX_SCANNER
4088     buffer = yy_create_buffer(stdin,YY_BUF_SIZE);
4089     oldBuffer = YY_CURRENT_BUFFER;
4090     yy_switch_to_buffer(buffer);
4091 #endif /*FLEX_SCANNER*/
4092
4093     ret = (ChessMove) yylex();
4094
4095 #ifdef FLEX_SCANNER
4096     if (oldBuffer != NULL) 
4097       yy_switch_to_buffer(oldBuffer);
4098     yy_delete_buffer(buffer);
4099 #endif /*FLEX_SCANNER*/
4100     StringToLex = oldStringToLex;
4101
4102     return ret;
4103 }
4104