#define yy_create_buffer pyscanYY_create_buffer #define yy_delete_buffer pyscanYY_delete_buffer #define yy_scan_buffer pyscanYY_scan_buffer #define yy_scan_string pyscanYY_scan_string #define yy_scan_bytes pyscanYY_scan_bytes #define yy_flex_debug pyscanYY_flex_debug #define yy_init_buffer pyscanYY_init_buffer #define yy_flush_buffer pyscanYY_flush_buffer #define yy_load_buffer_state pyscanYY_load_buffer_state #define yy_switch_to_buffer pyscanYY_switch_to_buffer #define yyin pyscanYYin #define yyleng pyscanYYleng #define yylex pyscanYYlex #define yyout pyscanYYout #define yyrestart pyscanYYrestart #define yytext pyscanYYtext /* A lexical scanner generated by flex */ /* Scanner skeleton version: * $Header: /cvs/root/flex/flex/skel.c,v 1.2 2004/05/07 00:28:17 jkh 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 262144 typedef struct yy_buffer_state *YY_BUFFER_STATE; extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yyless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int yy_size_t; struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define YY_CURRENT_BUFFER yy_current_buffer /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) #define YY_USES_REJECT #define yywrap() 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yytext_ptr = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_NUM_RULES 145 #define YY_END_OF_BUFFER 146 static yyconst short int yy_acclist[696] = { 0, 16475,16475, 93, 93, 23, 23, 28, 28, 32, 32, 146, 144, 145, 143, 145, 15, 144, 145, 15, 144, 145, 16, 143, 145, 11, 15, 144, 145, 15, 144, 145, 10, 15, 144, 145, 13, 15, 144, 145, 13, 15, 144, 145, 13, 15, 144, 145, 13, 15, 144, 145, 13, 15, 144, 145, 14, 15, 144, 145, 15, 144, 145, 13, 15, 144, 145,16393, 13, 15, 144, 145,16393, 13, 15, 144, 145,16393, 13, 15, 144, 145,16393, 13, 15, 144, 145,16393, 42, 144, 145, 42, 144, 145, 41, 143, 145, 40, 42, 144, 145, 42, 144, 145, 39, 42, 144, 145, 42, 144, 145, 42, 144, 145, 42, 144, 145, 118, 120, 144, 145, 120, 144, 145, 119, 143, 145, 120, 144, 145, 120, 144, 145, 117, 120, 144, 145, 123, 125, 144, 145, 124, 143, 145, 125, 144, 145, 123, 125, 144, 145, 121, 125, 144, 145, 144, 145, 59, 144, 145, 58, 144, 145, 57, 144, 145, 65, 144, 145, 60, 144, 145, 63, 144, 145, 60, 65, 144, 145, 64, 144, 145, 62, 65, 144, 145, 61, 65, 144, 145, 49, 53, 144, 145, 53, 144, 145, 52, 143, 145,16427, 48, 53, 144, 145, 51, 53, 144, 145, 47, 53, 144, 145, 46, 53, 144, 145, 51, 53, 144, 145, 69, 144, 145, 70, 143, 145, 66, 69, 144, 145, 68, 69, 144, 145, 67, 69, 144, 145, 83, 144, 145, 84, 144, 145, 84, 144, 145, 85, 144, 145, 86, 144, 145, 144, 145, 87, 143, 145, 8283, 144, 145, 144, 145, 144, 145, 90, 144, 145, 77, 80, 144, 145, 80, 144, 145, 78, 143, 145, 76, 80, 144, 145, 80, 144, 145, 75, 80, 144, 145, 74, 80, 144, 145, 105, 144, 145, 93, 105, 144, 145, 106, 143, 145, 97, 105, 144, 145, 103, 105, 144, 145, 96, 105, 144, 145, 100, 105, 144, 145, 94, 105, 144, 145, 94, 105, 144, 145, 92, 105, 144, 145, 104, 105, 144, 145, 104, 105, 144, 145, 104, 105, 144, 145, 101, 105, 144, 145, 104, 105, 144, 145, 102, 105, 144, 145, 114, 144, 145, 113, 143, 145, 111, 144, 145, 112, 143, 145, 109, 111, 144, 145, 107, 111, 144, 145, 108, 111, 144, 145, 110, 111, 144, 145, 130, 131, 144, 145, 131, 144, 145, 129, 131, 144, 145, 131, 144, 145, 136, 137, 144, 145, 135, 137, 144, 145, 137, 144, 145, 137, 144, 145, 140, 142, 144, 145, 140, 141, 143, 145, 140, 142, 144, 145, 140, 142, 144, 145, 142, 144, 145, 24, 144, 145, 23, 24, 144, 145, 22, 143, 145, 20, 24, 144, 145, 20, 24, 144, 145, 29, 144, 145, 28, 29, 144, 145, 27, 143, 145, 25, 29, 144, 145, 26, 29, 144, 145, 33, 144, 145, 32, 33, 144, 145, 31, 143, 145, 30, 33, 144, 145, 16, 12, 13, 13, 13, 13, 13, 14,16393,16393, 16393,16393,16393, 13,16393, 13,16393, 13,16393, 13, 16393, 13,16393, 38, 118, 117, 123, 122, 123, 121, 121, 59, 58, 57, 60, 64, 61, 49,16427, 51, 46, 45, 50, 51, 51, 83, 84, 86, 87, 90, 77, 79, 74, 73, 93, 103, 94, 94, 94, 104, 97, 96, 104, 110, 130, 127, 127, 126, 136, 133, 133, 132, 140, 140, 140, 23, 20, 20, 28, 26, 32, 30, 17, 12, 18, 13, 13, 13, 13,16393, 16393,16393,16393,16393, 19, 8201, 13,16393, 13,16393, 13,16393, 13,16393, 35, 38, 36, 37, 115, 116, 44, 8235, 54, 55, 50, 50, 51, 51, 56, 56, 86, 88, 89, 72, 71, 81, 79, 82, 98, 99, 95, 94, 94, 128, 134, 138, 139, 20, 20, 30, 17, 18, 13, 2, 13, 13,16393,16393,16393,16393, 13,16393, 1, 2, 13,16393, 13,16393, 35, 36, 115, 116, 54, 55, 50, 86, 88, 89, 81, 82, 98, 99, 95, 94, 138, 139, 20, 20, 30, 13, 6, 13,16393, 1,16393,16393, 13,16393, 5, 6, 13,16393, 95, 20, 4, 13,16393, 5,16393, 3, 4, 13,16393,16418, 20, 21, 8, 3,16393, 7, 8,16418, 8226, 21, 7 } ; static yyconst short int yy_accept[434] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 19, 22, 25, 29, 32, 36, 40, 44, 48, 52, 56, 60, 63, 68, 73, 78, 83, 88, 91, 94, 97, 101, 104, 108, 111, 114, 117, 121, 124, 127, 130, 133, 137, 141, 144, 147, 151, 155, 157, 160, 163, 166, 169, 172, 175, 179, 182, 186, 190, 194, 197, 201, 205, 209, 213, 217, 221, 224, 227, 231, 235, 239, 242, 245, 248, 251, 254, 256, 259, 262, 264, 266, 269, 273, 276, 279, 283, 286, 290, 294, 297, 301, 304, 308, 312, 316, 320, 324, 328, 332, 336, 340, 344, 348, 352, 356, 359, 362, 365, 368, 372, 376, 380, 384, 388, 391, 395, 398, 402, 406, 409, 412, 416, 420, 424, 428, 431, 434, 438, 441, 445, 449, 452, 456, 459, 463, 467, 470, 474, 477, 481, 481, 481, 482, 482, 483, 483, 484, 485, 486, 487, 488, 489, 489, 490, 491, 492, 493, 494, 494, 494, 496, 496, 498, 500, 502, 504, 504, 504, 504, 505, 505, 505, 505, 505, 505, 506, 506, 506, 507, 508, 508, 509, 510, 511, 512, 512, 513, 514, 515, 516, 517, 518, 519, 520, 520, 520, 520, 521, 521, 522, 523, 523, 525, 526, 527, 528, 528, 529, 529, 530, 530, 530, 531, 532, 532, 532, 532, 532, 532, 533, 533, 534, 535, 536, 536, 537, 537, 537, 538, 539, 540, 540, 541, 542, 543, 544, 545, 546, 546, 547, 548, 549, 550, 550, 551, 552, 553, 554, 554, 555, 556, 557, 557, 557, 558, 559, 560, 561, 562, 562, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 579, 581, 583, 585, 586, 587, 588, 588, 589, 590, 591, 592, 593, 593, 594, 595, 596, 596, 598, 600, 601, 602, 603, 604, 605, 606, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 615, 616, 616, 617, 618, 618, 619, 620, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 633, 635, 637, 639, 640, 641, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 669, 671, 673, 673, 673, 674, 675, 676, 677, 678, 679, 680, 682, 684, 685, 687, 688, 689, 690, 692, 692, 693, 694, 695, 696, 696 } ; static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, 6, 1, 7, 7, 8, 9, 10, 11, 12, 13, 12, 14, 7, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 18, 7, 7, 19, 7, 1, 1, 20, 20, 20, 20, 21, 20, 22, 22, 22, 23, 22, 24, 22, 22, 22, 22, 22, 25, 22, 22, 26, 22, 22, 27, 22, 22, 28, 29, 30, 1, 31, 7, 32, 20, 33, 34, 35, 36, 22, 22, 37, 23, 22, 38, 39, 22, 40, 41, 22, 42, 43, 44, 45, 22, 22, 27, 22, 22, 46, 7, 30, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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[47] = { 0, 1, 2, 3, 1, 4, 5, 1, 4, 1, 1, 1, 1, 1, 6, 7, 7, 7, 1, 8, 9, 9, 10, 10, 10, 10, 10, 10, 1, 11, 1, 10, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1 } ; static yyconst short int yy_base[506] = { 0, 1495, 1494, 0, 46, 91, 98, 1490, 1489, 105, 109, 92, 113, 141, 0, 187, 0, 118, 125, 231, 233, 246, 0, 292, 0, 338, 346, 350, 357, 365, 0, 1488, 1487, 411, 0, 455, 456, 462, 463, 469, 470, 499, 0, 545, 0, 591, 0, 1489, 1576, 1576, 1576, 103, 1485, 1479, 0, 1472, 0, 1439, 1441, 1433, 1432, 636, 1464, 116, 637, 460, 638, 639, 1576, 123, 1576, 1464, 0, 1460, 1432, 134, 1460, 0, 1576, 1576, 1453, 1449, 1446, 0, 233, 1576, 355, 1441, 478, 1576, 1576, 0, 1576, 1440, 1576, 1576, 1436, 1576, 0, 0, 1576, 480, 1430, 0, 1417, 487, 1414, 1576, 1576, 1576, 1576, 1576, 0, 1416, 1576, 1576, 1403, 135, 1576, 1576, 1411, 1407, 235, 0, 641, 1386, 1376, 0, 1368, 642, 1576, 1372, 1576, 1368, 0, 1364, 1576, 667, 634, 1576, 0, 337, 646, 1576, 654, 1576, 1576, 1576, 1576, 1576, 1576, 1576, 1576, 0, 0, 1366, 1576, 650, 0, 1576, 1355, 661, 1321, 1315, 1325, 1313, 684, 1576, 1318, 1576, 467, 663, 1576, 1317, 1576, 1576, 0, 1576, 1316, 1576, 474, 691, 0, 1305, 1298, 0, 1292, 0, 1267, 1262, 1254, 1249, 693, 1281, 666, 684, 696, 698, 699, 0, 702, 704, 0, 705, 706, 709, 714, 707, 0, 1281, 0, 1277, 1238, 708, 1249, 0, 0, 1249, 1226, 1231, 0, 730, 1576, 733, 1222, 1218, 658, 1576, 1576, 0, 1212, 1203, 0, 0, 739, 1197, 1196, 1192, 0, 1188, 741, 1576, 1182, 0, 491, 0, 1185, 0, 1172, 717, 1576, 1180, 1173, 748, 0, 746, 0, 1170, 1164, 1150, 0, 1142, 751, 1576, 1147, 1143, 0, 1138, 743, 737, 747, 1576, 0, 0, 1576, 1576, 760, 0, 0, 1140, 1576, 764, 1576, 0, 1130, 1576, 767, 1576, 1108, 768, 1131, 1127, 1132, 732, 1128, 770, 775, 1124, 0, 1116, 776, 1114, 777, 1102, 0, 1101, 1061, 1094, 1055, 1047, 778, 779, 781, 780, 783, 1576, 1576, 784, 785, 786, 790, 1082, 0, 1081, 1048, 1576, 1076, 1075, 1576, 1076, 1074, 1071, 1067, 0, 0, 0, 0, 1576, 1049, 1057, 921, 1576, 918, 917, 908, 0, 907, 906, 874, 791, 1576, 326, 1576, 791, 1576, 793, 869, 864, 865, 799, 808, 855, 817, 1576, 1576, 793, 754, 710, 632, 813, 816, 819, 821, 826, 827, 831, 832, 1576, 1576, 652, 1576, 1576, 1576, 1576, 0, 641, 1576, 1576, 1576, 1576, 1576, 1576, 827, 1576, 1576, 1576, 1576, 835, 839, 845, 644, 481, 300, 852, 853, 858, 860, 861, 863, 864, 0, 869, 873, 850, 243, 120, 868, 873, 874, 895, 896, 897, 889, 100, 898, 902, 903, 904, 905, 1576, 899, 907, 1576, 926, 937, 948, 959, 970, 981, 992, 1003, 1014, 1025, 1036, 1047, 1058, 1063, 1072, 1081, 1091, 1102, 1113, 1118, 1122, 1132, 1142, 1152, 1163, 1168, 1173, 1183, 1190, 1200, 1211, 1216, 1220, 1230, 1240, 1251, 1261, 1272, 1282, 1286, 1295, 1305, 1315, 1325, 1336, 1347, 1358, 1368, 1378, 1389, 1400, 1403, 1412, 1422, 1427, 1430, 1434, 1444, 1454, 1463, 1472, 1476, 1485, 1494, 1504, 1509, 1519, 1530, 1536, 1545, 1554, 1556, 1565 } ; static yyconst short int yy_def[506] = { 0, 433, 433, 432, 432, 434, 434, 433, 433, 435, 435, 436, 436, 432, 13, 432, 15, 437, 437, 438, 438, 432, 21, 432, 23, 439, 439, 440, 440, 432, 29, 441, 441, 432, 33, 442, 442, 443, 443, 444, 444, 432, 41, 432, 43, 432, 45, 432, 432, 432, 432, 432, 432, 432, 445, 432, 446, 446, 446, 446, 446, 447, 445, 448, 448, 448, 448, 448, 432, 432, 432, 432, 449, 432, 432, 432, 449, 450, 432, 432, 432, 432, 432, 451, 432, 432, 451, 432, 432, 432, 432, 452, 432, 432, 432, 432, 432, 432, 453, 454, 432, 455, 432, 456, 432, 432, 457, 432, 432, 432, 432, 432, 458, 432, 432, 432, 459, 432, 432, 432, 432, 432, 432, 460, 432, 461, 432, 462, 432, 432, 432, 432, 432, 432, 463, 432, 432, 432, 137, 432, 464, 464, 464, 432, 464, 432, 432, 432, 432, 432, 432, 432, 432, 465, 466, 432, 432, 467, 468, 432, 432, 469, 470, 470, 432, 432, 470, 432, 432, 432, 471, 471, 432, 432, 432, 432, 472, 432, 432, 432, 473, 432, 445, 432, 432, 474, 432, 446, 446, 446, 446, 446, 447, 445, 475, 475, 475, 475, 475, 476, 432, 448, 477, 448, 448, 448, 448, 432, 449, 432, 478, 432, 432, 432, 449, 479, 450, 432, 432, 432, 451, 432, 432, 451, 432, 432, 432, 432, 432, 452, 432, 432, 453, 454, 455, 432, 480, 432, 456, 432, 432, 432, 481, 482, 483, 458, 432, 484, 459, 432, 432, 432, 432, 432, 460, 432, 462, 432, 485, 432, 486, 432, 432, 432, 432, 432, 463, 432, 432, 137, 137, 432, 487, 488, 432, 432, 488, 489, 490, 432, 432, 432, 432, 491, 432, 432, 432, 432, 470, 470, 432, 432, 432, 432, 492, 493, 493, 432, 494, 432, 432, 495, 496, 432, 497, 432, 498, 498, 498, 498, 475, 475, 475, 475, 475, 432, 432, 448, 448, 448, 448, 432, 478, 432, 432, 432, 432, 432, 432, 432, 480, 432, 432, 499, 500, 482, 456, 432, 501, 432, 432, 432, 432, 485, 432, 486, 432, 432, 432, 432, 432, 487, 432, 432, 432, 432, 432, 432, 492, 502, 493, 495, 503, 432, 432, 498, 432, 498, 498, 475, 475, 475, 475, 448, 432, 448, 448, 432, 432, 432, 432, 432, 432, 432, 499, 501, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 502, 493, 503, 498, 432, 498, 475, 432, 475, 475, 448, 432, 448, 504, 432, 432, 493, 432, 498, 475, 432, 475, 432, 448, 505, 493, 432, 432, 475, 432, 432, 505, 432, 432, 432, 0, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432 } ; static yyconst short int yy_nxt[1623] = { 0, 50, 51, 52, 50, 53, 54, 50, 55, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 56, 56, 56, 56, 56, 56, 56, 56, 50, 50, 50, 56, 56, 57, 58, 56, 59, 60, 56, 56, 56, 56, 56, 56, 56, 56, 50, 50, 61, 52, 50, 53, 62, 50, 55, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 63, 63, 63, 63, 63, 63, 63, 63, 50, 50, 50, 63, 63, 64, 65, 63, 66, 67, 63, 63, 63, 63, 63, 63, 63, 63, 50, 69, 70, 84, 71, 72, 85, 73, 75, 70, 423, 71, 76, 181, 73, 78, 79, 182, 80, 82, 79, 81, 80, 86, 84, 81, 200, 87, 100, 101, 423, 102, 103, 207, 104, 105, 101, 208, 102, 106, 100, 104, 74, 202, 213, 249, 250, 100, 214, 74, 48, 88, 49, 48, 48, 48, 48, 48, 89, 48, 48, 48, 48, 48, 48, 48, 48, 90, 48, 91, 91, 91, 91, 91, 91, 91, 91, 48, 48, 48, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 48, 92, 93, 49, 92, 92, 92, 92, 92, 48, 94, 92, 92, 95, 92, 92, 92, 92, 96, 97, 98, 98, 98, 98, 98, 98, 98, 98, 92, 92, 92, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 92, 108, 221, 108, 253, 250, 222, 109, 110, 109, 110, 111, 414, 111, 48, 48, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 112, 112, 112, 112, 112, 112, 112, 112, 48, 48, 48, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 48, 48, 113, 49, 48, 48, 48, 48, 48, 114, 114, 48, 48, 114, 48, 48, 48, 48, 115, 48, 116, 116, 116, 116, 116, 116, 116, 116, 48, 48, 48, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 48, 48, 117, 118, 274, 120, 415, 275, 121, 48, 122, 118, 394, 120, 124, 125, 121, 126, 127, 223, 128, 129, 125, 224, 126, 127, 394, 128, 130, 131, 132, 130, 133, 134, 130, 135, 136, 130, 130, 130, 130, 130, 137, 138, 138, 130, 139, 140, 140, 140, 140, 140, 141, 142, 140, 143, 130, 130, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 141, 140, 140, 144, 145, 148, 148, 149, 148, 150, 148, 148, 148, 151, 152, 148, 148, 148, 148, 148, 148, 148, 148, 148, 153, 153, 153, 153, 153, 153, 153, 153, 151, 148, 152, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 151, 49, 49, 155, 155, 200, 156, 156, 49, 49, 159, 159, 293, 160, 160, 163, 163, 164, 164, 300, 165, 165, 202, 226, 294, 234, 401, 157, 157, 235, 227, 301, 240, 241, 161, 161, 242, 337, 204, 228, 238, 166, 166, 167, 168, 169, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 170, 170, 170, 170, 170, 170, 170, 170, 167, 167, 167, 170, 170, 170, 170, 170, 170, 171, 170, 170, 170, 170, 170, 170, 170, 170, 167, 172, 173, 174, 172, 172, 172, 172, 172, 172, 172, 175, 172, 172, 172, 172, 172, 172, 172, 172, 176, 176, 176, 176, 176, 176, 176, 176, 172, 172, 172, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, 172, 177, 178, 179, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 180, 180, 180, 180, 180, 180, 180, 180, 177, 177, 177, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 177, 192, 200, 200, 200, 193, 255, 262, 263, 414, 256, 256, 270, 270, 274, 281, 282, 275, 247, 202, 202, 202, 274, 226, 432, 275, 286, 287, 293, 410, 227, 200, 195, 196, 276, 197, 198, 402, 203, 228, 294, 206, 276, 205, 268, 269, 269, 270, 202, 200, 432, 276, 288, 271, 271, 288, 181, 272, 192, 276, 182, 200, 193, 200, 200, 296, 202, 200, 271, 200, 200, 200, 207, 213, 200, 401, 208, 214, 202, 200, 202, 202, 249, 250, 202, 311, 202, 202, 202, 195, 196, 202, 197, 198, 312, 221, 202, 293, 223, 222, 317, 314, 224, 313, 234, 318, 240, 241, 235, 294, 242, 255, 319, 253, 250, 256, 262, 263, 320, 366, 256, 349, 349, 349, 350, 270, 270, 432, 274, 353, 282, 275, 355, 287, 432, 293, 288, 432, 350, 288, 293, 300, 300, 200, 200, 200, 200, 294, 200, 200, 374, 200, 294, 301, 301, 200, 353, 282, 355, 287, 202, 202, 202, 202, 293, 202, 202, 202, 202, 349, 349, 349, 202, 293, 369, 392, 294, 393, 200, 360, 370, 404, 300, 371, 200, 294, 200, 372, 375, 392, 373, 200, 374, 376, 301, 202, 408, 200, 202, 400, 293, 202, 411, 202, 293, 412, 412, 412, 202, 202, 300, 398, 294, 202, 202, 293, 294, 200, 404, 403, 361, 405, 301, 417, 406, 200, 419, 294, 408, 200, 358, 396, 407, 424, 202, 202, 395, 409, 417, 200, 202, 391, 202, 202, 413, 202, 202, 412, 412, 412, 202, 412, 412, 412, 430, 202, 202, 422, 416, 393, 419, 426, 427, 424, 430, 418, 294, 431, 426, 427, 427, 420, 431, 390, 389, 388, 294, 202, 202, 429, 202, 425, 342, 342, 202, 202, 429, 429, 387, 202, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 185, 185, 386, 185, 247, 185, 185, 185, 185, 185, 185, 187, 383, 187, 187, 194, 382, 329, 194, 329, 381, 380, 194, 194, 201, 379, 378, 377, 368, 201, 201, 201, 201, 210, 210, 367, 210, 366, 210, 210, 210, 210, 210, 210, 216, 365, 364, 363, 216, 216, 216, 216, 216, 216, 216, 220, 220, 361, 220, 299, 220, 220, 220, 220, 220, 220, 229, 297, 229, 229, 232, 358, 232, 232, 233, 292, 357, 356, 289, 354, 233, 233, 233, 233, 233, 236, 352, 348, 236, 347, 264, 346, 236, 236, 238, 238, 344, 238, 238, 238, 238, 238, 238, 238, 238, 243, 243, 342, 243, 243, 243, 243, 243, 243, 243, 243, 245, 341, 245, 245, 248, 248, 340, 248, 248, 254, 339, 247, 246, 334, 254, 254, 254, 254, 254, 254, 258, 332, 331, 329, 258, 258, 260, 260, 328, 260, 231, 260, 260, 260, 260, 260, 260, 266, 266, 230, 266, 266, 266, 266, 266, 266, 266, 266, 273, 225, 273, 273, 277, 225, 277, 277, 278, 278, 219, 327, 278, 278, 278, 278, 278, 278, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 283, 283, 326, 215, 283, 283, 283, 283, 283, 283, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 288, 288, 288, 324, 288, 288, 288, 288, 288, 288, 288, 295, 323, 321, 199, 295, 295, 309, 295, 295, 298, 308, 298, 298, 302, 307, 306, 305, 302, 302, 303, 302, 302, 304, 304, 183, 304, 304, 304, 304, 304, 304, 304, 304, 310, 299, 297, 292, 291, 310, 310, 310, 310, 315, 315, 315, 315, 290, 315, 315, 315, 315, 315, 315, 316, 316, 316, 316, 316, 316, 316, 289, 316, 316, 316, 322, 322, 289, 322, 322, 322, 322, 322, 322, 322, 322, 325, 325, 325, 325, 284, 325, 325, 325, 325, 325, 325, 330, 279, 267, 265, 264, 330, 261, 330, 330, 333, 333, 259, 333, 333, 333, 333, 333, 333, 333, 333, 335, 335, 257, 335, 335, 335, 335, 335, 335, 335, 335, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 336, 338, 338, 343, 252, 251, 247, 246, 343, 244, 343, 343, 345, 345, 239, 345, 345, 345, 345, 345, 345, 345, 345, 351, 237, 351, 273, 231, 273, 273, 277, 230, 277, 277, 278, 278, 225, 219, 278, 278, 278, 278, 278, 278, 283, 283, 218, 217, 283, 283, 283, 283, 283, 283, 359, 215, 212, 211, 209, 199, 191, 359, 359, 295, 190, 189, 188, 295, 295, 186, 295, 295, 298, 184, 298, 298, 362, 183, 432, 147, 147, 49, 49, 362, 362, 302, 49, 49, 432, 302, 302, 432, 302, 302, 304, 304, 432, 304, 304, 304, 304, 304, 304, 304, 304, 187, 432, 187, 187, 384, 384, 432, 384, 384, 384, 384, 384, 384, 384, 384, 337, 337, 337, 337, 432, 337, 337, 337, 337, 337, 337, 385, 385, 432, 385, 385, 397, 432, 432, 432, 397, 397, 432, 397, 397, 399, 432, 432, 432, 399, 399, 432, 399, 399, 421, 421, 428, 432, 432, 432, 432, 428, 428, 428, 428, 47, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432 } ; static yyconst short int yy_chk[1623] = { 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 11, 5, 5, 11, 5, 6, 6, 423, 6, 6, 51, 6, 9, 9, 51, 9, 10, 10, 9, 10, 12, 12, 10, 63, 12, 17, 17, 415, 17, 17, 69, 17, 18, 18, 69, 18, 18, 17, 18, 5, 63, 75, 117, 117, 18, 75, 6, 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, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 19, 84, 20, 122, 122, 84, 19, 19, 20, 20, 19, 414, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 25, 25, 25, 141, 25, 402, 141, 25, 26, 26, 26, 351, 26, 27, 27, 26, 27, 27, 86, 27, 28, 28, 86, 28, 28, 351, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 35, 36, 35, 36, 65, 35, 36, 37, 38, 37, 38, 170, 37, 38, 39, 40, 39, 40, 180, 39, 40, 65, 88, 170, 101, 401, 35, 36, 101, 88, 180, 105, 105, 37, 38, 105, 244, 65, 88, 244, 39, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 61, 64, 66, 67, 61, 124, 129, 129, 400, 124, 129, 138, 138, 142, 157, 157, 142, 385, 64, 66, 67, 144, 226, 138, 144, 161, 161, 171, 379, 226, 194, 61, 61, 142, 61, 61, 368, 64, 226, 171, 67, 144, 66, 137, 137, 137, 137, 194, 195, 166, 142, 166, 137, 137, 166, 181, 137, 192, 144, 181, 196, 192, 197, 198, 171, 195, 200, 137, 201, 203, 204, 207, 213, 205, 367, 207, 213, 196, 206, 197, 198, 249, 249, 200, 195, 201, 203, 204, 192, 192, 205, 192, 192, 196, 221, 206, 293, 223, 221, 203, 198, 223, 197, 234, 204, 240, 240, 234, 293, 240, 255, 205, 253, 253, 255, 262, 262, 206, 366, 262, 268, 268, 268, 269, 270, 270, 269, 276, 281, 281, 276, 286, 286, 289, 295, 289, 270, 269, 289, 296, 300, 302, 310, 311, 313, 312, 295, 314, 317, 318, 319, 296, 300, 302, 320, 353, 353, 355, 355, 310, 311, 313, 312, 359, 314, 317, 318, 319, 349, 349, 349, 320, 360, 311, 349, 359, 349, 369, 296, 312, 370, 362, 313, 371, 360, 372, 314, 319, 349, 317, 373, 374, 320, 362, 369, 375, 376, 370, 365, 397, 371, 392, 372, 398, 392, 392, 392, 373, 374, 399, 360, 397, 375, 376, 413, 398, 403, 404, 369, 361, 371, 399, 405, 372, 406, 407, 413, 408, 409, 358, 357, 373, 416, 403, 404, 356, 376, 417, 418, 405, 348, 406, 407, 398, 408, 409, 411, 411, 411, 416, 412, 412, 412, 422, 417, 418, 413, 403, 412, 419, 420, 421, 424, 430, 406, 422, 425, 426, 427, 428, 409, 431, 347, 346, 344, 430, 419, 420, 421, 424, 418, 343, 342, 425, 426, 427, 428, 340, 431, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 445, 445, 339, 445, 338, 445, 445, 445, 445, 445, 445, 446, 332, 446, 446, 447, 331, 330, 447, 329, 327, 326, 447, 447, 448, 324, 323, 321, 309, 448, 448, 448, 448, 449, 449, 308, 449, 307, 449, 449, 449, 449, 449, 449, 450, 306, 305, 303, 450, 450, 450, 450, 450, 450, 450, 451, 451, 301, 451, 299, 451, 451, 451, 451, 451, 451, 452, 297, 452, 452, 453, 294, 453, 453, 454, 292, 291, 290, 288, 284, 454, 454, 454, 454, 454, 455, 279, 267, 455, 265, 264, 261, 455, 455, 456, 456, 259, 456, 456, 456, 456, 456, 456, 456, 456, 457, 457, 258, 457, 457, 457, 457, 457, 457, 457, 457, 458, 257, 458, 458, 459, 459, 252, 459, 459, 460, 251, 248, 246, 242, 460, 460, 460, 460, 460, 460, 461, 239, 237, 236, 461, 461, 462, 462, 235, 462, 231, 462, 462, 462, 462, 462, 462, 463, 463, 230, 463, 463, 463, 463, 463, 463, 463, 463, 464, 225, 464, 464, 465, 224, 465, 465, 466, 466, 219, 218, 466, 466, 466, 466, 466, 466, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 468, 468, 217, 214, 468, 468, 468, 468, 468, 468, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 470, 470, 470, 212, 470, 470, 470, 470, 470, 470, 470, 471, 211, 209, 193, 471, 471, 191, 471, 471, 472, 190, 472, 472, 473, 189, 188, 186, 473, 473, 184, 473, 473, 474, 474, 183, 474, 474, 474, 474, 474, 474, 474, 474, 475, 178, 173, 168, 165, 475, 475, 475, 475, 476, 476, 476, 476, 164, 476, 476, 476, 476, 476, 476, 477, 477, 477, 477, 477, 477, 477, 163, 477, 477, 477, 478, 478, 162, 478, 478, 478, 478, 478, 478, 478, 478, 479, 479, 479, 479, 160, 479, 479, 479, 479, 479, 479, 480, 155, 135, 133, 131, 480, 128, 480, 480, 481, 481, 126, 481, 481, 481, 481, 481, 481, 481, 481, 482, 482, 125, 482, 482, 482, 482, 482, 482, 482, 482, 483, 483, 483, 483, 483, 483, 483, 483, 483, 483, 483, 484, 484, 485, 121, 120, 116, 113, 485, 106, 485, 485, 486, 486, 104, 486, 486, 486, 486, 486, 486, 486, 486, 487, 102, 487, 488, 96, 488, 488, 489, 93, 489, 489, 490, 490, 87, 82, 490, 490, 490, 490, 490, 490, 491, 491, 81, 80, 491, 491, 491, 491, 491, 491, 492, 76, 74, 73, 71, 62, 60, 492, 492, 493, 59, 58, 57, 493, 493, 55, 493, 493, 494, 53, 494, 494, 495, 52, 47, 32, 31, 8, 7, 495, 495, 496, 2, 1, 0, 496, 496, 0, 496, 496, 497, 497, 0, 497, 497, 497, 497, 497, 497, 497, 497, 498, 0, 498, 498, 499, 499, 0, 499, 499, 499, 499, 499, 499, 499, 499, 500, 500, 500, 500, 0, 500, 500, 500, 500, 500, 500, 501, 501, 0, 501, 501, 502, 0, 0, 0, 502, 502, 0, 502, 502, 503, 0, 0, 0, 503, 503, 0, 503, 503, 504, 504, 505, 0, 0, 0, 0, 505, 505, 505, 505, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432 } ; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; static char *yy_full_match; static int yy_lp; static int yy_looking_for_trail_begin = 0; static int yy_full_lp; static int *yy_full_state; #define YY_TRAILING_MASK 0x2000 #define YY_TRAILING_HEAD_MASK 0x4000 #define REJECT \ { \ *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ yy_cp = yy_full_match; /* restore poss. backed-over text */ \ yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \ yy_state_ptr = yy_full_state; /* restore orig. state */ \ yy_current_state = *yy_state_ptr; /* restore curr. state */ \ ++yy_lp; \ goto find_rule; \ } #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "pyscanner.l" #define INITIAL 0 /****************************************************************************** * * $Id: pyscanner.l,v 1.9 2001/03/19 19:27:39 root Exp $ * * Copyright (C) 1997-2007 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby * granted. No representations are made about the suitability of this software * for any purpose. It is provided "as is" without express or implied warranty. * See the GNU General Public License for more details. * * Documents produced by Doxygen are derivative works derived from the * input used in their production; they are not affected by this license. * */ /* This code is based on the work done by the MoxyPyDoxy team * (Linda Leong, Mike Rivera, Kim Truong, and Gabriel Estrada) * in Spring 2005 as part of CS 179E: Compiler Design Project * at the University of California, Riverside; the course was * taught by Peter H. Froehlich . */ #line 26 "pyscanner.l" /* * includes */ #include #include #include #include #include "qtbc.h" #include #include #include #include #include #include #include "pyscanner.h" #include "entry.h" #include "message.h" #include "config.h" #include "doxygen.h" #include "util.h" #include "defargs.h" #include "language.h" #include "commentscan.h" #include "pycode.h" #define YY_NEVER_INTERACTIVE 1 /* ----------------------------------------------------------------- * * statics */ static ParserInterface *g_thisParser; static const char * inputString; static int inputPosition; static QFile inputFile; static Protection protection; static Entry* current_root = 0 ; static Entry* current = 0 ; static Entry* previous = 0 ; static Entry* bodyEntry = 0 ; static int yyLineNr = 1 ; static QCString yyFileName; static MethodTypes mtype; static bool gstat; static Specifier virt; static int docBlockContext; static QCString docBlock; static QCString docBlockName; static bool docBlockInBody; static bool docBlockJavaStyle; static bool docBrief; static bool docBlockSpecial; static bool g_doubleQuote; static bool g_specialBlock; //static bool g_expectModuleDocs; static int g_stringContext; static QGString * g_copyString; static int g_indent = 0; static int g_curIndent = 0; static QDict g_packageNameCache(257); static QCString g_packageScope; static char g_atomStart; static char g_atomEnd; static int g_atomCount; //static bool g_insideConstructor; static QCString g_moduleScope; static QCString g_packageName; static bool g_hideClassDocs; static QCString g_defVal; static int g_braceCount; static bool g_lexInit = FALSE; //----------------------------------------------------------------------------- static void initParser() { protection = Public; mtype = Method; gstat = FALSE; virt = Normal; previous = 0; g_packageNameCache.setAutoDelete(TRUE); } static void initEntry() { //current->python = TRUE; current->protection = protection ; current->mtype = mtype; current->virt = virt; current->stat = gstat; current->objc = FALSE; //insideObjC; current->setParent(current_root); initGroupInfo(current); } static void newEntry() { previous = current; current_root->addSubEntry(current); current = new Entry ; initEntry(); } static void newVariable() { if (!current->name.isEmpty() && current->name.at(0)=='_') // mark as private { current->protection=Private; } if (current_root->section&Entry::SCOPE_MASK) // mark as class variable { current->stat = TRUE; } newEntry(); } static void newFunction() { if (current->name.left(2)=="__" && current->name.right(2)=="__") { // special method name, see // http://docs.python.org/ref/specialnames.html current->protection=Public; } else if (current->name.at(0)=='_') { current->protection=Private; } } static inline int computeIndent(const char *s) { int col=0; static int tabSize=Config_getInt("TAB_SIZE"); const char *p=s; char c; while ((c=*p++)) { if (c==' ') col++; else if (c=='\t') col+=tabSize-(col%tabSize); else break; } return col; } static QCString findPackageScopeFromPath(const QCString &path) { QCString *pScope = g_packageNameCache.find(path); if (pScope) { return *pScope; } QFileInfo pf(path+"/__init__.py"); // found package initialization file if (pf.exists()) { int i=path.findRev('/'); if (i!=-1) { QCString scope = findPackageScopeFromPath(path.left(i)); if (!scope.isEmpty()) { scope+="::"; } scope+=path.mid(i+1); g_packageNameCache.insert(path,new QCString(scope)); return scope; } } return ""; } static QCString findPackageScope(const char *fileName) { if (fileName==0) return ""; QFileInfo fi(fileName); return findPackageScopeFromPath(fi.dirPath(TRUE).data()); } //----------------------------------------------------------------------------- static void lineCount() { for( const char* c = yytext ; *c ; ++c ) yyLineNr += (*c == '\n') ; } #if 0 // Appends the current-name to current-type; // Destroys current-name. // Destroys current->args and current->argList static void addType( Entry* current ) { uint tl=current->type.length(); if ( tl>0 && !current->name.isEmpty() && current->type.at(tl-1)!='.') { current->type += ' ' ; } current->type += current->name ; current->name.resize(0) ; tl=current->type.length(); if ( tl>0 && !current->args.isEmpty() && current->type.at(tl-1)!='.') { current->type += ' ' ; } current->type += current->args ; current->args.resize(0) ; current->argList->clear(); } static QCString stripQuotes(const char *s) { QCString name; if (s==0 || *s==0) return name; name=s; if (name.at(0)=='"' && name.at(name.length()-1)=='"') { name=name.mid(1,name.length()-2); } return name; } #endif //----------------------------------------------------------------- //----------------------------------------------------------------- static void startCommentBlock(bool brief) { if (brief) { current->briefFile = yyFileName; current->briefLine = yyLineNr; } else { current->docFile = yyFileName; current->docLine = yyLineNr; } } /* static void appendDocBlock() { previous = current; current_root->addSubEntry(current); current = new Entry; initEntry(); } */ static void handleCommentBlock(const QCString &doc,bool brief) { //printf("handleCommentBlock(doc=[%s] brief=%d docBlockInBody=%d docBlockJavaStyle=%d\n", // doc.data(),brief,docBlockInBody,docBlockJavaStyle); // TODO: Fix me docBlockInBody=FALSE; if (docBlockInBody && previous && !previous->doc.isEmpty()) { previous->doc=previous->doc.stripWhiteSpace()+"\n\n"; } int position = 0; bool needsEntry; while (parseCommentBlock( g_thisParser, (docBlockInBody && previous) ? previous : current, doc, // text yyFileName, // file brief ? current->briefLine : current->docLine, // line of block start docBlockInBody ? FALSE : brief, FALSE, //docBlockJavaStyle, // javadoc style docBlockInBody, protection, position, needsEntry) ) // need to start a new entry { if (needsEntry) { newEntry(); } } if (needsEntry) { newEntry(); } } static void endOfDef() { if (bodyEntry) { bodyEntry->endBodyLine = yyLineNr; bodyEntry = 0; } newEntry(); //g_insideConstructor = FALSE; } static inline void addToString(const char *s) { if (g_copyString) (*g_copyString)+=s; } static void initTriDoubleQuoteBlock() { docBlockContext = YY_START; docBlockInBody = FALSE; docBlockJavaStyle = TRUE; docBlockSpecial = yytext[3]=='!'; docBlock.resize(0); g_doubleQuote = TRUE; startCommentBlock(FALSE); } static void initTriSingleQuoteBlock() { docBlockContext = YY_START; docBlockInBody = FALSE; docBlockJavaStyle = TRUE; docBlockSpecial = yytext[3]=='!'; docBlock.resize(0); g_doubleQuote = FALSE; startCommentBlock(FALSE); } static void initSpecialBlock() { docBlockContext = YY_START; docBlockInBody = FALSE; docBlockJavaStyle = TRUE; docBrief = TRUE; docBlock.resize(0); startCommentBlock(TRUE); } //----------------------------------------------------------------------------- /* ----------------------------------------------------------------- */ #undef YY_INPUT #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); static int yyread(char *buf,int max_size) { int c=0; while ( c < max_size && inputString[inputPosition] ) { *buf = inputString[inputPosition++] ; //printf("%d (%c)\n",*buf,*buf); c++; buf++; } return c; } /* start command character */ /* Main start state */ #define Search 1 #define SearchMemVars 2 /* Mid-comment states */ /* %x FuncDoubleComment */ /* %x ClassDoubleComment */ #define TryClassDocString 3 #define TripleComment 4 #define SpecialComment 5 /* Function states */ #define FunctionDec 6 #define FunctionParams 7 #define FunctionBody 8 #define FunctionParamDefVal 9 /* Class states */ #define ClassDec 10 #define ClassInheritance 11 #define ClassCaptureIndent 12 #define ClassBody 13 /* Variable states */ #define VariableDec 14 #define VariableEnd 15 #define VariableAtom 16 /* String states */ #define SingleQuoteString 17 #define DoubleQuoteString 18 #define TripleString 19 /* import */ #define FromMod 20 #define FromModItem 21 #define Import 22 /* 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, *yy_bp; register int yy_act; #line 488 "pyscanner.l" /* ------------ Function recognition rules -------------- */ if ( yy_init ) { yy_init = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yy_c_buf_p; /* Support of yytext. */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_current_state += YY_AT_BOL(); yy_state_ptr = yy_state_buf; *yy_state_ptr++ = yy_current_state; yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 433 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yy_state_ptr++ = yy_current_state; ++yy_cp; } while ( yy_base[yy_current_state] != 1576 ); yy_find_action: yy_current_state = *--yy_state_ptr; yy_lp = yy_accept[yy_current_state]; find_rule: /* we branch to this label when backing up */ for ( ; ; ) /* until we find what rule we matched */ { if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) { yy_act = yy_acclist[yy_lp]; if ( yy_act & YY_TRAILING_HEAD_MASK || yy_looking_for_trail_begin ) { if ( yy_act == yy_looking_for_trail_begin ) { yy_looking_for_trail_begin = 0; yy_act &= ~YY_TRAILING_HEAD_MASK; break; } } else if ( yy_act & YY_TRAILING_MASK ) { yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK; yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK; } else { yy_full_match = yy_cp; yy_full_state = yy_state_ptr; yy_full_lp = yy_lp; break; } ++yy_lp; goto find_rule; } --yy_cp; yy_current_state = *--yy_state_ptr; yy_lp = 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 1: #line 495 "pyscanner.l" case 2: YY_RULE_SETUP #line 495 "pyscanner.l" { // start of a function/method definition g_indent=computeIndent(yytext); //g_expectModuleDocs = FALSE; current->fileName = yyFileName; current->startLine = yyLineNr; current->bodyLine = yyLineNr; current->section = Entry::FUNCTION_SEC; current->protection = protection = Public; current->objc = FALSE; current->virt = Normal; current->stat = FALSE; current->mtype = mtype = Method; current->type.resize(0); current->name.resize(0); current->args.resize(0); current->argList->clear(); BEGIN( FunctionDec ); } YY_BREAK case 3: #line 515 "pyscanner.l" case 4: YY_RULE_SETUP #line 515 "pyscanner.l" { // start of a class definition g_indent=computeIndent(yytext); //g_expectModuleDocs = FALSE; current->section = Entry::CLASS_SEC; current->argList->clear(); current->type += "class" ; current->fileName = yyFileName; current->bodyLine = yyLineNr; BEGIN( ClassDec ) ; } YY_BREAK case 5: #line 527 "pyscanner.l" case 6: YY_RULE_SETUP #line 527 "pyscanner.l" { // start of an from import BEGIN( FromMod ); } YY_BREAK case 7: #line 532 "pyscanner.l" case 8: YY_RULE_SETUP #line 532 "pyscanner.l" { // start of an import statement BEGIN( Import ); } YY_BREAK case 9: YY_RULE_SETUP #line 535 "pyscanner.l" { // variable g_indent=computeIndent(yytext); current->section = Entry::VARIABLE_SEC; current->name = QCString(yytext).stripWhiteSpace(); current->fileName = yyFileName; current->startLine = yyLineNr; current->bodyLine = yyLineNr; BEGIN(VariableDec); } YY_BREAK case 10: YY_RULE_SETUP #line 544 "pyscanner.l" { // start of a single quoted string g_stringContext=YY_START; g_copyString=0; BEGIN( SingleQuoteString ); } YY_BREAK case 11: YY_RULE_SETUP #line 549 "pyscanner.l" { // start of a double quoted string g_stringContext=YY_START; g_copyString=0; BEGIN( DoubleQuoteString ); } YY_BREAK case 12: YY_RULE_SETUP #line 555 "pyscanner.l" { // normal comment } YY_BREAK case 13: YY_RULE_SETUP #line 557 "pyscanner.l" { // some other identifier } YY_BREAK case 14: YY_RULE_SETUP #line 559 "pyscanner.l" { g_curIndent=computeIndent(yytext); } YY_BREAK case 15: YY_RULE_SETUP #line 562 "pyscanner.l" { // any other character... // This is the major default // that should catch everything // else in Body. } YY_BREAK case 16: YY_RULE_SETUP #line 568 "pyscanner.l" { // new line lineCount(); } YY_BREAK case 17: YY_RULE_SETUP #line 572 "pyscanner.l" { // start of a comment block initTriDoubleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 18: YY_RULE_SETUP #line 577 "pyscanner.l" { // start of a comment block initTriSingleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 19: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 582 "pyscanner.l" { // start of a special comment initSpecialBlock(); BEGIN(SpecialComment); } YY_BREAK case 20: YY_RULE_SETUP #line 589 "pyscanner.l" { // from package import g_packageName=yytext; } YY_BREAK case 21: YY_RULE_SETUP #line 592 "pyscanner.l" { BEGIN(FromModItem); } YY_BREAK case 22: YY_RULE_SETUP #line 595 "pyscanner.l" { yyLineNr++; BEGIN(Search); } YY_BREAK case 23: YY_RULE_SETUP #line 599 "pyscanner.l" { } YY_BREAK case 24: YY_RULE_SETUP #line 601 "pyscanner.l" { unput(*yytext); BEGIN(Search); } YY_BREAK case 25: YY_RULE_SETUP #line 608 "pyscanner.l" { // import all QCString item=g_packageName; current->name=removeRedundantWhiteSpace(substitute(item,".","::")); current->fileName = yyFileName; //printf("Adding using directive: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data()); current->section=Entry::USINGDIR_SEC; current_root->addSubEntry(current); current = new Entry ; initEntry(); BEGIN(Search); } YY_BREAK case 26: YY_RULE_SETUP #line 619 "pyscanner.l" { QCString item=g_packageName+"."+yytext; current->name=removeRedundantWhiteSpace(substitute(item,".","::")); current->fileName = yyFileName; //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data()); current->section=Entry::USINGDECL_SEC; current_root->addSubEntry(current); current = new Entry ; initEntry(); BEGIN(Search); } YY_BREAK case 27: YY_RULE_SETUP #line 630 "pyscanner.l" { yyLineNr++; BEGIN(Search); } YY_BREAK case 28: YY_RULE_SETUP #line 634 "pyscanner.l" { } YY_BREAK case 29: YY_RULE_SETUP #line 636 "pyscanner.l" { unput(*yytext); BEGIN(Search); } YY_BREAK case 30: YY_RULE_SETUP #line 643 "pyscanner.l" { current->name=removeRedundantWhiteSpace(substitute(yytext,".","::")); current->fileName = yyFileName; //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data()); current->section=Entry::USINGDECL_SEC; current_root->addSubEntry(current); current = new Entry ; initEntry(); BEGIN(Search); } YY_BREAK case 31: YY_RULE_SETUP #line 653 "pyscanner.l" { yyLineNr++; BEGIN(Search); } YY_BREAK case 32: YY_RULE_SETUP #line 657 "pyscanner.l" { } YY_BREAK case 33: YY_RULE_SETUP #line 659 "pyscanner.l" { unput(*yytext); BEGIN(Search); } YY_BREAK case 34: YY_RULE_SETUP #line 666 "pyscanner.l" { //printf("Found member variable %s in %s\n",&yytext[5],current_root->name.data()); current->name=&yytext[5]; current->section=Entry::VARIABLE_SEC; current->fileName = yyFileName; current->startLine = yyLineNr; current->bodyLine = yyLineNr; current->type.resize(0); if (current->name.at(0)=='_') // mark as private { current->protection=Private; } else { current->protection=Public; } newEntry(); } YY_BREAK case 35: YY_RULE_SETUP #line 684 "pyscanner.l" { // start of a comment block initTriDoubleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 36: YY_RULE_SETUP #line 689 "pyscanner.l" { // start of a comment block initTriSingleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 37: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 694 "pyscanner.l" { // start of a special comment initSpecialBlock(); BEGIN(SpecialComment); } YY_BREAK case 38: YY_RULE_SETUP #line 698 "pyscanner.l" { // # } YY_BREAK case 39: YY_RULE_SETUP #line 700 "pyscanner.l" { // start of a single quoted string g_stringContext=YY_START; g_copyString=0; BEGIN( SingleQuoteString ); } YY_BREAK case 40: YY_RULE_SETUP #line 705 "pyscanner.l" { // start of a double quoted string g_stringContext=YY_START; g_copyString=0; BEGIN( DoubleQuoteString ); } YY_BREAK case 41: YY_RULE_SETUP #line 710 "pyscanner.l" { yyLineNr++; } YY_BREAK case 42: YY_RULE_SETUP #line 711 "pyscanner.l" // anything else YY_BREAK case 43: YY_RULE_SETUP #line 715 "pyscanner.l" { //fprintf(stderr,"indent %d<=%d\n",computeIndent(&yytext[1]),g_indent); if (computeIndent(&yytext[1])<=g_indent) { int i; for (i=yyleng-1;i>=0;i--) { unput(yytext[i]); } endOfDef(); YY_CURRENT_BUFFER->yy_at_bol=TRUE; BEGIN(Search); } else { yyLineNr++; current->program+=yytext; } } YY_BREAK case 44: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 2; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 734 "pyscanner.l" { if (computeIndent(&yytext[1])<=g_indent) { int i; for (i=yyleng-1;i>=0;i--) { unput(yytext[i]); } endOfDef(); YY_CURRENT_BUFFER->yy_at_bol=TRUE; BEGIN(Search); } else { yyLineNr++; current->program+=yytext; } } YY_BREAK case YY_STATE_EOF(FunctionBody): #line 752 "pyscanner.l" { endOfDef(); yyterminate(); } YY_BREAK case 45: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 756 "pyscanner.l" { // skip empty line current->program+=yytext; } YY_BREAK case 46: YY_RULE_SETUP #line 759 "pyscanner.l" { // something at indent >0 current->program+=yytext; g_curIndent = computeIndent(yytext); if (g_curIndent<=g_indent) // jumped out of the function { endOfDef(); BEGIN(Search); } } YY_BREAK case 47: YY_RULE_SETUP #line 769 "pyscanner.l" { // start of a single quoted string current->program+=yytext; g_stringContext=YY_START; g_specialBlock = FALSE; g_copyString=¤t->program; BEGIN( SingleQuoteString ); } YY_BREAK case 48: YY_RULE_SETUP #line 776 "pyscanner.l" { // start of a double quoted string current->program+=yytext; g_stringContext=YY_START; g_specialBlock = FALSE; g_copyString=¤t->program; BEGIN( DoubleQuoteString ); } YY_BREAK case 49: YY_RULE_SETUP #line 783 "pyscanner.l" { // non-special stuff current->program+=yytext; g_specialBlock = FALSE; } YY_BREAK case 50: YY_RULE_SETUP #line 787 "pyscanner.l" { // normal comment current->program+=yytext; } YY_BREAK case 51: YY_RULE_SETUP #line 790 "pyscanner.l" { // comment half way current->program+=yytext; } YY_BREAK case 52: YY_RULE_SETUP #line 793 "pyscanner.l" { yyLineNr++; current->program+=yytext; } YY_BREAK case 53: YY_RULE_SETUP #line 796 "pyscanner.l" { // any character current->program+=*yytext; g_specialBlock = FALSE; } YY_BREAK case 54: YY_RULE_SETUP #line 801 "pyscanner.l" { // start of a comment block current->program+=yytext; initTriDoubleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 55: YY_RULE_SETUP #line 807 "pyscanner.l" { // start of a comment block current->program+=yytext; initTriSingleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 56: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 813 "pyscanner.l" { // start of a special comment initSpecialBlock(); BEGIN(SpecialComment); } YY_BREAK case 57: YY_RULE_SETUP #line 822 "pyscanner.l" { //found function name if (current->type.isEmpty()) { current->type = "def"; } current->name = yytext; current->name = current->name.stripWhiteSpace(); newFunction(); } YY_BREAK case 58: YY_RULE_SETUP #line 832 "pyscanner.l" { // function without arguments g_specialBlock = TRUE; // expecting a docstring bodyEntry = current; BEGIN( FunctionBody ); } YY_BREAK case 59: YY_RULE_SETUP #line 838 "pyscanner.l" { BEGIN( FunctionParams ); } YY_BREAK case 60: YY_RULE_SETUP #line 844 "pyscanner.l" { } YY_BREAK case 61: YY_RULE_SETUP #line 847 "pyscanner.l" { // Name of parameter lineCount(); Argument *a = new Argument; current->argList->append(a); current->argList->getLast()->name = QCString(yytext).stripWhiteSpace(); current->argList->getLast()->type = ""; } YY_BREAK case 62: YY_RULE_SETUP #line 854 "pyscanner.l" { // default value // TODO: this rule is too simple, need to be able to // match things like =")" as well! QCString defVal=&yytext[1]; g_defVal.resize(0); g_braceCount=0; BEGIN(FunctionParamDefVal); } YY_BREAK case 63: YY_RULE_SETUP #line 863 "pyscanner.l" { // end of parameter list } YY_BREAK case 64: YY_RULE_SETUP #line 866 "pyscanner.l" { g_specialBlock = TRUE; // expecting a docstring bodyEntry = current; BEGIN( FunctionBody ); } YY_BREAK case 65: YY_RULE_SETUP #line 872 "pyscanner.l" { // Default rule inside arguments. } YY_BREAK case 66: YY_RULE_SETUP #line 878 "pyscanner.l" { // internal opening brace g_braceCount++; g_defVal+=*yytext; } YY_BREAK case 67: #line 883 "pyscanner.l" case 68: YY_RULE_SETUP #line 883 "pyscanner.l" { if (g_braceCount==0) // end of default argument { if (current->argList->getLast()) { current->argList->getLast()->defval=g_defVal.stripWhiteSpace(); } BEGIN(FunctionParams); } else // continue { g_braceCount--; g_defVal+=*yytext; } } YY_BREAK case 69: YY_RULE_SETUP #line 898 "pyscanner.l" { g_defVal+=*yytext; } YY_BREAK case 70: YY_RULE_SETUP #line 901 "pyscanner.l" { g_defVal+=*yytext; yyLineNr++; } YY_BREAK case 71: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 909 "pyscanner.l" { // new def at indent 0 yyLineNr++; endOfDef(); g_hideClassDocs = FALSE; YY_CURRENT_BUFFER->yy_at_bol=TRUE; BEGIN(Search); } YY_BREAK case 72: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 916 "pyscanner.l" { // start of a special comment at indent 0 yyLineNr++; endOfDef(); g_hideClassDocs = FALSE; YY_CURRENT_BUFFER->yy_at_bol=TRUE; BEGIN(Search); } YY_BREAK case 73: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 923 "pyscanner.l" { // skip empty line current->program+=yytext; } YY_BREAK case YY_STATE_EOF(ClassBody): #line 926 "pyscanner.l" { endOfDef(); yyterminate(); } YY_BREAK case 74: YY_RULE_SETUP #line 930 "pyscanner.l" { // something at indent >0 g_curIndent=computeIndent(yytext); //fprintf(stderr,"g_curIndent=%d g_indent=%d\n",g_curIndent,g_indent); if (g_curIndent<=g_indent) // jumped out of the class { endOfDef(); g_indent=g_curIndent; // make sure the next rule matches ^... YY_CURRENT_BUFFER->yy_at_bol=TRUE; g_hideClassDocs = FALSE; BEGIN(Search); } else { current->program+=yytext; } } YY_BREAK case 75: YY_RULE_SETUP #line 948 "pyscanner.l" { // start of a single quoted string current->program+=*yytext; g_stringContext=YY_START; g_specialBlock = FALSE; g_copyString=¤t->program; BEGIN( SingleQuoteString ); } YY_BREAK case 76: YY_RULE_SETUP #line 955 "pyscanner.l" { // start of a double quoted string current->program+=*yytext; g_stringContext=YY_START; g_specialBlock = FALSE; g_copyString=¤t->program; BEGIN( DoubleQuoteString ); } YY_BREAK case 77: YY_RULE_SETUP #line 962 "pyscanner.l" { // non-special stuff current->program+=yytext; g_specialBlock = FALSE; g_hideClassDocs = FALSE; } YY_BREAK case 78: YY_RULE_SETUP #line 967 "pyscanner.l" { current->program+=*yytext; yyLineNr++; } YY_BREAK case 79: YY_RULE_SETUP #line 971 "pyscanner.l" { // normal comment current->program+=yytext; } YY_BREAK case 80: YY_RULE_SETUP #line 974 "pyscanner.l" { // any character g_specialBlock = FALSE; current->program+=*yytext; } YY_BREAK case 81: YY_RULE_SETUP #line 978 "pyscanner.l" { // start of a comment block if (!g_hideClassDocs) current->program+=yytext; initTriDoubleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 82: YY_RULE_SETUP #line 984 "pyscanner.l" { // start of a comment block if (!g_hideClassDocs) current->program+=yytext; initTriSingleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 83: YY_RULE_SETUP #line 991 "pyscanner.l" { if (current->type.isEmpty()) { current->type = "class"; } current->section = Entry::CLASS_SEC; current->name = yytext; // prepend scope in case of nested classes if (current_root->section&Entry::SCOPE_MASK) { //printf("*** Prepending scope %s to class %s\n",current_root->name.data(),current->name.data()); current->name.prepend(current_root->name+"::"); } current->name = current->name.stripWhiteSpace(); current->fileName = yyFileName; docBlockContext = YY_START; docBlockInBody = FALSE; docBlockJavaStyle = FALSE; docBlock.resize(0); BEGIN(ClassInheritance); } YY_BREAK case 84: YY_RULE_SETUP #line 1018 "pyscanner.l" { // syntactic sugar for the list } YY_BREAK case 85: YY_RULE_SETUP #line 1021 "pyscanner.l" { // begin of the class definition g_specialBlock = TRUE; // expecting a docstring BEGIN(ClassCaptureIndent); } YY_BREAK case 86: YY_RULE_SETUP #line 1026 "pyscanner.l" { current->extends->append( new BaseInfo(substitute(yytext,".","::"),Public,Normal) ); //Has base class-do stuff } YY_BREAK case 87: YY_RULE_SETUP #line 1036 "pyscanner.l" { // Blankline - ignore, keep looking for indentation. lineCount(); } YY_BREAK case 88: YY_RULE_SETUP #line 1041 "pyscanner.l" { // start of a comment block initTriDoubleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 89: YY_RULE_SETUP #line 1046 "pyscanner.l" { // start of a comment block initTriSingleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 90: YY_RULE_SETUP #line 1051 "pyscanner.l" { current->program=yytext; current->startLine = yyLineNr; g_curIndent=computeIndent(yytext); bodyEntry = current; //fprintf(stderr,"setting indent %d\n",g_curIndent); //printf("current->program=[%s]\n",current->program.data()); g_hideClassDocs = TRUE; BEGIN(ClassBody); } YY_BREAK case 91: YY_RULE_SETUP #line 1062 "pyscanner.l" { // Just pushback an empty class, and // resume parsing the body. newEntry(); // printf("Failed to find indent - skipping!"); BEGIN( Search ); } YY_BREAK case 92: YY_RULE_SETUP #line 1075 "pyscanner.l" { // the assignment operator //printf("====== VariableDec at line %d\n",yyLineNr); } YY_BREAK case 93: YY_RULE_SETUP #line 1078 "pyscanner.l" { // spaces } YY_BREAK case 94: YY_RULE_SETUP #line 1080 "pyscanner.l" { // integer value current->type = "int"; current->initializer = yytext; BEGIN(VariableEnd); } YY_BREAK case 95: YY_RULE_SETUP #line 1085 "pyscanner.l" { // floating point value current->type = "float"; current->initializer = yytext; BEGIN(VariableEnd); } YY_BREAK case 96: YY_RULE_SETUP #line 1090 "pyscanner.l" { // string current->type = "string"; current->initializer = yytext; g_copyString=¤t->initializer; g_stringContext=VariableEnd; BEGIN( SingleQuoteString ); } YY_BREAK case 97: YY_RULE_SETUP #line 1097 "pyscanner.l" { // string current->type = "string"; current->initializer = yytext; g_copyString=¤t->initializer; g_stringContext=VariableEnd; BEGIN( DoubleQuoteString ); } YY_BREAK case 98: YY_RULE_SETUP #line 1104 "pyscanner.l" { // start of a comment block current->type = "string"; g_doubleQuote=TRUE; g_copyString=¤t->initializer; g_stringContext=VariableEnd; BEGIN(TripleString); } YY_BREAK case 99: YY_RULE_SETUP #line 1112 "pyscanner.l" { // start of a comment block current->type = "string"; g_doubleQuote=FALSE; g_copyString=¤t->initializer; g_stringContext=VariableEnd; BEGIN(TripleString); } YY_BREAK case 100: YY_RULE_SETUP #line 1119 "pyscanner.l" { // tuple current->type = "tuple"; current->initializer+=*yytext; g_atomStart='('; g_atomEnd=')'; g_atomCount=1; BEGIN( VariableAtom ); } YY_BREAK case 101: YY_RULE_SETUP #line 1127 "pyscanner.l" { // list current->type = "list"; current->initializer+=*yytext; g_atomStart='['; g_atomEnd=']'; g_atomCount=1; BEGIN( VariableAtom ); } YY_BREAK case 102: YY_RULE_SETUP #line 1135 "pyscanner.l" { // dictionary current->type = "dictionary"; current->initializer+=*yytext; g_atomStart='{'; g_atomEnd='}'; g_atomCount=1; BEGIN( VariableAtom ); } YY_BREAK case 103: YY_RULE_SETUP #line 1143 "pyscanner.l" { // comment BEGIN( VariableEnd ); } YY_BREAK case 104: YY_RULE_SETUP #line 1146 "pyscanner.l" { current->initializer+=yytext; } YY_BREAK case 105: YY_RULE_SETUP #line 1149 "pyscanner.l" { current->initializer+=*yytext; } YY_BREAK case 106: YY_RULE_SETUP #line 1152 "pyscanner.l" { unput('\n'); BEGIN( VariableEnd ); } YY_BREAK case 107: YY_RULE_SETUP #line 1159 "pyscanner.l" { current->initializer+=*yytext; if (g_atomStart==*yytext) { g_atomCount++; } } YY_BREAK case 108: YY_RULE_SETUP #line 1166 "pyscanner.l" { current->initializer+=*yytext; if (g_atomEnd==*yytext) { g_atomCount--; } if (g_atomCount==0) { BEGIN(VariableEnd); } } YY_BREAK case 109: YY_RULE_SETUP #line 1177 "pyscanner.l" { g_stringContext=YY_START; current->initializer+="\""; g_copyString=¤t->initializer; BEGIN( DoubleQuoteString ); } YY_BREAK case 110: YY_RULE_SETUP #line 1183 "pyscanner.l" { current->initializer+=yytext; } YY_BREAK case 111: YY_RULE_SETUP #line 1186 "pyscanner.l" { current->initializer+=*yytext; } YY_BREAK case 112: YY_RULE_SETUP #line 1189 "pyscanner.l" { current->initializer+=*yytext; yyLineNr++; } YY_BREAK case 113: YY_RULE_SETUP #line 1197 "pyscanner.l" { yyLineNr++; newVariable(); BEGIN(Search); } YY_BREAK case 114: YY_RULE_SETUP #line 1202 "pyscanner.l" { unput(*yytext); newVariable(); BEGIN(Search); } YY_BREAK case YY_STATE_EOF(VariableEnd): #line 1207 "pyscanner.l" { yyterminate(); newEntry(); } YY_BREAK case 115: #line 1214 "pyscanner.l" case 116: YY_RULE_SETUP #line 1214 "pyscanner.l" { // printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock); if (g_doubleQuote==(yytext[0]=='"')) { if (g_specialBlock) { QCString actualDoc=docBlock; if (!docBlockSpecial) // legacy unformatted docstring { actualDoc.prepend("\\verbatim "); actualDoc.append("\\endverbatim "); } //if (g_expectModuleDocs) //{ // actualDoc.prepend("\\namespace "+g_moduleScope+"\\_linebr "); //} //printf("-------> current=%p bodyEntry=%p\n",current,bodyEntry); handleCommentBlock(actualDoc, FALSE); } //g_expectModuleDocs=FALSE; if ((docBlockContext==ClassBody && !g_hideClassDocs) || docBlockContext==FunctionBody) { current->program+=docBlock; current->program+=yytext; } if (g_hideClassDocs) current->startLine = yyLineNr; g_hideClassDocs=FALSE; BEGIN(docBlockContext); } else { docBlock += yytext; } } YY_BREAK case 117: YY_RULE_SETUP #line 1252 "pyscanner.l" { // leading whitespace int indent = computeIndent(yytext); if (indent>=g_curIndent) { // strip g_curIndent amount of whitespace int i; for (i=0;i({NONEMPTY}|{EXPCHAR}|{BB}) { // This should go one character at a time. // printf("[pyscanner] '%s' [ state %d ] [line %d] no match\n", // yytext, YY_START, yyLineNr); } */ case 143: YY_RULE_SETUP #line 1386 "pyscanner.l" { //printf("[pyscanner] %d NEWLINE [line %d] no match\n", // YY_START, yyLineNr); lineCount(); } YY_BREAK case 144: YY_RULE_SETUP #line 1393 "pyscanner.l" { //printf("[pyscanner] '%s' [ state %d ] [line %d] no match\n", // yytext, YY_START, yyLineNr); } YY_BREAK case 145: YY_RULE_SETUP #line 1400 "pyscanner.l" ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(Search): case YY_STATE_EOF(SearchMemVars): case YY_STATE_EOF(TryClassDocString): case YY_STATE_EOF(TripleComment): case YY_STATE_EOF(SpecialComment): case YY_STATE_EOF(FunctionDec): case YY_STATE_EOF(FunctionParams): case YY_STATE_EOF(FunctionParamDefVal): case YY_STATE_EOF(ClassDec): case YY_STATE_EOF(ClassInheritance): case YY_STATE_EOF(ClassCaptureIndent): case YY_STATE_EOF(VariableDec): case YY_STATE_EOF(VariableAtom): case YY_STATE_EOF(SingleQuoteString): case YY_STATE_EOF(DoubleQuoteString): case YY_STATE_EOF(TripleString): case YY_STATE_EOF(FromMod): case YY_STATE_EOF(FromModItem): case YY_STATE_EOF(Import): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_c_buf_p; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer() { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr; register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf, b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); yy_current_buffer->yy_n_chars = yy_n_chars; } if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state() { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; yy_current_state += YY_AT_BOL(); yy_state_ptr = yy_state_buf; *yy_state_ptr++ = yy_current_state; for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 433 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yy_state_ptr++ = yy_current_state; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { register int yy_is_jam; register YY_CHAR yy_c = 1; while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 433 ) 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 == 432); if ( ! yy_is_jam ) *yy_state_ptr++ = yy_current_state; return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; register char *yy_bp; #endif { register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_n_chars + 2; register char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); yy_current_buffer->yy_n_chars = yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; 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 1400 "pyscanner.l" //---------------------------------------------------------------------------- static void parseCompounds(Entry *rt) { //printf("parseCompounds(%s)\n",rt->name.data()); EntryListIterator eli(*rt->children()); Entry *ce; for (;(ce=eli.current());++eli) { if (!ce->program.isEmpty()) { //printf("-- %s ---------\n%s\n---------------\n", // ce->name.data(),ce->program.data()); // init scanner state inputString = ce->program; inputPosition = 0; pyscanYYrestart( pyscanYYin ) ; if (ce->section&Entry::COMPOUND_MASK) { current_root = ce ; BEGIN( Search ); } else if (ce->parent()) { current_root = ce->parent(); //printf("Searching for member variables in %s parent=%s\n", // ce->name.data(),ce->parent->name.data()); BEGIN( SearchMemVars ); } yyFileName = ce->fileName; yyLineNr = ce->startLine ; if (current) delete current; current = new Entry; groupEnterCompound(yyFileName,yyLineNr,ce->name); pyscanYYlex() ; g_lexInit=TRUE; delete current; current=0; ce->program.resize(0); groupLeaveCompound(yyFileName,yyLineNr,ce->name); } parseCompounds(ce); } } //---------------------------------------------------------------------------- static void parseMain(const char *fileName,const char *fileBuf,Entry *rt) { initParser(); inputString = fileBuf; inputPosition = 0; protection = Public; mtype = Method; gstat = FALSE; virt = Normal; current_root = rt; //g_expectModuleDocs = TRUE; g_specialBlock = FALSE; //g_insideConstructor = FALSE; inputFile.setName(fileName); if (inputFile.open(IO_ReadOnly)) { yyLineNr= 1 ; yyFileName = fileName; //setContext(); msg("Parsing file %s...\n",yyFileName.data()); QFileInfo fi(fileName); g_moduleScope = findPackageScope(fileName); QString baseName=fi.baseName(); if (baseName!="__init__") // package initializer file is not a package itself { if (!g_moduleScope.isEmpty()) { g_moduleScope+="::"; } g_moduleScope+=baseName; } current = new Entry; current->name = g_moduleScope; current->section = Entry::NAMESPACE_SEC; current->type = "namespace"; current->fileName = yyFileName; current->startLine = yyLineNr; current->bodyLine = yyLineNr; rt->addSubEntry(current); current_root = current ; initParser(); current = new Entry; groupEnterFile(yyFileName,yyLineNr); current->reset(); pyscanYYrestart( pyscanYYin ); BEGIN( Search ); pyscanYYlex(); g_lexInit=TRUE; groupLeaveFile(yyFileName,yyLineNr); current_root->program.resize(0); delete current; current=0; parseCompounds(current_root); inputFile.close(); } } //---------------------------------------------------------------------------- static void parsePrototype(const QCString &text) { //printf("**** parsePrototype(%s) begin\n",text.data()); if (text.isEmpty()) { warn(yyFileName,yyLineNr,"Empty prototype found!"); return; } //g_expectModuleDocs = FALSE; g_specialBlock = FALSE; //g_insideConstructor = FALSE; const char *orgInputString; int orgInputPosition; YY_BUFFER_STATE orgState; // save scanner state orgState = YY_CURRENT_BUFFER; yy_switch_to_buffer(yy_create_buffer(pyscanYYin, YY_BUF_SIZE)); orgInputString = inputString; orgInputPosition = inputPosition; // set new string inputString = text; inputPosition = 0; pyscanYYrestart( pyscanYYin ); BEGIN( FunctionDec ); pyscanYYlex(); g_lexInit=TRUE; current->name = current->name.stripWhiteSpace(); if (current->section == Entry::MEMBERDOC_SEC && current->args.isEmpty()) current->section = Entry::VARIABLEDOC_SEC; // restore original scanner state YY_BUFFER_STATE tmpBuf = YY_CURRENT_BUFFER; yy_switch_to_buffer(orgState); yy_delete_buffer(tmpBuf); inputString = orgInputString; inputPosition = orgInputPosition; //printf("**** parsePrototype end\n"); } void pyscanFreeScanner() { #if defined(YY_FLEX_SUBMINOR_VERSION) if (g_lexInit) { pyscanYYlex_destroy(); } #endif } //---------------------------------------------------------------------------- void PythonLanguageScanner::parseInput(const char *fileName,const char *fileBuf,Entry *root) { g_thisParser = this; ::parseMain(fileName,fileBuf,root); // May print the AST for debugging purposes // printAST(global_root); } bool PythonLanguageScanner::needsPreprocessing(const QCString &) { return FALSE; } void PythonLanguageScanner::parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, bool isExampleBlock, const char *exampleName, FileDef *fileDef, int startLine, int endLine, bool inlineFragment, MemberDef *memberDef ) { ::parsePythonCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName, fileDef,startLine,endLine,inlineFragment,memberDef); } void PythonLanguageScanner::parsePrototype(const char *text) { ::parsePrototype(text); } void PythonLanguageScanner::resetCodeParserState() { ::resetPythonCodeParserState(); } //---------------------------------------------------------------------------- #if !defined(YY_FLEX_SUBMINOR_VERSION) //---------------------------------------------------------------------------- extern "C" { // some bogus code to keep the compiler happy void pyscannerYYdummy() { yy_flex_realloc(0,0); } } #endif