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 anethack-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 * aNetHack'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 #define FDECL_dummy /*empty*/
40 /* Returned upon end-of-file. */
43 /* Promotes a possibly negative, possibly signed char to an unsigned
44 * integer for use as an array index. If the signed char is negative,
45 * we want to instead treat it as an 8-bit unsigned char, hence the
48 #define YY_SC_TO_UI(c) ((unsigned int) (uchar) c)
50 /* Enter a start condition. This macro really ought to take a parameter,
51 * but we do it the disgusting crufty way forced on us by the ()-less
52 * definition of BEGIN.
54 #define BEGIN (yy_start) = 1 + 2 *
56 /* Translate the current start state into a value that can be later handed
57 * to BEGIN to return to the state. The YYSTATE alias is for lex
60 #define YY_START (((yy_start) - 1) / 2)
61 #define YYSTATE YY_START
63 /* Action number for EOF rule of a given start state. */
64 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
66 /* Special action meaning "start processing a new file". */
67 #define YY_NEW_FILE yyrestart(yyin )
69 #define YY_END_OF_BUFFER_CHAR 0
71 /* Size of default input buffer. */
74 /* On IA-64, the buffer size is 16k, not 8k.
75 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
76 * Ditto for the __ia64__ case accordingly.
78 #define YY_BUF_SIZE 32768
80 #define YY_BUF_SIZE 16384
84 /* The state buf must be large enough to hold one state per character
87 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
89 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
90 #define YY_TYPEDEF_YY_BUFFER_STATE
91 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
94 #ifndef YY_TYPEDEF_YY_SIZE_T
95 #define YY_TYPEDEF_YY_SIZE_T
96 typedef size_t yy_size_t
;
99 extern yy_size_t yyleng
;
100 extern FILE *yyin
, *yyout
;
102 #define EOB_ACT_CONTINUE_SCAN 0
103 #define EOB_ACT_END_OF_FILE 1
104 #define EOB_ACT_LAST_MATCH 2
106 #define YY_LESS_LINENO(n)
107 #define YY_LINENO_REWIND_TO(ptr)
109 /* Return all but the first "n" matched characters back to the input stream. */
112 /* Undo effects of setting up yytext. */ \
113 int yyless_macro_arg = (n); \
114 YY_LESS_LINENO(yyless_macro_arg); \
115 *yy_cp = (yy_hold_char); \
116 YY_RESTORE_YY_MORE_OFFSET \
117 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
118 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
121 #define unput(c) yyunput( c, (yytext_ptr) )
123 #ifndef YY_STRUCT_YY_BUFFER_STATE
124 #define YY_STRUCT_YY_BUFFER_STATE
125 struct yy_buffer_state
{
128 char *yy_ch_buf
; /* input buffer */
129 char *yy_buf_pos
; /* current position in input buffer */
131 /* Size of input buffer in bytes, not including room for EOB
134 yy_size_t yy_buf_size
;
136 /* Number of characters read into yy_ch_buf, not including EOB
139 yy_size_t yy_n_chars
;
141 /* Whether we "own" the buffer - i.e., we know we created it,
142 * and can realloc() it to grow it, and should free() it to
145 int yy_is_our_buffer
;
147 /* Whether this is an "interactive" input source; if so, and
148 * if we're using stdio for input, then we want to use getc()
149 * instead of fread(), to make sure we stop fetching input after
152 int yy_is_interactive
;
154 /* Whether we're considered to be at the beginning of a line.
155 * If so, '^' rules will be active on the next match, otherwise
160 int yy_bs_lineno
; /**< The line count. */
161 int yy_bs_column
; /**< The column count. */
163 /* Whether to try to fill the input buffer when we reach the
168 int yy_buffer_status
;
170 #define YY_BUFFER_NEW 0
171 #define YY_BUFFER_NORMAL 1
172 /* When an EOF's been seen but there's still some text to process
173 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
174 * shouldn't try reading from the input source any more. We might
175 * still have a bunch of tokens to match, though, because of
176 * possible backing-up.
178 * When we actually see the EOF, we change the status to "new"
179 * (via yyrestart()), so that the user can continue scanning by
180 * just pointing yyin at a new input file.
182 #define YY_BUFFER_EOF_PENDING 2
185 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
187 /* Stack of input buffers. */
188 static size_t yy_buffer_stack_top
= 0; /**< index of top of stack. */
189 static size_t yy_buffer_stack_max
= 0; /**< capacity of stack. */
190 static YY_BUFFER_STATE
* yy_buffer_stack
= 0; /**< Stack as an array. */
192 /* We provide macros for accessing buffer states in case in the
193 * future we want to put the buffer states in a more general
196 * Returns the top of the stack, or NULL.
198 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
199 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
202 /* Same as previous macro, but useful when we know that the buffer stack is not
203 * NULL or when we need an lvalue. For internal use only.
205 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
207 /* yy_hold_char holds the character lost when yytext is formed. */
208 static char yy_hold_char
;
209 static yy_size_t yy_n_chars
; /* number of characters read into yy_ch_buf */
212 /* Points to current character in buffer. */
213 static char *yy_c_buf_p
= (char *) 0;
214 static int yy_init
= 0; /* whether we need to initialize */
215 static int yy_start
= 0; /* start state number */
217 /* Flag which is used to allow yywrap()'s to do buffer switches
218 * instead of setting up a fresh yyin. A bit of a hack ...
220 static int yy_did_buffer_switch_on_eof
;
222 void yyrestart
FDECL(FDECL_dummy
, (FILE *input_file
));
223 void yy_switch_to_buffer
FDECL(FDECL_dummy
, (YY_BUFFER_STATE new_buffer
));
224 YY_BUFFER_STATE yy_create_buffer
FDECL(FDECL_dummy
, (FILE *file
,int size
));
225 void yy_delete_buffer
FDECL(FDECL_dummy
, (YY_BUFFER_STATE b
));
226 void yy_flush_buffer
FDECL(FDECL_dummy
, (YY_BUFFER_STATE b
));
227 void yypush_buffer_state
FDECL(FDECL_dummy
, (YY_BUFFER_STATE new_buffer
));
228 void yypop_buffer_state
FDECL(FDECL_dummy
, (void ));
230 static void yyensure_buffer_stack
FDECL(FDECL_dummy
, (void ));
231 static void yy_load_buffer_state
FDECL(FDECL_dummy
, (void ));
232 static void yy_init_buffer
FDECL(FDECL_dummy
, (YY_BUFFER_STATE b
,FILE *file
));
234 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
236 YY_BUFFER_STATE yy_scan_buffer
FDECL(FDECL_dummy
, (char *base
,yy_size_t size
));
237 YY_BUFFER_STATE yy_scan_string
FDECL(FDECL_dummy
, (yyconst
char *yy_str
));
238 YY_BUFFER_STATE yy_scan_bytes
FDECL(FDECL_dummy
, (yyconst
char *bytes
,yy_size_t len
));
240 void *yyalloc
FDECL(FDECL_dummy
, (yy_size_t
));
241 void *yyrealloc
FDECL(FDECL_dummy
, (void *,yy_size_t
));
242 void yyfree
FDECL(FDECL_dummy
, (void * ));
244 #define yy_new_buffer yy_create_buffer
245 #define yy_set_interactive(is_interactive) \
247 if ( ! YY_CURRENT_BUFFER ) { \
248 yyensure_buffer_stack (); \
249 YY_CURRENT_BUFFER_LVALUE = \
250 yy_create_buffer(yyin,YY_BUF_SIZE ); \
252 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
254 #define yy_set_bol(at_bol) \
256 if ( ! YY_CURRENT_BUFFER ) { \
257 yyensure_buffer_stack (); \
258 YY_CURRENT_BUFFER_LVALUE = \
259 yy_create_buffer(yyin,YY_BUF_SIZE ); \
261 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
263 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
265 /* Begin user sect3 */
267 typedef unsigned char YY_CHAR
;
269 FILE *yyin
= (FILE *) 0, *yyout
= (FILE *) 0;
271 typedef int yy_state_type
;
281 #define yytext_ptr yytext
283 static yy_state_type yy_get_previous_state
FDECL(FDECL_dummy
, (void ));
284 static yy_state_type yy_try_NUL_trans
FDECL(FDECL_dummy
, (yy_state_type current_state
));
285 static int yy_get_next_buffer
FDECL(FDECL_dummy
, (void ));
286 static void yy_fatal_error
FDECL(FDECL_dummy
, (yyconst
char msg
[] )) NORETURN
;
288 /* Done after the current pattern has been matched and before the
289 * corresponding action - sets up yytext.
291 #define YY_DO_BEFORE_ACTION \
292 (yytext_ptr) = yy_bp; \
293 yyleng = (size_t) (yy_cp - yy_bp); \
294 (yy_hold_char) = *yy_cp; \
296 (yy_c_buf_p) = yy_cp;
298 #define YY_NUM_RULES 200
299 #define YY_END_OF_BUFFER 201
300 /* This struct is not used in this scanner,
301 but its presence is necessary. */
304 flex_int32_t yy_verify
;
307 static yyconst flex_int16_t yy_accept
[1057] =
309 0, 0, 0, 0, 201, 199, 195, 194, 199, 199,
310 199, 199, 199, 199, 198, 184, 192, 199, 193, 198,
311 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
312 198, 198, 198, 198, 198, 198, 198, 199, 198, 198,
313 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
314 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
315 195, 199, 198, 2, 199, 195, 199, 199, 198, 184,
316 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
317 198, 198, 195, 199, 195, 194, 188, 0, 185, 186,
318 0, 0, 182, 198, 181, 183, 184, 198, 190, 189,
320 187, 191, 198, 198, 198, 198, 198, 198, 198, 198,
321 198, 198, 198, 198, 198, 198, 198, 198, 39, 198,
322 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
323 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
324 55, 198, 198, 0, 0, 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,
328 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
329 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
331 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
332 198, 198, 154, 198, 198, 195, 0, 0, 3, 198,
333 2, 2, 0, 195, 0, 182, 198, 181, 184, 198,
334 198, 198, 198, 39, 198, 198, 198, 198, 198, 198,
335 195, 0, 2, 0, 0, 197, 0, 197, 179, 198,
336 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
337 198, 198, 54, 198, 198, 198, 198, 198, 198, 198,
338 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
339 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
340 198, 198, 198, 198, 198, 0, 198, 104, 198, 83,
342 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
343 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
344 198, 79, 198, 198, 198, 198, 198, 198, 198, 198,
345 198, 198, 198, 198, 198, 198, 198, 198, 198, 81,
346 198, 198, 198, 198, 198, 139, 198, 198, 198, 198,
347 128, 198, 198, 198, 198, 198, 198, 198, 198, 198,
348 198, 198, 198, 198, 198, 198, 198, 16, 198, 198,
349 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
350 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
351 198, 198, 126, 198, 198, 198, 198, 198, 198, 198,
353 198, 80, 198, 198, 198, 198, 198, 198, 198, 198,
354 196, 198, 198, 198, 58, 198, 198, 198, 22, 198,
355 40, 198, 41, 198, 198, 198, 198, 49, 198, 198,
356 198, 198, 56, 6, 198, 198, 198, 53, 198, 198,
357 198, 36, 198, 198, 198, 198, 42, 198, 35, 198,
358 198, 198, 198, 198, 21, 198, 0, 180, 198, 198,
359 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
360 160, 198, 198, 198, 198, 198, 198, 198, 198, 198,
361 198, 155, 158, 114, 198, 198, 198, 198, 198, 198,
362 198, 198, 198, 198, 198, 198, 69, 198, 198, 198,
364 198, 198, 198, 198, 198, 198, 121, 198, 198, 67,
365 198, 198, 198, 198, 161, 198, 198, 198, 198, 198,
366 198, 198, 198, 198, 119, 198, 198, 198, 198, 107,
367 198, 198, 198, 198, 198, 198, 198, 65, 198, 198,
368 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
369 198, 198, 198, 198, 198, 198, 157, 198, 198, 198,
370 198, 198, 116, 15, 0, 198, 198, 198, 198, 198,
371 28, 198, 59, 198, 198, 198, 198, 198, 13, 198,
372 198, 198, 50, 198, 198, 7, 198, 198, 198, 198,
373 5, 198, 198, 198, 198, 198, 198, 198, 198, 198,
375 30, 198, 198, 198, 198, 198, 120, 153, 198, 198,
376 198, 147, 198, 198, 162, 198, 198, 198, 198, 198,
377 141, 198, 198, 198, 198, 198, 198, 198, 198, 198,
378 198, 156, 198, 198, 198, 198, 198, 198, 198, 198,
379 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
380 198, 198, 198, 198, 198, 198, 198, 198, 11, 198,
381 198, 198, 198, 198, 198, 198, 113, 198, 198, 198,
382 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
383 125, 198, 12, 198, 198, 198, 198, 198, 198, 198,
384 82, 115, 198, 198, 198, 198, 198, 198, 198, 198,
386 129, 198, 198, 198, 198, 33, 198, 198, 198, 198,
387 198, 198, 198, 198, 198, 29, 198, 198, 198, 198,
388 198, 198, 17, 31, 198, 27, 198, 198, 198, 198,
389 57, 198, 198, 198, 198, 146, 97, 198, 198, 127,
390 111, 86, 198, 123, 72, 108, 198, 198, 198, 198,
391 165, 198, 198, 87, 198, 94, 130, 198, 74, 198,
392 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
393 198, 198, 198, 135, 198, 198, 109, 198, 198, 198,
394 198, 198, 198, 198, 198, 198, 110, 168, 198, 198,
395 198, 16, 198, 198, 198, 198, 77, 198, 117, 198,
397 198, 198, 198, 198, 112, 198, 198, 198, 152, 173,
398 198, 198, 78, 198, 198, 198, 198, 198, 198, 198,
399 198, 1, 57, 198, 198, 198, 60, 198, 198, 198,
400 198, 198, 198, 198, 4, 198, 19, 198, 198, 198,
401 198, 198, 62, 43, 198, 46, 26, 198, 163, 99,
402 198, 198, 198, 198, 198, 73, 159, 198, 198, 98,
403 198, 198, 198, 93, 198, 198, 198, 198, 145, 198,
404 198, 198, 198, 198, 136, 198, 198, 198, 198, 198,
405 20, 63, 140, 138, 198, 198, 198, 198, 198, 198,
406 198, 198, 118, 198, 132, 96, 198, 151, 198, 198,
408 198, 198, 198, 101, 47, 89, 198, 198, 198, 198,
409 198, 198, 45, 198, 198, 34, 61, 14, 8, 25,
410 198, 198, 198, 198, 198, 23, 198, 169, 198, 198,
411 198, 102, 177, 198, 66, 198, 75, 198, 198, 198,
412 198, 198, 198, 198, 198, 198, 198, 198, 198, 150,
413 9, 198, 198, 198, 198, 198, 144, 198, 85, 68,
414 198, 71, 198, 198, 198, 198, 176, 164, 131, 134,
415 198, 106, 18, 198, 51, 198, 198, 198, 198, 198,
416 198, 95, 142, 198, 198, 70, 174, 122, 198, 167,
417 198, 175, 198, 92, 133, 84, 148, 149, 171, 198,
419 198, 198, 100, 172, 91, 198, 64, 198, 10, 137,
420 24, 52, 198, 198, 198, 198, 198, 76, 88, 124,
421 105, 198, 198, 198, 166, 103, 198, 198, 198, 198,
422 198, 198, 198, 198, 90, 198, 37, 38, 198, 198,
423 198, 198, 143, 170, 198, 198, 198, 178, 198, 198,
424 198, 198, 48, 32, 44, 0
427 static yyconst YY_CHAR yy_ec
[256] =
429 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
430 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
431 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
432 1, 5, 6, 7, 8, 9, 10, 1, 11, 1,
433 1, 1, 12, 1, 13, 14, 1, 15, 15, 15,
434 15, 15, 15, 15, 15, 15, 15, 1, 1, 16,
435 17, 18, 1, 1, 19, 20, 21, 22, 23, 24,
436 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
437 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
438 45, 46, 47, 1, 48, 1, 49, 50, 51, 52,
440 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
441 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
442 73, 74, 14, 14, 14, 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,
448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
449 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,
454 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
455 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
459 static yyconst YY_CHAR yy_meta
[75] =
461 1, 2, 3, 2, 2, 1, 1, 2, 1, 1,
462 1, 2, 4, 2, 4, 1, 1, 1, 5, 5,
463 5, 6, 6, 5, 6, 5, 5, 6, 5, 5,
464 6, 6, 6, 5, 6, 6, 5, 5, 6, 6,
465 5, 6, 6, 6, 1, 2, 1, 6, 6, 6,
466 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
467 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
471 static yyconst flex_uint16_t yy_base
[1064] =
473 0, 73, 102, 77, 1254, 1255, 75, 1255, 1250, 1235,
474 1244, 0, 1204, 1234, 1233, 78, 66, 1230, 1229, 1215,
475 1208, 57, 63, 59, 64, 101, 0, 63, 79, 119,
476 94, 1223, 1209, 122, 123, 121, 1222, 104, 105, 100,
477 124, 90, 129, 137, 1174, 84, 117, 1176, 139, 150,
478 151, 151, 156, 1169, 163, 168, 166, 56, 1184, 1183,
479 232, 1232, 216, 1255, 1231, 242, 248, 251, 264, 196,
480 155, 167, 208, 228, 241, 1218, 249, 242, 195, 277,
481 284, 223, 319, 334, 257, 1255, 1255, 1225, 1255, 0,
482 1220, 1219, 1214, 0, 1213, 1255, 298, 1212, 1255, 1255,
484 1255, 1255, 1188, 263, 1188, 264, 1200, 1190, 1203, 1184,
485 1195, 1192, 1199, 270, 1185, 1183, 1185, 1195, 0, 1186,
486 1190, 1171, 1177, 1165, 1171, 1175, 1174, 1174, 280, 1176,
487 292, 1171, 301, 1169, 1162, 1168, 1180, 1178, 1170, 259,
488 0, 1177, 1165, 203, 304, 272, 1121, 1143, 1132, 1138,
489 1141, 288, 1121, 1125, 1121, 1124, 1123, 1135, 1117, 1119,
490 308, 1115, 1109, 1106, 1111, 1110, 1116, 1120, 1111, 1113,
491 1111, 1111, 234, 281, 296, 299, 1117, 282, 1103, 1111,
492 1096, 81, 315, 1115, 324, 26, 1103, 1102, 1102, 1093,
493 330, 1103, 1107, 1093, 1109, 1104, 1107, 281, 333, 1100,
495 1102, 1098, 1090, 342, 323, 321, 1082, 1081, 1083, 1084,
496 345, 350, 0, 1081, 332, 407, 1143, 1142, 1255, 363,
497 1255, 1255, 1141, 411, 415, 416, 1128, 0, 412, 390,
498 396, 404, 415, 1127, 410, 420, 421, 422, 423, 424,
499 0, 0, 1255, 1138, 0, 1255, 1129, 1128, 1123, 1118,
500 1104, 1116, 1111, 1095, 1096, 1112, 1094, 1088, 1105, 1091,
501 1088, 1100, 0, 1092, 1102, 1091, 1099, 1080, 1081, 1096,
502 1094, 1082, 1092, 1077, 1090, 1075, 1088, 1091, 1061, 1085,
503 1077, 1068, 1083, 1077, 1073, 1071, 1077, 1071, 1072, 1062,
504 1059, 1073, 1059, 1060, 1063, 435, 1037, 0, 1042, 0,
506 1027, 1036, 1026, 1028, 1019, 1023, 1021, 1015, 1023, 385,
507 1030, 1012, 1016, 1027, 1010, 1016, 1011, 1020, 1007, 1005,
508 1009, 0, 1002, 1001, 1011, 1001, 1014, 998, 1015, 383,
509 1010, 999, 392, 1012, 989, 1005, 1006, 1000, 988, 0,
510 1003, 1003, 996, 999, 989, 0, 982, 983, 991, 994,
511 0, 987, 992, 981, 993, 983, 988, 987, 378, 986,
512 970, 977, 973, 974, 404, 966, 408, 980, 970, 982,
513 979, 968, 966, 970, 974, 392, 956, 967, 967, 971,
514 952, 969, 953, 956, 964, 950, 395, 958, 946, 964,
515 950, 945, 0, 946, 956, 939, 950, 943, 948, 936,
517 935, 0, 462, 448, 453, 971, 454, 456, 434, 455,
518 1255, 965, 979, 970, 0, 979, 970, 957, 0, 975,
519 0, 975, 0, 956, 954, 953, 967, 0, 966, 940,
520 964, 956, 0, 944, 965, 947, 944, 0, 947, 452,
521 959, 0, 960, 945, 944, 957, 953, 950, 0, 937,
522 939, 950, 936, 950, 0, 941, 468, 1255, 905, 900,
523 899, 911, 908, 909, 894, 908, 907, 895, 904, 903,
524 0, 902, 901, 886, 892, 898, 893, 889, 879, 886,
525 893, 0, 0, 0, 881, 895, 890, 889, 881, 422,
526 887, 882, 886, 880, 883, 868, 0, 921, 879, 858,
528 874, 866, 878, 861, 872, 873, 0, 872, 856, 0,
529 870, 873, 859, 862, 0, 429, 852, 850, 844, 850,
530 858, 851, 864, 849, 0, 855, 842, 849, 857, 0,
531 847, 853, 856, 836, 854, 417, 853, 0, 841, 830,
532 831, 835, 844, 828, 842, 846, 842, 824, 829, 821,
533 837, 832, 821, 824, 836, 820, 0, 817, 822, 824,
534 426, 823, 0, 1255, 876, 463, 859, 466, 475, 476,
535 0, 851, 0, 849, 853, 844, 837, 832, 0, 852,
536 843, 831, 0, 837, 831, 0, 847, 840, 845, 840,
537 0, 835, 842, 822, 829, 827, 825, 835, 822, 824,
539 0, 820, 826, 818, 823, 825, 0, 0, 795, 783,
540 793, 0, 792, 791, 0, 782, 780, 789, 780, 773,
541 0, 785, 785, 781, 782, 767, 784, 780, 764, 760,
542 440, 0, 776, 776, 774, 760, 763, 770, 770, 749,
543 768, 435, 760, 756, 758, 754, 763, 758, 745, 761,
544 757, 758, 758, 741, 741, 754, 740, 752, 0, 751,
545 739, 753, 746, 734, 735, 749, 0, 731, 743, 727,
546 721, 739, 728, 734, 730, 732, 727, 721, 737, 732,
547 0, 721, 0, 714, 714, 713, 712, 712, 725, 725,
548 443, 0, 723, 722, 717, 720, 705, 711, 708, 712,
550 0, 717, 733, 483, 490, 0, 734, 732, 726, 736,
551 735, 734, 727, 723, 739, 0, 724, 712, 81, 122,
552 205, 226, 0, 0, 311, 0, 350, 460, 483, 476,
553 0, 472, 478, 468, 463, 0, 0, 461, 464, 0,
554 0, 0, 457, 0, 0, 0, 456, 458, 467, 447,
555 0, 469, 470, 0, 458, 0, 0, 474, 0, 471,
556 470, 466, 480, 478, 478, 475, 470, 472, 482, 473,
557 470, 488, 479, 0, 483, 489, 0, 473, 475, 493,
558 488, 476, 481, 495, 489, 488, 0, 0, 491, 503,
559 489, 0, 480, 486, 492, 489, 0, 496, 514, 505,
561 495, 510, 497, 503, 0, 499, 509, 510, 0, 0,
562 511, 515, 0, 518, 509, 520, 520, 521, 522, 508,
563 528, 0, 563, 564, 557, 545, 0, 560, 551, 552,
564 553, 543, 553, 559, 0, 562, 0, 565, 554, 571,
565 545, 558, 0, 0, 557, 0, 0, 536, 0, 0,
566 544, 545, 546, 548, 548, 0, 0, 539, 535, 0,
567 544, 537, 540, 0, 554, 554, 547, 543, 0, 552,
568 546, 554, 566, 553, 0, 551, 565, 551, 568, 568,
569 0, 0, 0, 0, 565, 559, 561, 572, 566, 574,
570 555, 576, 1255, 577, 0, 0, 579, 0, 583, 570,
572 579, 575, 563, 0, 0, 0, 585, 586, 587, 587,
573 581, 606, 0, 618, 619, 0, 0, 0, 0, 0,
574 601, 627, 606, 615, 611, 0, 602, 0, 599, 600,
575 591, 0, 0, 591, 0, 595, 0, 604, 589, 602,
576 593, 611, 594, 605, 610, 598, 603, 613, 601, 0,
577 0, 608, 614, 606, 605, 620, 0, 621, 0, 0,
578 622, 0, 611, 614, 621, 618, 0, 0, 0, 0,
579 627, 0, 0, 657, 0, 658, 662, 664, 648, 662,
580 650, 0, 0, 619, 634, 0, 0, 0, 621, 0,
581 630, 0, 641, 0, 0, 0, 0, 0, 0, 630,
583 640, 626, 0, 0, 0, 628, 0, 628, 0, 0,
584 0, 0, 667, 668, 663, 664, 678, 0, 0, 0,
585 0, 642, 650, 652, 0, 0, 652, 683, 677, 681,
586 673, 685, 658, 660, 0, 661, 0, 0, 692, 696,
587 689, 650, 0, 0, 685, 692, 687, 0, 685, 690,
588 691, 687, 0, 0, 0, 1255, 724, 726, 732, 735,
592 static yyconst flex_int16_t yy_def
[1064] =
594 1056, 1, 1, 3, 1056, 1056, 1056, 1056, 1056, 1056,
595 1057, 1058, 1059, 1056, 1060, 1060, 1056, 1056, 1056, 1060,
596 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
597 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1056, 1060, 1060,
598 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
599 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
600 1056, 1061, 1060, 1056, 1056, 1062, 1062, 1062, 1060, 69,
601 69, 69, 69, 1060, 69, 69, 69, 69, 69, 69,
602 69, 69, 1062, 1061, 1056, 1056, 1056, 1057, 1056, 1058,
603 1056, 1063, 1056, 1060, 1060, 1056, 1060, 1060, 1056, 1056,
605 1056, 1056, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
606 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
607 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
608 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
609 1060, 1060, 1060, 1056, 1056, 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,
613 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
614 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
616 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
617 1060, 1060, 1060, 1060, 1060, 1056, 1061, 1061, 1056, 1060,
618 1056, 1056, 1056, 83, 83, 83, 69, 69, 69, 69,
619 69, 1060, 69, 69, 69, 69, 69, 69, 69, 69,
620 83, 84, 1056, 1061, 84, 1056, 1056, 1056, 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, 1060, 1060, 1060, 1060, 1060,
624 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
625 1060, 1060, 1060, 1060, 1060, 1056, 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,
635 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
636 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
638 1060, 1060, 1060, 69, 69, 1060, 69, 69, 69, 69,
639 1056, 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, 1060, 1060, 1060, 1060,
642 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
643 1060, 1060, 1060, 1060, 1060, 1060, 1056, 1056, 1060, 1060,
644 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
645 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
646 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
647 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, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
654 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
655 1060, 1060, 1060, 1056, 1056, 69, 1060, 69, 69, 69,
656 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
657 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
658 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,
668 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
669 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
671 1060, 1060, 1060, 69, 69, 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,
679 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
680 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
682 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
683 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
684 1060, 1060, 69, 69, 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, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
690 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
691 1060, 1060, 1056, 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,
701 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
702 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, 1060, 1060, 1060, 1060, 1060,
708 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
709 1060, 1060, 1060, 1060, 1060, 0, 1056, 1056, 1056, 1056,
713 static yyconst flex_uint16_t yy_nxt
[1330] =
715 6, 7, 8, 9, 7, 10, 11, 6, 12, 6,
716 13, 14, 15, 6, 16, 17, 18, 19, 20, 21,
717 22, 23, 24, 25, 26, 27, 28, 27, 27, 29,
718 30, 31, 32, 33, 27, 34, 35, 36, 27, 27,
719 37, 27, 27, 27, 38, 6, 6, 27, 39, 40,
720 41, 42, 43, 44, 45, 46, 47, 48, 27, 49,
721 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
722 60, 27, 27, 27, 61, 105, 85, 61, 61, 85,
723 62, 83, 99, 100, 84, 107, 119, 96, 110, 106,
724 111, 356, 97, 113, 120, 108, 114, 121, 109, 357,
726 112, 122, 115, 63, 64, 65, 66, 63, 144, 67,
727 836, 123, 128, 68, 69, 67, 70, 212, 145, 213,
728 71, 72, 73, 116, 74, 75, 129, 76, 77, 98,
729 76, 78, 175, 117, 347, 79, 118, 124, 80, 81,
730 132, 125, 82, 140, 133, 126, 176, 67, 135, 136,
731 348, 127, 163, 141, 134, 164, 142, 837, 165, 152,
732 137, 138, 153, 139, 146, 154, 147, 177, 155, 227,
733 148, 149, 156, 76, 150, 151, 157, 166, 178, 158,
734 159, 227, 179, 160, 230, 170, 161, 181, 167, 171,
735 168, 182, 162, 172, 169, 183, 173, 185, 186, 189,
737 192, 184, 104, 190, 194, 96, 187, 144, 195, 227,
738 229, 198, 188, 191, 193, 199, 203, 145, 209, 200,
739 204, 196, 227, 205, 201, 202, 231, 131, 210, 838,
740 206, 211, 207, 216, 220, 208, 216, 227, 125, 217,
741 106, 240, 126, 85, 222, 223, 224, 98, 127, 1056,
742 222, 223, 1056, 222, 223, 227, 227, 110, 85, 232,
743 235, 85, 839, 227, 122, 226, 222, 223, 225, 112,
744 233, 225, 234, 114, 123, 225, 227, 225, 228, 115,
745 120, 251, 227, 227, 227, 252, 331, 227, 292, 227,
746 227, 227, 227, 227, 293, 254, 332, 227, 227, 255,
748 227, 227, 236, 237, 227, 263, 140, 96, 264, 225,
749 278, 279, 97, 296, 238, 138, 141, 239, 145, 142,
750 216, 222, 223, 241, 281, 284, 242, 282, 297, 333,
751 342, 298, 374, 334, 285, 227, 243, 244, 245, 299,
752 305, 245, 375, 335, 306, 245, 245, 245, 245, 98,
753 307, 343, 245, 245, 245, 336, 316, 245, 840, 245,
754 245, 337, 245, 245, 338, 339, 340, 245, 317, 318,
755 245, 245, 841, 319, 245, 349, 350, 353, 362, 245,
756 388, 363, 351, 376, 354, 386, 355, 377, 387, 389,
757 364, 365, 383, 394, 384, 366, 403, 367, 401, 402,
759 396, 385, 378, 397, 227, 245, 273, 398, 216, 399,
760 227, 216, 85, 395, 217, 224, 1056, 1056, 225, 225,
761 225, 96, 225, 225, 227, 406, 229, 404, 260, 227,
762 226, 270, 405, 407, 227, 227, 227, 227, 227, 457,
763 408, 470, 490, 494, 518, 519, 471, 537, 227, 409,
764 491, 549, 288, 410, 524, 527, 525, 550, 287, 538,
765 528, 495, 227, 98, 564, 565, 566, 227, 227, 227,
766 227, 569, 457, 592, 634, 415, 676, 227, 424, 677,
767 227, 458, 568, 657, 570, 593, 700, 635, 658, 227,
768 227, 754, 842, 701, 765, 704, 811, 227, 571, 812,
770 766, 601, 705, 755, 227, 843, 844, 845, 823, 846,
771 847, 848, 849, 824, 458, 850, 851, 852, 853, 854,
772 855, 856, 857, 858, 859, 860, 861, 862, 863, 864,
773 865, 866, 867, 868, 869, 870, 871, 872, 873, 874,
774 875, 876, 877, 878, 879, 880, 881, 882, 883, 884,
775 885, 886, 887, 888, 889, 890, 891, 892, 893, 894,
776 895, 896, 897, 898, 899, 900, 901, 902, 903, 904,
777 905, 906, 907, 908, 909, 910, 911, 227, 227, 912,
778 913, 914, 915, 916, 917, 918, 919, 920, 921, 922,
779 923, 924, 925, 926, 927, 928, 929, 930, 931, 932,
781 933, 934, 935, 936, 937, 938, 847, 939, 940, 941,
782 942, 943, 944, 945, 946, 947, 948, 949, 950, 951,
783 952, 953, 954, 955, 956, 957, 958, 959, 960, 961,
784 962, 963, 964, 965, 966, 967, 968, 969, 970, 971,
785 972, 973, 974, 975, 976, 977, 978, 979, 980, 981,
786 982, 983, 984, 985, 986, 987, 988, 989, 990, 991,
787 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001,
788 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011,
789 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021,
790 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031,
792 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
793 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051,
794 1052, 1053, 1054, 1055, 88, 88, 88, 88, 88, 88,
795 90, 90, 91, 91, 835, 91, 91, 91, 94, 94,
796 94, 218, 218, 218, 218, 218, 218, 225, 225, 225,
797 225, 247, 247, 834, 247, 247, 247, 833, 832, 831,
798 830, 829, 828, 827, 826, 825, 822, 821, 820, 819,
799 818, 817, 816, 815, 814, 813, 810, 809, 808, 807,
800 806, 805, 804, 803, 802, 801, 800, 799, 798, 797,
801 796, 795, 794, 793, 792, 791, 790, 789, 788, 787,
803 786, 785, 784, 783, 782, 781, 780, 779, 778, 777,
804 776, 775, 774, 773, 772, 771, 770, 769, 768, 767,
805 764, 763, 762, 761, 760, 759, 758, 757, 756, 753,
806 752, 751, 750, 749, 748, 747, 746, 745, 744, 743,
807 742, 741, 740, 739, 738, 737, 736, 735, 734, 733,
808 732, 731, 730, 729, 728, 727, 726, 725, 724, 723,
809 722, 721, 720, 719, 718, 717, 716, 715, 714, 713,
810 712, 711, 710, 709, 708, 707, 706, 703, 564, 702,
811 699, 698, 697, 696, 695, 694, 693, 692, 691, 690,
812 689, 688, 687, 686, 685, 684, 683, 682, 681, 680,
814 679, 678, 675, 674, 673, 672, 671, 670, 669, 668,
815 667, 666, 665, 664, 663, 662, 661, 660, 659, 656,
816 655, 654, 653, 652, 651, 650, 649, 648, 647, 646,
817 645, 644, 643, 642, 641, 640, 639, 638, 637, 636,
818 633, 632, 631, 630, 629, 628, 627, 626, 625, 624,
819 623, 622, 621, 620, 619, 618, 617, 616, 615, 614,
820 613, 612, 611, 610, 609, 608, 607, 606, 605, 604,
821 603, 602, 601, 600, 599, 598, 597, 596, 595, 594,
822 591, 590, 589, 588, 587, 586, 585, 584, 583, 582,
823 581, 580, 579, 578, 577, 576, 575, 574, 573, 572,
825 571, 567, 563, 562, 561, 560, 559, 558, 557, 556,
826 555, 554, 553, 552, 551, 548, 547, 546, 545, 544,
827 543, 542, 541, 540, 539, 536, 535, 534, 533, 532,
828 531, 530, 529, 526, 523, 522, 521, 520, 438, 517,
829 516, 515, 514, 513, 512, 511, 510, 509, 508, 507,
830 506, 505, 504, 503, 502, 501, 500, 499, 498, 497,
831 496, 493, 492, 489, 488, 487, 486, 485, 484, 483,
832 482, 481, 480, 479, 478, 477, 476, 475, 474, 473,
833 472, 469, 468, 467, 466, 465, 464, 463, 462, 461,
834 460, 459, 456, 455, 454, 453, 452, 451, 450, 449,
836 448, 447, 446, 445, 444, 443, 442, 441, 440, 439,
837 438, 437, 436, 435, 434, 433, 432, 431, 430, 429,
838 428, 427, 426, 425, 424, 423, 422, 421, 420, 419,
839 418, 417, 416, 415, 414, 413, 412, 249, 411, 411,
840 243, 227, 227, 222, 219, 219, 400, 393, 392, 391,
841 390, 382, 381, 380, 379, 373, 372, 371, 370, 369,
842 368, 361, 360, 359, 358, 352, 346, 345, 344, 341,
843 330, 329, 328, 327, 326, 325, 324, 323, 322, 321,
844 320, 315, 314, 313, 312, 311, 310, 309, 308, 304,
845 303, 302, 301, 300, 295, 294, 291, 290, 289, 288,
847 287, 286, 283, 280, 277, 276, 275, 274, 273, 272,
848 271, 270, 269, 268, 267, 266, 265, 262, 261, 260,
849 259, 258, 257, 256, 253, 250, 249, 95, 93, 248,
850 246, 89, 227, 221, 219, 215, 214, 197, 180, 174,
851 143, 131, 130, 104, 103, 102, 101, 95, 93, 92,
852 89, 87, 86, 1056, 5, 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,
855 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
856 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
858 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
859 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
860 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056
863 static yyconst flex_int16_t yy_chk
[1330] =
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, 1, 1, 1, 1, 1, 1,
871 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
872 1, 1, 1, 1, 2, 22, 7, 2, 4, 7,
873 2, 4, 17, 17, 4, 23, 28, 16, 24, 22,
874 24, 186, 16, 25, 28, 23, 25, 29, 23, 186,
876 24, 29, 25, 2, 3, 3, 3, 4, 38, 3,
877 719, 29, 31, 3, 3, 3, 3, 58, 38, 58,
878 3, 3, 3, 26, 3, 3, 31, 3, 3, 16,
879 3, 3, 46, 26, 182, 3, 26, 30, 3, 3,
880 34, 30, 3, 36, 34, 30, 46, 3, 35, 35,
881 182, 30, 42, 36, 34, 42, 36, 720, 42, 40,
882 35, 35, 40, 35, 39, 40, 39, 47, 40, 71,
883 39, 39, 41, 3, 39, 39, 41, 43, 47, 41,
884 41, 72, 47, 41, 71, 44, 41, 49, 43, 44,
885 43, 49, 41, 44, 43, 49, 44, 50, 50, 51,
887 52, 49, 72, 51, 53, 70, 50, 144, 53, 79,
888 70, 55, 50, 51, 52, 55, 56, 144, 57, 55,
889 56, 53, 73, 56, 55, 55, 73, 79, 57, 721,
890 56, 57, 56, 61, 63, 56, 61, 82, 63, 61,
891 73, 82, 63, 66, 66, 66, 66, 70, 63, 67,
892 67, 67, 68, 68, 68, 75, 78, 74, 85, 74,
893 78, 85, 722, 77, 78, 68, 69, 69, 69, 74,
894 75, 69, 77, 75, 78, 69, 69, 69, 69, 75,
895 77, 104, 69, 69, 69, 104, 173, 69, 140, 69,
896 69, 80, 69, 69, 140, 106, 173, 69, 81, 106,
898 69, 69, 80, 80, 69, 114, 81, 97, 114, 69,
899 129, 129, 97, 145, 80, 80, 81, 80, 145, 81,
900 83, 83, 83, 83, 131, 133, 83, 131, 146, 174,
901 178, 146, 198, 174, 133, 69, 84, 84, 84, 146,
902 152, 84, 198, 174, 152, 84, 84, 84, 84, 97,
903 152, 178, 84, 84, 84, 175, 161, 84, 725, 84,
904 84, 175, 84, 84, 176, 176, 176, 84, 161, 161,
905 84, 84, 727, 161, 84, 183, 183, 185, 191, 84,
906 206, 191, 183, 199, 185, 205, 185, 199, 205, 206,
907 191, 191, 204, 211, 204, 191, 220, 191, 215, 215,
909 212, 204, 199, 212, 230, 84, 220, 212, 216, 212,
910 231, 216, 224, 211, 216, 224, 225, 226, 224, 225,
911 226, 229, 225, 226, 235, 232, 229, 230, 232, 233,
912 226, 235, 231, 233, 236, 237, 238, 239, 240, 296,
913 238, 310, 330, 333, 359, 359, 310, 376, 409, 239,
914 330, 387, 237, 240, 365, 367, 365, 387, 236, 376,
915 367, 333, 404, 229, 403, 403, 404, 405, 407, 410,
916 408, 409, 457, 440, 490, 405, 536, 566, 407, 536,
917 568, 296, 408, 516, 410, 440, 561, 490, 516, 569,
918 570, 631, 728, 561, 642, 569, 691, 704, 566, 691,
920 642, 568, 570, 631, 705, 729, 730, 732, 704, 733,
921 734, 735, 738, 705, 457, 739, 743, 747, 748, 749,
922 750, 752, 753, 755, 758, 760, 761, 762, 763, 764,
923 765, 766, 767, 768, 769, 770, 771, 772, 773, 775,
924 776, 778, 779, 780, 781, 782, 783, 784, 785, 786,
925 789, 790, 791, 793, 794, 795, 796, 798, 799, 800,
926 801, 802, 803, 804, 806, 807, 808, 811, 812, 814,
927 815, 816, 817, 818, 819, 820, 821, 823, 824, 825,
928 826, 828, 829, 830, 831, 832, 833, 834, 836, 838,
929 839, 840, 841, 842, 845, 848, 851, 852, 853, 854,
931 855, 858, 859, 861, 862, 863, 824, 865, 866, 867,
932 868, 870, 871, 872, 873, 874, 876, 877, 878, 879,
933 880, 885, 886, 887, 888, 889, 890, 891, 892, 894,
934 897, 899, 900, 901, 902, 903, 907, 908, 909, 910,
935 911, 912, 914, 915, 921, 922, 923, 924, 925, 927,
936 929, 930, 931, 934, 936, 938, 939, 940, 941, 942,
937 943, 944, 945, 946, 947, 948, 949, 952, 953, 954,
938 955, 956, 958, 961, 963, 964, 965, 966, 971, 974,
939 976, 977, 978, 979, 980, 981, 984, 985, 989, 991,
940 993, 1000, 1001, 1002, 1006, 1008, 1013, 1014, 1015, 1016,
942 1017, 1022, 1023, 1024, 1027, 1028, 1029, 1030, 1031, 1032,
943 1033, 1034, 1036, 1039, 1040, 1041, 1042, 1045, 1046, 1047,
944 1049, 1050, 1051, 1052, 1057, 1057, 1057, 1057, 1057, 1057,
945 1058, 1058, 1059, 1059, 718, 1059, 1059, 1059, 1060, 1060,
946 1060, 1061, 1061, 1061, 1061, 1061, 1061, 1062, 1062, 1062,
947 1062, 1063, 1063, 717, 1063, 1063, 1063, 715, 714, 713,
948 712, 711, 710, 709, 708, 707, 703, 702, 700, 699,
949 698, 697, 696, 695, 694, 693, 690, 689, 688, 687,
950 686, 685, 684, 682, 680, 679, 678, 677, 676, 675,
951 674, 673, 672, 671, 670, 669, 668, 666, 665, 664,
953 663, 662, 661, 660, 658, 657, 656, 655, 654, 653,
954 652, 651, 650, 649, 648, 647, 646, 645, 644, 643,
955 641, 640, 639, 638, 637, 636, 635, 634, 633, 630,
956 629, 628, 627, 626, 625, 624, 623, 622, 620, 619,
957 618, 617, 616, 614, 613, 611, 610, 609, 606, 605,
958 604, 603, 602, 600, 599, 598, 597, 596, 595, 594,
959 593, 592, 590, 589, 588, 587, 585, 584, 582, 581,
960 580, 578, 577, 576, 575, 574, 572, 567, 565, 562,
961 560, 559, 558, 556, 555, 554, 553, 552, 551, 550,
962 549, 548, 547, 546, 545, 544, 543, 542, 541, 540,
964 539, 537, 535, 534, 533, 532, 531, 529, 528, 527,
965 526, 524, 523, 522, 521, 520, 519, 518, 517, 514,
966 513, 512, 511, 509, 508, 506, 505, 504, 503, 502,
967 501, 500, 499, 498, 496, 495, 494, 493, 492, 491,
968 489, 488, 487, 486, 485, 481, 480, 479, 478, 477,
969 476, 475, 474, 473, 472, 470, 469, 468, 467, 466,
970 465, 464, 463, 462, 461, 460, 459, 456, 454, 453,
971 452, 451, 450, 448, 447, 446, 445, 444, 443, 441,
972 439, 437, 436, 435, 434, 432, 431, 430, 429, 427,
973 426, 425, 424, 422, 420, 418, 417, 416, 414, 413,
975 412, 406, 401, 400, 399, 398, 397, 396, 395, 394,
976 392, 391, 390, 389, 388, 386, 385, 384, 383, 382,
977 381, 380, 379, 378, 377, 375, 374, 373, 372, 371,
978 370, 369, 368, 366, 364, 363, 362, 361, 360, 358,
979 357, 356, 355, 354, 353, 352, 350, 349, 348, 347,
980 345, 344, 343, 342, 341, 339, 338, 337, 336, 335,
981 334, 332, 331, 329, 328, 327, 326, 325, 324, 323,
982 321, 320, 319, 318, 317, 316, 315, 314, 313, 312,
983 311, 309, 308, 307, 306, 305, 304, 303, 302, 301,
984 299, 297, 295, 294, 293, 292, 291, 290, 289, 288,
986 287, 286, 285, 284, 283, 282, 281, 280, 279, 278,
987 277, 276, 275, 274, 273, 272, 271, 270, 269, 268,
988 267, 266, 265, 264, 262, 261, 260, 259, 258, 257,
989 256, 255, 254, 253, 252, 251, 250, 249, 248, 247,
990 244, 234, 227, 223, 218, 217, 214, 210, 209, 208,
991 207, 203, 202, 201, 200, 197, 196, 195, 194, 193,
992 192, 190, 189, 188, 187, 184, 181, 180, 179, 177,
993 172, 171, 170, 169, 168, 167, 166, 165, 164, 163,
994 162, 160, 159, 158, 157, 156, 155, 154, 153, 151,
995 150, 149, 148, 147, 143, 142, 139, 138, 137, 136,
997 135, 134, 132, 130, 128, 127, 126, 125, 124, 123,
998 122, 121, 120, 118, 117, 116, 115, 113, 112, 111,
999 110, 109, 108, 107, 105, 103, 98, 95, 93, 92,
1000 91, 88, 76, 65, 62, 60, 59, 54, 48, 45,
1001 37, 33, 32, 21, 20, 19, 18, 15, 14, 13,
1002 11, 10, 9, 5, 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,
1005 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1006 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1008 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1009 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1010 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056
1013 static yy_state_type yy_last_accepting_state
;
1014 static char *yy_last_accepting_cpos
;
1016 extern int yy_flex_debug
;
1017 int yy_flex_debug
= 0;
1019 /* The intent behind this definition is that it'll catch
1020 * any uses of REJECT which flex missed.
1022 #define REJECT reject_used_but_not_detected
1023 #define yymore() yymore_used_but_not_detected
1024 #define YY_MORE_ADJ 0
1025 #define YY_RESTORE_YY_MORE_OFFSET
1027 /* aNetHack 0.0.1 lev_comp.l $ANH-Date: 1455415237 2016/02/14 02:00:37 $ $ANH-Branch: aNetHack-3.6.0 $:$ANH-Revision: 1.27 $ */
1028 /* Copyright (c) 1989 by Jean-Christophe Collet */
1029 /* aNetHack may be freely redistributed. See license for details. */
1034 #include "lev_comp.h"
1037 /* Most of these don't exist in flex, yywrap is macro and
1038 * yyunput is properly declared in flex.skel.
1040 #if !defined(FLEX_SCANNER) && !defined(FLEXHACK_SCANNER)
1041 int FDECL(yyback
, (int *,int));
1046 /* Traditional lexes let yyunput() and yyoutput() default to int;
1047 * newer ones may declare them as void since they don't return
1048 * values. For even more fun, the lex supplied as part of the
1049 * newer unbundled compiler for SunOS 4.x adds the void declarations
1050 * (under __STDC__ or _cplusplus ifdefs -- otherwise they remain
1051 * int) while the bundled lex and the one with the older unbundled
1052 * compiler do not. To detect this, we need help from outside --
1053 * sys/unix/Makefile.utl.
1055 * Digital UNIX is difficult and still has int in spite of all
1058 # if defined(NeXT) || defined(SVR4) || defined(_AIX32)
1061 # if !defined(VOIDYYPUT) && defined(POSIX_TYPES)
1062 # if !defined(BOS) && !defined(HISX) && !defined(_M_UNIX) && !defined(VMS)
1066 # if !defined(VOIDYYPUT) && defined(WEIRD_LEX)
1067 # if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX > 1)
1071 # if defined(VOIDYYPUT) && defined(__osf__)
1075 void FDECL(yyunput
, (int));
1076 void FDECL(yyoutput
, (int));
1078 int FDECL(yyunput
, (int));
1079 int FDECL(yyoutput
, (int));
1082 #else /* !FLEX_SCANNER && !FLEXHACK_SCANNER */
1083 /* most recent flex allows suppressing yyunput() altogether when not needed */
1088 #if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER)
1089 /* older flex wants this */
1090 #define YY_MALLOC_DECL genericptr_t FDECL(malloc, (size_t)); \
1091 genericptr_t FDECL(realloc, (genericptr_t, size_t));
1092 /* newer flex assumes <stdlib.h> so needs this in case it's been suppressed */
1096 void FDECL(init_yyin
, (FILE *));
1097 void FDECL(init_yyout
, (FILE *));
1099 long NDECL(handle_varstring_check
);
1100 long FDECL(corefunc_str_check
, (char *, long));
1102 extern void VDECL(lc_error
, (const char *, ...));
1103 extern struct lc_vardefs
*FDECL(vardef_defined
,(struct lc_vardefs
*,char *, int));
1105 extern struct lc_vardefs
*variable_definitions
;
1107 extern long FDECL(method_defined
, (char *, long, long *));
1109 void FDECL(savetoken
, (char *));
1110 void NDECL(newline
);
1111 void FDECL(advancepos
, (char *));
1114 * This doesn't always get put in lev_comp.h
1115 * (esp. when using older versions of bison).
1117 extern YYSTYPE yylval
;
1119 int nh_line_number
= 1;
1120 int token_start_pos
= 0;
1121 char curr_token
[512];
1122 static char map
[4096];
1123 static int map_cnt
= 0;
1125 FILE *orig_yyin
= NULL
;
1127 #define ST_RET(x) do { savetoken(yytext); return x; } while (0);
1128 #define ST_RETF(y, x) do { savetoken(yytext); y; return x; } while (0);
1133 #ifndef YY_EXTRA_TYPE
1134 #define YY_EXTRA_TYPE void *
1137 /* Accessor methods to globals.
1138 These are made visible to non-reentrant scanners for convenience. */
1140 int yylex_destroy
FDECL(FDECL_dummy
, (void ));
1141 int yyget_debug
FDECL(FDECL_dummy
, (void ));
1142 void yyset_debug
FDECL(FDECL_dummy
, (int debug_flag
));
1143 YY_EXTRA_TYPE yyget_extra
FDECL(FDECL_dummy
, (void ));
1144 void yyset_extra
FDECL(FDECL_dummy
, (YY_EXTRA_TYPE user_defined
));
1145 FILE *yyget_in
FDECL(FDECL_dummy
, (void ));
1146 void yyset_in
FDECL(FDECL_dummy
, (FILE * _in_str
));
1147 FILE *yyget_out
FDECL(FDECL_dummy
, (void ));
1148 void yyset_out
FDECL(FDECL_dummy
, (FILE * _out_str
));
1149 yy_size_t yyget_leng
FDECL(FDECL_dummy
, (void ));
1150 char *yyget_text
FDECL(FDECL_dummy
, (void ));
1151 int yyget_lineno
FDECL(FDECL_dummy
, (void ));
1152 void yyset_lineno
FDECL(FDECL_dummy
, (int _line_number
));
1154 /* Macros after this point can all be overridden by user definitions in
1158 #ifndef YY_SKIP_YYWRAP
1159 extern int yywrap
FDECL(FDECL_dummy
, (void ));
1164 static void yyunput
FDECL(FDECL_dummy
, (int c
,char *buf_ptr
));
1168 static void yy_flex_strncpy
FDECL(FDECL_dummy
, (char *,yyconst
char *,int ));
1171 #ifdef YY_NEED_STRLEN
1172 static int yy_flex_strlen
FDECL(FDECL_dummy
, (yyconst
char * ));
1177 static int input
FDECL(FDECL_dummy
, (void ));
1181 /* Amount of stuff to slurp up with each read. */
1182 #ifndef YY_READ_BUF_SIZE
1184 /* On IA-64, the buffer size is 16k, not 8k */
1185 #define YY_READ_BUF_SIZE 16384
1187 #define YY_READ_BUF_SIZE 8192
1188 #endif /* __ia64__ */
1191 /* Copy whatever the last rule matched to the standard output. */
1193 /* This used to be an fputs(), but since the string might contain NUL's,
1194 * we now use fwrite().
1196 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
1199 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1200 * is returned in "result".
1203 #define YY_INPUT(buf,result,max_size) \
1204 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1208 for ( n = 0; n < max_size && \
1209 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1210 buf[n] = (char) c; \
1212 buf[n++] = (char) c; \
1213 if ( c == EOF && ferror( yyin ) ) \
1214 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1220 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1222 if( errno != EINTR) \
1224 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1234 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1235 * we don't want an extra ';' after the "return" because that will cause
1236 * some compilers to complain about unreachable statements.
1239 #define yyterminate() return YY_NULL
1242 /* Number of entries by which start-condition stack grows. */
1243 #ifndef YY_START_STACK_INCR
1244 #define YY_START_STACK_INCR 25
1247 /* Report a fatal error. */
1248 #ifndef YY_FATAL_ERROR
1249 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1252 /* Default declaration of generated scanner - a define so the user can
1253 * easily add parameters.
1256 #define YY_DECL_IS_OURS 1
1258 extern int yylex
FDECL(FDECL_dummy
, (void));
1260 #define YY_DECL int yylex ()
1261 #endif /* !YY_DECL */
1263 /* Code executed at the beginning of each rule, after yytext and yyleng
1266 #ifndef YY_USER_ACTION
1267 #define YY_USER_ACTION
1270 /* Code executed at the end of each rule. */
1272 #define YY_BREAK /*LINTED*/break;
1275 #define YY_RULE_SETUP \
1277 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1278 (yytext[yyleng - 1] == '\n'); \
1281 /** The main scanner function which does all the work.
1285 yy_state_type yy_current_state
;
1286 char *yy_cp
, *yy_bp
;
1298 (yy_start
) = 1; /* first start state */
1306 if ( ! YY_CURRENT_BUFFER
) {
1307 yyensure_buffer_stack ();
1308 YY_CURRENT_BUFFER_LVALUE
=
1309 yy_create_buffer(yyin
,YY_BUF_SIZE
);
1312 yy_load_buffer_state( );
1317 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1319 yy_cp
= (yy_c_buf_p
);
1321 /* Support of yytext. */
1322 *yy_cp
= (yy_hold_char
);
1324 /* yy_bp points to the position in yy_ch_buf of the start of
1329 yy_current_state
= (yy_start
);
1330 yy_current_state
+= YY_AT_BOL();
1334 YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)] ;
1335 if ( yy_accept
[yy_current_state
] )
1337 (yy_last_accepting_state
) = yy_current_state
;
1338 (yy_last_accepting_cpos
) = yy_cp
;
1340 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1342 yy_current_state
= (int) yy_def
[yy_current_state
];
1343 if ( yy_current_state
>= 1057 )
1344 yy_c
= yy_meta
[(unsigned int) yy_c
];
1346 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1349 while ( yy_base
[yy_current_state
] != 1255 );
1352 yy_act
= yy_accept
[yy_current_state
];
1354 { /* have to back up */
1355 yy_cp
= (yy_last_accepting_cpos
);
1356 yy_current_state
= (yy_last_accepting_state
);
1357 yy_act
= yy_accept
[yy_current_state
];
1360 YY_DO_BEFORE_ACTION
;
1362 do_action
: /* This label is used only to access EOF actions. */
1365 { /* beginning of action switch */
1366 case 0: /* must back up */
1367 /* undo the effects of YY_DO_BEFORE_ACTION */
1368 *yy_cp
= (yy_hold_char
);
1369 yy_cp
= (yy_last_accepting_cpos
);
1370 yy_current_state
= (yy_last_accepting_state
);
1371 goto yy_find_action
;
1378 yylval
.map
= (char *) alloc(map_cnt
+ 1);
1379 (void) strncpy(yylval
.map
, map
, map_cnt
);
1380 yylval
.map
[map_cnt
] = 0;
1386 /* rule 2 can match eol */
1391 /* convert \r\n to \n */
1392 if (len
>= 2 && yytext
[len
- 2] == '\r')
1394 (void) strncpy(map
+ map_cnt
, yytext
, len
);
1396 map
[map_cnt
- 1] = '\n';
1397 map
[map_cnt
] = '\0';
1402 /* rule 3 can match eol */
1404 { savetoken(yytext
); newline(); }
1424 ST_RET(LEV_INIT_ID
);
1428 ST_RET(MAZE_GRID_ID
);
1432 ST_RET(SOLID_FILL_ID
);
1440 ST_RET(ROGUELEV_ID
);
1448 ST_RET(GEOMETRY_ID
);
1451 /* rule 15 can match eol */
1453 { savetoken(yytext
); BEGIN(MAPC
); newline(); }
1485 ST_RET(ROOMDOOR_ID
);
1489 ST_RET(DRAWBRIDGE_ID
);
1493 ST_RET(MAZEWALK_ID
);
1529 ST_RET(FOUNTAIN_ID
);
1541 ST_RET(NON_DIGGABLE_ID
);
1545 ST_RET(NON_PASSWALL_ID
);
1569 ST_RET(RAND_CORRIDOR_ID
);
1573 ST_RET(CORRIDOR_ID
);
1585 ST_RET(REPLACE_TERRAIN_ID
);
1597 ST_RET(ENGRAVING_ID
);
1601 ST_RET(MINERALIZE_ID
);
1637 ST_RET(FUNCTION_ID
);
1649 ST_RET(selection_ID
);
1657 ST_RET(fillrect_ID
);
1665 ST_RET(randline_ID
);
1677 ST_RET(rndcoord_ID
);
1693 ST_RET(gradient_ID
);
1697 ST_RET(complement_ID
);
1701 { savetoken(yytext
); yylval
.i
=SEL_GRADIENT_RADIAL
; return GRADIENT_TYPE
; }
1705 { savetoken(yytext
); yylval
.i
=SEL_GRADIENT_SQUARE
; return GRADIENT_TYPE
; }
1709 { savetoken(yytext
); yylval
.i
=DRY
; return HUMIDITY_TYPE
; }
1713 { savetoken(yytext
); yylval
.i
=WET
; return HUMIDITY_TYPE
; }
1717 { savetoken(yytext
); yylval
.i
=HOT
; return HUMIDITY_TYPE
; }
1721 { savetoken(yytext
); yylval
.i
=SOLID
; return HUMIDITY_TYPE
; }
1725 { savetoken(yytext
); yylval
.i
=ANY_LOC
; return HUMIDITY_TYPE
; }
1733 ST_RET(QUANTITY_ID
);
1745 ST_RET(ERODEPROOF_ID
);
1749 { savetoken(yytext
); yylval
.i
=1; return TRAPPED_STATE
; }
1753 { savetoken(yytext
); yylval
.i
=0; return TRAPPED_STATE
; }
1757 ST_RET(RECHARGED_ID
);
1773 ST_RET(CANCELLED_ID
);
1793 ST_RET(PARALYZED_ID
);
1801 ST_RET(CONFUSED_ID
);
1805 ST_RET(SEENTRAPS_ID
);
1813 ST_RETF((yylval
.i
=1), HORIZ_OR_VERT
);
1817 { savetoken(yytext
); yylval
.i
=2; return HORIZ_OR_VERT
; }
1821 { savetoken(yytext
); yylval
.i
=D_ISOPEN
; return DOOR_STATE
; }
1825 { savetoken(yytext
); yylval
.i
=D_CLOSED
; return DOOR_STATE
; }
1829 { savetoken(yytext
); yylval
.i
=D_LOCKED
; return DOOR_STATE
; }
1833 { savetoken(yytext
); yylval
.i
=D_NODOOR
; return DOOR_STATE
; }
1837 { savetoken(yytext
); yylval
.i
=D_BROKEN
; return DOOR_STATE
; }
1841 { savetoken(yytext
); yylval
.i
=D_SECRET
; return DOOR_STATE
; }
1845 { savetoken(yytext
); yylval
.i
=W_NORTH
; return DIRECTION
; }
1849 { savetoken(yytext
); yylval
.i
=W_EAST
; return DIRECTION
; }
1853 { savetoken(yytext
); yylval
.i
=W_SOUTH
; return DIRECTION
; }
1857 { savetoken(yytext
); yylval
.i
=W_WEST
; return DIRECTION
; }
1861 { savetoken(yytext
); yylval
.i
= -1; return RANDOM_TYPE
; }
1865 { savetoken(yytext
); yylval
.i
= -1; return RANDOM_TYPE_BRACKET
; }
1869 { savetoken(yytext
); yylval
.i
= -2; return NONE
; }
1877 { savetoken(yytext
); yylval
.i
=1; return LEFT_OR_RIGHT
; }
1881 { savetoken(yytext
); yylval
.i
=2; return LEFT_OR_RIGHT
; }
1885 { savetoken(yytext
); yylval
.i
=3; return CENTER
; }
1889 { savetoken(yytext
); yylval
.i
=4; return LEFT_OR_RIGHT
; }
1893 { savetoken(yytext
); yylval
.i
=5; return LEFT_OR_RIGHT
; }
1897 { savetoken(yytext
); yylval
.i
=1; return TOP_OR_BOT
; }
1901 { savetoken(yytext
); yylval
.i
=5; return TOP_OR_BOT
; }
1905 { savetoken(yytext
); yylval
.i
=1; return LIGHT_STATE
; }
1909 { savetoken(yytext
); yylval
.i
=0; return LIGHT_STATE
; }
1913 { savetoken(yytext
); yylval
.i
=1; return FILLING
; }
1917 { savetoken(yytext
); yylval
.i
=0; return FILLING
; }
1921 { savetoken(yytext
); yylval
.i
=0; return IRREGULAR
; }
1925 { savetoken(yytext
); yylval
.i
=1; return IRREGULAR
; }
1929 { savetoken(yytext
); yylval
.i
=1; return JOINED
; }
1933 { savetoken(yytext
); yylval
.i
=0; return JOINED
; }
1937 { savetoken(yytext
); yylval
.i
=1; return LIMITED
; }
1941 { savetoken(yytext
); yylval
.i
=0; return LIMITED
; }
1945 { savetoken(yytext
); yylval
.i
= AM_NONE
; return ALIGNMENT
; }
1949 { savetoken(yytext
); yylval
.i
= AM_LAWFUL
; return ALIGNMENT
; }
1953 { savetoken(yytext
); yylval
.i
= AM_NEUTRAL
; return ALIGNMENT
; }
1957 { savetoken(yytext
); yylval
.i
= AM_CHAOTIC
; return ALIGNMENT
; }
1961 { savetoken(yytext
); yylval
.i
= AM_SPLEV_CO
; return ALIGNMENT
; }
1965 { savetoken(yytext
); yylval
.i
= AM_SPLEV_NONCO
; return ALIGNMENT
; }
1969 { savetoken(yytext
); yylval
.i
=1; return MON_ATTITUDE
; }
1973 { savetoken(yytext
); yylval
.i
=0; return MON_ATTITUDE
; }
1977 { savetoken(yytext
); yylval
.i
=1; return MON_ALERTNESS
; }
1981 { savetoken(yytext
); yylval
.i
=0; return MON_ALERTNESS
; }
1985 { savetoken(yytext
); yylval
.i
= M_AP_FURNITURE
; return MON_APPEARANCE
; }
1989 { savetoken(yytext
); yylval
.i
= M_AP_MONSTER
; return MON_APPEARANCE
; }
1993 { savetoken(yytext
); yylval
.i
= M_AP_OBJECT
; return MON_APPEARANCE
; }
1997 { savetoken(yytext
); yylval
.i
=2; return ALTAR_TYPE
; }
2001 { savetoken(yytext
); yylval
.i
=1; return ALTAR_TYPE
; }
2005 { savetoken(yytext
); yylval
.i
=0; return ALTAR_TYPE
; }
2009 { savetoken(yytext
); yylval
.i
=1; return UP_OR_DOWN
; }
2013 { savetoken(yytext
); yylval
.i
=0; return UP_OR_DOWN
; }
2017 { savetoken(yytext
); yylval
.i
=0; return BOOLEAN
; }
2021 { savetoken(yytext
); yylval
.i
=1; return BOOLEAN
; }
2025 { savetoken(yytext
); yylval
.i
=DUST
; return ENGRAVING_TYPE
; }
2029 { savetoken(yytext
); yylval
.i
=ENGRAVE
; return ENGRAVING_TYPE
; }
2033 { savetoken(yytext
); yylval
.i
=BURN
; return ENGRAVING_TYPE
; }
2037 { savetoken(yytext
); yylval
.i
=MARK
; return ENGRAVING_TYPE
; }
2041 { savetoken(yytext
); yylval
.i
=ENGR_BLOOD
; return ENGRAVING_TYPE
; }
2045 { savetoken(yytext
); yylval
.i
=1; return CURSE_TYPE
; }
2049 { savetoken(yytext
); yylval
.i
=2; return CURSE_TYPE
; }
2053 { savetoken(yytext
); yylval
.i
=3; return CURSE_TYPE
; }
2057 { savetoken(yytext
); yylval
.i
=NOTELEPORT
; return FLAG_TYPE
; }
2061 { savetoken(yytext
); yylval
.i
=HARDFLOOR
; return FLAG_TYPE
; }
2065 { savetoken(yytext
); yylval
.i
=NOMMAP
; return FLAG_TYPE
; }
2069 { savetoken(yytext
); yylval
.i
=ARBOREAL
; return FLAG_TYPE
; } /* KMH */
2073 { savetoken(yytext
); yylval
.i
=SHORTSIGHTED
; return FLAG_TYPE
; }
2077 { savetoken(yytext
); yylval
.i
=MAZELEVEL
; return FLAG_TYPE
; }
2081 { savetoken(yytext
); yylval
.i
=PREMAPPED
; return FLAG_TYPE
; }
2085 { savetoken(yytext
); yylval
.i
=SHROUD
; return FLAG_TYPE
; }
2089 { savetoken(yytext
); yylval
.i
=GRAVEYARD
; return FLAG_TYPE
; }
2093 { savetoken(yytext
); yylval
.i
=ICEDPOOLS
; return FLAG_TYPE
; }
2097 { savetoken(yytext
); yylval
.i
=SOLIDIFY
; return FLAG_TYPE
; }
2101 { savetoken(yytext
); yylval
.i
=CORRMAZE
; return FLAG_TYPE
; }
2105 { savetoken(yytext
); yylval
.i
=CHECK_INACCESSIBLES
; return FLAG_TYPE
; }
2109 { char *p
= index(yytext
, 'd');
2113 yylval
.dice
.num
= atoi(yytext
);
2114 yylval
.dice
.die
= atoi(p
);
2116 yylval
.dice
.num
= yylval
.dice
.die
= 1;
2123 { savetoken(yytext
); yylval
.i
= atoi(yytext
+ 1);
2124 if (yylval
.i
< 0 || yylval
.i
> 100)
2125 lc_error("Unexpected percentile '%li%%'", yylval
.i
);
2130 { savetoken(yytext
); yylval
.i
=atoi(yytext
); return MINUS_INTEGER
; }
2134 { savetoken(yytext
); yylval
.i
=atoi(yytext
); return PLUS_INTEGER
; }
2138 { savetoken(yytext
); yylval
.i
= atoi(yytext
);
2139 if (yylval
.i
< 0 || yylval
.i
> 100)
2140 lc_error("Unexpected percentile '%li%%'", yylval
.i
);
2145 { savetoken(yytext
); yylval
.i
=atoi(yytext
); return INTEGER
; }
2148 /* rule 185 can match eol */
2150 { savetoken(yytext
);
2151 yytext
[yyleng
- 1] = '\0'; /* discard the trailing \" */
2152 yylval
.map
= dupstr(yytext
+ 1); /* skip the first \" */
2157 { savetoken(yytext
); return handle_varstring_check(); }
2161 { savetoken(yytext
); yylval
.i
= SPO_JE
; return COMPARE_TYPE
; }
2165 { savetoken(yytext
); yylval
.i
= SPO_JNE
; return COMPARE_TYPE
; }
2169 { savetoken(yytext
); yylval
.i
= SPO_JNE
; return COMPARE_TYPE
; }
2173 { savetoken(yytext
); yylval
.i
= SPO_JLE
; return COMPARE_TYPE
; }
2177 { savetoken(yytext
); yylval
.i
= SPO_JGE
; return COMPARE_TYPE
; }
2181 { savetoken(yytext
); yylval
.i
= SPO_JL
; return COMPARE_TYPE
; }
2185 { savetoken(yytext
); yylval
.i
= SPO_JG
; return COMPARE_TYPE
; }
2188 /* rule 194 can match eol */
2194 { advancepos(yytext
); }
2198 { savetoken(yytext
); yylval
.i
= yytext
[2]; return CHAR
; }
2202 { savetoken(yytext
); yylval
.i
= yytext
[1]; return CHAR
; }
2206 ST_RET(UNKNOWN_TYPE
);
2210 { savetoken(yytext
); return yytext
[0]; }
2216 case YY_STATE_EOF(INITIAL
):
2217 case YY_STATE_EOF(MAPC
):
2220 case YY_END_OF_BUFFER
:
2222 /* Amount of text matched not including the EOB char. */
2223 int yy_amount_of_matched_text
= (int) (yy_cp
- (yytext_ptr
)) - 1;
2225 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2226 *yy_cp
= (yy_hold_char
);
2227 YY_RESTORE_YY_MORE_OFFSET
2229 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_NEW
)
2231 /* We're scanning a new file or input source. It's
2232 * possible that this happened because the user
2233 * just pointed yyin at a new source and called
2234 * yylex(). If so, then we have to assure
2235 * consistency between YY_CURRENT_BUFFER and our
2236 * globals. Here is the right place to do so, because
2237 * this is the first action (other than possibly a
2238 * back-up) that will match for the new input source.
2240 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
2241 YY_CURRENT_BUFFER_LVALUE
->yy_input_file
= yyin
;
2242 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
= YY_BUFFER_NORMAL
;
2245 /* Note that here we test for yy_c_buf_p "<=" to the position
2246 * of the first EOB in the buffer, since yy_c_buf_p will
2247 * already have been incremented past the NUL character
2248 * (since all states make transitions on EOB to the
2249 * end-of-buffer state). Contrast this with the test
2252 if ( (yy_c_buf_p
) <= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
2253 { /* This was really a NUL. */
2254 yy_state_type yy_next_state
;
2256 (yy_c_buf_p
) = (yytext_ptr
) + yy_amount_of_matched_text
;
2258 yy_current_state
= yy_get_previous_state( );
2260 /* Okay, we're now positioned to make the NUL
2261 * transition. We couldn't have
2262 * yy_get_previous_state() go ahead and do it
2263 * for us because it doesn't know how to deal
2264 * with the possibility of jamming (and we don't
2265 * want to build jamming into it because then it
2266 * will run more slowly).
2269 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
2271 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
2273 if ( yy_next_state
)
2275 /* Consume the NUL. */
2276 yy_cp
= ++(yy_c_buf_p
);
2277 yy_current_state
= yy_next_state
;
2283 yy_cp
= (yy_c_buf_p
);
2284 goto yy_find_action
;
2288 else switch ( yy_get_next_buffer( ) )
2290 case EOB_ACT_END_OF_FILE
:
2292 (yy_did_buffer_switch_on_eof
) = 0;
2296 /* Note: because we've taken care in
2297 * yy_get_next_buffer() to have set up
2298 * yytext, we can now set up
2299 * yy_c_buf_p so that if some total
2300 * hoser (like flex itself) wants to
2301 * call the scanner after we return the
2302 * YY_NULL, it'll still work - another
2303 * YY_NULL will get returned.
2305 (yy_c_buf_p
) = (yytext_ptr
) + YY_MORE_ADJ
;
2307 yy_act
= YY_STATE_EOF(YY_START
);
2313 if ( ! (yy_did_buffer_switch_on_eof
) )
2319 case EOB_ACT_CONTINUE_SCAN
:
2321 (yytext_ptr
) + yy_amount_of_matched_text
;
2323 yy_current_state
= yy_get_previous_state( );
2325 yy_cp
= (yy_c_buf_p
);
2326 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
2329 case EOB_ACT_LAST_MATCH
:
2331 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)];
2333 yy_current_state
= yy_get_previous_state( );
2335 yy_cp
= (yy_c_buf_p
);
2336 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
2337 goto yy_find_action
;
2344 "fatal flex scanner internal error--no action found" );
2345 } /* end of action switch */
2346 } /* end of scanning one token */
2347 } /* end of user's declarations */
2348 } /* end of yylex */
2350 /* yy_get_next_buffer - try to read in a new buffer
2352 * Returns a code representing an action:
2353 * EOB_ACT_LAST_MATCH -
2354 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2355 * EOB_ACT_END_OF_FILE - end of file
2357 static int yy_get_next_buffer ()
2359 char *dest
= YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
;
2360 char *source
= (yytext_ptr
);
2361 yy_size_t number_to_move
, i
;
2364 if ((yy_c_buf_p
) > &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1])
2365 YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed");
2367 if (YY_CURRENT_BUFFER_LVALUE
->yy_fill_buffer
== 0) {
2368 /* Don't try to fill the buffer, so this is an EOF. */
2369 if ( (yy_c_buf_p
) - (yytext_ptr
) - YY_MORE_ADJ
== 1 ) {
2370 /* We matched a single character, the EOB, so
2371 * treat this as a final EOF.
2373 return EOB_ACT_END_OF_FILE
;
2375 /* We matched some text prior to the EOB, first
2378 return EOB_ACT_LAST_MATCH
;
2382 /* Try to read more data. */
2384 /* First move last chars to start of buffer. */
2385 number_to_move
= (yy_size_t
) ((yy_c_buf_p
) - (yytext_ptr
)) - 1;
2387 for (i
= 0; i
< number_to_move
; ++i
)
2388 *(dest
++) = *(source
++);
2390 if (YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
) {
2391 /* don't do the read, it's not guaranteed to return an EOF,
2394 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
) = 0;
2396 yy_size_t num_to_read
;
2397 /* just a shorter name for the current buffer */
2398 YY_BUFFER_STATE b
= YY_CURRENT_BUFFER_LVALUE
;
2400 /* [pr] This could probably be (b->yy_buf_size < number_to_move)
2401 * since the allocated size is actually b->yy_buf_size + 2.
2402 * The old code calculated num_to_read above (with same formula
2403 * as is used below), then used (num_to_read <= 0) here, which
2404 * got broken when num_to_read was changed to an unsigned type. */
2405 while (b
->yy_buf_size
<= number_to_move
+ 1) {
2406 /* Not enough room in the buffer - grow it. */
2408 int yy_c_buf_p_offset
= (int) ((yy_c_buf_p
) - b
->yy_ch_buf
);
2410 if ( b
->yy_is_our_buffer
) {
2411 b
->yy_buf_size
+= b
->yy_buf_size
/ 4;
2412 b
->yy_ch_buf
= (char *)
2413 /* Include room in for 2 EOB chars. */
2414 yyrealloc((void *) b
->yy_ch_buf
,b
->yy_buf_size
+ 2 );
2416 /* Can't grow it, we don't own it. */
2420 YY_FATAL_ERROR("fatal error - scanner input buffer overflow");
2422 (yy_c_buf_p
) = &b
->yy_ch_buf
[yy_c_buf_p_offset
];
2426 num_to_read
= b
->yy_buf_size
- number_to_move
- 1;
2427 if ( num_to_read
> YY_READ_BUF_SIZE
)
2428 num_to_read
= YY_READ_BUF_SIZE
;
2430 /* Read in more data. */
2431 YY_INPUT((&YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
]),
2432 (yy_n_chars
), num_to_read
);
2433 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2436 if ((yy_n_chars
) == 0) {
2437 if (number_to_move
== YY_MORE_ADJ
) {
2438 ret_val
= EOB_ACT_END_OF_FILE
;
2441 ret_val
= EOB_ACT_LAST_MATCH
;
2442 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
= YY_BUFFER_EOF_PENDING
;
2445 ret_val
= EOB_ACT_CONTINUE_SCAN
;
2447 if ((yy_size_t
) ((yy_n_chars
) + number_to_move
)
2448 > YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
) {
2449 /* Extend the array by 50%, plus the number we really need. */
2450 yy_size_t new_size
= (yy_n_chars
) + number_to_move
+ ((yy_n_chars
) >> 1);
2451 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
= (char *)
2452 yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
,new_size
);
2453 if (! YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
2454 YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()");
2457 (yy_n_chars
) += number_to_move
;
2458 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] = YY_END_OF_BUFFER_CHAR
;
2459 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] = YY_END_OF_BUFFER_CHAR
;
2461 (yytext_ptr
) = &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[0];
2466 /* yy_get_previous_state - get the state just before EOB char was reached */
2468 static yy_state_type
yy_get_previous_state ()
2470 yy_state_type yy_current_state
;
2473 yy_current_state
= (yy_start
);
2474 yy_current_state
+= YY_AT_BOL();
2476 for (yy_cp
= (yytext_ptr
) + YY_MORE_ADJ
; yy_cp
< (yy_c_buf_p
); ++yy_cp
) {
2478 YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
2479 if ( yy_accept
[yy_current_state
] )
2481 (yy_last_accepting_state
) = yy_current_state
;
2482 (yy_last_accepting_cpos
) = yy_cp
;
2484 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
2486 yy_current_state
= (int) yy_def
[yy_current_state
];
2487 if ( yy_current_state
>= 1057 )
2488 yy_c
= yy_meta
[(unsigned int) yy_c
];
2490 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2493 return yy_current_state
;
2496 /* yy_try_NUL_trans - try to make a transition on the NUL character
2499 * next_state = yy_try_NUL_trans( current_state );
2502 static yy_state_type
yy_try_NUL_trans (yy_current_state
)
2503 yy_state_type yy_current_state
;
2506 char *yy_cp
= (yy_c_buf_p
);
2509 if ( yy_accept
[yy_current_state
] )
2511 (yy_last_accepting_state
) = yy_current_state
;
2512 (yy_last_accepting_cpos
) = yy_cp
;
2514 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
2516 yy_current_state
= (int) yy_def
[yy_current_state
];
2517 if ( yy_current_state
>= 1057 )
2518 yy_c
= yy_meta
[(unsigned int) yy_c
];
2520 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
2521 yy_is_jam
= (yy_current_state
== 1056);
2523 return yy_is_jam
? 0 : yy_current_state
;
2528 static void yyunput (c
,yy_bp
)
2534 yy_cp
= (yy_c_buf_p
);
2536 /* undo effects of setting up yytext */
2537 *yy_cp
= (yy_hold_char
);
2539 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
2540 { /* need to shift things up to make room */
2541 /* +2 for EOB chars. */
2542 yy_size_t number_to_move
= (yy_n_chars
) + 2;
2543 char *dest
= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[
2544 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
+ 2];
2546 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
];
2548 while ( source
> YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
2549 *--dest
= *--source
;
2551 yy_cp
+= (int) (dest
- source
);
2552 yy_bp
+= (int) (dest
- source
);
2553 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
=
2554 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
;
2556 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
2557 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2560 *--yy_cp
= (char) c
;
2562 (yytext_ptr
) = yy_bp
;
2563 (yy_hold_char
) = *yy_cp
;
2564 (yy_c_buf_p
) = yy_cp
;
2574 *(yy_c_buf_p
) = (yy_hold_char
);
2576 if ( *(yy_c_buf_p
) == YY_END_OF_BUFFER_CHAR
)
2578 /* yy_c_buf_p now points to the character we want to return.
2579 * If this occurs *before* the EOB characters, then it's a
2580 * valid NUL; if not, then we've hit the end of the buffer.
2582 if ( (yy_c_buf_p
) < &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
2583 /* This was really a NUL. */
2584 *(yy_c_buf_p
) = '\0';
2587 { /* need more input */
2588 yy_size_t offset
= (yy_c_buf_p
) - (yytext_ptr
);
2591 switch ( yy_get_next_buffer( ) )
2593 case EOB_ACT_LAST_MATCH
:
2594 /* This happens because yy_g_n_b()
2595 * sees that we've accumulated a
2596 * token and flags that we need to
2597 * try matching the token before
2598 * proceeding. But for input(),
2599 * there's no matching to consider.
2600 * So convert the EOB_ACT_LAST_MATCH
2601 * to EOB_ACT_END_OF_FILE.
2604 /* Reset buffer status. */
2609 case EOB_ACT_END_OF_FILE
:
2614 if ( ! (yy_did_buffer_switch_on_eof
) )
2619 case EOB_ACT_CONTINUE_SCAN
:
2620 (yy_c_buf_p
) = (yytext_ptr
) + offset
;
2626 c
= *(uchar
*) (yy_c_buf_p
); /* cast for 8-bit char's */
2627 *(yy_c_buf_p
) = '\0'; /* preserve yytext */
2628 (yy_hold_char
) = *++(yy_c_buf_p
);
2630 YY_CURRENT_BUFFER_LVALUE
->yy_at_bol
= (c
== '\n');
2634 #endif /* ifndef YY_NO_INPUT */
2636 /** Immediately switch to a different input stream.
2637 * @param input_file A readable stream.
2639 * @note This function does not reset the start condition to @c INITIAL .
2642 void yyrestart (input_file
)
2646 if ( ! YY_CURRENT_BUFFER
){
2647 yyensure_buffer_stack ();
2648 YY_CURRENT_BUFFER_LVALUE
=
2649 yy_create_buffer(yyin
,YY_BUF_SIZE
);
2652 yy_init_buffer(YY_CURRENT_BUFFER
,input_file
);
2653 yy_load_buffer_state( );
2656 /** Switch to a different input buffer.
2657 * @param new_buffer The new input buffer.
2660 void yy_switch_to_buffer (new_buffer
)
2661 YY_BUFFER_STATE new_buffer
;
2664 /* TODO. We should be able to replace this entire function body
2666 * yypop_buffer_state();
2667 * yypush_buffer_state(new_buffer);
2669 yyensure_buffer_stack ();
2670 if ( YY_CURRENT_BUFFER
== new_buffer
)
2673 if ( YY_CURRENT_BUFFER
)
2675 /* Flush out information for old buffer. */
2676 *(yy_c_buf_p
) = (yy_hold_char
);
2677 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
2678 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2681 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
2682 yy_load_buffer_state( );
2684 /* We don't actually know whether we did this switch during
2685 * EOF (yywrap()) processing, but the only time this flag
2686 * is looked at is after yywrap() is called, so it's safe
2687 * to go ahead and always set it.
2689 (yy_did_buffer_switch_on_eof
) = 1;
2692 static void yy_load_buffer_state ()
2694 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
2695 (yytext_ptr
) = (yy_c_buf_p
) = YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
;
2696 yyin
= YY_CURRENT_BUFFER_LVALUE
->yy_input_file
;
2697 (yy_hold_char
) = *(yy_c_buf_p
);
2700 /** Allocate and initialize an input buffer state.
2701 * @param file A readable stream.
2702 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2704 * @return the allocated buffer state.
2706 YY_BUFFER_STATE
yy_create_buffer (file
,size
)
2712 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) );
2714 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2718 b
->yy_buf_size
= (yy_size_t
)size
;
2720 /* yy_ch_buf has to be 2 characters longer than the size given because
2721 * we need to put in 2 end-of-buffer characters.
2723 b
->yy_ch_buf
= (char *) yyalloc(b
->yy_buf_size
+ 2 );
2724 if ( ! b
->yy_ch_buf
)
2725 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2727 b
->yy_is_our_buffer
= 1;
2729 yy_init_buffer(b
,file
);
2734 /** Destroy the buffer.
2735 * @param b a buffer created with yy_create_buffer()
2738 void yy_delete_buffer (b
)
2745 if ( b
== YY_CURRENT_BUFFER
) /* Not sure if we should pop here. */
2746 YY_CURRENT_BUFFER_LVALUE
= (YY_BUFFER_STATE
) 0;
2748 if ( b
->yy_is_our_buffer
)
2749 yyfree((void *) b
->yy_ch_buf
);
2751 yyfree((void *) b
);
2754 /* Initializes or reinitializes a buffer.
2755 * This function is sometimes called more than once on the same buffer,
2756 * such as during a yyrestart() or at EOF.
2758 static void yy_init_buffer (b
,file
)
2764 yy_flush_buffer(b
);
2766 b
->yy_input_file
= file
;
2767 b
->yy_fill_buffer
= 1;
2769 /* If b is the current buffer, then yy_init_buffer was _probably_
2770 * called from yyrestart() or through yy_get_next_buffer.
2771 * In that case, we don't want to reset the lineno or column.
2773 if (b
!= YY_CURRENT_BUFFER
){
2774 b
->yy_bs_lineno
= 1;
2775 b
->yy_bs_column
= 0;
2778 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
2783 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2784 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2787 void yy_flush_buffer (b
)
2795 /* We always need two end-of-buffer characters. The first causes
2796 * a transition to the end-of-buffer state. The second causes
2797 * a jam in that state.
2799 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
2800 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
2802 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
2805 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2807 if ( b
== YY_CURRENT_BUFFER
)
2808 yy_load_buffer_state( );
2811 /** Pushes the new state onto the stack. The new state becomes
2812 * the current state. This function will allocate the stack
2814 * @param new_buffer The new state.
2817 void yypush_buffer_state (new_buffer
)
2818 YY_BUFFER_STATE new_buffer
;
2820 if (new_buffer
== NULL
)
2823 yyensure_buffer_stack();
2825 /* This block is copied from yy_switch_to_buffer. */
2826 if ( YY_CURRENT_BUFFER
)
2828 /* Flush out information for old buffer. */
2829 *(yy_c_buf_p
) = (yy_hold_char
);
2830 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
2831 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
2834 /* Only push if top exists. Otherwise, replace top. */
2835 if (YY_CURRENT_BUFFER
)
2836 (yy_buffer_stack_top
)++;
2837 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
2839 /* copied from yy_switch_to_buffer. */
2840 yy_load_buffer_state( );
2841 (yy_did_buffer_switch_on_eof
) = 1;
2844 /** Removes and deletes the top of the stack, if present.
2845 * The next element becomes the new top.
2848 void yypop_buffer_state ()
2850 if (!YY_CURRENT_BUFFER
)
2853 yy_delete_buffer(YY_CURRENT_BUFFER
);
2854 YY_CURRENT_BUFFER_LVALUE
= NULL
;
2855 if ((yy_buffer_stack_top
) > 0)
2856 --(yy_buffer_stack_top
);
2858 if (YY_CURRENT_BUFFER
) {
2859 yy_load_buffer_state( );
2860 (yy_did_buffer_switch_on_eof
) = 1;
2864 /* Allocates the stack if it does not exist.
2865 * Guarantees space for at least one push.
2867 static void yyensure_buffer_stack ()
2869 yy_size_t num_to_alloc
;
2871 if (!(yy_buffer_stack
)) {
2872 /* First allocation is just for 2 elements, since we don't know if this
2873 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2874 * immediate realloc on the next call.
2876 #if 1 /* [PR] avoid C++-style comment; older C compilers choke on it */
2877 num_to_alloc
= 2; /* also changed to match the comment... */
2879 num_to_alloc
= 1; // After all that talk, this was set to 1 anyways...
2881 (yy_buffer_stack
) = (struct yy_buffer_state
**)
2882 yyalloc(num_to_alloc
* sizeof(struct yy_buffer_state
*) );
2883 if (!(yy_buffer_stack
))
2884 YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()");
2886 (void) memset((yy_buffer_stack
), 0,
2887 num_to_alloc
* sizeof(struct yy_buffer_state
*));
2889 (yy_buffer_stack_max
) = num_to_alloc
;
2890 (yy_buffer_stack_top
) = 0;
2894 if ((yy_buffer_stack_top
) >= ((yy_buffer_stack_max
)) - 1) {
2895 /* Increase the buffer to prepare for a possible push. */
2896 yy_size_t grow_size
= 8 /* arbitrary grow size */;
2898 num_to_alloc
= (yy_buffer_stack_max
) + grow_size
;
2899 (yy_buffer_stack
) = (struct yy_buffer_state
**)
2900 yyrealloc((yy_buffer_stack
),num_to_alloc
* sizeof(struct yy_buffer_state
*) );
2901 if (!(yy_buffer_stack
))
2902 YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()");
2904 /* zero only the new slots.*/
2905 (void) memset((yy_buffer_stack
) + (yy_buffer_stack_max
), 0,
2906 grow_size
* sizeof(struct yy_buffer_state
*));
2907 (yy_buffer_stack_max
) = num_to_alloc
;
2911 /** Setup the input buffer state to scan directly from a user-specified
2913 * @param base the character buffer
2914 * @param size the size in bytes of the character buffer
2916 * @return the newly allocated buffer state object.
2918 YY_BUFFER_STATE
yy_scan_buffer (base
,size
)
2925 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
2926 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
2927 /* They forgot to leave room for the EOB's. */
2930 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) );
2932 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2934 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
2935 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
2936 b
->yy_is_our_buffer
= 0;
2937 b
->yy_input_file
= 0;
2938 b
->yy_n_chars
= b
->yy_buf_size
;
2939 b
->yy_is_interactive
= 0;
2941 b
->yy_fill_buffer
= 0;
2942 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2944 yy_switch_to_buffer(b
);
2949 /** Setup the input buffer state to scan a string. The next call to yylex()
2950 * will scan from a @e copy of @a str.
2951 * @param yystr a NUL-terminated string to scan
2953 * @return the newly allocated buffer state object.
2954 * @note If you want to scan bytes that may contain NUL values, then use
2955 * yy_scan_bytes() instead.
2957 YY_BUFFER_STATE
yy_scan_string (yystr
)
2958 yyconst
char * yystr
;
2961 return yy_scan_bytes(yystr
,strlen(yystr
) );
2964 /** Setup the input buffer state to scan the given bytes. The next call to
2965 * yylex() will scan from a @e copy of @a bytes.
2966 * @param yybytes the byte buffer to scan
2967 * @param _yybytes_len the number of bytes in the buffer pointed to by @a
2970 * @return the newly allocated buffer state object.
2972 YY_BUFFER_STATE
yy_scan_bytes (yybytes
,_yybytes_len
)
2973 yyconst
char * yybytes
;
2974 yy_size_t _yybytes_len
;
2981 /* Get memory for full buffer, including space for trailing EOB's. */
2982 n
= _yybytes_len
+ 2;
2983 buf
= (char *) yyalloc(n
);
2985 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2987 for ( i
= 0; i
< _yybytes_len
; ++i
)
2988 buf
[i
] = yybytes
[i
];
2990 buf
[_yybytes_len
] = buf
[_yybytes_len
+1] = YY_END_OF_BUFFER_CHAR
;
2992 b
= yy_scan_buffer(buf
,n
);
2994 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2996 /* It's okay to grow etc. this buffer, and we should throw it
2997 * away when we're done.
2999 b
->yy_is_our_buffer
= 1;
3004 #ifndef YY_EXIT_FAILURE
3005 #define YY_EXIT_FAILURE 2
3008 static void yy_fatal_error (msg
)
3011 (void) fprintf( stderr
, "%s\n", msg
);
3012 exit( YY_EXIT_FAILURE
);
3015 /* Redefine yyless() so it works in section 3 code. */
3020 /* Undo effects of setting up yytext. */ \
3021 int yyless_macro_arg = (n); \
3022 YY_LESS_LINENO(yyless_macro_arg); \
3023 yytext[yyleng] = (yy_hold_char); \
3024 (yy_c_buf_p) = yytext + yyless_macro_arg; \
3025 (yy_hold_char) = *(yy_c_buf_p); \
3026 *(yy_c_buf_p) = '\0'; \
3027 yyleng = yyless_macro_arg; \
3030 /* Accessor methods (get/set functions) to struct members. */
3032 /** Get the current line number.
3041 /** Get the input stream.
3049 /** Get the output stream.
3057 /** Get the length of the current token.
3060 yy_size_t
yyget_leng ()
3065 /** Get the current token.
3074 /** Set the current line number.
3075 * @param _line_number line number
3078 void yyset_lineno (_line_number
)
3082 yylineno
= _line_number
;
3085 /** Set the input stream. This does not discard the current
3087 * @param _in_str A readable stream.
3089 * @see yy_switch_to_buffer
3091 void yyset_in (_in_str
)
3097 void yyset_out (_out_str
)
3105 return yy_flex_debug
;
3108 void yyset_debug (_bdebug
)
3111 yy_flex_debug
= _bdebug
;
3114 static int yy_init_globals ()
3116 /* Initialization is the same as for the non-reentrant scanner.
3117 * This function is called from yylex_destroy(), so don't allocate here.
3120 (yy_buffer_stack
) = 0;
3121 (yy_buffer_stack_top
) = 0;
3122 (yy_buffer_stack_max
) = 0;
3123 (yy_c_buf_p
) = (char *) 0;
3127 /* Defined in main.c */
3136 /* For future reference: Set errno on error, since we are called by
3142 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3143 int yylex_destroy ()
3146 /* Pop the buffer stack, destroying each element. */
3147 while (YY_CURRENT_BUFFER
) {
3148 yy_delete_buffer(YY_CURRENT_BUFFER
);
3149 YY_CURRENT_BUFFER_LVALUE
= NULL
;
3150 yypop_buffer_state();
3152 /* Destroy the stack itself. */
3153 yyfree((yy_buffer_stack
) );
3154 (yy_buffer_stack
) = NULL
;
3156 /* Reset the globals. This is important in a non-reentrant scanner
3157 * so the next time yylex() is called, initialization will occur. */
3164 * Internal utility routines.
3168 static void yy_flex_strncpy (s1
,s2
,n
)
3175 for ( i
= 0; i
< n
; ++i
)
3180 #ifdef YY_NEED_STRLEN
3181 static int yy_flex_strlen (s
)
3185 for ( n
= 0; s
[n
]; ++n
)
3192 void *yyalloc (size
)
3196 return (void *) malloc( size
);
3199 void *yyrealloc (ptr
,size
)
3204 /* The cast to (char *) in the following accommodates both
3205 * implementations that use char* generic pointers, and those
3206 * that use void* generic pointers. It works with the latter
3207 * because both ANSI C and C++ allow castless assignment from
3208 * any pointer type to void*, and deal with argument conversions
3209 * as though doing an assignment.
3211 return (void *) realloc( (char *) ptr
, size
);
3218 free( (char *) ptr
); /* see yyrealloc() for (char *) cast */
3226 return (long *) malloc(n
);
3230 /* routine to switch to another input file; needed for flex */
3232 init_yyin( input_f
)
3235 #if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER)
3245 /* analogous routine (for completeness) */
3247 init_yyout( output_f
)
3254 handle_varstring_check()
3256 struct lc_vardefs
*vd
;
3258 yylval
.map
= dupstr(yytext
);
3259 if ((vd
= vardef_defined(variable_definitions
, yytext
, 1)) != 0) {
3260 long l
= vd
->var_type
;
3261 int a
= ((l
& SPOVAR_ARRAY
) == SPOVAR_ARRAY
);
3264 if (l
== SPOVAR_INT
)
3265 return (a
? VARSTRING_INT_ARRAY
: VARSTRING_INT
);
3266 if (l
== SPOVAR_STRING
)
3267 return (a
? VARSTRING_STRING_ARRAY
: VARSTRING_STRING
);
3268 if (l
== SPOVAR_VARIABLE
)
3269 return (a
? VARSTRING_VAR_ARRAY
: VARSTRING_VAR
);
3270 if (l
== SPOVAR_COORD
)
3271 return (a
? VARSTRING_COORD_ARRAY
: VARSTRING_COORD
);
3272 if (l
== SPOVAR_REGION
)
3273 return (a
? VARSTRING_REGION_ARRAY
: VARSTRING_REGION
);
3274 if (l
== SPOVAR_MAPCHAR
)
3275 return (a
? VARSTRING_MAPCHAR_ARRAY
: VARSTRING_MAPCHAR
);
3276 if (l
== SPOVAR_MONST
)
3277 return (a
? VARSTRING_MONST_ARRAY
: VARSTRING_MONST
);
3278 if (l
== SPOVAR_OBJ
)
3279 return (a
? VARSTRING_OBJ_ARRAY
: VARSTRING_OBJ
);
3280 if (l
== SPOVAR_SEL
)
3281 return (a
? VARSTRING_SEL_ARRAY
: VARSTRING_SEL
);
3290 token_start_pos
= 0;
3291 (void) memset((genericptr_t
) curr_token
, 0, 512);
3298 Sprintf(curr_token
, "%s", s
);
3306 token_start_pos
+= strlen(s
);