OSDN Git Service

b34ae00915b56d3e3ef7eb7d187d87e8ef183d03
[jnethack/source.git] / sys / share / lev_lex.c
1
2 #line 3 "lev_lex.c"
3
4 #define  YY_INT_ALIGNED short int
5
6 /* A lexical scanner generated by flex via 'flex -S flexhack.skl'
7  * where flexhack.skl is a nethack-specific alternate skeleton derived
8  * from flex 2.6.0's skel.c (which in turn was generated from flex.skl).
9  *
10  * Support for C++, re-entrancy, and table serialization stripped out.
11  * NetHack's usage doesn't need them and we want to reduce the size and
12  * complexity of this skeleton as well as of the generated scanner code.
13  */
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
18
19 #include "config.h"
20
21 #include <errno.h>
22
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
35
36 #define yyconst const
37
38 /* Returned upon end-of-file. */
39 #define YY_NULL 0
40
41 /* Promotes a possibly negative, possibly signed char to an unsigned
42  * integer for use as an array index.  If the signed char is negative,
43  * we want to instead treat it as an 8-bit unsigned char, hence the
44  * double cast.
45  */
46 #define YY_SC_TO_UI(c) ((unsigned int) (uchar) c)
47
48 /* Enter a start condition.  This macro really ought to take a parameter,
49  * but we do it the disgusting crufty way forced on us by the ()-less
50  * definition of BEGIN.
51  */
52 #define BEGIN (yy_start) = 1 + 2 *
53
54 /* Translate the current start state into a value that can be later handed
55  * to BEGIN to return to the state.  The YYSTATE alias is for lex
56  * compatibility.
57  */
58 #define YY_START (((yy_start) - 1) / 2)
59 #define YYSTATE YY_START
60
61 /* Action number for EOF rule of a given start state. */
62 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
63
64 /* Special action meaning "start processing a new file". */
65 #define YY_NEW_FILE yyrestart(yyin  )
66
67 #define YY_END_OF_BUFFER_CHAR 0
68
69 /* Size of default input buffer. */
70 #ifndef YY_BUF_SIZE
71 #ifdef __ia64__
72 /* On IA-64, the buffer size is 16k, not 8k.
73  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
74  * Ditto for the __ia64__ case accordingly.
75  */
76 #define YY_BUF_SIZE 32768
77 #else
78 #define YY_BUF_SIZE 16384
79 #endif /* __ia64__ */
80 #endif
81
82 /* The state buf must be large enough to hold one state per character
83  * in the main buffer.
84  */
85 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
86
87 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
88 #define YY_TYPEDEF_YY_BUFFER_STATE
89 typedef struct yy_buffer_state *YY_BUFFER_STATE;
90 #endif
91
92 #ifndef YY_TYPEDEF_YY_SIZE_T
93 #define YY_TYPEDEF_YY_SIZE_T
94 typedef size_t yy_size_t;
95 #endif
96
97 extern yy_size_t yyleng;
98 extern FILE *yyin, *yyout;
99
100 #define EOB_ACT_CONTINUE_SCAN 0
101 #define EOB_ACT_END_OF_FILE 1
102 #define EOB_ACT_LAST_MATCH 2
103
104 #define YY_LESS_LINENO(n)
105 #define YY_LINENO_REWIND_TO(ptr)
106
107 /* Return all but the first "n" matched characters back to the input stream. */
108 #define yyless(n) \
109     do { \
110         /* Undo effects of setting up yytext. */ \
111         int yyless_macro_arg = (n); \
112         YY_LESS_LINENO(yyless_macro_arg); \
113         *yy_cp = (yy_hold_char); \
114         YY_RESTORE_YY_MORE_OFFSET \
115         (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
116         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
117     } while ( 0 )
118
119 #define unput(c) yyunput( c, (yytext_ptr)  )
120
121 #ifndef YY_STRUCT_YY_BUFFER_STATE
122 #define YY_STRUCT_YY_BUFFER_STATE
123 struct yy_buffer_state {
124         FILE *yy_input_file;
125
126         char *yy_ch_buf;                /* input buffer */
127         char *yy_buf_pos;               /* current position in input buffer */
128
129         /* Size of input buffer in bytes, not including room for EOB
130          * characters.
131          */
132         yy_size_t yy_buf_size;
133
134         /* Number of characters read into yy_ch_buf, not including EOB
135          * characters.
136          */
137         yy_size_t yy_n_chars;
138
139         /* Whether we "own" the buffer - i.e., we know we created it,
140          * and can realloc() it to grow it, and should free() it to
141          * delete it.
142          */
143         int yy_is_our_buffer;
144
145         /* Whether this is an "interactive" input source; if so, and
146          * if we're using stdio for input, then we want to use getc()
147          * instead of fread(), to make sure we stop fetching input after
148          * each newline.
149          */
150         int yy_is_interactive;
151
152         /* Whether we're considered to be at the beginning of a line.
153          * If so, '^' rules will be active on the next match, otherwise
154          * not.
155          */
156         int yy_at_bol;
157
158         int yy_bs_lineno; /**< The line count. */
159         int yy_bs_column; /**< The column count. */
160
161         /* Whether to try to fill the input buffer when we reach the
162          * end of it.
163          */
164         int yy_fill_buffer;
165
166         int yy_buffer_status;
167
168 #define YY_BUFFER_NEW 0
169 #define YY_BUFFER_NORMAL 1
170         /* When an EOF's been seen but there's still some text to process
171          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
172          * shouldn't try reading from the input source any more.  We might
173          * still have a bunch of tokens to match, though, because of
174          * possible backing-up.
175          *
176          * When we actually see the EOF, we change the status to "new"
177          * (via yyrestart()), so that the user can continue scanning by
178          * just pointing yyin at a new input file.
179          */
180 #define YY_BUFFER_EOF_PENDING 2
181
182 };
183 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
184
185 /* Stack of input buffers. */
186 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
187 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
188 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
189
190 /* We provide macros for accessing buffer states in case in the
191  * future we want to put the buffer states in a more general
192  * "scanner state".
193  *
194  * Returns the top of the stack, or NULL.
195  */
196 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
197                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
198                           : NULL)
199
200 /* Same as previous macro, but useful when we know that the buffer stack is not
201  * NULL or when we need an lvalue. For internal use only.
202  */
203 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
204
205 /* yy_hold_char holds the character lost when yytext is formed. */
206 static char yy_hold_char;
207 static yy_size_t yy_n_chars;    /* number of characters read into yy_ch_buf */
208 yy_size_t yyleng;
209
210 /* Points to current character in buffer. */
211 static char *yy_c_buf_p = (char *) 0;
212 static int yy_init = 0;         /* whether we need to initialize */
213 static int yy_start = 0;        /* start state number */
214
215 /* Flag which is used to allow yywrap()'s to do buffer switches
216  * instead of setting up a fresh yyin.  A bit of a hack ...
217  */
218 static int yy_did_buffer_switch_on_eof;
219
220 void yyrestart FDECL(, (FILE *input_file  ));
221 void yy_switch_to_buffer FDECL(, (YY_BUFFER_STATE new_buffer  ));
222 YY_BUFFER_STATE yy_create_buffer FDECL(, (FILE *file,int size  ));
223 void yy_delete_buffer FDECL(, (YY_BUFFER_STATE b  ));
224 void yy_flush_buffer FDECL(, (YY_BUFFER_STATE b  ));
225 void yypush_buffer_state FDECL(, (YY_BUFFER_STATE new_buffer  ));
226 void yypop_buffer_state FDECL(, (void ));
227
228 static void yyensure_buffer_stack FDECL(, (void ));
229 static void yy_load_buffer_state FDECL(, (void ));
230 static void yy_init_buffer FDECL(, (YY_BUFFER_STATE b,FILE *file  ));
231
232 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
233
234 YY_BUFFER_STATE yy_scan_buffer FDECL(, (char *base,yy_size_t size  ));
235 YY_BUFFER_STATE yy_scan_string FDECL(, (yyconst char *yy_str  ));
236 YY_BUFFER_STATE yy_scan_bytes FDECL(, (yyconst char *bytes,yy_size_t len  ));
237
238 void *yyalloc FDECL(, (yy_size_t  ));
239 void *yyrealloc FDECL(, (void *,yy_size_t  ));
240 void yyfree FDECL(, (void *  ));
241
242 #define yy_new_buffer yy_create_buffer
243 #define yy_set_interactive(is_interactive) \
244         { \
245             if ( ! YY_CURRENT_BUFFER ) { \
246                 yyensure_buffer_stack (); \
247                 YY_CURRENT_BUFFER_LVALUE = \
248                         yy_create_buffer(yyin,YY_BUF_SIZE ); \
249             } \
250             YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
251         }
252 #define yy_set_bol(at_bol) \
253         { \
254             if ( ! YY_CURRENT_BUFFER ) { \
255                 yyensure_buffer_stack (); \
256                 YY_CURRENT_BUFFER_LVALUE = \
257                         yy_create_buffer(yyin,YY_BUF_SIZE ); \
258             } \
259             YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
260         }
261 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
262
263 /* Begin user sect3 */
264
265 typedef unsigned char YY_CHAR;
266
267 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
268
269 typedef int yy_state_type;
270
271 extern int yylineno;
272
273 int yylineno = 1;
274
275 extern char *yytext;
276 #ifdef yytext_ptr
277 #undef yytext_ptr
278 #endif
279 #define yytext_ptr yytext
280
281 static yy_state_type yy_get_previous_state FDECL(, (void ));
282 static yy_state_type yy_try_NUL_trans FDECL(, (yy_state_type current_state  ));
283 static int yy_get_next_buffer FDECL(, (void ));
284 static void yy_fatal_error FDECL(, (yyconst char msg[]  )) NORETURN;
285
286 /* Done after the current pattern has been matched and before the
287  * corresponding action - sets up yytext.
288  */
289 #define YY_DO_BEFORE_ACTION \
290         (yytext_ptr) = yy_bp; \
291         yyleng = (size_t) (yy_cp - yy_bp); \
292         (yy_hold_char) = *yy_cp; \
293         *yy_cp = '\0'; \
294         (yy_c_buf_p) = yy_cp;
295
296 #define YY_NUM_RULES 200
297 #define YY_END_OF_BUFFER 201
298 /* This struct is not used in this scanner,
299    but its presence is necessary. */
300 struct yy_trans_info
301         {
302         flex_int32_t yy_verify;
303         flex_int32_t yy_nxt;
304         };
305 static yyconst flex_int16_t yy_accept[1057] =
306     {   0,
307         0,    0,    0,    0,  201,  199,  195,  194,  199,  199,
308       199,  199,  199,  199,  198,  184,  192,  199,  193,  198,
309       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
310       198,  198,  198,  198,  198,  198,  198,  199,  198,  198,
311       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
312       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
313       195,  199,  198,    2,  199,  195,  199,  199,  198,  184,
314       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
315       198,  198,  195,  199,  195,  194,  188,    0,  185,  186,
316         0,    0,  182,  198,  181,  183,  184,  198,  190,  189,
317
318       187,  191,  198,  198,  198,  198,  198,  198,  198,  198,
319       198,  198,  198,  198,  198,  198,  198,  198,   39,  198,
320       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
321       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
322        55,  198,  198,    0,    0,  198,  198,  198,  198,  198,
323       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
324       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
325       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
326       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
327       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
328
329       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
330       198,  198,  154,  198,  198,  195,    0,    0,    3,  198,
331         2,    2,    0,  195,    0,  182,  198,  181,  184,  198,
332       198,  198,  198,   39,  198,  198,  198,  198,  198,  198,
333       195,    0,    2,    0,    0,  197,    0,  197,  179,  198,
334       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
335       198,  198,   54,  198,  198,  198,  198,  198,  198,  198,
336       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
337       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
338       198,  198,  198,  198,  198,    0,  198,  104,  198,   83,
339
340       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
341       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
342       198,   79,  198,  198,  198,  198,  198,  198,  198,  198,
343       198,  198,  198,  198,  198,  198,  198,  198,  198,   81,
344       198,  198,  198,  198,  198,  139,  198,  198,  198,  198,
345       128,  198,  198,  198,  198,  198,  198,  198,  198,  198,
346       198,  198,  198,  198,  198,  198,  198,   16,  198,  198,
347       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
348       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
349       198,  198,  126,  198,  198,  198,  198,  198,  198,  198,
350
351       198,   80,  198,  198,  198,  198,  198,  198,  198,  198,
352       196,  198,  198,  198,   58,  198,  198,  198,   22,  198,
353        40,  198,   41,  198,  198,  198,  198,   49,  198,  198,
354       198,  198,   56,    6,  198,  198,  198,   53,  198,  198,
355       198,   36,  198,  198,  198,  198,   42,  198,   35,  198,
356       198,  198,  198,  198,   21,  198,    0,  180,  198,  198,
357       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
358       160,  198,  198,  198,  198,  198,  198,  198,  198,  198,
359       198,  155,  158,  114,  198,  198,  198,  198,  198,  198,
360       198,  198,  198,  198,  198,  198,   69,  198,  198,  198,
361
362       198,  198,  198,  198,  198,  198,  121,  198,  198,   67,
363       198,  198,  198,  198,  161,  198,  198,  198,  198,  198,
364       198,  198,  198,  198,  119,  198,  198,  198,  198,  107,
365       198,  198,  198,  198,  198,  198,  198,   65,  198,  198,
366       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
367       198,  198,  198,  198,  198,  198,  157,  198,  198,  198,
368       198,  198,  116,   15,    0,  198,  198,  198,  198,  198,
369        28,  198,   59,  198,  198,  198,  198,  198,   13,  198,
370       198,  198,   50,  198,  198,    7,  198,  198,  198,  198,
371         5,  198,  198,  198,  198,  198,  198,  198,  198,  198,
372
373        30,  198,  198,  198,  198,  198,  120,  153,  198,  198,
374       198,  147,  198,  198,  162,  198,  198,  198,  198,  198,
375       141,  198,  198,  198,  198,  198,  198,  198,  198,  198,
376       198,  156,  198,  198,  198,  198,  198,  198,  198,  198,
377       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
378       198,  198,  198,  198,  198,  198,  198,  198,   11,  198,
379       198,  198,  198,  198,  198,  198,  113,  198,  198,  198,
380       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
381       125,  198,   12,  198,  198,  198,  198,  198,  198,  198,
382        82,  115,  198,  198,  198,  198,  198,  198,  198,  198,
383
384       129,  198,  198,  198,  198,   33,  198,  198,  198,  198,
385       198,  198,  198,  198,  198,   29,  198,  198,  198,  198,
386       198,  198,   17,   31,  198,   27,  198,  198,  198,  198,
387        57,  198,  198,  198,  198,  146,   97,  198,  198,  127,
388       111,   86,  198,  123,   72,  108,  198,  198,  198,  198,
389       165,  198,  198,   87,  198,   94,  130,  198,   74,  198,
390       198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
391       198,  198,  198,  135,  198,  198,  109,  198,  198,  198,
392       198,  198,  198,  198,  198,  198,  110,  168,  198,  198,
393       198,   16,  198,  198,  198,  198,   77,  198,  117,  198,
394
395       198,  198,  198,  198,  112,  198,  198,  198,  152,  173,
396       198,  198,   78,  198,  198,  198,  198,  198,  198,  198,
397       198,    1,   57,  198,  198,  198,   60,  198,  198,  198,
398       198,  198,  198,  198,    4,  198,   19,  198,  198,  198,
399       198,  198,   62,   43,  198,   46,   26,  198,  163,   99,
400       198,  198,  198,  198,  198,   73,  159,  198,  198,   98,
401       198,  198,  198,   93,  198,  198,  198,  198,  145,  198,
402       198,  198,  198,  198,  136,  198,  198,  198,  198,  198,
403        20,   63,  140,  138,  198,  198,  198,  198,  198,  198,
404       198,  198,  118,  198,  132,   96,  198,  151,  198,  198,
405
406       198,  198,  198,  101,   47,   89,  198,  198,  198,  198,
407       198,  198,   45,  198,  198,   34,   61,   14,    8,   25,
408       198,  198,  198,  198,  198,   23,  198,  169,  198,  198,
409       198,  102,  177,  198,   66,  198,   75,  198,  198,  198,
410       198,  198,  198,  198,  198,  198,  198,  198,  198,  150,
411         9,  198,  198,  198,  198,  198,  144,  198,   85,   68,
412       198,   71,  198,  198,  198,  198,  176,  164,  131,  134,
413       198,  106,   18,  198,   51,  198,  198,  198,  198,  198,
414       198,   95,  142,  198,  198,   70,  174,  122,  198,  167,
415       198,  175,  198,   92,  133,   84,  148,  149,  171,  198,
416
417       198,  198,  100,  172,   91,  198,   64,  198,   10,  137,
418        24,   52,  198,  198,  198,  198,  198,   76,   88,  124,
419       105,  198,  198,  198,  166,  103,  198,  198,  198,  198,
420       198,  198,  198,  198,   90,  198,   37,   38,  198,  198,
421       198,  198,  143,  170,  198,  198,  198,  178,  198,  198,
422       198,  198,   48,   32,   44,    0
423     } ;
424
425 static yyconst YY_CHAR yy_ec[256] =
426     {   0,
427         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
428         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
429         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
430         1,    5,    6,    7,    8,    9,   10,    1,   11,    1,
431         1,    1,   12,    1,   13,   14,    1,   15,   15,   15,
432        15,   15,   15,   15,   15,   15,   15,    1,    1,   16,
433        17,   18,    1,    1,   19,   20,   21,   22,   23,   24,
434        25,   26,   27,   28,   29,   30,   31,   32,   33,   34,
435        35,   36,   37,   38,   39,   40,   41,   42,   43,   44,
436        45,   46,   47,    1,   48,    1,   49,   50,   51,   52,
437
438        53,   54,   55,   56,   57,   58,   59,   60,   61,   62,
439        63,   64,   65,   66,   67,   68,   69,   70,   71,   72,
440        73,   74,   14,   14,   14,    1,    1,    1,    1,    1,
441         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
442         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
443         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
444         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
445         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
446         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
447         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
448
449         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
450         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
451         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
452         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
453         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
454         1,    1,    1,    1,    1
455     } ;
456
457 static yyconst YY_CHAR yy_meta[75] =
458     {   0,
459         1,    2,    3,    2,    2,    1,    1,    2,    1,    1,
460         1,    2,    4,    2,    4,    1,    1,    1,    5,    5,
461         5,    6,    6,    5,    6,    5,    5,    6,    5,    5,
462         6,    6,    6,    5,    6,    6,    5,    5,    6,    6,
463         5,    6,    6,    6,    1,    2,    1,    6,    6,    6,
464         6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
465         6,    6,    6,    6,    6,    6,    6,    6,    6,    6,
466         6,    5,    6,    6
467     } ;
468
469 static yyconst flex_uint16_t yy_base[1064] =
470     {   0,
471         0,   73,  102,   77, 1254, 1255,   75, 1255, 1250, 1235,
472      1244,    0, 1204, 1234, 1233,   78,   66, 1230, 1229, 1215,
473      1208,   57,   63,   59,   64,  101,    0,   63,   79,  119,
474        94, 1223, 1209,  122,  123,  121, 1222,  104,  105,  100,
475       124,   90,  129,  137, 1174,   84,  117, 1176,  139,  150,
476       151,  151,  156, 1169,  163,  168,  166,   56, 1184, 1183,
477       232, 1232,  216, 1255, 1231,  242,  248,  251,  264,  196,
478       155,  167,  208,  228,  241, 1218,  249,  242,  195,  277,
479       284,  223,  319,  334,  257, 1255, 1255, 1225, 1255,    0,
480      1220, 1219, 1214,    0, 1213, 1255,  298, 1212, 1255, 1255,
481
482      1255, 1255, 1188,  263, 1188,  264, 1200, 1190, 1203, 1184,
483      1195, 1192, 1199,  270, 1185, 1183, 1185, 1195,    0, 1186,
484      1190, 1171, 1177, 1165, 1171, 1175, 1174, 1174,  280, 1176,
485       292, 1171,  301, 1169, 1162, 1168, 1180, 1178, 1170,  259,
486         0, 1177, 1165,  203,  304,  272, 1121, 1143, 1132, 1138,
487      1141,  288, 1121, 1125, 1121, 1124, 1123, 1135, 1117, 1119,
488       308, 1115, 1109, 1106, 1111, 1110, 1116, 1120, 1111, 1113,
489      1111, 1111,  234,  281,  296,  299, 1117,  282, 1103, 1111,
490      1096,   81,  315, 1115,  324,   26, 1103, 1102, 1102, 1093,
491       330, 1103, 1107, 1093, 1109, 1104, 1107,  281,  333, 1100,
492
493      1102, 1098, 1090,  342,  323,  321, 1082, 1081, 1083, 1084,
494       345,  350,    0, 1081,  332,  407, 1143, 1142, 1255,  363,
495      1255, 1255, 1141,  411,  415,  416, 1128,    0,  412,  390,
496       396,  404,  415, 1127,  410,  420,  421,  422,  423,  424,
497         0,    0, 1255, 1138,    0, 1255, 1129, 1128, 1123, 1118,
498      1104, 1116, 1111, 1095, 1096, 1112, 1094, 1088, 1105, 1091,
499      1088, 1100,    0, 1092, 1102, 1091, 1099, 1080, 1081, 1096,
500      1094, 1082, 1092, 1077, 1090, 1075, 1088, 1091, 1061, 1085,
501      1077, 1068, 1083, 1077, 1073, 1071, 1077, 1071, 1072, 1062,
502      1059, 1073, 1059, 1060, 1063,  435, 1037,    0, 1042,    0,
503
504      1027, 1036, 1026, 1028, 1019, 1023, 1021, 1015, 1023,  385,
505      1030, 1012, 1016, 1027, 1010, 1016, 1011, 1020, 1007, 1005,
506      1009,    0, 1002, 1001, 1011, 1001, 1014,  998, 1015,  383,
507      1010,  999,  392, 1012,  989, 1005, 1006, 1000,  988,    0,
508      1003, 1003,  996,  999,  989,    0,  982,  983,  991,  994,
509         0,  987,  992,  981,  993,  983,  988,  987,  378,  986,
510       970,  977,  973,  974,  404,  966,  408,  980,  970,  982,
511       979,  968,  966,  970,  974,  392,  956,  967,  967,  971,
512       952,  969,  953,  956,  964,  950,  395,  958,  946,  964,
513       950,  945,    0,  946,  956,  939,  950,  943,  948,  936,
514
515       935,    0,  462,  448,  453,  971,  454,  456,  434,  455,
516      1255,  965,  979,  970,    0,  979,  970,  957,    0,  975,
517         0,  975,    0,  956,  954,  953,  967,    0,  966,  940,
518       964,  956,    0,  944,  965,  947,  944,    0,  947,  452,
519       959,    0,  960,  945,  944,  957,  953,  950,    0,  937,
520       939,  950,  936,  950,    0,  941,  468, 1255,  905,  900,
521       899,  911,  908,  909,  894,  908,  907,  895,  904,  903,
522         0,  902,  901,  886,  892,  898,  893,  889,  879,  886,
523       893,    0,    0,    0,  881,  895,  890,  889,  881,  422,
524       887,  882,  886,  880,  883,  868,    0,  921,  879,  858,
525
526       874,  866,  878,  861,  872,  873,    0,  872,  856,    0,
527       870,  873,  859,  862,    0,  429,  852,  850,  844,  850,
528       858,  851,  864,  849,    0,  855,  842,  849,  857,    0,
529       847,  853,  856,  836,  854,  417,  853,    0,  841,  830,
530       831,  835,  844,  828,  842,  846,  842,  824,  829,  821,
531       837,  832,  821,  824,  836,  820,    0,  817,  822,  824,
532       426,  823,    0, 1255,  876,  463,  859,  466,  475,  476,
533         0,  851,    0,  849,  853,  844,  837,  832,    0,  852,
534       843,  831,    0,  837,  831,    0,  847,  840,  845,  840,
535         0,  835,  842,  822,  829,  827,  825,  835,  822,  824,
536
537         0,  820,  826,  818,  823,  825,    0,    0,  795,  783,
538       793,    0,  792,  791,    0,  782,  780,  789,  780,  773,
539         0,  785,  785,  781,  782,  767,  784,  780,  764,  760,
540       440,    0,  776,  776,  774,  760,  763,  770,  770,  749,
541       768,  435,  760,  756,  758,  754,  763,  758,  745,  761,
542       757,  758,  758,  741,  741,  754,  740,  752,    0,  751,
543       739,  753,  746,  734,  735,  749,    0,  731,  743,  727,
544       721,  739,  728,  734,  730,  732,  727,  721,  737,  732,
545         0,  721,    0,  714,  714,  713,  712,  712,  725,  725,
546       443,    0,  723,  722,  717,  720,  705,  711,  708,  712,
547
548         0,  717,  733,  483,  490,    0,  734,  732,  726,  736,
549       735,  734,  727,  723,  739,    0,  724,  712,   81,  122,
550       205,  226,    0,    0,  311,    0,  350,  460,  483,  476,
551         0,  472,  478,  468,  463,    0,    0,  461,  464,    0,
552         0,    0,  457,    0,    0,    0,  456,  458,  467,  447,
553         0,  469,  470,    0,  458,    0,    0,  474,    0,  471,
554       470,  466,  480,  478,  478,  475,  470,  472,  482,  473,
555       470,  488,  479,    0,  483,  489,    0,  473,  475,  493,
556       488,  476,  481,  495,  489,  488,    0,    0,  491,  503,
557       489,    0,  480,  486,  492,  489,    0,  496,  514,  505,
558
559       495,  510,  497,  503,    0,  499,  509,  510,    0,    0,
560       511,  515,    0,  518,  509,  520,  520,  521,  522,  508,
561       528,    0,  563,  564,  557,  545,    0,  560,  551,  552,
562       553,  543,  553,  559,    0,  562,    0,  565,  554,  571,
563       545,  558,    0,    0,  557,    0,    0,  536,    0,    0,
564       544,  545,  546,  548,  548,    0,    0,  539,  535,    0,
565       544,  537,  540,    0,  554,  554,  547,  543,    0,  552,
566       546,  554,  566,  553,    0,  551,  565,  551,  568,  568,
567         0,    0,    0,    0,  565,  559,  561,  572,  566,  574,
568       555,  576, 1255,  577,    0,    0,  579,    0,  583,  570,
569
570       579,  575,  563,    0,    0,    0,  585,  586,  587,  587,
571       581,  606,    0,  618,  619,    0,    0,    0,    0,    0,
572       601,  627,  606,  615,  611,    0,  602,    0,  599,  600,
573       591,    0,    0,  591,    0,  595,    0,  604,  589,  602,
574       593,  611,  594,  605,  610,  598,  603,  613,  601,    0,
575         0,  608,  614,  606,  605,  620,    0,  621,    0,    0,
576       622,    0,  611,  614,  621,  618,    0,    0,    0,    0,
577       627,    0,    0,  657,    0,  658,  662,  664,  648,  662,
578       650,    0,    0,  619,  634,    0,    0,    0,  621,    0,
579       630,    0,  641,    0,    0,    0,    0,    0,    0,  630,
580
581       640,  626,    0,    0,    0,  628,    0,  628,    0,    0,
582         0,    0,  667,  668,  663,  664,  678,    0,    0,    0,
583         0,  642,  650,  652,    0,    0,  652,  683,  677,  681,
584       673,  685,  658,  660,    0,  661,    0,    0,  692,  696,
585       689,  650,    0,    0,  685,  692,  687,    0,  685,  690,
586       691,  687,    0,    0,    0, 1255,  724,  726,  732,  735,
587       741,  746,  751
588     } ;
589
590 static yyconst flex_int16_t yy_def[1064] =
591     {   0,
592      1056,    1,    1,    3, 1056, 1056, 1056, 1056, 1056, 1056,
593      1057, 1058, 1059, 1056, 1060, 1060, 1056, 1056, 1056, 1060,
594      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
595      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1056, 1060, 1060,
596      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
597      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
598      1056, 1061, 1060, 1056, 1056, 1062, 1062, 1062, 1060,   69,
599        69,   69,   69, 1060,   69,   69,   69,   69,   69,   69,
600        69,   69, 1062, 1061, 1056, 1056, 1056, 1057, 1056, 1058,
601      1056, 1063, 1056, 1060, 1060, 1056, 1060, 1060, 1056, 1056,
602
603      1056, 1056, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
604      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
605      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
606      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
607      1060, 1060, 1060, 1056, 1056, 1060, 1060, 1060, 1060, 1060,
608      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
609      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
610      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
611      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
612      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
613
614      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
615      1060, 1060, 1060, 1060, 1060, 1056, 1061, 1061, 1056, 1060,
616      1056, 1056, 1056,   83,   83,   83,   69,   69,   69,   69,
617        69, 1060,   69,   69,   69,   69,   69,   69,   69,   69,
618        83,   84, 1056, 1061,   84, 1056, 1056, 1056, 1060, 1060,
619      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
620      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
621      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
622      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
623      1060, 1060, 1060, 1060, 1060, 1056, 1060, 1060, 1060, 1060,
624
625      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
626      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
627      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
628      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
629      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
630      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
631      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
632      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
633      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
634      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
635
636      1060, 1060, 1060,   69,   69, 1060,   69,   69,   69,   69,
637      1056, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
638      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
639      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
640      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
641      1060, 1060, 1060, 1060, 1060, 1060, 1056, 1056, 1060, 1060,
642      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
643      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
644      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
645      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
646
647      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
648      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
649      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
650      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
651      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
652      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
653      1060, 1060, 1060, 1056, 1056,   69, 1060,   69,   69,   69,
654      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
655      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
656      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
657
658      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
659      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
660      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
661      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
662      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
663      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
664      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
665      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
666      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
667      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
668
669      1060, 1060, 1060,   69,   69, 1060, 1060, 1060, 1060, 1060,
670      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
671      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
672      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
673      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
674      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
675      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
676      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
677      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
678      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
679
680      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
681      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
682      1060, 1060,   69,   69, 1060, 1060, 1060, 1060, 1060, 1060,
683      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
684      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
685      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
686      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
687      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
688      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
689      1060, 1060, 1056, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
690
691      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
692      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
693      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
694      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
695      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
696      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
697      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
698      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
699      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
700      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
701
702      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
703      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
704      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
705      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
706      1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060, 1060,
707      1060, 1060, 1060, 1060, 1060,    0, 1056, 1056, 1056, 1056,
708      1056, 1056, 1056
709     } ;
710
711 static yyconst flex_uint16_t yy_nxt[1330] =
712     {   0,
713         6,    7,    8,    9,    7,   10,   11,    6,   12,    6,
714        13,   14,   15,    6,   16,   17,   18,   19,   20,   21,
715        22,   23,   24,   25,   26,   27,   28,   27,   27,   29,
716        30,   31,   32,   33,   27,   34,   35,   36,   27,   27,
717        37,   27,   27,   27,   38,    6,    6,   27,   39,   40,
718        41,   42,   43,   44,   45,   46,   47,   48,   27,   49,
719        50,   51,   52,   53,   54,   55,   56,   57,   58,   59,
720        60,   27,   27,   27,   61,  105,   85,   61,   61,   85,
721        62,   83,   99,  100,   84,  107,  119,   96,  110,  106,
722       111,  356,   97,  113,  120,  108,  114,  121,  109,  357,
723
724       112,  122,  115,   63,   64,   65,   66,   63,  144,   67,
725       836,  123,  128,   68,   69,   67,   70,  212,  145,  213,
726        71,   72,   73,  116,   74,   75,  129,   76,   77,   98,
727        76,   78,  175,  117,  347,   79,  118,  124,   80,   81,
728       132,  125,   82,  140,  133,  126,  176,   67,  135,  136,
729       348,  127,  163,  141,  134,  164,  142,  837,  165,  152,
730       137,  138,  153,  139,  146,  154,  147,  177,  155,  227,
731       148,  149,  156,   76,  150,  151,  157,  166,  178,  158,
732       159,  227,  179,  160,  230,  170,  161,  181,  167,  171,
733       168,  182,  162,  172,  169,  183,  173,  185,  186,  189,
734
735       192,  184,  104,  190,  194,   96,  187,  144,  195,  227,
736       229,  198,  188,  191,  193,  199,  203,  145,  209,  200,
737       204,  196,  227,  205,  201,  202,  231,  131,  210,  838,
738       206,  211,  207,  216,  220,  208,  216,  227,  125,  217,
739       106,  240,  126,   85,  222,  223,  224,   98,  127, 1056,
740       222,  223, 1056,  222,  223,  227,  227,  110,   85,  232,
741       235,   85,  839,  227,  122,  226,  222,  223,  225,  112,
742       233,  225,  234,  114,  123,  225,  227,  225,  228,  115,
743       120,  251,  227,  227,  227,  252,  331,  227,  292,  227,
744       227,  227,  227,  227,  293,  254,  332,  227,  227,  255,
745
746       227,  227,  236,  237,  227,  263,  140,   96,  264,  225,
747       278,  279,   97,  296,  238,  138,  141,  239,  145,  142,
748       216,  222,  223,  241,  281,  284,  242,  282,  297,  333,
749       342,  298,  374,  334,  285,  227,  243,  244,  245,  299,
750       305,  245,  375,  335,  306,  245,  245,  245,  245,   98,
751       307,  343,  245,  245,  245,  336,  316,  245,  840,  245,
752       245,  337,  245,  245,  338,  339,  340,  245,  317,  318,
753       245,  245,  841,  319,  245,  349,  350,  353,  362,  245,
754       388,  363,  351,  376,  354,  386,  355,  377,  387,  389,
755       364,  365,  383,  394,  384,  366,  403,  367,  401,  402,
756
757       396,  385,  378,  397,  227,  245,  273,  398,  216,  399,
758       227,  216,   85,  395,  217,  224, 1056, 1056,  225,  225,
759       225,   96,  225,  225,  227,  406,  229,  404,  260,  227,
760       226,  270,  405,  407,  227,  227,  227,  227,  227,  457,
761       408,  470,  490,  494,  518,  519,  471,  537,  227,  409,
762       491,  549,  288,  410,  524,  527,  525,  550,  287,  538,
763       528,  495,  227,   98,  564,  565,  566,  227,  227,  227,
764       227,  569,  457,  592,  634,  415,  676,  227,  424,  677,
765       227,  458,  568,  657,  570,  593,  700,  635,  658,  227,
766       227,  754,  842,  701,  765,  704,  811,  227,  571,  812,
767
768       766,  601,  705,  755,  227,  843,  844,  845,  823,  846,
769       847,  848,  849,  824,  458,  850,  851,  852,  853,  854,
770       855,  856,  857,  858,  859,  860,  861,  862,  863,  864,
771       865,  866,  867,  868,  869,  870,  871,  872,  873,  874,
772       875,  876,  877,  878,  879,  880,  881,  882,  883,  884,
773       885,  886,  887,  888,  889,  890,  891,  892,  893,  894,
774       895,  896,  897,  898,  899,  900,  901,  902,  903,  904,
775       905,  906,  907,  908,  909,  910,  911,  227,  227,  912,
776       913,  914,  915,  916,  917,  918,  919,  920,  921,  922,
777       923,  924,  925,  926,  927,  928,  929,  930,  931,  932,
778
779       933,  934,  935,  936,  937,  938,  847,  939,  940,  941,
780       942,  943,  944,  945,  946,  947,  948,  949,  950,  951,
781       952,  953,  954,  955,  956,  957,  958,  959,  960,  961,
782       962,  963,  964,  965,  966,  967,  968,  969,  970,  971,
783       972,  973,  974,  975,  976,  977,  978,  979,  980,  981,
784       982,  983,  984,  985,  986,  987,  988,  989,  990,  991,
785       992,  993,  994,  995,  996,  997,  998,  999, 1000, 1001,
786      1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011,
787      1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021,
788      1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031,
789
790      1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
791      1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051,
792      1052, 1053, 1054, 1055,   88,   88,   88,   88,   88,   88,
793        90,   90,   91,   91,  835,   91,   91,   91,   94,   94,
794        94,  218,  218,  218,  218,  218,  218,  225,  225,  225,
795       225,  247,  247,  834,  247,  247,  247,  833,  832,  831,
796       830,  829,  828,  827,  826,  825,  822,  821,  820,  819,
797       818,  817,  816,  815,  814,  813,  810,  809,  808,  807,
798       806,  805,  804,  803,  802,  801,  800,  799,  798,  797,
799       796,  795,  794,  793,  792,  791,  790,  789,  788,  787,
800
801       786,  785,  784,  783,  782,  781,  780,  779,  778,  777,
802       776,  775,  774,  773,  772,  771,  770,  769,  768,  767,
803       764,  763,  762,  761,  760,  759,  758,  757,  756,  753,
804       752,  751,  750,  749,  748,  747,  746,  745,  744,  743,
805       742,  741,  740,  739,  738,  737,  736,  735,  734,  733,
806       732,  731,  730,  729,  728,  727,  726,  725,  724,  723,
807       722,  721,  720,  719,  718,  717,  716,  715,  714,  713,
808       712,  711,  710,  709,  708,  707,  706,  703,  564,  702,
809       699,  698,  697,  696,  695,  694,  693,  692,  691,  690,
810       689,  688,  687,  686,  685,  684,  683,  682,  681,  680,
811
812       679,  678,  675,  674,  673,  672,  671,  670,  669,  668,
813       667,  666,  665,  664,  663,  662,  661,  660,  659,  656,
814       655,  654,  653,  652,  651,  650,  649,  648,  647,  646,
815       645,  644,  643,  642,  641,  640,  639,  638,  637,  636,
816       633,  632,  631,  630,  629,  628,  627,  626,  625,  624,
817       623,  622,  621,  620,  619,  618,  617,  616,  615,  614,
818       613,  612,  611,  610,  609,  608,  607,  606,  605,  604,
819       603,  602,  601,  600,  599,  598,  597,  596,  595,  594,
820       591,  590,  589,  588,  587,  586,  585,  584,  583,  582,
821       581,  580,  579,  578,  577,  576,  575,  574,  573,  572,
822
823       571,  567,  563,  562,  561,  560,  559,  558,  557,  556,
824       555,  554,  553,  552,  551,  548,  547,  546,  545,  544,
825       543,  542,  541,  540,  539,  536,  535,  534,  533,  532,
826       531,  530,  529,  526,  523,  522,  521,  520,  438,  517,
827       516,  515,  514,  513,  512,  511,  510,  509,  508,  507,
828       506,  505,  504,  503,  502,  501,  500,  499,  498,  497,
829       496,  493,  492,  489,  488,  487,  486,  485,  484,  483,
830       482,  481,  480,  479,  478,  477,  476,  475,  474,  473,
831       472,  469,  468,  467,  466,  465,  464,  463,  462,  461,
832       460,  459,  456,  455,  454,  453,  452,  451,  450,  449,
833
834       448,  447,  446,  445,  444,  443,  442,  441,  440,  439,
835       438,  437,  436,  435,  434,  433,  432,  431,  430,  429,
836       428,  427,  426,  425,  424,  423,  422,  421,  420,  419,
837       418,  417,  416,  415,  414,  413,  412,  249,  411,  411,
838       243,  227,  227,  222,  219,  219,  400,  393,  392,  391,
839       390,  382,  381,  380,  379,  373,  372,  371,  370,  369,
840       368,  361,  360,  359,  358,  352,  346,  345,  344,  341,
841       330,  329,  328,  327,  326,  325,  324,  323,  322,  321,
842       320,  315,  314,  313,  312,  311,  310,  309,  308,  304,
843       303,  302,  301,  300,  295,  294,  291,  290,  289,  288,
844
845       287,  286,  283,  280,  277,  276,  275,  274,  273,  272,
846       271,  270,  269,  268,  267,  266,  265,  262,  261,  260,
847       259,  258,  257,  256,  253,  250,  249,   95,   93,  248,
848       246,   89,  227,  221,  219,  215,  214,  197,  180,  174,
849       143,  131,  130,  104,  103,  102,  101,   95,   93,   92,
850        89,   87,   86, 1056,    5, 1056, 1056, 1056, 1056, 1056,
851      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
852      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
853      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
854      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
855
856      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
857      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
858      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056
859     } ;
860
861 static yyconst flex_int16_t yy_chk[1330] =
862     {   0,
863         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
864         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
865         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
866         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
867         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
868         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
869         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
870         1,    1,    1,    1,    2,   22,    7,    2,    4,    7,
871         2,    4,   17,   17,    4,   23,   28,   16,   24,   22,
872        24,  186,   16,   25,   28,   23,   25,   29,   23,  186,
873
874        24,   29,   25,    2,    3,    3,    3,    4,   38,    3,
875       719,   29,   31,    3,    3,    3,    3,   58,   38,   58,
876         3,    3,    3,   26,    3,    3,   31,    3,    3,   16,
877         3,    3,   46,   26,  182,    3,   26,   30,    3,    3,
878        34,   30,    3,   36,   34,   30,   46,    3,   35,   35,
879       182,   30,   42,   36,   34,   42,   36,  720,   42,   40,
880        35,   35,   40,   35,   39,   40,   39,   47,   40,   71,
881        39,   39,   41,    3,   39,   39,   41,   43,   47,   41,
882        41,   72,   47,   41,   71,   44,   41,   49,   43,   44,
883        43,   49,   41,   44,   43,   49,   44,   50,   50,   51,
884
885        52,   49,   72,   51,   53,   70,   50,  144,   53,   79,
886        70,   55,   50,   51,   52,   55,   56,  144,   57,   55,
887        56,   53,   73,   56,   55,   55,   73,   79,   57,  721,
888        56,   57,   56,   61,   63,   56,   61,   82,   63,   61,
889        73,   82,   63,   66,   66,   66,   66,   70,   63,   67,
890        67,   67,   68,   68,   68,   75,   78,   74,   85,   74,
891        78,   85,  722,   77,   78,   68,   69,   69,   69,   74,
892        75,   69,   77,   75,   78,   69,   69,   69,   69,   75,
893        77,  104,   69,   69,   69,  104,  173,   69,  140,   69,
894        69,   80,   69,   69,  140,  106,  173,   69,   81,  106,
895
896        69,   69,   80,   80,   69,  114,   81,   97,  114,   69,
897       129,  129,   97,  145,   80,   80,   81,   80,  145,   81,
898        83,   83,   83,   83,  131,  133,   83,  131,  146,  174,
899       178,  146,  198,  174,  133,   69,   84,   84,   84,  146,
900       152,   84,  198,  174,  152,   84,   84,   84,   84,   97,
901       152,  178,   84,   84,   84,  175,  161,   84,  725,   84,
902        84,  175,   84,   84,  176,  176,  176,   84,  161,  161,
903        84,   84,  727,  161,   84,  183,  183,  185,  191,   84,
904       206,  191,  183,  199,  185,  205,  185,  199,  205,  206,
905       191,  191,  204,  211,  204,  191,  220,  191,  215,  215,
906
907       212,  204,  199,  212,  230,   84,  220,  212,  216,  212,
908       231,  216,  224,  211,  216,  224,  225,  226,  224,  225,
909       226,  229,  225,  226,  235,  232,  229,  230,  232,  233,
910       226,  235,  231,  233,  236,  237,  238,  239,  240,  296,
911       238,  310,  330,  333,  359,  359,  310,  376,  409,  239,
912       330,  387,  237,  240,  365,  367,  365,  387,  236,  376,
913       367,  333,  404,  229,  403,  403,  404,  405,  407,  410,
914       408,  409,  457,  440,  490,  405,  536,  566,  407,  536,
915       568,  296,  408,  516,  410,  440,  561,  490,  516,  569,
916       570,  631,  728,  561,  642,  569,  691,  704,  566,  691,
917
918       642,  568,  570,  631,  705,  729,  730,  732,  704,  733,
919       734,  735,  738,  705,  457,  739,  743,  747,  748,  749,
920       750,  752,  753,  755,  758,  760,  761,  762,  763,  764,
921       765,  766,  767,  768,  769,  770,  771,  772,  773,  775,
922       776,  778,  779,  780,  781,  782,  783,  784,  785,  786,
923       789,  790,  791,  793,  794,  795,  796,  798,  799,  800,
924       801,  802,  803,  804,  806,  807,  808,  811,  812,  814,
925       815,  816,  817,  818,  819,  820,  821,  823,  824,  825,
926       826,  828,  829,  830,  831,  832,  833,  834,  836,  838,
927       839,  840,  841,  842,  845,  848,  851,  852,  853,  854,
928
929       855,  858,  859,  861,  862,  863,  824,  865,  866,  867,
930       868,  870,  871,  872,  873,  874,  876,  877,  878,  879,
931       880,  885,  886,  887,  888,  889,  890,  891,  892,  894,
932       897,  899,  900,  901,  902,  903,  907,  908,  909,  910,
933       911,  912,  914,  915,  921,  922,  923,  924,  925,  927,
934       929,  930,  931,  934,  936,  938,  939,  940,  941,  942,
935       943,  944,  945,  946,  947,  948,  949,  952,  953,  954,
936       955,  956,  958,  961,  963,  964,  965,  966,  971,  974,
937       976,  977,  978,  979,  980,  981,  984,  985,  989,  991,
938       993, 1000, 1001, 1002, 1006, 1008, 1013, 1014, 1015, 1016,
939
940      1017, 1022, 1023, 1024, 1027, 1028, 1029, 1030, 1031, 1032,
941      1033, 1034, 1036, 1039, 1040, 1041, 1042, 1045, 1046, 1047,
942      1049, 1050, 1051, 1052, 1057, 1057, 1057, 1057, 1057, 1057,
943      1058, 1058, 1059, 1059,  718, 1059, 1059, 1059, 1060, 1060,
944      1060, 1061, 1061, 1061, 1061, 1061, 1061, 1062, 1062, 1062,
945      1062, 1063, 1063,  717, 1063, 1063, 1063,  715,  714,  713,
946       712,  711,  710,  709,  708,  707,  703,  702,  700,  699,
947       698,  697,  696,  695,  694,  693,  690,  689,  688,  687,
948       686,  685,  684,  682,  680,  679,  678,  677,  676,  675,
949       674,  673,  672,  671,  670,  669,  668,  666,  665,  664,
950
951       663,  662,  661,  660,  658,  657,  656,  655,  654,  653,
952       652,  651,  650,  649,  648,  647,  646,  645,  644,  643,
953       641,  640,  639,  638,  637,  636,  635,  634,  633,  630,
954       629,  628,  627,  626,  625,  624,  623,  622,  620,  619,
955       618,  617,  616,  614,  613,  611,  610,  609,  606,  605,
956       604,  603,  602,  600,  599,  598,  597,  596,  595,  594,
957       593,  592,  590,  589,  588,  587,  585,  584,  582,  581,
958       580,  578,  577,  576,  575,  574,  572,  567,  565,  562,
959       560,  559,  558,  556,  555,  554,  553,  552,  551,  550,
960       549,  548,  547,  546,  545,  544,  543,  542,  541,  540,
961
962       539,  537,  535,  534,  533,  532,  531,  529,  528,  527,
963       526,  524,  523,  522,  521,  520,  519,  518,  517,  514,
964       513,  512,  511,  509,  508,  506,  505,  504,  503,  502,
965       501,  500,  499,  498,  496,  495,  494,  493,  492,  491,
966       489,  488,  487,  486,  485,  481,  480,  479,  478,  477,
967       476,  475,  474,  473,  472,  470,  469,  468,  467,  466,
968       465,  464,  463,  462,  461,  460,  459,  456,  454,  453,
969       452,  451,  450,  448,  447,  446,  445,  444,  443,  441,
970       439,  437,  436,  435,  434,  432,  431,  430,  429,  427,
971       426,  425,  424,  422,  420,  418,  417,  416,  414,  413,
972
973       412,  406,  401,  400,  399,  398,  397,  396,  395,  394,
974       392,  391,  390,  389,  388,  386,  385,  384,  383,  382,
975       381,  380,  379,  378,  377,  375,  374,  373,  372,  371,
976       370,  369,  368,  366,  364,  363,  362,  361,  360,  358,
977       357,  356,  355,  354,  353,  352,  350,  349,  348,  347,
978       345,  344,  343,  342,  341,  339,  338,  337,  336,  335,
979       334,  332,  331,  329,  328,  327,  326,  325,  324,  323,
980       321,  320,  319,  318,  317,  316,  315,  314,  313,  312,
981       311,  309,  308,  307,  306,  305,  304,  303,  302,  301,
982       299,  297,  295,  294,  293,  292,  291,  290,  289,  288,
983
984       287,  286,  285,  284,  283,  282,  281,  280,  279,  278,
985       277,  276,  275,  274,  273,  272,  271,  270,  269,  268,
986       267,  266,  265,  264,  262,  261,  260,  259,  258,  257,
987       256,  255,  254,  253,  252,  251,  250,  249,  248,  247,
988       244,  234,  227,  223,  218,  217,  214,  210,  209,  208,
989       207,  203,  202,  201,  200,  197,  196,  195,  194,  193,
990       192,  190,  189,  188,  187,  184,  181,  180,  179,  177,
991       172,  171,  170,  169,  168,  167,  166,  165,  164,  163,
992       162,  160,  159,  158,  157,  156,  155,  154,  153,  151,
993       150,  149,  148,  147,  143,  142,  139,  138,  137,  136,
994
995       135,  134,  132,  130,  128,  127,  126,  125,  124,  123,
996       122,  121,  120,  118,  117,  116,  115,  113,  112,  111,
997       110,  109,  108,  107,  105,  103,   98,   95,   93,   92,
998        91,   88,   76,   65,   62,   60,   59,   54,   48,   45,
999        37,   33,   32,   21,   20,   19,   18,   15,   14,   13,
1000        11,   10,    9,    5, 1056, 1056, 1056, 1056, 1056, 1056,
1001      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1002      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1003      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1004      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1005
1006      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1007      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056,
1008      1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056, 1056
1009     } ;
1010
1011 static yy_state_type yy_last_accepting_state;
1012 static char *yy_last_accepting_cpos;
1013
1014 extern int yy_flex_debug;
1015 int yy_flex_debug = 0;
1016
1017 /* The intent behind this definition is that it'll catch
1018  * any uses of REJECT which flex missed.
1019  */
1020 #define REJECT reject_used_but_not_detected
1021 #define yymore() yymore_used_but_not_detected
1022 #define YY_MORE_ADJ 0
1023 #define YY_RESTORE_YY_MORE_OFFSET
1024 char *yytext;
1025 /* NetHack 3.6  lev_comp.l      $NHDT-Date: 1449385344 2015/12/06 07:02:24 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.24 $ */
1026 /*      Copyright (c) 1989 by Jean-Christophe Collet */
1027 /* NetHack may be freely redistributed.  See license for details. */
1028
1029 #define LEV_LEX_C
1030
1031 #include "hack.h"
1032 #include "lev_comp.h"
1033 #include "sp_lev.h"
1034
1035 /* Most of these don't exist in flex, yywrap is macro and
1036  * yyunput is properly declared in flex.skel.
1037  */
1038 #if !defined(FLEX_SCANNER) && !defined(FLEXHACK_SCANNER)
1039 int FDECL(yyback, (int *,int));
1040 int NDECL(yylook);
1041 int NDECL(yyinput);
1042 int NDECL(yywrap);
1043 int NDECL(yylex);
1044         /* Traditional lexes let yyunput() and yyoutput() default to int;
1045          * newer ones may declare them as void since they don't return
1046          * values.  For even more fun, the lex supplied as part of the
1047          * newer unbundled compiler for SunOS 4.x adds the void declarations
1048          * (under __STDC__ or _cplusplus ifdefs -- otherwise they remain
1049          * int) while the bundled lex and the one with the older unbundled
1050          * compiler do not.  To detect this, we need help from outside --
1051          * sys/unix/Makefile.utl.
1052          *
1053          * Digital UNIX is difficult and still has int in spite of all
1054          * other signs.
1055          */
1056 # if defined(NeXT) || defined(SVR4) || defined(_AIX32)
1057 #  define VOIDYYPUT
1058 # endif
1059 # if !defined(VOIDYYPUT) && defined(POSIX_TYPES)
1060 #  if !defined(BOS) && !defined(HISX) && !defined(_M_UNIX) && !defined(VMS)
1061 #   define VOIDYYPUT
1062 #  endif
1063 # endif
1064 # if !defined(VOIDYYPUT) && defined(WEIRD_LEX)
1065 #  if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX > 1)
1066 #   define VOIDYYPUT
1067 #  endif
1068 # endif
1069 # if defined(VOIDYYPUT) && defined(__osf__)
1070 #  undef VOIDYYPUT
1071 # endif
1072 # ifdef VOIDYYPUT
1073 void FDECL(yyunput, (int));
1074 void FDECL(yyoutput, (int));
1075 # else
1076 int FDECL(yyunput, (int));
1077 int FDECL(yyoutput, (int));
1078 # endif
1079
1080 #else   /* !FLEX_SCANNER && !FLEXHACK_SCANNER */
1081 /* most recent flex allows suppressing yyunput() altogether when not needed */
1082 #define YY_NO_UNPUT
1083 #endif
1084
1085 #if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER)
1086 /* older flex wants this */
1087 #define YY_MALLOC_DECL  genericptr_t FDECL(malloc, (size_t)); \
1088                         genericptr_t FDECL(realloc, (genericptr_t, size_t));
1089 /* newer flex assumes <stdlib.h> so needs this in case it's been suppressed */
1090 YY_MALLOC_DECL
1091 #endif
1092
1093 void FDECL(init_yyin, (FILE *));
1094 void FDECL(init_yyout, (FILE *));
1095
1096 long NDECL(handle_varstring_check);
1097 long FDECL(corefunc_str_check, (char *, long));
1098
1099 extern void VDECL(lc_error, (const char *, ...));
1100 extern struct lc_vardefs *FDECL(vardef_defined,(struct lc_vardefs *,char *, int));
1101
1102 extern struct lc_vardefs *variable_definitions;
1103
1104 extern long FDECL(method_defined, (char *, long, long *));
1105
1106 void FDECL(savetoken, (char *));
1107 void NDECL(newline);
1108 void FDECL(advancepos, (char *));
1109
1110 /*
1111  * This doesn't always get put in lev_comp.h
1112  * (esp. when using older versions of bison).
1113  */
1114 extern YYSTYPE yylval;
1115
1116 int nh_line_number = 1;
1117 int token_start_pos = 0;
1118 char curr_token[512];
1119 static char map[4096];
1120 static int map_cnt = 0;
1121
1122 FILE *orig_yyin = NULL;
1123
1124 #define ST_RET(x) do { savetoken(yytext); return x; } while (0);
1125 #define ST_RETF(y, x) do { savetoken(yytext); y; return x; } while (0);
1126
1127 #define INITIAL 0
1128 #define MAPC 1
1129
1130 #ifndef YY_EXTRA_TYPE
1131 #define YY_EXTRA_TYPE void *
1132 #endif
1133
1134 /* Accessor methods to globals.
1135    These are made visible to non-reentrant scanners for convenience. */
1136
1137 int yylex_destroy FDECL(, (void ));
1138 int yyget_debug FDECL(, (void ));
1139 void yyset_debug FDECL(, (int debug_flag  ));
1140 YY_EXTRA_TYPE yyget_extra FDECL(, (void ));
1141 void yyset_extra FDECL(, (YY_EXTRA_TYPE user_defined  ));
1142 FILE *yyget_in FDECL(, (void ));
1143 void yyset_in  FDECL(, (FILE * _in_str  ));
1144 FILE *yyget_out FDECL(, (void ));
1145 void yyset_out  FDECL(, (FILE * _out_str  ));
1146 yy_size_t yyget_leng FDECL(, (void ));
1147 char *yyget_text FDECL(, (void ));
1148 int yyget_lineno FDECL(, (void ));
1149 void yyset_lineno FDECL(, (int _line_number  ));
1150
1151 /* Macros after this point can all be overridden by user definitions in
1152  * section 1.
1153  */
1154
1155 #ifndef YY_SKIP_YYWRAP
1156 extern int yywrap FDECL(, (void ));
1157 #endif
1158
1159 #ifndef YY_NO_UNPUT
1160
1161 static void yyunput FDECL(, (int c,char *buf_ptr  ));
1162 #endif
1163
1164 #ifndef yytext_ptr
1165 static void yy_flex_strncpy FDECL(, (char *,yyconst char *,int ));
1166 #endif
1167
1168 #ifdef YY_NEED_STRLEN
1169 static int yy_flex_strlen FDECL(, (yyconst char * ));
1170 #endif
1171
1172 #ifndef YY_NO_INPUT
1173
1174 static int input FDECL(, (void ));
1175
1176 #endif
1177
1178 /* Amount of stuff to slurp up with each read. */
1179 #ifndef YY_READ_BUF_SIZE
1180 #ifdef __ia64__
1181 /* On IA-64, the buffer size is 16k, not 8k */
1182 #define YY_READ_BUF_SIZE 16384
1183 #else
1184 #define YY_READ_BUF_SIZE 8192
1185 #endif /* __ia64__ */
1186 #endif
1187
1188 /* Copy whatever the last rule matched to the standard output. */
1189 #ifndef ECHO
1190 /* This used to be an fputs(), but since the string might contain NUL's,
1191  * we now use fwrite().
1192  */
1193 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
1194 #endif
1195
1196 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
1197  * is returned in "result".
1198  */
1199 #ifndef YY_INPUT
1200 #define YY_INPUT(buf,result,max_size) \
1201         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1202                 { \
1203                 int c = '*'; \
1204                 size_t n; \
1205                 for ( n = 0; n < max_size && \
1206                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1207                         buf[n] = (char) c; \
1208                 if ( c == '\n' ) \
1209                         buf[n++] = (char) c; \
1210                 if ( c == EOF && ferror( yyin ) ) \
1211                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
1212                 result = n; \
1213                 } \
1214         else \
1215                 { \
1216                 errno=0; \
1217                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
1218                         { \
1219                         if( errno != EINTR) \
1220                                 { \
1221                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1222                                 break; \
1223                                 } \
1224                         errno=0; \
1225                         clearerr(yyin); \
1226                         } \
1227                 }\
1228
1229 #endif
1230
1231 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1232  * we don't want an extra ';' after the "return" because that will cause
1233  * some compilers to complain about unreachable statements.
1234  */
1235 #ifndef yyterminate
1236 #define yyterminate() return YY_NULL
1237 #endif
1238
1239 /* Number of entries by which start-condition stack grows. */
1240 #ifndef YY_START_STACK_INCR
1241 #define YY_START_STACK_INCR 25
1242 #endif
1243
1244 /* Report a fatal error. */
1245 #ifndef YY_FATAL_ERROR
1246 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1247 #endif
1248
1249 /* Default declaration of generated scanner - a define so the user can
1250  * easily add parameters.
1251  */
1252 #ifndef YY_DECL
1253 #define YY_DECL_IS_OURS 1
1254
1255 extern int yylex FDECL(, (void));
1256
1257 #define YY_DECL int yylex ()
1258 #endif /* !YY_DECL */
1259
1260 /* Code executed at the beginning of each rule, after yytext and yyleng
1261  * have been set up.
1262  */
1263 #ifndef YY_USER_ACTION
1264 #define YY_USER_ACTION
1265 #endif
1266
1267 /* Code executed at the end of each rule. */
1268 #ifndef YY_BREAK
1269 #define YY_BREAK /*LINTED*/break;
1270 #endif
1271
1272 #define YY_RULE_SETUP \
1273         if ( yyleng > 0 ) \
1274                 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1275                                 (yytext[yyleng - 1] == '\n'); \
1276         YY_USER_ACTION
1277
1278 /** The main scanner function which does all the work.
1279  */
1280 YY_DECL
1281 {
1282         yy_state_type yy_current_state;
1283         char *yy_cp, *yy_bp;
1284         int yy_act;
1285
1286         if ( !(yy_init) )
1287                 {
1288                 (yy_init) = 1;
1289
1290 #ifdef YY_USER_INIT
1291                 YY_USER_INIT;
1292 #endif
1293
1294                 if ( ! (yy_start) )
1295                         (yy_start) = 1; /* first start state */
1296
1297                 if ( ! yyin )
1298                         yyin = stdin;
1299
1300                 if ( ! yyout )
1301                         yyout = stdout;
1302
1303                 if ( ! YY_CURRENT_BUFFER ) {
1304                         yyensure_buffer_stack ();
1305                         YY_CURRENT_BUFFER_LVALUE =
1306                                 yy_create_buffer(yyin,YY_BUF_SIZE );
1307                 }
1308
1309                 yy_load_buffer_state( );
1310                 }
1311
1312         {
1313
1314         while ( /*CONSTCOND*/1 )    /* loops until end-of-file is reached */
1315                 {
1316                 yy_cp = (yy_c_buf_p);
1317
1318                 /* Support of yytext. */
1319                 *yy_cp = (yy_hold_char);
1320
1321                 /* yy_bp points to the position in yy_ch_buf of the start of
1322                  * the current run.
1323                  */
1324                 yy_bp = yy_cp;
1325
1326                 yy_current_state = (yy_start);
1327                 yy_current_state += YY_AT_BOL();
1328 yy_match:
1329                 do
1330                         {
1331                         YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1332                         if ( yy_accept[yy_current_state] )
1333                                 {
1334                                 (yy_last_accepting_state) = yy_current_state;
1335                                 (yy_last_accepting_cpos) = yy_cp;
1336                                 }
1337                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1338                                 {
1339                                 yy_current_state = (int) yy_def[yy_current_state];
1340                                 if ( yy_current_state >= 1057 )
1341                                         yy_c = yy_meta[(unsigned int) yy_c];
1342                                 }
1343                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1344                         ++yy_cp;
1345                         }
1346                 while ( yy_base[yy_current_state] != 1255 );
1347
1348 yy_find_action:
1349                 yy_act = yy_accept[yy_current_state];
1350                 if ( yy_act == 0 )
1351                         { /* have to back up */
1352                         yy_cp = (yy_last_accepting_cpos);
1353                         yy_current_state = (yy_last_accepting_state);
1354                         yy_act = yy_accept[yy_current_state];
1355                         }
1356
1357                 YY_DO_BEFORE_ACTION;
1358
1359 do_action:      /* This label is used only to access EOF actions. */
1360
1361                 switch ( yy_act )
1362         { /* beginning of action switch */
1363                         case 0: /* must back up */
1364                         /* undo the effects of YY_DO_BEFORE_ACTION */
1365                         *yy_cp = (yy_hold_char);
1366                         yy_cp = (yy_last_accepting_cpos);
1367                         yy_current_state = (yy_last_accepting_state);
1368                         goto yy_find_action;
1369
1370 case 1:
1371 YY_RULE_SETUP
1372 {
1373                   savetoken(yytext);
1374                   BEGIN(INITIAL);
1375                   yylval.map = (char *) alloc(map_cnt + 1);
1376                   (void) strncpy(yylval.map, map, map_cnt);
1377                   yylval.map[map_cnt] = 0;
1378                   map_cnt = 0;
1379                   return MAP_ID;
1380                 }
1381         YY_BREAK
1382 case 2:
1383 /* rule 2 can match eol */
1384 YY_RULE_SETUP
1385 {
1386                   int len = yyleng;
1387                   savetoken(yytext);
1388                   /* convert \r\n to \n */
1389                   if (len >= 2 && yytext[len - 2] == '\r')
1390                       len -= 1;
1391                   (void) strncpy(map + map_cnt, yytext, len);
1392                   map_cnt += len;
1393                   map[map_cnt - 1] = '\n';
1394                   map[map_cnt] = '\0';
1395                   newline();
1396                 }
1397         YY_BREAK
1398 case 3:
1399 /* rule 3 can match eol */
1400 YY_RULE_SETUP
1401 { savetoken(yytext); newline(); }
1402         YY_BREAK
1403 case 4:
1404 YY_RULE_SETUP
1405 ST_RET(MESSAGE_ID);
1406         YY_BREAK
1407 case 5:
1408 YY_RULE_SETUP
1409 ST_RET(NOMAP_ID);
1410         YY_BREAK
1411 case 6:
1412 YY_RULE_SETUP
1413 ST_RET(MAZE_ID);
1414         YY_BREAK
1415 case 7:
1416 YY_RULE_SETUP
1417 ST_RET(LEVEL_ID);
1418         YY_BREAK
1419 case 8:
1420 YY_RULE_SETUP
1421 ST_RET(LEV_INIT_ID);
1422         YY_BREAK
1423 case 9:
1424 YY_RULE_SETUP
1425 ST_RET(MAZE_GRID_ID);
1426         YY_BREAK
1427 case 10:
1428 YY_RULE_SETUP
1429 ST_RET(SOLID_FILL_ID);
1430         YY_BREAK
1431 case 11:
1432 YY_RULE_SETUP
1433 ST_RET(MINES_ID);
1434         YY_BREAK
1435 case 12:
1436 YY_RULE_SETUP
1437 ST_RET(ROGUELEV_ID);
1438         YY_BREAK
1439 case 13:
1440 YY_RULE_SETUP
1441 ST_RET(FLAGS_ID);
1442         YY_BREAK
1443 case 14:
1444 YY_RULE_SETUP
1445 ST_RET(GEOMETRY_ID);
1446         YY_BREAK
1447 case 15:
1448 /* rule 15 can match eol */
1449 YY_RULE_SETUP
1450 { savetoken(yytext); BEGIN(MAPC); newline(); }
1451         YY_BREAK
1452 case 16:
1453 YY_RULE_SETUP
1454 ST_RET(object_ID);
1455         YY_BREAK
1456 case 17:
1457 YY_RULE_SETUP
1458 ST_RET(OBJECT_ID);
1459         YY_BREAK
1460 case 18:
1461 YY_RULE_SETUP
1462 ST_RET(COBJECT_ID);
1463         YY_BREAK
1464 case 19:
1465 YY_RULE_SETUP
1466 ST_RET(MONSTER_ID);
1467         YY_BREAK
1468 case 20:
1469 YY_RULE_SETUP
1470 ST_RET(monster_ID);
1471         YY_BREAK
1472 case 21:
1473 YY_RULE_SETUP
1474 ST_RET(TRAP_ID);
1475         YY_BREAK
1476 case 22:
1477 YY_RULE_SETUP
1478 ST_RET(DOOR_ID);
1479         YY_BREAK
1480 case 23:
1481 YY_RULE_SETUP
1482 ST_RET(ROOMDOOR_ID);
1483         YY_BREAK
1484 case 24:
1485 YY_RULE_SETUP
1486 ST_RET(DRAWBRIDGE_ID);
1487         YY_BREAK
1488 case 25:
1489 YY_RULE_SETUP
1490 ST_RET(MAZEWALK_ID);
1491         YY_BREAK
1492 case 26:
1493 YY_RULE_SETUP
1494 ST_RET(WALLIFY_ID);
1495         YY_BREAK
1496 case 27:
1497 YY_RULE_SETUP
1498 ST_RET(REGION_ID);
1499         YY_BREAK
1500 case 28:
1501 YY_RULE_SETUP
1502 ST_RET(ALTAR_ID);
1503         YY_BREAK
1504 case 29:
1505 YY_RULE_SETUP
1506 ST_RET(LADDER_ID);
1507         YY_BREAK
1508 case 30:
1509 YY_RULE_SETUP
1510 ST_RET(STAIR_ID);
1511         YY_BREAK
1512 case 31:
1513 YY_RULE_SETUP
1514 ST_RET(PORTAL_ID);
1515         YY_BREAK
1516 case 32:
1517 YY_RULE_SETUP
1518 ST_RET(TELEPRT_ID);
1519         YY_BREAK
1520 case 33:
1521 YY_RULE_SETUP
1522 ST_RET(BRANCH_ID);
1523         YY_BREAK
1524 case 34:
1525 YY_RULE_SETUP
1526 ST_RET(FOUNTAIN_ID);
1527         YY_BREAK
1528 case 35:
1529 YY_RULE_SETUP
1530 ST_RET(SINK_ID);
1531         YY_BREAK
1532 case 36:
1533 YY_RULE_SETUP
1534 ST_RET(POOL_ID);
1535         YY_BREAK
1536 case 37:
1537 YY_RULE_SETUP
1538 ST_RET(NON_DIGGABLE_ID);
1539         YY_BREAK
1540 case 38:
1541 YY_RULE_SETUP
1542 ST_RET(NON_PASSWALL_ID);
1543         YY_BREAK
1544 case 39:
1545 YY_RULE_SETUP
1546 ST_RET(IF_ID);
1547         YY_BREAK
1548 case 40:
1549 YY_RULE_SETUP
1550 ST_RET(ELSE_ID);
1551         YY_BREAK
1552 case 41:
1553 YY_RULE_SETUP
1554 ST_RET(EXIT_ID);
1555         YY_BREAK
1556 case 42:
1557 YY_RULE_SETUP
1558 ST_RET(ROOM_ID);
1559         YY_BREAK
1560 case 43:
1561 YY_RULE_SETUP
1562 ST_RET(SUBROOM_ID);
1563         YY_BREAK
1564 case 44:
1565 YY_RULE_SETUP
1566 ST_RET(RAND_CORRIDOR_ID);
1567         YY_BREAK
1568 case 45:
1569 YY_RULE_SETUP
1570 ST_RET(CORRIDOR_ID);
1571         YY_BREAK
1572 case 46:
1573 YY_RULE_SETUP
1574 ST_RET(TERRAIN_ID);
1575         YY_BREAK
1576 case 47:
1577 YY_RULE_SETUP
1578 ST_RET(terrain_ID);
1579         YY_BREAK
1580 case 48:
1581 YY_RULE_SETUP
1582 ST_RET(REPLACE_TERRAIN_ID);
1583         YY_BREAK
1584 case 49:
1585 YY_RULE_SETUP
1586 ST_RET(GOLD_ID);
1587         YY_BREAK
1588 case 50:
1589 YY_RULE_SETUP
1590 ST_RET(GRAVE_ID);
1591         YY_BREAK
1592 case 51:
1593 YY_RULE_SETUP
1594 ST_RET(ENGRAVING_ID);
1595         YY_BREAK
1596 case 52:
1597 YY_RULE_SETUP
1598 ST_RET(MINERALIZE_ID);
1599         YY_BREAK
1600 case 53:
1601 YY_RULE_SETUP
1602 ST_RET(NAME_ID);
1603         YY_BREAK
1604 case 54:
1605 YY_RULE_SETUP
1606 ST_RET(FOR_ID);
1607         YY_BREAK
1608 case 55:
1609 YY_RULE_SETUP
1610 ST_RET(TO_ID);
1611         YY_BREAK
1612 case 56:
1613 YY_RULE_SETUP
1614 ST_RET(LOOP_ID);
1615         YY_BREAK
1616 case 57:
1617 YY_RULE_SETUP
1618 ST_RET(SWITCH_ID);
1619         YY_BREAK
1620 case 58:
1621 YY_RULE_SETUP
1622 ST_RET(CASE_ID);
1623         YY_BREAK
1624 case 59:
1625 YY_RULE_SETUP
1626 ST_RET(BREAK_ID);
1627         YY_BREAK
1628 case 60:
1629 YY_RULE_SETUP
1630 ST_RET(DEFAULT_ID);
1631         YY_BREAK
1632 case 61:
1633 YY_RULE_SETUP
1634 ST_RET(FUNCTION_ID);
1635         YY_BREAK
1636 case 62:
1637 YY_RULE_SETUP
1638 ST_RET(SHUFFLE_ID);
1639         YY_BREAK
1640 case 63:
1641 YY_RULE_SETUP
1642 ST_RET(MONTYPE_ID);
1643         YY_BREAK
1644 case 64:
1645 YY_RULE_SETUP
1646 ST_RET(selection_ID);
1647         YY_BREAK
1648 case 65:
1649 YY_RULE_SETUP
1650 ST_RET(rect_ID);
1651         YY_BREAK
1652 case 66:
1653 YY_RULE_SETUP
1654 ST_RET(fillrect_ID);
1655         YY_BREAK
1656 case 67:
1657 YY_RULE_SETUP
1658 ST_RET(line_ID);
1659         YY_BREAK
1660 case 68:
1661 YY_RULE_SETUP
1662 ST_RET(randline_ID);
1663         YY_BREAK
1664 case 69:
1665 YY_RULE_SETUP
1666 ST_RET(grow_ID);
1667         YY_BREAK
1668 case 70:
1669 YY_RULE_SETUP
1670 ST_RET(flood_ID);
1671         YY_BREAK
1672 case 71:
1673 YY_RULE_SETUP
1674 ST_RET(rndcoord_ID);
1675         YY_BREAK
1676 case 72:
1677 YY_RULE_SETUP
1678 ST_RET(circle_ID);
1679         YY_BREAK
1680 case 73:
1681 YY_RULE_SETUP
1682 ST_RET(ellipse_ID);
1683         YY_BREAK
1684 case 74:
1685 YY_RULE_SETUP
1686 ST_RET(filter_ID);
1687         YY_BREAK
1688 case 75:
1689 YY_RULE_SETUP
1690 ST_RET(gradient_ID);
1691         YY_BREAK
1692 case 76:
1693 YY_RULE_SETUP
1694 ST_RET(complement_ID);
1695         YY_BREAK
1696 case 77:
1697 YY_RULE_SETUP
1698 { savetoken(yytext); yylval.i=SEL_GRADIENT_RADIAL;  return GRADIENT_TYPE; }
1699         YY_BREAK
1700 case 78:
1701 YY_RULE_SETUP
1702 { savetoken(yytext); yylval.i=SEL_GRADIENT_SQUARE;  return GRADIENT_TYPE; }
1703         YY_BREAK
1704 case 79:
1705 YY_RULE_SETUP
1706 { savetoken(yytext); yylval.i=DRY;  return HUMIDITY_TYPE; }
1707         YY_BREAK
1708 case 80:
1709 YY_RULE_SETUP
1710 { savetoken(yytext); yylval.i=WET;  return HUMIDITY_TYPE; }
1711         YY_BREAK
1712 case 81:
1713 YY_RULE_SETUP
1714 { savetoken(yytext); yylval.i=HOT;  return HUMIDITY_TYPE; }
1715         YY_BREAK
1716 case 82:
1717 YY_RULE_SETUP
1718 { savetoken(yytext); yylval.i=SOLID;  return HUMIDITY_TYPE; }
1719         YY_BREAK
1720 case 83:
1721 YY_RULE_SETUP
1722 { savetoken(yytext); yylval.i=ANY_LOC;  return HUMIDITY_TYPE; }
1723         YY_BREAK
1724 case 84:
1725 YY_RULE_SETUP
1726 ST_RET(LEV);
1727         YY_BREAK
1728 case 85:
1729 YY_RULE_SETUP
1730 ST_RET(QUANTITY_ID);
1731         YY_BREAK
1732 case 86:
1733 YY_RULE_SETUP
1734 ST_RET(BURIED_ID);
1735         YY_BREAK
1736 case 87:
1737 YY_RULE_SETUP
1738 ST_RET(ERODED_ID);
1739         YY_BREAK
1740 case 88:
1741 YY_RULE_SETUP
1742 ST_RET(ERODEPROOF_ID);
1743         YY_BREAK
1744 case 89:
1745 YY_RULE_SETUP
1746 { savetoken(yytext); yylval.i=1; return TRAPPED_STATE; }
1747         YY_BREAK
1748 case 90:
1749 YY_RULE_SETUP
1750 { savetoken(yytext); yylval.i=0; return TRAPPED_STATE; }
1751         YY_BREAK
1752 case 91:
1753 YY_RULE_SETUP
1754 ST_RET(RECHARGED_ID);
1755         YY_BREAK
1756 case 92:
1757 YY_RULE_SETUP
1758 ST_RET(INVIS_ID);
1759         YY_BREAK
1760 case 93:
1761 YY_RULE_SETUP
1762 ST_RET(GREASED_ID);
1763         YY_BREAK
1764 case 94:
1765 YY_RULE_SETUP
1766 ST_RET(FEMALE_ID);
1767         YY_BREAK
1768 case 95:
1769 YY_RULE_SETUP
1770 ST_RET(CANCELLED_ID);
1771         YY_BREAK
1772 case 96:
1773 YY_RULE_SETUP
1774 ST_RET(REVIVED_ID);
1775         YY_BREAK
1776 case 97:
1777 YY_RULE_SETUP
1778 ST_RET(AVENGE_ID);
1779         YY_BREAK
1780 case 98:
1781 YY_RULE_SETUP
1782 ST_RET(FLEEING_ID);
1783         YY_BREAK
1784 case 99:
1785 YY_RULE_SETUP
1786 ST_RET(BLINDED_ID);
1787         YY_BREAK
1788 case 100:
1789 YY_RULE_SETUP
1790 ST_RET(PARALYZED_ID);
1791         YY_BREAK
1792 case 101:
1793 YY_RULE_SETUP
1794 ST_RET(STUNNED_ID);
1795         YY_BREAK
1796 case 102:
1797 YY_RULE_SETUP
1798 ST_RET(CONFUSED_ID);
1799         YY_BREAK
1800 case 103:
1801 YY_RULE_SETUP
1802 ST_RET(SEENTRAPS_ID);
1803         YY_BREAK
1804 case 104:
1805 YY_RULE_SETUP
1806 ST_RET(ALL_ID);
1807         YY_BREAK
1808 case 105:
1809 YY_RULE_SETUP
1810 ST_RETF((yylval.i=1), HORIZ_OR_VERT);
1811         YY_BREAK
1812 case 106:
1813 YY_RULE_SETUP
1814 { savetoken(yytext); yylval.i=2; return HORIZ_OR_VERT; }
1815         YY_BREAK
1816 case 107:
1817 YY_RULE_SETUP
1818 { savetoken(yytext); yylval.i=D_ISOPEN; return DOOR_STATE; }
1819         YY_BREAK
1820 case 108:
1821 YY_RULE_SETUP
1822 { savetoken(yytext); yylval.i=D_CLOSED; return DOOR_STATE; }
1823         YY_BREAK
1824 case 109:
1825 YY_RULE_SETUP
1826 { savetoken(yytext); yylval.i=D_LOCKED; return DOOR_STATE; }
1827         YY_BREAK
1828 case 110:
1829 YY_RULE_SETUP
1830 { savetoken(yytext); yylval.i=D_NODOOR; return DOOR_STATE; }
1831         YY_BREAK
1832 case 111:
1833 YY_RULE_SETUP
1834 { savetoken(yytext); yylval.i=D_BROKEN; return DOOR_STATE; }
1835         YY_BREAK
1836 case 112:
1837 YY_RULE_SETUP
1838 { savetoken(yytext); yylval.i=D_SECRET; return DOOR_STATE; }
1839         YY_BREAK
1840 case 113:
1841 YY_RULE_SETUP
1842 { savetoken(yytext); yylval.i=W_NORTH; return DIRECTION; }
1843         YY_BREAK
1844 case 114:
1845 YY_RULE_SETUP
1846 { savetoken(yytext); yylval.i=W_EAST; return DIRECTION; }
1847         YY_BREAK
1848 case 115:
1849 YY_RULE_SETUP
1850 { savetoken(yytext); yylval.i=W_SOUTH; return DIRECTION; }
1851         YY_BREAK
1852 case 116:
1853 YY_RULE_SETUP
1854 { savetoken(yytext); yylval.i=W_WEST; return DIRECTION; }
1855         YY_BREAK
1856 case 117:
1857 YY_RULE_SETUP
1858 { savetoken(yytext); yylval.i = -1; return RANDOM_TYPE; }
1859         YY_BREAK
1860 case 118:
1861 YY_RULE_SETUP
1862 { savetoken(yytext); yylval.i = -1; return RANDOM_TYPE_BRACKET; }
1863         YY_BREAK
1864 case 119:
1865 YY_RULE_SETUP
1866 { savetoken(yytext); yylval.i = -2; return NONE; }
1867         YY_BREAK
1868 case 120:
1869 YY_RULE_SETUP
1870 ST_RET(A_REGISTER);
1871         YY_BREAK
1872 case 121:
1873 YY_RULE_SETUP
1874 { savetoken(yytext); yylval.i=1; return LEFT_OR_RIGHT; }
1875         YY_BREAK
1876 case 122:
1877 YY_RULE_SETUP
1878 { savetoken(yytext); yylval.i=2; return LEFT_OR_RIGHT; }
1879         YY_BREAK
1880 case 123:
1881 YY_RULE_SETUP
1882 { savetoken(yytext); yylval.i=3; return CENTER; }
1883         YY_BREAK
1884 case 124:
1885 YY_RULE_SETUP
1886 { savetoken(yytext); yylval.i=4; return LEFT_OR_RIGHT; }
1887         YY_BREAK
1888 case 125:
1889 YY_RULE_SETUP
1890 { savetoken(yytext); yylval.i=5; return LEFT_OR_RIGHT; }
1891         YY_BREAK
1892 case 126:
1893 YY_RULE_SETUP
1894 { savetoken(yytext); yylval.i=1; return TOP_OR_BOT; }
1895         YY_BREAK
1896 case 127:
1897 YY_RULE_SETUP
1898 { savetoken(yytext); yylval.i=5; return TOP_OR_BOT; }
1899         YY_BREAK
1900 case 128:
1901 YY_RULE_SETUP
1902 { savetoken(yytext); yylval.i=1; return LIGHT_STATE; }
1903         YY_BREAK
1904 case 129:
1905 YY_RULE_SETUP
1906 { savetoken(yytext); yylval.i=0; return LIGHT_STATE; }
1907         YY_BREAK
1908 case 130:
1909 YY_RULE_SETUP
1910 { savetoken(yytext); yylval.i=1; return FILLING; }
1911         YY_BREAK
1912 case 131:
1913 YY_RULE_SETUP
1914 { savetoken(yytext); yylval.i=0; return FILLING; }
1915         YY_BREAK
1916 case 132:
1917 YY_RULE_SETUP
1918 { savetoken(yytext); yylval.i=0; return IRREGULAR; }
1919         YY_BREAK
1920 case 133:
1921 YY_RULE_SETUP
1922 { savetoken(yytext); yylval.i=1; return IRREGULAR; }
1923         YY_BREAK
1924 case 134:
1925 YY_RULE_SETUP
1926 { savetoken(yytext); yylval.i=1; return JOINED; }
1927         YY_BREAK
1928 case 135:
1929 YY_RULE_SETUP
1930 { savetoken(yytext); yylval.i=0; return JOINED; }
1931         YY_BREAK
1932 case 136:
1933 YY_RULE_SETUP
1934 { savetoken(yytext); yylval.i=1; return LIMITED; }
1935         YY_BREAK
1936 case 137:
1937 YY_RULE_SETUP
1938 { savetoken(yytext); yylval.i=0; return LIMITED; }
1939         YY_BREAK
1940 case 138:
1941 YY_RULE_SETUP
1942 { savetoken(yytext); yylval.i= AM_NONE; return ALIGNMENT; }
1943         YY_BREAK
1944 case 139:
1945 YY_RULE_SETUP
1946 { savetoken(yytext); yylval.i= AM_LAWFUL; return ALIGNMENT; }
1947         YY_BREAK
1948 case 140:
1949 YY_RULE_SETUP
1950 { savetoken(yytext); yylval.i= AM_NEUTRAL; return ALIGNMENT; }
1951         YY_BREAK
1952 case 141:
1953 YY_RULE_SETUP
1954 { savetoken(yytext); yylval.i= AM_CHAOTIC; return ALIGNMENT; }
1955         YY_BREAK
1956 case 142:
1957 YY_RULE_SETUP
1958 { savetoken(yytext); yylval.i= AM_SPLEV_CO; return ALIGNMENT; }
1959         YY_BREAK
1960 case 143:
1961 YY_RULE_SETUP
1962 { savetoken(yytext); yylval.i= AM_SPLEV_NONCO; return ALIGNMENT; }
1963         YY_BREAK
1964 case 144:
1965 YY_RULE_SETUP
1966 { savetoken(yytext); yylval.i=1; return MON_ATTITUDE; }
1967         YY_BREAK
1968 case 145:
1969 YY_RULE_SETUP
1970 { savetoken(yytext); yylval.i=0; return MON_ATTITUDE; }
1971         YY_BREAK
1972 case 146:
1973 YY_RULE_SETUP
1974 { savetoken(yytext); yylval.i=1; return MON_ALERTNESS; }
1975         YY_BREAK
1976 case 147:
1977 YY_RULE_SETUP
1978 { savetoken(yytext); yylval.i=0; return MON_ALERTNESS; }
1979         YY_BREAK
1980 case 148:
1981 YY_RULE_SETUP
1982 { savetoken(yytext); yylval.i= M_AP_FURNITURE; return MON_APPEARANCE; }
1983         YY_BREAK
1984 case 149:
1985 YY_RULE_SETUP
1986 { savetoken(yytext); yylval.i= M_AP_MONSTER;   return MON_APPEARANCE; }
1987         YY_BREAK
1988 case 150:
1989 YY_RULE_SETUP
1990 { savetoken(yytext); yylval.i= M_AP_OBJECT;    return MON_APPEARANCE; }
1991         YY_BREAK
1992 case 151:
1993 YY_RULE_SETUP
1994 { savetoken(yytext); yylval.i=2; return ALTAR_TYPE; }
1995         YY_BREAK
1996 case 152:
1997 YY_RULE_SETUP
1998 { savetoken(yytext); yylval.i=1; return ALTAR_TYPE; }
1999         YY_BREAK
2000 case 153:
2001 YY_RULE_SETUP
2002 { savetoken(yytext); yylval.i=0; return ALTAR_TYPE; }
2003         YY_BREAK
2004 case 154:
2005 YY_RULE_SETUP
2006 { savetoken(yytext); yylval.i=1; return UP_OR_DOWN; }
2007         YY_BREAK
2008 case 155:
2009 YY_RULE_SETUP
2010 { savetoken(yytext); yylval.i=0; return UP_OR_DOWN; }
2011         YY_BREAK
2012 case 156:
2013 YY_RULE_SETUP
2014 { savetoken(yytext); yylval.i=0; return BOOLEAN; }
2015         YY_BREAK
2016 case 157:
2017 YY_RULE_SETUP
2018 { savetoken(yytext); yylval.i=1; return BOOLEAN; }
2019         YY_BREAK
2020 case 158:
2021 YY_RULE_SETUP
2022 { savetoken(yytext); yylval.i=DUST; return ENGRAVING_TYPE; }
2023         YY_BREAK
2024 case 159:
2025 YY_RULE_SETUP
2026 { savetoken(yytext); yylval.i=ENGRAVE; return ENGRAVING_TYPE; }
2027         YY_BREAK
2028 case 160:
2029 YY_RULE_SETUP
2030 { savetoken(yytext); yylval.i=BURN; return ENGRAVING_TYPE; }
2031         YY_BREAK
2032 case 161:
2033 YY_RULE_SETUP
2034 { savetoken(yytext); yylval.i=MARK; return ENGRAVING_TYPE; }
2035         YY_BREAK
2036 case 162:
2037 YY_RULE_SETUP
2038 { savetoken(yytext); yylval.i=ENGR_BLOOD; return ENGRAVING_TYPE; }
2039         YY_BREAK
2040 case 163:
2041 YY_RULE_SETUP
2042 { savetoken(yytext); yylval.i=1; return CURSE_TYPE; }
2043         YY_BREAK
2044 case 164:
2045 YY_RULE_SETUP
2046 { savetoken(yytext); yylval.i=2; return CURSE_TYPE; }
2047         YY_BREAK
2048 case 165:
2049 YY_RULE_SETUP
2050 { savetoken(yytext); yylval.i=3; return CURSE_TYPE; }
2051         YY_BREAK
2052 case 166:
2053 YY_RULE_SETUP
2054 { savetoken(yytext); yylval.i=NOTELEPORT; return FLAG_TYPE; }
2055         YY_BREAK
2056 case 167:
2057 YY_RULE_SETUP
2058 { savetoken(yytext); yylval.i=HARDFLOOR; return FLAG_TYPE; }
2059         YY_BREAK
2060 case 168:
2061 YY_RULE_SETUP
2062 { savetoken(yytext); yylval.i=NOMMAP; return FLAG_TYPE; }
2063         YY_BREAK
2064 case 169:
2065 YY_RULE_SETUP
2066 { savetoken(yytext); yylval.i=ARBOREAL; return FLAG_TYPE; } /* KMH */
2067         YY_BREAK
2068 case 170:
2069 YY_RULE_SETUP
2070 { savetoken(yytext); yylval.i=SHORTSIGHTED; return FLAG_TYPE; }
2071         YY_BREAK
2072 case 171:
2073 YY_RULE_SETUP
2074 { savetoken(yytext); yylval.i=MAZELEVEL; return FLAG_TYPE; }
2075         YY_BREAK
2076 case 172:
2077 YY_RULE_SETUP
2078 { savetoken(yytext); yylval.i=PREMAPPED; return FLAG_TYPE; }
2079         YY_BREAK
2080 case 173:
2081 YY_RULE_SETUP
2082 { savetoken(yytext); yylval.i=SHROUD; return FLAG_TYPE; }
2083         YY_BREAK
2084 case 174:
2085 YY_RULE_SETUP
2086 { savetoken(yytext); yylval.i=GRAVEYARD; return FLAG_TYPE; }
2087         YY_BREAK
2088 case 175:
2089 YY_RULE_SETUP
2090 { savetoken(yytext); yylval.i=ICEDPOOLS; return FLAG_TYPE; }
2091         YY_BREAK
2092 case 176:
2093 YY_RULE_SETUP
2094 { savetoken(yytext); yylval.i=SOLIDIFY; return FLAG_TYPE; }
2095         YY_BREAK
2096 case 177:
2097 YY_RULE_SETUP
2098 { savetoken(yytext); yylval.i=CORRMAZE; return FLAG_TYPE; }
2099         YY_BREAK
2100 case 178:
2101 YY_RULE_SETUP
2102 { savetoken(yytext); yylval.i=CHECK_INACCESSIBLES; return FLAG_TYPE; }
2103         YY_BREAK
2104 case 179:
2105 YY_RULE_SETUP
2106 { char *p = index(yytext, 'd');
2107                   savetoken(yytext);
2108                   if (p) {
2109                         *p++ = '\0';
2110                         yylval.dice.num = atoi(yytext);
2111                         yylval.dice.die = atoi(p);
2112                   } else {
2113                         yylval.dice.num = yylval.dice.die = 1;
2114                   }
2115                   return DICE;
2116                 }
2117         YY_BREAK
2118 case 180:
2119 YY_RULE_SETUP
2120 { savetoken(yytext); yylval.i = atoi(yytext + 1);
2121                      if (yylval.i < 0 || yylval.i > 100)
2122                         lc_error("Unexpected percentile '%li%%'", yylval.i);
2123                      return PERCENT; }
2124         YY_BREAK
2125 case 181:
2126 YY_RULE_SETUP
2127 { savetoken(yytext); yylval.i=atoi(yytext); return MINUS_INTEGER; }
2128         YY_BREAK
2129 case 182:
2130 YY_RULE_SETUP
2131 { savetoken(yytext); yylval.i=atoi(yytext); return PLUS_INTEGER; }
2132         YY_BREAK
2133 case 183:
2134 YY_RULE_SETUP
2135 { savetoken(yytext); yylval.i = atoi(yytext);
2136                   if (yylval.i < 0 || yylval.i > 100)
2137                      lc_error("Unexpected percentile '%li%%'", yylval.i);
2138                   return SPERCENT; }
2139         YY_BREAK
2140 case 184:
2141 YY_RULE_SETUP
2142 { savetoken(yytext); yylval.i=atoi(yytext); return INTEGER; }
2143         YY_BREAK
2144 case 185:
2145 /* rule 185 can match eol */
2146 YY_RULE_SETUP
2147 { savetoken(yytext);
2148                   yytext[yyleng - 1] = '\0'; /* discard the trailing \" */
2149                   yylval.map = dupstr(yytext + 1); /* skip the first \" */
2150                   return STRING; }
2151         YY_BREAK
2152 case 186:
2153 YY_RULE_SETUP
2154 { savetoken(yytext); return handle_varstring_check(); }
2155         YY_BREAK
2156 case 187:
2157 YY_RULE_SETUP
2158 { savetoken(yytext); yylval.i = SPO_JE; return COMPARE_TYPE; }
2159         YY_BREAK
2160 case 188:
2161 YY_RULE_SETUP
2162 { savetoken(yytext); yylval.i = SPO_JNE; return COMPARE_TYPE; }
2163         YY_BREAK
2164 case 189:
2165 YY_RULE_SETUP
2166 { savetoken(yytext); yylval.i = SPO_JNE; return COMPARE_TYPE; }
2167         YY_BREAK
2168 case 190:
2169 YY_RULE_SETUP
2170 { savetoken(yytext); yylval.i = SPO_JLE; return COMPARE_TYPE; }
2171         YY_BREAK
2172 case 191:
2173 YY_RULE_SETUP
2174 { savetoken(yytext); yylval.i = SPO_JGE; return COMPARE_TYPE; }
2175         YY_BREAK
2176 case 192:
2177 YY_RULE_SETUP
2178 { savetoken(yytext); yylval.i = SPO_JL; return COMPARE_TYPE; }
2179         YY_BREAK
2180 case 193:
2181 YY_RULE_SETUP
2182 { savetoken(yytext); yylval.i = SPO_JG; return COMPARE_TYPE; }
2183         YY_BREAK
2184 case 194:
2185 /* rule 194 can match eol */
2186 YY_RULE_SETUP
2187 { newline(); }
2188         YY_BREAK
2189 case 195:
2190 YY_RULE_SETUP
2191 { advancepos(yytext); }
2192         YY_BREAK
2193 case 196:
2194 YY_RULE_SETUP
2195 { savetoken(yytext); yylval.i = yytext[2]; return CHAR; }
2196         YY_BREAK
2197 case 197:
2198 YY_RULE_SETUP
2199 { savetoken(yytext); yylval.i = yytext[1]; return CHAR; }
2200         YY_BREAK
2201 case 198:
2202 YY_RULE_SETUP
2203 ST_RET(UNKNOWN_TYPE);
2204         YY_BREAK
2205 case 199:
2206 YY_RULE_SETUP
2207 { savetoken(yytext); return yytext[0]; }
2208         YY_BREAK
2209 case 200:
2210 YY_RULE_SETUP
2211 ECHO;
2212         YY_BREAK
2213 case YY_STATE_EOF(INITIAL):
2214 case YY_STATE_EOF(MAPC):
2215         yyterminate();
2216
2217         case YY_END_OF_BUFFER:
2218                 {
2219                 /* Amount of text matched not including the EOB char. */
2220                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2221
2222                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2223                 *yy_cp = (yy_hold_char);
2224                 YY_RESTORE_YY_MORE_OFFSET
2225
2226                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2227                         {
2228                         /* We're scanning a new file or input source.  It's
2229                          * possible that this happened because the user
2230                          * just pointed yyin at a new source and called
2231                          * yylex().  If so, then we have to assure
2232                          * consistency between YY_CURRENT_BUFFER and our
2233                          * globals.  Here is the right place to do so, because
2234                          * this is the first action (other than possibly a
2235                          * back-up) that will match for the new input source.
2236                          */
2237                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2238                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2239                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2240                         }
2241
2242                 /* Note that here we test for yy_c_buf_p "<=" to the position
2243                  * of the first EOB in the buffer, since yy_c_buf_p will
2244                  * already have been incremented past the NUL character
2245                  * (since all states make transitions on EOB to the
2246                  * end-of-buffer state).  Contrast this with the test
2247                  * in input().
2248                  */
2249                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2250                         { /* This was really a NUL. */
2251                         yy_state_type yy_next_state;
2252
2253                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2254
2255                         yy_current_state = yy_get_previous_state(  );
2256
2257                         /* Okay, we're now positioned to make the NUL
2258                          * transition.  We couldn't have
2259                          * yy_get_previous_state() go ahead and do it
2260                          * for us because it doesn't know how to deal
2261                          * with the possibility of jamming (and we don't
2262                          * want to build jamming into it because then it
2263                          * will run more slowly).
2264                          */
2265
2266                         yy_next_state = yy_try_NUL_trans( yy_current_state );
2267
2268                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2269
2270                         if ( yy_next_state )
2271                                 {
2272                                 /* Consume the NUL. */
2273                                 yy_cp = ++(yy_c_buf_p);
2274                                 yy_current_state = yy_next_state;
2275                                 goto yy_match;
2276                                 }
2277
2278                         else
2279                                 {
2280                                 yy_cp = (yy_c_buf_p);
2281                                 goto yy_find_action;
2282                                 }
2283                         }
2284
2285                 else switch ( yy_get_next_buffer(  ) )
2286                         {
2287                         case EOB_ACT_END_OF_FILE:
2288                                 {
2289                                 (yy_did_buffer_switch_on_eof) = 0;
2290
2291                                 if ( yywrap( ) )
2292                                         {
2293                                         /* Note: because we've taken care in
2294                                          * yy_get_next_buffer() to have set up
2295                                          * yytext, we can now set up
2296                                          * yy_c_buf_p so that if some total
2297                                          * hoser (like flex itself) wants to
2298                                          * call the scanner after we return the
2299                                          * YY_NULL, it'll still work - another
2300                                          * YY_NULL will get returned.
2301                                          */
2302                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2303
2304                                         yy_act = YY_STATE_EOF(YY_START);
2305                                         goto do_action;
2306                                         }
2307
2308                                 else
2309                                         {
2310                                         if ( ! (yy_did_buffer_switch_on_eof) )
2311                                                 YY_NEW_FILE;
2312                                         }
2313                                 break;
2314                                 }
2315
2316                         case EOB_ACT_CONTINUE_SCAN:
2317                                 (yy_c_buf_p) =
2318                                         (yytext_ptr) + yy_amount_of_matched_text;
2319
2320                                 yy_current_state = yy_get_previous_state(  );
2321
2322                                 yy_cp = (yy_c_buf_p);
2323                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2324                                 goto yy_match;
2325
2326                         case EOB_ACT_LAST_MATCH:
2327                                 (yy_c_buf_p) =
2328                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2329
2330                                 yy_current_state = yy_get_previous_state(  );
2331
2332                                 yy_cp = (yy_c_buf_p);
2333                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2334                                 goto yy_find_action;
2335                         }
2336                 break;
2337                 }
2338
2339         default:
2340                 YY_FATAL_ERROR(
2341                         "fatal flex scanner internal error--no action found" );
2342         } /* end of action switch */
2343                 } /* end of scanning one token */
2344         } /* end of user's declarations */
2345 } /* end of yylex */
2346
2347 /* yy_get_next_buffer - try to read in a new buffer
2348  *
2349  * Returns a code representing an action:
2350  *      EOB_ACT_LAST_MATCH -
2351  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2352  *      EOB_ACT_END_OF_FILE - end of file
2353  */
2354 static int yy_get_next_buffer ()
2355 {
2356         char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2357     char *source = (yytext_ptr);
2358     yy_size_t number_to_move, i;
2359     int ret_val;
2360
2361     if ((yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1])
2362         YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed");
2363
2364     if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) {
2365         /* Don't try to fill the buffer, so this is an EOF. */
2366         if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) {
2367             /* We matched a single character, the EOB, so
2368              * treat this as a final EOF.
2369              */
2370             return EOB_ACT_END_OF_FILE;
2371         } else {
2372             /* We matched some text prior to the EOB, first
2373              * process it.
2374              */
2375             return EOB_ACT_LAST_MATCH;
2376         }
2377     }
2378
2379     /* Try to read more data. */
2380
2381     /* First move last chars to start of buffer. */
2382     number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2383
2384     for (i = 0; i < number_to_move; ++i)
2385         *(dest++) = *(source++);
2386
2387     if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING) {
2388         /* don't do the read, it's not guaranteed to return an EOF,
2389          * just force an EOF
2390          */
2391         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2392     } else {
2393         yy_size_t num_to_read =
2394                 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2395
2396         while (num_to_read <= 0) {
2397             /* Not enough room in the buffer - grow it. */
2398
2399             /* just a shorter name for the current buffer */
2400             YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2401             int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf);
2402
2403             if ( b->yy_is_our_buffer ) {
2404                 yy_size_t new_size = b->yy_buf_size * 2;
2405
2406                 if ( new_size <= 0 )
2407                     b->yy_buf_size += b->yy_buf_size / 8;
2408                 else
2409                     b->yy_buf_size *= 2;
2410
2411                 b->yy_ch_buf = (char *)
2412                 /* Include room in for 2 EOB chars. */
2413                 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
2414             } else
2415                 /* Can't grow it, we don't own it. */
2416                 b->yy_ch_buf = 0;
2417
2418             if (! b->yy_ch_buf)
2419                 YY_FATAL_ERROR("fatal error - scanner input buffer overflow" );
2420
2421             (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2422
2423             num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2424                                 number_to_move - 1;
2425
2426         }
2427
2428         if ( num_to_read > YY_READ_BUF_SIZE )
2429             num_to_read = YY_READ_BUF_SIZE;
2430
2431         /* Read in more data. */
2432         YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2433                 (yy_n_chars), num_to_read);
2434         YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2435     }
2436
2437     if ((yy_n_chars) == 0) {
2438         if (number_to_move == YY_MORE_ADJ) {
2439             ret_val = EOB_ACT_END_OF_FILE;
2440             yyrestart(yyin  );
2441         } else {
2442             ret_val = EOB_ACT_LAST_MATCH;
2443             YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING;
2444         }
2445     } else
2446         ret_val = EOB_ACT_CONTINUE_SCAN;
2447
2448     if ((yy_size_t) ((yy_n_chars) + number_to_move)
2449                     > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2450         /* Extend the array by 50%, plus the number we really need. */
2451         yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2452         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *)
2453                 yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
2454         if (! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf)
2455             YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()");
2456     }
2457
2458     (yy_n_chars) += number_to_move;
2459     YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2460     YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2461
2462     (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2463
2464     return ret_val;
2465 }
2466
2467 /* yy_get_previous_state - get the state just before EOB char was reached */
2468
2469 static yy_state_type yy_get_previous_state ()
2470 {
2471     yy_state_type yy_current_state;
2472     char *yy_cp;
2473
2474         yy_current_state = (yy_start);
2475         yy_current_state += YY_AT_BOL();
2476
2477     for (yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp) {
2478
2479                 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2480                 if ( yy_accept[yy_current_state] )
2481                         {
2482                         (yy_last_accepting_state) = yy_current_state;
2483                         (yy_last_accepting_cpos) = yy_cp;
2484                         }
2485                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2486                         {
2487                         yy_current_state = (int) yy_def[yy_current_state];
2488                         if ( yy_current_state >= 1057 )
2489                                 yy_c = yy_meta[(unsigned int) yy_c];
2490                         }
2491                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2492     }
2493
2494     return yy_current_state;
2495 }
2496
2497 /* yy_try_NUL_trans - try to make a transition on the NUL character
2498  *
2499  * synopsis
2500  *      next_state = yy_try_NUL_trans( current_state );
2501  */
2502
2503 static yy_state_type yy_try_NUL_trans (yy_current_state )
2504         yy_state_type yy_current_state;
2505 {
2506         int yy_is_jam;
2507         char *yy_cp = (yy_c_buf_p);
2508
2509         YY_CHAR yy_c = 1;
2510         if ( yy_accept[yy_current_state] )
2511                 {
2512                 (yy_last_accepting_state) = yy_current_state;
2513                 (yy_last_accepting_cpos) = yy_cp;
2514                 }
2515         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2516                 {
2517                 yy_current_state = (int) yy_def[yy_current_state];
2518                 if ( yy_current_state >= 1057 )
2519                         yy_c = yy_meta[(unsigned int) yy_c];
2520                 }
2521         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2522         yy_is_jam = (yy_current_state == 1056);
2523
2524                 return yy_is_jam ? 0 : yy_current_state;
2525 }
2526
2527 #ifndef YY_NO_UNPUT
2528
2529 static void yyunput (c,yy_bp )
2530         int c;
2531         char * yy_bp;
2532 {
2533         char *yy_cp;
2534
2535     yy_cp = (yy_c_buf_p);
2536
2537         /* undo effects of setting up yytext */
2538         *yy_cp = (yy_hold_char);
2539
2540         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2541                 { /* need to shift things up to make room */
2542                 /* +2 for EOB chars. */
2543                 yy_size_t number_to_move = (yy_n_chars) + 2;
2544                 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2545                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2546                 char *source =
2547                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2548
2549                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2550                         *--dest = *--source;
2551
2552                 yy_cp += (int) (dest - source);
2553                 yy_bp += (int) (dest - source);
2554                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2555                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2556
2557                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2558                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
2559                 }
2560
2561         *--yy_cp = (char) c;
2562
2563         (yytext_ptr) = yy_bp;
2564         (yy_hold_char) = *yy_cp;
2565         (yy_c_buf_p) = yy_cp;
2566 }
2567
2568 #endif
2569
2570 #ifndef YY_NO_INPUT
2571 static int input ()
2572 {
2573         int c;
2574
2575         *(yy_c_buf_p) = (yy_hold_char);
2576
2577         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2578                 {
2579                 /* yy_c_buf_p now points to the character we want to return.
2580                  * If this occurs *before* the EOB characters, then it's a
2581                  * valid NUL; if not, then we've hit the end of the buffer.
2582                  */
2583                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2584                         /* This was really a NUL. */
2585                         *(yy_c_buf_p) = '\0';
2586
2587                 else
2588                         { /* need more input */
2589                         yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
2590                         ++(yy_c_buf_p);
2591
2592                         switch ( yy_get_next_buffer(  ) )
2593                                 {
2594                                 case EOB_ACT_LAST_MATCH:
2595                                         /* This happens because yy_g_n_b()
2596                                          * sees that we've accumulated a
2597                                          * token and flags that we need to
2598                                          * try matching the token before
2599                                          * proceeding.  But for input(),
2600                                          * there's no matching to consider.
2601                                          * So convert the EOB_ACT_LAST_MATCH
2602                                          * to EOB_ACT_END_OF_FILE.
2603                                          */
2604
2605                                         /* Reset buffer status. */
2606                                         yyrestart(yyin );
2607
2608                                         /*FALLTHROUGH*/
2609
2610                                 case EOB_ACT_END_OF_FILE:
2611                                         {
2612                                         if ( yywrap( ) )
2613                                                 return EOF;
2614
2615                                         if ( ! (yy_did_buffer_switch_on_eof) )
2616                                                 YY_NEW_FILE;
2617                                         return input();
2618                                         }
2619
2620                                 case EOB_ACT_CONTINUE_SCAN:
2621                                         (yy_c_buf_p) = (yytext_ptr) + offset;
2622                                         break;
2623                                 }
2624                         }
2625                 }
2626
2627         c = *(uchar *) (yy_c_buf_p);    /* cast for 8-bit char's */
2628         *(yy_c_buf_p) = '\0';   /* preserve yytext */
2629         (yy_hold_char) = *++(yy_c_buf_p);
2630
2631         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
2632
2633         return c;
2634 }
2635 #endif  /* ifndef YY_NO_INPUT */
2636
2637 /** Immediately switch to a different input stream.
2638  * @param input_file A readable stream.
2639  *
2640  * @note This function does not reset the start condition to @c INITIAL .
2641  */
2642
2643 void yyrestart (input_file )
2644         FILE * input_file;
2645 {
2646
2647         if ( ! YY_CURRENT_BUFFER ){
2648         yyensure_buffer_stack ();
2649                 YY_CURRENT_BUFFER_LVALUE =
2650             yy_create_buffer(yyin,YY_BUF_SIZE );
2651         }
2652
2653         yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2654         yy_load_buffer_state( );
2655 }
2656
2657 /** Switch to a different input buffer.
2658  * @param new_buffer The new input buffer.
2659  *
2660  */
2661 void yy_switch_to_buffer (new_buffer )
2662         YY_BUFFER_STATE  new_buffer;
2663 {
2664
2665         /* TODO. We should be able to replace this entire function body
2666          * with
2667          *              yypop_buffer_state();
2668          *              yypush_buffer_state(new_buffer);
2669          */
2670         yyensure_buffer_stack ();
2671         if ( YY_CURRENT_BUFFER == new_buffer )
2672                 return;
2673
2674         if ( YY_CURRENT_BUFFER )
2675                 {
2676                 /* Flush out information for old buffer. */
2677                 *(yy_c_buf_p) = (yy_hold_char);
2678                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2679                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2680                 }
2681
2682         YY_CURRENT_BUFFER_LVALUE = new_buffer;
2683         yy_load_buffer_state( );
2684
2685         /* We don't actually know whether we did this switch during
2686          * EOF (yywrap()) processing, but the only time this flag
2687          * is looked at is after yywrap() is called, so it's safe
2688          * to go ahead and always set it.
2689          */
2690         (yy_did_buffer_switch_on_eof) = 1;
2691 }
2692
2693 static void yy_load_buffer_state ()
2694 {
2695         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2696         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2697         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2698         (yy_hold_char) = *(yy_c_buf_p);
2699 }
2700
2701 /** Allocate and initialize an input buffer state.
2702  * @param file A readable stream.
2703  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2704  *
2705  * @return the allocated buffer state.
2706  */
2707 YY_BUFFER_STATE yy_create_buffer (file,size )
2708         FILE * file;
2709         int  size;
2710 {
2711         YY_BUFFER_STATE b;
2712
2713         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
2714         if ( ! b )
2715                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2716
2717         b->yy_buf_size = (yy_size_t)size;
2718
2719         /* yy_ch_buf has to be 2 characters longer than the size given because
2720          * we need to put in 2 end-of-buffer characters.
2721          */
2722         b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
2723         if ( ! b->yy_ch_buf )
2724                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2725
2726         b->yy_is_our_buffer = 1;
2727
2728         yy_init_buffer(b,file );
2729
2730         return b;
2731 }
2732
2733 /** Destroy the buffer.
2734  * @param b a buffer created with yy_create_buffer()
2735  *
2736  */
2737 void yy_delete_buffer (b )
2738         YY_BUFFER_STATE  b;
2739 {
2740
2741         if ( ! b )
2742                 return;
2743
2744         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2745                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2746
2747         if ( b->yy_is_our_buffer )
2748                 yyfree((void *) b->yy_ch_buf  );
2749
2750         yyfree((void *) b  );
2751 }
2752
2753 /* Initializes or reinitializes a buffer.
2754  * This function is sometimes called more than once on the same buffer,
2755  * such as during a yyrestart() or at EOF.
2756  */
2757 static void yy_init_buffer (b,file )
2758         YY_BUFFER_STATE  b;
2759         FILE * file;
2760 {
2761         int oerrno = errno;
2762
2763         yy_flush_buffer(b );
2764
2765         b->yy_input_file = file;
2766         b->yy_fill_buffer = 1;
2767
2768     /* If b is the current buffer, then yy_init_buffer was _probably_
2769      * called from yyrestart() or through yy_get_next_buffer.
2770      * In that case, we don't want to reset the lineno or column.
2771      */
2772     if (b != YY_CURRENT_BUFFER){
2773         b->yy_bs_lineno = 1;
2774         b->yy_bs_column = 0;
2775     }
2776
2777         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2778
2779         errno = oerrno;
2780 }
2781
2782 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2783  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2784  *
2785  */
2786 void yy_flush_buffer (b )
2787         YY_BUFFER_STATE  b;
2788 {
2789         if ( ! b )
2790                 return;
2791
2792         b->yy_n_chars = 0;
2793
2794         /* We always need two end-of-buffer characters.  The first causes
2795          * a transition to the end-of-buffer state.  The second causes
2796          * a jam in that state.
2797          */
2798         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2799         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2800
2801         b->yy_buf_pos = &b->yy_ch_buf[0];
2802
2803         b->yy_at_bol = 1;
2804         b->yy_buffer_status = YY_BUFFER_NEW;
2805
2806         if ( b == YY_CURRENT_BUFFER )
2807                 yy_load_buffer_state( );
2808 }
2809
2810 /** Pushes the new state onto the stack. The new state becomes
2811  *  the current state. This function will allocate the stack
2812  *  if necessary.
2813  *  @param new_buffer The new state.
2814  *
2815  */
2816 void yypush_buffer_state (new_buffer )
2817         YY_BUFFER_STATE new_buffer;
2818 {
2819         if (new_buffer == NULL)
2820                 return;
2821
2822         yyensure_buffer_stack();
2823
2824         /* This block is copied from yy_switch_to_buffer. */
2825         if ( YY_CURRENT_BUFFER )
2826                 {
2827                 /* Flush out information for old buffer. */
2828                 *(yy_c_buf_p) = (yy_hold_char);
2829                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2830                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2831                 }
2832
2833         /* Only push if top exists. Otherwise, replace top. */
2834         if (YY_CURRENT_BUFFER)
2835                 (yy_buffer_stack_top)++;
2836         YY_CURRENT_BUFFER_LVALUE = new_buffer;
2837
2838         /* copied from yy_switch_to_buffer. */
2839         yy_load_buffer_state( );
2840         (yy_did_buffer_switch_on_eof) = 1;
2841 }
2842
2843 /** Removes and deletes the top of the stack, if present.
2844  *  The next element becomes the new top.
2845  *
2846  */
2847 void yypop_buffer_state ()
2848 {
2849         if (!YY_CURRENT_BUFFER)
2850                 return;
2851
2852         yy_delete_buffer(YY_CURRENT_BUFFER );
2853         YY_CURRENT_BUFFER_LVALUE = NULL;
2854         if ((yy_buffer_stack_top) > 0)
2855                 --(yy_buffer_stack_top);
2856
2857         if (YY_CURRENT_BUFFER) {
2858                 yy_load_buffer_state( );
2859                 (yy_did_buffer_switch_on_eof) = 1;
2860         }
2861 }
2862
2863 /* Allocates the stack if it does not exist.
2864  *  Guarantees space for at least one push.
2865  */
2866 static void yyensure_buffer_stack ()
2867 {
2868     yy_size_t num_to_alloc;
2869
2870     if (!(yy_buffer_stack)) {
2871         /* First allocation is just for 2 elements, since we don't know if this
2872          * scanner will even need a stack. We use 2 instead of 1 to avoid an
2873          * immediate realloc on the next call.
2874          */
2875 #if 1   /* [PR] avoid C++-style comment; older C compilers choke on it */
2876         num_to_alloc = 2; /* also changed to match the comment... */
2877 #else
2878         num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
2879 #endif
2880         (yy_buffer_stack) = (struct yy_buffer_state**)
2881                 yyalloc(num_to_alloc * sizeof(struct yy_buffer_state*) );
2882         if (!(yy_buffer_stack))
2883             YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()");
2884
2885         (void) memset((yy_buffer_stack), 0,
2886                       num_to_alloc * sizeof(struct yy_buffer_state*));
2887
2888         (yy_buffer_stack_max) = num_to_alloc;
2889         (yy_buffer_stack_top) = 0;
2890         return;
2891     }
2892
2893     if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1) {
2894         /* Increase the buffer to prepare for a possible push. */
2895         yy_size_t grow_size = 8 /* arbitrary grow size */;
2896
2897         num_to_alloc = (yy_buffer_stack_max) + grow_size;
2898         (yy_buffer_stack) = (struct yy_buffer_state**)
2899                 yyrealloc((yy_buffer_stack),num_to_alloc * sizeof(struct yy_buffer_state*) );
2900         if (!(yy_buffer_stack))
2901             YY_FATAL_ERROR("out of dynamic memory in yyensure_buffer_stack()");
2902
2903         /* zero only the new slots.*/
2904         (void) memset((yy_buffer_stack) + (yy_buffer_stack_max), 0,
2905                       grow_size * sizeof(struct yy_buffer_state*));
2906         (yy_buffer_stack_max) = num_to_alloc;
2907     }
2908 }
2909
2910 /** Setup the input buffer state to scan directly from a user-specified
2911  * character buffer.
2912  * @param base the character buffer
2913  * @param size the size in bytes of the character buffer
2914  *
2915  * @return the newly allocated buffer state object.
2916  */
2917 YY_BUFFER_STATE yy_scan_buffer (base,size )
2918         char * base;
2919         yy_size_t  size;
2920 {
2921         YY_BUFFER_STATE b;
2922
2923         if ( size < 2 ||
2924              base[size-2] != YY_END_OF_BUFFER_CHAR ||
2925              base[size-1] != YY_END_OF_BUFFER_CHAR )
2926                 /* They forgot to leave room for the EOB's. */
2927                 return 0;
2928
2929         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
2930         if ( ! b )
2931                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2932
2933         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
2934         b->yy_buf_pos = b->yy_ch_buf = base;
2935         b->yy_is_our_buffer = 0;
2936         b->yy_input_file = 0;
2937         b->yy_n_chars = b->yy_buf_size;
2938         b->yy_is_interactive = 0;
2939         b->yy_at_bol = 1;
2940         b->yy_fill_buffer = 0;
2941         b->yy_buffer_status = YY_BUFFER_NEW;
2942
2943         yy_switch_to_buffer(b  );
2944
2945         return b;
2946 }
2947
2948 /** Setup the input buffer state to scan a string. The next call to yylex()
2949  * will scan from a @e copy of @a str.
2950  * @param yystr a NUL-terminated string to scan
2951  *
2952  * @return the newly allocated buffer state object.
2953  * @note If you want to scan bytes that may contain NUL values, then use
2954  *       yy_scan_bytes() instead.
2955  */
2956 YY_BUFFER_STATE yy_scan_string (yystr )
2957         yyconst char * yystr;
2958 {
2959
2960         return yy_scan_bytes(yystr,strlen(yystr) );
2961 }
2962
2963 /** Setup the input buffer state to scan the given bytes. The next call to
2964  * yylex() will scan from a @e copy of @a bytes.
2965  * @param yybytes the byte buffer to scan
2966  * @param _yybytes_len the number of bytes in the buffer pointed to by @a
2967  * bytes.
2968  *
2969  * @return the newly allocated buffer state object.
2970  */
2971 YY_BUFFER_STATE yy_scan_bytes (yybytes,_yybytes_len )
2972         yyconst char * yybytes;
2973         yy_size_t  _yybytes_len;
2974 {
2975         YY_BUFFER_STATE b;
2976         char *buf;
2977         yy_size_t n;
2978         yy_size_t i;
2979
2980         /* Get memory for full buffer, including space for trailing EOB's. */
2981         n = _yybytes_len + 2;
2982         buf = (char *) yyalloc(n  );
2983         if ( ! buf )
2984                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2985
2986         for ( i = 0; i < _yybytes_len; ++i )
2987                 buf[i] = yybytes[i];
2988
2989         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2990
2991         b = yy_scan_buffer(buf,n );
2992         if ( ! b )
2993                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2994
2995         /* It's okay to grow etc. this buffer, and we should throw it
2996          * away when we're done.
2997          */
2998         b->yy_is_our_buffer = 1;
2999
3000         return b;
3001 }
3002
3003 #ifndef YY_EXIT_FAILURE
3004 #define YY_EXIT_FAILURE 2
3005 #endif
3006
3007 static void yy_fatal_error (msg )
3008         yyconst char* msg;
3009 {
3010                         (void) fprintf( stderr, "%s\n", msg );
3011         exit( YY_EXIT_FAILURE );
3012 }
3013
3014 /* Redefine yyless() so it works in section 3 code. */
3015
3016 #undef yyless
3017 #define yyless(n) \
3018     do { \
3019         /* Undo effects of setting up yytext. */ \
3020         int yyless_macro_arg = (n); \
3021         YY_LESS_LINENO(yyless_macro_arg); \
3022         yytext[yyleng] = (yy_hold_char); \
3023         (yy_c_buf_p) = yytext + yyless_macro_arg; \
3024         (yy_hold_char) = *(yy_c_buf_p); \
3025         *(yy_c_buf_p) = '\0'; \
3026         yyleng = yyless_macro_arg; \
3027     } while ( 0 )
3028
3029 /* Accessor  methods (get/set functions) to struct members. */
3030
3031 /** Get the current line number.
3032  *
3033  */
3034 int yyget_lineno ()
3035 {
3036
3037     return yylineno;
3038 }
3039
3040 /** Get the input stream.
3041  *
3042  */
3043 FILE *yyget_in ()
3044 {
3045         return yyin;
3046 }
3047
3048 /** Get the output stream.
3049  *
3050  */
3051 FILE *yyget_out ()
3052 {
3053         return yyout;
3054 }
3055
3056 /** Get the length of the current token.
3057  *
3058  */
3059 yy_size_t yyget_leng ()
3060 {
3061         return yyleng;
3062 }
3063
3064 /** Get the current token.
3065  *
3066  */
3067
3068 char *yyget_text ()
3069 {
3070         return yytext;
3071 }
3072
3073 /** Set the current line number.
3074  * @param _line_number line number
3075  *
3076  */
3077 void yyset_lineno (_line_number )
3078         int  _line_number;
3079 {
3080
3081     yylineno = _line_number;
3082 }
3083
3084 /** Set the input stream. This does not discard the current
3085  * input buffer.
3086  * @param _in_str A readable stream.
3087  *
3088  * @see yy_switch_to_buffer
3089  */
3090 void yyset_in (_in_str )
3091         FILE *  _in_str;
3092 {
3093         yyin = _in_str ;
3094 }
3095
3096 void yyset_out (_out_str )
3097         FILE *  _out_str;
3098 {
3099         yyout = _out_str ;
3100 }
3101
3102 int yyget_debug ()
3103 {
3104         return yy_flex_debug;
3105 }
3106
3107 void yyset_debug (_bdebug )
3108         int  _bdebug;
3109 {
3110         yy_flex_debug = _bdebug ;
3111 }
3112
3113 static int yy_init_globals ()
3114 {
3115         /* Initialization is the same as for the non-reentrant scanner.
3116      * This function is called from yylex_destroy(), so don't allocate here.
3117      */
3118
3119     (yy_buffer_stack) = 0;
3120     (yy_buffer_stack_top) = 0;
3121     (yy_buffer_stack_max) = 0;
3122     (yy_c_buf_p) = (char *) 0;
3123     (yy_init) = 0;
3124     (yy_start) = 0;
3125
3126 /* Defined in main.c */
3127 #ifdef YY_STDINIT
3128     yyin = stdin;
3129     yyout = stdout;
3130 #else
3131     yyin = (FILE *) 0;
3132     yyout = (FILE *) 0;
3133 #endif
3134
3135     /* For future reference: Set errno on error, since we are called by
3136      * yylex_init()
3137      */
3138     return 0;
3139 }
3140
3141 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3142 int yylex_destroy ()
3143 {
3144
3145     /* Pop the buffer stack, destroying each element. */
3146     while (YY_CURRENT_BUFFER) {
3147         yy_delete_buffer(YY_CURRENT_BUFFER  );
3148         YY_CURRENT_BUFFER_LVALUE = NULL;
3149         yypop_buffer_state();
3150     }
3151     /* Destroy the stack itself. */
3152     yyfree((yy_buffer_stack) );
3153     (yy_buffer_stack) = NULL;
3154
3155     /* Reset the globals. This is important in a non-reentrant scanner
3156      * so the next time yylex() is called, initialization will occur. */
3157     yy_init_globals( );
3158
3159     return 0;
3160 }
3161
3162 /*
3163  * Internal utility routines.
3164  */
3165
3166 #ifndef yytext_ptr
3167 static void yy_flex_strncpy (s1,s2,n )
3168         char* s1;
3169         yyconst char * s2;
3170         int n;
3171 {
3172                 
3173         int i;
3174         for ( i = 0; i < n; ++i )
3175                 s1[i] = s2[i];
3176 }
3177 #endif
3178
3179 #ifdef YY_NEED_STRLEN
3180 static int yy_flex_strlen (s )
3181         yyconst char * s;
3182 {
3183         int n;
3184         for ( n = 0; s[n]; ++n )
3185                 ;
3186
3187         return n;
3188 }
3189 #endif
3190
3191 void *yyalloc (size )
3192         yy_size_t  size;
3193 {
3194                 
3195         return (void *) malloc( size );
3196 }
3197
3198 void *yyrealloc (ptr,size )
3199         void * ptr;
3200         yy_size_t  size;
3201 {
3202                 
3203         /* The cast to (char *) in the following accommodates both
3204          * implementations that use char* generic pointers, and those
3205          * that use void* generic pointers.  It works with the latter
3206          * because both ANSI C and C++ allow castless assignment from
3207          * any pointer type to void*, and deal with argument conversions
3208          * as though doing an assignment.
3209          */
3210         return (void *) realloc( (char *) ptr, size );
3211 }
3212
3213 void yyfree (ptr )
3214         void * ptr;
3215 {
3216                 
3217         free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
3218 }
3219
3220 #ifdef  AMIGA
3221 long *
3222 alloc(n)
3223     unsigned n;
3224 {
3225     return (long *) malloc(n);
3226 }
3227 #endif
3228
3229 /* routine to switch to another input file; needed for flex */
3230 void
3231 init_yyin( input_f )
3232 FILE *input_f;
3233 {
3234 #if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER)
3235     if (yyin)
3236         yyrestart(input_f);
3237     else
3238 #endif
3239         yyin = input_f;
3240
3241     if (!orig_yyin)
3242         orig_yyin = yyin;
3243 }
3244 /* analogous routine (for completeness) */
3245 void
3246 init_yyout( output_f )
3247 FILE *output_f;
3248 {
3249     yyout = output_f;
3250 }
3251
3252 long
3253 handle_varstring_check()
3254 {
3255     struct lc_vardefs *vd;
3256
3257     yylval.map = dupstr(yytext);
3258     if ((vd = vardef_defined(variable_definitions, yytext, 1)) != 0) {
3259         long l = vd->var_type;
3260         int a = ((l & SPOVAR_ARRAY) == SPOVAR_ARRAY);
3261
3262         l &= ~SPOVAR_ARRAY;
3263         if (l == SPOVAR_INT)
3264             return (a ? VARSTRING_INT_ARRAY : VARSTRING_INT);
3265         if (l == SPOVAR_STRING)
3266             return (a ? VARSTRING_STRING_ARRAY : VARSTRING_STRING);
3267         if (l == SPOVAR_VARIABLE)
3268             return (a ? VARSTRING_VAR_ARRAY : VARSTRING_VAR);
3269         if (l == SPOVAR_COORD)
3270             return (a ? VARSTRING_COORD_ARRAY : VARSTRING_COORD);
3271         if (l == SPOVAR_REGION)
3272             return (a ? VARSTRING_REGION_ARRAY : VARSTRING_REGION);
3273         if (l == SPOVAR_MAPCHAR)
3274             return (a ? VARSTRING_MAPCHAR_ARRAY : VARSTRING_MAPCHAR);
3275         if (l == SPOVAR_MONST)
3276             return (a ? VARSTRING_MONST_ARRAY : VARSTRING_MONST);
3277         if (l == SPOVAR_OBJ)
3278             return (a ? VARSTRING_OBJ_ARRAY : VARSTRING_OBJ);
3279         if (l == SPOVAR_SEL)
3280             return (a ? VARSTRING_SEL_ARRAY : VARSTRING_SEL);
3281     }
3282     return VARSTRING;
3283 }
3284
3285 void
3286 newline()
3287 {
3288     nh_line_number++;
3289     token_start_pos = 0;
3290     (void) memset((genericptr_t) curr_token, 0, 512);
3291 }
3292
3293 void
3294 savetoken(s)
3295 char *s;
3296 {
3297     Sprintf(curr_token, "%s", s);
3298     advancepos(s);
3299 }
3300
3301 void
3302 advancepos(s)
3303 char *s;
3304 {
3305     token_start_pos += strlen(s);
3306 }
3307
3308 /*lev_comp.l*/
3309