#define yy_create_buffer yylp_create_buffer #define yy_delete_buffer yylp_delete_buffer #define yy_scan_buffer yylp_scan_buffer #define yy_scan_string yylp_scan_string #define yy_scan_bytes yylp_scan_bytes #define yy_flex_debug yylp_flex_debug #define yy_init_buffer yylp_init_buffer #define yy_flush_buffer yylp_flush_buffer #define yy_load_buffer_state yylp_load_buffer_state #define yy_switch_to_buffer yylp_switch_to_buffer #define yyin yylpin #define yyleng yylpleng #define yylex yylplex #define yyout yylpout #define yyrestart yylprestart #define yytext yylptext #define yywrap yylpwrap /* A lexical scanner generated by flex */ /* Scanner skeleton version: * $Header: /exports/cvsroot-2/cvsroot/Singular/libparse.cc,v 1.7 2005-07-26 17:09:57 Singular Exp $ */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include #include /* 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 #include #define YY_USE_CONST #define YY_USE_PROTOS #endif #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define YY_BUF_SIZE 16384 typedef struct yy_buffer_state *YY_BUFFER_STATE; extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yyless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int yy_size_t; struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define YY_CURRENT_BUFFER yy_current_buffer /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yytext_ptr = yy_bp; \ yytext_ptr -= yy_more_len; \ yyleng = (int) (yy_cp - yytext_ptr); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_NUM_RULES 95 #define YY_END_OF_BUFFER 96 static yyconst short int yy_accept[457] = { 0, 0, 0, 0, 0, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 94, 1, 91, 92, 2, 93, 94, 94, 94, 94, 94, 94, 94, 94, 19, 18, 19, 19, 19, 19, 19, 19, 19, 28, 27, 26, 28, 28, 28, 28, 28, 28, 28, 95, 29, 95, 95, 95, 38, 31, 35, 32, 33, 37, 34, 42, 42, 95, 42, 42, 42, 42, 42, 42, 41, 46, 45, 46, 44, 48, 50, 47, 49, 62, 61, 52, 57, 58, 62, 59, 60, 62, 55, 56, 82, 81, 74, 77, 78, 82, 79, 80, 75, 76, 87, 86, 83, 87, 72, 71, 69, 72, 90, 89, 90, 65, 64, 63, 68, 67, 66, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 27, 0, 0, 0, 0, 0, 0, 0, 29, 0, 30, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 41, 41, 43, 48, 51, 0, 73, 85, 84, 70, 88, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 12, 0, 0, 0, 0, 0, 27, 27, 27, 27, 21, 20, 0, 0, 0, 0, 0, 36, 36, 0, 0, 0, 40, 0, 41, 0, 0, 0, 0, 0, 51, 0, 73, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 13, 12, 12, 0, 0, 0, 0, 0, 27, 21, 20, 20, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0, 39, 0, 40, 0, 0, 0, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 16, 0, 14, 20, 0, 0, 0, 0, 24, 0, 23, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 6, 0, 0, 11, 0, 0, 15, 0, 17, 0, 0, 22, 0, 25, 0, 0, 0, 0, 0, 54, 0, 0, 7, 7, 0, 8, 0, 0, 3, 0, 0, 7, 7, 7, 0, 0, 11, 11, 11, 0, 0, 0, 0, 0, 0, 7, 7, 7, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 11, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0, 0, 0, 4, 0, 0, 5, 5, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ; static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 11, 16, 11, 10, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 11, 21, 11, 11, 12, 22, 23, 22, 22, 22, 22, 22, 24, 25, 22, 22, 26, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 27, 28, 29, 30, 31, 11, 32, 22, 33, 34, 35, 36, 37, 22, 38, 22, 22, 39, 40, 41, 42, 43, 22, 44, 45, 46, 22, 47, 22, 48, 49, 22, 50, 11, 51, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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[52] = { 0, 1, 2, 3, 4, 2, 1, 5, 6, 1, 5, 1, 7, 8, 9, 5, 10, 5, 11, 5, 1, 1, 7, 7, 7, 7, 7, 1, 1, 1, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 1 } ; static yyconst short int yy_base[505] = { 0, 0, 46, 6, 91, 137, 183, 230, 281, 332, 383, 5, 11, 434, 0, 9, 12, 62, 68, 483, 532, 0, 0, 581, 630, 24, 71, 79, 85, 26, 31, 51, 53, 80, 93, 0, 0, 1182, 2024, 1129, 2024, 2024, 1146, 2024, 1137, 1148, 1120, 1102, 1107, 1100, 1092, 1102, 2024, 2024, 1119, 60, 1100, 1089, 1089, 1085, 1059, 2024, 93, 2024, 1084, 89, 1068, 1058, 1061, 1067, 1043, 2024, 2024, 1073, 1065, 1062, 2024, 2024, 2024, 2024, 2024, 1042, 2024, 2024, 680, 0, 0, 123, 730, 141, 148, 154, 2024, 2024, 2024, 995, 2024, 99, 2024, 2024, 2024, 2024, 2024, 2024, 2024, 2024, 1026, 2024, 2024, 997, 2024, 2024, 2024, 2024, 2024, 2024, 2024, 1019, 2024, 2024, 2024, 2024, 2024, 2024, 2024, 4, 2024, 2024, 2024, 14, 2024, 2024, 965, 2024, 2024, 2024, 2024, 2024, 2024, 937, 963, 956, 971, 930, 943, 938, 931, 940, 925, 114, 962, 950, 916, 925, 916, 935, 914, 100, 780, 948, 933, 894, 897, 888, 908, 887, 2024, 921, 2024, 905, 910, 897, 0, 0, 161, 0, 169, 175, 188, 2024, 906, 905, 203, 903, 83, 830, 194, 2024, 109, 0, 861, 0, 2024, 2024, 2024, 2024, 853, 0, 873, 209, 0, 749, 743, 635, 643, 629, 629, 210, 111, 655, 0, 654, 635, 627, 621, 215, 631, 639, 638, 636, 631, 0, 629, 603, 594, 590, 222, 601, 0, 607, 261, 267, 316, 0, 322, 616, 0, 0, 366, 0, 610, 0, 582, 0, 574, 247, 599, 0, 566, 554, 353, 223, 555, 547, 546, 535, 0, 0, 550, 529, 360, 527, 291, 559, 0, 0, 0, 541, 518, 490, 510, 412, 542, 373, 500, 2024, 512, 518, 0, 526, 2024, 539, 274, 240, 2024, 2024, 498, 499, 346, 549, 311, 503, 482, 486, 494, 491, 457, 403, 597, 449, 2024, 482, 2024, 471, 445, 569, 609, 390, 2024, 424, 2024, 575, 617, 0, 396, 880, 884, 933, 496, 386, 394, 647, 982, 91, 2024, 2024, 387, 392, 1033, 378, 658, 2024, 380, 2024, 376, 897, 2024, 377, 2024, 903, 273, 384, 295, 504, 2024, 310, 0, 129, 2024, 360, 2024, 392, 372, 0, 347, 340, 131, 163, 171, 637, 309, 0, 1084, 321, 281, 918, 273, 922, 939, 555, 192, 230, 382, 624, 2024, 307, 1046, 1061, 259, 1053, 1073, 1112, 1104, 1118, 1124, 940, 275, 1152, 947, 1153, 1183, 1173, 1138, 1203, 1213, 1233, 280, 1190, 1283, 1289, 1295, 1304, 1310, 878, 1068, 246, 0, 253, 1133, 72, 1316, 1336, 255, 249, 0, 239, 233, 1387, 1415, 1421, 1416, 574, 156, 1400, 2024, 1172, 1171, 1427, 211, 196, 0, 176, 134, 2024, 130, 0, 1458, 113, 1444, 377, 1508, 1472, 1486, 1538, 1468, 2024, 108, 1514, 0, 96, 1544, 216, 1550, 578, 242, 1558, 2024, 1589, 1600, 1611, 1622, 1633, 1644, 1655, 1666, 1677, 1688, 1699, 1710, 1721, 1732, 1743, 1750, 1757, 1768, 1779, 1790, 1801, 1812, 1823, 1834, 1845, 1856, 1866, 1872, 1878, 1888, 1889, 1900, 73, 1905, 1916, 1926, 1936, 1942, 1948, 1953, 50, 1964, 1974, 1984, 1991, 2001, 2007, 2012 } ; static yyconst short int yy_def[505] = { 0, 457, 457, 458, 458, 459, 459, 460, 460, 461, 461, 462, 462, 456, 13, 463, 463, 464, 464, 465, 465, 464, 464, 466, 466, 467, 467, 468, 468, 469, 469, 470, 470, 471, 471, 464, 464, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 472, 456, 473, 456, 456, 456, 456, 456, 456, 456, 456, 456, 84, 84, 84, 456, 84, 84, 84, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 474, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 472, 456, 456, 473, 475, 84, 84, 84, 88, 84, 84, 84, 456, 88, 88, 88, 88, 88, 456, 84, 456, 456, 476, 456, 477, 456, 456, 456, 456, 456, 474, 474, 456, 478, 456, 456, 456, 456, 456, 456, 456, 456, 456, 479, 480, 456, 456, 456, 456, 456, 158, 158, 158, 158, 481, 482, 456, 456, 456, 456, 456, 475, 475, 84, 88, 88, 185, 88, 88, 185, 185, 456, 185, 185, 476, 456, 477, 456, 456, 456, 478, 456, 456, 456, 456, 456, 456, 456, 456, 479, 480, 480, 456, 456, 456, 456, 456, 158, 481, 482, 482, 456, 456, 456, 456, 456, 84, 84, 456, 88, 88, 185, 456, 456, 185, 483, 456, 456, 456, 456, 456, 456, 456, 484, 456, 456, 456, 456, 480, 456, 456, 456, 456, 456, 456, 456, 482, 456, 456, 456, 456, 456, 456, 456, 185, 185, 185, 483, 485, 483, 485, 486, 456, 456, 456, 456, 487, 456, 456, 456, 456, 488, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 317, 489, 317, 317, 456, 316, 317, 490, 456, 456, 456, 322, 322, 322, 322, 322, 487, 487, 487, 456, 456, 491, 488, 362, 456, 456, 456, 456, 492, 493, 490, 490, 490, 456, 456, 322, 456, 456, 456, 456, 456, 456, 456, 456, 456, 494, 456, 495, 492, 492, 495, 493, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 496, 456, 497, 390, 456, 389, 389, 456, 456, 395, 395, 395, 395, 395, 498, 456, 456, 496, 456, 456, 456, 456, 499, 500, 496, 411, 411, 411, 411, 411, 456, 395, 501, 498, 436, 502, 456, 503, 499, 499, 503, 500, 456, 411, 504, 443, 456, 442, 442, 504, 456, 456, 504, 0, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456 } ; static yyconst short int yy_nxt[2076] = { 0, 456, 39, 40, 41, 39, 456, 77, 78, 53, 77, 192, 94, 77, 78, 94, 77, 42, 79, 80, 43, 194, 81, 54, 79, 80, 44, 123, 81, 131, 45, 124, 193, 46, 131, 47, 55, 95, 48, 56, 95, 132, 194, 49, 57, 50, 132, 51, 39, 40, 41, 39, 125, 58, 134, 82, 134, 425, 135, 96, 135, 82, 96, 42, 97, 98, 43, 97, 150, 99, 97, 98, 44, 97, 123, 99, 45, 151, 124, 46, 368, 47, 127, 137, 48, 407, 128, 138, 127, 49, 234, 50, 128, 51, 53, 157, 137, 159, 157, 125, 138, 188, 157, 409, 188, 157, 160, 129, 54, 357, 455, 188, 100, 129, 188, 445, 207, 59, 100, 207, 208, 55, 358, 208, 56, 174, 177, 177, 174, 57, 177, 209, 437, 235, 60, 254, 255, 433, 58, 62, 63, 446, 62, 174, 177, 177, 174, 371, 177, 357, 174, 177, 177, 174, 64, 177, 174, 177, 177, 174, 372, 177, 358, 174, 177, 177, 174, 65, 177, 407, 66, 174, 177, 177, 174, 67, 177, 174, 177, 177, 174, 357, 177, 445, 68, 62, 63, 422, 62, 357, 174, 177, 177, 174, 358, 177, 174, 177, 177, 174, 64, 177, 358, 445, 186, 231, 232, 232, 231, 69, 371, 245, 207, 65, 245, 207, 66, 262, 445, 208, 262, 67, 246, 372, 271, 290, 70, 271, 290, 449, 68, 71, 71, 71, 71, 71, 71, 72, 186, 71, 434, 71, 318, 71, 71, 318, 433, 451, 371, 245, 71, 71, 245, 233, 284, 449, 433, 71, 71, 71, 246, 372, 433, 273, 274, 274, 273, 427, 230, 231, 232, 232, 231, 454, 230, 339, 314, 426, 339, 314, 71, 71, 71, 71, 71, 71, 71, 71, 72, 404, 71, 405, 71, 262, 71, 71, 262, 339, 300, 417, 339, 71, 71, 396, 301, 316, 340, 317, 71, 71, 71, 275, 345, 290, 374, 345, 290, 233, 231, 232, 232, 231, 382, 230, 276, 277, 277, 276, 340, 230, 379, 71, 71, 71, 71, 71, 71, 71, 71, 74, 363, 71, 324, 71, 378, 71, 71, 375, 288, 288, 288, 288, 71, 71, 374, 288, 288, 288, 288, 71, 71, 71, 297, 297, 297, 297, 233, 289, 279, 279, 279, 279, 278, 238, 289, 273, 274, 274, 273, 374, 177, 298, 71, 71, 71, 71, 71, 71, 71, 71, 74, 404, 71, 405, 71, 250, 71, 71, 314, 374, 371, 314, 260, 71, 71, 297, 297, 297, 297, 373, 71, 71, 71, 372, 271, 369, 280, 271, 367, 308, 366, 365, 364, 275, 298, 309, 360, 316, 359, 350, 349, 338, 337, 71, 71, 83, 84, 85, 86, 84, 87, 88, 87, 89, 87, 87, 89, 87, 87, 87, 87, 87, 89, 87, 87, 87, 90, 90, 90, 90, 90, 87, 91, 87, 87, 87, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 92, 87, 102, 334, 267, 333, 103, 332, 305, 305, 305, 305, 104, 105, 318, 329, 106, 318, 273, 274, 274, 273, 339, 177, 258, 339, 107, 306, 108, 328, 276, 277, 277, 276, 327, 230, 276, 277, 277, 276, 326, 230, 109, 348, 279, 279, 279, 279, 269, 110, 111, 102, 325, 340, 320, 103, 319, 311, 312, 312, 311, 104, 105, 310, 307, 106, 275, 321, 321, 321, 321, 304, 322, 385, 303, 107, 385, 108, 278, 386, 302, 299, 296, 295, 278, 294, 289, 305, 305, 305, 305, 109, 280, 311, 312, 312, 311, 293, 110, 111, 113, 292, 391, 407, 114, 313, 306, 449, 421, 291, 115, 116, 453, 287, 117, 330, 330, 330, 330, 286, 331, 422, 285, 283, 118, 454, 119, 335, 335, 335, 335, 282, 336, 281, 298, 311, 312, 312, 311, 230, 229, 313, 392, 392, 392, 392, 306, 120, 121, 113, 272, 270, 269, 114, 268, 376, 376, 376, 376, 115, 116, 393, 267, 117, 264, 321, 321, 321, 321, 217, 322, 217, 217, 118, 377, 119, 330, 330, 330, 330, 263, 331, 261, 313, 289, 260, 259, 258, 149, 373, 253, 252, 251, 250, 359, 298, 120, 121, 172, 173, 173, 172, 174, 175, 174, 176, 174, 174, 176, 174, 174, 174, 174, 174, 176, 174, 174, 174, 177, 177, 177, 177, 177, 174, 178, 174, 174, 174, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 179, 174, 180, 181, 181, 180, 180, 182, 180, 183, 180, 180, 183, 180, 180, 180, 180, 180, 183, 180, 180, 180, 181, 181, 181, 181, 181, 180, 184, 180, 180, 180, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 185, 180, 217, 249, 248, 217, 217, 218, 217, 219, 217, 217, 219, 217, 217, 217, 217, 220, 219, 217, 217, 217, 218, 218, 218, 218, 218, 217, 217, 217, 217, 217, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 218, 217, 217, 236, 237, 237, 236, 236, 238, 236, 239, 236, 236, 239, 236, 236, 236, 236, 236, 239, 236, 236, 236, 237, 237, 237, 237, 237, 236, 240, 236, 236, 236, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 236, 236, 339, 339, 339, 339, 339, 339, 339, 339, 198, 407, 404, 341, 405, 244, 421, 341, 342, 335, 335, 335, 335, 242, 336, 339, 339, 339, 339, 422, 230, 343, 230, 230, 229, 316, 341, 169, 306, 168, 380, 380, 380, 380, 383, 383, 383, 383, 166, 227, 344, 226, 225, 224, 344, 345, 339, 339, 345, 381, 223, 385, 385, 384, 385, 385, 341, 386, 386, 385, 222, 342, 385, 344, 221, 386, 216, 388, 215, 365, 214, 213, 212, 367, 343, 388, 346, 211, 210, 206, 389, 386, 205, 204, 203, 202, 201, 200, 389, 199, 198, 196, 195, 344, 351, 352, 352, 351, 351, 353, 351, 354, 351, 351, 354, 351, 351, 351, 351, 351, 354, 351, 351, 351, 352, 352, 352, 352, 352, 351, 355, 351, 351, 351, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 351, 351, 361, 361, 191, 361, 361, 361, 361, 190, 361, 189, 361, 187, 361, 361, 376, 376, 376, 376, 363, 361, 361, 397, 397, 397, 397, 171, 361, 361, 361, 394, 394, 394, 394, 377, 395, 169, 423, 423, 423, 423, 398, 380, 380, 380, 380, 168, 166, 341, 377, 361, 361, 361, 361, 165, 361, 361, 361, 361, 164, 361, 381, 361, 163, 361, 361, 162, 161, 158, 379, 156, 361, 361, 400, 400, 400, 400, 155, 361, 361, 361, 399, 399, 399, 399, 424, 331, 383, 383, 383, 383, 154, 401, 402, 402, 402, 402, 153, 336, 152, 381, 361, 361, 149, 148, 147, 384, 392, 392, 392, 392, 146, 384, 407, 456, 145, 456, 144, 408, 143, 382, 385, 385, 142, 385, 385, 393, 386, 386, 141, 140, 409, 407, 404, 404, 405, 405, 408, 388, 139, 438, 438, 385, 438, 438, 385, 439, 439, 386, 456, 409, 389, 385, 456, 404, 385, 405, 441, 386, 397, 397, 397, 397, 407, 404, 456, 405, 456, 408, 444, 442, 391, 410, 410, 410, 410, 456, 411, 398, 456, 456, 409, 394, 394, 394, 394, 456, 395, 456, 456, 456, 393, 456, 456, 456, 456, 456, 456, 456, 456, 456, 377, 412, 413, 413, 412, 412, 414, 412, 415, 412, 412, 415, 412, 412, 412, 412, 412, 415, 412, 412, 412, 413, 413, 413, 413, 413, 412, 416, 412, 412, 412, 413, 413, 413, 413, 413, 413, 413, 413, 413, 413, 413, 413, 413, 413, 413, 413, 413, 413, 412, 412, 418, 418, 418, 418, 456, 331, 399, 399, 399, 399, 456, 331, 400, 400, 400, 400, 456, 456, 456, 398, 456, 419, 419, 419, 419, 381, 336, 402, 402, 402, 402, 401, 336, 410, 410, 410, 410, 456, 411, 456, 401, 456, 456, 456, 456, 456, 384, 456, 456, 456, 456, 456, 393, 428, 429, 429, 428, 428, 430, 428, 431, 428, 428, 431, 428, 428, 428, 428, 428, 431, 428, 428, 428, 429, 429, 429, 429, 429, 428, 432, 428, 428, 428, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 428, 428, 435, 435, 456, 435, 435, 435, 435, 456, 435, 456, 435, 456, 435, 435, 423, 423, 423, 423, 437, 435, 435, 456, 456, 456, 456, 456, 435, 435, 435, 418, 418, 418, 418, 456, 331, 419, 419, 419, 419, 456, 336, 407, 456, 456, 456, 456, 421, 456, 398, 435, 435, 456, 407, 404, 401, 405, 456, 421, 438, 422, 456, 438, 424, 456, 439, 456, 456, 456, 456, 456, 422, 435, 435, 456, 435, 435, 435, 435, 456, 435, 456, 435, 438, 435, 435, 438, 438, 439, 439, 438, 435, 435, 439, 456, 404, 456, 405, 435, 435, 435, 438, 456, 441, 438, 456, 456, 439, 456, 456, 456, 456, 444, 404, 456, 405, 442, 441, 456, 456, 456, 435, 435, 438, 456, 456, 438, 456, 456, 439, 442, 456, 456, 456, 449, 404, 456, 405, 456, 450, 449, 404, 456, 405, 456, 453, 456, 456, 456, 456, 456, 456, 451, 438, 456, 456, 438, 456, 454, 439, 456, 456, 456, 456, 449, 404, 456, 405, 456, 450, 449, 456, 456, 456, 456, 450, 449, 456, 456, 456, 456, 453, 451, 456, 449, 404, 456, 405, 451, 453, 456, 456, 456, 456, 454, 456, 456, 456, 456, 456, 456, 456, 454, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 126, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 133, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 167, 167, 167, 456, 456, 167, 167, 170, 170, 170, 456, 456, 170, 170, 197, 197, 456, 197, 197, 197, 197, 197, 197, 197, 197, 228, 228, 456, 228, 228, 228, 228, 228, 228, 228, 228, 241, 241, 456, 241, 241, 241, 241, 241, 241, 241, 241, 243, 243, 456, 243, 243, 243, 243, 243, 243, 243, 243, 247, 247, 456, 247, 247, 247, 247, 247, 247, 247, 247, 256, 256, 456, 256, 256, 256, 256, 256, 256, 256, 256, 257, 257, 456, 257, 257, 257, 257, 257, 257, 257, 257, 265, 265, 456, 265, 265, 265, 265, 265, 265, 265, 265, 266, 266, 456, 266, 266, 266, 266, 266, 266, 266, 266, 315, 456, 456, 456, 456, 315, 323, 456, 456, 456, 456, 323, 340, 340, 340, 456, 456, 340, 340, 456, 456, 340, 347, 456, 456, 456, 456, 347, 356, 456, 456, 456, 356, 362, 362, 456, 362, 362, 362, 362, 362, 362, 362, 362, 370, 456, 456, 456, 370, 361, 361, 456, 361, 361, 361, 361, 361, 361, 361, 361, 387, 456, 456, 456, 387, 387, 456, 456, 456, 387, 390, 456, 456, 456, 390, 390, 403, 456, 456, 456, 403, 403, 406, 456, 456, 456, 406, 406, 406, 406, 406, 406, 420, 420, 420, 420, 420, 436, 436, 456, 436, 436, 436, 436, 436, 436, 436, 436, 440, 456, 456, 456, 440, 440, 456, 456, 456, 440, 443, 456, 456, 456, 443, 443, 435, 435, 456, 435, 435, 435, 435, 435, 435, 435, 435, 447, 456, 456, 456, 447, 447, 448, 456, 456, 456, 448, 448, 448, 448, 448, 448, 452, 452, 452, 452, 452, 37, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456 } ; static yyconst short int yy_chk[2076] = { 0, 0, 1, 1, 1, 1, 0, 11, 11, 3, 11, 125, 15, 12, 12, 16, 12, 1, 11, 11, 1, 129, 11, 3, 12, 12, 1, 25, 12, 29, 1, 25, 125, 1, 30, 1, 3, 15, 1, 3, 16, 29, 129, 1, 3, 1, 30, 1, 2, 2, 2, 2, 25, 3, 31, 11, 32, 497, 31, 15, 32, 12, 16, 2, 17, 17, 2, 17, 55, 17, 18, 18, 2, 18, 26, 18, 2, 55, 26, 2, 489, 2, 27, 33, 2, 409, 27, 33, 28, 2, 184, 2, 28, 2, 4, 62, 34, 65, 62, 26, 34, 97, 157, 409, 97, 157, 65, 27, 4, 323, 449, 188, 17, 28, 188, 446, 149, 4, 18, 149, 208, 4, 323, 149, 4, 87, 87, 87, 87, 4, 87, 149, 437, 184, 4, 208, 208, 434, 4, 5, 5, 432, 5, 89, 89, 89, 89, 347, 89, 356, 90, 90, 90, 90, 5, 90, 91, 91, 91, 91, 347, 91, 356, 174, 174, 174, 174, 5, 174, 422, 5, 176, 176, 176, 176, 5, 176, 177, 177, 177, 177, 357, 177, 431, 5, 6, 6, 422, 6, 358, 178, 178, 178, 178, 357, 178, 186, 186, 186, 186, 6, 186, 358, 429, 91, 182, 182, 182, 182, 6, 370, 199, 207, 6, 199, 207, 6, 215, 428, 207, 215, 6, 199, 370, 226, 251, 6, 226, 251, 451, 6, 7, 7, 7, 7, 7, 7, 7, 178, 7, 416, 7, 283, 7, 7, 283, 415, 451, 371, 245, 7, 7, 245, 182, 245, 454, 413, 7, 7, 7, 245, 371, 412, 230, 230, 230, 230, 407, 230, 231, 231, 231, 231, 454, 231, 340, 282, 405, 340, 282, 7, 7, 8, 8, 8, 8, 8, 8, 8, 386, 8, 386, 8, 262, 8, 8, 262, 342, 262, 396, 342, 8, 8, 378, 262, 282, 340, 282, 8, 8, 8, 230, 345, 290, 375, 345, 290, 231, 232, 232, 232, 232, 366, 232, 234, 234, 234, 234, 342, 234, 364, 8, 8, 9, 9, 9, 9, 9, 9, 9, 363, 9, 290, 9, 360, 9, 9, 355, 288, 288, 288, 288, 9, 9, 354, 250, 250, 250, 250, 9, 9, 9, 260, 260, 260, 260, 232, 288, 238, 238, 238, 238, 234, 238, 250, 273, 273, 273, 273, 352, 273, 260, 9, 9, 10, 10, 10, 10, 10, 10, 10, 439, 10, 439, 10, 250, 10, 10, 314, 351, 372, 314, 260, 10, 10, 297, 297, 297, 297, 349, 10, 10, 10, 372, 271, 341, 238, 271, 337, 271, 334, 332, 329, 273, 297, 271, 327, 314, 326, 320, 319, 309, 307, 10, 10, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 19, 304, 303, 301, 19, 299, 269, 269, 269, 269, 19, 19, 318, 296, 19, 318, 274, 274, 274, 274, 343, 274, 295, 343, 19, 269, 19, 294, 276, 276, 276, 276, 293, 276, 277, 277, 277, 277, 292, 277, 19, 318, 279, 279, 279, 279, 269, 19, 19, 20, 291, 343, 287, 20, 286, 281, 281, 281, 281, 20, 20, 272, 270, 20, 274, 289, 289, 289, 289, 268, 289, 369, 267, 20, 369, 20, 276, 369, 263, 261, 259, 258, 277, 255, 289, 305, 305, 305, 305, 20, 279, 311, 311, 311, 311, 254, 20, 20, 23, 253, 369, 421, 23, 281, 305, 453, 421, 252, 23, 23, 453, 249, 23, 298, 298, 298, 298, 248, 298, 421, 246, 244, 23, 453, 23, 306, 306, 306, 306, 242, 306, 240, 298, 312, 312, 312, 312, 235, 229, 311, 373, 373, 373, 373, 306, 23, 23, 24, 227, 225, 224, 24, 223, 359, 359, 359, 359, 24, 24, 373, 222, 24, 220, 321, 321, 321, 321, 219, 321, 218, 217, 24, 359, 24, 330, 330, 330, 330, 216, 330, 214, 312, 321, 213, 212, 211, 209, 373, 206, 205, 204, 203, 359, 330, 24, 24, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 158, 202, 201, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 315, 315, 315, 315, 316, 316, 316, 316, 198, 403, 403, 315, 403, 196, 403, 316, 315, 335, 335, 335, 335, 190, 335, 339, 339, 339, 339, 403, 183, 315, 181, 180, 171, 316, 339, 170, 335, 169, 365, 365, 365, 365, 367, 367, 367, 367, 167, 165, 315, 164, 163, 162, 316, 317, 317, 317, 317, 365, 161, 368, 385, 367, 368, 385, 317, 368, 385, 388, 160, 317, 388, 339, 159, 388, 156, 368, 155, 365, 154, 153, 152, 367, 317, 388, 317, 151, 150, 148, 368, 385, 147, 146, 145, 144, 143, 142, 388, 141, 140, 139, 132, 317, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, 328, 328, 117, 328, 328, 328, 328, 109, 328, 106, 328, 95, 328, 328, 376, 376, 376, 376, 328, 328, 328, 379, 379, 379, 379, 81, 328, 328, 328, 377, 377, 377, 377, 376, 377, 75, 404, 404, 404, 404, 379, 380, 380, 380, 380, 74, 73, 404, 377, 328, 328, 362, 362, 70, 362, 362, 362, 362, 69, 362, 380, 362, 68, 362, 362, 67, 66, 64, 379, 60, 362, 362, 382, 382, 382, 382, 59, 362, 362, 362, 381, 381, 381, 381, 404, 381, 383, 383, 383, 383, 58, 382, 384, 384, 384, 384, 57, 384, 56, 381, 362, 362, 54, 51, 50, 383, 392, 392, 392, 392, 49, 384, 408, 408, 48, 408, 47, 408, 46, 382, 387, 389, 45, 387, 389, 392, 387, 389, 44, 42, 408, 387, 387, 389, 387, 389, 387, 389, 39, 426, 425, 391, 426, 425, 391, 426, 425, 391, 37, 387, 389, 390, 0, 391, 390, 391, 425, 390, 397, 397, 397, 397, 390, 390, 0, 390, 0, 390, 426, 425, 391, 393, 393, 393, 393, 0, 393, 397, 0, 0, 390, 394, 394, 394, 394, 0, 394, 0, 0, 0, 393, 0, 0, 0, 0, 0, 0, 0, 0, 0, 394, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395, 398, 398, 398, 398, 0, 398, 399, 399, 399, 399, 0, 399, 400, 400, 400, 400, 0, 0, 0, 398, 0, 401, 401, 401, 401, 399, 401, 402, 402, 402, 402, 400, 402, 410, 410, 410, 410, 0, 410, 0, 401, 0, 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, 410, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 411, 417, 417, 0, 417, 417, 417, 417, 0, 417, 0, 417, 0, 417, 417, 423, 423, 423, 423, 417, 417, 417, 0, 0, 0, 0, 0, 417, 417, 417, 418, 418, 418, 418, 0, 418, 419, 419, 419, 419, 0, 419, 420, 420, 0, 420, 0, 420, 0, 418, 417, 417, 0, 427, 427, 419, 427, 0, 427, 438, 420, 0, 438, 423, 0, 438, 0, 0, 0, 0, 0, 427, 436, 436, 0, 436, 436, 436, 436, 0, 436, 0, 436, 444, 436, 436, 444, 441, 438, 444, 441, 436, 436, 441, 0, 444, 0, 444, 436, 436, 436, 442, 0, 441, 442, 0, 0, 442, 0, 0, 0, 0, 444, 442, 0, 442, 441, 442, 0, 0, 0, 436, 436, 440, 0, 0, 440, 0, 0, 440, 442, 0, 0, 0, 440, 440, 0, 440, 0, 440, 447, 447, 0, 447, 0, 447, 0, 0, 0, 0, 0, 0, 440, 443, 0, 0, 443, 0, 447, 443, 0, 0, 0, 0, 443, 443, 0, 443, 0, 443, 450, 450, 0, 450, 0, 450, 452, 452, 0, 452, 0, 452, 443, 0, 455, 455, 0, 455, 450, 455, 0, 0, 0, 0, 452, 0, 0, 0, 0, 0, 0, 0, 455, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 472, 472, 472, 0, 0, 472, 472, 473, 473, 473, 0, 0, 473, 473, 474, 474, 0, 474, 474, 474, 474, 474, 474, 474, 474, 475, 475, 0, 475, 475, 475, 475, 475, 475, 475, 475, 476, 476, 0, 476, 476, 476, 476, 476, 476, 476, 476, 477, 477, 0, 477, 477, 477, 477, 477, 477, 477, 477, 478, 478, 0, 478, 478, 478, 478, 478, 478, 478, 478, 479, 479, 0, 479, 479, 479, 479, 479, 479, 479, 479, 480, 480, 0, 480, 480, 480, 480, 480, 480, 480, 480, 481, 481, 0, 481, 481, 481, 481, 481, 481, 481, 481, 482, 482, 0, 482, 482, 482, 482, 482, 482, 482, 482, 483, 0, 0, 0, 0, 483, 484, 0, 0, 0, 0, 484, 485, 485, 485, 0, 0, 485, 485, 0, 0, 485, 486, 0, 0, 0, 0, 486, 487, 0, 0, 0, 487, 488, 488, 0, 488, 488, 488, 488, 488, 488, 488, 488, 490, 0, 0, 0, 490, 491, 491, 0, 491, 491, 491, 491, 491, 491, 491, 491, 492, 0, 0, 0, 492, 492, 0, 0, 0, 492, 493, 0, 0, 0, 493, 493, 494, 0, 0, 0, 494, 494, 495, 0, 0, 0, 495, 495, 495, 495, 495, 495, 496, 496, 496, 496, 496, 498, 498, 0, 498, 498, 498, 498, 498, 498, 498, 498, 499, 0, 0, 0, 499, 499, 0, 0, 0, 499, 500, 0, 0, 0, 500, 500, 501, 501, 0, 501, 501, 501, 501, 501, 501, 501, 501, 502, 0, 0, 0, 502, 502, 503, 0, 0, 0, 503, 503, 503, 503, 503, 503, 504, 504, 504, 504, 504, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected static int yy_more_flag = 0; static int yy_more_len = 0; #define yymore() (yy_more_flag = 1) #define YY_MORE_ADJ yy_more_len #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "libparse.l" #define INITIAL 0 #line 2 "libparse.l" /**************************************** * Computer Algebra System SINGULAR * ****************************************/ /* $Id: libparse.cc,v 1.7 2005-07-26 17:09:57 Singular Exp $ */ #include #include #include #include #include "mod2.h" #ifdef STANDALONE_PARSER #include "utils.h" #define HAVE_LIBPARSER #define YYLPDEBUG 1 #include "../kernel/febase.cc" #else #include "subexpr.h" #include "grammar.h" #include "ipshell.h" #include "ipid.h" #include "tok.h" #include "febase.h" #include "omalloc.h" #endif #include "libparse.h" #ifdef HAVE_LIBPARSER #define YY_SKIP_YYWRAP typedef enum { LP_NONE, LP_INFO, LP_CATEGORY, LP_VERSION} lib_cmds; int libread(FILE* f, char* buf, int max_size); int current_pos(int i); void print_version(lp_modes mode, char *p); void copy_string(lp_modes mode); extern void piCleanUp(procinfov pi); void make_version(char *p, int what); int brace1 = 0; /* { } */ int brace2 = 0; /* ( ) */ int brace3 = 0; /* [ ] */ int quote = 0; /* " */ int offset = 0; BOOLEAN p_static = FALSE; int old_state = 0; lib_cmds last_cmd = LP_NONE; char libnamebuf[128]; char *text_buffer=NULL; long string_start; char *yylp_buffer_start; int yylplineno = 1; int lpverbose = 0, check = 0; int texinfo_out = 0; int found_info=0, found_cat=0, found_version=0, found_oldhelp = 0, found_proc_in_proc = 0; char *yylp_errlist[]= { "", "missing close bracket ')' for proc definition in line %d.", /* 1 */ "missing close bracket ')' for procbody in line %d.", /* 2 */ "missing close bracket ']' for procbody in line %d.", /* 3 */ "too many ')' closed brackets in line %d.", /* 4 */ "too many ']' closed brackets in line %d.", /* 5 */ "missing close bracket ')' for example in line %d.", /* 6 */ "missing close bracket ']' for example in line %d.", /* 7 */ "cannot assign character '%c' in line %d to any group.", /* 8 */ "there must be a quote missing somewhere before line %d.", /* 9 */ "missing close bracket '}' at end of library in line %d.", /* 10 */ "missing close bracket ')' at end of library in line %d.", /* 11 */ "missing close bracket ']' at end of library in line %d.", /* 12 */ NULL }; int yylp_errno = 0; #ifdef STANDALONE_PARSER procinfov pi; int category_out = 0; void printpi(procinfov pi); void pi_clear(procinfov pi); extern "C" { int yylpwrap(); } void main_init(int argc, char *argv[]); void main_result(char *libname); #else /* STANDALONE_PARSER */ idhdl h0; #ifdef HAVE_NS idhdl h_top; #endif #define pi IDPROC(h0) extern "C" { int yylpwrap(); } extern libstackv library_stack; #endif /* STANDALONE_PARSER */ static unsigned long help_chksum; #define SET_DEF_END(mode, pi, p) \ if ( mode == LOAD_LIB) pi->data.s.def_end = p; #define SET_HELP_START(mode, pi, p) \ if ( mode == LOAD_LIB) {pi->data.s.help_start = p; help_chksum = 0;} #define SET_HELP_END(mode, pi, p) \ if ( mode == LOAD_LIB) {pi->data.s.help_end = p; \ pi->data.s.help_chksum = help_chksum;} #define SET_BODY_START(mode, pi, l, p) \ if ( mode == LOAD_LIB) \ { \ pi->data.s.body_lineno = l; \ pi->data.s.body_start = p; \ } #define SET_BODY_END(mode, pi, p) \ if ( mode == LOAD_LIB) \ { \ pi->data.s.body_end = p-1; \ pi->data.s.proc_end = p-1; \ } #define SET_EXAMPLE_START(mode, pi, l, p) \ if ( mode == LOAD_LIB) \ { \ pi->data.s.example_lineno = l; \ pi->data.s.example_start = p; \ } #define SET_PROC_END(mode, pi, p) \ if ( mode == LOAD_LIB) \ { \ pi->data.s.proc_end = p-1; \ if(pi->data.s.body_end==0) \ pi->data.s.body_end = p-1; \ } #define ROTATE_RIGHT(c) if ((c) & 01) (c) = ((c) >>1) + 0x8000; else (c) >>= 1; #define IncrCheckSum(c) \ do \ { \ ROTATE_RIGHT(help_chksum); \ help_chksum += c; \ help_chksum &= 0xffff; \ } \ while(0) #undef YY_DECL #ifdef HAVE_NS #define YY_DECL int yylex(char *newlib, char *libfile, \ lib_style_types *lib_style, \ idhdl pl, BOOLEAN autoexport, lp_modes mode) #else #define YY_DECL int yylex(char *newlib, char *libfile, \ lib_style_types *lib_style, \ lp_modes mode) #endif /* HAVE_NS */ #undef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( ((result = libread( (yyin), (char *) buf, max_size )) < 0 ) \ && ferror( yyin ) ) \ YY_FATAL_ERROR( "read in flex scanner failed" ); #define YY_USER_INIT { \ BEGIN(header); \ yylplineno = 1; \ yylp_errno = 0; \ *lib_style = OLD_LIBSTYLE; \ strcpy(libnamebuf,"(**unknown version**)"); \ } #if 0 proc[ \t]+{name} { printf("MISSING: PROC-cmd found. ERROR!\n"); } example[ \t]*\n { yylplineno++; printf("MISSING: EXAMPLE-cmd found. ERROR!\n"); } info=+"\"" { #endif /* %start START */ #define header 1 #define help 2 #define libcmd 3 #define libcmd2 4 #define pdef 5 #define phead 6 #define poldhelp 7 #define phelp 8 #define pbody 9 #define pstr 10 #define pexample 11 #define pestr 12 #define string 13 #define comment 14 #define info 15 #define category 16 #define version 17 /* 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 #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( yy_current_buffer->yy_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL int yylex YY_PROTO(( void )) #endif /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ if ( yyleng > 0 ) \ yy_current_buffer->yy_at_bol = \ (yytext[yyleng - 1] == '\n'); \ YY_USER_ACTION YY_DECL { register yy_state_type yy_current_state; register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; #line 236 "libparse.l" 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_more_len = 0; if ( yy_more_flag ) { yy_more_len = yy_c_buf_p - yytext_ptr; yy_more_flag = 0; } yy_cp = yy_c_buf_p; /* Support of yytext. */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_current_state += YY_AT_BOL(); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 457 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 2024 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; goto yy_find_action; case 1: YY_RULE_SETUP #line 237 "libparse.l" { } YY_BREAK case 2: YY_RULE_SETUP #line 238 "libparse.l" { old_state = YYSTATE; BEGIN(comment); } YY_BREAK case 3: YY_RULE_SETUP #line 240 "libparse.l" { yyless(4); old_state = YYSTATE; BEGIN(info); } YY_BREAK case 4: YY_RULE_SETUP #line 243 "libparse.l" { yyless(8); old_state = YYSTATE; BEGIN(category); } YY_BREAK case 5: YY_RULE_SETUP #line 246 "libparse.l" { found_version++; if ( mode != GET_INFO ) { make_version(yytext,1); #ifdef STANDALONE_PARSER if (texinfo_out) { char *c = libnamebuf; printf("$version = \""); while (*c != '\0') { if (*c == '$' || *c == '@') putchar('\\'); if (*c != '\r') putchar(*c); if (*c == '\\') { c++; if (*c != '"') putchar('\\'); } else c++; } printf("\";\n"); } else if (!category_out) printf("Version:%s;\n", libnamebuf); #else if (text_buffer!=NULL) omFree((ADDRESS)text_buffer); text_buffer = omStrDup(libnamebuf); omMarkAsStaticAddr(text_buffer); #endif } } YY_BREAK case 6: YY_RULE_SETUP #line 280 "libparse.l" { p_static=TRUE; } YY_BREAK case 7: YY_RULE_SETUP #line 282 "libparse.l" { char proc[256]; BEGIN(pdef); found_proc_in_proc = 0; proc[0]='\0'; sscanf( yytext, "%*[^p]proc %s", proc); if(strlen(proc)<1) sscanf( yytext, "proc %s", proc); #if YYLPDEBUG > 1 printf("Newlib:%s\n", newlib); #endif #ifdef STANDALONE_PARSER if ( pi != NULL ) { printpi(pi); pi_clear(pi); } #ifdef STANDALONE_PARSER pi = (procinfo *)malloc(sizeof(procinfo)); #else pi = (procinfo *)omAlloc(sizeof(procinfo)); #endif iiInitSingularProcinfo(pi, newlib, proc, yylplineno, current_pos(0), p_static); #else /*STANDALONE_PARSER*/ if( mode == LOAD_LIB) { #ifdef HAVE_NS h0 = enterid( proc, 0 /*myynest*/, PROC_CMD, &(IDPACKAGE(pl)->idroot), TRUE); if (h0==NULL) return(1); if(!p_static && autoexport) { h_top = enterid( proc, 0 /*myynest*/, PROC_CMD, &(basePack->idroot), FALSE ); if (h_top==NULL) return(1); } #else h0 = enterid( proc, 0 /*myynest*/, PROC_CMD, &IDROOT, TRUE ); #endif /* HAVE_NS */ /* omCheckAddr(IDID(h0)); */ if (h0!=NULL) { iiInitSingularProcinfo(IDPROC(h0), newlib, proc, yylplineno, current_pos(0),p_static); #ifdef HAVE_NS if (!p_static && h_top != NULL && autoexport) { if(IDPROC(h_top)!=NULL) piCleanUp((procinfo *)IDPROC(h_top)); IDPROC(h_top)=IDPROC(h0); IDPROC(h_top)->ref++; } IDPROC(h0)->pack=IDPACKAGE(pl); #endif /* HAVE_NS */ if (BVERBOSE(V_LOAD_PROC)) Warn( " proc '%s' registered", proc ); } #endif /*STANDALONE_PARSER*/ SET_DEF_END(mode, pi, current_pos(yyleng+1)); #if YYLPDEBUG if(lpverbose) { printf("// PROCEDURE '%s' status: %s, ", proc, p_static ? "local" : "global"); printf("starting at line %d,%d: definition end: %d (%d).\n", yylplineno, current_pos(0), (int)pi->data.s.def_end, brace1); } #endif p_static=FALSE; #ifndef STANDALONE_PARSER } #endif /*STANDALONE_PARSER*/ } YY_BREAK case 8: YY_RULE_SETUP #line 355 "libparse.l" { BEGIN(pexample); SET_EXAMPLE_START(mode, pi, yylplineno, current_pos(0)); #if YYLPDEBUG if(lpverbose) { printf("// EXAMPLE at line %d,%d (%d)\n", yylplineno, current_pos(0), brace1); } #endif } YY_BREAK case 9: YY_RULE_SETUP #line 367 "libparse.l" { quote++; BEGIN(libcmd); } YY_BREAK case 10: YY_RULE_SETUP #line 371 "libparse.l" { quote++; brace2++; BEGIN(libcmd2); } YY_BREAK case 11: YY_RULE_SETUP #line 375 "libparse.l" { make_version(yytext, 0); #if YYLPDEBUG > 1 printf("+(id)HEAD:%s\n", yytext); #endif } YY_BREAK case 12: YY_RULE_SETUP #line 381 "libparse.l" { #if YYLPDEBUG printf("+(cmt)HEAD:%s\n", yytext); #endif } YY_BREAK case 13: YY_RULE_SETUP #line 386 "libparse.l" { #if YYLPDEBUG > 1 printf("-HEAD:%s\n", yytext); #endif } YY_BREAK case 14: YY_RULE_SETUP #line 391 "libparse.l" { yyless(0); BEGIN(INITIAL); yymore(); } YY_BREAK case 15: YY_RULE_SETUP #line 395 "libparse.l" { yyless(0); *lib_style = NEW_LIBSTYLE; BEGIN(INITIAL); yymore(); } YY_BREAK case 16: YY_RULE_SETUP #line 402 "libparse.l" { quote++; BEGIN(libcmd); } YY_BREAK case 17: YY_RULE_SETUP #line 405 "libparse.l" { quote++; brace2++; BEGIN(libcmd2); } YY_BREAK case 18: YY_RULE_SETUP #line 408 "libparse.l" { yylplineno++; } YY_BREAK case 19: YY_RULE_SETUP #line 409 "libparse.l" { #if YYLPDEBUG > 1 printf(" HEAD:%s\n", yytext); #endif yyless(0); BEGIN(help); } YY_BREAK case 20: YY_RULE_SETUP #line 416 "libparse.l" { #if YYLPDEBUG > 1 printf(" HELP:%s\n", yytext); #endif BEGIN(INITIAL); } YY_BREAK case 21: YY_RULE_SETUP #line 421 "libparse.l" { #if YYLPDEBUG > 1 printf(" HELP:%s\n", yytext); #endif BEGIN(INITIAL); } YY_BREAK case 22: YY_RULE_SETUP #line 427 "libparse.l" { yyless(0); *lib_style = NEW_LIBSTYLE; BEGIN(INITIAL); yymore(); } YY_BREAK case 23: YY_RULE_SETUP #line 433 "libparse.l" { yyless(0); //printf("2) proc found.\n"); BEGIN(INITIAL); yymore(); } YY_BREAK case 24: YY_RULE_SETUP #line 439 "libparse.l" { quote++; BEGIN(libcmd); } YY_BREAK case 25: YY_RULE_SETUP #line 442 "libparse.l" { quote++; brace2++; BEGIN(libcmd2); } YY_BREAK case 26: YY_RULE_SETUP #line 446 "libparse.l" { yylplineno++; } YY_BREAK case 27: YY_RULE_SETUP #line 447 "libparse.l" { #if YYLPDEBUG if(lpverbose>2) printf("--->%s<---\n", yytext); #endif } YY_BREAK case 28: YY_RULE_SETUP #line 452 "libparse.l" { found_oldhelp=1; #if YYLPDEBUG > 1 printf("-HELP:%s\n", yytext); #endif } YY_BREAK case 29: YY_RULE_SETUP #line 460 "libparse.l" { quote--; yytext[yyleng-1] = '\0'; #ifndef STANDALONE_PARSER if ( mode == LOAD_LIB ) { library_stack->push(newlib, yytext); } #endif /* STANDALONE_PARSER */ #if YYLPDEBUG if(lpverbose>1) printf("LIB:'%s'\n", yytext); #endif BEGIN(INITIAL); } YY_BREAK case 30: YY_RULE_SETUP #line 473 "libparse.l" { quote--; brace2--; yytext[yyleng-1] = '\0'; #ifndef STANDALONE_PARSER if ( mode == LOAD_LIB ) { library_stack->push(newlib, yytext); } #endif /* STANDALONE_PARSER */ #if YYLPDEBUG if(lpverbose>1) printf("LIB:'%s'\n", yytext); #endif BEGIN(INITIAL); } YY_BREAK case 31: YY_RULE_SETUP #line 487 "libparse.l" { } YY_BREAK case 32: YY_RULE_SETUP #line 488 "libparse.l" { brace2++; #if YYLPDEBUG > 1 printf("%s", yytext); #endif } YY_BREAK case 33: YY_RULE_SETUP #line 494 "libparse.l" { brace2--; #if YYLPDEBUG > 1 printf(">%s<\n", yytext); printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3); #endif if(brace2<=0) { #if YYLPDEBUG > 1 printf("BEGIN(phead){=%d, (=%d, [=%d\n", brace1, brace2, brace3); #endif SET_DEF_END(mode, pi, current_pos(yyleng)); BEGIN(phead); } } YY_BREAK case 34: YY_RULE_SETUP #line 509 "libparse.l" { if(brace2>0) { #if YYLPDEBUG > 1 printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3); #endif yylp_errno = YYLP_DEF_BR2; return(1); } else { brace1++; BEGIN(pbody); if(lpverbose) printf("// BODY at line %d,%d (%d)\n", yylplineno, current_pos(0), brace1); SET_BODY_START(mode, pi, yylplineno, current_pos(0)); } } YY_BREAK case 35: YY_RULE_SETUP #line 527 "libparse.l" { yylplineno++; if(brace2<=0) { #if YYLPDEBUG > 1 printf("BEGIN(phead-2){=%d, (=%d, [=%d\n", brace1, brace2, brace3); #endif BEGIN(phead); } } YY_BREAK case 36: YY_RULE_SETUP #line 536 "libparse.l" { } YY_BREAK case 37: YY_RULE_SETUP #line 537 "libparse.l" { old_state = YYSTATE; BEGIN(comment); } YY_BREAK case 38: YY_RULE_SETUP #line 538 "libparse.l" { if(brace2<=0) { BEGIN(phead); yyless(0); } } YY_BREAK case 39: YY_RULE_SETUP #line 546 "libparse.l" { #if YYLPDEBUG if(lpverbose>2)printf("0-Len=%d;\n", yyleng); #endif if(check) { printf("Procedure %s (line %d) has OLD-STYLE-HELP!\n", pi->procname, pi->data.s.proc_lineno); } SET_HELP_START(mode, pi, current_pos(0)); BEGIN(poldhelp); yyless(0); } YY_BREAK case 40: YY_RULE_SETUP #line 559 "libparse.l" { #if YYLPDEBUG if(lpverbose>2)printf("1-Len=%d;\n", yyleng); #endif BEGIN(phelp); yyless(0); } YY_BREAK case 41: YY_RULE_SETUP #line 566 "libparse.l" { if(check && yyleng>2) { printf("Procedure %s (line %d) has OLD-STYLE-HELP!\n", pi->procname, pi->data.s.proc_lineno); } #if YYLPDEBUG if(lpverbose>2 && yyleng>2) printf("2-Len=%d, %s;\n", yyleng, pi->procname); #endif SET_HELP_START(mode, pi, current_pos(0)); BEGIN(poldhelp); yyless(0); } YY_BREAK case 42: YY_RULE_SETUP #line 580 "libparse.l" { printf("[%s]", yytext); } YY_BREAK case 43: YY_RULE_SETUP #line 582 "libparse.l" { } YY_BREAK case 44: YY_RULE_SETUP #line 583 "libparse.l" { SET_HELP_END(mode, pi, current_pos(0)); brace1++; BEGIN(pbody); if(lpverbose) { printf("// HELP from %d to %d\n", (int)pi->data.s.help_start, (int)pi->data.s.help_end); printf("// BODY at line %d,%d (%d)\n", yylplineno, current_pos(0), brace1); } #if YYLPDEBUG > 1 printf("BEGIN(pbody){=%d, (=%d, [=%d\n", brace1, brace2, brace3); #endif SET_BODY_START(mode, pi, yylplineno, current_pos(0)); #if YYLPDEBUG > 1 printf("BODY at %d/%d", yylplineno, current_pos(0)); #endif } YY_BREAK case 45: YY_RULE_SETUP #line 601 "libparse.l" { yylplineno++; } YY_BREAK case 46: YY_RULE_SETUP #line 602 "libparse.l" { } YY_BREAK case 47: YY_RULE_SETUP #line 604 "libparse.l" { old_state = YYSTATE; BEGIN(string); SET_HELP_START(mode, pi, current_pos(1)); } YY_BREAK case 48: YY_RULE_SETUP #line 609 "libparse.l" {} YY_BREAK case 49: YY_RULE_SETUP #line 610 "libparse.l" { brace1++; BEGIN(pbody); if(lpverbose) { printf("// HELP from %d to %d\n", (int)pi->data.s.help_start, (int)pi->data.s.help_end); printf("// BODY at line %d,%d (%d)\n", yylplineno, current_pos(0), brace1); } #if YYLPDEBUG > 1 printf("BEGIN(pbody){=%d, (=%d, [=%d\n", brace1, brace2, brace3); #endif SET_BODY_START(mode, pi, yylplineno, current_pos(0)); #if YYLPDEBUG > 1 printf("BODY at %d/%d", yylplineno, current_pos(0)); #endif } YY_BREAK case 50: YY_RULE_SETUP #line 627 "libparse.l" { yylplineno++;} YY_BREAK case 51: YY_RULE_SETUP #line 629 "libparse.l" { } YY_BREAK case 52: YY_RULE_SETUP #line 630 "libparse.l" { quote++; old_state = YYSTATE; BEGIN(string); /* printf("%s", yytext); */ } YY_BREAK case 53: YY_RULE_SETUP #line 634 "libparse.l" { if(check) printf("*** found 2 proc whithin procedure '%s'.\n", pi->procname); yyless(yyleng-1); } YY_BREAK case 54: YY_RULE_SETUP #line 639 "libparse.l" { if(check) printf("*** found 1 proc whithin procedure '%s'.\n", pi->procname); yyless(yyleng-1); } YY_BREAK case 55: YY_RULE_SETUP #line 644 "libparse.l" { brace1++; #if YYLPDEBUG > 1 printf("line: %d, (%d)%s\n", yylplineno, brace1, yytext); #endif } YY_BREAK case 56: YY_RULE_SETUP #line 650 "libparse.l" { #if YYLPDEBUG > 1 printf("line: %d, (%d)%s\n", yylplineno, brace1, yytext); #endif brace1--; if(brace2>0) { yylp_errno = YYLP_BODY_BR2; return(1); } if(brace3>0) { yylp_errno = YYLP_BODY_BR3; return(1); } if(brace1<=0) { SET_BODY_END(mode, pi, current_pos(yyleng)); SET_PROC_END(mode, pi, current_pos(yyleng)); #if YYLPDEBUG > 1 printf("-%d\n", current_pos(0)); #endif BEGIN(INITIAL); } } YY_BREAK case 57: YY_RULE_SETUP #line 676 "libparse.l" { brace2++; /* printf("%s", yytext); */ } YY_BREAK case 58: YY_RULE_SETUP #line 679 "libparse.l" { brace2--; /* printf("%s", yytext); */ if(brace2<0) { yylp_errno = YYLP_BODY_TMBR2; return(1); } } YY_BREAK case 59: YY_RULE_SETUP #line 686 "libparse.l" { brace3++; /* printf("%s", yytext); */ } YY_BREAK case 60: YY_RULE_SETUP #line 689 "libparse.l" { brace3--; /* printf("%s", yytext); */ if(brace3<0) { yylp_errno = YYLP_BODY_TMBR3; return(1); } } YY_BREAK case 61: YY_RULE_SETUP #line 696 "libparse.l" { yylplineno++; } YY_BREAK case 62: YY_RULE_SETUP #line 697 "libparse.l" { } YY_BREAK case 63: YY_RULE_SETUP #line 699 "libparse.l" { quote++; BEGIN(string); found_info++; string_start = current_pos(yyleng); *lib_style = NEW_LIBSTYLE; last_cmd = LP_INFO; } YY_BREAK case 64: YY_RULE_SETUP #line 706 "libparse.l" { yylplineno++; } YY_BREAK case 65: YY_RULE_SETUP #line 707 "libparse.l" { } YY_BREAK case 66: YY_RULE_SETUP #line 709 "libparse.l" { quote++; BEGIN(string); found_cat++; string_start = current_pos(yyleng); *lib_style = NEW_LIBSTYLE; last_cmd = LP_CATEGORY; } YY_BREAK case 67: YY_RULE_SETUP #line 716 "libparse.l" { yylplineno++; } YY_BREAK case 68: YY_RULE_SETUP #line 717 "libparse.l" { } YY_BREAK case 69: YY_RULE_SETUP #line 719 "libparse.l" { quote--; copy_string(mode); last_cmd = LP_NONE; if(old_state==phelp) { SET_HELP_END(mode, pi, current_pos(0)); } BEGIN(old_state); /* printf("%s", yytext); */ } YY_BREAK case 70: YY_RULE_SETUP #line 728 "libparse.l" { if (old_state == phelp) IncrCheckSum(*yytext);} YY_BREAK case 71: YY_RULE_SETUP #line 729 "libparse.l" { yylplineno++; if (old_state == phelp) IncrCheckSum('\n');} YY_BREAK case 72: YY_RULE_SETUP #line 730 "libparse.l" { if (old_state == phelp) IncrCheckSum(*yytext);} YY_BREAK case 73: YY_RULE_SETUP #line 732 "libparse.l" { } YY_BREAK case 74: YY_RULE_SETUP #line 733 "libparse.l" { quote++; old_state = YYSTATE; BEGIN(string); /* printf("%s", yytext); */ } YY_BREAK case 75: YY_RULE_SETUP #line 736 "libparse.l" { brace1++; /* printf("(%d)%s", brace1, yytext); */ } YY_BREAK case 76: YY_RULE_SETUP #line 739 "libparse.l" { brace1--; /* printf("(%d)%s", brace1, yytext); */ if(brace1<=0) { if(brace2>0) { yylp_errno=YYLP_EX_BR2; return(1); } if(brace3>0) { yylp_errno=YYLP_EX_BR3; return(1); } BEGIN(INITIAL); SET_PROC_END(mode, pi, current_pos(yyleng)); } } YY_BREAK case 77: YY_RULE_SETUP #line 748 "libparse.l" { brace2++; /* printf("%s", yytext); */ } YY_BREAK case 78: YY_RULE_SETUP #line 751 "libparse.l" { brace2--; /* printf("%s", yytext); */ } YY_BREAK case 79: YY_RULE_SETUP #line 754 "libparse.l" { brace3++; /* printf("%s", yytext); */ } YY_BREAK case 80: YY_RULE_SETUP #line 757 "libparse.l" { brace3--; /* printf("%s", yytext); */ } YY_BREAK case 81: YY_RULE_SETUP #line 760 "libparse.l" { yylplineno++; } YY_BREAK case 82: YY_RULE_SETUP #line 761 "libparse.l" { } YY_BREAK case 83: YY_RULE_SETUP #line 763 "libparse.l" { quote--; BEGIN(pexample); /* printf("%s", yytext); */ } YY_BREAK case 84: YY_RULE_SETUP #line 766 "libparse.l" { } YY_BREAK case 85: YY_RULE_SETUP #line 767 "libparse.l" { } YY_BREAK case 86: YY_RULE_SETUP #line 768 "libparse.l" { yylplineno++; } YY_BREAK case 87: YY_RULE_SETUP #line 769 "libparse.l" { } YY_BREAK case 88: YY_RULE_SETUP #line 771 "libparse.l" { BEGIN(old_state); } YY_BREAK case 89: YY_RULE_SETUP #line 772 "libparse.l" { yylplineno++; } YY_BREAK case 90: YY_RULE_SETUP #line 773 "libparse.l" { } YY_BREAK case 91: YY_RULE_SETUP #line 775 "libparse.l" { yylplineno++; } YY_BREAK case 92: YY_RULE_SETUP #line 776 "libparse.l" { } YY_BREAK case 93: YY_RULE_SETUP #line 777 "libparse.l" { p_static = FALSE; #if YYLPDEBUG > 1 printf("%s", yytext); #endif } YY_BREAK case 94: YY_RULE_SETUP #line 782 "libparse.l" { p_static = FALSE; yylp_errno = YYLP_BAD_CHAR; #ifdef STANDALONE_PARSER printf("[%d]", *yytext); #else if (text_buffer!=NULL) omFree((ADDRESS)text_buffer); text_buffer = omStrDup(yytext); omMarkAsStaticAddr(text_buffer); #endif #if YYLPDEBUG > 1 printf("[%s]", yytext); #endif return(1); } YY_BREAK case 95: YY_RULE_SETUP #line 797 "libparse.l" ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(header): case YY_STATE_EOF(help): case YY_STATE_EOF(libcmd): case YY_STATE_EOF(libcmd2): case YY_STATE_EOF(pdef): case YY_STATE_EOF(phead): case YY_STATE_EOF(poldhelp): case YY_STATE_EOF(phelp): case YY_STATE_EOF(pbody): case YY_STATE_EOF(pstr): case YY_STATE_EOF(pexample): case YY_STATE_EOF(pestr): case YY_STATE_EOF(string): case YY_STATE_EOF(comment): case YY_STATE_EOF(info): case YY_STATE_EOF(category): case YY_STATE_EOF(version): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_c_buf_p; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer() { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr; register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf, b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); yy_current_buffer->yy_n_chars = yy_n_chars; } if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state() { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; yy_current_state += YY_AT_BOL(); for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 457 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { register int yy_is_jam; register char *yy_cp = yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 457 ) 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 == 456); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; register char *yy_bp; #endif { register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_n_chars + 2; register char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); yy_current_buffer->yy_n_chars = yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; yytext_ptr = yy_bp; yy_hold_char = *yy_cp; yy_c_buf_p = yy_cp; } #endif /* ifndef YY_NO_UNPUT */ #ifdef __cplusplus static int yyinput() #else static int input() #endif { int c; *yy_c_buf_p = yy_hold_char; if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ *yy_c_buf_p = '\0'; else { /* need more input */ int offset = yy_c_buf_p - yytext_ptr; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( yywrap() ) return EOF; if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + offset; break; } } } c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ *yy_c_buf_p = '\0'; /* preserve yytext */ yy_hold_char = *++yy_c_buf_p; yy_current_buffer->yy_at_bol = (c == '\n'); return c; } #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) #else void yyrestart( input_file ) FILE *input_file; #endif { if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_init_buffer( yy_current_buffer, input_file ); yy_load_buffer_state(); } #ifdef YY_USE_PROTOS void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) #else void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { if ( yy_current_buffer == new_buffer ) return; if ( yy_current_buffer ) { /* Flush out information for old buffer. */ *yy_c_buf_p = yy_hold_char; yy_current_buffer->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = new_buffer; yy_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ yy_did_buffer_switch_on_eof = 1; } #ifdef YY_USE_PROTOS void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yyin = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) #else YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } #ifdef YY_USE_PROTOS void yy_delete_buffer( YY_BUFFER_STATE b ) #else void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yy_flex_free( (void *) b->yy_ch_buf ); yy_flex_free( (void *) b ); } #ifndef YY_ALWAYS_INTERACTIVE #ifndef YY_NEVER_INTERACTIVE extern int isatty YY_PROTO(( int )); #endif #endif #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif { yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; #if YY_ALWAYS_INTERACTIVE b->yy_is_interactive = 1; #else #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif } #ifdef YY_USE_PROTOS void yy_flush_buffer( YY_BUFFER_STATE b ) #else void yy_flush_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == yy_current_buffer ) yy_load_buffer_state(); } #ifndef YY_NO_SCAN_BUFFER #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) #else YY_BUFFER_STATE yy_scan_buffer( base, size ) char *base; yy_size_t size; #endif { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } #endif #ifndef YY_NO_SCAN_STRING #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) #else YY_BUFFER_STATE yy_scan_string( yy_str ) yyconst char *yy_str; #endif { int len; for ( len = 0; yy_str[len]; ++len ) ; return yy_scan_bytes( yy_str, len ); } #endif #ifndef YY_NO_SCAN_BYTES #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) #else YY_BUFFER_STATE yy_scan_bytes( bytes, len ) yyconst char *bytes; int len; #endif { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) yy_flex_alloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #endif #ifndef YY_NO_PUSH_STATE #ifdef YY_USE_PROTOS static void yy_push_state( int new_state ) #else static void yy_push_state( new_state ) int new_state; #endif { if ( yy_start_stack_ptr >= yy_start_stack_depth ) { yy_size_t new_size; yy_start_stack_depth += YY_START_STACK_INCR; new_size = yy_start_stack_depth * sizeof( int ); if ( ! yy_start_stack ) yy_start_stack = (int *) yy_flex_alloc( new_size ); else yy_start_stack = (int *) yy_flex_realloc( (void *) yy_start_stack, new_size ); if ( ! yy_start_stack ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } yy_start_stack[yy_start_stack_ptr++] = YY_START; BEGIN(new_state); } #endif #ifndef YY_NO_POP_STATE static void yy_pop_state() { if ( --yy_start_stack_ptr < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(yy_start_stack[yy_start_stack_ptr]); } #endif #ifndef YY_NO_TOP_STATE static int yy_top_state() { return yy_start_stack[yy_start_stack_ptr - 1]; } #endif #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif #ifdef YY_USE_PROTOS static void yy_fatal_error( yyconst char msg[] ) #else static void yy_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ yytext[yyleng] = yy_hold_char; \ yy_c_buf_p = yytext + n; \ yy_hold_char = *yy_c_buf_p; \ *yy_c_buf_p = '\0'; \ yyleng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef yytext_ptr #ifdef YY_USE_PROTOS static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) #else static void yy_flex_strncpy( s1, s2, n ) char *s1; yyconst char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN #ifdef YY_USE_PROTOS static int yy_flex_strlen( yyconst char *s ) #else static int yy_flex_strlen( s ) yyconst char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef YY_USE_PROTOS static void *yy_flex_alloc( yy_size_t size ) #else static void *yy_flex_alloc( size ) yy_size_t size; #endif { return (void *) malloc( size ); } #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, yy_size_t size ) #else static void *yy_flex_realloc( ptr, size ) void *ptr; yy_size_t size; #endif { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr ) #else static void yy_flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if YY_MAIN int main() { yylex(); return 0; } #endif #line 797 "libparse.l" int current_pos(int i) { return(i+offset+(int)(yytext-yylp_buffer_start)); } int libread(FILE* f, char* buf, int max_size) { int rc; offset = ftell(f); rc = myfread( buf, 1, max_size, f ); #if YYLPDEBUG >2 printf("fread: %d of %d\n", rc, max_size); #endif yylp_buffer_start = buf; return rc; } extern "C" { int yylpwrap() { //printf("======================= YYWRAP ====================\n"); if(brace1>0) { yylp_errno=YYLP_MISS_BR1; } if(brace2>0) { yylp_errno=YYLP_MISS_BR2; } if(brace3>0) { yylp_errno=YYLP_MISS_BR3; } if(quote>0) { yylp_errno=YYLP_MISSQUOT; } /* printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);/**/ if(feof(yyin)) return 1; else return 0; } } void reinit_yylp() { brace1 = 0; brace2 = 0; brace3 = 0; quote = 0; yy_init=1; yy_delete_buffer(yy_current_buffer); } void make_version(char *p,int what) { char ver[10]; char date[16]; ver[0]='?'; ver[1]='.'; ver[2]='?'; ver[3]='\0'; date[0]='?'; date[1]='\0'; if(what) sscanf(p,"%*[^=]= %*s %*s %10s %16s",ver,date); else sscanf(p,"// %*s %*s %10s %16s",ver,date); strcpy(libnamebuf,"("); strcat(libnamebuf,ver); strcat(libnamebuf,","); strcat(libnamebuf,date); strcat(libnamebuf,")"); if(what && strcmp(libnamebuf, "(?.?,?)")==0) { sscanf(p,"%*[^\"]\"%[^\"]\"",libnamebuf); } //printf("ID=(%d)%s; \n", what, p); } void copy_string(lp_modes mode) { #ifdef STANDALONE_PARSER if ((texinfo_out && (last_cmd == LP_INFO || last_cmd == LP_CATEGORY)) || (category_out && last_cmd == LP_CATEGORY)) { long current_location = ftell(yylpin), i = string_start, quote = 0; char c; if (texinfo_out) { if (last_cmd == LP_INFO) { printf("$info = <0) text_buffer[i-offset] = text_buffer[i]; } } #endif /* STANDALONE_PARSER */ } void print_init() { printf("Init=%d\n", yy_init); } void print_version(lp_modes mode, char *p) { #ifdef STANDALONE_PARSER //printf("loading %s%s", p, libnamebuf); #else if ( mode == LOAD_LIB ) { if (BVERBOSE(V_LOAD_LIB) && p!=NULL ) Print(" %s...", p); //Warn( "loading %s%s", p, libnamebuf); } #endif } #ifdef STANDALONE_PARSER main( int argc, char *argv[] ) { lib_style_types lib_style; main_init(argc, argv); if(yyin == NULL) { fprintf(stderr, "No library found to parse.\n"); exit(1); } if (! (texinfo_out || category_out)) { if(lpverbose)printf("Verbose level=%d\n", lpverbose); if(check)printf("Reporting most possible annomalies.\n"); if(lpverbose||check)printf("\n"); printf( " %-15s %20s %s,%s %s,%s %s,%s\n", "Library", "function", "line", "start-eod", "line", "body-eob", "line", "example-eoe"); } #ifdef HAVE_NS yylplex(argv[0], argv[0], &lib_style,NULL); #else yylplex(argv[0], argv[0], &lib_style); #endif if(yylp_errno) { printf("ERROR occured: [%d] ", yylp_errno); printf(yylp_errlist[yylp_errno], yylplineno); printf("\n"); } else if(pi!=NULL) printpi(pi); if (texinfo_out) printf("1;"); exit(0); } #endif /* STANDALONE_PARSER */ #endif /* HAVE_LIBPARSE */