NHDT->ANH, nethack->anethack, nhdat->anhdat
[aNetHack.git] / sys / share / lev_lex.c
blob8d25bd0ceb8deb2661346d09b919183f71e2f677
2 #line 3 "lev_lex.c"
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
19 #include "config.h"
21 #include <errno.h>
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 */
26 #ifndef FLEX_INT32_T
27 typedef int flex_int32_t;
28 #endif
29 #ifndef FLEX_INT16_T
30 typedef short int flex_int16_t;
31 #endif
32 #ifndef FLEX_UINT16_T
33 typedef unsigned short int flex_uint16_t;
34 #endif
36 #define yyconst const
38 #define FDECL_dummy /*empty*/
40 /* Returned upon end-of-file. */
41 #define YY_NULL 0
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
46 * double cast.
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
58 * compatibility.
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. */
72 #ifndef YY_BUF_SIZE
73 #ifdef __ia64__
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
79 #else
80 #define YY_BUF_SIZE 16384
81 #endif /* __ia64__ */
82 #endif
84 /* The state buf must be large enough to hold one state per character
85 * in the main buffer.
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;
92 #endif
94 #ifndef YY_TYPEDEF_YY_SIZE_T
95 #define YY_TYPEDEF_YY_SIZE_T
96 typedef size_t yy_size_t;
97 #endif
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. */
110 #define yyless(n) \
111 do { \
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 */ \
119 } while ( 0 )
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 {
126 FILE *yy_input_file;
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
132 * characters.
134 yy_size_t yy_buf_size;
136 /* Number of characters read into yy_ch_buf, not including EOB
137 * characters.
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
143 * delete it.
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
150 * each newline.
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
156 * not.
158 int yy_at_bol;
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
164 * end of it.
166 int yy_fill_buffer;
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
194 * "scanner state".
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)] \
200 : NULL)
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 */
210 yy_size_t yyleng;
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;
273 extern int yylineno;
275 int yylineno = 1;
277 extern char *yytext;
278 #ifdef yytext_ptr
279 #undef yytext_ptr
280 #endif
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; \
295 *yy_cp = '\0'; \
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. */
302 struct yy_trans_info
304 flex_int32_t yy_verify;
305 flex_int32_t yy_nxt;
307 static yyconst flex_int16_t yy_accept[1057] =
308 { 0,
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] =
428 { 0,
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,
456 1, 1, 1, 1, 1
459 static yyconst YY_CHAR yy_meta[75] =
460 { 0,
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,
468 6, 5, 6, 6
471 static yyconst flex_uint16_t yy_base[1064] =
472 { 0,
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,
589 741, 746, 751
592 static yyconst flex_int16_t yy_def[1064] =
593 { 0,
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,
710 1056, 1056, 1056
713 static yyconst flex_uint16_t yy_nxt[1330] =
714 { 0,
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] =
864 { 0,
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
1026 char *yytext;
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. */
1031 #define LEV_LEX_C
1033 #include "hack.h"
1034 #include "lev_comp.h"
1035 #include "sp_lev.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));
1042 int NDECL(yylook);
1043 int NDECL(yyinput);
1044 int NDECL(yywrap);
1045 int NDECL(yylex);
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
1056 * other signs.
1058 # if defined(NeXT) || defined(SVR4) || defined(_AIX32)
1059 # define VOIDYYPUT
1060 # endif
1061 # if !defined(VOIDYYPUT) && defined(POSIX_TYPES)
1062 # if !defined(BOS) && !defined(HISX) && !defined(_M_UNIX) && !defined(VMS)
1063 # define VOIDYYPUT
1064 # endif
1065 # endif
1066 # if !defined(VOIDYYPUT) && defined(WEIRD_LEX)
1067 # if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX > 1)
1068 # define VOIDYYPUT
1069 # endif
1070 # endif
1071 # if defined(VOIDYYPUT) && defined(__osf__)
1072 # undef VOIDYYPUT
1073 # endif
1074 # ifdef VOIDYYPUT
1075 void FDECL(yyunput, (int));
1076 void FDECL(yyoutput, (int));
1077 # else
1078 int FDECL(yyunput, (int));
1079 int FDECL(yyoutput, (int));
1080 # endif
1082 #else /* !FLEX_SCANNER && !FLEXHACK_SCANNER */
1083 /* most recent flex allows suppressing yyunput() altogether when not needed */
1084 #define YY_NO_UNPUT
1085 #define YY_NO_INPUT
1086 #endif
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 */
1093 YY_MALLOC_DECL
1094 #endif
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);
1130 #define INITIAL 0
1131 #define MAPC 1
1133 #ifndef YY_EXTRA_TYPE
1134 #define YY_EXTRA_TYPE void *
1135 #endif
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
1155 * section 1.
1158 #ifndef YY_SKIP_YYWRAP
1159 extern int yywrap FDECL(FDECL_dummy, (void ));
1160 #endif
1162 #ifndef YY_NO_UNPUT
1164 static void yyunput FDECL(FDECL_dummy, (int c,char *buf_ptr ));
1165 #endif
1167 #ifndef yytext_ptr
1168 static void yy_flex_strncpy FDECL(FDECL_dummy, (char *,yyconst char *,int ));
1169 #endif
1171 #ifdef YY_NEED_STRLEN
1172 static int yy_flex_strlen FDECL(FDECL_dummy, (yyconst char * ));
1173 #endif
1175 #ifndef YY_NO_INPUT
1177 static int input FDECL(FDECL_dummy, (void ));
1179 #endif
1181 /* Amount of stuff to slurp up with each read. */
1182 #ifndef YY_READ_BUF_SIZE
1183 #ifdef __ia64__
1184 /* On IA-64, the buffer size is 16k, not 8k */
1185 #define YY_READ_BUF_SIZE 16384
1186 #else
1187 #define YY_READ_BUF_SIZE 8192
1188 #endif /* __ia64__ */
1189 #endif
1191 /* Copy whatever the last rule matched to the standard output. */
1192 #ifndef ECHO
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)
1197 #endif
1199 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1200 * is returned in "result".
1202 #ifndef YY_INPUT
1203 #define YY_INPUT(buf,result,max_size) \
1204 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1206 int c = '*'; \
1207 size_t n; \
1208 for ( n = 0; n < max_size && \
1209 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1210 buf[n] = (char) c; \
1211 if ( c == '\n' ) \
1212 buf[n++] = (char) c; \
1213 if ( c == EOF && ferror( yyin ) ) \
1214 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1215 result = n; \
1217 else \
1219 errno=0; \
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" ); \
1225 break; \
1227 errno=0; \
1228 clearerr(yyin); \
1232 #endif
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.
1238 #ifndef yyterminate
1239 #define yyterminate() return YY_NULL
1240 #endif
1242 /* Number of entries by which start-condition stack grows. */
1243 #ifndef YY_START_STACK_INCR
1244 #define YY_START_STACK_INCR 25
1245 #endif
1247 /* Report a fatal error. */
1248 #ifndef YY_FATAL_ERROR
1249 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1250 #endif
1252 /* Default declaration of generated scanner - a define so the user can
1253 * easily add parameters.
1255 #ifndef YY_DECL
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
1264 * have been set up.
1266 #ifndef YY_USER_ACTION
1267 #define YY_USER_ACTION
1268 #endif
1270 /* Code executed at the end of each rule. */
1271 #ifndef YY_BREAK
1272 #define YY_BREAK /*LINTED*/break;
1273 #endif
1275 #define YY_RULE_SETUP \
1276 if ( yyleng > 0 ) \
1277 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1278 (yytext[yyleng - 1] == '\n'); \
1279 YY_USER_ACTION
1281 /** The main scanner function which does all the work.
1283 YY_DECL
1285 yy_state_type yy_current_state;
1286 char *yy_cp, *yy_bp;
1287 int yy_act;
1289 if ( !(yy_init) )
1291 (yy_init) = 1;
1293 #ifdef YY_USER_INIT
1294 YY_USER_INIT;
1295 #endif
1297 if ( ! (yy_start) )
1298 (yy_start) = 1; /* first start state */
1300 if ( ! yyin )
1301 yyin = stdin;
1303 if ( ! yyout )
1304 yyout = stdout;
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
1325 * the current run.
1327 yy_bp = yy_cp;
1329 yy_current_state = (yy_start);
1330 yy_current_state += YY_AT_BOL();
1331 yy_match:
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];
1347 ++yy_cp;
1349 while ( yy_base[yy_current_state] != 1255 );
1351 yy_find_action:
1352 yy_act = yy_accept[yy_current_state];
1353 if ( yy_act == 0 )
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. */
1364 switch ( yy_act )
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;
1373 case 1:
1374 YY_RULE_SETUP
1376 savetoken(yytext);
1377 BEGIN(INITIAL);
1378 yylval.map = (char *) alloc(map_cnt + 1);
1379 (void) strncpy(yylval.map, map, map_cnt);
1380 yylval.map[map_cnt] = 0;
1381 map_cnt = 0;
1382 return MAP_ID;
1384 YY_BREAK
1385 case 2:
1386 /* rule 2 can match eol */
1387 YY_RULE_SETUP
1389 int len = yyleng;
1390 savetoken(yytext);
1391 /* convert \r\n to \n */
1392 if (len >= 2 && yytext[len - 2] == '\r')
1393 len -= 1;
1394 (void) strncpy(map + map_cnt, yytext, len);
1395 map_cnt += len;
1396 map[map_cnt - 1] = '\n';
1397 map[map_cnt] = '\0';
1398 newline();
1400 YY_BREAK
1401 case 3:
1402 /* rule 3 can match eol */
1403 YY_RULE_SETUP
1404 { savetoken(yytext); newline(); }
1405 YY_BREAK
1406 case 4:
1407 YY_RULE_SETUP
1408 ST_RET(MESSAGE_ID);
1409 YY_BREAK
1410 case 5:
1411 YY_RULE_SETUP
1412 ST_RET(NOMAP_ID);
1413 YY_BREAK
1414 case 6:
1415 YY_RULE_SETUP
1416 ST_RET(MAZE_ID);
1417 YY_BREAK
1418 case 7:
1419 YY_RULE_SETUP
1420 ST_RET(LEVEL_ID);
1421 YY_BREAK
1422 case 8:
1423 YY_RULE_SETUP
1424 ST_RET(LEV_INIT_ID);
1425 YY_BREAK
1426 case 9:
1427 YY_RULE_SETUP
1428 ST_RET(MAZE_GRID_ID);
1429 YY_BREAK
1430 case 10:
1431 YY_RULE_SETUP
1432 ST_RET(SOLID_FILL_ID);
1433 YY_BREAK
1434 case 11:
1435 YY_RULE_SETUP
1436 ST_RET(MINES_ID);
1437 YY_BREAK
1438 case 12:
1439 YY_RULE_SETUP
1440 ST_RET(ROGUELEV_ID);
1441 YY_BREAK
1442 case 13:
1443 YY_RULE_SETUP
1444 ST_RET(FLAGS_ID);
1445 YY_BREAK
1446 case 14:
1447 YY_RULE_SETUP
1448 ST_RET(GEOMETRY_ID);
1449 YY_BREAK
1450 case 15:
1451 /* rule 15 can match eol */
1452 YY_RULE_SETUP
1453 { savetoken(yytext); BEGIN(MAPC); newline(); }
1454 YY_BREAK
1455 case 16:
1456 YY_RULE_SETUP
1457 ST_RET(object_ID);
1458 YY_BREAK
1459 case 17:
1460 YY_RULE_SETUP
1461 ST_RET(OBJECT_ID);
1462 YY_BREAK
1463 case 18:
1464 YY_RULE_SETUP
1465 ST_RET(COBJECT_ID);
1466 YY_BREAK
1467 case 19:
1468 YY_RULE_SETUP
1469 ST_RET(MONSTER_ID);
1470 YY_BREAK
1471 case 20:
1472 YY_RULE_SETUP
1473 ST_RET(monster_ID);
1474 YY_BREAK
1475 case 21:
1476 YY_RULE_SETUP
1477 ST_RET(TRAP_ID);
1478 YY_BREAK
1479 case 22:
1480 YY_RULE_SETUP
1481 ST_RET(DOOR_ID);
1482 YY_BREAK
1483 case 23:
1484 YY_RULE_SETUP
1485 ST_RET(ROOMDOOR_ID);
1486 YY_BREAK
1487 case 24:
1488 YY_RULE_SETUP
1489 ST_RET(DRAWBRIDGE_ID);
1490 YY_BREAK
1491 case 25:
1492 YY_RULE_SETUP
1493 ST_RET(MAZEWALK_ID);
1494 YY_BREAK
1495 case 26:
1496 YY_RULE_SETUP
1497 ST_RET(WALLIFY_ID);
1498 YY_BREAK
1499 case 27:
1500 YY_RULE_SETUP
1501 ST_RET(REGION_ID);
1502 YY_BREAK
1503 case 28:
1504 YY_RULE_SETUP
1505 ST_RET(ALTAR_ID);
1506 YY_BREAK
1507 case 29:
1508 YY_RULE_SETUP
1509 ST_RET(LADDER_ID);
1510 YY_BREAK
1511 case 30:
1512 YY_RULE_SETUP
1513 ST_RET(STAIR_ID);
1514 YY_BREAK
1515 case 31:
1516 YY_RULE_SETUP
1517 ST_RET(PORTAL_ID);
1518 YY_BREAK
1519 case 32:
1520 YY_RULE_SETUP
1521 ST_RET(TELEPRT_ID);
1522 YY_BREAK
1523 case 33:
1524 YY_RULE_SETUP
1525 ST_RET(BRANCH_ID);
1526 YY_BREAK
1527 case 34:
1528 YY_RULE_SETUP
1529 ST_RET(FOUNTAIN_ID);
1530 YY_BREAK
1531 case 35:
1532 YY_RULE_SETUP
1533 ST_RET(SINK_ID);
1534 YY_BREAK
1535 case 36:
1536 YY_RULE_SETUP
1537 ST_RET(POOL_ID);
1538 YY_BREAK
1539 case 37:
1540 YY_RULE_SETUP
1541 ST_RET(NON_DIGGABLE_ID);
1542 YY_BREAK
1543 case 38:
1544 YY_RULE_SETUP
1545 ST_RET(NON_PASSWALL_ID);
1546 YY_BREAK
1547 case 39:
1548 YY_RULE_SETUP
1549 ST_RET(IF_ID);
1550 YY_BREAK
1551 case 40:
1552 YY_RULE_SETUP
1553 ST_RET(ELSE_ID);
1554 YY_BREAK
1555 case 41:
1556 YY_RULE_SETUP
1557 ST_RET(EXIT_ID);
1558 YY_BREAK
1559 case 42:
1560 YY_RULE_SETUP
1561 ST_RET(ROOM_ID);
1562 YY_BREAK
1563 case 43:
1564 YY_RULE_SETUP
1565 ST_RET(SUBROOM_ID);
1566 YY_BREAK
1567 case 44:
1568 YY_RULE_SETUP
1569 ST_RET(RAND_CORRIDOR_ID);
1570 YY_BREAK
1571 case 45:
1572 YY_RULE_SETUP
1573 ST_RET(CORRIDOR_ID);
1574 YY_BREAK
1575 case 46:
1576 YY_RULE_SETUP
1577 ST_RET(TERRAIN_ID);
1578 YY_BREAK
1579 case 47:
1580 YY_RULE_SETUP
1581 ST_RET(terrain_ID);
1582 YY_BREAK
1583 case 48:
1584 YY_RULE_SETUP
1585 ST_RET(REPLACE_TERRAIN_ID);
1586 YY_BREAK
1587 case 49:
1588 YY_RULE_SETUP
1589 ST_RET(GOLD_ID);
1590 YY_BREAK
1591 case 50:
1592 YY_RULE_SETUP
1593 ST_RET(GRAVE_ID);
1594 YY_BREAK
1595 case 51:
1596 YY_RULE_SETUP
1597 ST_RET(ENGRAVING_ID);
1598 YY_BREAK
1599 case 52:
1600 YY_RULE_SETUP
1601 ST_RET(MINERALIZE_ID);
1602 YY_BREAK
1603 case 53:
1604 YY_RULE_SETUP
1605 ST_RET(NAME_ID);
1606 YY_BREAK
1607 case 54:
1608 YY_RULE_SETUP
1609 ST_RET(FOR_ID);
1610 YY_BREAK
1611 case 55:
1612 YY_RULE_SETUP
1613 ST_RET(TO_ID);
1614 YY_BREAK
1615 case 56:
1616 YY_RULE_SETUP
1617 ST_RET(LOOP_ID);
1618 YY_BREAK
1619 case 57:
1620 YY_RULE_SETUP
1621 ST_RET(SWITCH_ID);
1622 YY_BREAK
1623 case 58:
1624 YY_RULE_SETUP
1625 ST_RET(CASE_ID);
1626 YY_BREAK
1627 case 59:
1628 YY_RULE_SETUP
1629 ST_RET(BREAK_ID);
1630 YY_BREAK
1631 case 60:
1632 YY_RULE_SETUP
1633 ST_RET(DEFAULT_ID);
1634 YY_BREAK
1635 case 61:
1636 YY_RULE_SETUP
1637 ST_RET(FUNCTION_ID);
1638 YY_BREAK
1639 case 62:
1640 YY_RULE_SETUP
1641 ST_RET(SHUFFLE_ID);
1642 YY_BREAK
1643 case 63:
1644 YY_RULE_SETUP
1645 ST_RET(MONTYPE_ID);
1646 YY_BREAK
1647 case 64:
1648 YY_RULE_SETUP
1649 ST_RET(selection_ID);
1650 YY_BREAK
1651 case 65:
1652 YY_RULE_SETUP
1653 ST_RET(rect_ID);
1654 YY_BREAK
1655 case 66:
1656 YY_RULE_SETUP
1657 ST_RET(fillrect_ID);
1658 YY_BREAK
1659 case 67:
1660 YY_RULE_SETUP
1661 ST_RET(line_ID);
1662 YY_BREAK
1663 case 68:
1664 YY_RULE_SETUP
1665 ST_RET(randline_ID);
1666 YY_BREAK
1667 case 69:
1668 YY_RULE_SETUP
1669 ST_RET(grow_ID);
1670 YY_BREAK
1671 case 70:
1672 YY_RULE_SETUP
1673 ST_RET(flood_ID);
1674 YY_BREAK
1675 case 71:
1676 YY_RULE_SETUP
1677 ST_RET(rndcoord_ID);
1678 YY_BREAK
1679 case 72:
1680 YY_RULE_SETUP
1681 ST_RET(circle_ID);
1682 YY_BREAK
1683 case 73:
1684 YY_RULE_SETUP
1685 ST_RET(ellipse_ID);
1686 YY_BREAK
1687 case 74:
1688 YY_RULE_SETUP
1689 ST_RET(filter_ID);
1690 YY_BREAK
1691 case 75:
1692 YY_RULE_SETUP
1693 ST_RET(gradient_ID);
1694 YY_BREAK
1695 case 76:
1696 YY_RULE_SETUP
1697 ST_RET(complement_ID);
1698 YY_BREAK
1699 case 77:
1700 YY_RULE_SETUP
1701 { savetoken(yytext); yylval.i=SEL_GRADIENT_RADIAL; return GRADIENT_TYPE; }
1702 YY_BREAK
1703 case 78:
1704 YY_RULE_SETUP
1705 { savetoken(yytext); yylval.i=SEL_GRADIENT_SQUARE; return GRADIENT_TYPE; }
1706 YY_BREAK
1707 case 79:
1708 YY_RULE_SETUP
1709 { savetoken(yytext); yylval.i=DRY; return HUMIDITY_TYPE; }
1710 YY_BREAK
1711 case 80:
1712 YY_RULE_SETUP
1713 { savetoken(yytext); yylval.i=WET; return HUMIDITY_TYPE; }
1714 YY_BREAK
1715 case 81:
1716 YY_RULE_SETUP
1717 { savetoken(yytext); yylval.i=HOT; return HUMIDITY_TYPE; }
1718 YY_BREAK
1719 case 82:
1720 YY_RULE_SETUP
1721 { savetoken(yytext); yylval.i=SOLID; return HUMIDITY_TYPE; }
1722 YY_BREAK
1723 case 83:
1724 YY_RULE_SETUP
1725 { savetoken(yytext); yylval.i=ANY_LOC; return HUMIDITY_TYPE; }
1726 YY_BREAK
1727 case 84:
1728 YY_RULE_SETUP
1729 ST_RET(LEV);
1730 YY_BREAK
1731 case 85:
1732 YY_RULE_SETUP
1733 ST_RET(QUANTITY_ID);
1734 YY_BREAK
1735 case 86:
1736 YY_RULE_SETUP
1737 ST_RET(BURIED_ID);
1738 YY_BREAK
1739 case 87:
1740 YY_RULE_SETUP
1741 ST_RET(ERODED_ID);
1742 YY_BREAK
1743 case 88:
1744 YY_RULE_SETUP
1745 ST_RET(ERODEPROOF_ID);
1746 YY_BREAK
1747 case 89:
1748 YY_RULE_SETUP
1749 { savetoken(yytext); yylval.i=1; return TRAPPED_STATE; }
1750 YY_BREAK
1751 case 90:
1752 YY_RULE_SETUP
1753 { savetoken(yytext); yylval.i=0; return TRAPPED_STATE; }
1754 YY_BREAK
1755 case 91:
1756 YY_RULE_SETUP
1757 ST_RET(RECHARGED_ID);
1758 YY_BREAK
1759 case 92:
1760 YY_RULE_SETUP
1761 ST_RET(INVIS_ID);
1762 YY_BREAK
1763 case 93:
1764 YY_RULE_SETUP
1765 ST_RET(GREASED_ID);
1766 YY_BREAK
1767 case 94:
1768 YY_RULE_SETUP
1769 ST_RET(FEMALE_ID);
1770 YY_BREAK
1771 case 95:
1772 YY_RULE_SETUP
1773 ST_RET(CANCELLED_ID);
1774 YY_BREAK
1775 case 96:
1776 YY_RULE_SETUP
1777 ST_RET(REVIVED_ID);
1778 YY_BREAK
1779 case 97:
1780 YY_RULE_SETUP
1781 ST_RET(AVENGE_ID);
1782 YY_BREAK
1783 case 98:
1784 YY_RULE_SETUP
1785 ST_RET(FLEEING_ID);
1786 YY_BREAK
1787 case 99:
1788 YY_RULE_SETUP
1789 ST_RET(BLINDED_ID);
1790 YY_BREAK
1791 case 100:
1792 YY_RULE_SETUP
1793 ST_RET(PARALYZED_ID);
1794 YY_BREAK
1795 case 101:
1796 YY_RULE_SETUP
1797 ST_RET(STUNNED_ID);
1798 YY_BREAK
1799 case 102:
1800 YY_RULE_SETUP
1801 ST_RET(CONFUSED_ID);
1802 YY_BREAK
1803 case 103:
1804 YY_RULE_SETUP
1805 ST_RET(SEENTRAPS_ID);
1806 YY_BREAK
1807 case 104:
1808 YY_RULE_SETUP
1809 ST_RET(ALL_ID);
1810 YY_BREAK
1811 case 105:
1812 YY_RULE_SETUP
1813 ST_RETF((yylval.i=1), HORIZ_OR_VERT);
1814 YY_BREAK
1815 case 106:
1816 YY_RULE_SETUP
1817 { savetoken(yytext); yylval.i=2; return HORIZ_OR_VERT; }
1818 YY_BREAK
1819 case 107:
1820 YY_RULE_SETUP
1821 { savetoken(yytext); yylval.i=D_ISOPEN; return DOOR_STATE; }
1822 YY_BREAK
1823 case 108:
1824 YY_RULE_SETUP
1825 { savetoken(yytext); yylval.i=D_CLOSED; return DOOR_STATE; }
1826 YY_BREAK
1827 case 109:
1828 YY_RULE_SETUP
1829 { savetoken(yytext); yylval.i=D_LOCKED; return DOOR_STATE; }
1830 YY_BREAK
1831 case 110:
1832 YY_RULE_SETUP
1833 { savetoken(yytext); yylval.i=D_NODOOR; return DOOR_STATE; }
1834 YY_BREAK
1835 case 111:
1836 YY_RULE_SETUP
1837 { savetoken(yytext); yylval.i=D_BROKEN; return DOOR_STATE; }
1838 YY_BREAK
1839 case 112:
1840 YY_RULE_SETUP
1841 { savetoken(yytext); yylval.i=D_SECRET; return DOOR_STATE; }
1842 YY_BREAK
1843 case 113:
1844 YY_RULE_SETUP
1845 { savetoken(yytext); yylval.i=W_NORTH; return DIRECTION; }
1846 YY_BREAK
1847 case 114:
1848 YY_RULE_SETUP
1849 { savetoken(yytext); yylval.i=W_EAST; return DIRECTION; }
1850 YY_BREAK
1851 case 115:
1852 YY_RULE_SETUP
1853 { savetoken(yytext); yylval.i=W_SOUTH; return DIRECTION; }
1854 YY_BREAK
1855 case 116:
1856 YY_RULE_SETUP
1857 { savetoken(yytext); yylval.i=W_WEST; return DIRECTION; }
1858 YY_BREAK
1859 case 117:
1860 YY_RULE_SETUP
1861 { savetoken(yytext); yylval.i = -1; return RANDOM_TYPE; }
1862 YY_BREAK
1863 case 118:
1864 YY_RULE_SETUP
1865 { savetoken(yytext); yylval.i = -1; return RANDOM_TYPE_BRACKET; }
1866 YY_BREAK
1867 case 119:
1868 YY_RULE_SETUP
1869 { savetoken(yytext); yylval.i = -2; return NONE; }
1870 YY_BREAK
1871 case 120:
1872 YY_RULE_SETUP
1873 ST_RET(A_REGISTER);
1874 YY_BREAK
1875 case 121:
1876 YY_RULE_SETUP
1877 { savetoken(yytext); yylval.i=1; return LEFT_OR_RIGHT; }
1878 YY_BREAK
1879 case 122:
1880 YY_RULE_SETUP
1881 { savetoken(yytext); yylval.i=2; return LEFT_OR_RIGHT; }
1882 YY_BREAK
1883 case 123:
1884 YY_RULE_SETUP
1885 { savetoken(yytext); yylval.i=3; return CENTER; }
1886 YY_BREAK
1887 case 124:
1888 YY_RULE_SETUP
1889 { savetoken(yytext); yylval.i=4; return LEFT_OR_RIGHT; }
1890 YY_BREAK
1891 case 125:
1892 YY_RULE_SETUP
1893 { savetoken(yytext); yylval.i=5; return LEFT_OR_RIGHT; }
1894 YY_BREAK
1895 case 126:
1896 YY_RULE_SETUP
1897 { savetoken(yytext); yylval.i=1; return TOP_OR_BOT; }
1898 YY_BREAK
1899 case 127:
1900 YY_RULE_SETUP
1901 { savetoken(yytext); yylval.i=5; return TOP_OR_BOT; }
1902 YY_BREAK
1903 case 128:
1904 YY_RULE_SETUP
1905 { savetoken(yytext); yylval.i=1; return LIGHT_STATE; }
1906 YY_BREAK
1907 case 129:
1908 YY_RULE_SETUP
1909 { savetoken(yytext); yylval.i=0; return LIGHT_STATE; }
1910 YY_BREAK
1911 case 130:
1912 YY_RULE_SETUP
1913 { savetoken(yytext); yylval.i=1; return FILLING; }
1914 YY_BREAK
1915 case 131:
1916 YY_RULE_SETUP
1917 { savetoken(yytext); yylval.i=0; return FILLING; }
1918 YY_BREAK
1919 case 132:
1920 YY_RULE_SETUP
1921 { savetoken(yytext); yylval.i=0; return IRREGULAR; }
1922 YY_BREAK
1923 case 133:
1924 YY_RULE_SETUP
1925 { savetoken(yytext); yylval.i=1; return IRREGULAR; }
1926 YY_BREAK
1927 case 134:
1928 YY_RULE_SETUP
1929 { savetoken(yytext); yylval.i=1; return JOINED; }
1930 YY_BREAK
1931 case 135:
1932 YY_RULE_SETUP
1933 { savetoken(yytext); yylval.i=0; return JOINED; }
1934 YY_BREAK
1935 case 136:
1936 YY_RULE_SETUP
1937 { savetoken(yytext); yylval.i=1; return LIMITED; }
1938 YY_BREAK
1939 case 137:
1940 YY_RULE_SETUP
1941 { savetoken(yytext); yylval.i=0; return LIMITED; }
1942 YY_BREAK
1943 case 138:
1944 YY_RULE_SETUP
1945 { savetoken(yytext); yylval.i= AM_NONE; return ALIGNMENT; }
1946 YY_BREAK
1947 case 139:
1948 YY_RULE_SETUP
1949 { savetoken(yytext); yylval.i= AM_LAWFUL; return ALIGNMENT; }
1950 YY_BREAK
1951 case 140:
1952 YY_RULE_SETUP
1953 { savetoken(yytext); yylval.i= AM_NEUTRAL; return ALIGNMENT; }
1954 YY_BREAK
1955 case 141:
1956 YY_RULE_SETUP
1957 { savetoken(yytext); yylval.i= AM_CHAOTIC; return ALIGNMENT; }
1958 YY_BREAK
1959 case 142:
1960 YY_RULE_SETUP
1961 { savetoken(yytext); yylval.i= AM_SPLEV_CO; return ALIGNMENT; }
1962 YY_BREAK
1963 case 143:
1964 YY_RULE_SETUP
1965 { savetoken(yytext); yylval.i= AM_SPLEV_NONCO; return ALIGNMENT; }
1966 YY_BREAK
1967 case 144:
1968 YY_RULE_SETUP
1969 { savetoken(yytext); yylval.i=1; return MON_ATTITUDE; }
1970 YY_BREAK
1971 case 145:
1972 YY_RULE_SETUP
1973 { savetoken(yytext); yylval.i=0; return MON_ATTITUDE; }
1974 YY_BREAK
1975 case 146:
1976 YY_RULE_SETUP
1977 { savetoken(yytext); yylval.i=1; return MON_ALERTNESS; }
1978 YY_BREAK
1979 case 147:
1980 YY_RULE_SETUP
1981 { savetoken(yytext); yylval.i=0; return MON_ALERTNESS; }
1982 YY_BREAK
1983 case 148:
1984 YY_RULE_SETUP
1985 { savetoken(yytext); yylval.i= M_AP_FURNITURE; return MON_APPEARANCE; }
1986 YY_BREAK
1987 case 149:
1988 YY_RULE_SETUP
1989 { savetoken(yytext); yylval.i= M_AP_MONSTER; return MON_APPEARANCE; }
1990 YY_BREAK
1991 case 150:
1992 YY_RULE_SETUP
1993 { savetoken(yytext); yylval.i= M_AP_OBJECT; return MON_APPEARANCE; }
1994 YY_BREAK
1995 case 151:
1996 YY_RULE_SETUP
1997 { savetoken(yytext); yylval.i=2; return ALTAR_TYPE; }
1998 YY_BREAK
1999 case 152:
2000 YY_RULE_SETUP
2001 { savetoken(yytext); yylval.i=1; return ALTAR_TYPE; }
2002 YY_BREAK
2003 case 153:
2004 YY_RULE_SETUP
2005 { savetoken(yytext); yylval.i=0; return ALTAR_TYPE; }
2006 YY_BREAK
2007 case 154:
2008 YY_RULE_SETUP
2009 { savetoken(yytext); yylval.i=1; return UP_OR_DOWN; }
2010 YY_BREAK
2011 case 155:
2012 YY_RULE_SETUP
2013 { savetoken(yytext); yylval.i=0; return UP_OR_DOWN; }
2014 YY_BREAK
2015 case 156:
2016 YY_RULE_SETUP
2017 { savetoken(yytext); yylval.i=0; return BOOLEAN; }
2018 YY_BREAK
2019 case 157:
2020 YY_RULE_SETUP
2021 { savetoken(yytext); yylval.i=1; return BOOLEAN; }
2022 YY_BREAK
2023 case 158:
2024 YY_RULE_SETUP
2025 { savetoken(yytext); yylval.i=DUST; return ENGRAVING_TYPE; }
2026 YY_BREAK
2027 case 159:
2028 YY_RULE_SETUP
2029 { savetoken(yytext); yylval.i=ENGRAVE; return ENGRAVING_TYPE; }
2030 YY_BREAK
2031 case 160:
2032 YY_RULE_SETUP
2033 { savetoken(yytext); yylval.i=BURN; return ENGRAVING_TYPE; }
2034 YY_BREAK
2035 case 161:
2036 YY_RULE_SETUP
2037 { savetoken(yytext); yylval.i=MARK; return ENGRAVING_TYPE; }
2038 YY_BREAK
2039 case 162:
2040 YY_RULE_SETUP
2041 { savetoken(yytext); yylval.i=ENGR_BLOOD; return ENGRAVING_TYPE; }
2042 YY_BREAK
2043 case 163:
2044 YY_RULE_SETUP
2045 { savetoken(yytext); yylval.i=1; return CURSE_TYPE; }
2046 YY_BREAK
2047 case 164:
2048 YY_RULE_SETUP
2049 { savetoken(yytext); yylval.i=2; return CURSE_TYPE; }
2050 YY_BREAK
2051 case 165:
2052 YY_RULE_SETUP
2053 { savetoken(yytext); yylval.i=3; return CURSE_TYPE; }
2054 YY_BREAK
2055 case 166:
2056 YY_RULE_SETUP
2057 { savetoken(yytext); yylval.i=NOTELEPORT; return FLAG_TYPE; }
2058 YY_BREAK
2059 case 167:
2060 YY_RULE_SETUP
2061 { savetoken(yytext); yylval.i=HARDFLOOR; return FLAG_TYPE; }
2062 YY_BREAK
2063 case 168:
2064 YY_RULE_SETUP
2065 { savetoken(yytext); yylval.i=NOMMAP; return FLAG_TYPE; }
2066 YY_BREAK
2067 case 169:
2068 YY_RULE_SETUP
2069 { savetoken(yytext); yylval.i=ARBOREAL; return FLAG_TYPE; } /* KMH */
2070 YY_BREAK
2071 case 170:
2072 YY_RULE_SETUP
2073 { savetoken(yytext); yylval.i=SHORTSIGHTED; return FLAG_TYPE; }
2074 YY_BREAK
2075 case 171:
2076 YY_RULE_SETUP
2077 { savetoken(yytext); yylval.i=MAZELEVEL; return FLAG_TYPE; }
2078 YY_BREAK
2079 case 172:
2080 YY_RULE_SETUP
2081 { savetoken(yytext); yylval.i=PREMAPPED; return FLAG_TYPE; }
2082 YY_BREAK
2083 case 173:
2084 YY_RULE_SETUP
2085 { savetoken(yytext); yylval.i=SHROUD; return FLAG_TYPE; }
2086 YY_BREAK
2087 case 174:
2088 YY_RULE_SETUP
2089 { savetoken(yytext); yylval.i=GRAVEYARD; return FLAG_TYPE; }
2090 YY_BREAK
2091 case 175:
2092 YY_RULE_SETUP
2093 { savetoken(yytext); yylval.i=ICEDPOOLS; return FLAG_TYPE; }
2094 YY_BREAK
2095 case 176:
2096 YY_RULE_SETUP
2097 { savetoken(yytext); yylval.i=SOLIDIFY; return FLAG_TYPE; }
2098 YY_BREAK
2099 case 177:
2100 YY_RULE_SETUP
2101 { savetoken(yytext); yylval.i=CORRMAZE; return FLAG_TYPE; }
2102 YY_BREAK
2103 case 178:
2104 YY_RULE_SETUP
2105 { savetoken(yytext); yylval.i=CHECK_INACCESSIBLES; return FLAG_TYPE; }
2106 YY_BREAK
2107 case 179:
2108 YY_RULE_SETUP
2109 { char *p = index(yytext, 'd');
2110 savetoken(yytext);
2111 if (p) {
2112 *p++ = '\0';
2113 yylval.dice.num = atoi(yytext);
2114 yylval.dice.die = atoi(p);
2115 } else {
2116 yylval.dice.num = yylval.dice.die = 1;
2118 return DICE;
2120 YY_BREAK
2121 case 180:
2122 YY_RULE_SETUP
2123 { savetoken(yytext); yylval.i = atoi(yytext + 1);
2124 if (yylval.i < 0 || yylval.i > 100)
2125 lc_error("Unexpected percentile '%li%%'", yylval.i);
2126 return PERCENT; }
2127 YY_BREAK
2128 case 181:
2129 YY_RULE_SETUP
2130 { savetoken(yytext); yylval.i=atoi(yytext); return MINUS_INTEGER; }
2131 YY_BREAK
2132 case 182:
2133 YY_RULE_SETUP
2134 { savetoken(yytext); yylval.i=atoi(yytext); return PLUS_INTEGER; }
2135 YY_BREAK
2136 case 183:
2137 YY_RULE_SETUP
2138 { savetoken(yytext); yylval.i = atoi(yytext);
2139 if (yylval.i < 0 || yylval.i > 100)
2140 lc_error("Unexpected percentile '%li%%'", yylval.i);
2141 return SPERCENT; }
2142 YY_BREAK
2143 case 184:
2144 YY_RULE_SETUP
2145 { savetoken(yytext); yylval.i=atoi(yytext); return INTEGER; }
2146 YY_BREAK
2147 case 185:
2148 /* rule 185 can match eol */
2149 YY_RULE_SETUP
2150 { savetoken(yytext);
2151 yytext[yyleng - 1] = '\0'; /* discard the trailing \" */
2152 yylval.map = dupstr(yytext + 1); /* skip the first \" */
2153 return STRING; }
2154 YY_BREAK
2155 case 186:
2156 YY_RULE_SETUP
2157 { savetoken(yytext); return handle_varstring_check(); }
2158 YY_BREAK
2159 case 187:
2160 YY_RULE_SETUP
2161 { savetoken(yytext); yylval.i = SPO_JE; return COMPARE_TYPE; }
2162 YY_BREAK
2163 case 188:
2164 YY_RULE_SETUP
2165 { savetoken(yytext); yylval.i = SPO_JNE; return COMPARE_TYPE; }
2166 YY_BREAK
2167 case 189:
2168 YY_RULE_SETUP
2169 { savetoken(yytext); yylval.i = SPO_JNE; return COMPARE_TYPE; }
2170 YY_BREAK
2171 case 190:
2172 YY_RULE_SETUP
2173 { savetoken(yytext); yylval.i = SPO_JLE; return COMPARE_TYPE; }
2174 YY_BREAK
2175 case 191:
2176 YY_RULE_SETUP
2177 { savetoken(yytext); yylval.i = SPO_JGE; return COMPARE_TYPE; }
2178 YY_BREAK
2179 case 192:
2180 YY_RULE_SETUP
2181 { savetoken(yytext); yylval.i = SPO_JL; return COMPARE_TYPE; }
2182 YY_BREAK
2183 case 193:
2184 YY_RULE_SETUP
2185 { savetoken(yytext); yylval.i = SPO_JG; return COMPARE_TYPE; }
2186 YY_BREAK
2187 case 194:
2188 /* rule 194 can match eol */
2189 YY_RULE_SETUP
2190 { newline(); }
2191 YY_BREAK
2192 case 195:
2193 YY_RULE_SETUP
2194 { advancepos(yytext); }
2195 YY_BREAK
2196 case 196:
2197 YY_RULE_SETUP
2198 { savetoken(yytext); yylval.i = yytext[2]; return CHAR; }
2199 YY_BREAK
2200 case 197:
2201 YY_RULE_SETUP
2202 { savetoken(yytext); yylval.i = yytext[1]; return CHAR; }
2203 YY_BREAK
2204 case 198:
2205 YY_RULE_SETUP
2206 ST_RET(UNKNOWN_TYPE);
2207 YY_BREAK
2208 case 199:
2209 YY_RULE_SETUP
2210 { savetoken(yytext); return yytext[0]; }
2211 YY_BREAK
2212 case 200:
2213 YY_RULE_SETUP
2214 ECHO;
2215 YY_BREAK
2216 case YY_STATE_EOF(INITIAL):
2217 case YY_STATE_EOF(MAPC):
2218 yyterminate();
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
2250 * in input().
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;
2278 goto yy_match;
2281 else
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;
2294 if ( yywrap( ) )
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);
2308 goto do_action;
2311 else
2313 if ( ! (yy_did_buffer_switch_on_eof) )
2314 YY_NEW_FILE;
2316 break;
2319 case EOB_ACT_CONTINUE_SCAN:
2320 (yy_c_buf_p) =
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;
2327 goto yy_match;
2329 case EOB_ACT_LAST_MATCH:
2330 (yy_c_buf_p) =
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;
2339 break;
2342 default:
2343 YY_FATAL_ERROR(
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;
2362 int ret_val;
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;
2374 } else {
2375 /* We matched some text prior to the EOB, first
2376 * process it.
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,
2392 * just force an EOF
2394 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2395 } else {
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 );
2415 } else
2416 /* Can't grow it, we don't own it. */
2417 b->yy_ch_buf = 0;
2419 if (! b->yy_ch_buf)
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;
2439 yyrestart(yyin );
2440 } else {
2441 ret_val = EOB_ACT_LAST_MATCH;
2442 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING;
2444 } else
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];
2463 return ret_val;
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;
2471 char *yy_cp;
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
2498 * synopsis
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;
2505 int yy_is_jam;
2506 char *yy_cp = (yy_c_buf_p);
2508 YY_CHAR yy_c = 1;
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;
2526 #ifndef YY_NO_UNPUT
2528 static void yyunput (c,yy_bp )
2529 int c;
2530 char * yy_bp;
2532 char *yy_cp;
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];
2545 char *source =
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;
2567 #endif
2569 #ifndef YY_NO_INPUT
2570 static int input ()
2572 int c;
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';
2586 else
2587 { /* need more input */
2588 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
2589 ++(yy_c_buf_p);
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. */
2605 yyrestart(yyin );
2607 /*FALLTHROUGH*/
2609 case EOB_ACT_END_OF_FILE:
2611 if ( yywrap( ) )
2612 return EOF;
2614 if ( ! (yy_did_buffer_switch_on_eof) )
2615 YY_NEW_FILE;
2616 return input();
2619 case EOB_ACT_CONTINUE_SCAN:
2620 (yy_c_buf_p) = (yytext_ptr) + offset;
2621 break;
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');
2632 return c;
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 )
2643 FILE * 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
2665 * with
2666 * yypop_buffer_state();
2667 * yypush_buffer_state(new_buffer);
2669 yyensure_buffer_stack ();
2670 if ( YY_CURRENT_BUFFER == new_buffer )
2671 return;
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 )
2707 FILE * file;
2708 int size;
2710 YY_BUFFER_STATE b;
2712 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2713 if ( ! b )
2714 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2715 if (!size)
2716 size = YY_BUF_SIZE;
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 );
2731 return b;
2734 /** Destroy the buffer.
2735 * @param b a buffer created with yy_create_buffer()
2738 void yy_delete_buffer (b )
2739 YY_BUFFER_STATE b;
2742 if ( ! b )
2743 return;
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 )
2759 YY_BUFFER_STATE b;
2760 FILE * file;
2762 int oerrno = errno;
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;
2780 errno = oerrno;
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 )
2788 YY_BUFFER_STATE b;
2790 if ( ! b )
2791 return;
2793 b->yy_n_chars = 0;
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];
2804 b->yy_at_bol = 1;
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
2813 * if necessary.
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)
2821 return;
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)
2851 return;
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... */
2878 #else
2879 num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
2880 #endif
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;
2891 return;
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
2912 * character buffer.
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 )
2919 char * base;
2920 yy_size_t size;
2922 YY_BUFFER_STATE b;
2924 if ( size < 2 ||
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. */
2928 return 0;
2930 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
2931 if ( ! b )
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;
2940 b->yy_at_bol = 1;
2941 b->yy_fill_buffer = 0;
2942 b->yy_buffer_status = YY_BUFFER_NEW;
2944 yy_switch_to_buffer(b );
2946 return 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
2968 * bytes.
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;
2976 YY_BUFFER_STATE b;
2977 char *buf;
2978 yy_size_t n;
2979 yy_size_t i;
2981 /* Get memory for full buffer, including space for trailing EOB's. */
2982 n = _yybytes_len + 2;
2983 buf = (char *) yyalloc(n );
2984 if ( ! buf )
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 );
2993 if ( ! b )
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;
3001 return b;
3004 #ifndef YY_EXIT_FAILURE
3005 #define YY_EXIT_FAILURE 2
3006 #endif
3008 static void yy_fatal_error (msg )
3009 yyconst char* msg;
3011 (void) fprintf( stderr, "%s\n", msg );
3012 exit( YY_EXIT_FAILURE );
3015 /* Redefine yyless() so it works in section 3 code. */
3017 #undef yyless
3018 #define yyless(n) \
3019 do { \
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; \
3028 } while ( 0 )
3030 /* Accessor methods (get/set functions) to struct members. */
3032 /** Get the current line number.
3035 int yyget_lineno ()
3038 return yylineno;
3041 /** Get the input stream.
3044 FILE *yyget_in ()
3046 return yyin;
3049 /** Get the output stream.
3052 FILE *yyget_out ()
3054 return yyout;
3057 /** Get the length of the current token.
3060 yy_size_t yyget_leng ()
3062 return yyleng;
3065 /** Get the current token.
3069 char *yyget_text ()
3071 return yytext;
3074 /** Set the current line number.
3075 * @param _line_number line number
3078 void yyset_lineno (_line_number )
3079 int _line_number;
3082 yylineno = _line_number;
3085 /** Set the input stream. This does not discard the current
3086 * input buffer.
3087 * @param _in_str A readable stream.
3089 * @see yy_switch_to_buffer
3091 void yyset_in (_in_str )
3092 FILE * _in_str;
3094 yyin = _in_str ;
3097 void yyset_out (_out_str )
3098 FILE * _out_str;
3100 yyout = _out_str ;
3103 int yyget_debug ()
3105 return yy_flex_debug;
3108 void yyset_debug (_bdebug )
3109 int _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;
3124 (yy_init) = 0;
3125 (yy_start) = 0;
3127 /* Defined in main.c */
3128 #ifdef YY_STDINIT
3129 yyin = stdin;
3130 yyout = stdout;
3131 #else
3132 yyin = (FILE *) 0;
3133 yyout = (FILE *) 0;
3134 #endif
3136 /* For future reference: Set errno on error, since we are called by
3137 * yylex_init()
3139 return 0;
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. */
3158 yy_init_globals( );
3160 return 0;
3164 * Internal utility routines.
3167 #ifndef yytext_ptr
3168 static void yy_flex_strncpy (s1,s2,n )
3169 char* s1;
3170 yyconst char * s2;
3171 int n;
3174 int i;
3175 for ( i = 0; i < n; ++i )
3176 s1[i] = s2[i];
3178 #endif
3180 #ifdef YY_NEED_STRLEN
3181 static int yy_flex_strlen (s )
3182 yyconst char * s;
3184 int n;
3185 for ( n = 0; s[n]; ++n )
3188 return n;
3190 #endif
3192 void *yyalloc (size )
3193 yy_size_t size;
3196 return (void *) malloc( size );
3199 void *yyrealloc (ptr,size )
3200 void * ptr;
3201 yy_size_t 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 );
3214 void yyfree (ptr )
3215 void * ptr;
3218 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3221 #ifdef AMIGA
3222 long *
3223 alloc(n)
3224 unsigned n;
3226 return (long *) malloc(n);
3228 #endif
3230 /* routine to switch to another input file; needed for flex */
3231 void
3232 init_yyin( input_f )
3233 FILE *input_f;
3235 #if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER)
3236 if (yyin)
3237 yyrestart(input_f);
3238 else
3239 #endif
3240 yyin = input_f;
3242 if (!orig_yyin)
3243 orig_yyin = yyin;
3245 /* analogous routine (for completeness) */
3246 void
3247 init_yyout( output_f )
3248 FILE *output_f;
3250 yyout = output_f;
3253 long
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);
3263 l &= ~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);
3283 return VARSTRING;
3286 void
3287 newline()
3289 nh_line_number++;
3290 token_start_pos = 0;
3291 (void) memset((genericptr_t) curr_token, 0, 512);
3294 void
3295 savetoken(s)
3296 char *s;
3298 Sprintf(curr_token, "%s", s);
3299 advancepos(s);
3302 void
3303 advancepos(s)
3304 char *s;
3306 token_start_pos += strlen(s);
3309 /*lev_comp.l*/