#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.15 2009-07-28 15:22:17 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 96 #define YY_END_OF_BUFFER 97 static yyconst short int yy_accept[485] = { 0, 0, 0, 0, 0, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 95, 1, 92, 93, 2, 94, 95, 95, 95, 95, 95, 95, 95, 95, 95, 20, 19, 20, 20, 20, 20, 20, 20, 20, 20, 29, 28, 27, 29, 29, 29, 29, 29, 29, 29, 29, 96, 30, 96, 96, 96, 39, 32, 36, 33, 34, 38, 35, 43, 43, 96, 43, 43, 43, 43, 43, 43, 42, 47, 46, 47, 45, 49, 51, 48, 50, 63, 62, 53, 58, 59, 63, 60, 61, 63, 56, 57, 83, 82, 75, 78, 79, 83, 80, 81, 76, 77, 88, 87, 84, 88, 73, 72, 70, 73, 91, 90, 91, 66, 65, 64, 69, 68, 67, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 31, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 42, 42, 44, 49, 52, 0, 74, 86, 85, 71, 89, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 13, 0, 0, 0, 0, 0, 0, 28, 28, 28, 28, 22, 21, 0, 0, 0, 0, 0, 0, 37, 37, 0, 0, 0, 41, 0, 42, 0, 0, 0, 0, 0, 52, 0, 74, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 13, 13, 0, 0, 0, 0, 0, 0, 0, 28, 22, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 40, 0, 41, 0, 0, 0, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 16, 0, 17, 0, 15, 21, 0, 0, 0, 0, 23, 0, 25, 0, 24, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 7, 0, 0, 5, 0, 0, 0, 0, 12, 0, 0, 0, 18, 0, 0, 0, 26, 0, 0, 0, 0, 0, 55, 0, 0, 8, 8, 0, 9, 0, 0, 3, 0, 0, 8, 8, 8, 5, 5, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 8, 8, 8, 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, 6, 0, 0, 12, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 0, 0, 4, 0, 0, 6, 6, 12, 12, 12, 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, 47, 48, 22, 49, 50, 22, 51, 11, 52, 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[53] = { 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, 7, 4, 1 } ; static yyconst short int yy_base[533] = { 0, 0, 47, 6, 93, 140, 187, 235, 287, 339, 391, 5, 11, 443, 0, 9, 12, 63, 69, 493, 543, 0, 0, 593, 643, 72, 80, 81, 90, 26, 31, 24, 52, 54, 95, 0, 0, 0, 0, 1250, 2200, 1202, 2200, 2200, 1226, 2200, 1213, 1221, 1183, 1164, 1170, 1162, 1105, 1106, 1114, 2200, 2200, 1131, 61, 1115, 1105, 1100, 1108, 1117, 1096, 2200, 84, 2200, 1121, 95, 1105, 1095, 1091, 1098, 1100, 1073, 2200, 2200, 1109, 1099, 1101, 2200, 2200, 2200, 2200, 2200, 1083, 2200, 2200, 694, 0, 0, 125, 745, 144, 151, 157, 2200, 2200, 2200, 1048, 2200, 99, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 1080, 2200, 2200, 1052, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 1073, 2200, 2200, 2200, 2200, 2200, 2200, 2200, 4, 2200, 2200, 2200, 14, 2200, 2200, 1071, 2200, 2200, 2200, 2200, 2200, 2200, 1041, 1066, 1056, 1071, 1029, 1042, 1032, 1024, 1033, 1024, 1002, 163, 1039, 1027, 984, 992, 983, 976, 986, 966, 111, 796, 985, 972, 941, 945, 936, 874, 894, 874, 2200, 908, 2200, 900, 906, 895, 0, 0, 172, 0, 179, 191, 207, 2200, 904, 903, 219, 902, 74, 847, 198, 2200, 119, 0, 866, 0, 2200, 2200, 2200, 2200, 865, 0, 889, 213, 0, 869, 760, 757, 659, 645, 263, 645, 245, 82, 672, 0, 671, 651, 643, 274, 639, 132, 650, 665, 651, 649, 642, 0, 632, 612, 601, 278, 593, 133, 601, 0, 611, 318, 324, 330, 0, 375, 612, 0, 0, 381, 0, 609, 0, 578, 0, 576, 349, 594, 0, 562, 555, 368, 161, 559, 404, 509, 547, 548, 547, 0, 0, 560, 538, 500, 412, 522, 536, 422, 564, 0, 0, 0, 551, 530, 550, 530, 559, 527, 571, 553, 586, 610, 2200, 622, 628, 0, 307, 2200, 536, 226, 214, 2200, 2200, 507, 509, 600, 660, 577, 514, 898, 918, 495, 491, 500, 501, 475, 637, 969, 975, 2200, 473, 2200, 502, 2200, 491, 459, 650, 981, 990, 2200, 457, 2200, 491, 2200, 996, 1001, 0, 646, 1051, 1010, 1101, 1005, 453, 406, 1014, 1151, 121, 2200, 2200, 433, 432, 0, 431, 430, 390, 396, 1203, 384, 1022, 381, 2200, 369, 1055, 362, 2200, 1029, 227, 370, 270, 526, 2200, 269, 0, 287, 2200, 349, 2200, 380, 358, 0, 357, 350, 288, 318, 343, 2200, 348, 1046, 312, 0, 1255, 311, 274, 1068, 254, 1089, 1093, 1076, 345, 403, 405, 1223, 2200, 290, 1118, 1124, 241, 1231, 1216, 1244, 1237, 1275, 1287, 1110, 101, 1307, 1293, 1314, 1344, 1334, 1351, 1364, 1374, 1394, 254, 1445, 1449, 1455, 1469, 1475, 1481, 662, 1300, 238, 0, 239, 1313, 154, 1490, 1510, 245, 200, 0, 199, 192, 1562, 1590, 1596, 1591, 605, 214, 1035, 2200, 1610, 1332, 1607, 190, 184, 0, 143, 137, 2200, 126, 0, 1641, 103, 1622, 155, 1692, 1655, 1673, 1722, 1712, 2200, 104, 1618, 0, 91, 1685, 220, 1728, 656, 230, 1734, 2200, 1765, 1776, 1787, 1798, 1809, 1820, 1831, 1842, 1853, 1864, 1875, 1886, 1897, 1908, 1919, 1926, 1933, 1944, 1955, 1966, 1977, 1988, 1999, 2010, 2021, 2032, 2042, 2048, 2054, 2064, 2065, 2076, 92, 2081, 2092, 2102, 2112, 2118, 2124, 2129, 51, 2140, 2150, 2160, 2167, 2177, 2183, 2188 } ; static yyconst short int yy_def[533] = { 0, 485, 485, 486, 486, 487, 487, 488, 488, 489, 489, 490, 490, 484, 13, 491, 491, 492, 492, 493, 493, 492, 492, 494, 494, 495, 495, 496, 496, 497, 497, 498, 498, 499, 499, 492, 492, 492, 492, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 500, 484, 501, 484, 484, 484, 484, 484, 484, 484, 484, 484, 89, 89, 89, 484, 89, 89, 89, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 502, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 500, 484, 484, 501, 503, 89, 89, 89, 93, 89, 89, 89, 484, 93, 93, 93, 93, 93, 484, 89, 484, 484, 504, 484, 505, 484, 484, 484, 484, 484, 502, 502, 484, 506, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 507, 508, 484, 484, 484, 484, 484, 484, 165, 165, 165, 165, 509, 510, 484, 484, 484, 484, 484, 484, 503, 503, 89, 93, 93, 193, 93, 93, 193, 193, 484, 193, 193, 504, 484, 505, 484, 484, 484, 506, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 507, 508, 508, 484, 484, 484, 484, 484, 484, 484, 165, 509, 510, 510, 484, 484, 484, 484, 484, 484, 484, 89, 89, 484, 93, 93, 193, 484, 484, 193, 511, 484, 484, 484, 484, 484, 484, 484, 512, 484, 484, 484, 484, 484, 484, 508, 484, 484, 484, 484, 484, 484, 484, 484, 484, 510, 484, 484, 484, 484, 484, 484, 484, 484, 484, 193, 193, 193, 511, 513, 511, 513, 514, 484, 484, 484, 484, 515, 484, 484, 310, 310, 310, 310, 310, 484, 484, 516, 484, 484, 484, 484, 484, 484, 484, 484, 484, 340, 517, 340, 340, 484, 339, 340, 518, 484, 484, 484, 345, 345, 345, 345, 345, 515, 515, 515, 484, 310, 484, 484, 519, 516, 390, 484, 484, 484, 484, 520, 521, 518, 518, 518, 484, 484, 345, 484, 484, 484, 484, 484, 484, 484, 484, 484, 522, 484, 523, 520, 520, 523, 521, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 524, 484, 525, 418, 484, 417, 417, 484, 484, 423, 423, 423, 423, 423, 526, 484, 484, 524, 484, 484, 484, 484, 527, 528, 524, 439, 439, 439, 439, 439, 484, 423, 529, 526, 464, 530, 484, 531, 527, 527, 531, 528, 484, 439, 532, 471, 484, 470, 470, 532, 484, 484, 532, 0, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484 } ; static yyconst short int yy_nxt[2253] = { 0, 484, 41, 42, 43, 41, 484, 82, 83, 56, 82, 200, 99, 82, 83, 99, 82, 44, 84, 85, 45, 202, 86, 57, 84, 85, 46, 139, 86, 136, 47, 140, 201, 48, 136, 49, 58, 100, 50, 59, 100, 137, 202, 51, 60, 52, 137, 53, 54, 41, 42, 43, 41, 61, 62, 139, 87, 142, 453, 140, 101, 143, 87, 101, 44, 102, 103, 45, 102, 156, 104, 102, 103, 46, 102, 128, 104, 47, 157, 129, 48, 245, 49, 128, 132, 50, 164, 129, 133, 164, 51, 217, 52, 132, 53, 54, 56, 133, 142, 396, 130, 196, 143, 166, 196, 483, 267, 268, 130, 134, 57, 473, 167, 164, 105, 432, 164, 433, 134, 63, 105, 196, 465, 58, 196, 246, 59, 182, 185, 185, 182, 60, 185, 461, 277, 288, 64, 277, 288, 383, 61, 62, 66, 67, 474, 66, 182, 185, 185, 182, 473, 185, 384, 182, 185, 185, 182, 68, 185, 182, 185, 185, 182, 307, 185, 216, 307, 435, 216, 432, 69, 433, 217, 70, 182, 185, 185, 182, 71, 185, 218, 182, 185, 185, 182, 437, 185, 72, 73, 66, 67, 473, 66, 182, 185, 185, 182, 473, 185, 462, 182, 185, 185, 182, 68, 185, 461, 461, 194, 182, 185, 185, 182, 74, 185, 256, 341, 69, 256, 341, 70, 242, 243, 243, 242, 71, 257, 435, 337, 365, 75, 337, 365, 477, 72, 73, 76, 76, 76, 76, 76, 76, 77, 477, 76, 450, 76, 216, 76, 76, 216, 479, 461, 455, 217, 76, 76, 339, 194, 340, 366, 482, 76, 76, 76, 264, 264, 264, 264, 454, 244, 371, 365, 445, 371, 365, 274, 274, 274, 274, 285, 285, 285, 285, 265, 424, 76, 76, 76, 76, 76, 76, 76, 76, 77, 275, 76, 402, 76, 286, 76, 76, 214, 366, 410, 399, 383, 76, 76, 296, 296, 296, 296, 223, 76, 76, 76, 235, 400, 384, 290, 291, 291, 290, 407, 241, 242, 243, 243, 242, 391, 241, 242, 243, 243, 242, 383, 241, 76, 76, 76, 76, 76, 76, 76, 76, 79, 406, 76, 384, 76, 256, 76, 76, 256, 385, 301, 403, 297, 76, 76, 383, 257, 399, 402, 402, 76, 76, 76, 292, 305, 305, 305, 305, 384, 244, 400, 293, 294, 294, 293, 244, 241, 296, 296, 296, 296, 402, 249, 306, 76, 76, 76, 76, 76, 76, 76, 76, 79, 401, 76, 397, 76, 395, 76, 76, 264, 264, 264, 264, 261, 76, 76, 394, 274, 274, 274, 274, 76, 76, 76, 399, 393, 399, 277, 265, 295, 277, 392, 321, 388, 387, 297, 275, 400, 322, 400, 386, 385, 385, 385, 376, 76, 76, 88, 89, 90, 91, 89, 92, 93, 92, 94, 92, 92, 94, 92, 92, 92, 92, 92, 94, 92, 92, 92, 95, 95, 95, 95, 95, 92, 96, 92, 92, 92, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 97, 92, 107, 375, 364, 363, 108, 361, 316, 316, 316, 316, 109, 110, 282, 360, 111, 309, 309, 309, 309, 359, 310, 357, 271, 356, 112, 317, 113, 355, 318, 318, 318, 318, 365, 319, 265, 365, 285, 285, 285, 285, 114, 354, 334, 335, 335, 334, 273, 275, 115, 116, 107, 348, 343, 342, 108, 286, 326, 326, 326, 326, 109, 110, 333, 366, 111, 328, 328, 328, 328, 330, 329, 325, 324, 323, 112, 327, 113, 288, 320, 315, 288, 314, 331, 307, 286, 313, 307, 312, 332, 311, 114, 336, 290, 291, 291, 290, 284, 185, 115, 116, 118, 308, 304, 303, 119, 302, 305, 305, 305, 305, 120, 121, 347, 300, 122, 299, 290, 291, 291, 290, 298, 185, 435, 241, 123, 306, 124, 449, 293, 294, 294, 293, 240, 241, 293, 294, 294, 293, 289, 241, 450, 292, 287, 316, 316, 316, 316, 284, 125, 126, 118, 283, 337, 282, 119, 337, 326, 326, 326, 326, 120, 121, 317, 279, 122, 292, 344, 344, 344, 344, 227, 345, 227, 477, 123, 327, 124, 295, 481, 435, 432, 339, 433, 295, 449, 306, 227, 278, 276, 273, 272, 482, 271, 155, 266, 263, 262, 450, 125, 126, 180, 181, 181, 180, 182, 183, 182, 184, 182, 182, 184, 182, 182, 182, 182, 182, 184, 182, 182, 182, 185, 185, 185, 185, 185, 182, 186, 182, 182, 182, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, 187, 182, 188, 189, 189, 188, 188, 190, 188, 191, 188, 188, 191, 188, 188, 188, 188, 188, 191, 188, 188, 188, 189, 189, 189, 189, 189, 188, 192, 188, 188, 188, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 189, 193, 188, 227, 261, 260, 227, 227, 228, 227, 229, 227, 227, 229, 227, 227, 227, 227, 230, 229, 227, 227, 227, 228, 228, 228, 228, 228, 227, 227, 227, 227, 227, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 227, 227, 247, 248, 248, 247, 247, 249, 247, 250, 247, 247, 250, 247, 247, 247, 247, 247, 250, 247, 247, 247, 248, 248, 248, 248, 248, 247, 251, 247, 247, 247, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 248, 247, 247, 309, 309, 309, 309, 259, 310, 206, 255, 253, 241, 241, 241, 240, 177, 176, 174, 238, 237, 236, 265, 349, 350, 350, 349, 349, 351, 349, 352, 349, 349, 352, 349, 349, 349, 349, 349, 352, 349, 349, 349, 350, 350, 350, 350, 350, 349, 353, 349, 349, 349, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 349, 349, 358, 358, 358, 358, 235, 319, 318, 318, 318, 318, 234, 319, 362, 362, 362, 362, 233, 329, 232, 317, 231, 328, 328, 328, 328, 275, 329, 334, 335, 335, 334, 327, 334, 335, 335, 334, 341, 226, 225, 341, 286, 365, 365, 365, 365, 344, 344, 344, 344, 224, 345, 223, 367, 358, 358, 358, 358, 222, 319, 221, 365, 365, 365, 365, 306, 374, 451, 451, 451, 451, 339, 367, 317, 220, 219, 215, 336, 404, 404, 404, 404, 336, 365, 365, 365, 365, 362, 362, 362, 362, 370, 329, 214, 367, 213, 212, 405, 211, 368, 408, 408, 408, 408, 210, 209, 327, 208, 413, 207, 370, 413, 369, 206, 414, 204, 452, 387, 203, 409, 199, 411, 411, 411, 411, 413, 198, 197, 413, 195, 179, 414, 370, 371, 365, 365, 371, 419, 177, 393, 412, 416, 413, 176, 367, 413, 174, 173, 414, 368, 404, 404, 404, 404, 417, 172, 422, 422, 422, 422, 395, 423, 369, 171, 372, 170, 169, 168, 165, 405, 163, 414, 162, 161, 160, 405, 159, 158, 155, 154, 153, 152, 370, 377, 378, 378, 377, 377, 379, 377, 380, 377, 377, 380, 377, 377, 377, 377, 377, 380, 377, 377, 377, 378, 378, 378, 378, 378, 377, 381, 377, 377, 377, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, 377, 377, 389, 389, 151, 389, 389, 389, 389, 150, 389, 149, 389, 148, 389, 389, 408, 408, 408, 408, 391, 389, 389, 420, 420, 420, 420, 147, 389, 389, 389, 425, 425, 425, 425, 409, 146, 428, 428, 428, 428, 145, 421, 144, 427, 427, 427, 427, 484, 319, 426, 484, 389, 389, 389, 389, 429, 389, 389, 389, 389, 484, 389, 409, 389, 484, 389, 389, 484, 484, 484, 401, 484, 389, 389, 411, 411, 411, 411, 407, 389, 389, 389, 484, 484, 410, 484, 430, 430, 430, 430, 484, 329, 413, 412, 484, 413, 484, 484, 414, 451, 451, 451, 451, 389, 389, 412, 413, 484, 416, 413, 367, 484, 414, 413, 484, 484, 413, 435, 432, 414, 433, 417, 436, 435, 484, 432, 484, 433, 436, 416, 484, 466, 484, 413, 466, 437, 413, 467, 484, 414, 484, 437, 417, 413, 484, 432, 413, 433, 452, 414, 420, 420, 420, 420, 435, 432, 484, 433, 484, 436, 472, 484, 419, 438, 438, 438, 438, 484, 439, 421, 484, 484, 437, 422, 422, 422, 422, 484, 423, 484, 484, 484, 421, 484, 484, 484, 484, 484, 484, 484, 484, 484, 405, 440, 441, 441, 440, 440, 442, 440, 443, 440, 440, 443, 440, 440, 440, 440, 440, 443, 440, 440, 440, 441, 441, 441, 441, 441, 440, 444, 440, 440, 440, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 440, 440, 425, 425, 425, 425, 446, 446, 446, 446, 484, 319, 427, 427, 427, 427, 484, 319, 484, 484, 484, 426, 484, 484, 484, 426, 428, 428, 428, 428, 484, 409, 447, 447, 447, 447, 484, 329, 430, 430, 430, 430, 484, 329, 484, 429, 484, 438, 438, 438, 438, 429, 439, 484, 484, 484, 484, 412, 484, 484, 484, 484, 484, 484, 484, 484, 421, 456, 457, 457, 456, 456, 458, 456, 459, 456, 456, 459, 456, 456, 456, 456, 456, 459, 456, 456, 456, 457, 457, 457, 457, 457, 456, 460, 456, 456, 456, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 456, 456, 463, 463, 484, 463, 463, 463, 463, 484, 463, 484, 463, 484, 463, 463, 484, 484, 484, 484, 465, 463, 463, 484, 484, 484, 484, 484, 463, 463, 463, 446, 446, 446, 446, 484, 319, 447, 447, 447, 447, 484, 329, 435, 484, 484, 484, 484, 449, 484, 426, 466, 463, 463, 466, 484, 429, 467, 484, 435, 432, 450, 433, 466, 449, 484, 466, 469, 484, 467, 477, 432, 484, 433, 484, 481, 484, 450, 484, 484, 470, 463, 463, 484, 463, 463, 463, 463, 482, 463, 484, 463, 467, 463, 463, 484, 466, 484, 484, 466, 463, 463, 467, 484, 484, 484, 484, 463, 463, 463, 484, 484, 469, 484, 466, 484, 484, 466, 484, 484, 467, 484, 484, 484, 484, 470, 432, 484, 433, 484, 469, 463, 463, 466, 484, 484, 466, 477, 484, 467, 484, 484, 478, 470, 477, 432, 484, 433, 484, 478, 484, 484, 484, 466, 484, 479, 466, 484, 484, 467, 484, 484, 479, 466, 484, 432, 466, 433, 484, 467, 484, 484, 484, 484, 477, 432, 484, 433, 484, 478, 477, 484, 472, 484, 484, 481, 477, 432, 484, 433, 484, 481, 479, 484, 484, 484, 484, 484, 482, 484, 484, 484, 484, 484, 482, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 175, 175, 175, 484, 484, 175, 175, 178, 178, 178, 484, 484, 178, 178, 205, 205, 484, 205, 205, 205, 205, 205, 205, 205, 205, 239, 239, 484, 239, 239, 239, 239, 239, 239, 239, 239, 252, 252, 484, 252, 252, 252, 252, 252, 252, 252, 252, 254, 254, 484, 254, 254, 254, 254, 254, 254, 254, 254, 258, 258, 484, 258, 258, 258, 258, 258, 258, 258, 258, 269, 269, 484, 269, 269, 269, 269, 269, 269, 269, 269, 270, 270, 484, 270, 270, 270, 270, 270, 270, 270, 270, 280, 280, 484, 280, 280, 280, 280, 280, 280, 280, 280, 281, 281, 484, 281, 281, 281, 281, 281, 281, 281, 281, 338, 484, 484, 484, 484, 338, 346, 484, 484, 484, 484, 346, 366, 366, 366, 484, 484, 366, 366, 484, 484, 366, 373, 484, 484, 484, 484, 373, 382, 484, 484, 484, 382, 390, 390, 484, 390, 390, 390, 390, 390, 390, 390, 390, 398, 484, 484, 484, 398, 389, 389, 484, 389, 389, 389, 389, 389, 389, 389, 389, 415, 484, 484, 484, 415, 415, 484, 484, 484, 415, 418, 484, 484, 484, 418, 418, 431, 484, 484, 484, 431, 431, 434, 484, 484, 484, 434, 434, 434, 434, 434, 434, 448, 448, 448, 448, 448, 464, 464, 484, 464, 464, 464, 464, 464, 464, 464, 464, 468, 484, 484, 484, 468, 468, 484, 484, 484, 468, 471, 484, 484, 484, 471, 471, 463, 463, 484, 463, 463, 463, 463, 463, 463, 463, 463, 475, 484, 484, 484, 475, 475, 476, 484, 484, 484, 476, 476, 476, 476, 476, 476, 480, 480, 480, 480, 480, 39, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484 } ; static yyconst short int yy_chk[2253] = { 0, 0, 1, 1, 1, 1, 0, 11, 11, 3, 11, 130, 15, 12, 12, 16, 12, 1, 11, 11, 1, 134, 11, 3, 12, 12, 1, 31, 12, 29, 1, 31, 130, 1, 30, 1, 3, 15, 1, 3, 16, 29, 134, 1, 3, 1, 30, 1, 1, 2, 2, 2, 2, 3, 3, 32, 11, 33, 525, 32, 15, 33, 12, 16, 2, 17, 17, 2, 17, 58, 17, 18, 18, 2, 18, 25, 18, 2, 58, 25, 2, 192, 2, 26, 27, 2, 66, 26, 27, 66, 2, 217, 2, 28, 2, 2, 4, 28, 34, 517, 25, 102, 34, 69, 102, 477, 217, 217, 26, 27, 4, 474, 69, 164, 17, 414, 164, 414, 28, 4, 18, 196, 465, 4, 196, 192, 4, 92, 92, 92, 92, 4, 92, 462, 225, 237, 4, 225, 237, 346, 4, 4, 5, 5, 460, 5, 94, 94, 94, 94, 459, 94, 346, 95, 95, 95, 95, 5, 95, 96, 96, 96, 96, 262, 96, 155, 262, 437, 155, 467, 5, 467, 155, 5, 182, 182, 182, 182, 5, 182, 155, 184, 184, 184, 184, 437, 184, 5, 5, 6, 6, 457, 6, 185, 185, 185, 185, 456, 185, 444, 194, 194, 194, 194, 6, 194, 443, 441, 96, 186, 186, 186, 186, 6, 186, 207, 300, 6, 207, 300, 6, 190, 190, 190, 190, 6, 207, 450, 299, 366, 6, 299, 366, 479, 6, 6, 7, 7, 7, 7, 7, 7, 7, 482, 7, 450, 7, 216, 7, 7, 216, 479, 440, 435, 216, 7, 7, 299, 186, 299, 366, 482, 7, 7, 7, 214, 214, 214, 214, 433, 190, 371, 368, 424, 371, 368, 223, 223, 223, 223, 235, 235, 235, 235, 214, 406, 7, 7, 8, 8, 8, 8, 8, 8, 8, 223, 8, 403, 8, 235, 8, 8, 214, 368, 394, 373, 382, 8, 8, 296, 296, 296, 296, 223, 8, 8, 8, 235, 373, 382, 241, 241, 241, 241, 392, 241, 242, 242, 242, 242, 391, 242, 243, 243, 243, 243, 383, 243, 8, 8, 9, 9, 9, 9, 9, 9, 9, 388, 9, 383, 9, 256, 9, 9, 256, 386, 256, 381, 296, 9, 9, 384, 256, 398, 380, 378, 9, 9, 9, 241, 261, 261, 261, 261, 384, 242, 398, 245, 245, 245, 245, 243, 245, 249, 249, 249, 249, 377, 249, 261, 9, 9, 10, 10, 10, 10, 10, 10, 10, 375, 10, 367, 10, 363, 10, 10, 264, 264, 264, 264, 261, 10, 10, 361, 274, 274, 274, 274, 10, 10, 10, 399, 359, 400, 277, 264, 245, 277, 357, 277, 355, 354, 249, 274, 399, 277, 400, 353, 352, 350, 349, 343, 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, 13, 19, 342, 332, 330, 19, 325, 273, 273, 273, 273, 19, 19, 324, 322, 19, 265, 265, 265, 265, 320, 265, 315, 314, 313, 19, 273, 19, 312, 275, 275, 275, 275, 369, 275, 265, 369, 285, 285, 285, 285, 19, 311, 298, 298, 298, 298, 273, 275, 19, 19, 20, 308, 304, 303, 20, 285, 284, 284, 284, 284, 20, 20, 289, 369, 20, 286, 286, 286, 286, 287, 286, 283, 282, 278, 20, 284, 20, 288, 276, 272, 288, 271, 288, 307, 286, 268, 307, 267, 288, 266, 20, 298, 290, 290, 290, 290, 284, 290, 20, 20, 23, 263, 260, 259, 23, 257, 305, 305, 305, 305, 23, 23, 307, 255, 23, 253, 291, 291, 291, 291, 251, 291, 449, 246, 23, 305, 23, 449, 293, 293, 293, 293, 240, 293, 294, 294, 294, 294, 238, 294, 449, 290, 236, 316, 316, 316, 316, 234, 23, 23, 24, 233, 337, 232, 24, 337, 326, 326, 326, 326, 24, 24, 316, 230, 24, 291, 306, 306, 306, 306, 229, 306, 228, 481, 24, 326, 24, 293, 481, 431, 431, 337, 431, 294, 431, 306, 227, 226, 224, 222, 221, 481, 220, 218, 215, 213, 212, 431, 24, 24, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 165, 211, 210, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 165, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 193, 309, 309, 309, 309, 209, 309, 206, 204, 198, 191, 189, 188, 179, 178, 177, 175, 173, 172, 171, 309, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 310, 317, 317, 317, 317, 170, 317, 318, 318, 318, 318, 169, 318, 327, 327, 327, 327, 168, 327, 167, 317, 166, 328, 328, 328, 328, 318, 328, 334, 334, 334, 334, 327, 335, 335, 335, 335, 341, 163, 162, 341, 328, 339, 339, 339, 339, 344, 344, 344, 344, 161, 344, 160, 339, 358, 358, 358, 358, 159, 358, 158, 365, 365, 365, 365, 344, 341, 451, 451, 451, 451, 339, 365, 358, 157, 156, 154, 334, 387, 387, 387, 387, 335, 338, 338, 338, 338, 362, 362, 362, 362, 339, 362, 153, 338, 152, 151, 387, 150, 338, 393, 393, 393, 393, 149, 148, 362, 147, 397, 146, 365, 397, 338, 145, 397, 144, 451, 387, 137, 393, 122, 395, 395, 395, 395, 396, 114, 111, 396, 100, 86, 396, 338, 340, 340, 340, 340, 397, 80, 393, 395, 396, 413, 79, 340, 413, 78, 75, 413, 340, 404, 404, 404, 404, 396, 74, 405, 405, 405, 405, 395, 405, 340, 73, 340, 72, 71, 70, 68, 404, 64, 413, 63, 62, 61, 405, 60, 59, 57, 54, 53, 52, 340, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 356, 356, 51, 356, 356, 356, 356, 50, 356, 49, 356, 48, 356, 356, 408, 408, 408, 408, 356, 356, 356, 401, 401, 401, 401, 47, 356, 356, 356, 407, 407, 407, 407, 408, 46, 410, 410, 410, 410, 44, 401, 41, 409, 409, 409, 409, 39, 409, 407, 0, 356, 356, 390, 390, 410, 390, 390, 390, 390, 0, 390, 409, 390, 0, 390, 390, 0, 0, 0, 401, 0, 390, 390, 411, 411, 411, 411, 407, 390, 390, 390, 0, 0, 410, 0, 412, 412, 412, 412, 0, 412, 416, 411, 0, 416, 0, 0, 416, 432, 432, 432, 432, 390, 390, 412, 415, 0, 416, 415, 432, 0, 415, 417, 0, 0, 417, 415, 415, 417, 415, 416, 415, 436, 436, 417, 436, 417, 436, 417, 0, 454, 0, 419, 454, 415, 419, 454, 0, 419, 0, 436, 417, 418, 0, 419, 418, 419, 432, 418, 420, 420, 420, 420, 418, 418, 0, 418, 0, 418, 454, 0, 419, 421, 421, 421, 421, 0, 421, 420, 0, 0, 418, 422, 422, 422, 422, 0, 422, 0, 0, 0, 421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 422, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 425, 425, 425, 425, 426, 426, 426, 426, 0, 426, 427, 427, 427, 427, 0, 427, 0, 0, 0, 425, 0, 0, 0, 426, 428, 428, 428, 428, 0, 427, 429, 429, 429, 429, 0, 429, 430, 430, 430, 430, 0, 430, 0, 428, 0, 438, 438, 438, 438, 429, 438, 0, 0, 0, 0, 430, 0, 0, 0, 0, 0, 0, 0, 0, 438, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 445, 445, 0, 445, 445, 445, 445, 0, 445, 0, 445, 0, 445, 445, 0, 0, 0, 0, 445, 445, 445, 0, 0, 0, 0, 0, 445, 445, 445, 446, 446, 446, 446, 0, 446, 447, 447, 447, 447, 0, 447, 448, 448, 0, 448, 0, 448, 0, 446, 453, 445, 445, 453, 0, 447, 453, 0, 455, 455, 448, 455, 466, 455, 0, 466, 453, 0, 466, 475, 475, 0, 475, 0, 475, 0, 455, 0, 0, 453, 464, 464, 0, 464, 464, 464, 464, 475, 464, 0, 464, 466, 464, 464, 0, 469, 0, 0, 469, 464, 464, 469, 0, 0, 0, 0, 464, 464, 464, 0, 0, 469, 0, 470, 0, 0, 470, 0, 0, 470, 0, 0, 0, 0, 469, 470, 0, 470, 0, 470, 464, 464, 468, 0, 0, 468, 478, 478, 468, 478, 0, 478, 470, 468, 468, 0, 468, 0, 468, 0, 0, 0, 472, 0, 478, 472, 0, 0, 472, 0, 0, 468, 471, 0, 472, 471, 472, 0, 471, 0, 0, 0, 0, 471, 471, 0, 471, 0, 471, 480, 480, 472, 480, 0, 480, 483, 483, 0, 483, 0, 483, 471, 0, 0, 0, 0, 0, 480, 0, 0, 0, 0, 0, 483, 485, 485, 485, 485, 485, 485, 485, 485, 485, 485, 485, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 487, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 500, 500, 500, 0, 0, 500, 500, 501, 501, 501, 0, 0, 501, 501, 502, 502, 0, 502, 502, 502, 502, 502, 502, 502, 502, 503, 503, 0, 503, 503, 503, 503, 503, 503, 503, 503, 504, 504, 0, 504, 504, 504, 504, 504, 504, 504, 504, 505, 505, 0, 505, 505, 505, 505, 505, 505, 505, 505, 506, 506, 0, 506, 506, 506, 506, 506, 506, 506, 506, 507, 507, 0, 507, 507, 507, 507, 507, 507, 507, 507, 508, 508, 0, 508, 508, 508, 508, 508, 508, 508, 508, 509, 509, 0, 509, 509, 509, 509, 509, 509, 509, 509, 510, 510, 0, 510, 510, 510, 510, 510, 510, 510, 510, 511, 0, 0, 0, 0, 511, 512, 0, 0, 0, 0, 512, 513, 513, 513, 0, 0, 513, 513, 0, 0, 513, 514, 0, 0, 0, 0, 514, 515, 0, 0, 0, 515, 516, 516, 0, 516, 516, 516, 516, 516, 516, 516, 516, 518, 0, 0, 0, 518, 519, 519, 0, 519, 519, 519, 519, 519, 519, 519, 519, 520, 0, 0, 0, 520, 520, 0, 0, 0, 520, 521, 0, 0, 0, 521, 521, 522, 0, 0, 0, 522, 522, 523, 0, 0, 0, 523, 523, 523, 523, 523, 523, 524, 524, 524, 524, 524, 526, 526, 0, 526, 526, 526, 526, 526, 526, 526, 526, 527, 0, 0, 0, 527, 527, 0, 0, 0, 527, 528, 0, 0, 0, 528, 528, 529, 529, 0, 529, 529, 529, 529, 529, 529, 529, 529, 530, 0, 0, 0, 530, 530, 531, 0, 0, 0, 531, 531, 531, 531, 531, 531, 532, 532, 532, 532, 532, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484 } ; 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 * ****************************************/ #include #include #include #include #include "config.h" #include #ifdef STANDALONE_PARSER #include # ifdef HAVE_FACTORY int initializeGMP(){ return 1; } // NEEDED FOR MAIN APP. LINKING!!! int mmInit(void) {return 1; } // ? due to SINGULAR!!!...??? # endif #define HAVE_LIBPARSER #define YYLPDEBUG 1 #define myfread fread #else #include #include #include #include #include #include #include #include #endif #include #ifdef HAVE_LIBPARSER #define YY_SKIP_YYWRAP typedef enum { LP_NONE, LP_INFO, LP_CATEGORY, LP_URL, 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; const 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; idhdl h_top; #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 #define YY_DECL int yylex(char *newlib, char *libfile, \ lib_style_types *lib_style, \ idhdl pl, BOOLEAN autoexport, lp_modes mode) #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 url 17 #define version 18 /* 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 228 "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 >= 485 ) 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] != 2200 ); 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 229 "libparse.l" { } YY_BREAK case 2: YY_RULE_SETUP #line 230 "libparse.l" { old_state = YYSTATE; BEGIN(comment); } YY_BREAK case 3: YY_RULE_SETUP #line 232 "libparse.l" { yyless(4); old_state = YYSTATE; BEGIN(info); } YY_BREAK case 4: YY_RULE_SETUP #line 235 "libparse.l" { yyless(8); old_state = YYSTATE; BEGIN(category); } YY_BREAK case 5: YY_RULE_SETUP #line 238 "libparse.l" { if ( mode != GET_INFO ) { #ifdef STANDALONE_PARSER if (texinfo_out) { char *c = yytext; printf("$url = \""); while ((*c != '\0') && (*c != '"')) c++; c++; while ((*c != '\0') && (*c != '"')) { if (*c != '\r') putchar(*c); c++; } printf("\";\n"); } #endif } } YY_BREAK case 6: YY_RULE_SETUP #line 259 "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 7: YY_RULE_SETUP #line 293 "libparse.l" { p_static=TRUE; } YY_BREAK case 8: YY_RULE_SETUP #line 295 "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) { h0 = enterid( proc, 0 /*myynest*/, PROC_CMD, &(IDPACKAGE(pl)->idroot), TRUE, !p_static); if (h0==NULL) return(1); if((!p_static) && autoexport) { package save=currPack; currPack=basePack; h_top = enterid( proc, 0 /*myynest*/, PROC_CMD, &(basePack->idroot), FALSE ); currPack=save; if (h_top==NULL) return(1); } /* omCheckAddr(IDID(h0)); */ if (h0!=NULL) { iiInitSingularProcinfo(IDPROC(h0), newlib, proc, yylplineno, current_pos(0),p_static); 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); 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 9: YY_RULE_SETUP #line 364 "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 10: YY_RULE_SETUP #line 376 "libparse.l" { quote++; BEGIN(libcmd); } YY_BREAK case 11: YY_RULE_SETUP #line 380 "libparse.l" { quote++; brace2++; BEGIN(libcmd2); } YY_BREAK case 12: YY_RULE_SETUP #line 384 "libparse.l" { make_version(yytext, 0); #if YYLPDEBUG > 1 printf("+(id)HEAD:%s\n", yytext); #endif } YY_BREAK case 13: YY_RULE_SETUP #line 390 "libparse.l" { #if YYLPDEBUG printf("+(cmt)HEAD:%s\n", yytext); #endif } YY_BREAK case 14: YY_RULE_SETUP #line 395 "libparse.l" { #if YYLPDEBUG > 1 printf("-HEAD:%s\n", yytext); #endif } YY_BREAK case 15: YY_RULE_SETUP #line 400 "libparse.l" { yyless(0); BEGIN(INITIAL); yymore(); } YY_BREAK case 16: YY_RULE_SETUP #line 404 "libparse.l" { yyless(0); *lib_style = NEW_LIBSTYLE; BEGIN(INITIAL); yymore(); } YY_BREAK case 17: YY_RULE_SETUP #line 411 "libparse.l" { quote++; BEGIN(libcmd); } YY_BREAK case 18: YY_RULE_SETUP #line 414 "libparse.l" { quote++; brace2++; BEGIN(libcmd2); } YY_BREAK case 19: YY_RULE_SETUP #line 417 "libparse.l" { yylplineno++; } YY_BREAK case 20: YY_RULE_SETUP #line 418 "libparse.l" { #if YYLPDEBUG > 1 printf(" HEAD:%s\n", yytext); #endif yyless(0); BEGIN(help); } YY_BREAK case 21: YY_RULE_SETUP #line 425 "libparse.l" { #if YYLPDEBUG > 1 printf(" HELP:%s\n", yytext); #endif BEGIN(INITIAL); } YY_BREAK case 22: YY_RULE_SETUP #line 430 "libparse.l" { #if YYLPDEBUG > 1 printf(" HELP:%s\n", yytext); #endif BEGIN(INITIAL); } YY_BREAK case 23: YY_RULE_SETUP #line 436 "libparse.l" { yyless(0); *lib_style = NEW_LIBSTYLE; BEGIN(INITIAL); yymore(); } YY_BREAK case 24: YY_RULE_SETUP #line 442 "libparse.l" { yyless(0); //printf("2) proc found.\n"); BEGIN(INITIAL); yymore(); } YY_BREAK case 25: YY_RULE_SETUP #line 448 "libparse.l" { quote++; BEGIN(libcmd); } YY_BREAK case 26: YY_RULE_SETUP #line 451 "libparse.l" { quote++; brace2++; BEGIN(libcmd2); } YY_BREAK case 27: YY_RULE_SETUP #line 455 "libparse.l" { yylplineno++; } YY_BREAK case 28: YY_RULE_SETUP #line 456 "libparse.l" { #if YYLPDEBUG if(lpverbose>2) printf("--->%s<---\n", yytext); #endif } YY_BREAK case 29: YY_RULE_SETUP #line 461 "libparse.l" { found_oldhelp=1; #if YYLPDEBUG > 1 printf("-HELP:%s\n", yytext); #endif } YY_BREAK case 30: YY_RULE_SETUP #line 469 "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 31: YY_RULE_SETUP #line 482 "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 32: YY_RULE_SETUP #line 496 "libparse.l" { } YY_BREAK case 33: YY_RULE_SETUP #line 497 "libparse.l" { brace2++; #if YYLPDEBUG > 1 printf("%s", yytext); #endif } YY_BREAK case 34: YY_RULE_SETUP #line 503 "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 35: YY_RULE_SETUP #line 518 "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 36: YY_RULE_SETUP #line 536 "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 37: YY_RULE_SETUP #line 545 "libparse.l" { } YY_BREAK case 38: YY_RULE_SETUP #line 546 "libparse.l" { old_state = YYSTATE; BEGIN(comment); } YY_BREAK case 39: YY_RULE_SETUP #line 547 "libparse.l" { if(brace2<=0) { BEGIN(phead); yyless(0); } } YY_BREAK case 40: YY_RULE_SETUP #line 555 "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 41: YY_RULE_SETUP #line 568 "libparse.l" { #if YYLPDEBUG if(lpverbose>2)printf("1-Len=%d;\n", yyleng); #endif BEGIN(phelp); yyless(0); } YY_BREAK case 42: YY_RULE_SETUP #line 575 "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 43: YY_RULE_SETUP #line 589 "libparse.l" { printf("[%s]", yytext); } YY_BREAK case 44: YY_RULE_SETUP #line 591 "libparse.l" { } YY_BREAK case 45: YY_RULE_SETUP #line 592 "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 46: YY_RULE_SETUP #line 610 "libparse.l" { yylplineno++; } YY_BREAK case 47: YY_RULE_SETUP #line 611 "libparse.l" { } YY_BREAK case 48: YY_RULE_SETUP #line 613 "libparse.l" { old_state = YYSTATE; BEGIN(string); SET_HELP_START(mode, pi, current_pos(1)); } YY_BREAK case 49: YY_RULE_SETUP #line 618 "libparse.l" {} YY_BREAK case 50: YY_RULE_SETUP #line 619 "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 51: YY_RULE_SETUP #line 636 "libparse.l" { yylplineno++;} YY_BREAK case 52: YY_RULE_SETUP #line 638 "libparse.l" { } YY_BREAK case 53: YY_RULE_SETUP #line 639 "libparse.l" { quote++; old_state = YYSTATE; BEGIN(string); /* printf("%s", yytext); */ } YY_BREAK case 54: YY_RULE_SETUP #line 643 "libparse.l" { if(check) printf("*** found 2 proc whithin procedure '%s'.\n", pi->procname); yyless(yyleng-1); } YY_BREAK case 55: YY_RULE_SETUP #line 648 "libparse.l" { if(check) printf("*** found 1 proc whithin procedure '%s'.\n", pi->procname); yyless(yyleng-1); } YY_BREAK case 56: YY_RULE_SETUP #line 653 "libparse.l" { brace1++; #if YYLPDEBUG > 1 printf("line: %d, (%d)%s\n", yylplineno, brace1, yytext); #endif } YY_BREAK case 57: YY_RULE_SETUP #line 659 "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 58: YY_RULE_SETUP #line 685 "libparse.l" { brace2++; /* printf("%s", yytext); */ } YY_BREAK case 59: YY_RULE_SETUP #line 688 "libparse.l" { brace2--; /* printf("%s", yytext); */ if(brace2<0) { yylp_errno = YYLP_BODY_TMBR2; return(1); } } YY_BREAK case 60: YY_RULE_SETUP #line 695 "libparse.l" { brace3++; /* printf("%s", yytext); */ } YY_BREAK case 61: YY_RULE_SETUP #line 698 "libparse.l" { brace3--; /* printf("%s", yytext); */ if(brace3<0) { yylp_errno = YYLP_BODY_TMBR3; return(1); } } YY_BREAK case 62: YY_RULE_SETUP #line 705 "libparse.l" { yylplineno++; } YY_BREAK case 63: YY_RULE_SETUP #line 706 "libparse.l" { } YY_BREAK case 64: YY_RULE_SETUP #line 708 "libparse.l" { quote++; BEGIN(string); found_info++; string_start = current_pos(yyleng); *lib_style = NEW_LIBSTYLE; last_cmd = LP_INFO; } YY_BREAK case 65: YY_RULE_SETUP #line 715 "libparse.l" { yylplineno++; } YY_BREAK case 66: YY_RULE_SETUP #line 716 "libparse.l" { } YY_BREAK case 67: YY_RULE_SETUP #line 718 "libparse.l" { quote++; BEGIN(string); found_cat++; string_start = current_pos(yyleng); *lib_style = NEW_LIBSTYLE; last_cmd = LP_CATEGORY; } YY_BREAK case 68: YY_RULE_SETUP #line 725 "libparse.l" { yylplineno++; } YY_BREAK case 69: YY_RULE_SETUP #line 726 "libparse.l" { } YY_BREAK case 70: YY_RULE_SETUP #line 729 "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 71: YY_RULE_SETUP #line 738 "libparse.l" { if (old_state == phelp) IncrCheckSum(*yytext);} YY_BREAK case 72: YY_RULE_SETUP #line 739 "libparse.l" { yylplineno++; if (old_state == phelp) IncrCheckSum('\n');} YY_BREAK case 73: YY_RULE_SETUP #line 740 "libparse.l" { if (old_state == phelp) IncrCheckSum(*yytext);} YY_BREAK case 74: YY_RULE_SETUP #line 742 "libparse.l" { } YY_BREAK case 75: YY_RULE_SETUP #line 743 "libparse.l" { quote++; old_state = YYSTATE; BEGIN(string); /* printf("%s", yytext); */ } YY_BREAK case 76: YY_RULE_SETUP #line 746 "libparse.l" { brace1++; /* printf("(%d)%s", brace1, yytext); */ } YY_BREAK case 77: YY_RULE_SETUP #line 749 "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 78: YY_RULE_SETUP #line 758 "libparse.l" { brace2++; /* printf("%s", yytext); */ } YY_BREAK case 79: YY_RULE_SETUP #line 761 "libparse.l" { brace2--; /* printf("%s", yytext); */ } YY_BREAK case 80: YY_RULE_SETUP #line 764 "libparse.l" { brace3++; /* printf("%s", yytext); */ } YY_BREAK case 81: YY_RULE_SETUP #line 767 "libparse.l" { brace3--; /* printf("%s", yytext); */ } YY_BREAK case 82: YY_RULE_SETUP #line 770 "libparse.l" { yylplineno++; } YY_BREAK case 83: YY_RULE_SETUP #line 771 "libparse.l" { } YY_BREAK case 84: YY_RULE_SETUP #line 773 "libparse.l" { quote--; BEGIN(pexample); /* printf("%s", yytext); */ } YY_BREAK case 85: YY_RULE_SETUP #line 776 "libparse.l" { } YY_BREAK case 86: YY_RULE_SETUP #line 777 "libparse.l" { } YY_BREAK case 87: YY_RULE_SETUP #line 778 "libparse.l" { yylplineno++; } YY_BREAK case 88: YY_RULE_SETUP #line 779 "libparse.l" { } YY_BREAK case 89: YY_RULE_SETUP #line 781 "libparse.l" { BEGIN(old_state); } YY_BREAK case 90: YY_RULE_SETUP #line 782 "libparse.l" { yylplineno++; } YY_BREAK case 91: YY_RULE_SETUP #line 783 "libparse.l" { } YY_BREAK case 92: YY_RULE_SETUP #line 785 "libparse.l" { yylplineno++; } YY_BREAK case 93: YY_RULE_SETUP #line 786 "libparse.l" { } YY_BREAK case 94: YY_RULE_SETUP #line 787 "libparse.l" { p_static = FALSE; #if YYLPDEBUG > 1 printf("%s", yytext); #endif } YY_BREAK case 95: YY_RULE_SETUP #line 792 "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 96: YY_RULE_SETUP #line 807 "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(url): 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 >= 485 ) 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 >= 485 ) 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 == 484); 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 807 "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 || last_cmd == LP_URL)) || (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"); } yylplex(argv[0], argv[0], &lib_style,NULL); 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 */