diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-22 08:41:20 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-11-22 08:41:20 +0000 |
commit | 1d0f57cbceb778139ca215cc4fcfd1584951f6dd (patch) | |
tree | cafd60c944c51fcce778aa5d6912bc548c518339 /crawl-ref/source/prebuilt | |
parent | 6f5e187a9e5cd348296dba2fd89d2e206e775a01 (diff) | |
download | crawl-ref-1d0f57cbceb778139ca215cc4fcfd1584951f6dd.tar.gz crawl-ref-1d0f57cbceb778139ca215cc4fcfd1584951f6dd.zip |
Merged stone_soup r15:451 into trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@452 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/prebuilt')
-rw-r--r-- | crawl-ref/source/prebuilt/levcomp.lex.cc | 2522 | ||||
-rw-r--r-- | crawl-ref/source/prebuilt/levcomp.tab.cc | 1907 | ||||
-rw-r--r-- | crawl-ref/source/prebuilt/levcomp.tab.h | 125 |
3 files changed, 4554 insertions, 0 deletions
diff --git a/crawl-ref/source/prebuilt/levcomp.lex.cc b/crawl-ref/source/prebuilt/levcomp.lex.cc new file mode 100644 index 0000000000..07ad28b7ac --- /dev/null +++ b/crawl-ref/source/prebuilt/levcomp.lex.cc @@ -0,0 +1,2522 @@ +#line 2 "levcomp.lex.cc" +/* 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> +#include <errno.h> + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include <stdlib.h> +#ifndef _WIN32 +#include <unistd.h> +#endif + +/* 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) + + +#define YY_USES_REJECT +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef int yy_state_type; +extern int yylineno; +int yylineno = 1; +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 43 +#define YY_END_OF_BUFFER 44 +static yyconst short int yy_acclist[944] = + { 0, + 3, 3, 44, 42, 43, 41, 42, 43, 41, 43, + 37, 42, 43, 36, 42, 43, 38, 42, 43, 42, + 43, 42, 43, 42, 43, 42, 43, 42, 43, 42, + 43, 42, 43, 42, 43, 42, 43, 42, 43, 42, + 43, 42, 43, 42, 43, 42, 43, 42, 43, 5, + 42, 43, 42, 43, 42, 43, 3, 42, 43, 3, + 36, 42, 43, 3, 38, 42, 43, 3, 42, 43, + 3, 42, 43, 3, 42, 43, 3, 42, 43, 3, + 42, 43, 3, 42, 43, 3, 42, 43, 3, 42, + 43, 3, 42, 43, 3, 42, 43, 3, 42, 43, + + 3, 42, 43, 3, 42, 43, 3, 42, 43, 3, + 42, 43, 3, 42, 43, 3, 5, 42, 43, 3, + 42, 43, 3, 42, 43, 42, 43, 40, 41, 43, + 41, 42, 43, 37, 42, 43, 36, 42, 43, 38, + 42, 43, 42, 43, 42, 43, 42, 43, 42, 43, + 42, 43, 42, 43, 42, 43, 42, 43, 42, 43, + 42, 43, 42, 43, 42, 43, 42, 43, 42, 43, + 42, 43, 5, 42, 43, 42, 43, 42, 43, 42, + 43, 22, 41, 42, 43, 21, 41, 43, 41, 42, + 43, 20, 37, 42, 43, 36, 42, 43, 38, 42, + + 43, 42, 43, 42, 43, 42, 43, 42, 43, 42, + 43, 42, 43, 42, 43, 42, 43, 42, 43, 42, + 43, 42, 43, 42, 43, 42, 43, 42, 43, 42, + 43, 5, 42, 43, 42, 43, 42, 43, 17, 41, + 42, 43, 18, 41, 43, 41, 42, 43, 16, 36, + 42, 43, 16, 38, 42, 43, 16, 42, 43, 16, + 42, 43, 16, 42, 43, 16, 42, 43, 16, 42, + 43, 16, 42, 43, 16, 42, 43, 16, 42, 43, + 16, 42, 43, 16, 42, 43, 16, 42, 43, 16, + 42, 43, 16, 42, 43, 16, 42, 43, 16, 42, + + 43, 16, 42, 43, 16, 42, 43, 16, 42, 43, + 41, 38, 5, 5, 3, 3, 38, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 5, 2, 5, 3, 5, 3, + 3, 5, 3, 39, 40, 41, 38, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 5, 39, 5, 39, 5, 39, + 39, 41, 21, 41, 41, 38, 5, 5, 17, 41, + 18, 41, 41, 16, 16, 38, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + + 16, 16, 16, 16, 4, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 4, 3, 5, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 4, 39, 19, 19, 38, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 5, 19, 4, 19, + 5, 19, 19, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 4, 16, 30, 31, 3, 3, 3, 3, 3, 3, + + 3, 3, 3, 3, 3, 3, 30, 3, 3, 3, + 3, 3, 3, 3, 3, 31, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 30, 39, 39, 39, + 39, 39, 39, 39, 39, 31, 39, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 30, 19, + 19, 19, 19, 19, 19, 19, 19, 31, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 30, + 16, 16, 16, 16, 16, 16, 16, 16, 31, 15, + 6, 13, 28, 29, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 28, 3, 3, + + 29, 39, 39, 39, 15, 39, 6, 39, 39, 39, + 39, 13, 39, 39, 39, 39, 39, 39, 28, 39, + 39, 29, 39, 19, 19, 19, 15, 19, 6, 19, + 19, 19, 19, 13, 19, 19, 19, 19, 19, 19, + 19, 28, 19, 19, 29, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 28, 16, 16, + 29, 8, 12, 10, 3, 1, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 39, + 8, 39, 12, 39, 39, 10, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 19, 8, + + 19, 12, 19, 19, 10, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 11, 9, 14, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 11, 39, 9, 39, 14, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 11, + 19, 9, 19, 14, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 39, 39, 39, 39, 39, + + 39, 39, 39, 39, 39, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 27, 26, 32, 33, 34, + 35, 3, 3, 27, 3, 3, 26, 3, 3, 32, + 3, 33, 3, 3, 34, 3, 35, 39, 27, 39, + 39, 26, 39, 39, 32, 39, 33, 39, 39, 34, + 39, 35, 39, 19, 19, 27, 19, 19, 26, 19, + 19, 32, 19, 33, 19, 19, 34, 19, 35, 16, + 16, 27, 16, 16, 26, 16, 16, 32, 16, 33, + 16, 16, 34, 16, 35, 24, 25, 23, 3, 3, + + 24, 3, 25, 3, 23, 39, 24, 39, 25, 39, + 23, 39, 19, 19, 24, 19, 25, 19, 23, 16, + 16, 24, 16, 25, 16, 23, 3, 39, 19, 16, + 3, 39, 19, 16, 3, 39, 19, 16, 7, 7, + 39, 7, 19 + } ; + +static yyconst short int yy_accept[798] = + { 0, + 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, + 3, 4, 6, 9, 11, 14, 17, 20, 22, 24, + 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, + 46, 48, 50, 53, 55, 57, 60, 64, 68, 71, + 74, 77, 80, 83, 86, 89, 92, 95, 98, 101, + 104, 107, 110, 113, 116, 120, 123, 126, 128, 131, + 134, 137, 140, 143, 145, 147, 149, 151, 153, 155, + 157, 159, 161, 163, 165, 167, 169, 171, 173, 176, + 178, 180, 182, 186, 189, 192, 196, 199, 202, 204, + 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, + + 226, 228, 230, 232, 235, 237, 239, 243, 246, 249, + 253, 257, 260, 263, 266, 269, 272, 275, 278, 281, + 284, 287, 290, 293, 296, 299, 302, 305, 308, 311, + 312, 313, 313, 313, 313, 313, 313, 313, 313, 313, + 313, 313, 313, 313, 313, 313, 313, 313, 314, 314, + 315, 315, 316, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 340, 341, 343, 344, 345, 345, + 347, 349, 350, 351, 352, 353, 354, 355, 356, 357, + 358, 359, 360, 361, 362, 363, 364, 365, 367, 368, + + 369, 371, 372, 372, 373, 375, 376, 377, 377, 377, + 377, 377, 377, 377, 377, 377, 377, 377, 377, 377, + 377, 377, 377, 377, 378, 378, 379, 379, 381, 383, + 384, 385, 387, 388, 389, 390, 391, 392, 393, 394, + 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, + 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, + 405, 405, 405, 405, 405, 405, 405, 405, 406, 407, + 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, + 418, 419, 420, 421, 422, 423, 424, 426, 428, 429, + 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, + + 440, 441, 442, 443, 444, 445, 447, 448, 450, 451, + 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, + 462, 463, 464, 465, 466, 467, 469, 471, 473, 474, + 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 488, 489, 490, 491, 493, 493, 493, + 493, 493, 493, 493, 493, 493, 493, 493, 494, 494, + 494, 494, 494, 494, 494, 494, 495, 496, 497, 498, + 499, 500, 501, 502, 503, 504, 505, 506, 508, 509, + 510, 511, 512, 513, 514, 515, 517, 518, 519, 520, + 521, 522, 523, 524, 525, 526, 527, 529, 530, 531, + + 532, 533, 534, 535, 536, 538, 539, 540, 541, 542, + 543, 544, 545, 546, 547, 548, 550, 551, 552, 553, + 554, 555, 556, 557, 559, 560, 561, 562, 563, 564, + 565, 566, 567, 568, 569, 571, 572, 573, 574, 575, + 576, 577, 578, 580, 580, 580, 580, 581, 582, 582, + 582, 582, 583, 583, 583, 583, 583, 583, 584, 584, + 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, + 595, 596, 597, 599, 600, 602, 603, 604, 605, 607, + 609, 610, 611, 612, 614, 615, 616, 617, 618, 619, + 621, 622, 624, 625, 626, 627, 629, 631, 632, 633, + + 634, 636, 637, 638, 639, 640, 641, 643, 644, 646, + 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, + 657, 659, 660, 662, 662, 663, 664, 664, 665, 665, + 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, + 666, 668, 669, 670, 671, 672, 673, 674, 675, 676, + 677, 678, 679, 680, 681, 683, 685, 686, 688, 689, + 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, + 700, 702, 704, 705, 707, 708, 709, 710, 711, 712, + 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, + 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, + + 733, 734, 734, 734, 734, 734, 734, 734, 734, 734, + 734, 734, 735, 736, 737, 738, 739, 740, 741, 742, + 743, 744, 746, 748, 750, 751, 752, 753, 754, 755, + 756, 757, 758, 759, 760, 762, 764, 766, 767, 768, + 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, + 779, 780, 781, 782, 783, 784, 785, 786, 786, 786, + 786, 786, 786, 786, 786, 786, 786, 786, 787, 788, + 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, + 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, + 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, + + 819, 820, 821, 822, 823, 824, 825, 826, 826, 827, + 827, 828, 828, 829, 830, 830, 831, 832, 833, 835, + 836, 838, 839, 841, 843, 844, 846, 848, 849, 851, + 852, 854, 855, 857, 859, 860, 862, 864, 865, 867, + 868, 870, 871, 873, 875, 876, 878, 880, 881, 883, + 884, 886, 887, 889, 891, 892, 894, 896, 896, 897, + 898, 899, 900, 902, 904, 906, 907, 909, 911, 913, + 914, 916, 918, 920, 921, 923, 925, 927, 927, 928, + 929, 930, 931, 931, 932, 933, 934, 935, 935, 936, + 937, 938, 939, 940, 942, 944, 944 + + } ; + +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, 2, 1, 1, 5, 6, 6, 6, 1, 6, + 6, 6, 6, 7, 8, 6, 1, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 10, 1, 6, + 6, 6, 6, 6, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, + 20, 26, 27, 28, 20, 20, 20, 20, 29, 20, + 6, 1, 6, 6, 30, 1, 31, 20, 32, 33, + + 34, 35, 20, 36, 37, 20, 20, 38, 39, 40, + 41, 42, 20, 43, 44, 45, 46, 47, 48, 20, + 20, 20, 6, 6, 6, 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[49] = + { 0, + 1, 1, 2, 3, 4, 4, 3, 5, 5, 1, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5 + } ; + +static yyconst short int yy_base[809] = + { 0, + 0, 44, 88, 132, 176, 220, 264, 308, 352, 396, + 1529, 1530, 48, 51, 1530, 1530, 1519, 1509, 1511, 1504, + 1500, 1512, 1496, 1500, 1491, 1508, 1484, 25, 1476, 1485, + 1474, 1480, 0, 46, 397, 0, 0, 1504, 1494, 1496, + 1487, 1488, 1484, 1496, 1480, 1484, 1475, 1492, 1468, 27, + 1460, 1469, 1458, 1464, 70, 51, 398, 57, 79, 82, + 74, 136, 137, 140, 141, 145, 146, 149, 224, 153, + 225, 157, 228, 403, 404, 229, 407, 312, 160, 232, + 408, 0, 169, 235, 242, 1530, 0, 1488, 1478, 1480, + 1473, 1469, 1481, 1465, 1469, 1460, 1477, 1453, 29, 1445, + + 1454, 1443, 1449, 244, 141, 409, 255, 315, 318, 0, + 1473, 0, 1463, 1465, 1458, 1454, 1466, 1450, 1454, 1445, + 1462, 1438, 209, 1430, 1439, 1428, 1434, 304, 410, 321, + 1458, 1455, 1440, 1453, 1440, 1440, 1442, 1449, 1437, 1441, + 1422, 1412, 1423, 296, 1414, 1407, 1408, 0, 1426, 0, + 411, 0, 1441, 1438, 1423, 1433, 1435, 1422, 1422, 1424, + 1431, 1419, 1423, 1404, 1394, 1405, 297, 1396, 1389, 1390, + 60, 1530, 249, 331, 1408, 341, 412, 165, 259, 417, + 327, 420, 421, 424, 455, 425, 456, 459, 460, 463, + 464, 428, 469, 472, 477, 481, 482, 345, 485, 486, + + 489, 490, 1430, 494, 501, 504, 335, 498, 508, 510, + 512, 233, 511, 514, 516, 520, 402, 475, 518, 521, + 522, 526, 527, 537, 529, 538, 541, 545, 553, 556, + 0, 1422, 1419, 1404, 1417, 1404, 1404, 1406, 1413, 1401, + 1405, 1386, 1376, 1387, 522, 1378, 1371, 1372, 1390, 531, + 1391, 1385, 1395, 1384, 1395, 1394, 1395, 1395, 1379, 1374, + 1359, 1362, 527, 1357, 1368, 1355, 1354, 1530, 1375, 1369, + 1374, 1378, 1367, 1378, 1377, 1378, 1378, 1362, 1357, 1342, + 1345, 530, 1340, 1351, 1338, 1337, 0, 577, 565, 578, + 587, 588, 592, 593, 596, 599, 608, 612, 615, 616, + + 619, 620, 623, 624, 627, 628, 1379, 559, 530, 574, + 631, 442, 584, 632, 66, 581, 611, 637, 634, 603, + 635, 638, 640, 639, 643, 647, 1378, 657, 648, 1356, + 1350, 1360, 1349, 1360, 1359, 1360, 1360, 1344, 1339, 1324, + 1327, 627, 1322, 1333, 1320, 1319, 0, 1350, 1344, 1334, + 1350, 1349, 1335, 1342, 1332, 1345, 1308, 1530, 1314, 1313, + 1310, 1311, 1313, 1314, 1311, 1530, 1333, 1327, 1333, 1316, + 1332, 1331, 1317, 1324, 1314, 1327, 1290, 0, 1296, 1295, + 1292, 1293, 1295, 1296, 1293, 0, 673, 683, 687, 692, + 693, 696, 702, 703, 706, 707, 711, 716, 719, 720, + + 724, 728, 731, 732, 727, 735, 723, 740, 736, 737, + 644, 678, 688, 741, 738, 1326, 742, 743, 747, 748, + 750, 755, 754, 1325, 1313, 1307, 1297, 1313, 1312, 1298, + 1305, 1295, 1308, 1271, 0, 1277, 1276, 1273, 1274, 1276, + 1277, 1274, 0, 1294, 1298, 1297, 1530, 1530, 1278, 1295, + 1283, 1530, 1265, 1260, 1264, 1255, 1262, 725, 1259, 726, + 1282, 1286, 1270, 1284, 1265, 1282, 1270, 1252, 1247, 1251, + 1242, 1249, 728, 1246, 732, 768, 767, 789, 790, 793, + 794, 798, 799, 802, 803, 807, 808, 811, 814, 819, + 815, 823, 822, 824, 826, 1282, 1281, 812, 828, 827, + + 1280, 830, 831, 829, 833, 837, 841, 840, 842, 1266, + 1270, 1269, 1250, 1267, 1255, 1237, 1232, 1236, 1227, 1234, + 812, 1231, 813, 1259, 1530, 1530, 1258, 1530, 1257, 1221, + 1234, 1221, 1232, 1219, 1230, 1226, 1218, 1227, 1223, 1246, + 0, 1245, 1244, 1208, 1221, 1208, 1219, 1206, 1217, 1213, + 1205, 1214, 1210, 848, 860, 861, 878, 868, 881, 882, + 890, 891, 894, 895, 898, 899, 902, 905, 906, 867, + 1241, 1240, 903, 1239, 909, 879, 650, 656, 885, 910, + 913, 912, 915, 916, 918, 1230, 1229, 1228, 1192, 1205, + 1192, 1203, 1190, 1201, 1197, 1189, 1198, 1194, 1530, 1530, + + 1530, 1219, 1182, 1182, 1179, 1180, 1178, 1177, 1180, 1175, + 1174, 1209, 1172, 1172, 1169, 1170, 1168, 1167, 1170, 1165, + 1164, 924, 928, 933, 937, 946, 953, 947, 956, 957, + 960, 963, 964, 967, 1205, 1204, 1203, 239, 929, 920, + 940, 952, 968, 970, 973, 972, 974, 1196, 1159, 1159, + 1156, 1157, 1155, 1154, 1157, 1152, 1151, 1161, 1149, 1151, + 1157, 1149, 1144, 1143, 1150, 1141, 1140, 1151, 1139, 1141, + 1144, 1133, 1128, 1123, 1121, 1109, 1108, 976, 975, 979, + 987, 982, 996, 1003, 1013, 1020, 1023, 752, 985, 991, + 992, 995, 986, 1000, 1026, 1004, 1008, 1115, 1099, 1090, + + 1094, 1086, 1080, 1079, 1086, 1077, 1076, 1086, 1530, 1076, + 1530, 1075, 1530, 1530, 1085, 1530, 1530, 1082, 0, 1072, + 0, 1071, 0, 0, 1081, 0, 0, 1033, 1036, 1040, + 1050, 1053, 1054, 1057, 1058, 1062, 1067, 1041, 1110, 1031, + 1109, 1037, 1107, 1106, 1044, 1105, 1104, 1071, 0, 1061, + 0, 1060, 0, 0, 1070, 0, 0, 1057, 1530, 1530, + 1530, 1036, 0, 0, 0, 1068, 1075, 1080, 1083, 1049, + 1032, 980, 921, 817, 0, 0, 0, 810, 734, 1084, + 1028, 733, 739, 640, 1090, 1045, 400, 423, 340, 1091, + 1087, 165, 1530, 1096, 161, 1530, 1129, 1131, 1136, 1141, + + 1146, 1151, 1156, 82, 1161, 1166, 1171, 1176 + } ; + +static yyconst short int yy_def[809] = + { 0, + 796, 1, 796, 3, 796, 5, 796, 7, 796, 9, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 797, 796, 796, 798, 798, 798, 798, 798, + 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, + 798, 798, 798, 798, 799, 798, 798, 800, 796, 796, + 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, + 800, 800, 800, 800, 800, 800, 800, 800, 801, 800, + 800, 802, 796, 796, 796, 796, 802, 802, 802, 802, + 802, 802, 802, 802, 802, 802, 802, 802, 802, 802, + + 802, 802, 802, 803, 802, 802, 796, 796, 796, 804, + 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, + 804, 804, 804, 804, 804, 804, 804, 804, 804, 796, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 797, 796, 797, + 796, 798, 798, 798, 798, 798, 798, 798, 798, 798, + 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, + 805, 796, 805, 799, 798, 806, 798, 800, 800, 796, + 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, + 800, 800, 800, 800, 800, 800, 800, 801, 801, 800, + + 801, 800, 807, 796, 796, 796, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 808, 807, 808, 807, 796, 796, 796, + 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, + 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 796, 798, 798, + 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, + 798, 798, 798, 798, 798, 798, 798, 806, 800, 800, + 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, + + 800, 800, 800, 800, 800, 800, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 808, 807, 808, 807, 804, + 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, + 804, 804, 804, 804, 804, 804, 804, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 798, 798, 798, 798, + 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, + 798, 798, 798, 798, 798, 798, 800, 800, 800, 800, + 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, + + 800, 800, 800, 800, 800, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 804, 804, 804, 804, 804, 804, + 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, + 804, 804, 804, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, + 798, 798, 798, 798, 798, 800, 800, 800, 800, 800, + 800, 800, 800, 800, 800, 800, 800, 800, 800, 800, + 800, 800, 807, 807, 807, 807, 807, 807, 807, 807, + + 807, 807, 807, 807, 807, 807, 807, 807, 807, 804, + 804, 804, 804, 804, 804, 804, 804, 804, 804, 804, + 804, 804, 804, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 798, + 798, 798, 798, 798, 798, 798, 798, 798, 798, 798, + 798, 798, 798, 800, 800, 800, 800, 800, 800, 800, + 800, 800, 800, 800, 800, 800, 800, 800, 800, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 804, 804, 804, 804, 804, + 804, 804, 804, 804, 804, 804, 804, 804, 796, 796, + + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 798, 798, 798, 798, 798, 798, 798, 798, 798, + 798, 800, 800, 800, 800, 800, 800, 800, 800, 800, + 800, 800, 800, 800, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 804, 804, 804, + 804, 804, 804, 804, 804, 804, 804, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 798, 798, 798, + 798, 798, 798, 798, 798, 798, 798, 800, 800, 800, + 800, 800, 800, 800, 800, 800, 800, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 804, 804, 804, + + 804, 804, 804, 804, 804, 804, 804, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 798, 798, 798, + 798, 798, 798, 798, 798, 798, 798, 800, 800, 800, + 800, 800, 800, 800, 800, 800, 800, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 804, 804, 804, + 804, 804, 804, 804, 804, 804, 804, 796, 796, 796, + 796, 798, 798, 798, 798, 800, 800, 800, 800, 807, + 807, 807, 807, 804, 804, 804, 804, 796, 798, 800, + 807, 804, 796, 798, 800, 807, 804, 796, 798, 800, + 807, 804, 796, 800, 807, 0, 796, 796, 796, 796, + + 796, 796, 796, 796, 796, 796, 796, 796 + } ; + +static yyconst short int yy_nxt[1579] = + { 0, + 12, 13, 14, 13, 12, 12, 15, 16, 17, 12, + 12, 12, 18, 19, 12, 20, 12, 12, 12, 12, + 12, 21, 22, 23, 24, 12, 25, 26, 12, 12, + 12, 12, 27, 28, 12, 12, 12, 12, 12, 29, + 12, 30, 12, 31, 12, 12, 12, 32, 33, 130, + 130, 130, 130, 130, 130, 142, 149, 165, 179, 218, + 179, 175, 172, 173, 143, 34, 166, 203, 219, 135, + 171, 171, 172, 173, 158, 179, 171, 179, 412, 171, + 130, 130, 130, 130, 180, 130, 231, 35, 12, 13, + 14, 13, 36, 36, 15, 37, 38, 12, 36, 36, + + 39, 40, 41, 42, 36, 36, 36, 36, 36, 43, + 44, 45, 46, 36, 47, 48, 36, 36, 36, 36, + 49, 50, 36, 36, 36, 36, 36, 51, 36, 52, + 36, 53, 36, 36, 36, 54, 55, 179, 179, 179, + 179, 179, 179, 179, 179, 181, 179, 179, 179, 179, + 179, 225, 179, 56, 179, 183, 179, 182, 179, 186, + 179, 199, 203, 199, 211, 184, 179, 190, 179, 185, + 204, 205, 206, 188, 793, 57, 58, 13, 59, 60, + 58, 58, 61, 62, 63, 58, 58, 58, 64, 65, + 58, 66, 58, 58, 58, 58, 58, 67, 68, 69, + + 70, 58, 71, 72, 58, 58, 58, 58, 73, 74, + 58, 58, 58, 58, 58, 75, 58, 76, 58, 77, + 58, 58, 58, 78, 79, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 203, 179, 130, 130, 130, 243, + 203, 80, 200, 130, 205, 130, 688, 148, 244, 187, + 148, 172, 173, 189, 313, 185, 228, 229, 230, 195, + 179, 191, 179, 81, 82, 83, 84, 85, 82, 82, + 86, 87, 88, 82, 82, 82, 89, 90, 82, 91, + 82, 82, 82, 82, 82, 92, 93, 94, 95, 82, + 96, 97, 82, 82, 82, 82, 98, 99, 82, 82, + + 82, 82, 82, 100, 82, 101, 82, 102, 82, 82, + 82, 103, 104, 179, 249, 179, 130, 130, 130, 130, + 229, 130, 130, 130, 130, 263, 282, 236, 179, 105, + 179, 171, 171, 172, 173, 181, 203, 171, 264, 283, + 171, 148, 148, 308, 148, 197, 199, 148, 199, 793, + 148, 106, 12, 107, 108, 109, 12, 12, 15, 110, + 111, 12, 112, 112, 113, 114, 112, 115, 112, 112, + 112, 112, 112, 116, 117, 118, 119, 112, 120, 121, + 112, 112, 112, 112, 122, 123, 112, 112, 112, 112, + 112, 124, 112, 125, 112, 126, 112, 112, 112, 127, + + 33, 150, 176, 203, 179, 179, 179, 179, 179, 179, + 179, 179, 201, 226, 150, 150, 176, 128, 130, 130, + 130, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 289, 179, 793, 192, 291, 792, 318, 146, 169, 129, + 151, 177, 193, 203, 194, 290, 293, 196, 196, 222, + 247, 202, 227, 250, 151, 177, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 409, 295, + 179, 299, 179, 179, 294, 179, 203, 292, 179, 297, + 179, 296, 179, 179, 179, 179, 199, 179, 199, 179, + 199, 179, 199, 179, 201, 204, 205, 206, 298, 203, + + 300, 301, 130, 130, 130, 130, 205, 130, 309, 203, + 306, 203, 203, 203, 302, 203, 303, 203, 319, 203, + 311, 203, 203, 203, 315, 305, 304, 203, 203, 314, + 203, 203, 310, 202, 312, 150, 317, 316, 224, 224, + 148, 148, 203, 148, 148, 328, 228, 229, 230, 320, + 321, 342, 406, 327, 130, 130, 130, 130, 229, 130, + 203, 323, 360, 322, 343, 380, 179, 308, 179, 361, + 325, 324, 381, 362, 250, 203, 382, 148, 148, 179, + 148, 179, 203, 148, 329, 203, 148, 387, 179, 179, + 179, 179, 413, 179, 179, 179, 179, 179, 410, 179, + + 179, 407, 179, 389, 203, 388, 391, 392, 393, 179, + 394, 179, 203, 179, 390, 179, 179, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 179, 179, 179, 179, + 179, 179, 203, 203, 395, 203, 203, 414, 203, 203, + 203, 203, 396, 417, 203, 203, 411, 408, 224, 203, + 148, 203, 328, 148, 399, 403, 398, 203, 224, 397, + 148, 400, 437, 148, 402, 401, 498, 415, 404, 438, + 418, 405, 422, 439, 179, 789, 179, 419, 416, 203, + 639, 420, 421, 423, 179, 476, 179, 424, 179, 203, + 179, 329, 499, 179, 179, 179, 179, 179, 640, 179, + + 477, 479, 480, 179, 179, 179, 179, 179, 179, 179, + 179, 500, 179, 478, 179, 484, 482, 179, 481, 179, + 179, 179, 179, 179, 203, 179, 483, 179, 179, 179, + 179, 179, 179, 179, 179, 179, 203, 203, 203, 203, + 494, 203, 203, 203, 203, 496, 497, 493, 203, 203, + 501, 203, 485, 203, 486, 203, 203, 487, 535, 538, + 488, 549, 489, 490, 491, 552, 495, 492, 179, 179, + 179, 179, 536, 539, 788, 550, 555, 787, 784, 553, + 503, 504, 554, 502, 738, 507, 506, 505, 508, 509, + 179, 179, 179, 179, 179, 179, 179, 179, 556, 179, + + 179, 179, 179, 179, 179, 179, 179, 558, 179, 179, + 179, 179, 179, 203, 179, 179, 179, 179, 179, 559, + 179, 557, 179, 203, 179, 203, 179, 203, 203, 203, + 203, 203, 203, 571, 203, 572, 570, 574, 203, 573, + 560, 203, 203, 203, 562, 594, 597, 575, 561, 179, + 564, 179, 565, 567, 783, 563, 568, 622, 782, 595, + 598, 179, 179, 179, 179, 578, 566, 576, 203, 179, + 569, 179, 577, 580, 581, 584, 635, 579, 583, 179, + 203, 179, 179, 179, 179, 179, 203, 623, 582, 585, + 624, 179, 179, 179, 179, 179, 179, 179, 179, 179, + + 179, 179, 179, 179, 203, 179, 179, 179, 179, 179, + 203, 203, 636, 203, 203, 641, 203, 203, 637, 203, + 626, 203, 203, 638, 628, 179, 625, 179, 630, 179, + 203, 179, 631, 627, 179, 633, 179, 629, 179, 634, + 179, 203, 632, 643, 678, 644, 646, 179, 179, 179, + 179, 647, 642, 203, 179, 645, 179, 179, 179, 179, + 179, 179, 690, 179, 179, 179, 179, 179, 179, 203, + 179, 203, 689, 203, 203, 203, 179, 179, 179, 179, + 179, 203, 179, 179, 691, 179, 203, 203, 179, 679, + 179, 681, 203, 203, 692, 680, 203, 179, 682, 179, + + 683, 203, 685, 684, 179, 203, 179, 686, 728, 203, + 687, 693, 695, 694, 179, 696, 179, 697, 729, 730, + 731, 179, 732, 179, 179, 741, 179, 203, 739, 203, + 743, 740, 203, 203, 179, 742, 179, 179, 203, 179, + 733, 179, 203, 179, 744, 203, 203, 734, 746, 735, + 203, 179, 747, 179, 179, 179, 179, 179, 179, 179, + 179, 179, 745, 179, 736, 179, 766, 737, 179, 179, + 179, 179, 786, 771, 770, 773, 179, 779, 179, 772, + 791, 179, 767, 179, 179, 179, 179, 179, 203, 769, + 781, 179, 179, 179, 179, 768, 795, 179, 778, 179, + + 794, 777, 776, 775, 774, 203, 203, 203, 203, 780, + 203, 203, 765, 764, 763, 762, 761, 760, 759, 758, + 757, 756, 755, 754, 753, 790, 752, 751, 785, 148, + 750, 148, 148, 148, 152, 152, 174, 174, 174, 174, + 174, 178, 749, 178, 178, 178, 198, 748, 198, 198, + 198, 203, 727, 726, 203, 203, 224, 725, 224, 224, + 224, 171, 171, 171, 171, 171, 288, 724, 288, 288, + 288, 307, 723, 722, 307, 307, 326, 721, 326, 326, + 326, 720, 719, 718, 717, 716, 715, 714, 713, 712, + 711, 710, 709, 708, 707, 706, 705, 704, 703, 702, + + 701, 700, 699, 698, 203, 203, 203, 677, 676, 675, + 674, 673, 672, 671, 670, 669, 668, 667, 666, 665, + 664, 663, 662, 661, 660, 659, 658, 657, 656, 655, + 654, 653, 652, 651, 650, 649, 648, 601, 600, 599, + 203, 203, 203, 621, 620, 619, 618, 617, 616, 615, + 614, 613, 612, 601, 600, 599, 611, 610, 609, 608, + 607, 606, 605, 604, 603, 602, 601, 600, 599, 596, + 593, 592, 591, 590, 589, 588, 528, 587, 526, 525, + 586, 203, 203, 203, 551, 548, 547, 546, 545, 544, + 543, 528, 542, 526, 541, 525, 540, 537, 534, 533, + + 532, 531, 530, 529, 528, 527, 526, 525, 524, 523, + 522, 521, 520, 519, 518, 517, 516, 452, 515, 514, + 513, 448, 447, 512, 511, 510, 203, 203, 475, 474, + 473, 472, 471, 470, 469, 468, 452, 467, 466, 465, + 448, 447, 464, 463, 462, 461, 460, 459, 458, 457, + 456, 455, 454, 453, 452, 451, 450, 449, 448, 447, + 446, 445, 444, 443, 442, 441, 440, 436, 435, 434, + 433, 432, 431, 430, 429, 428, 427, 426, 425, 203, + 203, 386, 385, 384, 383, 379, 378, 377, 376, 375, + 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, + + 364, 363, 359, 358, 357, 356, 355, 354, 353, 352, + 351, 350, 349, 348, 347, 346, 345, 344, 341, 340, + 339, 338, 337, 336, 335, 334, 333, 332, 331, 330, + 232, 203, 287, 286, 285, 284, 281, 280, 279, 278, + 277, 276, 275, 274, 273, 272, 271, 270, 269, 153, + 268, 267, 266, 265, 262, 261, 260, 259, 258, 257, + 256, 255, 254, 253, 252, 251, 131, 248, 247, 246, + 245, 242, 241, 240, 239, 238, 237, 236, 235, 234, + 233, 232, 223, 222, 221, 220, 217, 216, 215, 214, + 213, 212, 211, 210, 209, 208, 207, 170, 169, 168, + + 167, 164, 163, 162, 161, 160, 159, 158, 157, 156, + 155, 154, 153, 147, 146, 145, 144, 141, 140, 139, + 138, 137, 136, 135, 134, 133, 132, 131, 796, 11, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 796 + } ; + +static yyconst short int yy_chk[1579] = + { 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, 2, 13, + 13, 13, 14, 14, 14, 28, 34, 50, 58, 99, + 58, 56, 171, 171, 28, 2, 50, 315, 99, 34, + 55, 55, 55, 55, 56, 61, 55, 61, 315, 55, + 59, 59, 59, 60, 60, 60, 804, 2, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 4, 62, 63, 62, + 63, 64, 65, 64, 65, 63, 66, 67, 66, 67, + 68, 105, 68, 4, 70, 65, 70, 64, 72, 68, + 72, 79, 795, 79, 105, 66, 178, 72, 178, 67, + 83, 83, 83, 70, 792, 4, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 6, 69, 71, 69, 71, 73, + 76, 73, 76, 80, 212, 80, 84, 84, 84, 123, + 638, 6, 80, 85, 85, 85, 638, 104, 123, 69, + 104, 173, 173, 71, 212, 80, 107, 107, 107, 76, + 179, 73, 179, 6, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 8, 78, 128, 78, 108, 108, 108, 109, + 109, 109, 130, 130, 130, 144, 167, 128, 181, 8, + 181, 174, 174, 174, 174, 181, 207, 174, 144, 167, + 174, 176, 176, 207, 176, 78, 198, 176, 198, 789, + 176, 8, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + + 10, 35, 57, 217, 74, 75, 74, 75, 77, 81, + 77, 81, 81, 106, 129, 151, 177, 10, 180, 180, + 180, 182, 183, 182, 183, 184, 186, 184, 186, 192, + 182, 192, 788, 74, 184, 787, 217, 35, 57, 10, + 35, 57, 74, 312, 75, 183, 186, 77, 81, 106, + 129, 81, 106, 129, 151, 177, 185, 187, 185, 187, + 188, 189, 188, 189, 190, 191, 190, 191, 312, 188, + 193, 192, 193, 194, 187, 194, 218, 185, 195, 190, + 195, 189, 196, 197, 196, 197, 199, 200, 199, 200, + 201, 202, 201, 202, 202, 204, 204, 204, 191, 208, + + 193, 194, 205, 205, 205, 206, 206, 206, 208, 209, + 200, 210, 213, 211, 194, 214, 195, 215, 218, 219, + 210, 216, 220, 221, 214, 197, 196, 222, 223, 213, + 225, 309, 209, 202, 211, 250, 216, 215, 224, 226, + 224, 226, 227, 224, 226, 227, 228, 228, 228, 219, + 220, 245, 309, 225, 229, 229, 229, 230, 230, 230, + 308, 221, 263, 220, 245, 282, 289, 308, 289, 263, + 223, 222, 282, 263, 250, 310, 282, 288, 288, 290, + 288, 290, 316, 288, 227, 313, 288, 289, 291, 292, + 291, 292, 316, 293, 294, 293, 294, 295, 313, 295, + + 296, 310, 296, 291, 320, 290, 293, 294, 295, 297, + 296, 297, 317, 298, 292, 298, 299, 300, 299, 300, + 301, 302, 301, 302, 303, 304, 303, 304, 305, 306, + 305, 306, 311, 314, 297, 319, 321, 317, 318, 322, + 324, 323, 298, 320, 325, 411, 314, 311, 326, 329, + 326, 577, 329, 326, 301, 303, 300, 578, 328, 299, + 328, 301, 342, 328, 302, 301, 411, 318, 304, 342, + 321, 305, 323, 342, 387, 784, 387, 321, 319, 412, + 577, 321, 322, 324, 388, 387, 388, 325, 389, 413, + 389, 329, 412, 390, 391, 390, 391, 392, 578, 392, + + 388, 390, 391, 393, 394, 393, 394, 395, 396, 395, + 396, 413, 397, 389, 397, 395, 393, 398, 392, 398, + 399, 400, 399, 400, 407, 401, 394, 401, 405, 402, + 405, 402, 403, 404, 403, 404, 406, 409, 410, 415, + 407, 408, 414, 417, 418, 409, 410, 406, 419, 420, + 414, 421, 396, 688, 398, 423, 422, 399, 458, 460, + 400, 473, 401, 402, 403, 475, 408, 404, 477, 476, + 477, 476, 458, 460, 783, 473, 477, 782, 779, 475, + 417, 418, 476, 415, 688, 421, 420, 419, 422, 423, + 478, 479, 478, 479, 480, 481, 480, 481, 478, 482, + + 483, 482, 483, 484, 485, 484, 485, 482, 486, 487, + 486, 487, 488, 498, 488, 489, 491, 489, 491, 483, + 490, 481, 490, 493, 492, 494, 492, 495, 500, 499, + 504, 502, 503, 494, 505, 495, 493, 499, 506, 498, + 485, 508, 507, 509, 487, 521, 523, 500, 486, 554, + 489, 554, 490, 491, 778, 488, 492, 554, 774, 521, + 523, 555, 556, 555, 556, 504, 490, 502, 570, 558, + 492, 558, 503, 506, 507, 509, 570, 505, 508, 557, + 576, 557, 559, 560, 559, 560, 579, 557, 507, 509, + 559, 561, 562, 561, 562, 563, 564, 563, 564, 565, + + 566, 565, 566, 567, 573, 567, 568, 569, 568, 569, + 575, 580, 573, 582, 581, 579, 583, 584, 575, 585, + 561, 640, 773, 576, 563, 622, 560, 622, 565, 623, + 639, 623, 566, 562, 624, 568, 624, 564, 625, 569, + 625, 641, 567, 581, 625, 582, 584, 626, 628, 626, + 628, 585, 580, 642, 627, 583, 627, 629, 630, 629, + 630, 631, 640, 631, 632, 633, 632, 633, 634, 643, + 634, 644, 639, 646, 645, 647, 679, 678, 679, 678, + 680, 772, 680, 682, 641, 682, 689, 693, 681, 626, + 681, 628, 690, 691, 642, 627, 692, 683, 629, 683, + + 630, 694, 632, 631, 684, 696, 684, 633, 678, 697, + 634, 643, 645, 644, 685, 646, 685, 647, 679, 680, + 681, 686, 682, 686, 687, 691, 687, 695, 689, 781, + 693, 690, 740, 771, 728, 692, 728, 729, 742, 729, + 683, 730, 738, 730, 694, 745, 786, 684, 696, 685, + 770, 731, 697, 731, 732, 733, 732, 733, 734, 735, + 734, 735, 695, 736, 686, 736, 728, 687, 737, 766, + 737, 766, 781, 740, 738, 745, 767, 762, 767, 742, + 786, 768, 730, 768, 769, 780, 769, 780, 791, 735, + 770, 785, 790, 785, 790, 732, 791, 794, 758, 794, + + 790, 755, 752, 750, 748, 747, 746, 744, 743, 766, + 741, 739, 725, 722, 720, 718, 715, 712, 710, 708, + 707, 706, 705, 704, 703, 785, 702, 701, 780, 797, + 700, 797, 797, 797, 798, 798, 799, 799, 799, 799, + 799, 800, 699, 800, 800, 800, 801, 698, 801, 801, + 801, 802, 677, 676, 802, 802, 803, 675, 803, 803, + 803, 805, 805, 805, 805, 805, 806, 674, 806, 806, + 806, 807, 673, 672, 807, 807, 808, 671, 808, 808, + 808, 670, 669, 668, 667, 666, 665, 664, 663, 662, + 661, 660, 659, 658, 657, 656, 655, 654, 653, 652, + + 651, 650, 649, 648, 637, 636, 635, 621, 620, 619, + 618, 617, 616, 615, 614, 613, 612, 611, 610, 609, + 608, 607, 606, 605, 604, 603, 602, 598, 597, 596, + 595, 594, 593, 592, 591, 590, 589, 588, 587, 586, + 574, 572, 571, 553, 552, 551, 550, 549, 548, 547, + 546, 545, 544, 543, 542, 540, 539, 538, 537, 536, + 535, 534, 533, 532, 531, 530, 529, 527, 524, 522, + 520, 519, 518, 517, 516, 515, 514, 513, 512, 511, + 510, 501, 497, 496, 474, 472, 471, 470, 469, 468, + 467, 466, 465, 464, 463, 462, 461, 459, 457, 456, + + 455, 454, 453, 451, 450, 449, 446, 445, 444, 442, + 441, 440, 439, 438, 437, 436, 434, 433, 432, 431, + 430, 429, 428, 427, 426, 425, 424, 416, 385, 384, + 383, 382, 381, 380, 379, 377, 376, 375, 374, 373, + 372, 371, 370, 369, 368, 367, 365, 364, 363, 362, + 361, 360, 359, 357, 356, 355, 354, 353, 352, 351, + 350, 349, 348, 346, 345, 344, 343, 341, 340, 339, + 338, 337, 336, 335, 334, 333, 332, 331, 330, 327, + 307, 286, 285, 284, 283, 281, 280, 279, 278, 277, + 276, 275, 274, 273, 272, 271, 270, 269, 267, 266, + + 265, 264, 262, 261, 260, 259, 258, 257, 256, 255, + 254, 253, 252, 251, 249, 248, 247, 246, 244, 243, + 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, + 232, 203, 175, 170, 169, 168, 166, 165, 164, 163, + 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, + 149, 147, 146, 145, 143, 142, 141, 140, 139, 138, + 137, 136, 135, 134, 133, 132, 131, 127, 126, 125, + 124, 122, 121, 120, 119, 118, 117, 116, 115, 114, + 113, 111, 103, 102, 101, 100, 98, 97, 96, 95, + 94, 93, 92, 91, 90, 89, 88, 54, 53, 52, + + 51, 49, 48, 47, 46, 45, 44, 43, 42, 41, + 40, 39, 38, 32, 31, 30, 29, 27, 26, 25, + 24, 23, 22, 21, 20, 19, 18, 17, 11, 796, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 796, 796, 796, + 796, 796, 796, 796, 796, 796, 796, 796 + } ; + +static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; +static char *yy_full_match; +static int yy_lp; +#define REJECT \ +{ \ +*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ +yy_cp = yy_full_match; /* restore poss. backed-over text */ \ +++yy_lp; \ +goto find_rule; \ +} +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#line 1 "levcomp.lpp" +#define INITIAL 0 +#line 2 "levcomp.lpp" + +// levcomp.l: +// Level compiler lexer for Dungeon Crawl Stone Soup. +// +// Based loosely on NetHack's lev_comp.l + +#include "AppHdr.h" +#include "levcomp.tab.h" +#include <cstring> + +static bool alloced = false; + +static void clean() +{ + if (yylval.text && alloced) + free( (void*) yylval.text); + yylval.text = NULL; + alloced = false; +} + +static void settext() +{ + clean(); + if ((yylval.text = strdup(yytext))) + alloced = true; +} + +#define MAPDEF 1 + +#define ARGUMENT 2 + +#define MNAME 3 + +#define KEYWORDS 4 + +#define YY_NEVER_INTERACTIVE 1 +#line 1130 "levcomp.lex.cc" + +/* 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 \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + } +#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 41 "levcomp.lpp" + + +#line 1298 "levcomp.lex.cc" + + 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_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*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 >= 797 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 1530 ); + +yy_find_action: + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; +find_rule: /* we branch to this label when backing up */ + for ( ; ; ) /* until we find what rule we matched */ + { + if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[yy_lp]; + { + yy_full_match = yy_cp; + break; + } + } + --yy_cp; + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + ++yylineno; + } + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +YY_RULE_SETUP +#line 43 "levcomp.lpp" +{ BEGIN(INITIAL); } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 45 "levcomp.lpp" +; + YY_BREAK +case 3: +YY_RULE_SETUP +#line 47 "levcomp.lpp" +{ + settext(); + return MAP_LINE; + } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 52 "levcomp.lpp" +{ BEGIN(MAPDEF); } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 54 "levcomp.lpp" +; + YY_BREAK +case 6: +YY_RULE_SETUP +#line 56 "levcomp.lpp" +{ BEGIN(ARGUMENT); return NAME; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 57 "levcomp.lpp" +return DEFAULT_DEPTH; + YY_BREAK +case 8: +YY_RULE_SETUP +#line 58 "levcomp.lpp" +return DEPTH; + YY_BREAK +case 9: +YY_RULE_SETUP +#line 59 "levcomp.lpp" +return ORIENT; + YY_BREAK +case 10: +YY_RULE_SETUP +#line 60 "levcomp.lpp" +{ BEGIN(ARGUMENT); return PLACE; } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 61 "levcomp.lpp" +return CHANCE; + YY_BREAK +case 12: +YY_RULE_SETUP +#line 62 "levcomp.lpp" +return FLAGS; + YY_BREAK +case 13: +YY_RULE_SETUP +#line 63 "levcomp.lpp" +{ BEGIN(KEYWORDS); return TAGS; } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 64 "levcomp.lpp" +{ BEGIN(ARGUMENT); return SYMBOL; } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 65 "levcomp.lpp" +{ BEGIN(MNAME); return MONS; } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 67 "levcomp.lpp" +{ + settext(); + return STRING; + } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 72 "levcomp.lpp" +; + YY_BREAK +case 18: +YY_RULE_SETUP +#line 73 "levcomp.lpp" +{ BEGIN(INITIAL); } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 75 "levcomp.lpp" +{ + settext(); + return MONSTER_NAME; + } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 80 "levcomp.lpp" +return COMMA; + YY_BREAK +case 21: +YY_RULE_SETUP +#line 81 "levcomp.lpp" +{ BEGIN(INITIAL); } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 82 "levcomp.lpp" +; + YY_BREAK +case 23: +YY_RULE_SETUP +#line 84 "levcomp.lpp" +return PANDEMONIC; + YY_BREAK +case 24: +YY_RULE_SETUP +#line 85 "levcomp.lpp" +return NO_HMIRROR; + YY_BREAK +case 25: +YY_RULE_SETUP +#line 86 "levcomp.lpp" +return NO_VMIRROR; + YY_BREAK +case 26: +YY_RULE_SETUP +#line 87 "levcomp.lpp" +return NO_ROTATE; + YY_BREAK +case 27: +YY_RULE_SETUP +#line 89 "levcomp.lpp" +return ENCOMPASS; + YY_BREAK +case 28: +YY_RULE_SETUP +#line 90 "levcomp.lpp" +return NORTH; + YY_BREAK +case 29: +YY_RULE_SETUP +#line 91 "levcomp.lpp" +return SOUTH; + YY_BREAK +case 30: +YY_RULE_SETUP +#line 92 "levcomp.lpp" +return EAST; + YY_BREAK +case 31: +YY_RULE_SETUP +#line 93 "levcomp.lpp" +return WEST; + YY_BREAK +case 32: +YY_RULE_SETUP +#line 94 "levcomp.lpp" +return NORTHEAST; + YY_BREAK +case 33: +YY_RULE_SETUP +#line 95 "levcomp.lpp" +return NORTHWEST; + YY_BREAK +case 34: +YY_RULE_SETUP +#line 96 "levcomp.lpp" +return SOUTHEAST; + YY_BREAK +case 35: +YY_RULE_SETUP +#line 97 "levcomp.lpp" +return SOUTHWEST; + YY_BREAK +case 36: +YY_RULE_SETUP +#line 99 "levcomp.lpp" +return DASH; + YY_BREAK +case 37: +YY_RULE_SETUP +#line 100 "levcomp.lpp" +return COMMA; + YY_BREAK +case 38: +YY_RULE_SETUP +#line 102 "levcomp.lpp" +{ + clean(); + yylval.i = atoi(yytext); + return INTEGER; + } + YY_BREAK +case 39: +YY_RULE_SETUP +#line 108 "levcomp.lpp" +{ + BEGIN(INITIAL); + settext(); + return STRING; + } + YY_BREAK +case 40: +YY_RULE_SETUP +#line 114 "levcomp.lpp" +{ BEGIN(INITIAL); } + YY_BREAK +case 41: +YY_RULE_SETUP +#line 116 "levcomp.lpp" +; + YY_BREAK +case 42: +YY_RULE_SETUP +#line 118 "levcomp.lpp" +return BAD_CHARACTER; + YY_BREAK +case 43: +YY_RULE_SETUP +#line 120 "levcomp.lpp" +ECHO; + YY_BREAK +#line 1622 "levcomp.lex.cc" + case YY_STATE_EOF(INITIAL): + case YY_STATE_EOF(MAPDEF): + case YY_STATE_EOF(ARGUMENT): + case YY_STATE_EOF(MNAME): + case YY_STATE_EOF(KEYWORDS): + 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(); + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; + + 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); + 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 >= 797 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + } + + 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 YY_CHAR yy_c = 1; + 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 >= 797 ) + 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 == 796); + if ( ! yy_is_jam ) + *yy_state_ptr++ = yy_current_state; + + 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; + + if ( c == '\n' ) + --yylineno; + + 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'); + if ( yy_current_buffer->yy_at_bol ) + ++yylineno; + + 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 _WIN32 +#include <unistd.h> +#else +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#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 120 "levcomp.lpp" + + +int yywrap() +{ + clean(); + return 1; +} diff --git a/crawl-ref/source/prebuilt/levcomp.tab.cc b/crawl-ref/source/prebuilt/levcomp.tab.cc new file mode 100644 index 0000000000..4b4d9dc3f3 --- /dev/null +++ b/crawl-ref/source/prebuilt/levcomp.tab.cc @@ -0,0 +1,1907 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + DEFAULT_DEPTH = 258, + SYMBOL = 259, + TAGS = 260, + NAME = 261, + DEPTH = 262, + ORIENT = 263, + PLACE = 264, + CHANCE = 265, + FLAGS = 266, + MONS = 267, + ENCOMPASS = 268, + NORTH = 269, + EAST = 270, + SOUTH = 271, + WEST = 272, + NORTHEAST = 273, + SOUTHEAST = 274, + SOUTHWEST = 275, + NORTHWEST = 276, + BAD_CHARACTER = 277, + NO_HMIRROR = 278, + NO_VMIRROR = 279, + NO_ROTATE = 280, + PANDEMONIC = 281, + DASH = 282, + COMMA = 283, + INTEGER = 284, + STRING = 285, + MAP_LINE = 286, + MONSTER_NAME = 287 + }; +#endif +/* Tokens. */ +#define DEFAULT_DEPTH 258 +#define SYMBOL 259 +#define TAGS 260 +#define NAME 261 +#define DEPTH 262 +#define ORIENT 263 +#define PLACE 264 +#define CHANCE 265 +#define FLAGS 266 +#define MONS 267 +#define ENCOMPASS 268 +#define NORTH 269 +#define EAST 270 +#define SOUTH 271 +#define WEST 272 +#define NORTHEAST 273 +#define SOUTHEAST 274 +#define SOUTHWEST 275 +#define NORTHWEST 276 +#define BAD_CHARACTER 277 +#define NO_HMIRROR 278 +#define NO_VMIRROR 279 +#define NO_ROTATE 280 +#define PANDEMONIC 281 +#define DASH 282 +#define COMMA 283 +#define INTEGER 284 +#define STRING 285 +#define MAP_LINE 286 +#define MONSTER_NAME 287 + + + + +/* Copy the first part of user declarations. */ +#line 1 "levcomp.ypp" + + +#include "AppHdr.h" +#include "libutil.h" +#include "levcomp.h" + +int yylex(); + +extern int yylineno; + +void yyerror(const char *e) +{ + fprintf(stderr, "%s:%d: %s\n", lc_desfile.c_str(), yylineno, e); + // Bail bail bail. + exit(1); +} + + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 21 "levcomp.ypp" +{ + int i; + const char *text; +} +/* Line 193 of yacc.c. */ +#line 184 "levcomp.tab.c" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 216 of yacc.c. */ +#line 197 "levcomp.tab.c" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 13 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 41 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 33 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 28 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 57 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 70 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 287 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint8 yyprhs[] = +{ + 0, 0, 3, 5, 6, 9, 11, 13, 15, 18, + 23, 26, 27, 30, 32, 34, 36, 38, 40, 42, + 44, 46, 49, 50, 53, 55, 58, 60, 63, 67, + 69, 71, 74, 76, 79, 83, 85, 88, 90, 93, + 95, 97, 99, 101, 103, 105, 107, 109, 111, 114, + 115, 118, 120, 122, 124, 126, 128, 131 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 34, 0, -1, 35, -1, -1, 36, 35, -1, 37, + -1, 39, -1, 38, -1, 3, 51, -1, 40, 41, + 58, 41, -1, 6, 30, -1, -1, 42, 41, -1, + 49, -1, 50, -1, 52, -1, 53, -1, 55, -1, + 46, -1, 45, -1, 43, -1, 5, 44, -1, -1, + 30, 44, -1, 4, -1, 4, 30, -1, 12, -1, + 12, 47, -1, 48, 28, 47, -1, 48, -1, 32, + -1, 9, 30, -1, 7, -1, 7, 51, -1, 29, + 27, 29, -1, 29, -1, 10, 29, -1, 8, -1, + 8, 54, -1, 13, -1, 14, -1, 15, -1, 16, + -1, 17, -1, 18, -1, 19, -1, 20, -1, 21, + -1, 11, 56, -1, -1, 57, 56, -1, 23, -1, + 24, -1, 25, -1, 59, -1, 60, -1, 60, 59, + -1, 31, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint8 yyrline[] = +{ + 0, 46, 46, 49, 50, 53, 54, 57, 60, 66, + 72, 80, 81, 84, 85, 86, 87, 88, 89, 90, + 91, 94, 97, 98, 106, 107, 113, 114, 117, 118, + 121, 134, 140, 141, 147, 152, 158, 164, 165, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 182, 185, + 186, 202, 203, 204, 207, 210, 211, 214 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "DEFAULT_DEPTH", "SYMBOL", "TAGS", + "NAME", "DEPTH", "ORIENT", "PLACE", "CHANCE", "FLAGS", "MONS", + "ENCOMPASS", "NORTH", "EAST", "SOUTH", "WEST", "NORTHEAST", "SOUTHEAST", + "SOUTHWEST", "NORTHWEST", "BAD_CHARACTER", "NO_HMIRROR", "NO_VMIRROR", + "NO_ROTATE", "PANDEMONIC", "DASH", "COMMA", "INTEGER", "STRING", + "MAP_LINE", "MONSTER_NAME", "$accept", "file", "definitions", + "definition", "def", "defdepth", "level", "name", "metalines", + "metaline", "tags", "tagstrings", "symbol", "mons", "mnames", "mname", + "place", "depth", "depth_range", "chance", "orientation", "orient_name", + "flags", "flagnames", "flagname", "map_def", "map_lines", "map_line", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 33, 34, 35, 35, 36, 36, 37, 38, 39, + 40, 41, 41, 42, 42, 42, 42, 42, 42, 42, + 42, 43, 44, 44, 45, 45, 46, 46, 47, 47, + 48, 49, 50, 50, 51, 51, 52, 53, 53, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 55, 56, + 56, 57, 57, 57, 58, 59, 59, 60 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 0, 2, 1, 1, 1, 2, 4, + 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 0, 2, 1, 2, 1, 2, 3, 1, + 1, 2, 1, 2, 3, 1, 2, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, + 2, 1, 1, 1, 1, 1, 2, 1 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 3, 0, 0, 0, 2, 3, 5, 7, 6, 11, + 35, 8, 10, 1, 4, 24, 22, 32, 37, 0, + 0, 49, 26, 0, 11, 20, 19, 18, 13, 14, + 15, 16, 17, 0, 25, 22, 21, 33, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 38, 31, 36, + 51, 52, 53, 48, 49, 30, 27, 29, 57, 11, + 54, 55, 12, 34, 23, 50, 0, 9, 56, 28 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 3, 4, 5, 6, 7, 8, 9, 23, 24, + 25, 36, 26, 27, 56, 57, 28, 29, 11, 30, + 31, 47, 32, 53, 54, 59, 60, 61 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -29 +static const yytype_int8 yypact[] = +{ + 16, -17, -10, 21, -29, 16, -29, -29, -29, 6, + -1, -29, -29, -29, -29, -3, -2, -17, -12, 1, + 3, 0, 2, 5, 6, -29, -29, -29, -29, -29, + -29, -29, -29, 4, -29, -2, -29, -29, -29, -29, + -29, -29, -29, -29, -29, -29, -29, -29, -29, -29, + -29, -29, -29, -29, 0, -29, -29, 9, -29, 6, + -29, 5, -29, -29, -29, -29, 2, -29, -29, -29 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -29, -29, 24, -29, -29, -29, -29, -29, -24, -29, + -29, -5, -29, -29, -28, -29, -29, -29, 22, -29, + -29, -29, -29, -14, -29, -29, -20, -29 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const yytype_uint8 yytable[] = +{ + 62, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 15, 16, 10, 17, 18, 19, 20, 21, 22, 1, + 12, 13, 2, 50, 51, 52, 33, 34, 35, 14, + 64, 48, 49, 63, 55, 67, 58, 66, 69, 37, + 65, 68 +}; + +static const yytype_uint8 yycheck[] = +{ + 24, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 4, 5, 29, 7, 8, 9, 10, 11, 12, 3, + 30, 0, 6, 23, 24, 25, 27, 30, 30, 5, + 35, 30, 29, 29, 32, 59, 31, 28, 66, 17, + 54, 61 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 3, 6, 34, 35, 36, 37, 38, 39, 40, + 29, 51, 30, 0, 35, 4, 5, 7, 8, 9, + 10, 11, 12, 41, 42, 43, 45, 46, 49, 50, + 52, 53, 55, 27, 30, 30, 44, 51, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 54, 30, 29, + 23, 24, 25, 56, 57, 32, 47, 48, 31, 58, + 59, 60, 41, 29, 44, 56, 28, 41, 59, 47 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +#else +static void +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + fprintf (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + +/* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to look-ahead token. */ + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a look-ahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: +#line 46 "levcomp.ypp" + { } + break; + + case 3: +#line 49 "levcomp.ypp" + {} + break; + + case 4: +#line 50 "levcomp.ypp" + {} + break; + + case 5: +#line 53 "levcomp.ypp" + {} + break; + + case 6: +#line 54 "levcomp.ypp" + {} + break; + + case 8: +#line 61 "levcomp.ypp" + { + lc_default_depth = lc_range; + } + break; + + case 9: +#line 67 "levcomp.ypp" + { + add_parsed_map( lc_map ); + } + break; + + case 10: +#line 73 "levcomp.ypp" + { + lc_map.init(); + lc_map.depth = lc_default_depth; + lc_map.name = (yyvsp[(2) - (2)].text); + } + break; + + case 21: +#line 94 "levcomp.ypp" + {} + break; + + case 23: +#line 99 "levcomp.ypp" + { + lc_map.tags += " "; + lc_map.tags += (yyvsp[(1) - (2)].text); + lc_map.tags += " "; + } + break; + + case 24: +#line 106 "levcomp.ypp" + {} + break; + + case 25: +#line 108 "levcomp.ypp" + { + lc_map.random_symbols = (yyvsp[(2) - (2)].text); + } + break; + + case 26: +#line 113 "levcomp.ypp" + {} + break; + + case 27: +#line 114 "levcomp.ypp" + {} + break; + + case 30: +#line 122 "levcomp.ypp" + { + bool recognised = lc_map.mons.add_mons((yyvsp[(1) - (1)].text)); + if (!recognised) + { + char buf[300]; + snprintf(buf, sizeof buf, "unknown monster '%s'", + (yyvsp[(1) - (1)].text)); + yyerror(buf); + } + } + break; + + case 31: +#line 135 "levcomp.ypp" + { + lc_map.place = (yyvsp[(2) - (2)].text); + } + break; + + case 32: +#line 140 "levcomp.ypp" + {} + break; + + case 33: +#line 142 "levcomp.ypp" + { + lc_map.depth = lc_range; + } + break; + + case 34: +#line 148 "levcomp.ypp" + { + lc_range.set((yyvsp[(1) - (3)].i), (yyvsp[(3) - (3)].i)); + } + break; + + case 35: +#line 153 "levcomp.ypp" + { + lc_range.set((yyvsp[(1) - (1)].i)); + } + break; + + case 36: +#line 159 "levcomp.ypp" + { + lc_map.chance = (yyvsp[(2) - (2)].i); + } + break; + + case 37: +#line 164 "levcomp.ypp" + {} + break; + + case 38: +#line 166 "levcomp.ypp" + { + lc_map.orient = (map_section_type) (yyvsp[(2) - (2)].i); + } + break; + + case 39: +#line 171 "levcomp.ypp" + { (yyval.i) = MAP_ENCOMPASS; } + break; + + case 40: +#line 172 "levcomp.ypp" + { (yyval.i) = MAP_NORTH; } + break; + + case 41: +#line 173 "levcomp.ypp" + { (yyval.i) = MAP_EAST; } + break; + + case 42: +#line 174 "levcomp.ypp" + { (yyval.i) = MAP_SOUTH; } + break; + + case 43: +#line 175 "levcomp.ypp" + { (yyval.i) = MAP_WEST; } + break; + + case 44: +#line 176 "levcomp.ypp" + { (yyval.i) = MAP_NORTHEAST; } + break; + + case 45: +#line 177 "levcomp.ypp" + { (yyval.i) = MAP_SOUTHEAST; } + break; + + case 46: +#line 178 "levcomp.ypp" + { (yyval.i) = MAP_SOUTHWEST; } + break; + + case 47: +#line 179 "levcomp.ypp" + { (yyval.i) = MAP_NORTHWEST; } + break; + + case 48: +#line 182 "levcomp.ypp" + {} + break; + + case 50: +#line 187 "levcomp.ypp" + { + switch ((yyvsp[(1) - (2)].i)) { + case NO_HMIRROR: + lc_map.flags &= ~MAPF_MIRROR_HORIZONTAL; + break; + case NO_VMIRROR: + lc_map.flags &= ~MAPF_MIRROR_VERTICAL; + break; + case NO_ROTATE: + lc_map.flags &= ~MAPF_ROTATE; + break; + } + } + break; + + case 51: +#line 202 "levcomp.ypp" + { (yyval.i) = NO_HMIRROR; } + break; + + case 52: +#line 203 "levcomp.ypp" + { (yyval.i) = NO_VMIRROR; } + break; + + case 53: +#line 204 "levcomp.ypp" + { (yyval.i) = NO_ROTATE; } + break; + + case 57: +#line 215 "levcomp.ypp" + { + lc_map.map.add_line((yyvsp[(1) - (1)].text)); + } + break; + + +/* Line 1267 of yacc.c. */ +#line 1692 "levcomp.tab.c" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +#line 220 "levcomp.ypp" + + diff --git a/crawl-ref/source/prebuilt/levcomp.tab.h b/crawl-ref/source/prebuilt/levcomp.tab.h new file mode 100644 index 0000000000..64857e6606 --- /dev/null +++ b/crawl-ref/source/prebuilt/levcomp.tab.h @@ -0,0 +1,125 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + DEFAULT_DEPTH = 258, + SYMBOL = 259, + TAGS = 260, + NAME = 261, + DEPTH = 262, + ORIENT = 263, + PLACE = 264, + CHANCE = 265, + FLAGS = 266, + MONS = 267, + ENCOMPASS = 268, + NORTH = 269, + EAST = 270, + SOUTH = 271, + WEST = 272, + NORTHEAST = 273, + SOUTHEAST = 274, + SOUTHWEST = 275, + NORTHWEST = 276, + BAD_CHARACTER = 277, + NO_HMIRROR = 278, + NO_VMIRROR = 279, + NO_ROTATE = 280, + PANDEMONIC = 281, + DASH = 282, + COMMA = 283, + INTEGER = 284, + STRING = 285, + MAP_LINE = 286, + MONSTER_NAME = 287 + }; +#endif +/* Tokens. */ +#define DEFAULT_DEPTH 258 +#define SYMBOL 259 +#define TAGS 260 +#define NAME 261 +#define DEPTH 262 +#define ORIENT 263 +#define PLACE 264 +#define CHANCE 265 +#define FLAGS 266 +#define MONS 267 +#define ENCOMPASS 268 +#define NORTH 269 +#define EAST 270 +#define SOUTH 271 +#define WEST 272 +#define NORTHEAST 273 +#define SOUTHEAST 274 +#define SOUTHWEST 275 +#define NORTHWEST 276 +#define BAD_CHARACTER 277 +#define NO_HMIRROR 278 +#define NO_VMIRROR 279 +#define NO_ROTATE 280 +#define PANDEMONIC 281 +#define DASH 282 +#define COMMA 283 +#define INTEGER 284 +#define STRING 285 +#define MAP_LINE 286 +#define MONSTER_NAME 287 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 21 "levcomp.ypp" +{ + int i; + const char *text; +} +/* Line 1529 of yacc.c. */ +#line 118 "levcomp.tab.h" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + +extern YYSTYPE yylval; + |