Also fix Orctown probabilities; fixed support for snprintf; update Win32 makefile to allow level compiler use Conflicts: win/win32/levstuff.mak
3322 lines
96 KiB
C
3322 lines
96 KiB
C
/* A lexical scanner generated by flex */
|
|
|
|
/* Scanner skeleton version:
|
|
* $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
|
|
*/
|
|
|
|
#define FLEX_SCANNER
|
|
#define YY_FLEX_MAJOR_VERSION 2
|
|
#define YY_FLEX_MINOR_VERSION 5
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
|
|
#ifdef c_plusplus
|
|
#ifndef __cplusplus
|
|
#define __cplusplus
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
|
|
/* Use prototypes in function declarations. */
|
|
#define YY_USE_PROTOS
|
|
|
|
/* The "const" storage-class-modifier is valid. */
|
|
#define YY_USE_CONST
|
|
|
|
#else /* ! __cplusplus */
|
|
|
|
#if __STDC__
|
|
|
|
#define YY_USE_PROTOS
|
|
#define YY_USE_CONST
|
|
|
|
#endif /* __STDC__ */
|
|
#endif /* ! __cplusplus */
|
|
|
|
#ifdef __TURBOC__
|
|
#pragma warn -rch
|
|
#pragma warn -use
|
|
#include <io.h>
|
|
#include <stdlib.h>
|
|
#define YY_USE_CONST
|
|
#define YY_USE_PROTOS
|
|
#endif
|
|
|
|
#ifdef YY_USE_CONST
|
|
#define yyconst const
|
|
#else
|
|
#define yyconst
|
|
#endif
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
#define YY_PROTO(proto) proto
|
|
#else
|
|
#define YY_PROTO(proto) ()
|
|
#endif
|
|
|
|
/* Returned upon end-of-file. */
|
|
#define YY_NULL 0
|
|
|
|
/* Promotes a possibly negative, possibly signed char to an unsigned
|
|
* integer for use as an array index. If the signed char is negative,
|
|
* we want to instead treat it as an 8-bit unsigned char, hence the
|
|
* double cast.
|
|
*/
|
|
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
|
|
|
|
/* Enter a start condition. This macro really ought to take a parameter,
|
|
* but we do it the disgusting crufty way forced on us by the ()-less
|
|
* definition of BEGIN.
|
|
*/
|
|
#define BEGIN yy_start = 1 + 2 *
|
|
|
|
/* Translate the current start state into a value that can be later handed
|
|
* to BEGIN to return to the state. The YYSTATE alias is for lex
|
|
* compatibility.
|
|
*/
|
|
#define YY_START ((yy_start - 1) / 2)
|
|
#define YYSTATE YY_START
|
|
|
|
/* Action number for EOF rule of a given start state. */
|
|
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
|
|
|
/* Special action meaning "start processing a new file". */
|
|
#define YY_NEW_FILE yyrestart( yyin )
|
|
|
|
#define YY_END_OF_BUFFER_CHAR 0
|
|
|
|
/* Size of default input buffer. */
|
|
#define YY_BUF_SIZE 16384
|
|
|
|
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
|
|
|
extern int yyleng;
|
|
extern FILE *yyin, *yyout;
|
|
|
|
#define EOB_ACT_CONTINUE_SCAN 0
|
|
#define EOB_ACT_END_OF_FILE 1
|
|
#define EOB_ACT_LAST_MATCH 2
|
|
|
|
/* The funky do-while in the following #define is used to turn the definition
|
|
* int a single C statement (which needs a semi-colon terminator). This
|
|
* avoids problems with code like:
|
|
*
|
|
* if ( condition_holds )
|
|
* yyless( 5 );
|
|
* else
|
|
* do_something_else();
|
|
*
|
|
* Prior to using the do-while the compiler would get upset at the
|
|
* "else" because it interpreted the "if" statement as being all
|
|
* done when it reached the ';' after the yyless() call.
|
|
*/
|
|
|
|
/* Return all but the first 'n' matched characters back to the input stream. */
|
|
|
|
#define yyless(n) \
|
|
do \
|
|
{ \
|
|
/* Undo effects of setting up yytext. */ \
|
|
*yy_cp = yy_hold_char; \
|
|
YY_RESTORE_YY_MORE_OFFSET \
|
|
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
|
|
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
|
|
} \
|
|
while ( 0 )
|
|
|
|
#define unput(c) yyunput( c, yytext_ptr )
|
|
|
|
/* The following is because we cannot portably get our hands on size_t
|
|
* (without autoconf's help, which isn't available because we want
|
|
* flex-generated scanners to compile on their own).
|
|
*/
|
|
typedef unsigned int yy_size_t;
|
|
|
|
|
|
struct yy_buffer_state
|
|
{
|
|
FILE *yy_input_file;
|
|
|
|
char *yy_ch_buf; /* input buffer */
|
|
char *yy_buf_pos; /* current position in input buffer */
|
|
|
|
/* Size of input buffer in bytes, not including room for EOB
|
|
* characters.
|
|
*/
|
|
yy_size_t yy_buf_size;
|
|
|
|
/* Number of characters read into yy_ch_buf, not including EOB
|
|
* characters.
|
|
*/
|
|
int yy_n_chars;
|
|
|
|
/* Whether we "own" the buffer - i.e., we know we created it,
|
|
* and can realloc() it to grow it, and should free() it to
|
|
* delete it.
|
|
*/
|
|
int yy_is_our_buffer;
|
|
|
|
/* Whether this is an "interactive" input source; if so, and
|
|
* if we're using stdio for input, then we want to use getc()
|
|
* instead of fread(), to make sure we stop fetching input after
|
|
* each newline.
|
|
*/
|
|
int yy_is_interactive;
|
|
|
|
/* Whether we're considered to be at the beginning of a line.
|
|
* If so, '^' rules will be active on the next match, otherwise
|
|
* not.
|
|
*/
|
|
int yy_at_bol;
|
|
|
|
/* Whether to try to fill the input buffer when we reach the
|
|
* end of it.
|
|
*/
|
|
int yy_fill_buffer;
|
|
|
|
int yy_buffer_status;
|
|
#define YY_BUFFER_NEW 0
|
|
#define YY_BUFFER_NORMAL 1
|
|
/* When an EOF's been seen but there's still some text to process
|
|
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
|
|
* shouldn't try reading from the input source any more. We might
|
|
* still have a bunch of tokens to match, though, because of
|
|
* possible backing-up.
|
|
*
|
|
* When we actually see the EOF, we change the status to "new"
|
|
* (via yyrestart()), so that the user can continue scanning by
|
|
* just pointing yyin at a new input file.
|
|
*/
|
|
#define YY_BUFFER_EOF_PENDING 2
|
|
};
|
|
|
|
static YY_BUFFER_STATE yy_current_buffer = 0;
|
|
|
|
/* We provide macros for accessing buffer states in case in the
|
|
* future we want to put the buffer states in a more general
|
|
* "scanner state".
|
|
*/
|
|
#define YY_CURRENT_BUFFER yy_current_buffer
|
|
|
|
|
|
/* yy_hold_char holds the character lost when yytext is formed. */
|
|
static char yy_hold_char;
|
|
|
|
static int yy_n_chars; /* number of characters read into yy_ch_buf */
|
|
|
|
|
|
int yyleng;
|
|
|
|
/* Points to current character in buffer. */
|
|
static char *yy_c_buf_p = (char *) 0;
|
|
static int yy_init = 1; /* whether we need to initialize */
|
|
static int yy_start = 0; /* start state number */
|
|
|
|
/* Flag which is used to allow yywrap()'s to do buffer switches
|
|
* instead of setting up a fresh yyin. A bit of a hack ...
|
|
*/
|
|
static int yy_did_buffer_switch_on_eof;
|
|
|
|
void yyrestart YY_PROTO(( FILE *input_file ));
|
|
|
|
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
|
|
void yy_load_buffer_state YY_PROTO(( void ));
|
|
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
|
|
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
|
|
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
|
|
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
|
|
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
|
|
|
|
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
|
|
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
|
|
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
|
|
|
|
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
|
|
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
|
|
static void yy_flex_free YY_PROTO(( void * ));
|
|
|
|
#define yy_new_buffer yy_create_buffer
|
|
|
|
#define yy_set_interactive(is_interactive) \
|
|
{ \
|
|
if ( ! yy_current_buffer ) \
|
|
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
|
yy_current_buffer->yy_is_interactive = is_interactive; \
|
|
}
|
|
|
|
#define yy_set_bol(at_bol) \
|
|
{ \
|
|
if ( ! yy_current_buffer ) \
|
|
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
|
yy_current_buffer->yy_at_bol = at_bol; \
|
|
}
|
|
|
|
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
|
|
|
|
typedef unsigned char YY_CHAR;
|
|
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
|
|
typedef int yy_state_type;
|
|
extern char *yytext;
|
|
#define yytext_ptr yytext
|
|
|
|
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
|
|
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
|
|
static int yy_get_next_buffer YY_PROTO(( void ));
|
|
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
|
|
|
|
/* Done after the current pattern has been matched and before the
|
|
* corresponding action - sets up yytext.
|
|
*/
|
|
#define YY_DO_BEFORE_ACTION \
|
|
yytext_ptr = yy_bp; \
|
|
yyleng = (int) (yy_cp - yy_bp); \
|
|
yy_hold_char = *yy_cp; \
|
|
*yy_cp = '\0'; \
|
|
yy_c_buf_p = yy_cp;
|
|
|
|
#define YY_NUM_RULES 195
|
|
#define YY_END_OF_BUFFER 196
|
|
static yyconst short int yy_accept[1038] =
|
|
{ 0,
|
|
0, 0, 0, 0, 196, 194, 190, 189, 194, 194,
|
|
194, 194, 194, 194, 193, 179, 187, 194, 188, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 194, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
190, 194, 193, 2, 194, 190, 194, 194, 193, 179,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 190, 194, 193, 190, 189, 183,
|
|
0, 180, 181, 0, 0, 177, 193, 176, 178, 179,
|
|
|
|
193, 185, 184, 182, 186, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 39, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 55, 193, 193, 0, 0, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 153, 193, 193, 190, 0, 0,
|
|
3, 193, 2, 2, 0, 190, 0, 177, 193, 176,
|
|
179, 193, 193, 193, 193, 193, 39, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 190, 0, 2, 0,
|
|
0, 193, 192, 0, 192, 174, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 54,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
|
|
193, 193, 0, 193, 103, 193, 83, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 79, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 81, 193, 193, 193, 138,
|
|
193, 193, 193, 193, 127, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 16, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 125, 193, 193, 193,
|
|
|
|
193, 193, 193, 193, 193, 80, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 191, 193, 193,
|
|
193, 58, 193, 193, 193, 22, 193, 40, 193, 41,
|
|
193, 193, 193, 193, 49, 193, 193, 193, 193, 56,
|
|
6, 193, 193, 193, 53, 193, 193, 193, 36, 193,
|
|
193, 193, 193, 42, 193, 35, 193, 193, 193, 193,
|
|
193, 21, 193, 0, 175, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 159, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 154, 157, 113,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
|
|
193, 193, 69, 193, 193, 193, 193, 193, 193, 193,
|
|
120, 193, 193, 67, 193, 193, 193, 193, 160, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 118, 193,
|
|
193, 193, 106, 193, 193, 193, 193, 193, 193, 193,
|
|
65, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 156,
|
|
193, 193, 193, 193, 193, 115, 15, 0, 193, 193,
|
|
193, 193, 193, 193, 2, 0, 28, 193, 59, 193,
|
|
193, 193, 193, 193, 13, 193, 193, 193, 50, 193,
|
|
193, 7, 193, 193, 193, 193, 5, 193, 193, 193,
|
|
|
|
193, 193, 193, 193, 193, 193, 30, 193, 193, 193,
|
|
193, 193, 119, 152, 193, 193, 193, 146, 193, 193,
|
|
161, 193, 193, 193, 193, 193, 140, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 155, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 11, 193, 193, 193, 193, 193, 193, 193, 112,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 124, 193, 12, 193, 193, 193, 193, 193,
|
|
193, 193, 82, 114, 193, 193, 193, 193, 193, 193,
|
|
|
|
193, 193, 128, 193, 193, 193, 193, 193, 33, 193,
|
|
193, 193, 193, 193, 193, 193, 193, 193, 29, 193,
|
|
193, 193, 193, 193, 193, 17, 31, 193, 27, 193,
|
|
193, 193, 193, 57, 193, 193, 193, 193, 145, 96,
|
|
193, 193, 126, 110, 86, 193, 122, 72, 107, 193,
|
|
193, 193, 164, 193, 193, 87, 193, 93, 129, 193,
|
|
74, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 193, 193, 134, 193, 193, 108, 193, 193, 193,
|
|
193, 193, 193, 193, 193, 193, 109, 167, 193, 193,
|
|
16, 193, 193, 193, 193, 77, 193, 116, 193, 193,
|
|
|
|
193, 193, 193, 111, 193, 193, 193, 151, 172, 193,
|
|
78, 193, 193, 193, 193, 193, 193, 193, 193, 1,
|
|
193, 57, 193, 193, 193, 60, 193, 193, 193, 193,
|
|
193, 193, 193, 4, 193, 19, 193, 193, 193, 193,
|
|
193, 62, 43, 193, 46, 26, 193, 162, 98, 193,
|
|
193, 193, 193, 73, 158, 193, 193, 97, 193, 193,
|
|
193, 92, 193, 193, 193, 193, 144, 193, 193, 193,
|
|
135, 193, 193, 193, 193, 193, 20, 63, 139, 137,
|
|
193, 193, 193, 193, 193, 193, 193, 117, 193, 131,
|
|
95, 193, 150, 193, 193, 193, 193, 100, 47, 89,
|
|
|
|
193, 193, 193, 193, 193, 26, 193, 45, 193, 193,
|
|
34, 61, 14, 8, 25, 193, 193, 193, 193, 193,
|
|
23, 193, 168, 193, 193, 193, 101, 193, 66, 193,
|
|
75, 193, 193, 193, 193, 193, 193, 193, 193, 193,
|
|
193, 149, 9, 193, 193, 193, 193, 143, 193, 85,
|
|
68, 193, 71, 193, 193, 193, 193, 163, 130, 133,
|
|
193, 105, 18, 193, 51, 193, 193, 193, 193, 193,
|
|
193, 94, 141, 193, 193, 70, 173, 121, 193, 166,
|
|
193, 91, 132, 84, 147, 148, 170, 193, 193, 99,
|
|
171, 90, 193, 64, 193, 10, 136, 24, 52, 193,
|
|
|
|
193, 193, 193, 193, 76, 88, 123, 104, 193, 165,
|
|
102, 193, 193, 193, 193, 193, 193, 193, 193, 37,
|
|
38, 193, 193, 193, 142, 169, 193, 193, 193, 193,
|
|
193, 193, 193, 48, 32, 44, 0
|
|
} ;
|
|
|
|
static yyconst int yy_ec[256] =
|
|
{ 0,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
|
1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 5, 6, 7, 8, 9, 10, 1, 11, 1,
|
|
1, 1, 12, 1, 13, 14, 1, 15, 15, 15,
|
|
15, 15, 15, 15, 15, 15, 15, 1, 1, 16,
|
|
17, 18, 1, 1, 19, 20, 21, 22, 23, 24,
|
|
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
|
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
|
|
45, 46, 47, 1, 48, 1, 49, 50, 51, 52,
|
|
|
|
53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
|
|
63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
|
|
73, 74, 14, 14, 14, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1
|
|
} ;
|
|
|
|
static yyconst int yy_meta[75] =
|
|
{ 0,
|
|
1, 2, 3, 2, 2, 1, 1, 2, 1, 1,
|
|
1, 2, 4, 2, 4, 1, 1, 1, 5, 5,
|
|
5, 6, 6, 5, 6, 5, 5, 6, 5, 5,
|
|
5, 6, 6, 5, 6, 6, 5, 5, 5, 6,
|
|
5, 6, 5, 6, 1, 2, 1, 6, 6, 6,
|
|
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
|
|
6, 6, 6, 6, 6, 6, 6, 5, 6, 6,
|
|
6, 5, 6, 6
|
|
} ;
|
|
|
|
static yyconst short int yy_base[1045] =
|
|
{ 0,
|
|
0, 73, 102, 77, 1276, 1277, 75, 1277, 1272, 1257,
|
|
1266, 0, 1226, 1256, 1255, 78, 66, 1252, 1251, 1237,
|
|
1230, 57, 63, 59, 64, 101, 0, 63, 79, 119,
|
|
94, 1245, 1231, 128, 127, 126, 1244, 104, 109, 118,
|
|
133, 94, 139, 151, 1196, 95, 111, 1198, 157, 146,
|
|
163, 100, 164, 1191, 166, 169, 178, 56, 1206, 1205,
|
|
219, 1254, 216, 1277, 1253, 243, 248, 251, 264, 223,
|
|
168, 120, 241, 229, 267, 1240, 249, 289, 294, 152,
|
|
299, 308, 221, 296, 343, 360, 301, 260, 1277, 1277,
|
|
1247, 1277, 0, 1242, 1241, 1236, 0, 1235, 1277, 277,
|
|
|
|
1234, 1277, 1277, 1277, 1277, 1210, 296, 1210, 303, 1222,
|
|
1212, 1225, 1206, 1217, 1214, 1221, 250, 1207, 1205, 1207,
|
|
1217, 0, 1208, 1212, 1193, 1199, 1187, 1193, 1197, 1196,
|
|
1196, 160, 1198, 263, 1193, 308, 1191, 1184, 1190, 1202,
|
|
1200, 1192, 227, 0, 1199, 1187, 192, 340, 301, 1143,
|
|
1165, 1154, 1160, 1163, 303, 1143, 1147, 1143, 1146, 1145,
|
|
1157, 1139, 1141, 321, 1137, 1131, 1128, 1133, 1132, 1138,
|
|
1142, 1133, 1135, 1133, 1133, 217, 304, 311, 341, 1122,
|
|
1125, 1133, 1118, 188, 334, 1137, 350, 26, 1125, 1124,
|
|
1124, 1115, 363, 1125, 1129, 1115, 1131, 1126, 1129, 326,
|
|
|
|
363, 1122, 1124, 1120, 1112, 366, 357, 283, 1104, 1103,
|
|
1105, 1106, 336, 376, 0, 1103, 325, 433, 1165, 1164,
|
|
1277, 366, 1277, 1277, 1163, 440, 444, 447, 1150, 0,
|
|
406, 422, 339, 430, 438, 140, 1149, 439, 424, 441,
|
|
425, 444, 448, 450, 303, 451, 475, 0, 1277, 1160,
|
|
0, 454, 1277, 1151, 1150, 1145, 1140, 1126, 1138, 1133,
|
|
1117, 1118, 1134, 1116, 1110, 1127, 1113, 1110, 1122, 0,
|
|
1114, 1124, 1113, 1121, 1102, 1103, 1118, 1116, 1104, 1114,
|
|
1099, 1112, 1097, 1110, 1113, 1083, 1107, 1099, 1090, 1105,
|
|
1099, 1095, 1093, 1099, 1093, 1094, 1084, 1081, 1095, 1081,
|
|
|
|
1082, 1085, 466, 1059, 0, 1064, 0, 1049, 1058, 1048,
|
|
1050, 1041, 1045, 1043, 1037, 1045, 425, 1052, 1034, 1038,
|
|
1049, 1032, 1038, 1033, 1042, 1028, 1032, 0, 1025, 1024,
|
|
1034, 1024, 1037, 1021, 1038, 424, 1033, 1022, 420, 1035,
|
|
1012, 1028, 1029, 1023, 1011, 0, 1021, 1024, 1014, 0,
|
|
1007, 1008, 1016, 1019, 0, 1012, 1017, 1006, 1018, 1008,
|
|
1013, 1012, 407, 1011, 995, 1002, 998, 999, 438, 991,
|
|
1005, 1004, 994, 1006, 1003, 992, 990, 994, 998, 429,
|
|
980, 991, 991, 995, 976, 993, 977, 980, 988, 974,
|
|
436, 982, 970, 988, 974, 969, 0, 970, 980, 963,
|
|
|
|
974, 967, 972, 960, 959, 0, 491, 481, 486, 995,
|
|
487, 490, 488, 471, 489, 491, 507, 1277, 989, 1003,
|
|
994, 0, 1003, 994, 981, 0, 999, 0, 999, 0,
|
|
980, 978, 977, 991, 0, 990, 964, 988, 980, 0,
|
|
968, 989, 971, 968, 0, 971, 486, 983, 0, 984,
|
|
969, 968, 981, 977, 974, 0, 961, 963, 974, 960,
|
|
974, 0, 965, 511, 1277, 929, 924, 923, 935, 932,
|
|
933, 918, 932, 931, 919, 928, 927, 0, 926, 925,
|
|
910, 916, 922, 917, 913, 903, 918, 0, 0, 0,
|
|
906, 920, 915, 914, 906, 464, 912, 907, 911, 905,
|
|
|
|
908, 893, 0, 946, 904, 883, 899, 888, 899, 900,
|
|
0, 899, 883, 0, 897, 900, 886, 889, 0, 463,
|
|
879, 877, 871, 877, 885, 878, 891, 876, 0, 882,
|
|
877, 885, 0, 875, 881, 884, 864, 882, 465, 881,
|
|
0, 869, 858, 859, 863, 872, 856, 870, 874, 870,
|
|
852, 857, 849, 865, 860, 849, 852, 864, 848, 0,
|
|
845, 850, 852, 458, 851, 0, 1277, 904, 509, 887,
|
|
514, 516, 518, 517, 1277, 902, 0, 878, 0, 876,
|
|
880, 871, 864, 859, 0, 879, 870, 858, 0, 864,
|
|
858, 0, 874, 867, 872, 867, 0, 862, 869, 849,
|
|
|
|
856, 854, 852, 862, 849, 851, 0, 847, 853, 845,
|
|
850, 852, 0, 0, 822, 810, 820, 0, 819, 818,
|
|
0, 809, 807, 816, 807, 800, 0, 812, 812, 808,
|
|
809, 794, 808, 792, 788, 482, 0, 804, 804, 802,
|
|
788, 791, 798, 798, 777, 796, 475, 788, 784, 786,
|
|
788, 775, 791, 787, 788, 788, 771, 771, 784, 770,
|
|
782, 0, 781, 769, 783, 776, 764, 765, 779, 0,
|
|
774, 758, 752, 770, 759, 765, 761, 763, 758, 752,
|
|
768, 763, 0, 752, 0, 745, 745, 744, 743, 743,
|
|
756, 756, 753, 0, 753, 752, 747, 750, 735, 741,
|
|
|
|
738, 742, 0, 747, 763, 521, 522, 525, 0, 764,
|
|
762, 756, 766, 765, 764, 757, 753, 769, 0, 757,
|
|
763, 755, 748, 758, 745, 0, 0, 733, 0, 757,
|
|
743, 734, 80, 0, 386, 510, 500, 498, 0, 0,
|
|
498, 501, 0, 0, 0, 494, 0, 0, 0, 493,
|
|
495, 504, 0, 506, 507, 0, 495, 0, 0, 511,
|
|
0, 508, 507, 503, 517, 515, 515, 512, 507, 509,
|
|
519, 523, 514, 0, 518, 524, 0, 508, 510, 528,
|
|
523, 511, 516, 530, 524, 523, 0, 0, 526, 523,
|
|
0, 514, 520, 526, 523, 0, 530, 548, 539, 529,
|
|
|
|
544, 531, 537, 0, 533, 543, 544, 0, 0, 545,
|
|
0, 551, 542, 553, 553, 554, 555, 541, 561, 0,
|
|
596, 597, 598, 591, 579, 0, 594, 585, 586, 588,
|
|
578, 588, 594, 0, 597, 0, 600, 589, 606, 580,
|
|
593, 0, 0, 592, 0, 0, 571, 0, 0, 579,
|
|
580, 581, 583, 0, 0, 573, 569, 0, 578, 571,
|
|
574, 0, 588, 588, 581, 577, 0, 586, 598, 585,
|
|
0, 583, 597, 583, 600, 600, 0, 0, 0, 0,
|
|
597, 592, 603, 597, 605, 586, 607, 1277, 608, 0,
|
|
0, 610, 0, 614, 601, 610, 606, 0, 0, 0,
|
|
|
|
615, 616, 617, 617, 611, 657, 637, 0, 649, 650,
|
|
0, 0, 0, 0, 0, 632, 658, 637, 646, 642,
|
|
0, 633, 0, 630, 631, 622, 0, 622, 0, 626,
|
|
0, 635, 620, 633, 624, 642, 639, 627, 632, 642,
|
|
630, 0, 0, 637, 643, 633, 648, 0, 649, 0,
|
|
0, 650, 0, 639, 642, 649, 646, 0, 0, 0,
|
|
655, 0, 0, 685, 0, 686, 690, 692, 676, 690,
|
|
678, 0, 0, 647, 662, 0, 0, 0, 649, 0,
|
|
658, 0, 0, 0, 0, 0, 0, 657, 652, 0,
|
|
0, 0, 654, 0, 654, 0, 0, 0, 0, 693,
|
|
|
|
694, 689, 690, 704, 0, 0, 0, 0, 675, 0,
|
|
0, 676, 707, 701, 705, 697, 709, 683, 684, 0,
|
|
0, 715, 719, 712, 0, 0, 707, 714, 709, 707,
|
|
712, 713, 709, 0, 0, 0, 1277, 746, 748, 754,
|
|
757, 763, 768, 773
|
|
} ;
|
|
|
|
static yyconst short int yy_def[1045] =
|
|
{ 0,
|
|
1037, 1, 1, 3, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
1038, 1039, 1040, 1037, 1041, 1041, 1037, 1037, 1037, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1037, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1037, 1042, 1041, 1037, 1037, 1043, 1043, 1043, 1041, 69,
|
|
69, 69, 69, 1041, 69, 69, 69, 69, 69, 69,
|
|
69, 69, 69, 69, 1043, 1042, 69, 1037, 1037, 1037,
|
|
1038, 1037, 1039, 1037, 1044, 1037, 1041, 1041, 1037, 1041,
|
|
|
|
1041, 1037, 1037, 1037, 1037, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1037, 1037, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1037, 1042, 1042,
|
|
1037, 1041, 1037, 1037, 1037, 1043, 1043, 1043, 69, 69,
|
|
69, 69, 69, 1041, 69, 69, 69, 69, 69, 69,
|
|
69, 69, 69, 69, 69, 69, 1043, 86, 1037, 1042,
|
|
86, 69, 1037, 1037, 1037, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
|
|
1041, 1041, 1037, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 69, 69, 1041,
|
|
69, 69, 69, 69, 69, 69, 69, 1037, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1037, 1037, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1037, 1037, 69, 1041,
|
|
69, 69, 69, 69, 1037, 1037, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
|
|
1041, 1041, 1041, 1041, 1041, 69, 69, 69, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
69, 69, 69, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1037, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
|
|
1041, 1041, 1041, 1041, 1041, 69, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041, 1041,
|
|
1041, 1041, 1041, 1041, 1041, 1041, 0, 1037, 1037, 1037,
|
|
1037, 1037, 1037, 1037
|
|
} ;
|
|
|
|
static yyconst short int yy_nxt[1352] =
|
|
{ 0,
|
|
6, 7, 8, 9, 7, 10, 11, 6, 12, 6,
|
|
13, 14, 15, 6, 16, 17, 18, 19, 20, 21,
|
|
22, 23, 24, 25, 26, 27, 28, 27, 27, 29,
|
|
30, 31, 32, 33, 27, 34, 35, 36, 27, 27,
|
|
37, 27, 27, 27, 38, 6, 6, 27, 39, 40,
|
|
41, 42, 43, 44, 45, 46, 47, 48, 27, 49,
|
|
50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
|
60, 27, 27, 27, 61, 108, 88, 61, 61, 88,
|
|
62, 85, 102, 103, 86, 110, 122, 99, 113, 109,
|
|
114, 360, 100, 116, 123, 111, 117, 124, 112, 361,
|
|
|
|
115, 125, 118, 63, 64, 65, 66, 87, 147, 67,
|
|
843, 126, 131, 68, 69, 67, 70, 214, 148, 215,
|
|
71, 72, 73, 119, 74, 75, 132, 76, 77, 101,
|
|
76, 78, 79, 120, 229, 80, 121, 127, 81, 82,
|
|
76, 128, 83, 178, 76, 129, 135, 67, 143, 194,
|
|
136, 130, 138, 139, 229, 107, 166, 179, 144, 167,
|
|
137, 145, 168, 195, 140, 141, 229, 142, 149, 84,
|
|
150, 272, 180, 76, 151, 152, 181, 155, 153, 154,
|
|
156, 159, 229, 157, 134, 160, 158, 169, 161, 162,
|
|
285, 286, 163, 187, 188, 164, 147, 232, 170, 173,
|
|
|
|
171, 165, 189, 174, 172, 183, 148, 175, 190, 184,
|
|
176, 191, 196, 185, 200, 192, 197, 205, 201, 186,
|
|
218, 206, 202, 218, 207, 193, 219, 203, 204, 198,
|
|
211, 208, 99, 209, 222, 229, 210, 231, 128, 246,
|
|
212, 351, 129, 213, 88, 224, 225, 226, 130, 1037,
|
|
224, 225, 1037, 224, 225, 229, 299, 352, 113, 233,
|
|
234, 88, 300, 229, 88, 228, 224, 225, 227, 337,
|
|
115, 227, 237, 109, 101, 227, 229, 227, 230, 338,
|
|
123, 229, 229, 229, 229, 270, 99, 229, 271, 229,
|
|
229, 100, 229, 229, 229, 288, 235, 229, 289, 117,
|
|
|
|
229, 229, 229, 229, 229, 236, 229, 238, 229, 227,
|
|
229, 125, 239, 229, 258, 229, 128, 229, 259, 252,
|
|
240, 126, 229, 128, 241, 242, 130, 240, 101, 415,
|
|
143, 229, 291, 130, 261, 229, 243, 244, 262, 245,
|
|
144, 292, 392, 145, 218, 224, 225, 247, 211, 303,
|
|
248, 393, 339, 229, 148, 312, 340, 304, 212, 313,
|
|
305, 213, 249, 250, 251, 314, 341, 251, 306, 323,
|
|
342, 251, 251, 251, 251, 409, 343, 378, 251, 251,
|
|
251, 324, 325, 251, 398, 251, 251, 379, 251, 251,
|
|
251, 405, 406, 251, 353, 354, 251, 251, 251, 407,
|
|
|
|
251, 355, 251, 357, 399, 251, 344, 345, 346, 280,
|
|
358, 366, 359, 380, 367, 99, 387, 381, 388, 390,
|
|
231, 844, 391, 368, 369, 389, 400, 251, 370, 401,
|
|
371, 251, 382, 402, 218, 403, 229, 218, 229, 229,
|
|
219, 88, 224, 225, 226, 1037, 224, 225, 1037, 224,
|
|
225, 410, 229, 229, 267, 229, 411, 101, 229, 408,
|
|
277, 228, 229, 412, 229, 229, 413, 280, 229, 414,
|
|
464, 500, 282, 522, 523, 295, 218, 224, 225, 247,
|
|
416, 477, 248, 496, 540, 229, 478, 417, 528, 501,
|
|
529, 497, 552, 567, 568, 229, 541, 280, 553, 569,
|
|
|
|
229, 229, 229, 229, 229, 229, 458, 598, 422, 575,
|
|
576, 431, 465, 571, 572, 464, 639, 660, 702, 599,
|
|
574, 229, 661, 229, 678, 703, 573, 679, 229, 640,
|
|
229, 229, 229, 756, 767, 229, 229, 706, 707, 229,
|
|
768, 845, 846, 708, 577, 757, 847, 822, 823, 848,
|
|
821, 607, 849, 850, 851, 852, 853, 465, 854, 855,
|
|
856, 857, 858, 859, 860, 861, 862, 863, 864, 865,
|
|
866, 867, 868, 869, 870, 871, 872, 873, 874, 875,
|
|
876, 877, 878, 879, 880, 881, 882, 883, 884, 885,
|
|
886, 887, 888, 889, 890, 891, 892, 893, 894, 895,
|
|
|
|
896, 897, 898, 899, 900, 901, 902, 903, 904, 905,
|
|
229, 229, 229, 907, 908, 909, 910, 911, 842, 912,
|
|
913, 914, 915, 916, 917, 918, 919, 920, 921, 922,
|
|
923, 924, 925, 926, 927, 928, 929, 930, 931, 932,
|
|
906, 933, 934, 935, 936, 937, 938, 939, 940, 941,
|
|
942, 943, 944, 945, 946, 947, 948, 949, 950, 951,
|
|
952, 953, 954, 955, 956, 957, 958, 959, 960, 961,
|
|
962, 229, 963, 964, 965, 966, 967, 968, 969, 970,
|
|
971, 972, 973, 974, 975, 976, 977, 978, 979, 980,
|
|
981, 982, 983, 984, 985, 986, 987, 988, 989, 990,
|
|
|
|
991, 992, 993, 994, 995, 996, 997, 998, 999, 1000,
|
|
1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010,
|
|
1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020,
|
|
1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030,
|
|
1031, 1032, 1033, 1034, 1035, 1036, 91, 91, 91, 91,
|
|
91, 91, 93, 93, 94, 94, 842, 94, 94, 94,
|
|
97, 97, 97, 220, 220, 220, 220, 220, 220, 227,
|
|
227, 227, 227, 254, 254, 841, 254, 254, 254, 840,
|
|
839, 838, 837, 836, 835, 834, 833, 832, 831, 830,
|
|
829, 828, 827, 826, 825, 824, 820, 819, 818, 817,
|
|
|
|
816, 815, 814, 813, 812, 811, 810, 809, 808, 807,
|
|
806, 805, 804, 803, 802, 801, 800, 799, 798, 797,
|
|
796, 795, 794, 793, 792, 791, 790, 789, 788, 787,
|
|
786, 785, 784, 783, 782, 781, 780, 779, 778, 777,
|
|
776, 775, 774, 773, 772, 771, 770, 769, 766, 765,
|
|
764, 763, 762, 761, 760, 759, 758, 755, 754, 753,
|
|
752, 751, 750, 749, 748, 747, 746, 745, 744, 743,
|
|
742, 741, 740, 739, 738, 737, 736, 735, 734, 733,
|
|
732, 731, 730, 729, 728, 727, 726, 725, 724, 723,
|
|
722, 721, 720, 719, 718, 717, 716, 715, 714, 713,
|
|
|
|
712, 711, 710, 709, 575, 705, 567, 704, 701, 700,
|
|
699, 698, 697, 696, 695, 694, 693, 692, 691, 690,
|
|
689, 688, 687, 686, 685, 684, 683, 682, 681, 680,
|
|
677, 676, 675, 674, 673, 672, 671, 670, 669, 668,
|
|
667, 666, 665, 664, 663, 662, 659, 658, 657, 656,
|
|
655, 654, 653, 652, 651, 650, 649, 648, 647, 646,
|
|
645, 644, 643, 642, 641, 638, 637, 636, 635, 634,
|
|
633, 632, 631, 630, 629, 628, 627, 626, 625, 624,
|
|
623, 622, 621, 620, 619, 618, 617, 616, 615, 614,
|
|
613, 612, 611, 610, 609, 608, 607, 606, 605, 604,
|
|
|
|
603, 602, 601, 600, 597, 596, 595, 594, 593, 592,
|
|
591, 590, 589, 588, 587, 586, 585, 584, 583, 582,
|
|
581, 580, 579, 578, 577, 570, 566, 565, 564, 563,
|
|
562, 561, 560, 559, 558, 557, 556, 555, 554, 551,
|
|
550, 549, 548, 547, 546, 545, 544, 543, 542, 539,
|
|
538, 537, 536, 535, 534, 533, 532, 531, 530, 527,
|
|
526, 525, 524, 445, 521, 520, 519, 518, 517, 516,
|
|
515, 514, 513, 512, 511, 510, 509, 508, 507, 506,
|
|
505, 504, 503, 502, 499, 498, 495, 494, 493, 492,
|
|
491, 490, 489, 488, 487, 486, 485, 484, 483, 482,
|
|
|
|
481, 480, 479, 476, 475, 474, 473, 472, 471, 470,
|
|
469, 468, 467, 466, 463, 462, 461, 460, 459, 458,
|
|
457, 456, 455, 454, 453, 452, 451, 450, 449, 448,
|
|
447, 446, 445, 444, 443, 442, 441, 440, 439, 438,
|
|
437, 436, 435, 434, 433, 432, 431, 430, 429, 428,
|
|
427, 426, 425, 424, 423, 422, 421, 420, 419, 256,
|
|
418, 418, 249, 229, 229, 224, 221, 221, 404, 397,
|
|
396, 395, 394, 386, 385, 384, 383, 377, 376, 375,
|
|
374, 373, 372, 365, 364, 363, 362, 356, 350, 349,
|
|
348, 347, 336, 335, 334, 333, 332, 331, 330, 329,
|
|
|
|
328, 327, 326, 322, 321, 320, 319, 318, 317, 316,
|
|
315, 311, 310, 309, 308, 307, 302, 301, 298, 297,
|
|
296, 295, 294, 293, 290, 287, 284, 283, 282, 281,
|
|
280, 279, 278, 277, 276, 275, 274, 273, 272, 269,
|
|
268, 267, 266, 265, 264, 263, 260, 257, 256, 98,
|
|
96, 255, 253, 92, 229, 223, 221, 217, 216, 199,
|
|
182, 177, 146, 134, 133, 107, 106, 105, 104, 98,
|
|
96, 95, 92, 90, 89, 1037, 5, 1037, 1037, 1037,
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
1037
|
|
} ;
|
|
|
|
static yyconst short int yy_chk[1352] =
|
|
{ 0,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 2, 22, 7, 2, 4, 7,
|
|
2, 4, 17, 17, 4, 23, 28, 16, 24, 22,
|
|
24, 188, 16, 25, 28, 23, 25, 29, 23, 188,
|
|
|
|
24, 29, 25, 2, 3, 3, 3, 4, 38, 3,
|
|
733, 29, 31, 3, 3, 3, 3, 58, 38, 58,
|
|
3, 3, 3, 26, 3, 3, 31, 3, 3, 16,
|
|
3, 3, 3, 26, 72, 3, 26, 30, 3, 3,
|
|
3, 30, 3, 46, 3, 30, 34, 3, 36, 52,
|
|
34, 30, 35, 35, 236, 72, 42, 46, 36, 42,
|
|
34, 36, 42, 52, 35, 35, 80, 35, 39, 3,
|
|
39, 236, 47, 3, 39, 39, 47, 40, 39, 39,
|
|
40, 41, 71, 40, 80, 41, 40, 43, 41, 41,
|
|
132, 132, 41, 50, 50, 41, 147, 71, 43, 44,
|
|
|
|
43, 41, 50, 44, 43, 49, 147, 44, 50, 49,
|
|
44, 51, 53, 49, 55, 51, 53, 56, 55, 49,
|
|
61, 56, 55, 61, 56, 51, 61, 55, 55, 53,
|
|
57, 56, 70, 56, 63, 83, 56, 70, 63, 83,
|
|
57, 184, 63, 57, 66, 66, 66, 66, 63, 67,
|
|
67, 67, 68, 68, 68, 73, 143, 184, 74, 73,
|
|
74, 88, 143, 77, 88, 68, 69, 69, 69, 176,
|
|
74, 69, 77, 73, 70, 69, 69, 69, 69, 176,
|
|
77, 75, 69, 69, 69, 117, 100, 69, 117, 69,
|
|
69, 100, 69, 69, 69, 134, 75, 69, 134, 75,
|
|
|
|
69, 69, 69, 78, 69, 75, 69, 78, 79, 69,
|
|
84, 78, 79, 81, 107, 87, 79, 245, 107, 87,
|
|
79, 78, 82, 87, 81, 81, 79, 87, 100, 245,
|
|
82, 69, 136, 87, 109, 69, 81, 81, 109, 81,
|
|
82, 136, 208, 82, 85, 85, 85, 85, 84, 148,
|
|
85, 208, 177, 233, 148, 155, 177, 149, 84, 155,
|
|
149, 84, 86, 86, 86, 155, 177, 86, 149, 164,
|
|
178, 86, 86, 86, 86, 233, 178, 200, 86, 86,
|
|
86, 164, 164, 86, 213, 86, 86, 200, 86, 86,
|
|
86, 217, 217, 86, 185, 185, 86, 86, 86, 222,
|
|
|
|
86, 185, 86, 187, 213, 86, 179, 179, 179, 222,
|
|
187, 193, 187, 201, 193, 231, 206, 201, 206, 207,
|
|
231, 735, 207, 193, 193, 206, 214, 86, 193, 214,
|
|
193, 86, 201, 214, 218, 214, 232, 218, 239, 241,
|
|
218, 226, 226, 226, 226, 227, 227, 227, 228, 228,
|
|
228, 234, 235, 238, 234, 240, 235, 231, 242, 232,
|
|
238, 228, 243, 241, 244, 246, 243, 239, 252, 244,
|
|
303, 339, 240, 363, 363, 242, 247, 247, 247, 247,
|
|
246, 317, 247, 336, 380, 414, 317, 252, 369, 339,
|
|
369, 336, 391, 407, 407, 408, 380, 252, 391, 408,
|
|
|
|
409, 411, 413, 415, 412, 416, 414, 447, 409, 417,
|
|
417, 411, 303, 412, 413, 464, 496, 520, 564, 447,
|
|
416, 417, 520, 569, 539, 564, 415, 539, 571, 496,
|
|
572, 574, 573, 636, 647, 706, 707, 571, 573, 708,
|
|
647, 736, 737, 574, 569, 636, 738, 707, 708, 741,
|
|
706, 572, 742, 746, 750, 751, 752, 464, 754, 755,
|
|
757, 760, 762, 763, 764, 765, 766, 767, 768, 769,
|
|
770, 771, 772, 773, 775, 776, 778, 779, 780, 781,
|
|
782, 783, 784, 785, 786, 789, 790, 792, 793, 794,
|
|
795, 797, 798, 799, 800, 801, 802, 803, 805, 806,
|
|
|
|
807, 810, 812, 813, 814, 815, 816, 817, 818, 819,
|
|
821, 822, 823, 824, 825, 827, 828, 829, 821, 830,
|
|
831, 832, 833, 835, 837, 838, 839, 840, 841, 844,
|
|
847, 850, 851, 852, 853, 856, 857, 859, 860, 861,
|
|
823, 863, 864, 865, 866, 868, 869, 870, 872, 873,
|
|
874, 875, 876, 881, 882, 883, 884, 885, 886, 887,
|
|
889, 892, 894, 895, 896, 897, 901, 902, 903, 904,
|
|
905, 906, 907, 909, 910, 916, 917, 918, 919, 920,
|
|
922, 924, 925, 926, 928, 930, 932, 933, 934, 935,
|
|
936, 937, 938, 939, 940, 941, 944, 945, 946, 947,
|
|
|
|
949, 952, 954, 955, 956, 957, 961, 964, 966, 967,
|
|
968, 969, 970, 971, 974, 975, 979, 981, 988, 989,
|
|
993, 995, 1000, 1001, 1002, 1003, 1004, 1009, 1012, 1013,
|
|
1014, 1015, 1016, 1017, 1018, 1019, 1022, 1023, 1024, 1027,
|
|
1028, 1029, 1030, 1031, 1032, 1033, 1038, 1038, 1038, 1038,
|
|
1038, 1038, 1039, 1039, 1040, 1040, 732, 1040, 1040, 1040,
|
|
1041, 1041, 1041, 1042, 1042, 1042, 1042, 1042, 1042, 1043,
|
|
1043, 1043, 1043, 1044, 1044, 731, 1044, 1044, 1044, 730,
|
|
728, 725, 724, 723, 722, 721, 720, 718, 717, 716,
|
|
715, 714, 713, 712, 711, 710, 705, 704, 702, 701,
|
|
|
|
700, 699, 698, 697, 696, 695, 693, 692, 691, 690,
|
|
689, 688, 687, 686, 684, 682, 681, 680, 679, 678,
|
|
677, 676, 675, 674, 673, 672, 671, 669, 668, 667,
|
|
666, 665, 664, 663, 661, 660, 659, 658, 657, 656,
|
|
655, 654, 653, 652, 651, 650, 649, 648, 646, 645,
|
|
644, 643, 642, 641, 640, 639, 638, 635, 634, 633,
|
|
632, 631, 630, 629, 628, 626, 625, 624, 623, 622,
|
|
620, 619, 617, 616, 615, 612, 611, 610, 609, 608,
|
|
606, 605, 604, 603, 602, 601, 600, 599, 598, 596,
|
|
595, 594, 593, 591, 590, 588, 587, 586, 584, 583,
|
|
|
|
582, 581, 580, 578, 576, 570, 568, 565, 563, 562,
|
|
561, 559, 558, 557, 556, 555, 554, 553, 552, 551,
|
|
550, 549, 548, 547, 546, 545, 544, 543, 542, 540,
|
|
538, 537, 536, 535, 534, 532, 531, 530, 528, 527,
|
|
526, 525, 524, 523, 522, 521, 518, 517, 516, 515,
|
|
513, 512, 510, 509, 508, 507, 506, 505, 504, 502,
|
|
501, 500, 499, 498, 497, 495, 494, 493, 492, 491,
|
|
487, 486, 485, 484, 483, 482, 481, 480, 479, 477,
|
|
476, 475, 474, 473, 472, 471, 470, 469, 468, 467,
|
|
466, 463, 461, 460, 459, 458, 457, 455, 454, 453,
|
|
|
|
452, 451, 450, 448, 446, 444, 443, 442, 441, 439,
|
|
438, 437, 436, 434, 433, 432, 431, 429, 427, 425,
|
|
424, 423, 421, 420, 419, 410, 405, 404, 403, 402,
|
|
401, 400, 399, 398, 396, 395, 394, 393, 392, 390,
|
|
389, 388, 387, 386, 385, 384, 383, 382, 381, 379,
|
|
378, 377, 376, 375, 374, 373, 372, 371, 370, 368,
|
|
367, 366, 365, 364, 362, 361, 360, 359, 358, 357,
|
|
356, 354, 353, 352, 351, 349, 348, 347, 345, 344,
|
|
343, 342, 341, 340, 338, 337, 335, 334, 333, 332,
|
|
331, 330, 329, 327, 326, 325, 324, 323, 322, 321,
|
|
|
|
320, 319, 318, 316, 315, 314, 313, 312, 311, 310,
|
|
309, 308, 306, 304, 302, 301, 300, 299, 298, 297,
|
|
296, 295, 294, 293, 292, 291, 290, 289, 288, 287,
|
|
286, 285, 284, 283, 282, 281, 280, 279, 278, 277,
|
|
276, 275, 274, 273, 272, 271, 269, 268, 267, 266,
|
|
265, 264, 263, 262, 261, 260, 259, 258, 257, 256,
|
|
255, 254, 250, 237, 229, 225, 220, 219, 216, 212,
|
|
211, 210, 209, 205, 204, 203, 202, 199, 198, 197,
|
|
196, 195, 194, 192, 191, 190, 189, 186, 183, 182,
|
|
181, 180, 175, 174, 173, 172, 171, 170, 169, 168,
|
|
|
|
167, 166, 165, 163, 162, 161, 160, 159, 158, 157,
|
|
156, 154, 153, 152, 151, 150, 146, 145, 142, 141,
|
|
140, 139, 138, 137, 135, 133, 131, 130, 129, 128,
|
|
127, 126, 125, 124, 123, 121, 120, 119, 118, 116,
|
|
115, 114, 113, 112, 111, 110, 108, 106, 101, 98,
|
|
96, 95, 94, 91, 76, 65, 62, 60, 59, 54,
|
|
48, 45, 37, 33, 32, 21, 20, 19, 18, 15,
|
|
14, 13, 11, 10, 9, 5, 1037, 1037, 1037, 1037,
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037, 1037,
|
|
1037
|
|
} ;
|
|
|
|
static yy_state_type yy_last_accepting_state;
|
|
static char *yy_last_accepting_cpos;
|
|
|
|
/* The intent behind this definition is that it'll catch
|
|
* any uses of REJECT which flex missed.
|
|
*/
|
|
#define REJECT reject_used_but_not_detected
|
|
#define yymore() yymore_used_but_not_detected
|
|
#define YY_MORE_ADJ 0
|
|
#define YY_RESTORE_YY_MORE_OFFSET
|
|
char *yytext;
|
|
#line 1 "lev_comp.l"
|
|
#define INITIAL 0
|
|
#line 2 "lev_comp.l"
|
|
/* SCCS Id: @(#)lev_lex.c 3.4 2002/03/27 */
|
|
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
|
/* NetHack may be freely redistributed. See license for details. */
|
|
|
|
#define LEV_LEX_C
|
|
|
|
#include "hack.h"
|
|
#include "lev_comp.h"
|
|
#include "sp_lev.h"
|
|
|
|
/* Most of these don't exist in flex, yywrap is macro and
|
|
* yyunput is properly declared in flex.skel.
|
|
*/
|
|
#if !defined(FLEX_SCANNER) && !defined(FLEXHACK_SCANNER)
|
|
int FDECL(yyback, (int *,int));
|
|
int NDECL(yylook);
|
|
int NDECL(yyinput);
|
|
int NDECL(yywrap);
|
|
int NDECL(yylex);
|
|
/* Traditional lexes let yyunput() and yyoutput() default to int;
|
|
* newer ones may declare them as void since they don't return
|
|
* values. For even more fun, the lex supplied as part of the
|
|
* newer unbundled compiler for SunOS 4.x adds the void declarations
|
|
* (under __STDC__ or _cplusplus ifdefs -- otherwise they remain
|
|
* int) while the bundled lex and the one with the older unbundled
|
|
* compiler do not. To detect this, we need help from outside --
|
|
* sys/unix/Makefile.utl.
|
|
*
|
|
* Digital UNIX is difficult and still has int in spite of all
|
|
* other signs.
|
|
*/
|
|
# if defined(NeXT) || defined(SVR4) || defined(_AIX32)
|
|
# define VOIDYYPUT
|
|
# endif
|
|
# if !defined(VOIDYYPUT) && defined(POSIX_TYPES)
|
|
# if !defined(BOS) && !defined(HISX) && !defined(_M_UNIX) && !defined(VMS)
|
|
# define VOIDYYPUT
|
|
# endif
|
|
# endif
|
|
# if !defined(VOIDYYPUT) && defined(WEIRD_LEX)
|
|
# if defined(SUNOS4) && defined(__STDC__) && (WEIRD_LEX > 1)
|
|
# define VOIDYYPUT
|
|
# endif
|
|
# endif
|
|
# if defined(VOIDYYPUT) && defined(__osf__)
|
|
# undef VOIDYYPUT
|
|
# endif
|
|
# ifdef VOIDYYPUT
|
|
void FDECL(yyunput, (int));
|
|
void FDECL(yyoutput, (int));
|
|
# else
|
|
int FDECL(yyunput, (int));
|
|
int FDECL(yyoutput, (int));
|
|
# endif
|
|
#endif /* !FLEX_SCANNER && !FLEXHACK_SCANNER */
|
|
|
|
#ifdef FLEX_SCANNER
|
|
#define YY_MALLOC_DECL \
|
|
genericptr_t FDECL(malloc, (size_t)); \
|
|
genericptr_t FDECL(realloc, (genericptr_t,size_t));
|
|
#endif
|
|
|
|
void FDECL(init_yyin, (FILE *));
|
|
void FDECL(init_yyout, (FILE *));
|
|
|
|
long NDECL(handle_varstring_check);
|
|
long FDECL(corefunc_str_check, (char *, long));
|
|
|
|
extern struct lc_vardefs *FDECL(vardef_defined,(struct lc_vardefs *,char *, int));
|
|
|
|
extern struct lc_vardefs *variable_definitions;
|
|
|
|
extern long FDECL(method_defined, (char *, long, long *));
|
|
|
|
void FDECL(savetoken, (char *));
|
|
void NDECL(newline);
|
|
void FDECL(advancepos, (char *));
|
|
|
|
/*
|
|
* This doesn't always get put in lev_comp.h
|
|
* (esp. when using older versions of bison).
|
|
*/
|
|
extern YYSTYPE yylval;
|
|
|
|
int nh_line_number = 1;
|
|
int token_start_pos = 0;
|
|
char curr_token[512];
|
|
static char map[4096];
|
|
static int map_cnt = 0;
|
|
|
|
FILE *orig_yyin = NULL;
|
|
|
|
#define ST_RET(x) do { savetoken(yytext); return x; } while (0);
|
|
#define ST_RETF(y, x) do { savetoken(yytext); y; return x; } while (0);
|
|
|
|
#define MAPC 1
|
|
|
|
#line 1105 "lex.yy.c"
|
|
|
|
/* Macros after this point can all be overridden by user definitions in
|
|
* section 1.
|
|
*/
|
|
|
|
#ifndef YY_SKIP_YYWRAP
|
|
#ifdef __cplusplus
|
|
extern "C" int yywrap YY_PROTO(( void ));
|
|
#else
|
|
extern int yywrap YY_PROTO(( void ));
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef YY_NO_UNPUT
|
|
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
|
|
#endif
|
|
|
|
#ifndef yytext_ptr
|
|
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
|
|
#endif
|
|
|
|
#ifdef YY_NEED_STRLEN
|
|
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
|
|
#endif
|
|
|
|
#ifndef YY_NO_INPUT
|
|
#ifdef __cplusplus
|
|
static int yyinput YY_PROTO(( void ));
|
|
#else
|
|
static int input YY_PROTO(( void ));
|
|
#endif
|
|
#endif
|
|
|
|
#if YY_STACK_USED
|
|
static int yy_start_stack_ptr = 0;
|
|
static int yy_start_stack_depth = 0;
|
|
static int *yy_start_stack = 0;
|
|
#ifndef YY_NO_PUSH_STATE
|
|
static void yy_push_state YY_PROTO(( int new_state ));
|
|
#endif
|
|
#ifndef YY_NO_POP_STATE
|
|
static void yy_pop_state YY_PROTO(( void ));
|
|
#endif
|
|
#ifndef YY_NO_TOP_STATE
|
|
static int yy_top_state YY_PROTO(( void ));
|
|
#endif
|
|
|
|
#else
|
|
#define YY_NO_PUSH_STATE 1
|
|
#define YY_NO_POP_STATE 1
|
|
#define YY_NO_TOP_STATE 1
|
|
#endif
|
|
|
|
#ifdef YY_MALLOC_DECL
|
|
YY_MALLOC_DECL
|
|
#else
|
|
#if __STDC__
|
|
#ifndef __cplusplus
|
|
#include <stdlib.h>
|
|
#endif
|
|
#else
|
|
/* Just try to get by without declaring the routines. This will fail
|
|
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
|
|
* or sizeof(void*) != sizeof(int).
|
|
*/
|
|
#endif
|
|
#endif
|
|
|
|
/* Amount of stuff to slurp up with each read. */
|
|
#ifndef YY_READ_BUF_SIZE
|
|
#define YY_READ_BUF_SIZE 8192
|
|
#endif
|
|
|
|
/* Copy whatever the last rule matched to the standard output. */
|
|
|
|
#ifndef ECHO
|
|
/* This used to be an fputs(), but since the string might contain NUL's,
|
|
* we now use fwrite().
|
|
*/
|
|
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
|
|
#endif
|
|
|
|
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
|
* is returned in "result".
|
|
*/
|
|
#ifndef YY_INPUT
|
|
#define YY_INPUT(buf,result,max_size) \
|
|
if ( yy_current_buffer->yy_is_interactive ) \
|
|
{ \
|
|
int c = '*', n; \
|
|
for ( n = 0; n < max_size && \
|
|
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
|
|
buf[n] = (char) c; \
|
|
if ( c == '\n' ) \
|
|
buf[n++] = (char) c; \
|
|
if ( c == EOF && ferror( yyin ) ) \
|
|
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
|
result = n; \
|
|
} \
|
|
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
|
|
&& ferror( yyin ) ) \
|
|
YY_FATAL_ERROR( "input in flex scanner failed" );
|
|
#endif
|
|
|
|
/* No semi-colon after return; correct usage is to write "yyterminate();" -
|
|
* we don't want an extra ';' after the "return" because that will cause
|
|
* some compilers to complain about unreachable statements.
|
|
*/
|
|
#ifndef yyterminate
|
|
#define yyterminate() return YY_NULL
|
|
#endif
|
|
|
|
/* Number of entries by which start-condition stack grows. */
|
|
#ifndef YY_START_STACK_INCR
|
|
#define YY_START_STACK_INCR 25
|
|
#endif
|
|
|
|
/* Report a fatal error. */
|
|
#ifndef YY_FATAL_ERROR
|
|
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
|
|
#endif
|
|
|
|
/* Default declaration of generated scanner - a define so the user can
|
|
* easily add parameters.
|
|
*/
|
|
#ifndef YY_DECL
|
|
#define YY_DECL int yylex YY_PROTO(( void ))
|
|
#endif
|
|
|
|
/* Code executed at the beginning of each rule, after yytext and yyleng
|
|
* have been set up.
|
|
*/
|
|
#ifndef YY_USER_ACTION
|
|
#define YY_USER_ACTION
|
|
#endif
|
|
|
|
/* Code executed at the end of each rule. */
|
|
#ifndef YY_BREAK
|
|
#define YY_BREAK break;
|
|
#endif
|
|
|
|
#define YY_RULE_SETUP \
|
|
if ( yyleng > 0 ) \
|
|
yy_current_buffer->yy_at_bol = \
|
|
(yytext[yyleng - 1] == '\n'); \
|
|
YY_USER_ACTION
|
|
|
|
YY_DECL
|
|
{
|
|
register yy_state_type yy_current_state;
|
|
register char *yy_cp, *yy_bp;
|
|
register int yy_act;
|
|
|
|
#line 102 "lev_comp.l"
|
|
|
|
#line 1261 "lex.yy.c"
|
|
|
|
if ( yy_init )
|
|
{
|
|
yy_init = 0;
|
|
|
|
#ifdef YY_USER_INIT
|
|
YY_USER_INIT;
|
|
#endif
|
|
|
|
if ( ! yy_start )
|
|
yy_start = 1; /* first start state */
|
|
|
|
if ( ! yyin )
|
|
yyin = stdin;
|
|
|
|
if ( ! yyout )
|
|
yyout = stdout;
|
|
|
|
if ( ! yy_current_buffer )
|
|
yy_current_buffer =
|
|
yy_create_buffer( yyin, YY_BUF_SIZE );
|
|
|
|
yy_load_buffer_state();
|
|
}
|
|
|
|
while ( 1 ) /* loops until end-of-file is reached */
|
|
{
|
|
yy_cp = yy_c_buf_p;
|
|
|
|
/* Support of yytext. */
|
|
*yy_cp = yy_hold_char;
|
|
|
|
/* yy_bp points to the position in yy_ch_buf of the start of
|
|
* the current run.
|
|
*/
|
|
yy_bp = yy_cp;
|
|
|
|
yy_current_state = yy_start;
|
|
yy_current_state += YY_AT_BOL();
|
|
yy_match:
|
|
do
|
|
{
|
|
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
|
|
if ( yy_accept[yy_current_state] )
|
|
{
|
|
yy_last_accepting_state = yy_current_state;
|
|
yy_last_accepting_cpos = yy_cp;
|
|
}
|
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
{
|
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
if ( yy_current_state >= 1038 )
|
|
yy_c = yy_meta[(unsigned int) yy_c];
|
|
}
|
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
|
++yy_cp;
|
|
}
|
|
while ( yy_base[yy_current_state] != 1277 );
|
|
|
|
yy_find_action:
|
|
yy_act = yy_accept[yy_current_state];
|
|
if ( yy_act == 0 )
|
|
{ /* have to back up */
|
|
yy_cp = yy_last_accepting_cpos;
|
|
yy_current_state = yy_last_accepting_state;
|
|
yy_act = yy_accept[yy_current_state];
|
|
}
|
|
|
|
YY_DO_BEFORE_ACTION;
|
|
|
|
|
|
do_action: /* This label is used only to access EOF actions. */
|
|
|
|
|
|
switch ( yy_act )
|
|
{ /* beginning of action switch */
|
|
case 0: /* must back up */
|
|
/* undo the effects of YY_DO_BEFORE_ACTION */
|
|
*yy_cp = yy_hold_char;
|
|
yy_cp = yy_last_accepting_cpos;
|
|
yy_current_state = yy_last_accepting_state;
|
|
goto yy_find_action;
|
|
|
|
case 1:
|
|
YY_RULE_SETUP
|
|
#line 103 "lev_comp.l"
|
|
{
|
|
savetoken(yytext);
|
|
BEGIN(INITIAL);
|
|
yylval.map = (char *) alloc(map_cnt + 1);
|
|
(void) strncpy(yylval.map, map, map_cnt);
|
|
yylval.map[map_cnt] = 0;
|
|
map_cnt = 0;
|
|
return MAP_ID;
|
|
}
|
|
YY_BREAK
|
|
case 2:
|
|
YY_RULE_SETUP
|
|
#line 112 "lev_comp.l"
|
|
{
|
|
int len = yyleng;
|
|
savetoken(yytext);
|
|
/* convert \r\n to \n */
|
|
if (len >= 2 && yytext[len - 2] == '\r') len -= 1;
|
|
(void) strncpy(map + map_cnt, yytext, len);
|
|
map_cnt += len;
|
|
map[map_cnt - 1] = '\n';
|
|
map[map_cnt] = '\0';
|
|
newline();
|
|
}
|
|
YY_BREAK
|
|
case 3:
|
|
YY_RULE_SETUP
|
|
#line 123 "lev_comp.l"
|
|
{ savetoken(yytext); newline(); }
|
|
YY_BREAK
|
|
case 4:
|
|
YY_RULE_SETUP
|
|
#line 124 "lev_comp.l"
|
|
ST_RET(MESSAGE_ID);
|
|
YY_BREAK
|
|
case 5:
|
|
YY_RULE_SETUP
|
|
#line 125 "lev_comp.l"
|
|
ST_RET(NOMAP_ID);
|
|
YY_BREAK
|
|
case 6:
|
|
YY_RULE_SETUP
|
|
#line 126 "lev_comp.l"
|
|
ST_RET(MAZE_ID);
|
|
YY_BREAK
|
|
case 7:
|
|
YY_RULE_SETUP
|
|
#line 127 "lev_comp.l"
|
|
ST_RET(LEVEL_ID);
|
|
YY_BREAK
|
|
case 8:
|
|
YY_RULE_SETUP
|
|
#line 128 "lev_comp.l"
|
|
ST_RET(LEV_INIT_ID);
|
|
YY_BREAK
|
|
case 9:
|
|
YY_RULE_SETUP
|
|
#line 129 "lev_comp.l"
|
|
ST_RET(MAZE_GRID_ID);
|
|
YY_BREAK
|
|
case 10:
|
|
YY_RULE_SETUP
|
|
#line 130 "lev_comp.l"
|
|
ST_RET(SOLID_FILL_ID);
|
|
YY_BREAK
|
|
case 11:
|
|
YY_RULE_SETUP
|
|
#line 131 "lev_comp.l"
|
|
ST_RET(MINES_ID);
|
|
YY_BREAK
|
|
case 12:
|
|
YY_RULE_SETUP
|
|
#line 132 "lev_comp.l"
|
|
ST_RET(ROGUELEV_ID);
|
|
YY_BREAK
|
|
case 13:
|
|
YY_RULE_SETUP
|
|
#line 133 "lev_comp.l"
|
|
ST_RET(FLAGS_ID);
|
|
YY_BREAK
|
|
case 14:
|
|
YY_RULE_SETUP
|
|
#line 134 "lev_comp.l"
|
|
ST_RET(GEOMETRY_ID);
|
|
YY_BREAK
|
|
case 15:
|
|
YY_RULE_SETUP
|
|
#line 135 "lev_comp.l"
|
|
{ savetoken(yytext); BEGIN(MAPC); newline(); }
|
|
YY_BREAK
|
|
case 16:
|
|
YY_RULE_SETUP
|
|
#line 136 "lev_comp.l"
|
|
ST_RET(object_ID);
|
|
YY_BREAK
|
|
case 17:
|
|
YY_RULE_SETUP
|
|
#line 137 "lev_comp.l"
|
|
ST_RET(OBJECT_ID);
|
|
YY_BREAK
|
|
case 18:
|
|
YY_RULE_SETUP
|
|
#line 138 "lev_comp.l"
|
|
ST_RET(COBJECT_ID);
|
|
YY_BREAK
|
|
case 19:
|
|
YY_RULE_SETUP
|
|
#line 139 "lev_comp.l"
|
|
ST_RET(MONSTER_ID);
|
|
YY_BREAK
|
|
case 20:
|
|
YY_RULE_SETUP
|
|
#line 140 "lev_comp.l"
|
|
ST_RET(monster_ID);
|
|
YY_BREAK
|
|
case 21:
|
|
YY_RULE_SETUP
|
|
#line 141 "lev_comp.l"
|
|
ST_RET(TRAP_ID);
|
|
YY_BREAK
|
|
case 22:
|
|
YY_RULE_SETUP
|
|
#line 142 "lev_comp.l"
|
|
ST_RET(DOOR_ID);
|
|
YY_BREAK
|
|
case 23:
|
|
YY_RULE_SETUP
|
|
#line 143 "lev_comp.l"
|
|
ST_RET(ROOMDOOR_ID);
|
|
YY_BREAK
|
|
case 24:
|
|
YY_RULE_SETUP
|
|
#line 144 "lev_comp.l"
|
|
ST_RET(DRAWBRIDGE_ID);
|
|
YY_BREAK
|
|
case 25:
|
|
YY_RULE_SETUP
|
|
#line 145 "lev_comp.l"
|
|
ST_RET(MAZEWALK_ID);
|
|
YY_BREAK
|
|
case 26:
|
|
YY_RULE_SETUP
|
|
#line 146 "lev_comp.l"
|
|
ST_RET(WALLIFY_ID);
|
|
YY_BREAK
|
|
case 27:
|
|
YY_RULE_SETUP
|
|
#line 147 "lev_comp.l"
|
|
ST_RET(REGION_ID);
|
|
YY_BREAK
|
|
case 28:
|
|
YY_RULE_SETUP
|
|
#line 148 "lev_comp.l"
|
|
ST_RET(ALTAR_ID);
|
|
YY_BREAK
|
|
case 29:
|
|
YY_RULE_SETUP
|
|
#line 149 "lev_comp.l"
|
|
ST_RET(LADDER_ID);
|
|
YY_BREAK
|
|
case 30:
|
|
YY_RULE_SETUP
|
|
#line 150 "lev_comp.l"
|
|
ST_RET(STAIR_ID);
|
|
YY_BREAK
|
|
case 31:
|
|
YY_RULE_SETUP
|
|
#line 151 "lev_comp.l"
|
|
ST_RET(PORTAL_ID);
|
|
YY_BREAK
|
|
case 32:
|
|
YY_RULE_SETUP
|
|
#line 152 "lev_comp.l"
|
|
ST_RET(TELEPRT_ID);
|
|
YY_BREAK
|
|
case 33:
|
|
YY_RULE_SETUP
|
|
#line 153 "lev_comp.l"
|
|
ST_RET(BRANCH_ID);
|
|
YY_BREAK
|
|
case 34:
|
|
YY_RULE_SETUP
|
|
#line 154 "lev_comp.l"
|
|
ST_RET(FOUNTAIN_ID);
|
|
YY_BREAK
|
|
case 35:
|
|
YY_RULE_SETUP
|
|
#line 155 "lev_comp.l"
|
|
ST_RET(SINK_ID);
|
|
YY_BREAK
|
|
case 36:
|
|
YY_RULE_SETUP
|
|
#line 156 "lev_comp.l"
|
|
ST_RET(POOL_ID);
|
|
YY_BREAK
|
|
case 37:
|
|
YY_RULE_SETUP
|
|
#line 157 "lev_comp.l"
|
|
ST_RET(NON_DIGGABLE_ID);
|
|
YY_BREAK
|
|
case 38:
|
|
YY_RULE_SETUP
|
|
#line 158 "lev_comp.l"
|
|
ST_RET(NON_PASSWALL_ID);
|
|
YY_BREAK
|
|
case 39:
|
|
YY_RULE_SETUP
|
|
#line 159 "lev_comp.l"
|
|
ST_RET(IF_ID);
|
|
YY_BREAK
|
|
case 40:
|
|
YY_RULE_SETUP
|
|
#line 160 "lev_comp.l"
|
|
ST_RET(ELSE_ID);
|
|
YY_BREAK
|
|
case 41:
|
|
YY_RULE_SETUP
|
|
#line 161 "lev_comp.l"
|
|
ST_RET(EXIT_ID);
|
|
YY_BREAK
|
|
case 42:
|
|
YY_RULE_SETUP
|
|
#line 162 "lev_comp.l"
|
|
ST_RET(ROOM_ID);
|
|
YY_BREAK
|
|
case 43:
|
|
YY_RULE_SETUP
|
|
#line 163 "lev_comp.l"
|
|
ST_RET(SUBROOM_ID);
|
|
YY_BREAK
|
|
case 44:
|
|
YY_RULE_SETUP
|
|
#line 164 "lev_comp.l"
|
|
ST_RET(RAND_CORRIDOR_ID);
|
|
YY_BREAK
|
|
case 45:
|
|
YY_RULE_SETUP
|
|
#line 165 "lev_comp.l"
|
|
ST_RET(CORRIDOR_ID);
|
|
YY_BREAK
|
|
case 46:
|
|
YY_RULE_SETUP
|
|
#line 166 "lev_comp.l"
|
|
ST_RET(TERRAIN_ID);
|
|
YY_BREAK
|
|
case 47:
|
|
YY_RULE_SETUP
|
|
#line 167 "lev_comp.l"
|
|
ST_RET(terrain_ID);
|
|
YY_BREAK
|
|
case 48:
|
|
YY_RULE_SETUP
|
|
#line 168 "lev_comp.l"
|
|
ST_RET(REPLACE_TERRAIN_ID);
|
|
YY_BREAK
|
|
case 49:
|
|
YY_RULE_SETUP
|
|
#line 169 "lev_comp.l"
|
|
ST_RET(GOLD_ID);
|
|
YY_BREAK
|
|
case 50:
|
|
YY_RULE_SETUP
|
|
#line 170 "lev_comp.l"
|
|
ST_RET(GRAVE_ID);
|
|
YY_BREAK
|
|
case 51:
|
|
YY_RULE_SETUP
|
|
#line 171 "lev_comp.l"
|
|
ST_RET(ENGRAVING_ID);
|
|
YY_BREAK
|
|
case 52:
|
|
YY_RULE_SETUP
|
|
#line 172 "lev_comp.l"
|
|
ST_RET(MINERALIZE_ID);
|
|
YY_BREAK
|
|
case 53:
|
|
YY_RULE_SETUP
|
|
#line 173 "lev_comp.l"
|
|
ST_RET(NAME_ID);
|
|
YY_BREAK
|
|
case 54:
|
|
YY_RULE_SETUP
|
|
#line 174 "lev_comp.l"
|
|
ST_RET(FOR_ID);
|
|
YY_BREAK
|
|
case 55:
|
|
YY_RULE_SETUP
|
|
#line 175 "lev_comp.l"
|
|
ST_RET(TO_ID);
|
|
YY_BREAK
|
|
case 56:
|
|
YY_RULE_SETUP
|
|
#line 176 "lev_comp.l"
|
|
ST_RET(LOOP_ID);
|
|
YY_BREAK
|
|
case 57:
|
|
YY_RULE_SETUP
|
|
#line 177 "lev_comp.l"
|
|
ST_RET(SWITCH_ID);
|
|
YY_BREAK
|
|
case 58:
|
|
YY_RULE_SETUP
|
|
#line 178 "lev_comp.l"
|
|
ST_RET(CASE_ID);
|
|
YY_BREAK
|
|
case 59:
|
|
YY_RULE_SETUP
|
|
#line 179 "lev_comp.l"
|
|
ST_RET(BREAK_ID);
|
|
YY_BREAK
|
|
case 60:
|
|
YY_RULE_SETUP
|
|
#line 180 "lev_comp.l"
|
|
ST_RET(DEFAULT_ID);
|
|
YY_BREAK
|
|
case 61:
|
|
YY_RULE_SETUP
|
|
#line 181 "lev_comp.l"
|
|
ST_RET(FUNCTION_ID);
|
|
YY_BREAK
|
|
case 62:
|
|
YY_RULE_SETUP
|
|
#line 182 "lev_comp.l"
|
|
ST_RET(SHUFFLE_ID);
|
|
YY_BREAK
|
|
case 63:
|
|
YY_RULE_SETUP
|
|
#line 183 "lev_comp.l"
|
|
ST_RET(MONTYPE_ID);
|
|
YY_BREAK
|
|
case 64:
|
|
YY_RULE_SETUP
|
|
#line 184 "lev_comp.l"
|
|
ST_RET(selection_ID);
|
|
YY_BREAK
|
|
case 65:
|
|
YY_RULE_SETUP
|
|
#line 185 "lev_comp.l"
|
|
ST_RET(rect_ID);
|
|
YY_BREAK
|
|
case 66:
|
|
YY_RULE_SETUP
|
|
#line 186 "lev_comp.l"
|
|
ST_RET(fillrect_ID);
|
|
YY_BREAK
|
|
case 67:
|
|
YY_RULE_SETUP
|
|
#line 187 "lev_comp.l"
|
|
ST_RET(line_ID);
|
|
YY_BREAK
|
|
case 68:
|
|
YY_RULE_SETUP
|
|
#line 188 "lev_comp.l"
|
|
ST_RET(randline_ID);
|
|
YY_BREAK
|
|
case 69:
|
|
YY_RULE_SETUP
|
|
#line 189 "lev_comp.l"
|
|
ST_RET(grow_ID);
|
|
YY_BREAK
|
|
case 70:
|
|
YY_RULE_SETUP
|
|
#line 190 "lev_comp.l"
|
|
ST_RET(flood_ID);
|
|
YY_BREAK
|
|
case 71:
|
|
YY_RULE_SETUP
|
|
#line 191 "lev_comp.l"
|
|
ST_RET(rndcoord_ID);
|
|
YY_BREAK
|
|
case 72:
|
|
YY_RULE_SETUP
|
|
#line 192 "lev_comp.l"
|
|
ST_RET(circle_ID);
|
|
YY_BREAK
|
|
case 73:
|
|
YY_RULE_SETUP
|
|
#line 193 "lev_comp.l"
|
|
ST_RET(ellipse_ID);
|
|
YY_BREAK
|
|
case 74:
|
|
YY_RULE_SETUP
|
|
#line 194 "lev_comp.l"
|
|
ST_RET(filter_ID);
|
|
YY_BREAK
|
|
case 75:
|
|
YY_RULE_SETUP
|
|
#line 195 "lev_comp.l"
|
|
ST_RET(gradient_ID);
|
|
YY_BREAK
|
|
case 76:
|
|
YY_RULE_SETUP
|
|
#line 196 "lev_comp.l"
|
|
ST_RET(complement_ID);
|
|
YY_BREAK
|
|
case 77:
|
|
YY_RULE_SETUP
|
|
#line 197 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=SEL_GRADIENT_RADIAL; return GRADIENT_TYPE; }
|
|
YY_BREAK
|
|
case 78:
|
|
YY_RULE_SETUP
|
|
#line 198 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=SEL_GRADIENT_SQUARE; return GRADIENT_TYPE; }
|
|
YY_BREAK
|
|
case 79:
|
|
YY_RULE_SETUP
|
|
#line 199 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=DRY; return HUMIDITY_TYPE; }
|
|
YY_BREAK
|
|
case 80:
|
|
YY_RULE_SETUP
|
|
#line 200 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=WET; return HUMIDITY_TYPE; }
|
|
YY_BREAK
|
|
case 81:
|
|
YY_RULE_SETUP
|
|
#line 201 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=HOT; return HUMIDITY_TYPE; }
|
|
YY_BREAK
|
|
case 82:
|
|
YY_RULE_SETUP
|
|
#line 202 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=SOLID; return HUMIDITY_TYPE; }
|
|
YY_BREAK
|
|
case 83:
|
|
YY_RULE_SETUP
|
|
#line 203 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=ANY_LOC; return HUMIDITY_TYPE; }
|
|
YY_BREAK
|
|
case 84:
|
|
YY_RULE_SETUP
|
|
#line 204 "lev_comp.l"
|
|
ST_RET(LEV);
|
|
YY_BREAK
|
|
case 85:
|
|
YY_RULE_SETUP
|
|
#line 205 "lev_comp.l"
|
|
ST_RET(QUANTITY_ID);
|
|
YY_BREAK
|
|
case 86:
|
|
YY_RULE_SETUP
|
|
#line 206 "lev_comp.l"
|
|
ST_RET(BURIED_ID);
|
|
YY_BREAK
|
|
case 87:
|
|
YY_RULE_SETUP
|
|
#line 207 "lev_comp.l"
|
|
ST_RET(ERODED_ID);
|
|
YY_BREAK
|
|
case 88:
|
|
YY_RULE_SETUP
|
|
#line 208 "lev_comp.l"
|
|
ST_RET(ERODEPROOF_ID);
|
|
YY_BREAK
|
|
case 89:
|
|
YY_RULE_SETUP
|
|
#line 209 "lev_comp.l"
|
|
ST_RET(TRAPPED_ID);
|
|
YY_BREAK
|
|
case 90:
|
|
YY_RULE_SETUP
|
|
#line 210 "lev_comp.l"
|
|
ST_RET(RECHARGED_ID);
|
|
YY_BREAK
|
|
case 91:
|
|
YY_RULE_SETUP
|
|
#line 211 "lev_comp.l"
|
|
ST_RET(INVIS_ID);
|
|
YY_BREAK
|
|
case 92:
|
|
YY_RULE_SETUP
|
|
#line 212 "lev_comp.l"
|
|
ST_RET(GREASED_ID);
|
|
YY_BREAK
|
|
case 93:
|
|
YY_RULE_SETUP
|
|
#line 213 "lev_comp.l"
|
|
ST_RET(FEMALE_ID);
|
|
YY_BREAK
|
|
case 94:
|
|
YY_RULE_SETUP
|
|
#line 214 "lev_comp.l"
|
|
ST_RET(CANCELLED_ID);
|
|
YY_BREAK
|
|
case 95:
|
|
YY_RULE_SETUP
|
|
#line 215 "lev_comp.l"
|
|
ST_RET(REVIVED_ID);
|
|
YY_BREAK
|
|
case 96:
|
|
YY_RULE_SETUP
|
|
#line 216 "lev_comp.l"
|
|
ST_RET(AVENGE_ID);
|
|
YY_BREAK
|
|
case 97:
|
|
YY_RULE_SETUP
|
|
#line 217 "lev_comp.l"
|
|
ST_RET(FLEEING_ID);
|
|
YY_BREAK
|
|
case 98:
|
|
YY_RULE_SETUP
|
|
#line 218 "lev_comp.l"
|
|
ST_RET(BLINDED_ID);
|
|
YY_BREAK
|
|
case 99:
|
|
YY_RULE_SETUP
|
|
#line 219 "lev_comp.l"
|
|
ST_RET(PARALYZED_ID);
|
|
YY_BREAK
|
|
case 100:
|
|
YY_RULE_SETUP
|
|
#line 220 "lev_comp.l"
|
|
ST_RET(STUNNED_ID);
|
|
YY_BREAK
|
|
case 101:
|
|
YY_RULE_SETUP
|
|
#line 221 "lev_comp.l"
|
|
ST_RET(CONFUSED_ID);
|
|
YY_BREAK
|
|
case 102:
|
|
YY_RULE_SETUP
|
|
#line 222 "lev_comp.l"
|
|
ST_RET(SEENTRAPS_ID);
|
|
YY_BREAK
|
|
case 103:
|
|
YY_RULE_SETUP
|
|
#line 223 "lev_comp.l"
|
|
ST_RET(ALL_ID);
|
|
YY_BREAK
|
|
case 104:
|
|
YY_RULE_SETUP
|
|
#line 224 "lev_comp.l"
|
|
ST_RETF((yylval.i=1), HORIZ_OR_VERT);
|
|
YY_BREAK
|
|
case 105:
|
|
YY_RULE_SETUP
|
|
#line 225 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=2; return HORIZ_OR_VERT; }
|
|
YY_BREAK
|
|
case 106:
|
|
YY_RULE_SETUP
|
|
#line 226 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=D_ISOPEN; return DOOR_STATE; }
|
|
YY_BREAK
|
|
case 107:
|
|
YY_RULE_SETUP
|
|
#line 227 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=D_CLOSED; return DOOR_STATE; }
|
|
YY_BREAK
|
|
case 108:
|
|
YY_RULE_SETUP
|
|
#line 228 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=D_LOCKED; return DOOR_STATE; }
|
|
YY_BREAK
|
|
case 109:
|
|
YY_RULE_SETUP
|
|
#line 229 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=D_NODOOR; return DOOR_STATE; }
|
|
YY_BREAK
|
|
case 110:
|
|
YY_RULE_SETUP
|
|
#line 230 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=D_BROKEN; return DOOR_STATE; }
|
|
YY_BREAK
|
|
case 111:
|
|
YY_RULE_SETUP
|
|
#line 231 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=D_SECRET; return DOOR_STATE; }
|
|
YY_BREAK
|
|
case 112:
|
|
YY_RULE_SETUP
|
|
#line 232 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=W_NORTH; return DIRECTION; }
|
|
YY_BREAK
|
|
case 113:
|
|
YY_RULE_SETUP
|
|
#line 233 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=W_EAST; return DIRECTION; }
|
|
YY_BREAK
|
|
case 114:
|
|
YY_RULE_SETUP
|
|
#line 234 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=W_SOUTH; return DIRECTION; }
|
|
YY_BREAK
|
|
case 115:
|
|
YY_RULE_SETUP
|
|
#line 235 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=W_WEST; return DIRECTION; }
|
|
YY_BREAK
|
|
case 116:
|
|
YY_RULE_SETUP
|
|
#line 236 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = -1; return RANDOM_TYPE; }
|
|
YY_BREAK
|
|
case 117:
|
|
YY_RULE_SETUP
|
|
#line 237 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = -1; return RANDOM_TYPE_BRACKET; }
|
|
YY_BREAK
|
|
case 118:
|
|
YY_RULE_SETUP
|
|
#line 238 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = -2; return NONE; }
|
|
YY_BREAK
|
|
case 119:
|
|
YY_RULE_SETUP
|
|
#line 239 "lev_comp.l"
|
|
ST_RET(A_REGISTER);
|
|
YY_BREAK
|
|
case 120:
|
|
YY_RULE_SETUP
|
|
#line 240 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=1; return LEFT_OR_RIGHT; }
|
|
YY_BREAK
|
|
case 121:
|
|
YY_RULE_SETUP
|
|
#line 241 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=2; return LEFT_OR_RIGHT; }
|
|
YY_BREAK
|
|
case 122:
|
|
YY_RULE_SETUP
|
|
#line 242 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=3; return CENTER; }
|
|
YY_BREAK
|
|
case 123:
|
|
YY_RULE_SETUP
|
|
#line 243 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=4; return LEFT_OR_RIGHT; }
|
|
YY_BREAK
|
|
case 124:
|
|
YY_RULE_SETUP
|
|
#line 244 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=5; return LEFT_OR_RIGHT; }
|
|
YY_BREAK
|
|
case 125:
|
|
YY_RULE_SETUP
|
|
#line 245 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=1; return TOP_OR_BOT; }
|
|
YY_BREAK
|
|
case 126:
|
|
YY_RULE_SETUP
|
|
#line 246 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=5; return TOP_OR_BOT; }
|
|
YY_BREAK
|
|
case 127:
|
|
YY_RULE_SETUP
|
|
#line 247 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=1; return LIGHT_STATE; }
|
|
YY_BREAK
|
|
case 128:
|
|
YY_RULE_SETUP
|
|
#line 248 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=0; return LIGHT_STATE; }
|
|
YY_BREAK
|
|
case 129:
|
|
YY_RULE_SETUP
|
|
#line 249 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=1; return FILLING; }
|
|
YY_BREAK
|
|
case 130:
|
|
YY_RULE_SETUP
|
|
#line 250 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=0; return FILLING; }
|
|
YY_BREAK
|
|
case 131:
|
|
YY_RULE_SETUP
|
|
#line 251 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=0; return IRREGULAR; }
|
|
YY_BREAK
|
|
case 132:
|
|
YY_RULE_SETUP
|
|
#line 252 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=1; return IRREGULAR; }
|
|
YY_BREAK
|
|
case 133:
|
|
YY_RULE_SETUP
|
|
#line 253 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=1; return JOINED; }
|
|
YY_BREAK
|
|
case 134:
|
|
YY_RULE_SETUP
|
|
#line 254 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=0; return JOINED; }
|
|
YY_BREAK
|
|
case 135:
|
|
YY_RULE_SETUP
|
|
#line 255 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=1; return LIMITED; }
|
|
YY_BREAK
|
|
case 136:
|
|
YY_RULE_SETUP
|
|
#line 256 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=0; return LIMITED; }
|
|
YY_BREAK
|
|
case 137:
|
|
YY_RULE_SETUP
|
|
#line 257 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i= AM_NONE; return ALIGNMENT; }
|
|
YY_BREAK
|
|
case 138:
|
|
YY_RULE_SETUP
|
|
#line 258 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i= AM_LAWFUL; return ALIGNMENT; }
|
|
YY_BREAK
|
|
case 139:
|
|
YY_RULE_SETUP
|
|
#line 259 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i= AM_NEUTRAL; return ALIGNMENT; }
|
|
YY_BREAK
|
|
case 140:
|
|
YY_RULE_SETUP
|
|
#line 260 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i= AM_CHAOTIC; return ALIGNMENT; }
|
|
YY_BREAK
|
|
case 141:
|
|
YY_RULE_SETUP
|
|
#line 261 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i= AM_SPLEV_CO; return ALIGNMENT; }
|
|
YY_BREAK
|
|
case 142:
|
|
YY_RULE_SETUP
|
|
#line 262 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i= AM_SPLEV_NONCO; return ALIGNMENT; }
|
|
YY_BREAK
|
|
case 143:
|
|
YY_RULE_SETUP
|
|
#line 263 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=1; return MON_ATTITUDE; }
|
|
YY_BREAK
|
|
case 144:
|
|
YY_RULE_SETUP
|
|
#line 264 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=0; return MON_ATTITUDE; }
|
|
YY_BREAK
|
|
case 145:
|
|
YY_RULE_SETUP
|
|
#line 265 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=1; return MON_ALERTNESS; }
|
|
YY_BREAK
|
|
case 146:
|
|
YY_RULE_SETUP
|
|
#line 266 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=0; return MON_ALERTNESS; }
|
|
YY_BREAK
|
|
case 147:
|
|
YY_RULE_SETUP
|
|
#line 267 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i= M_AP_FURNITURE; return MON_APPEARANCE; }
|
|
YY_BREAK
|
|
case 148:
|
|
YY_RULE_SETUP
|
|
#line 268 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i= M_AP_MONSTER; return MON_APPEARANCE; }
|
|
YY_BREAK
|
|
case 149:
|
|
YY_RULE_SETUP
|
|
#line 269 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i= M_AP_OBJECT; return MON_APPEARANCE; }
|
|
YY_BREAK
|
|
case 150:
|
|
YY_RULE_SETUP
|
|
#line 270 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=2; return ALTAR_TYPE; }
|
|
YY_BREAK
|
|
case 151:
|
|
YY_RULE_SETUP
|
|
#line 271 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=1; return ALTAR_TYPE; }
|
|
YY_BREAK
|
|
case 152:
|
|
YY_RULE_SETUP
|
|
#line 272 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=0; return ALTAR_TYPE; }
|
|
YY_BREAK
|
|
case 153:
|
|
YY_RULE_SETUP
|
|
#line 273 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=1; return UP_OR_DOWN; }
|
|
YY_BREAK
|
|
case 154:
|
|
YY_RULE_SETUP
|
|
#line 274 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=0; return UP_OR_DOWN; }
|
|
YY_BREAK
|
|
case 155:
|
|
YY_RULE_SETUP
|
|
#line 275 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=0; return BOOLEAN; }
|
|
YY_BREAK
|
|
case 156:
|
|
YY_RULE_SETUP
|
|
#line 276 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=1; return BOOLEAN; }
|
|
YY_BREAK
|
|
case 157:
|
|
YY_RULE_SETUP
|
|
#line 277 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=DUST; return ENGRAVING_TYPE; }
|
|
YY_BREAK
|
|
case 158:
|
|
YY_RULE_SETUP
|
|
#line 278 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=ENGRAVE; return ENGRAVING_TYPE; }
|
|
YY_BREAK
|
|
case 159:
|
|
YY_RULE_SETUP
|
|
#line 279 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=BURN; return ENGRAVING_TYPE; }
|
|
YY_BREAK
|
|
case 160:
|
|
YY_RULE_SETUP
|
|
#line 280 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=MARK; return ENGRAVING_TYPE; }
|
|
YY_BREAK
|
|
case 161:
|
|
YY_RULE_SETUP
|
|
#line 281 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=ENGR_BLOOD; return ENGRAVING_TYPE; }
|
|
YY_BREAK
|
|
case 162:
|
|
YY_RULE_SETUP
|
|
#line 282 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=1; return CURSE_TYPE; }
|
|
YY_BREAK
|
|
case 163:
|
|
YY_RULE_SETUP
|
|
#line 283 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=2; return CURSE_TYPE; }
|
|
YY_BREAK
|
|
case 164:
|
|
YY_RULE_SETUP
|
|
#line 284 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=3; return CURSE_TYPE; }
|
|
YY_BREAK
|
|
case 165:
|
|
YY_RULE_SETUP
|
|
#line 285 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=NOTELEPORT; return FLAG_TYPE; }
|
|
YY_BREAK
|
|
case 166:
|
|
YY_RULE_SETUP
|
|
#line 286 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=HARDFLOOR; return FLAG_TYPE; }
|
|
YY_BREAK
|
|
case 167:
|
|
YY_RULE_SETUP
|
|
#line 287 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=NOMMAP; return FLAG_TYPE; }
|
|
YY_BREAK
|
|
case 168:
|
|
YY_RULE_SETUP
|
|
#line 288 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=ARBOREAL; return FLAG_TYPE; } /* KMH */
|
|
YY_BREAK
|
|
case 169:
|
|
YY_RULE_SETUP
|
|
#line 289 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=SHORTSIGHTED; return FLAG_TYPE; }
|
|
YY_BREAK
|
|
case 170:
|
|
YY_RULE_SETUP
|
|
#line 290 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=MAZELEVEL; return FLAG_TYPE; }
|
|
YY_BREAK
|
|
case 171:
|
|
YY_RULE_SETUP
|
|
#line 291 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=PREMAPPED; return FLAG_TYPE; }
|
|
YY_BREAK
|
|
case 172:
|
|
YY_RULE_SETUP
|
|
#line 292 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=SHROUD; return FLAG_TYPE; }
|
|
YY_BREAK
|
|
case 173:
|
|
YY_RULE_SETUP
|
|
#line 293 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=GRAVEYARD; return FLAG_TYPE; }
|
|
YY_BREAK
|
|
case 174:
|
|
YY_RULE_SETUP
|
|
#line 294 "lev_comp.l"
|
|
{ char *p = strchr(yytext, 'd');
|
|
savetoken(yytext);
|
|
if (p) {
|
|
*p = '\0';
|
|
p++;
|
|
yylval.dice.num=atoi(yytext);
|
|
yylval.dice.die=atoi(p);
|
|
} else { yylval.dice.num = yylval.dice.die = 1; }
|
|
return DICE;
|
|
}
|
|
YY_BREAK
|
|
case 175:
|
|
YY_RULE_SETUP
|
|
#line 304 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = atoi(yytext + 1);
|
|
if (yylval.i < 0 || yylval.i > 100)
|
|
lc_error("Unexpected percentile '%li%%'", yylval.i);
|
|
return PERCENT; }
|
|
YY_BREAK
|
|
case 176:
|
|
YY_RULE_SETUP
|
|
#line 308 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=atoi(yytext); return MINUS_INTEGER; }
|
|
YY_BREAK
|
|
case 177:
|
|
YY_RULE_SETUP
|
|
#line 309 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=atoi(yytext); return PLUS_INTEGER; }
|
|
YY_BREAK
|
|
case 178:
|
|
YY_RULE_SETUP
|
|
#line 310 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = atoi(yytext);
|
|
if (yylval.i < 0 || yylval.i > 100)
|
|
lc_error("Unexpected percentile '%li%%'", yylval.i);
|
|
return SPERCENT; }
|
|
YY_BREAK
|
|
case 179:
|
|
YY_RULE_SETUP
|
|
#line 314 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i=atoi(yytext); return INTEGER; }
|
|
YY_BREAK
|
|
case 180:
|
|
YY_RULE_SETUP
|
|
#line 315 "lev_comp.l"
|
|
{ savetoken(yytext);
|
|
yytext[yyleng-1] = 0; /* Discard the trailing \" */
|
|
yylval.map = (char *) alloc(strlen(yytext+1)+1);
|
|
Strcpy(yylval.map, yytext+1); /* Discard the first \" */
|
|
return STRING; }
|
|
YY_BREAK
|
|
case 181:
|
|
YY_RULE_SETUP
|
|
#line 320 "lev_comp.l"
|
|
{ savetoken(yytext); return handle_varstring_check(); }
|
|
YY_BREAK
|
|
case 182:
|
|
YY_RULE_SETUP
|
|
#line 321 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = SPO_JE; return COMPARE_TYPE; }
|
|
YY_BREAK
|
|
case 183:
|
|
YY_RULE_SETUP
|
|
#line 322 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = SPO_JNE; return COMPARE_TYPE; }
|
|
YY_BREAK
|
|
case 184:
|
|
YY_RULE_SETUP
|
|
#line 323 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = SPO_JNE; return COMPARE_TYPE; }
|
|
YY_BREAK
|
|
case 185:
|
|
YY_RULE_SETUP
|
|
#line 324 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = SPO_JLE; return COMPARE_TYPE; }
|
|
YY_BREAK
|
|
case 186:
|
|
YY_RULE_SETUP
|
|
#line 325 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = SPO_JGE; return COMPARE_TYPE; }
|
|
YY_BREAK
|
|
case 187:
|
|
YY_RULE_SETUP
|
|
#line 326 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = SPO_JL; return COMPARE_TYPE; }
|
|
YY_BREAK
|
|
case 188:
|
|
YY_RULE_SETUP
|
|
#line 327 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = SPO_JG; return COMPARE_TYPE; }
|
|
YY_BREAK
|
|
case 189:
|
|
YY_RULE_SETUP
|
|
#line 328 "lev_comp.l"
|
|
{ newline(); }
|
|
YY_BREAK
|
|
case 190:
|
|
YY_RULE_SETUP
|
|
#line 329 "lev_comp.l"
|
|
{ advancepos(yytext); }
|
|
YY_BREAK
|
|
case 191:
|
|
YY_RULE_SETUP
|
|
#line 330 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = yytext[2]; return CHAR; }
|
|
YY_BREAK
|
|
case 192:
|
|
YY_RULE_SETUP
|
|
#line 331 "lev_comp.l"
|
|
{ savetoken(yytext); yylval.i = yytext[1]; return CHAR; }
|
|
YY_BREAK
|
|
case 193:
|
|
YY_RULE_SETUP
|
|
#line 332 "lev_comp.l"
|
|
ST_RET(UNKNOWN_TYPE);
|
|
YY_BREAK
|
|
case 194:
|
|
YY_RULE_SETUP
|
|
#line 333 "lev_comp.l"
|
|
{ savetoken(yytext); return yytext[0]; }
|
|
YY_BREAK
|
|
case 195:
|
|
YY_RULE_SETUP
|
|
#line 334 "lev_comp.l"
|
|
ECHO;
|
|
YY_BREAK
|
|
#line 2357 "lex.yy.c"
|
|
case YY_STATE_EOF(INITIAL):
|
|
case YY_STATE_EOF(MAPC):
|
|
yyterminate();
|
|
|
|
case YY_END_OF_BUFFER:
|
|
{
|
|
/* Amount of text matched not including the EOB char. */
|
|
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
|
|
|
|
/* Undo the effects of YY_DO_BEFORE_ACTION. */
|
|
*yy_cp = yy_hold_char;
|
|
YY_RESTORE_YY_MORE_OFFSET
|
|
|
|
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
|
|
{
|
|
/* We're scanning a new file or input source. It's
|
|
* possible that this happened because the user
|
|
* just pointed yyin at a new source and called
|
|
* yylex(). If so, then we have to assure
|
|
* consistency between yy_current_buffer and our
|
|
* globals. Here is the right place to do so, because
|
|
* this is the first action (other than possibly a
|
|
* back-up) that will match for the new input source.
|
|
*/
|
|
yy_n_chars = yy_current_buffer->yy_n_chars;
|
|
yy_current_buffer->yy_input_file = yyin;
|
|
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
|
|
}
|
|
|
|
/* Note that here we test for yy_c_buf_p "<=" to the position
|
|
* of the first EOB in the buffer, since yy_c_buf_p will
|
|
* already have been incremented past the NUL character
|
|
* (since all states make transitions on EOB to the
|
|
* end-of-buffer state). Contrast this with the test
|
|
* in input().
|
|
*/
|
|
if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
|
|
{ /* This was really a NUL. */
|
|
yy_state_type yy_next_state;
|
|
|
|
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
|
|
|
|
yy_current_state = yy_get_previous_state();
|
|
|
|
/* Okay, we're now positioned to make the NUL
|
|
* transition. We couldn't have
|
|
* yy_get_previous_state() go ahead and do it
|
|
* for us because it doesn't know how to deal
|
|
* with the possibility of jamming (and we don't
|
|
* want to build jamming into it because then it
|
|
* will run more slowly).
|
|
*/
|
|
|
|
yy_next_state = yy_try_NUL_trans( yy_current_state );
|
|
|
|
yy_bp = yytext_ptr + YY_MORE_ADJ;
|
|
|
|
if ( yy_next_state )
|
|
{
|
|
/* Consume the NUL. */
|
|
yy_cp = ++yy_c_buf_p;
|
|
yy_current_state = yy_next_state;
|
|
goto yy_match;
|
|
}
|
|
|
|
else
|
|
{
|
|
yy_cp = yy_c_buf_p;
|
|
goto yy_find_action;
|
|
}
|
|
}
|
|
|
|
else switch ( yy_get_next_buffer() )
|
|
{
|
|
case EOB_ACT_END_OF_FILE:
|
|
{
|
|
yy_did_buffer_switch_on_eof = 0;
|
|
|
|
if ( yywrap() )
|
|
{
|
|
/* Note: because we've taken care in
|
|
* yy_get_next_buffer() to have set up
|
|
* yytext, we can now set up
|
|
* yy_c_buf_p so that if some total
|
|
* hoser (like flex itself) wants to
|
|
* call the scanner after we return the
|
|
* YY_NULL, it'll still work - another
|
|
* YY_NULL will get returned.
|
|
*/
|
|
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
|
|
|
|
yy_act = YY_STATE_EOF(YY_START);
|
|
goto do_action;
|
|
}
|
|
|
|
else
|
|
{
|
|
if ( ! yy_did_buffer_switch_on_eof )
|
|
YY_NEW_FILE;
|
|
}
|
|
break;
|
|
}
|
|
|
|
case EOB_ACT_CONTINUE_SCAN:
|
|
yy_c_buf_p =
|
|
yytext_ptr + yy_amount_of_matched_text;
|
|
|
|
yy_current_state = yy_get_previous_state();
|
|
|
|
yy_cp = yy_c_buf_p;
|
|
yy_bp = yytext_ptr + YY_MORE_ADJ;
|
|
goto yy_match;
|
|
|
|
case EOB_ACT_LAST_MATCH:
|
|
yy_c_buf_p =
|
|
&yy_current_buffer->yy_ch_buf[yy_n_chars];
|
|
|
|
yy_current_state = yy_get_previous_state();
|
|
|
|
yy_cp = yy_c_buf_p;
|
|
yy_bp = yytext_ptr + YY_MORE_ADJ;
|
|
goto yy_find_action;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default:
|
|
YY_FATAL_ERROR(
|
|
"fatal flex scanner internal error--no action found" );
|
|
} /* end of action switch */
|
|
} /* end of scanning one token */
|
|
} /* end of yylex */
|
|
|
|
|
|
/* yy_get_next_buffer - try to read in a new buffer
|
|
*
|
|
* Returns a code representing an action:
|
|
* EOB_ACT_LAST_MATCH -
|
|
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
|
|
* EOB_ACT_END_OF_FILE - end of file
|
|
*/
|
|
|
|
static int yy_get_next_buffer()
|
|
{
|
|
register char *dest = yy_current_buffer->yy_ch_buf;
|
|
register char *source = yytext_ptr;
|
|
register int number_to_move, i;
|
|
int ret_val;
|
|
|
|
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
|
|
YY_FATAL_ERROR(
|
|
"fatal flex scanner internal error--end of buffer missed" );
|
|
|
|
if ( yy_current_buffer->yy_fill_buffer == 0 )
|
|
{ /* Don't try to fill the buffer, so this is an EOF. */
|
|
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
|
|
{
|
|
/* We matched a single character, the EOB, so
|
|
* treat this as a final EOF.
|
|
*/
|
|
return EOB_ACT_END_OF_FILE;
|
|
}
|
|
|
|
else
|
|
{
|
|
/* We matched some text prior to the EOB, first
|
|
* process it.
|
|
*/
|
|
return EOB_ACT_LAST_MATCH;
|
|
}
|
|
}
|
|
|
|
/* Try to read more data. */
|
|
|
|
/* First move last chars to start of buffer. */
|
|
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
|
|
|
|
for ( i = 0; i < number_to_move; ++i )
|
|
*(dest++) = *(source++);
|
|
|
|
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
|
|
/* don't do the read, it's not guaranteed to return an EOF,
|
|
* just force an EOF
|
|
*/
|
|
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
|
|
|
|
else
|
|
{
|
|
int num_to_read =
|
|
yy_current_buffer->yy_buf_size - number_to_move - 1;
|
|
|
|
while ( num_to_read <= 0 )
|
|
{ /* Not enough room in the buffer - grow it. */
|
|
#ifdef YY_USES_REJECT
|
|
YY_FATAL_ERROR(
|
|
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
|
|
#else
|
|
|
|
/* just a shorter name for the current buffer */
|
|
YY_BUFFER_STATE b = yy_current_buffer;
|
|
|
|
int yy_c_buf_p_offset =
|
|
(int) (yy_c_buf_p - b->yy_ch_buf);
|
|
|
|
if ( b->yy_is_our_buffer )
|
|
{
|
|
int new_size = b->yy_buf_size * 2;
|
|
|
|
if ( new_size <= 0 )
|
|
b->yy_buf_size += b->yy_buf_size / 8;
|
|
else
|
|
b->yy_buf_size *= 2;
|
|
|
|
b->yy_ch_buf = (char *)
|
|
/* Include room in for 2 EOB chars. */
|
|
yy_flex_realloc( (void *) b->yy_ch_buf,
|
|
b->yy_buf_size + 2 );
|
|
}
|
|
else
|
|
/* Can't grow it, we don't own it. */
|
|
b->yy_ch_buf = 0;
|
|
|
|
if ( ! b->yy_ch_buf )
|
|
YY_FATAL_ERROR(
|
|
"fatal error - scanner input buffer overflow" );
|
|
|
|
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
|
|
|
|
num_to_read = yy_current_buffer->yy_buf_size -
|
|
number_to_move - 1;
|
|
#endif
|
|
}
|
|
|
|
if ( num_to_read > YY_READ_BUF_SIZE )
|
|
num_to_read = YY_READ_BUF_SIZE;
|
|
|
|
/* Read in more data. */
|
|
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
|
|
yy_n_chars, num_to_read );
|
|
|
|
yy_current_buffer->yy_n_chars = yy_n_chars;
|
|
}
|
|
|
|
if ( yy_n_chars == 0 )
|
|
{
|
|
if ( number_to_move == YY_MORE_ADJ )
|
|
{
|
|
ret_val = EOB_ACT_END_OF_FILE;
|
|
yyrestart( yyin );
|
|
}
|
|
|
|
else
|
|
{
|
|
ret_val = EOB_ACT_LAST_MATCH;
|
|
yy_current_buffer->yy_buffer_status =
|
|
YY_BUFFER_EOF_PENDING;
|
|
}
|
|
}
|
|
|
|
else
|
|
ret_val = EOB_ACT_CONTINUE_SCAN;
|
|
|
|
yy_n_chars += number_to_move;
|
|
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
|
|
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
|
|
|
|
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
|
|
|
|
return ret_val;
|
|
}
|
|
|
|
|
|
/* yy_get_previous_state - get the state just before the EOB char was reached */
|
|
|
|
static yy_state_type yy_get_previous_state()
|
|
{
|
|
register yy_state_type yy_current_state;
|
|
register char *yy_cp;
|
|
|
|
yy_current_state = yy_start;
|
|
yy_current_state += YY_AT_BOL();
|
|
|
|
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
|
|
{
|
|
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
|
|
if ( yy_accept[yy_current_state] )
|
|
{
|
|
yy_last_accepting_state = yy_current_state;
|
|
yy_last_accepting_cpos = yy_cp;
|
|
}
|
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
{
|
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
if ( yy_current_state >= 1038 )
|
|
yy_c = yy_meta[(unsigned int) yy_c];
|
|
}
|
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
|
}
|
|
|
|
return yy_current_state;
|
|
}
|
|
|
|
|
|
/* yy_try_NUL_trans - try to make a transition on the NUL character
|
|
*
|
|
* synopsis
|
|
* next_state = yy_try_NUL_trans( current_state );
|
|
*/
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
|
|
#else
|
|
static yy_state_type yy_try_NUL_trans( yy_current_state )
|
|
yy_state_type yy_current_state;
|
|
#endif
|
|
{
|
|
register int yy_is_jam;
|
|
register char *yy_cp = yy_c_buf_p;
|
|
|
|
register YY_CHAR yy_c = 1;
|
|
if ( yy_accept[yy_current_state] )
|
|
{
|
|
yy_last_accepting_state = yy_current_state;
|
|
yy_last_accepting_cpos = yy_cp;
|
|
}
|
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
{
|
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
if ( yy_current_state >= 1038 )
|
|
yy_c = yy_meta[(unsigned int) yy_c];
|
|
}
|
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
|
yy_is_jam = (yy_current_state == 1037);
|
|
|
|
return yy_is_jam ? 0 : yy_current_state;
|
|
}
|
|
|
|
|
|
#ifndef YY_NO_UNPUT
|
|
#ifdef YY_USE_PROTOS
|
|
static void yyunput( int c, register char *yy_bp )
|
|
#else
|
|
static void yyunput( c, yy_bp )
|
|
int c;
|
|
register char *yy_bp;
|
|
#endif
|
|
{
|
|
register char *yy_cp = yy_c_buf_p;
|
|
|
|
/* undo effects of setting up yytext */
|
|
*yy_cp = yy_hold_char;
|
|
|
|
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
|
|
{ /* need to shift things up to make room */
|
|
/* +2 for EOB chars. */
|
|
register int number_to_move = yy_n_chars + 2;
|
|
register char *dest = &yy_current_buffer->yy_ch_buf[
|
|
yy_current_buffer->yy_buf_size + 2];
|
|
register char *source =
|
|
&yy_current_buffer->yy_ch_buf[number_to_move];
|
|
|
|
while ( source > yy_current_buffer->yy_ch_buf )
|
|
*--dest = *--source;
|
|
|
|
yy_cp += (int) (dest - source);
|
|
yy_bp += (int) (dest - source);
|
|
yy_current_buffer->yy_n_chars =
|
|
yy_n_chars = yy_current_buffer->yy_buf_size;
|
|
|
|
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
|
|
YY_FATAL_ERROR( "flex scanner push-back overflow" );
|
|
}
|
|
|
|
*--yy_cp = (char) c;
|
|
|
|
|
|
yytext_ptr = yy_bp;
|
|
yy_hold_char = *yy_cp;
|
|
yy_c_buf_p = yy_cp;
|
|
}
|
|
#endif /* ifndef YY_NO_UNPUT */
|
|
|
|
|
|
#ifdef __cplusplus
|
|
static int yyinput()
|
|
#else
|
|
static int input()
|
|
#endif
|
|
{
|
|
int c;
|
|
|
|
*yy_c_buf_p = yy_hold_char;
|
|
|
|
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
|
|
{
|
|
/* yy_c_buf_p now points to the character we want to return.
|
|
* If this occurs *before* the EOB characters, then it's a
|
|
* valid NUL; if not, then we've hit the end of the buffer.
|
|
*/
|
|
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
|
|
/* This was really a NUL. */
|
|
*yy_c_buf_p = '\0';
|
|
|
|
else
|
|
{ /* need more input */
|
|
int offset = yy_c_buf_p - yytext_ptr;
|
|
++yy_c_buf_p;
|
|
|
|
switch ( yy_get_next_buffer() )
|
|
{
|
|
case EOB_ACT_LAST_MATCH:
|
|
/* This happens because yy_g_n_b()
|
|
* sees that we've accumulated a
|
|
* token and flags that we need to
|
|
* try matching the token before
|
|
* proceeding. But for input(),
|
|
* there's no matching to consider.
|
|
* So convert the EOB_ACT_LAST_MATCH
|
|
* to EOB_ACT_END_OF_FILE.
|
|
*/
|
|
|
|
/* Reset buffer status. */
|
|
yyrestart( yyin );
|
|
|
|
/* fall through */
|
|
|
|
case EOB_ACT_END_OF_FILE:
|
|
{
|
|
if ( yywrap() )
|
|
return EOF;
|
|
|
|
if ( ! yy_did_buffer_switch_on_eof )
|
|
YY_NEW_FILE;
|
|
#ifdef __cplusplus
|
|
return yyinput();
|
|
#else
|
|
return input();
|
|
#endif
|
|
}
|
|
|
|
case EOB_ACT_CONTINUE_SCAN:
|
|
yy_c_buf_p = yytext_ptr + offset;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
|
|
*yy_c_buf_p = '\0'; /* preserve yytext */
|
|
yy_hold_char = *++yy_c_buf_p;
|
|
|
|
yy_current_buffer->yy_at_bol = (c == '\n');
|
|
|
|
return c;
|
|
}
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
void yyrestart( FILE *input_file )
|
|
#else
|
|
void yyrestart( input_file )
|
|
FILE *input_file;
|
|
#endif
|
|
{
|
|
if ( ! yy_current_buffer )
|
|
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
|
|
|
|
yy_init_buffer( yy_current_buffer, input_file );
|
|
yy_load_buffer_state();
|
|
}
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
|
|
#else
|
|
void yy_switch_to_buffer( new_buffer )
|
|
YY_BUFFER_STATE new_buffer;
|
|
#endif
|
|
{
|
|
if ( yy_current_buffer == new_buffer )
|
|
return;
|
|
|
|
if ( yy_current_buffer )
|
|
{
|
|
/* Flush out information for old buffer. */
|
|
*yy_c_buf_p = yy_hold_char;
|
|
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
|
|
yy_current_buffer->yy_n_chars = yy_n_chars;
|
|
}
|
|
|
|
yy_current_buffer = new_buffer;
|
|
yy_load_buffer_state();
|
|
|
|
/* We don't actually know whether we did this switch during
|
|
* EOF (yywrap()) processing, but the only time this flag
|
|
* is looked at is after yywrap() is called, so it's safe
|
|
* to go ahead and always set it.
|
|
*/
|
|
yy_did_buffer_switch_on_eof = 1;
|
|
}
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
void yy_load_buffer_state( void )
|
|
#else
|
|
void yy_load_buffer_state()
|
|
#endif
|
|
{
|
|
yy_n_chars = yy_current_buffer->yy_n_chars;
|
|
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
|
|
yyin = yy_current_buffer->yy_input_file;
|
|
yy_hold_char = *yy_c_buf_p;
|
|
}
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
|
|
#else
|
|
YY_BUFFER_STATE yy_create_buffer( file, size )
|
|
FILE *file;
|
|
int size;
|
|
#endif
|
|
{
|
|
YY_BUFFER_STATE b;
|
|
|
|
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
|
|
if ( ! b )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
|
|
|
b->yy_buf_size = size;
|
|
|
|
/* yy_ch_buf has to be 2 characters longer than the size given because
|
|
* we need to put in 2 end-of-buffer characters.
|
|
*/
|
|
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
|
|
if ( ! b->yy_ch_buf )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
|
|
|
b->yy_is_our_buffer = 1;
|
|
|
|
yy_init_buffer( b, file );
|
|
|
|
return b;
|
|
}
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
void yy_delete_buffer( YY_BUFFER_STATE b )
|
|
#else
|
|
void yy_delete_buffer( b )
|
|
YY_BUFFER_STATE b;
|
|
#endif
|
|
{
|
|
if ( ! b )
|
|
return;
|
|
|
|
if ( b == yy_current_buffer )
|
|
yy_current_buffer = (YY_BUFFER_STATE) 0;
|
|
|
|
if ( b->yy_is_our_buffer )
|
|
yy_flex_free( (void *) b->yy_ch_buf );
|
|
|
|
yy_flex_free( (void *) b );
|
|
}
|
|
|
|
|
|
#ifndef YY_ALWAYS_INTERACTIVE
|
|
#ifndef YY_NEVER_INTERACTIVE
|
|
extern int isatty YY_PROTO(( int ));
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
|
|
#else
|
|
void yy_init_buffer( b, file )
|
|
YY_BUFFER_STATE b;
|
|
FILE *file;
|
|
#endif
|
|
|
|
|
|
{
|
|
yy_flush_buffer( b );
|
|
|
|
b->yy_input_file = file;
|
|
b->yy_fill_buffer = 1;
|
|
|
|
#if YY_ALWAYS_INTERACTIVE
|
|
b->yy_is_interactive = 1;
|
|
#else
|
|
#if YY_NEVER_INTERACTIVE
|
|
b->yy_is_interactive = 0;
|
|
#else
|
|
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
|
#endif
|
|
#endif
|
|
}
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
void yy_flush_buffer( YY_BUFFER_STATE b )
|
|
#else
|
|
void yy_flush_buffer( b )
|
|
YY_BUFFER_STATE b;
|
|
#endif
|
|
|
|
{
|
|
if ( ! b )
|
|
return;
|
|
|
|
b->yy_n_chars = 0;
|
|
|
|
/* We always need two end-of-buffer characters. The first causes
|
|
* a transition to the end-of-buffer state. The second causes
|
|
* a jam in that state.
|
|
*/
|
|
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
|
|
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
|
|
|
|
b->yy_buf_pos = &b->yy_ch_buf[0];
|
|
|
|
b->yy_at_bol = 1;
|
|
b->yy_buffer_status = YY_BUFFER_NEW;
|
|
|
|
if ( b == yy_current_buffer )
|
|
yy_load_buffer_state();
|
|
}
|
|
|
|
|
|
#ifndef YY_NO_SCAN_BUFFER
|
|
#ifdef YY_USE_PROTOS
|
|
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
|
|
#else
|
|
YY_BUFFER_STATE yy_scan_buffer( base, size )
|
|
char *base;
|
|
yy_size_t size;
|
|
#endif
|
|
{
|
|
YY_BUFFER_STATE b;
|
|
|
|
if ( size < 2 ||
|
|
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
|
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
|
/* They forgot to leave room for the EOB's. */
|
|
return 0;
|
|
|
|
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
|
|
if ( ! b )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
|
|
|
|
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
|
|
b->yy_buf_pos = b->yy_ch_buf = base;
|
|
b->yy_is_our_buffer = 0;
|
|
b->yy_input_file = 0;
|
|
b->yy_n_chars = b->yy_buf_size;
|
|
b->yy_is_interactive = 0;
|
|
b->yy_at_bol = 1;
|
|
b->yy_fill_buffer = 0;
|
|
b->yy_buffer_status = YY_BUFFER_NEW;
|
|
|
|
yy_switch_to_buffer( b );
|
|
|
|
return b;
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifndef YY_NO_SCAN_STRING
|
|
#ifdef YY_USE_PROTOS
|
|
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
|
|
#else
|
|
YY_BUFFER_STATE yy_scan_string( yy_str )
|
|
yyconst char *yy_str;
|
|
#endif
|
|
{
|
|
int len;
|
|
for ( len = 0; yy_str[len]; ++len )
|
|
;
|
|
|
|
return yy_scan_bytes( yy_str, len );
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifndef YY_NO_SCAN_BYTES
|
|
#ifdef YY_USE_PROTOS
|
|
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
|
|
#else
|
|
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
|
|
yyconst char *bytes;
|
|
int len;
|
|
#endif
|
|
{
|
|
YY_BUFFER_STATE b;
|
|
char *buf;
|
|
yy_size_t n;
|
|
int i;
|
|
|
|
/* Get memory for full buffer, including space for trailing EOB's. */
|
|
n = len + 2;
|
|
buf = (char *) yy_flex_alloc( n );
|
|
if ( ! buf )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
|
|
|
|
for ( i = 0; i < len; ++i )
|
|
buf[i] = bytes[i];
|
|
|
|
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
|
|
|
|
b = yy_scan_buffer( buf, n );
|
|
if ( ! b )
|
|
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
|
|
|
|
/* It's okay to grow etc. this buffer, and we should throw it
|
|
* away when we're done.
|
|
*/
|
|
b->yy_is_our_buffer = 1;
|
|
|
|
return b;
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifndef YY_NO_PUSH_STATE
|
|
#ifdef YY_USE_PROTOS
|
|
static void yy_push_state( int new_state )
|
|
#else
|
|
static void yy_push_state( new_state )
|
|
int new_state;
|
|
#endif
|
|
{
|
|
if ( yy_start_stack_ptr >= yy_start_stack_depth )
|
|
{
|
|
yy_size_t new_size;
|
|
|
|
yy_start_stack_depth += YY_START_STACK_INCR;
|
|
new_size = yy_start_stack_depth * sizeof( int );
|
|
|
|
if ( ! yy_start_stack )
|
|
yy_start_stack = (int *) yy_flex_alloc( new_size );
|
|
|
|
else
|
|
yy_start_stack = (int *) yy_flex_realloc(
|
|
(void *) yy_start_stack, new_size );
|
|
|
|
if ( ! yy_start_stack )
|
|
YY_FATAL_ERROR(
|
|
"out of memory expanding start-condition stack" );
|
|
}
|
|
|
|
yy_start_stack[yy_start_stack_ptr++] = YY_START;
|
|
|
|
BEGIN(new_state);
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifndef YY_NO_POP_STATE
|
|
static void yy_pop_state()
|
|
{
|
|
if ( --yy_start_stack_ptr < 0 )
|
|
YY_FATAL_ERROR( "start-condition stack underflow" );
|
|
|
|
BEGIN(yy_start_stack[yy_start_stack_ptr]);
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifndef YY_NO_TOP_STATE
|
|
static int yy_top_state()
|
|
{
|
|
return yy_start_stack[yy_start_stack_ptr - 1];
|
|
}
|
|
#endif
|
|
|
|
#ifndef YY_EXIT_FAILURE
|
|
#define YY_EXIT_FAILURE 2
|
|
#endif
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
static void yy_fatal_error( yyconst char msg[] )
|
|
#else
|
|
static void yy_fatal_error( msg )
|
|
char msg[];
|
|
#endif
|
|
{
|
|
(void) fprintf( stderr, "%s\n", msg );
|
|
exit( YY_EXIT_FAILURE );
|
|
}
|
|
|
|
|
|
|
|
/* Redefine yyless() so it works in section 3 code. */
|
|
|
|
#undef yyless
|
|
#define yyless(n) \
|
|
do \
|
|
{ \
|
|
/* Undo effects of setting up yytext. */ \
|
|
yytext[yyleng] = yy_hold_char; \
|
|
yy_c_buf_p = yytext + n; \
|
|
yy_hold_char = *yy_c_buf_p; \
|
|
*yy_c_buf_p = '\0'; \
|
|
yyleng = n; \
|
|
} \
|
|
while ( 0 )
|
|
|
|
|
|
/* Internal utility routines. */
|
|
|
|
#ifndef yytext_ptr
|
|
#ifdef YY_USE_PROTOS
|
|
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
|
|
#else
|
|
static void yy_flex_strncpy( s1, s2, n )
|
|
char *s1;
|
|
yyconst char *s2;
|
|
int n;
|
|
#endif
|
|
{
|
|
register int i;
|
|
for ( i = 0; i < n; ++i )
|
|
s1[i] = s2[i];
|
|
}
|
|
#endif
|
|
|
|
#ifdef YY_NEED_STRLEN
|
|
#ifdef YY_USE_PROTOS
|
|
static int yy_flex_strlen( yyconst char *s )
|
|
#else
|
|
static int yy_flex_strlen( s )
|
|
yyconst char *s;
|
|
#endif
|
|
{
|
|
register int n;
|
|
for ( n = 0; s[n]; ++n )
|
|
;
|
|
|
|
return n;
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
static void *yy_flex_alloc( yy_size_t size )
|
|
#else
|
|
static void *yy_flex_alloc( size )
|
|
yy_size_t size;
|
|
#endif
|
|
{
|
|
return (void *) malloc( size );
|
|
}
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
static void *yy_flex_realloc( void *ptr, yy_size_t size )
|
|
#else
|
|
static void *yy_flex_realloc( ptr, size )
|
|
void *ptr;
|
|
yy_size_t size;
|
|
#endif
|
|
{
|
|
/* The cast to (char *) in the following accommodates both
|
|
* implementations that use char* generic pointers, and those
|
|
* that use void* generic pointers. It works with the latter
|
|
* because both ANSI C and C++ allow castless assignment from
|
|
* any pointer type to void*, and deal with argument conversions
|
|
* as though doing an assignment.
|
|
*/
|
|
return (void *) realloc( (char *) ptr, size );
|
|
}
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
static void yy_flex_free( void *ptr )
|
|
#else
|
|
static void yy_flex_free( ptr )
|
|
void *ptr;
|
|
#endif
|
|
{
|
|
free( ptr );
|
|
}
|
|
|
|
#if YY_MAIN
|
|
int main()
|
|
{
|
|
yylex();
|
|
return 0;
|
|
}
|
|
#endif
|
|
#line 334 "lev_comp.l"
|
|
|
|
#ifdef AMIGA
|
|
long *alloc(n)
|
|
unsigned n;
|
|
{
|
|
return ((long *)malloc (n));
|
|
}
|
|
#endif
|
|
|
|
/* routine to switch to another input file; needed for flex */
|
|
void init_yyin( input_f )
|
|
FILE *input_f;
|
|
{
|
|
#if defined(FLEX_SCANNER) || defined(FLEXHACK_SCANNER)
|
|
if (yyin)
|
|
yyrestart(input_f);
|
|
else
|
|
#endif
|
|
yyin = input_f;
|
|
if (!orig_yyin) orig_yyin = yyin;
|
|
}
|
|
/* analogous routine (for completeness) */
|
|
void init_yyout( output_f )
|
|
FILE *output_f;
|
|
{
|
|
yyout = output_f;
|
|
}
|
|
|
|
long
|
|
handle_varstring_check()
|
|
{
|
|
struct lc_vardefs *vd;
|
|
yylval.map = (char *) alloc(strlen(yytext)+1);
|
|
Strcpy(yylval.map, yytext);
|
|
if ((vd = vardef_defined(variable_definitions, yytext, 1))) {
|
|
long l = vd->var_type;
|
|
long a = ((l & SPOVAR_ARRAY) == SPOVAR_ARRAY);
|
|
l = (l & ~SPOVAR_ARRAY);
|
|
if (l == SPOVAR_INT) return (a ? VARSTRING_INT_ARRAY : VARSTRING_INT);
|
|
if (l == SPOVAR_STRING) return (a ? VARSTRING_STRING_ARRAY : VARSTRING_STRING);
|
|
if (l == SPOVAR_VARIABLE) return (a ? VARSTRING_VAR_ARRAY : VARSTRING_VAR);
|
|
if (l == SPOVAR_COORD) return (a ? VARSTRING_COORD_ARRAY : VARSTRING_COORD);
|
|
if (l == SPOVAR_REGION) return (a ? VARSTRING_REGION_ARRAY : VARSTRING_REGION);
|
|
if (l == SPOVAR_MAPCHAR) return (a ? VARSTRING_MAPCHAR_ARRAY : VARSTRING_MAPCHAR);
|
|
if (l == SPOVAR_MONST) return (a ? VARSTRING_MONST_ARRAY : VARSTRING_MONST);
|
|
if (l == SPOVAR_OBJ) return (a ? VARSTRING_OBJ_ARRAY : VARSTRING_OBJ);
|
|
if (l == SPOVAR_SEL) return (a ? VARSTRING_SEL_ARRAY : VARSTRING_SEL);
|
|
}
|
|
return VARSTRING;
|
|
}
|
|
|
|
|
|
void
|
|
newline()
|
|
{
|
|
nh_line_number++;
|
|
token_start_pos = 0;
|
|
memset(curr_token, 0, 512);
|
|
}
|
|
|
|
void
|
|
savetoken(s)
|
|
char *s;
|
|
{
|
|
sprintf(curr_token, "%s", s);
|
|
advancepos(s);
|
|
}
|
|
|
|
void
|
|
advancepos(s)
|
|
char *s;
|
|
{
|
|
token_start_pos += strlen(s);
|
|
}
|
|
|
|
/*lev_comp.l*/
|