4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex via 'flex -S flexhack.skl'
7 * where flexhack.skl is a nethack-specific alternate skeleton derived
8 * from flex 2.6.0's skel.c (which in turn was generated from flex.skl).
10 * Support for C++, re-entrancy, and table serialization stripped out.
11 * NetHack's usage doesn't need them and we want to reduce the size and
12 * complexity of this skeleton as well as of the generated scanner code.
14 #define FLEXHACK_SCANNER
15 #define YY_FLEX_MAJOR_VERSION 2
16 #define YY_FLEX_MINOR_VERSION 6
17 #define YY_FLEX_SUBMINOR_VERSION 0
23 /* we don't care if actual types happen to have more bits than their names;
24 the tables will just take up more space, possibly slowing the parse;
25 still, allow config.h to override these via typedef+#define if desired */
27 typedef int flex_int32_t;
30 typedef short int flex_int16_t;
33 typedef unsigned short int flex_uint16_t;
38 /* Returned upon end-of-file. */
41 /* Promotes a possibly negative, possibly signed char to an unsigned
42 * integer for use as an array index. If the signed char is negative,
43 * we want to instead treat it as an 8-bit unsigned char, hence the
46 #define YY_SC_TO_UI(c) ((unsigned int) (uchar) c)
48 /* Enter a start condition. This macro really ought to take a parameter,
49 * but we do it the disgusting crufty way forced on us by the ()-less
50 * definition of BEGIN.
52 #define BEGIN (yy_start) = 1 + 2 *
54 /* Translate the current start state into a value that can be later handed
55 * to BEGIN to return to the state. The YYSTATE alias is for lex
58 #define YY_START (((yy_start) - 1) / 2)
59 #define YYSTATE YY_START
61 /* Action number for EOF rule of a given start state. */
62 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
64 /* Special action meaning "start processing a new file". */
65 #define YY_NEW_FILE yyrestart(yyin )
67 #define YY_END_OF_BUFFER_CHAR 0
69 /* Size of default input buffer. */
72 /* On IA-64, the buffer size is 16k, not 8k.
73 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
74 * Ditto for the __ia64__ case accordingly.
76 #define YY_BUF_SIZE 32768
78 #define YY_BUF_SIZE 16384
82 /* The state buf must be large enough to hold one state per character
85 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
87 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
88 #define YY_TYPEDEF_YY_BUFFER_STATE
89 typedef struct yy_buffer_state *YY_BUFFER_STATE;
92 #ifndef YY_TYPEDEF_YY_SIZE_T
93 #define YY_TYPEDEF_YY_SIZE_T
94 typedef size_t yy_size_t;
97 extern yy_size_t yyleng;
98 extern FILE *yyin, *yyout;
100 #define EOB_ACT_CONTINUE_SCAN 0
101 #define EOB_ACT_END_OF_FILE 1
102 #define EOB_ACT_LAST_MATCH 2
104 #define YY_LESS_LINENO(n)
105 #define YY_LINENO_REWIND_TO(ptr)
107 /* Return all but the first "n" matched characters back to the input stream. */
110 /* Undo effects of setting up yytext. */ \
111 int yyless_macro_arg = (n); \
112 YY_LESS_LINENO(yyless_macro_arg); \
113 *yy_cp = (yy_hold_char); \
114 YY_RESTORE_YY_MORE_OFFSET \
115 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
116 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
119 #define unput(c) yyunput( c, (yytext_ptr) )
121 #ifndef YY_STRUCT_YY_BUFFER_STATE
122 #define YY_STRUCT_YY_BUFFER_STATE
123 struct yy_buffer_state {
126 char *yy_ch_buf; /* input buffer */
127 char *yy_buf_pos; /* current position in input buffer */
129 /* Size of input buffer in bytes, not including room for EOB
132 yy_size_t yy_buf_size;
134 /* Number of characters read into yy_ch_buf, not including EOB
137 yy_size_t yy_n_chars;
139 /* Whether we "own" the buffer - i.e., we know we created it,
140 * and can realloc() it to grow it, and should free() it to
143 int yy_is_our_buffer;
145 /* Whether this is an "interactive" input source; if so, and
146 * if we're using stdio for input, then we want to use getc()
147 * instead of fread(), to make sure we stop fetching input after
150 int yy_is_interactive;
152 /* Whether we're considered to be at the beginning of a line.
153 * If so, '^' rules will be active on the next match, otherwise
158 int yy_bs_lineno; /**< The line count. */
159 int yy_bs_column; /**< The column count. */
161 /* Whether to try to fill the input buffer when we reach the
166 int yy_buffer_status;
168 #define YY_BUFFER_NEW 0
169 #define YY_BUFFER_NORMAL 1
170 /* When an EOF's been seen but there's still some text to process
171 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
172 * shouldn't try reading from the input source any more. We might
173 * still have a bunch of tokens to match, though, because of
174 * possible backing-up.
176 * When we actually see the EOF, we change the status to "new"
177 * (via yyrestart()), so that the user can continue scanning by
178 * just pointing yyin at a new input file.
180 #define YY_BUFFER_EOF_PENDING 2
183 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
185 /* Stack of input buffers. */
186 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
187 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
188 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
190 /* We provide macros for accessing buffer states in case in the
191 * future we want to put the buffer states in a more general
194 * Returns the top of the stack, or NULL.
196 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
197 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
200 /* Same as previous macro, but useful when we know that the buffer stack is not
201 * NULL or when we need an lvalue. For internal use only.
203 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
205 /* yy_hold_char holds the character lost when yytext is formed. */
206 static char yy_hold_char;
207 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
210 /* Points to current character in buffer. */
211 static char *yy_c_buf_p = (char *) 0;
212 static int yy_init = 0; /* whether we need to initialize */
213 static int yy_start = 0; /* start state number */
215 /* Flag which is used to allow yywrap()'s to do buffer switches
216 * instead of setting up a fresh yyin. A bit of a hack ...
218 static int yy_did_buffer_switch_on_eof;
220 void yyrestart FDECL(, (FILE *input_file ));
221 void yy_switch_to_buffer FDECL(, (YY_BUFFER_STATE new_buffer ));
222 YY_BUFFER_STATE yy_create_buffer FDECL(, (FILE *file,int size ));
223 void yy_delete_buffer FDECL(, (YY_BUFFER_STATE b ));
224 void yy_flush_buffer FDECL(, (YY_BUFFER_STATE b ));
225 void yypush_buffer_state FDECL(, (YY_BUFFER_STATE new_buffer ));
226 void yypop_buffer_state FDECL(, (void ));
228 static void yyensure_buffer_stack FDECL(, (void ));
229 static void yy_load_buffer_state FDECL(, (void ));
230 static void yy_init_buffer FDECL(, (YY_BUFFER_STATE b,FILE *file ));
232 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
234 YY_BUFFER_STATE yy_scan_buffer FDECL(, (char *base,yy_size_t size ));
235 YY_BUFFER_STATE yy_scan_string FDECL(, (yyconst char *yy_str ));
236 YY_BUFFER_STATE yy_scan_bytes FDECL(, (yyconst char *bytes,yy_size_t len ));
238 void *yyalloc FDECL(, (yy_size_t ));
239 void *yyrealloc FDECL(, (void *,yy_size_t ));
240 void yyfree FDECL(, (void * ));
242 #define yy_new_buffer yy_create_buffer
243 #define yy_set_interactive(is_interactive) \
245 if ( ! YY_CURRENT_BUFFER ) { \
246 yyensure_buffer_stack (); \
247 YY_CURRENT_BUFFER_LVALUE = \
248 yy_create_buffer(yyin,YY_BUF_SIZE ); \
250 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
252 #define yy_set_bol(at_bol) \
254 if ( ! YY_CURRENT_BUFFER ) { \
255 yyensure_buffer_stack (); \
256 YY_CURRENT_BUFFER_LVALUE = \
257 yy_create_buffer(yyin,YY_BUF_SIZE ); \
259 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
261 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
263 /* Begin user sect3 */
265 typedef unsigned char YY_CHAR;
267 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
269 typedef int yy_state_type;
279 #define yytext_ptr yytext
281 static yy_state_type yy_get_previous_state FDECL(, (void ));
282 static yy_state_type yy_try_NUL_trans FDECL(, (yy_state_type current_state ));
283 static int yy_get_next_buffer FDECL(, (void ));
284 static void yy_fatal_error FDECL(, (yyconst char msg[] )) NORETURN;
286 /* Done after the current pattern has been matched and before the
287 * corresponding action - sets up yytext.
289 #define YY_DO_BEFORE_ACTION \
290 (yytext_ptr) = yy_bp; \
291 yyleng = (size_t) (yy_cp - yy_bp); \
292 (yy_hold_char) = *yy_cp; \
294 (yy_c_buf_p) = yy_cp;
296 #define YY_NUM_RULES 200
297 #define YY_END_OF_BUFFER 201
298 /* This struct is not used in this scanner,
299 but its presence is necessary. */
302 flex_int32_t yy_verify;
305 static yyconst flex_int16_t yy_accept[1057] =
307 0, 0, 0, 0, 201, 199, 195, 194, 199, 199,
308 199, 199, 199, 199, 198, 184, 192, 199, 193, 198,
309 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
310 198, 198, 198, 198, 198, 198, 198, 199, 198, 198,
311 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
312 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
313 195, 199, 198, 2, 199, 195, 199, 199, 198, 184,
314 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
315 198, 198, 195, 199, 195, 194, 188, 0, 185, 186,
316 0, 0, 182, 198, 181, 183, 184, 198, 190, 189,
318 187, 191, 198, 198, 198, 198, 198, 198, 198, 198,
319 198, 198, 198, 198, 198, 198, 198, 198, 39, 198,
320 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
321 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
322 55, 198, 198, 0, 0, 198, 198, 198, 198, 198,
323 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
324 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
325 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
326 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
327 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
329 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
330 198, 198, 154, 198, 198, 195, 0, 0, 3, 198,
331 2, 2, 0, 195, 0, 182, 198, 181, 184, 198,
332 198, 198, 198, 39, 198, 198, 198, 198, 198, 198,
333 195, 0, 2, 0, 0, 197, 0, 197, 179, 198,
334 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
335 198, 198, 54, 198, 198, 198, 198, 198, 198, 198,
336 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
337 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
338 198, 198, 198, 198, 198, 0, 198, 104, 198, 83,
340 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
341 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
342 198, 79, 198, 198, 198, 198, 198, 198, 198, 198,
343 198, 198, 198, 198, 198, 198, 198, 198, 198, 81,
344 198, 198, 198, 198, 198, 139, 198, 198, 198, 198,
345 128, 198, 198, 198, 198, 198, 198, 198, 198, 198,
346 198, 198, 198, 198, 198, 198, 198, 16, 198, 198,
347 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
348 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
349 198, 198, 126, 198, 198, 198, 198, 198, 198, 198,
351 198, 80, 198, 198, 198, 198, 198, 198, 198, 198,
352 196, 198, 198, 198, 58, 198, 198, 198, 22, 198,
353 40, 198, 41, 198, 198, 198, 198, 49, 198, 198,
354 198, 198, 56, 6, 198, 198, 198, 53, 198, 198,
355 198, 36, 198, 198, 198, 198, 42, 198, 35, 198,
356 198, 198, 198, 198, 21, 198, 0, 180, 198, 198,
357 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
358 160, 198, 198, 198, 198, 198, 198, 198, 198, 198,
359 198, 155, 158, 114, 198, 198, 198, 198, 198, 198,
360 198, 198, 198, 198, 198, 198, 69, 198, 198, 198,
362 198, 198, 198, 198, 198, 198, 121, 198, 198, 67,
363 198, 198, 198, 198, 161, 198, 198, 198, 198, 198,
364 198, 198, 198, 198, 119, 198, 198, 198, 198, 107,
365 198, 198, 198, 198, 198, 198, 198, 65, 198, 198,
366 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
367 198, 198, 198, 198, 198, 198, 157, 198, 198, 198,
368 198, 198, 116, 15, 0, 198, 198, 198, 198, 198,
369 28, 198, 59, 198, 198, 198, 198, 198, 13, 198,
370 198, 198, 50, 198, 198, 7, 198, 198, 198, 198,
371 5, 198, 198, 198, 198, 198, 198, 198, 198, 198,
373 30, 198, 198, 198, 198, 198, 120, 153, 198, 198,
374 198, 147, 198, 198, 162, 198, 198, 198, 198, 198,
375 141, 198, 198, 198, 198, 198, 198, 198, 198, 198,
376 198, 156, 198, 198, 198, 198, 198, 198, 198, 198,
377 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
378 198, 198, 198, 198, 198, 198, 198, 198, 11, 198,
379 198, 198, 198, 198, 198, 198, 113, 198, 198, 198,
380 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
381 125, 198, 12, 198, 198, 198, 198, 198, 198, 198,
382 82, 115, 198, 198, 198, 198, 198, 198, 198, 198,
384 129, 198, 198, 198, 198, 33, 198, 198, 198, 198,
385 198, 198, 198, 198, 198, 29, 198, 198, 198, 198,
386 198, 198, 17, 31, 198, 27, 198, 198, 198, 198,
387 57, 198, 198, 198, 198, 146, 97, 198, 198, 127,
388 111, 86, 198, 123, 72, 108, 198, 198, 198, 198,
389 165, 198, 198, 87, 198, 94, 130, 198, 74, 198,
390 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
391 198, 198, 198, 135, 198, 198, 109, 198, 198, 198,
392 198, 198, 198, 198, 198, 198, 110, 168, 198, 198,
393 198, 16, 198, 198, 198, 198, 77, 198, 117, 198,
395 198, 198, 198, 198, 112, 198, 198, 198, 152, 173,
396 198, 198, 78, 198, 198, 198, 198, 198, 198, 198,
397 198, 1, 57, 198, 198, 198, 60, 198, 198, 198,
398 198, 198, 198, 198, 4, 198, 19, 198, 198, 198,
399 198, 198, 62, 43, 198, 46, 26, 198, 163, 99,
400 198, 198, 198, 198, 198, 73, 159, 198, 198, 98,
401 198, 198, 198, 93, 198, 198, 198, 198, 145, 198,
402 198, 198, 198, 198, 136, 198, 198, 198, 198, 198,
403 20, 63, 140, 138, 198, 198, 198, 198, 198, 198,
404 198, 198, 118, 198, 132, 96, 198, 151, 198, 198,
406 198, 198, 198, 101, 47, 89, 198, 198, 198, 198,
407 198, 198, 45, 198, 198, 34, 61, 14, 8, 25,
408 198, 198, 198, 198, 198, 23, 198, 169, 198, 198,
409 198, 102, 177, 198, 66, 198, 75, 198, 198, 198,
410 198, 198, 198, 198, 198, 198, 198, 198, 198, 150,
411 9, 198, 198, 198, 198, 198, 144, 198, 85, 68,
412 198, 71, 198, 198, 198, 198, 176, 164, 131, 134,
413 198, 106, 18, 198, 51, 198, 198, 198, 198, 198,
414 198, 95, 142, 198, 198, 70, 174, 122, 198, 167,
415 198, 175, 198, 92, 133, 84, 148, 149, 171, 198,
417 198, 198, 100, 172, 91, 198, 64, 198, 10, 137,
418 24, 52, 198, 198, 198, 198, 198, 76, 88, 124,
419 105, 198, 198, 198, 166, 103, 198, 198, 198, 198,
420 198, 198, 198, 198, 90, 198, 37, 38, 198, 198,
421 198, 198, 143, 170, 198, 198, 198, 178, 198, 198,
422 198, 198, 48, 32, 44, 0
425 static yyconst YY_CHAR yy_ec[256] =
427 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
428 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 5, 6, 7, 8, 9, 10, 1, 11, 1,
431 1, 1, 12, 1, 13, 14, 1, 15, 15, 15,
432 15, 15, 15, 15, 15, 15, 15, 1, 1, 16,
433 17, 18, 1, 1, 19, 20, 21, 22, 23, 24,
434 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
435 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
436 45, 46, 47, 1, 48, 1, 49, 50, 51, 52,
438 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
439 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
440 73, 74, 14, 14, 14, 1, 1, 1, 1, 1,
441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
449 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
451 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
452 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
453 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
457 static yyconst YY_CHAR yy_meta[75] =
459 1, 2, 3, 2, 2, 1, 1, 2, 1, 1,
460 1, 2, 4, 2, 4, 1, 1, 1, 5, 5,
461 5, 6, 6, 5, 6, 5, 5, 6, 5, 5,
462 6, 6, 6, 5, 6, 6, 5, 5, 6, 6,
463 5, 6, 6, 6, 1, 2, 1, 6, 6, 6,
464 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
465 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
469 static yyconst flex_uint16_t yy_base[1064] =
471 0, 73, 102, 77, 1254, 1255, 75, 1255, 1250, 1235,
472 1244, 0, 1204, 1234, 1233, 78, 66, 1230, 1229, 1215,
473 1208, 57, 63, 59, 64, 101, 0, 63, 79, 119,
474 94, 1223, 1209, 122, 123, 121, 1222, 104, 105, 100,
475 124, 90, 129, 137, 1174, 84, 117, 1176, 139, 150,
476 151, 151, 156, 1169, 163, 168, 166, 56, 1184, 1183,
477 232, 1232, 216, 1255, 1231, 242, 248, 251, 264, 196,
478 155, 167, 208, 228, 241, 1218, 249, 242, 195, 277,
479 284, 223, 319, 334, 257, 1255, 1255, 1225, 1255, 0,
480 1220, 1219, 1214, 0, 1213, 1255, 298, 1212, 1255, 1255,
482 1255, 1255, 1188, 263, 1188, 264, 1200, 1190, 1203, 1184,
483 1195, 1192, 1199, 270, 1185, 1183, 1185, 1195, 0, 1186,
484 1190, 1171, 1177, 1165, 1171, 1175, 1174, 1174, 280, 1176,
485 292, 1171, 301, 1169, 1162, 1168, 1180, 1178, 1170, 259,
486 0, 1177, 1165, 203, 304, 272, 1121, 1143, 1132, 1138,
487 1141, 288, 1121, 1125, 1121, 1124, 1123, 1135, 1117, 1119,
488 308, 1115, 1109, 1106, 1111, 1110, 1116, 1120, 1111, 1113,
489 1111, 1111, 234, 281, 296, 299, 1117, 282, 1103, 1111,
490 1096, 81, 315, 1115, 324, 26, 1103, 1102, 1102, 1093,
491 330, 1103, 1107, 1093, 1109, 1104, 1107, 281, 333, 1100,
493 1102, 1098, 1090, 342, 323, 321, 1082, 1081, 1083, 1084,
494 345, 350, 0, 1081, 332, 407, 1143, 1142, 1255, 363,
495 1255, 1255, 1141, 411, 415, 416, 1128, 0, 412, 390,
496 396, 404, 415, 1127, 410, 420, 421, 422, 423, 424,
497 0, 0, 1255, 1138, 0, 1255, 1129, 1128, 1123, 1118,
498 1104, 1116, 1111, 1095, 1096, 1112, 1094, 1088, 1105, 1091,
499 1088, 1100, 0, 1092, 1102, 1091, 1099, 1080, 1081, 1096,
500 1094, 1082, 1092, 1077, 1090, 1075, 1088, 1091, 1061, 1085,
501 1077, 1068, 1083, 1077, 1073, 1071, 1077, 1071, 1072, 1062,
502 1059, 1073, 1059, 1060, 1063, 435, 1037, 0, 1042, 0,
504 1027, 1036, 1026, 1028, 1019, 1023, 1021, 1015, 1023, 385,
505 1030, 1012, 1016, 1027, 1010, 1016, 1011, 1020, 1007, 1005,
506 1009, 0, 1002, 1001, 1011, 1001, 1014, 998, 1015, 383,
507 1010, 999, 392, 1012, 989, 1005, 1006, 1000, 988, 0,
508 1003, 1003, 996, 999, 989, 0, 982, 983, 991, 994,
509 0, 987, 992, 981, 993, 983, 988, 987, 378, 986,
510 970, 977, 973, 974, 404, 966, 408, 980, 970, 982,
511 979, 968, 966, 970, 974, 392, 956, 967, 967, 971,
512 952, 969, 953, 956, 964, 950, 395, 958, 946, 964,
513 950, 945, 0, 946, 956, 939, 950, 943, 948, 936,
515 935, 0, 462, 448, 453, 971, 454, 456, 434, 455,
516 1255, 965, 979, 970, 0, 979, 970, 957, 0, 975,
517 0, 975, 0, 956, 954, 953, 967, 0, 966, 940,
518 964, 956, 0, 944, 965, 947, 944, 0, 947, 452,
519 959, 0, 960, 945, 944, 957, 953, 950, 0, 937,
520 939, 950, 936, 950, 0, 941, 468, 1255, 905, 900,
521 899, 911, 908, 909, 894, 908, 907, 895, 904, 903,
522 0, 902, 901, 886, 892, 898, 893, 889, 879, 886,
523 893, 0, 0, 0, 881, 895, 890, 889, 881, 422,
524 887, 882, 886, 880, 883, 868, 0, 921, 879, 858,
526 874, 866, 878, 861, 872, 873, 0, 872, 856, 0,
527 870, 873, 859, 862, 0, 429, 852, 850, 844, 850,
528 858, 851, 864, 849, 0, 855, 842, 849, 857, 0,
529 847, 853, 856, 836, 854, 417, 853, 0, 841, 830,
530 831, 835, 844, 828, 842, 846, 842, 824, 829, 821,
531 837, 832, 821, 824, 836, 820, 0, 817, 822, 824,
532 426, 823, 0, 1255, 876, 463, 859, 466, 475, 476,
533 0, 851, 0, 849, 853, 844, 837, 832, 0, 852,
534 843, 831, 0, 837, 831, 0, 847, 840, 845, 840,
535 0, 835, 842, 822, 829, 827, 825, 835, 822, 824,
537 0, 820, 826, 818, 823, 825, 0, 0, 795, 783,
538 793, 0, 792, 791, 0, 782, 780, 789, 780, 773,
539 0, 785, 785, 781, 782, 767, 784, 780, 764, 760,
540 440, 0, 776, 776, 774, 760, 763, 770, 770, 749,
541 768, 435, 760, 756, 758, 754, 763, 758, 745, 761,
542 757, 758, 758, 741, 741, 754, 740, 752, 0, 751,
543 739, 753, 746, 734, 735, 749, 0, 731, 743, 727,
544 721, 739, 728, 734, 730, 732, 727, 721, 737, 732,
545 0, 721, 0, 714, 714, 713, 712, 712, 725, 725,
546 443, 0, 723, 722, 717, 720, 705, 711, 708, 712,
548 0, 717, 733, 483, 490, 0, 734, 732, 726, 736,
549 735, 734, 727, 723, 739, 0, 724, 712, 81, 122,
550 205, 226, 0, 0, 311, 0, 350, 460, 483, 476,
551 0, 472, 478, 468, 463, 0, 0, 461, 464, 0,
552 0, 0, 457, 0, 0, 0, 456, 458, 467, 447,
553 0, 469, 470, 0, 458, 0, 0, 474, 0, 471,
554 470, 466, 480, 478, 478, 475, 470, 472, 482, 473,
555 470, 488, 479, 0, 483, 489, 0, 473, 475, 493,
556 488, 476, 481, 495, 489, 488, 0, 0, 491, 503,
557 489, 0, 480, 486, 492, 489, 0, 496, 514, 505,
559 495, 510, 497, 503, 0, 499, 509, 510, 0, 0,
560 511, 515, 0, 518, 509, 520, 520, 521, 522, 508,
561 528, 0, 563, 564, 557, 545, 0, 560, 551, 552,
562 553, 543, 553, 559, 0, 562, 0, 565, 554, 571,
563 545, 558, 0, 0, 557, 0, 0, 536, 0, 0,
564 544, 545, 546, 548, 548, 0, 0, 539, 535, 0,
565 544, 537, 540, 0, 554, 554, 547, 543, 0, 552,
566 546, 554, 566, 553, 0, 551, 565, 551, 568, 568,
567 0, 0, 0, 0, 565, 559, 561, 572, 566, 574,
568 555, 576, 1255, 577, 0, 0, 579, 0, 583, 570,
570 579, 575, 563, 0, 0, 0, 585, 586, 587, 587,
571 581, 606, 0, 618, 619, 0, 0, 0, 0, 0,
572 601, 627, 606, 615, 611, 0, 602, 0, 599, 600,
573 591, 0, 0, 591, 0, 595, 0, 604, 589, 602,
574 593, 611, 594, 605, 610, 598, 603, 613, 601, 0,
575 0, 608, 614, 606, 605, 620, 0, 621, 0, 0,
576 622, 0, 611, 614, 621, 618, 0, 0, 0, 0,
577 627, 0, 0, 657, 0, 658, 662, 664, 648, 662,
578 650, 0, 0, 619, 634, 0, 0, 0, 621, 0,
579 630, 0, 641, 0, 0, 0, 0, 0, 0, 630,
581 640, 626, 0, 0, 0, 628, 0, 628, 0, 0,
582 0, 0, 667, 668, 663, 664, 678, 0, 0, 0,
583 0, 642, 650, 652, 0, 0, 652, 683, 677, 681,
584 673, 685, 658, 660, 0, 661, 0, 0, 692, 696,
585 689, 650, 0, 0, 685, 692, 687, 0, 685, 690,
586 691, 687, 0, 0, 0, 1255, 724, 726, 732, 735,
590 static yyconst flex_int16_t yy_def[1064] =
592 1056, 1, 1, 3, 1056, 1056, 1056, 1056, 1056, 1056,
593 1057, 1058, 1059, 1056, 1060, 1060, 1056, 1056, 1056, 1060,
594 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
595 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1056, 1060, 1060,
596 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
597 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
598 1056, 1061, 1060, 1056, 1056, 1062, 1062, 1062, 1060, 69,
599 69, 69, 69, 1060, 69, 69, 69, 69, 69, 69,
600 69, 69, 1062, 1061, 1056, 1056, 1056, 1057, 1056, 1058,
601 1056, 1063, 1056, 1060, 1060, 1056, 1060, 1060, 1056, 1056,
603 1056, 1056, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
604 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
605 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
606 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
607 1060, 1060, 1060, 1056, 1056, 1060, 1060, 1060, 1060, 1060,
608 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
609 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
610 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
611 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
612 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
614 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
615 1060, 1060, 1060, 1060, 1060, 1056, 1061, 1061, 1056, 1060,
616 1056, 1056, 1056, 83, 83, 83, 69, 69, 69, 69,
617 69, 1060, 69, 69, 69, 69, 69, 69, 69, 69,
618 83, 84, 1056, 1061, 84, 1056, 1056, 1056, 1060, 1060,
619 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
620 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
621 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
622 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
623 1060, 1060, 1060, 1060, 1060, 1056, 1060, 1060, 1060, 1060,
625 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
626 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
627 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
628 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
629 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
630 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
631 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
632 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
633 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
634 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
636 1060, 1060, 1060, 69, 69, 1060, 69, 69, 69, 69,
637 1056, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
638 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
639 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
640 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
641 1060, 1060, 1060, 1060, 1060, 1060, 1056, 1056, 1060, 1060,
642 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
643 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
644 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
645 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
647 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
648 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
649 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
650 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
651 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
652 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
653 1060, 1060, 1060, 1056, 1056, 69, 1060, 69, 69, 69,
654 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
655 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
656 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
658 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
659 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
660 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
661 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
662 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
663 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
664 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
665 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
666 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
667 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
669 1060, 1060, 1060, 69, 69, 1060, 1060, 1060, 1060, 1060,
670 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
671 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
672 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
673 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
674 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
675 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
676 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
677 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
678 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
680 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
681 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
682 1060, 1060, 69, 69, 1060, 1060, 1060, 1060, 1060, 1060,
683 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
684 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
685 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
686 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
687 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
688 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
689 1060, 1060, 1056, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
691 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
692 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
693 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
694 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
695 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
696 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
697 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
698 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
699 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
700 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
702 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
703 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
704 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
705 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
706 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
707 1060, 1060, 1060, 1060, 1060, 0, 1056, 1056, 1056, 1056,
711 static yyconst flex_uint16_t yy_nxt[1330] =
713 6, 7, 8, 9, 7, 10, 11, 6, 12, 6,
714 13, 14, 15, 6, 16, 17, 18, 19, 20, 21,
715 22, 23, 24, 25, 26, 27, 28, 27, 27, 29,
716 30, 31, 32, 33, 27, 34, 35, 36, 27, 27,
717 37, 27, 27, 27, 38, 6, 6, 27, 39, 40,
718 41, 42, 43, 44, 45, 46, 47, 48, 27, 49,
719 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
720 60, 27, 27, 27, 61, 105, 85, 61, 61, 85,
721 62, 83, 99, 100, 84, 107, 119, 96, 110, 106,
722 111, 356, 97, 113, 120, 108, 114, 121, 109, 357,
724 112, 122, 115, 63, 64, 65, 66, 63, 144, 67,
725 836, 123, 128, 68, 69, 67, 70, 212, 145, 213,
726 71, 72, 73, 116, 74, 75, 129, 76, 77, 98,
727 76, 78, 175, 117, 347, 79, 118, 124, 80, 81,
728 132, 125, 82, 140, 133, 126, 176, 67, 135, 136,
729 348, 127, 163, 141, 134, 164, 142, 837, 165, 152,
730 137, 138, 153, 139, 146, 154, 147, 177, 155, 227,
731 148, 149, 156, 76, 150, 151, 157, 166, 178, 158,
732 159, 227, 179, 160, 230, 170, 161, 181, 167, 171,
733 168, 182, 162, 172, 169, 183, 173, 185, 186, 189,
735 192, 184, 104, 190, 194, 96, 187, 144, 195, 227,
736 229, 198, 188, 191, 193, 199, 203, 145, 209, 200,
737 204, 196, 227, 205, 201, 202, 231, 131, 210, 838,
738 206, 211, 207, 216, 220, 208, 216, 227, 125, 217,
739 106, 240, 126, 85, 222, 223, 224, 98, 127, 1056,
740 222, 223, 1056, 222, 223, 227, 227, 110, 85, 232,
741 235, 85, 839, 227, 122, 226, 222, 223, 225, 112,
742 233, 225, 234, 114, 123, 225, 227, 225, 228, 115,
743 120, 251, 227, 227, 227, 252, 331, 227, 292, 227,
744 227, 227, 227, 227, 293, 254, 332, 227, 227, 255,
746 227, 227, 236, 237, 227, 263, 140, 96, 264, 225,
747 278, 279, 97, 296, 238, 138, 141, 239, 145, 142,
748 216, 222, 223, 241, 281, 284, 242, 282, 297, 333,
749 342, 298, 374, 334, 285, 227, 243, 244, 245, 299,
750 305, 245, 375, 335, 306, 245, 245, 245, 245, 98,
751 307, 343, 245, 245, 245, 336, 316, 245, 840, 245,
752 245, 337, 245, 245, 338, 339, 340, 245, 317, 318,
753 245, 245, 841, 319, 245, 349, 350, 353, 362, 245,
754 388, 363, 351, 376, 354, 386, 355, 377, 387, 389,
755 364, 365, 383, 394, 384, 366, 403, 367, 401, 402,
757 396, 385, 378, 397, 227, 245, 273, 398, 216, 399,
758 227, 216, 85, 395, 217, 224, 1056, 1056, 225, 225,
759 225, 96, 225, 225, 227, 406, 229, 404, 260, 227,
760 226, 270, 405, 407, 227, 227, 227, 227, 227, 457,
761 408, 470, 490, 494, 518, 519, 471, 537, 227, 409,
762 491, 549, 288, 410, 524, 527, 525, 550, 287, 538,
763 528, 495, 227, 98, 564, 565, 566, 227, 227, 227,
764 227, 569, 457, 592, 634, 415, 676, 227, 424, 677,
765 227, 458, 568, 657, 570, 593, 700, 635, 658, 227,
766 227, 754, 842, 701, 765, 704, 811, 227, 571, 812,
768 766, 601, 705, 755, 227, 843, 844, 845, 823, 846,
769 847, 848, 849, 824, 458, 850, 851, 852, 853, 854,
770 855, 856, 857, 858, 859, 860, 861, 862, 863, 864,
771 865, 866, 867, 868, 869, 870, 871, 872, 873, 874,
772 875, 876, 877, 878, 879, 880, 881, 882, 883, 884,
773 885, 886, 887, 888, 889, 890, 891, 892, 893, 894,
774 895, 896, 897, 898, 899, 900, 901, 902, 903, 904,
775 905, 906, 907, 908, 909, 910, 911, 227, 227, 912,
776 913, 914, 915, 916, 917, 918, 919, 920, 921, 922,
777 923, 924, 925, 926, 927, 928, 929, 930, 931, 932,
779 933, 934, 935, 936, 937, 938, 847, 939, 940, 941,
780 942, 943, 944, 945, 946, 947, 948, 949, 950, 951,
781 952, 953, 954, 955, 956, 957, 958, 959, 960, 961,
782 962, 963, 964, 965, 966, 967, 968, 969, 970, 971,
783 972, 973, 974, 975, 976, 977, 978, 979, 980, 981,
784 982, 983, 984, 985, 986, 987, 988, 989, 990, 991,
785 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001,
786 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011,
787 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021,
788 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031,
790 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
791 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051,
792 1052, 1053, 1054, 1055, 88, 88, 88, 88, 88, 88,
793 90, 90, 91, 91, 835, 91, 91, 91, 94, 94,
794 94, 218, 218, 218, 218, 218, 218, 225, 225, 225,
795 225, 247, 247, 834, 247, 247, 247, 833, 832, 831,
796 830, 829, 828, 827, 826, 825, 822, 821, 820, 819,
797 818, 817, 816, 815, 814, 813, 810, 809, 808, 807,
798 806, 805, 804, 803, 802, 801, 800, 799, 798, 797,
799 796, 795, 794, 793, 792, 791, 790, 789, 788, 787,
801 786, 785, 784, 783, 782, 781, 780, 779, 778, 777,
802 776, 775, 774, 773, 772, 771, 770, 769, 768, 767,
803 764, 763, 762, 761, 760, 759, 758, 757, 756, 753,
804 752, 751, 750, 749, 748, 747, 746, 745, 744, 743,
805 742, 741, 740, 739, 738, 737, 736, 735, 734, 733,
806 732, 731, 730, 729, 728, 727, 726, 725, 724, 723,
807 722, 721, 720, 719, 718, 717, 716, 715, 714, 713,
808 712, 711, 710, 709, 708, 707, 706, 703, 564, 702,
809 699, 698, 697, 696, 695, 694, 693, 692, 691, 690,
810 689, 688, 687, 686, 685, 684, 683, 682, 681, 680,
812 679, 678, 675, 674, 673, 672, 671, 670, 669, 668,
813 667, 666, 665, 664, 663, 662, 661, 660, 659, 656,
814 655, 654, 653, 652, 651, 650, 649, 648, 647, 646,
815 645, 644, 643, 642, 641, 640, 639, 638, 637, 636,
816 633, 632, 631, 630, 629, 628, 627, 626, 625, 624,
817 623, 622, 621, 620, 619, 618, 617, 616, 615, 614,
818 613, 612, 611, 610, 609, 608, 607, 606, 605, 604,
819 603, 602, 601, 600, 599, 598, 597, 596, 595, 594,
820 591, 590, 589, 588, 587, 586, 585, 584, 583, 582,
821 581, 580, 579, 578, 577, 576, 575, 574, 573, 572,
823 571, 567, 563, 562, 561, 560, 559, 558, 557, 556,
824 555, 554, 553, 552, 551, 548, 547, 546, 545, 544,
825 543, 542, 541, 540, 539, 536, 535, 534, 533, 532,
826 531, 530, 529, 526, 523, 522, 521, 520, 438, 517,
827 516, 515, 514, 513, 512, 511, 510, 509, 508, 507,
828 506, 505, 504, 503, 502, 501, 500, 499, 498, 497,
829 496, 493, 492, 489, 488, 487, 486, 485, 484, 483,
830 482, 481, 480, 479, 478, 477, 476, 475, 474, 473,
831 472, 469, 468, 467, 466, 465, 464, 463, 462, 461,
832 460, 459, 456, 455, 454, 453, 452, 451, 450, 449,
834 448, 447, 446, 445, 444, 443, 442, 441, 440, 439,
835 438, 437, 436, 435, 434, 433, 432, 431, 430, 429,
836 428, 427, 426, 425, 424, 423, 422, 421, 420, 419,
837 418, 417, 416, 415, 414, 413, 412, 249, 411, 411,
838 243, 227, 227, 222, 219, 219, 400, 393, 392, 391,
839 390, 382, 381, 380, 379, 373, 372, 371, 370, 369,
840 368, 361, 360, 359, 358, 352, 346, 345, 344, 341,
841 330, 329, 328, 327, 326, 325, 324, 323, 322, 321,
842 320, 315, 314, 313, 312, 311, 310, 309, 308, 304,
843 303, 302, 301, 300, 295, 294, 291, 290, 289, 288,
845 287, 286, 283, 280, 277, 276, 275, 274, 273, 272,
846 271, 270, 269, 268, 267, 266, 265, 262, 261, 260,
847 259, 258, 257, 256, 253, 250, 249, 95, 93, 248,
848 246, 89, 227, 221, 219, 215, 214, 197, 180, 174,
849 143, 131, 130, 104, 103, 102, 101, 95, 93, 92,
850 89, 87, 86, 1056, 5, 1056, 1056, 1056, 1056, 1056,
851 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
852 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
853 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
854 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
856 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
857 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
858 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056
861 static yyconst flex_int16_t yy_chk[1330] =
863 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
864 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
865 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
866 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
867 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
868 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
869 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
870 1, 1, 1, 1, 2, 22, 7, 2, 4, 7,
871 2, 4, 17, 17, 4, 23, 28, 16, 24, 22,
872 24, 186, 16, 25, 28, 23, 25, 29, 23, 186,
874 24, 29, 25, 2, 3, 3, 3, 4, 38, 3,
875 719, 29, 31, 3, 3, 3, 3, 58, 38, 58,
876 3, 3, 3, 26, 3, 3, 31, 3, 3, 16,
877 3, 3, 46, 26, 182, 3, 26, 30, 3, 3,
878 34, 30, 3, 36, 34, 30, 46, 3, 35, 35,
879 182, 30, 42, 36, 34, 42, 36, 720, 42, 40,
880 35, 35, 40, 35, 39, 40, 39, 47, 40, 71,
881 39, 39, 41, 3, 39, 39, 41, 43, 47, 41,
882 41, 72, 47, 41, 71, 44, 41, 49, 43, 44,
883 43, 49, 41, 44, 43, 49, 44, 50, 50, 51,
885 52, 49, 72, 51, 53, 70, 50, 144, 53, 79,
886 70, 55, 50, 51, 52, 55, 56, 144, 57, 55,
887 56, 53, 73, 56, 55, 55, 73, 79, 57, 721,
888 56, 57, 56, 61, 63, 56, 61, 82, 63, 61,
889 73, 82, 63, 66, 66, 66, 66, 70, 63, 67,
890 67, 67, 68, 68, 68, 75, 78, 74, 85, 74,
891 78, 85, 722, 77, 78, 68, 69, 69, 69, 74,
892 75, 69, 77, 75, 78, 69, 69, 69, 69, 75,
893 77, 104, 69, 69, 69, 104, 173, 69, 140, 69,
894 69, 80, 69, 69, 140, 106, 173, 69, 81, 106,
896 69, 69, 80, 80, 69, 114, 81, 97, 114, 69,
897 129, 129, 97, 145, 80, 80, 81, 80, 145, 81,
898 83, 83, 83, 83, 131, 133, 83, 131, 146, 174,
899 178, 146, 198, 174, 133, 69, 84, 84, 84, 146,
900 152, 84, 198, 174, 152, 84, 84, 84, 84, 97,
901 152, 178, 84, 84, 84, 175, 161, 84, 725, 84,
902 84, 175, 84, 84, 176, 176, 176, 84, 161, 161,
903 84, 84, 727, 161, 84, 183, 183, 185, 191, 84,
904 206, 191, 183, 199, 185, 205, 185, 199, 205, 206,
905 191, 191, 204, 211, 204, 191, 220, 191, 215, 215,
907 212, 204, 199, 212, 230, 84, 220, 212, 216, 212,
908 231, 216, 224, 211, 216, 224, 225, 226, 224, 225,
909 226, 229, 225, 226, 235, 232, 229, 230, 232, 233,
910 226, 235, 231, 233, 236, 237, 238, 239, 240, 296,
911 238, 310, 330, 333, 359, 359, 310, 376, 409, 239,
912 330, 387, 237, 240, 365, 367, 365, 387, 236, 376,
913 367, 333, 404, 229, 403, 403, 404, 405, 407, 410,
914 408, 409, 457, 440, 490, 405, 536, 566, 407, 536,
915 568, 296, 408, 516, 410, 440, 561, 490, 516, 569,
916 570, 631, 728, 561, 642, 569, 691, 704, 566, 691,
918 642, 568, 570, 631, 705, 729, 730, 732, 704, 733,
919 734, 735, 738, 705, 457, 739, 743, 747, 748, 749,
920 750, 752, 753, 755, 758, 760, 761, 762, 763, 764,
921 765, 766, 767, 768, 769, 770, 771, 772, 773, 775,
922 776, 778, 779, 780, 781, 782, 783, 784, 785, 786,
923 789, 790, 791, 793, 794, 795, 796, 798, 799, 800,
924 801, 802, 803, 804, 806, 807, 808, 811, 812, 814,
925 815, 816, 817, 818, 819, 820, 821, 823, 824, 825,
926 826, 828, 829, 830, 831, 832, 833, 834, 836, 838,
927 839, 840, 841, 842, 845, 848, 851, 852, 853, 854,
929 855, 858, 859, 861, 862, 863, 824, 865, 866, 867,
930 868, 870, 871, 872, 873, 874, 876, 877, 878, 879,
931 880, 885, 886, 887, 888, 889, 890, 891, 892, 894,
932 897, 899, 900, 901, 902, 903, 907, 908, 909, 910,
933 911, 912, 914, 915, 921, 922, 923, 924, 925, 927,
934 929, 930, 931, 934, 936, 938, 939, 940, 941, 942,
935 943, 944, 945, 946, 947, 948, 949, 952, 953, 954,
936 955, 956, 958, 961, 963, 964, 965, 966, 971, 974,
937 976, 977, 978, 979, 980, 981, 984, 985, 989, 991,
938 993, 1000, 1001, 1002, 1006, 1008, 1013, 1014, 1015, 1016,
940 1017, 1022, 1023, 1024, 1027, 1028, 1029, 1030, 1031, 1032,
941 1033, 1034, 1036, 1039, 1040, 1041, 1042, 1045, 1046, 1047,
942 1049, 1050, 1051, 1052, 1057, 1057, 1057, 1057, 1057, 1057,
943 1058, 1058, 1059, 1059, 718, 1059, 1059, 1059, 1060, 1060,
944 1060, 1061, 1061, 1061, 1061, 1061, 1061, 1062, 1062, 1062,
945 1062, 1063, 1063, 717, 1063, 1063, 1063, 715, 714, 713,
946 712, 711, 710, 709, 708, 707, 703, 702, 700, 699,
947 698, 697, 696, 695, 694, 693, 690, 689, 688, 687,
948 686, 685, 684, 682, 680, 679, 678, 677, 676, 675,
949 674, 673, 672, 671, 670, 669, 668, 666, 665, 664,
951 663, 662, 661, 660, 658, 657, 656, 655, 654, 653,
952 652, 651, 650, 649, 648, 647, 646, 645, 644, 643,
953 641, 640, 639, 638, 637, 636, 635, 634, 633, 630,
954 629, 628, 627, 626, 625, 624, 623, 622, 620, 619,
955 618, 617, 616, 614, 613, 611, 610, 609, 606, 605,
956 604, 603, 602, 600, 599, 598, 597, 596, 595, 594,
957 593, 592, 590, 589, 588, 587, 585, 584, 582, 581,
958 580, 578, 577, 576, 575, 574, 572, 567, 565, 562,
959 560, 559, 558, 556, 555, 554, 553, 552, 551, 550,
960 549, 548, 547, 546, 545, 544, 543, 542, 541, 540,
962 539, 537, 535, 534, 533, 532, 531, 529, 528, 527,
963 526, 524, 523, 522, 521, 520, 519, 518, 517, 514,
964 513, 512, 511, 509, 508, 506, 505, 504, 503, 502,
965 501, 500, 499, 498, 496, 495, 494, 493, 492, 491,
966 489, 488, 487, 486, 485, 481, 480, 479, 478, 477,
967 476, 475, 474, 473, 472, 470, 469, 468, 467, 466,
968 465, 464, 463, 462, 461, 460, 459, 456, 454, 453,
969 452, 451, 450, 448, 447, 446, 445, 444, 443, 441,
970 439, 437, 436, 435, 434, 432, 431, 430, 429, 427,
971 426, 425, 424, 422, 420, 418, 417, 416, 414, 413,
973 412, 406, 401, 400, 399, 398, 397, 396, 395, 394,
974 392, 391, 390, 389, 388, 386, 385, 384, 383, 382,
975 381, 380, 379, 378, 377, 375, 374, 373, 372, 371,
976 370, 369, 368, 366, 364, 363, 362, 361, 360, 358,
977 357, 356, 355, 354, 353, 352, 350, 349, 348, 347,
978 345, 344, 343, 342, 341, 339, 338, 337, 336, 335,
979 334, 332, 331, 329, 328, 327, 326, 325, 324, 323,
980 321, 320, 319, 318, 317, 316, 315, 314, 313, 312,
981 311, 309, 308, 307, 306, 305, 304, 303, 302, 301,
982 299, 297, 295, 294, 293, 292, 291, 290, 289, 288,
984 287, 286, 285, 284, 283, 282, 281, 280, 279, 278,
985 277, 276, 275, 274, 273, 272, 271, 270, 269, 268,
986 267, 266, 265, 264, 262, 261, 260, 259, 258, 257,
987 256, 255, 254, 253, 252, 251, 250, 249, 248, 247,
988 244, 234, 227, 223, 218, 217, 214, 210, 209, 208,
989 207, 203, 202, 201, 200, 197, 196, 195, 194, 193,
990 192, 190, 189, 188, 187, 184, 181, 180, 179, 177,
991 172, 171, 170, 169, 168, 167, 166, 165, 164, 163,
992 162, 160, 159, 158, 157, 156, 155, 154, 153, 151,
993 150, 149, 148, 147, 143, 142, 139, 138, 137, 136,
995 135, 134, 132, 130, 128, 127, 126, 125, 124, 123,
996 122, 121, 120, 118, 117, 116, 115, 113, 112, 111,
997 110, 109, 108, 107, 105, 103, 98, 95, 93, 92,
998 91, 88, 76, 65, 62, 60, 59, 54, 48, 45,
999 37, 33, 32, 21, 20, 19, 18, 15, 14, 13,
1000 11, 10, 9, 5, 1056, 1056, 1056, 1056, 1056, 1056,
1001 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1002 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1003 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1004 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1006 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1007 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1008 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056
1011 static yy_state_type yy_last_accepting_state;
1012 static char *yy_last_accepting_cpos;
1014 extern int yy_flex_debug;
1015 int yy_flex_debug = 0;
1017 /* The intent behind this definition is that it'll catch
1018 * any uses of REJECT which flex missed.
1020 #define REJECT reject_used_but_not_detected
1021 #define yymore() yymore_used_but_not_detected
1022 #define YY_MORE_ADJ 0
1023 #define YY_RESTORE_YY_MORE_OFFSET
1025 /* NetHack 3.6 lev_comp.l $NHDT-Date: 1449385344 2015/12/06 07:02:24 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.24 $ */
1026 /* Copyright (c) 1989 by Jean-Christophe Collet */
1027 /* NetHack may be freely redistributed. See license for details. */
1032 #include "lev_comp.h"
1035 /* Most of these don't exist in flex, yywrap is macro and
1036 * yyunput is properly declared in flex.skel.
1038 #if !defined(FLEX_SCANNER) && !defined(FLEXHACK_SCANNER)
1039 int FDECL(yyback, (int *,int));
1044 /* Traditional lexes let yyunput() and yyoutput() default to int;
1045 * newer ones may declare them as void since they don't return
1046 * values. For even more fun, the lex supplied as part of the
1047 * newer unbundled compiler for SunOS 4.x adds the void declarations
1048 * (under __STDC__ or _cplusplus ifdefs -- otherwise they remain
1049 * int) while the bundled lex and the one with the older unbundled
1050 * compiler do not. To detect this, we need help from outside --
1051 * sys/unix/Makefile.utl.
1053 * Digital UNIX is difficult and still has int in spite of all
1056 # if defined(NeXT) || defined(SVR4) || defined(_AIX32)
1059 # if !defined(VOIDYYPUT) && defined(POSIX_TYPES)
1060 # if !defined(BOS) && !defined(HISX) && !defined(_M_UNIX) && !defined(VMS)
1064 # if !defined(VOIDYYPUT) && defined(WEIRD_LEX)
1065 # if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX > 1)
1069 # if defined(VOIDYYPUT) && defined(__osf__)
1073 void FDECL(yyunput, (int));
1074 void FDECL(yyoutput, (int));
1076 int FDECL(yyunput, (int));
1077 int FDECL(yyoutput, (int));
1080 #else /* !FLEX_SCANNER && !FLEXHACK_SCANNER */
1081 /* most recent flex allows suppressing yyunput() altogether when not needed */
1085 #if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER)
1086 /* older flex wants this */
1087 #define YY_MALLOC_DECL genericptr_t FDECL(malloc, (size_t)); \
1088 genericptr_t FDECL(realloc, (genericptr_t, size_t));
1089 /* newer flex assumes <stdlib.h> so needs this in case it's been suppressed */
1093 void FDECL(init_yyin, (FILE *));
1094 void FDECL(init_yyout, (FILE *));
1096 long NDECL(handle_varstring_check);
1097 long FDECL(corefunc_str_check, (char *, long));
1099 extern void VDECL(lc_error, (const char *, ...));
1100 extern struct lc_vardefs *FDECL(vardef_defined,(struct lc_vardefs *,char *, int));
1102 extern struct lc_vardefs *variable_definitions;
1104 extern long FDECL(method_defined, (char *, long, long *));
1106 void FDECL(savetoken, (char *));
1107 void NDECL(newline);
1108 void FDECL(advancepos, (char *));
1111 * This doesn't always get put in lev_comp.h
1112 * (esp. when using older versions of bison).
1114 extern YYSTYPE yylval;
1116 int nh_line_number = 1;
1117 int token_start_pos = 0;
1118 char curr_token[512];
1119 static char map[4096];
1120 static int map_cnt = 0;
1122 FILE *orig_yyin = NULL;
1124 #define ST_RET(x) do { savetoken(yytext); return x; } while (0);
1125 #define ST_RETF(y, x) do { savetoken(yytext); y; return x; } while (0);
1130 #ifndef YY_EXTRA_TYPE
1131 #define YY_EXTRA_TYPE void *
1134 /* Accessor methods to globals.
1135 These are made visible to non-reentrant scanners for convenience. */
1137 int yylex_destroy FDECL(, (void ));
1138 int yyget_debug FDECL(, (void ));
1139 void yyset_debug FDECL(, (int debug_flag ));
1140 YY_EXTRA_TYPE yyget_extra FDECL(, (void ));
1141 void yyset_extra FDECL(, (YY_EXTRA_TYPE user_defined ));
1142 FILE *yyget_in FDECL(, (void ));
1143 void yyset_in FDECL(, (FILE * _in_str ));
1144 FILE *yyget_out FDECL(, (void ));
1145 void yyset_out FDECL(, (FILE * _out_str ));
1146 yy_size_t yyget_leng FDECL(, (void ));
1147 char *yyget_text FDECL(, (void ));
1148 int yyget_lineno FDECL(, (void ));
1149 void yyset_lineno FDECL(, (int _line_number ));
1151 /* Macros after this point can all be overridden by user definitions in
1155 #ifndef YY_SKIP_YYWRAP
1156 extern int yywrap FDECL(, (void ));
1161 static void yyunput FDECL(, (int c,char *buf_ptr ));
1165 static void yy_flex_strncpy FDECL(, (char *,yyconst char *,int ));
1168 #ifdef YY_NEED_STRLEN
1169 static int yy_flex_strlen FDECL(, (yyconst char * ));
1174 static int input FDECL(, (void ));
1178 /* Amount of stuff to slurp up with each read. */
1179 #ifndef YY_READ_BUF_SIZE
1181 /* On IA-64, the buffer size is 16k, not 8k */
1182 #define YY_READ_BUF_SIZE 16384
1184 #define YY_READ_BUF_SIZE 8192
1185 #endif /* __ia64__ */
1188 /* Copy whatever the last rule matched to the standard output. */
1190 /* This used to be an fputs(), but since the string might contain NUL's,
1191 * we now use fwrite().
1193 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
1196 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1197 * is returned in "result".
1200 #define YY_INPUT(buf,result,max_size) \
1201 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1205 for ( n = 0; n < max_size && \
1206 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1207 buf[n] = (char) c; \
1209 buf[n++] = (char) c; \
1210 if ( c == EOF && ferror( yyin ) ) \
1211 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1217 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1219 if( errno != EINTR) \
1221 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1231 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1232 * we don't want an extra ';' after the "return" because that will cause
1233 * some compilers to complain about unreachable statements.
1236 #define yyterminate() return YY_NULL
1239 /* Number of entries by which start-condition stack grows. */
1240 #ifndef YY_START_STACK_INCR
1241 #define YY_START_STACK_INCR 25
1244 /* Report a fatal error. */
1245 #ifndef YY_FATAL_ERROR
1246 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1249 /* Default declaration of generated scanner - a define so the user can
1250 * easily add parameters.
1253 #define YY_DECL_IS_OURS 1
1255 extern int yylex FDECL(, (void));
1257 #define YY_DECL int yylex ()
1258 #endif /* !YY_DECL */
1260 /* Code executed at the beginning of each rule, after yytext and yyleng
1263 #ifndef YY_USER_ACTION
1264 #define YY_USER_ACTION
1267 /* Code executed at the end of each rule. */
1269 #define YY_BREAK /*LINTED*/break;
1272 #define YY_RULE_SETUP \
1274 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1275 (yytext[yyleng - 1] == '\n'); \
1278 /** The main scanner function which does all the work.
1282 yy_state_type yy_current_state;
1283 char *yy_cp, *yy_bp;
1295 (yy_start) = 1; /* first start state */
1303 if ( ! YY_CURRENT_BUFFER ) {
1304 yyensure_buffer_stack ();
1305 YY_CURRENT_BUFFER_LVALUE =
1306 yy_create_buffer(yyin,YY_BUF_SIZE );
1309 yy_load_buffer_state( );
1314 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1316 yy_cp = (yy_c_buf_p);
1318 /* Support of yytext. */
1319 *yy_cp = (yy_hold_char);
1321 /* yy_bp points to the position in yy_ch_buf of the start of
1326 yy_current_state = (yy_start);
1327 yy_current_state += YY_AT_BOL();
1331 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1332 if ( yy_accept[yy_current_state] )
1334 (yy_last_accepting_state) = yy_current_state;
1335 (yy_last_accepting_cpos) = yy_cp;
1337 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1339 yy_current_state = (int) yy_def[yy_current_state];
1340 if ( yy_current_state >= 1057 )
1341 yy_c = yy_meta[(unsigned int) yy_c];
1343 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1346 while ( yy_base[yy_current_state] != 1255 );
1349 yy_act = yy_accept[yy_current_state];
1351 { /* have to back up */
1352 yy_cp = (yy_last_accepting_cpos);
1353 yy_current_state = (yy_last_accepting_state);
1354 yy_act = yy_accept[yy_current_state];
1357 YY_DO_BEFORE_ACTION;
1359 do_action: /* This label is used only to access EOF actions. */
1362 { /* beginning of action switch */
1363 case 0: /* must back up */
1364 /* undo the effects of YY_DO_BEFORE_ACTION */
1365 *yy_cp = (yy_hold_char);
1366 yy_cp = (yy_last_accepting_cpos);
1367 yy_current_state = (yy_last_accepting_state);
1368 goto yy_find_action;
1375 yylval.map = (char *) alloc(map_cnt + 1);
1376 (void) strncpy(yylval.map, map, map_cnt);
1377 yylval.map[map_cnt] = 0;
1383 /* rule 2 can match eol */
1388 /* convert \r\n to \n */
1389 if (len >= 2 && yytext[len - 2] == '\r')
1391 (void) strncpy(map + map_cnt, yytext, len);
1393 map[map_cnt - 1] = '\n';
1394 map[map_cnt] = '\0';
1399 /* rule 3 can match eol */
1401 { savetoken(yytext); newline(); }
1421 ST_RET(LEV_INIT_ID);
1425 ST_RET(MAZE_GRID_ID);
1429 ST_RET(SOLID_FILL_ID);
1437 ST_RET(ROGUELEV_ID);
1445 ST_RET(GEOMETRY_ID);
1448 /* rule 15 can match eol */
1450 { savetoken(yytext); BEGIN(MAPC); newline(); }
1482 ST_RET(ROOMDOOR_ID);
1486 ST_RET(DRAWBRIDGE_ID);
1490 ST_RET(MAZEWALK_ID);
1526 ST_RET(FOUNTAIN_ID);
1538 ST_RET(NON_DIGGABLE_ID);
1542 ST_RET(NON_PASSWALL_ID);
1566 ST_RET(RAND_CORRIDOR_ID);
1570 ST_RET(CORRIDOR_ID);
1582 ST_RET(REPLACE_TERRAIN_ID);
1594 ST_RET(ENGRAVING_ID);
1598 ST_RET(MINERALIZE_ID);
1634 ST_RET(FUNCTION_ID);
1646 ST_RET(selection_ID);
1654 ST_RET(fillrect_ID);
1662 ST_RET(randline_ID);
1674 ST_RET(rndcoord_ID);
1690 ST_RET(gradient_ID);
1694 ST_RET(complement_ID);
1698 { savetoken(yytext); yylval.i=SEL_GRADIENT_RADIAL; return GRADIENT_TYPE; }
1702 { savetoken(yytext); yylval.i=SEL_GRADIENT_SQUARE; return GRADIENT_TYPE; }
1706 { savetoken(yytext); yylval.i=DRY; return HUMIDITY_TYPE; }
1710 { savetoken(yytext); yylval.i=WET; return HUMIDITY_TYPE; }
1714 { savetoken(yytext); yylval.i=HOT; return HUMIDITY_TYPE; }
1718 { savetoken(yytext); yylval.i=SOLID; return HUMIDITY_TYPE; }
1722 { savetoken(yytext); yylval.i=ANY_LOC; return HUMIDITY_TYPE; }
1730 ST_RET(QUANTITY_ID);
1742 ST_RET(ERODEPROOF_ID);
1746 { savetoken(yytext); yylval.i=1; return TRAPPED_STATE; }
1750 { savetoken(yytext); yylval.i=0; return TRAPPED_STATE; }
1754 ST_RET(RECHARGED_ID);
1770 ST_RET(CANCELLED_ID);
1790 ST_RET(PARALYZED_ID);
1798 ST_RET(CONFUSED_ID);
1802 ST_RET(SEENTRAPS_ID);
1810 ST_RETF((yylval.i=1), HORIZ_OR_VERT);
1814 { savetoken(yytext); yylval.i=2; return HORIZ_OR_VERT; }
1818 { savetoken(yytext); yylval.i=D_ISOPEN; return DOOR_STATE; }
1822 { savetoken(yytext); yylval.i=D_CLOSED; return DOOR_STATE; }
1826 { savetoken(yytext); yylval.i=D_LOCKED; return DOOR_STATE; }
1830 { savetoken(yytext); yylval.i=D_NODOOR; return DOOR_STATE; }
1834 { savetoken(yytext); yylval.i=D_BROKEN; return DOOR_STATE; }
1838 { savetoken(yytext); yylval.i=D_SECRET; return DOOR_STATE; }
1842 { savetoken(yytext); yylval.i=W_NORTH; return DIRECTION; }
1846 { savetoken(yytext); yylval.i=W_EAST; return DIRECTION; }
1850 { savetoken(yytext); yylval.i=W_SOUTH; return DIRECTION; }
1854 { savetoken(yytext); yylval.i=W_WEST; return DIRECTION; }
1858 { savetoken(yytext); yylval.i = -1; return RANDOM_TYPE; }
1862 { savetoken(yytext); yylval.i = -1; return RANDOM_TYPE_BRACKET; }
1866 { savetoken(yytext); yylval.i = -2; return NONE; }
1874 { savetoken(yytext); yylval.i=1; return LEFT_OR_RIGHT; }
1878 { savetoken(yytext); yylval.i=2; return LEFT_OR_RIGHT; }
1882 { savetoken(yytext); yylval.i=3; return CENTER; }
1886 { savetoken(yytext); yylval.i=4; return LEFT_OR_RIGHT; }
1890 { savetoken(yytext); yylval.i=5; return LEFT_OR_RIGHT; }
1894 { savetoken(yytext); yylval.i=1; return TOP_OR_BOT; }
1898 { savetoken(yytext); yylval.i=5; return TOP_OR_BOT; }
1902 { savetoken(yytext); yylval.i=1; return LIGHT_STATE; }
1906 { savetoken(yytext); yylval.i=0; return LIGHT_STATE; }
1910 { savetoken(yytext); yylval.i=1; return FILLING; }
1914 { savetoken(yytext); yylval.i=0; return FILLING; }
1918 { savetoken(yytext); yylval.i=0; return IRREGULAR; }
1922 { savetoken(yytext); yylval.i=1; return IRREGULAR; }
1926 { savetoken(yytext); yylval.i=1; return JOINED; }
1930 { savetoken(yytext); yylval.i=0; return JOINED; }
1934 { savetoken(yytext); yylval.i=1; return LIMITED; }
1938 { savetoken(yytext); yylval.i=0; return LIMITED; }
1942 { savetoken(yytext); yylval.i= AM_NONE; return ALIGNMENT; }
1946 { savetoken(yytext); yylval.i= AM_LAWFUL; return ALIGNMENT; }
1950 { savetoken(yytext); yylval.i= AM_NEUTRAL; return ALIGNMENT; }
1954 { savetoken(yytext); yylval.i= AM_CHAOTIC; return ALIGNMENT; }
1958 { savetoken(yytext); yylval.i= AM_SPLEV_CO; return ALIGNMENT; }
1962 { savetoken(yytext); yylval.i= AM_SPLEV_NONCO; return ALIGNMENT; }
1966 { savetoken(yytext); yylval.i=1; return MON_ATTITUDE; }
1970 { savetoken(yytext); yylval.i=0; return MON_ATTITUDE; }
1974 { savetoken(yytext); yylval.i=1; return MON_ALERTNESS; }
1978 { savetoken(yytext); yylval.i=0; return MON_ALERTNESS; }
1982 { savetoken(yytext); yylval.i= M_AP_FURNITURE; return MON_APPEARANCE; }
1986 { savetoken(yytext); yylval.i= M_AP_MONSTER; return MON_APPEARANCE; }
1990 { savetoken(yytext); yylval.i= M_AP_OBJECT; return MON_APPEARANCE; }
1994 { savetoken(yytext); yylval.i=2; return ALTAR_TYPE; }
1998 { savetoken(yytext); yylval.i=1; return ALTAR_TYPE; }
2002 { savetoken(yytext); yylval.i=0; return ALTAR_TYPE; }
2006 { savetoken(yytext); yylval.i=1; return UP_OR_DOWN; }
2010 { savetoken(yytext); yylval.i=0; return UP_OR_DOWN; }
2014 { savetoken(yytext); yylval.i=0; return BOOLEAN; }
2018 { savetoken(yytext); yylval.i=1; return BOOLEAN; }
2022 { savetoken(yytext); yylval.i=DUST; return ENGRAVING_TYPE; }
2026 { savetoken(yytext); yylval.i=ENGRAVE; return ENGRAVING_TYPE; }
2030 { savetoken(yytext); yylval.i=BURN; return ENGRAVING_TYPE; }
2034 { savetoken(yytext); yylval.i=MARK; return ENGRAVING_TYPE; }
2038 { savetoken(yytext); yylval.i=ENGR_BLOOD; return ENGRAVING_TYPE; }
2042 { savetoken(yytext); yylval.i=1; return CURSE_TYPE; }
2046 { savetoken(yytext); yylval.i=2; return CURSE_TYPE; }
2050 { savetoken(yytext); yylval.i=3; return CURSE_TYPE; }
2054 { savetoken(yytext); yylval.i=NOTELEPORT; return FLAG_TYPE; }
2058 { savetoken(yytext); yylval.i=HARDFLOOR; return FLAG_TYPE; }
2062 { savetoken(yytext); yylval.i=NOMMAP; return FLAG_TYPE; }
2066 { savetoken(yytext); yylval.i=ARBOREAL; return FLAG_TYPE; } /* KMH */
2070 { savetoken(yytext); yylval.i=SHORTSIGHTED; return FLAG_TYPE; }
2074 { savetoken(yytext); yylval.i=MAZELEVEL; return FLAG_TYPE; }
2078 { savetoken(yytext); yylval.i=PREMAPPED; return FLAG_TYPE; }
2082 { savetoken(yytext); yylval.i=SHROUD; return FLAG_TYPE; }
2086 { savetoken(yytext); yylval.i=GRAVEYARD; return FLAG_TYPE; }
2090 { savetoken(yytext); yylval.i=ICEDPOOLS; return FLAG_TYPE; }
2094 { savetoken(yytext); yylval.i=SOLIDIFY; return FLAG_TYPE; }
2098 { savetoken(yytext); yylval.i=CORRMAZE; return FLAG_TYPE; }
2102 { savetoken(yytext); yylval.i=CHECK_INACCESSIBLES; return FLAG_TYPE; }
2106 { char *p = index(yytext, 'd');
2110 yylval.dice.num = atoi(yytext);
2111 yylval.dice.die = atoi(p);
2113 yylval.dice.num = yylval.dice.die = 1;
2120 { savetoken(yytext); yylval.i = atoi(yytext + 1);
2121 if (yylval.i < 0 || yylval.i > 100)
2122 lc_error("Unexpected percentile '%li%%'", yylval.i);
2127 { savetoken(yytext); yylval.i=atoi(yytext); return MINUS_INTEGER; }
2131 { savetoken(yytext); yylval.i=atoi(yytext); return PLUS_INTEGER; }
2135 { savetoken(yytext); yylval.i = atoi(yytext);
2136 if (yylval.i < 0 || yylval.i > 100)
2137 lc_error("Unexpected percentile '%li%%'", yylval.i);
2142 { savetoken(yytext); yylval.i=atoi(yytext); return INTEGER; }
2145 /* rule 185 can match eol */
2147 { savetoken(yytext);
2148 yytext[yyleng - 1] = '\0'; /* discard the trailing \" */
2149 yylval.map = dupstr(yytext + 1); /* skip the first \" */
2154 { savetoken(yytext); return handle_varstring_check(); }
2158 { savetoken(yytext); yylval.i = SPO_JE; return COMPARE_TYPE; }
2162 { savetoken(yytext); yylval.i = SPO_JNE; return COMPARE_TYPE; }
2166 { savetoken(yytext); yylval.i = SPO_JNE; return COMPARE_TYPE; }
2170 { savetoken(yytext); yylval.i = SPO_JLE; return COMPARE_TYPE; }
2174 { savetoken(yytext); yylval.i = SPO_JGE; return COMPARE_TYPE; }
2178 { savetoken(yytext); yylval.i = SPO_JL; return COMPARE_TYPE; }
2182 { savetoken(yytext); yylval.i = SPO_JG; return COMPARE_TYPE; }
2185 /* rule 194 can match eol */
2191 { advancepos(yytext); }
2195 { savetoken(yytext); yylval.i = yytext[2]; return CHAR; }
2199 { savetoken(yytext); yylval.i = yytext[1]; return CHAR; }
2203 ST_RET(UNKNOWN_TYPE);
2207 { savetoken(yytext); return yytext[0]; }
2213 case YY_STATE_EOF(INITIAL):
2214 case YY_STATE_EOF(MAPC):
2217 case YY_END_OF_BUFFER:
2219 /* Amount of text matched not including the EOB char. */
2220 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2222 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2223 *yy_cp = (yy_hold_char);
2224 YY_RESTORE_YY_MORE_OFFSET
2226 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2228 /* We're scanning a new file or input source. It's
2229 * possible that this happened because the user
2230 * just pointed yyin at a new source and called
2231 * yylex(). If so, then we have to assure
2232 * consistency between YY_CURRENT_BUFFER and our
2233 * globals. Here is the right place to do so, because
2234 * this is the first action (other than possibly a
2235 * back-up) that will match for the new input source.
2237 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2238 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2239 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2242 /* Note that here we test for yy_c_buf_p "<=" to the position
2243 * of the first EOB in the buffer, since yy_c_buf_p will
2244 * already have been incremented past the NUL character
2245 * (since all states make transitions on EOB to the
2246 * end-of-buffer state). Contrast this with the test
2249 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2250 { /* This was really a NUL. */
2251 yy_state_type yy_next_state;
2253 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2255 yy_current_state = yy_get_previous_state( );
2257 /* Okay, we're now positioned to make the NUL
2258 * transition. We couldn't have
2259 * yy_get_previous_state() go ahead and do it
2260 * for us because it doesn't know how to deal
2261 * with the possibility of jamming (and we don't
2262 * want to build jamming into it because then it
2263 * will run more slowly).
2266 yy_next_state = yy_try_NUL_trans( yy_current_state );
2268 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2270 if ( yy_next_state )
2272 /* Consume the NUL. */
2273 yy_cp = ++(yy_c_buf_p);
2274 yy_current_state = yy_next_state;
2280 yy_cp = (yy_c_buf_p);
2281 goto yy_find_action;
2285 else switch ( yy_get_next_buffer( ) )
2287 case EOB_ACT_END_OF_FILE:
2289 (yy_did_buffer_switch_on_eof) = 0;
2293 /* Note: because we've taken care in
2294 * yy_get_next_buffer() to have set up
2295 * yytext, we can now set up
2296 * yy_c_buf_p so that if some total
2297 * hoser (like flex itself) wants to
2298 * call the scanner after we return the
2299 * YY_NULL, it'll still work - another
2300 * YY_NULL will get returned.
2302 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2304 yy_act = YY_STATE_EOF(YY_START);
2310 if ( ! (yy_did_buffer_switch_on_eof) )
2316 case EOB_ACT_CONTINUE_SCAN:
2318 (yytext_ptr) + yy_amount_of_matched_text;
2320 yy_current_state = yy_get_previous_state( );
2322 yy_cp = (yy_c_buf_p);
2323 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2326 case EOB_ACT_LAST_MATCH:
2328 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2330 yy_current_state = yy_get_previous_state( );
2332 yy_cp = (yy_c_buf_p);
2333 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2334 goto yy_find_action;
2341 "fatal flex scanner internal error--no action found" );
2342 } /* end of action switch */
2343 } /* end of scanning one token */
2344 } /* end of user's declarations */
2345 } /* end of yylex */
2347 /* yy_get_next_buffer - try to read in a new buffer
2349 * Returns a code representing an action:
2350 * EOB_ACT_LAST_MATCH -
2351 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2352 * EOB_ACT_END_OF_FILE - end of file
2354 static int yy_get_next_buffer ()
2356 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2357 char *source = (yytext_ptr);
2358 yy_size_t number_to_move, i;
2361 if ((yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1])
2362 YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed");
2364 if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) {
2365 /* Don't try to fill the buffer, so this is an EOF. */
2366 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) {
2367 /* We matched a single character, the EOB, so
2368 * treat this as a final EOF.
2370 return EOB_ACT_END_OF_FILE;
2372 /* We matched some text prior to the EOB, first
2375 return EOB_ACT_LAST_MATCH;
2379 /* Try to read more data. */
2381 /* First move last chars to start of buffer. */
2382 number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2384 for (i = 0; i < number_to_move; ++i)
2385 *(dest++) = *(source++);
2387 if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) {
2388 /* don't do the read, it's not guaranteed to return an EOF,
2391 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2393 yy_size_t num_to_read =
2394 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2396 while (num_to_read <= 0) {
2397 /* Not enough room in the buffer - grow it. */
2399 /* just a shorter name for the current buffer */
2400 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2401 int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf);
2403 if ( b->yy_is_our_buffer ) {
2404 yy_size_t new_size = b->yy_buf_size * 2;
2406 if ( new_size <= 0 )
2407 b->yy_buf_size += b->yy_buf_size / 8;
2409 b->yy_buf_size *= 2;
2411 b->yy_ch_buf = (char *)
2412 /* Include room in for 2 EOB chars. */
2413 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2415 /* Can't grow it, we don't own it. */
2419 YY_FATAL_ERROR("fatal error - scanner input buffer overflow" );
2421 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2423 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2428 if ( num_to_read > YY_READ_BUF_SIZE )
2429 num_to_read = YY_READ_BUF_SIZE;
2431 /* Read in more data. */
2432 YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2433 (yy_n_chars), num_to_read);
2434 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2437 if ((yy_n_chars) == 0) {
2438 if (number_to_move == YY_MORE_ADJ) {
2439 ret_val = EOB_ACT_END_OF_FILE;
2442 ret_val = EOB_ACT_LAST_MATCH;
2443 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING;
2446 ret_val = EOB_ACT_CONTINUE_SCAN;
2448 if ((yy_size_t) ((yy_n_chars) + number_to_move)
2449 > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2450 /* Extend the array by 50%, plus the number we really need. */
2451 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2452 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *)
2453 yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
2454 if (! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf)
2455 YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()");
2458 (yy_n_chars) += number_to_move;
2459 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2460 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2462 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2467 /* yy_get_previous_state - get the state just before EOB char was reached */
2469 static yy_state_type yy_get_previous_state ()
2471 yy_state_type yy_current_state;
2474 yy_current_state = (yy_start);
2475 yy_current_state += YY_AT_BOL();
2477 for (yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp) {
2479 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2480 if ( yy_accept[yy_current_state] )
2482 (yy_last_accepting_state) = yy_current_state;
2483 (yy_last_accepting_cpos) = yy_cp;
2485 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2487 yy_current_state = (int) yy_def[yy_current_state];
2488 if ( yy_current_state >= 1057 )
2489 yy_c = yy_meta[(unsigned int) yy_c];
2491 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2494 return yy_current_state;
2497 /* yy_try_NUL_trans - try to make a transition on the NUL character
2500 * next_state = yy_try_NUL_trans( current_state );
2503 static yy_state_type yy_try_NUL_trans (yy_current_state )
2504 yy_state_type yy_current_state;
2507 char *yy_cp = (yy_c_buf_p);
2510 if ( yy_accept[yy_current_state] )
2512 (yy_last_accepting_state) = yy_current_state;
2513 (yy_last_accepting_cpos) = yy_cp;
2515 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2517 yy_current_state = (int) yy_def[yy_current_state];
2518 if ( yy_current_state >= 1057 )
2519 yy_c = yy_meta[(unsigned int) yy_c];
2521 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2522 yy_is_jam = (yy_current_state == 1056);
2524 return yy_is_jam ? 0 : yy_current_state;
2529 static void yyunput (c,yy_bp )
2535 yy_cp = (yy_c_buf_p);
2537 /* undo effects of setting up yytext */
2538 *yy_cp = (yy_hold_char);
2540 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2541 { /* need to shift things up to make room */
2542 /* +2 for EOB chars. */
2543 yy_size_t number_to_move = (yy_n_chars) + 2;
2544 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2545 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2547 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2549 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2550 *--dest = *--source;
2552 yy_cp += (int) (dest - source);
2553 yy_bp += (int) (dest - source);
2554 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2555 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2557 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2558 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2561 *--yy_cp = (char) c;
2563 (yytext_ptr) = yy_bp;
2564 (yy_hold_char) = *yy_cp;
2565 (yy_c_buf_p) = yy_cp;
2575 *(yy_c_buf_p) = (yy_hold_char);
2577 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2579 /* yy_c_buf_p now points to the character we want to return.
2580 * If this occurs *before* the EOB characters, then it's a
2581 * valid NUL; if not, then we've hit the end of the buffer.
2583 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2584 /* This was really a NUL. */
2585 *(yy_c_buf_p) = '\0';
2588 { /* need more input */
2589 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
2592 switch ( yy_get_next_buffer( ) )
2594 case EOB_ACT_LAST_MATCH:
2595 /* This happens because yy_g_n_b()
2596 * sees that we've accumulated a
2597 * token and flags that we need to
2598 * try matching the token before
2599 * proceeding. But for input(),
2600 * there's no matching to consider.
2601 * So convert the EOB_ACT_LAST_MATCH
2602 * to EOB_ACT_END_OF_FILE.
2605 /* Reset buffer status. */
2610 case EOB_ACT_END_OF_FILE:
2615 if ( ! (yy_did_buffer_switch_on_eof) )
2620 case EOB_ACT_CONTINUE_SCAN:
2621 (yy_c_buf_p) = (yytext_ptr) + offset;
2627 c = *(uchar *) (yy_c_buf_p); /* cast for 8-bit char's */
2628 *(yy_c_buf_p) = '\0'; /* preserve yytext */
2629 (yy_hold_char) = *++(yy_c_buf_p);
2631 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
2635 #endif /* ifndef YY_NO_INPUT */
2637 /** Immediately switch to a different input stream.
2638 * @param input_file A readable stream.
2640 * @note This function does not reset the start condition to @c INITIAL .
2643 void yyrestart (input_file )
2647 if ( ! YY_CURRENT_BUFFER ){
2648 yyensure_buffer_stack ();
2649 YY_CURRENT_BUFFER_LVALUE =
2650 yy_create_buffer(yyin,YY_BUF_SIZE );
2653 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2654 yy_load_buffer_state( );
2657 /** Switch to a different input buffer.
2658 * @param new_buffer The new input buffer.
2661 void yy_switch_to_buffer (new_buffer )
2662 YY_BUFFER_STATE new_buffer;
2665 /* TODO. We should be able to replace this entire function body
2667 * yypop_buffer_state();
2668 * yypush_buffer_state(new_buffer);
2670 yyensure_buffer_stack ();
2671 if ( YY_CURRENT_BUFFER == new_buffer )
2674 if ( YY_CURRENT_BUFFER )
2676 /* Flush out information for old buffer. */
2677 *(yy_c_buf_p) = (yy_hold_char);
2678 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2679 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2682 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2683 yy_load_buffer_state( );
2685 /* We don't actually know whether we did this switch during
2686 * EOF (yywrap()) processing, but the only time this flag
2687 * is looked at is after yywrap() is called, so it's safe
2688 * to go ahead and always set it.
2690 (yy_did_buffer_switch_on_eof) = 1;
2693 static void yy_load_buffer_state ()
2695 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2696 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2697 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2698 (yy_hold_char) = *(yy_c_buf_p);
2701 /** Allocate and initialize an input buffer state.
2702 * @param file A readable stream.
2703 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2705 * @return the allocated buffer state.
2707 YY_BUFFER_STATE yy_create_buffer (file,size )
2713 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2715 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2717 b->yy_buf_size = (yy_size_t)size;
2719 /* yy_ch_buf has to be 2 characters longer than the size given because
2720 * we need to put in 2 end-of-buffer characters.
2722 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
2723 if ( ! b->yy_ch_buf )
2724 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2726 b->yy_is_our_buffer = 1;
2728 yy_init_buffer(b,file );
2733 /** Destroy the buffer.
2734 * @param b a buffer created with yy_create_buffer()
2737 void yy_delete_buffer (b )
2744 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2745 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2747 if ( b->yy_is_our_buffer )
2748 yyfree((void *) b->yy_ch_buf );
2750 yyfree((void *) b );
2753 /* Initializes or reinitializes a buffer.
2754 * This function is sometimes called more than once on the same buffer,
2755 * such as during a yyrestart() or at EOF.
2757 static void yy_init_buffer (b,file )
2763 yy_flush_buffer(b );
2765 b->yy_input_file = file;
2766 b->yy_fill_buffer = 1;
2768 /* If b is the current buffer, then yy_init_buffer was _probably_
2769 * called from yyrestart() or through yy_get_next_buffer.
2770 * In that case, we don't want to reset the lineno or column.
2772 if (b != YY_CURRENT_BUFFER){
2773 b->yy_bs_lineno = 1;
2774 b->yy_bs_column = 0;
2777 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2782 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2783 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2786 void yy_flush_buffer (b )
2794 /* We always need two end-of-buffer characters. The first causes
2795 * a transition to the end-of-buffer state. The second causes
2796 * a jam in that state.
2798 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2799 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2801 b->yy_buf_pos = &b->yy_ch_buf[0];
2804 b->yy_buffer_status = YY_BUFFER_NEW;
2806 if ( b == YY_CURRENT_BUFFER )
2807 yy_load_buffer_state( );
2810 /** Pushes the new state onto the stack. The new state becomes
2811 * the current state. This function will allocate the stack
2813 * @param new_buffer The new state.
2816 void yypush_buffer_state (new_buffer )
2817 YY_BUFFER_STATE new_buffer;
2819 if (new_buffer == NULL)
2822 yyensure_buffer_stack();
2824 /* This block is copied from yy_switch_to_buffer. */
2825 if ( YY_CURRENT_BUFFER )
2827 /* Flush out information for old buffer. */
2828 *(yy_c_buf_p) = (yy_hold_char);
2829 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2830 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2833 /* Only push if top exists. Otherwise, replace top. */
2834 if (YY_CURRENT_BUFFER)
2835 (yy_buffer_stack_top)++;
2836 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2838 /* copied from yy_switch_to_buffer. */
2839 yy_load_buffer_state( );
2840 (yy_did_buffer_switch_on_eof) = 1;
2843 /** Removes and deletes the top of the stack, if present.
2844 * The next element becomes the new top.
2847 void yypop_buffer_state ()
2849 if (!YY_CURRENT_BUFFER)
2852 yy_delete_buffer(YY_CURRENT_BUFFER );
2853 YY_CURRENT_BUFFER_LVALUE = NULL;
2854 if ((yy_buffer_stack_top) > 0)
2855 --(yy_buffer_stack_top);
2857 if (YY_CURRENT_BUFFER) {
2858 yy_load_buffer_state( );
2859 (yy_did_buffer_switch_on_eof) = 1;
2863 /* Allocates the stack if it does not exist.
2864 * Guarantees space for at least one push.
2866 static void yyensure_buffer_stack ()
2868 yy_size_t num_to_alloc;
2870 if (!(yy_buffer_stack)) {
2871 /* First allocation is just for 2 elements, since we don't know if this
2872 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2873 * immediate realloc on the next call.
2875 #if 1 /* [PR] avoid C++-style comment; older C compilers choke on it */
2876 num_to_alloc = 2; /* also changed to match the comment... */
2878 num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
2880 (yy_buffer_stack) = (struct yy_buffer_state**)
2881 yyalloc(num_to_alloc * sizeof(struct yy_buffer_state*) );
2882 if (!(yy_buffer_stack))
2883 YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()");
2885 (void) memset((yy_buffer_stack), 0,
2886 num_to_alloc * sizeof(struct yy_buffer_state*));
2888 (yy_buffer_stack_max) = num_to_alloc;
2889 (yy_buffer_stack_top) = 0;
2893 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1) {
2894 /* Increase the buffer to prepare for a possible push. */
2895 yy_size_t grow_size = 8 /* arbitrary grow size */;
2897 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2898 (yy_buffer_stack) = (struct yy_buffer_state**)
2899 yyrealloc((yy_buffer_stack),num_to_alloc * sizeof(struct yy_buffer_state*) );
2900 if (!(yy_buffer_stack))
2901 YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()");
2903 /* zero only the new slots.*/
2904 (void) memset((yy_buffer_stack) + (yy_buffer_stack_max), 0,
2905 grow_size * sizeof(struct yy_buffer_state*));
2906 (yy_buffer_stack_max) = num_to_alloc;
2910 /** Setup the input buffer state to scan directly from a user-specified
2912 * @param base the character buffer
2913 * @param size the size in bytes of the character buffer
2915 * @return the newly allocated buffer state object.
2917 YY_BUFFER_STATE yy_scan_buffer (base,size )
2924 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2925 base[size-1] != YY_END_OF_BUFFER_CHAR )
2926 /* They forgot to leave room for the EOB's. */
2929 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2931 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2933 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2934 b->yy_buf_pos = b->yy_ch_buf = base;
2935 b->yy_is_our_buffer = 0;
2936 b->yy_input_file = 0;
2937 b->yy_n_chars = b->yy_buf_size;
2938 b->yy_is_interactive = 0;
2940 b->yy_fill_buffer = 0;
2941 b->yy_buffer_status = YY_BUFFER_NEW;
2943 yy_switch_to_buffer(b );
2948 /** Setup the input buffer state to scan a string. The next call to yylex()
2949 * will scan from a @e copy of @a str.
2950 * @param yystr a NUL-terminated string to scan
2952 * @return the newly allocated buffer state object.
2953 * @note If you want to scan bytes that may contain NUL values, then use
2954 * yy_scan_bytes() instead.
2956 YY_BUFFER_STATE yy_scan_string (yystr )
2957 yyconst char * yystr;
2960 return yy_scan_bytes(yystr,strlen(yystr) );
2963 /** Setup the input buffer state to scan the given bytes. The next call to
2964 * yylex() will scan from a @e copy of @a bytes.
2965 * @param yybytes the byte buffer to scan
2966 * @param _yybytes_len the number of bytes in the buffer pointed to by @a
2969 * @return the newly allocated buffer state object.
2971 YY_BUFFER_STATE yy_scan_bytes (yybytes,_yybytes_len )
2972 yyconst char * yybytes;
2973 yy_size_t _yybytes_len;
2980 /* Get memory for full buffer, including space for trailing EOB's. */
2981 n = _yybytes_len + 2;
2982 buf = (char *) yyalloc(n );
2984 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2986 for ( i = 0; i < _yybytes_len; ++i )
2987 buf[i] = yybytes[i];
2989 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2991 b = yy_scan_buffer(buf,n );
2993 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2995 /* It's okay to grow etc. this buffer, and we should throw it
2996 * away when we're done.
2998 b->yy_is_our_buffer = 1;
3003 #ifndef YY_EXIT_FAILURE
3004 #define YY_EXIT_FAILURE 2
3007 static void yy_fatal_error (msg )
3010 (void) fprintf( stderr, "%s\n", msg );
3011 exit( YY_EXIT_FAILURE );
3014 /* Redefine yyless() so it works in section 3 code. */
3019 /* Undo effects of setting up yytext. */ \
3020 int yyless_macro_arg = (n); \
3021 YY_LESS_LINENO(yyless_macro_arg); \
3022 yytext[yyleng] = (yy_hold_char); \
3023 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3024 (yy_hold_char) = *(yy_c_buf_p); \
3025 *(yy_c_buf_p) = '\0'; \
3026 yyleng = yyless_macro_arg; \
3029 /* Accessor methods (get/set functions) to struct members. */
3031 /** Get the current line number.
3040 /** Get the input stream.
3048 /** Get the output stream.
3056 /** Get the length of the current token.
3059 yy_size_t yyget_leng ()
3064 /** Get the current token.
3073 /** Set the current line number.
3074 * @param _line_number line number
3077 void yyset_lineno (_line_number )
3081 yylineno = _line_number;
3084 /** Set the input stream. This does not discard the current
3086 * @param _in_str A readable stream.
3088 * @see yy_switch_to_buffer
3090 void yyset_in (_in_str )
3096 void yyset_out (_out_str )
3104 return yy_flex_debug;
3107 void yyset_debug (_bdebug )
3110 yy_flex_debug = _bdebug ;
3113 static int yy_init_globals ()
3115 /* Initialization is the same as for the non-reentrant scanner.
3116 * This function is called from yylex_destroy(), so don't allocate here.
3119 (yy_buffer_stack) = 0;
3120 (yy_buffer_stack_top) = 0;
3121 (yy_buffer_stack_max) = 0;
3122 (yy_c_buf_p) = (char *) 0;
3126 /* Defined in main.c */
3135 /* For future reference: Set errno on error, since we are called by
3141 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3142 int yylex_destroy ()
3145 /* Pop the buffer stack, destroying each element. */
3146 while (YY_CURRENT_BUFFER) {
3147 yy_delete_buffer(YY_CURRENT_BUFFER );
3148 YY_CURRENT_BUFFER_LVALUE = NULL;
3149 yypop_buffer_state();
3151 /* Destroy the stack itself. */
3152 yyfree((yy_buffer_stack) );
3153 (yy_buffer_stack) = NULL;
3155 /* Reset the globals. This is important in a non-reentrant scanner
3156 * so the next time yylex() is called, initialization will occur. */
3163 * Internal utility routines.
3167 static void yy_flex_strncpy (s1,s2,n )
3174 for ( i = 0; i < n; ++i )
3179 #ifdef YY_NEED_STRLEN
3180 static int yy_flex_strlen (s )
3184 for ( n = 0; s[n]; ++n )
3191 void *yyalloc (size )
3195 return (void *) malloc( size );
3198 void *yyrealloc (ptr,size )
3203 /* The cast to (char *) in the following accommodates both
3204 * implementations that use char* generic pointers, and those
3205 * that use void* generic pointers. It works with the latter
3206 * because both ANSI C and C++ allow castless assignment from
3207 * any pointer type to void*, and deal with argument conversions
3208 * as though doing an assignment.
3210 return (void *) realloc( (char *) ptr, size );
3217 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3225 return (long *) malloc(n);
3229 /* routine to switch to another input file; needed for flex */
3231 init_yyin( input_f )
3234 #if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER)
3244 /* analogous routine (for completeness) */
3246 init_yyout( output_f )
3253 handle_varstring_check()
3255 struct lc_vardefs *vd;
3257 yylval.map = dupstr(yytext);
3258 if ((vd = vardef_defined(variable_definitions, yytext, 1)) != 0) {
3259 long l = vd->var_type;
3260 int a = ((l & SPOVAR_ARRAY) == SPOVAR_ARRAY);
3263 if (l == SPOVAR_INT)
3264 return (a ? VARSTRING_INT_ARRAY : VARSTRING_INT);
3265 if (l == SPOVAR_STRING)
3266 return (a ? VARSTRING_STRING_ARRAY : VARSTRING_STRING);
3267 if (l == SPOVAR_VARIABLE)
3268 return (a ? VARSTRING_VAR_ARRAY : VARSTRING_VAR);
3269 if (l == SPOVAR_COORD)
3270 return (a ? VARSTRING_COORD_ARRAY : VARSTRING_COORD);
3271 if (l == SPOVAR_REGION)
3272 return (a ? VARSTRING_REGION_ARRAY : VARSTRING_REGION);
3273 if (l == SPOVAR_MAPCHAR)
3274 return (a ? VARSTRING_MAPCHAR_ARRAY : VARSTRING_MAPCHAR);
3275 if (l == SPOVAR_MONST)
3276 return (a ? VARSTRING_MONST_ARRAY : VARSTRING_MONST);
3277 if (l == SPOVAR_OBJ)
3278 return (a ? VARSTRING_OBJ_ARRAY : VARSTRING_OBJ);
3279 if (l == SPOVAR_SEL)
3280 return (a ? VARSTRING_SEL_ARRAY : VARSTRING_SEL);
3289 token_start_pos = 0;
3290 (void) memset((genericptr_t) curr_token, 0, 512);
3297 Sprintf(curr_token, "%s", s);
3305 token_start_pos += strlen(s);