#line 3 "" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer pyscannerYY_create_buffer #define yy_delete_buffer pyscannerYY_delete_buffer #define yy_flex_debug pyscannerYY_flex_debug #define yy_init_buffer pyscannerYY_init_buffer #define yy_flush_buffer pyscannerYY_flush_buffer #define yy_load_buffer_state pyscannerYY_load_buffer_state #define yy_switch_to_buffer pyscannerYY_switch_to_buffer #define yyin pyscannerYYin #define yyleng pyscannerYYleng #define yylex pyscannerYYlex #define yylineno pyscannerYYlineno #define yyout pyscannerYYout #define yyrestart pyscannerYYrestart #define yytext pyscannerYYtext #define yywrap pyscannerYYwrap #define yyalloc pyscannerYYalloc #define yyrealloc pyscannerYYrealloc #define yyfree pyscannerYYfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 37 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #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 pyscannerYYrestart(pyscannerYYin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #define YY_BUF_SIZE 262144 #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif extern yy_size_t pyscannerYYleng; extern FILE *pyscannerYYin, *pyscannerYYout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up pyscannerYYtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE 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. */ yy_size_t 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; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* 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 pyscannerYYrestart()), so that the user can continue scanning by * just pointing pyscannerYYin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* 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". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when pyscannerYYtext is formed. */ static char yy_hold_char; static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ yy_size_t pyscannerYYleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow pyscannerYYwrap()'s to do buffer switches * instead of setting up a fresh pyscannerYYin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void pyscannerYYrestart (FILE *input_file ); void pyscannerYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE pyscannerYY_create_buffer (FILE *file,int size ); void pyscannerYY_delete_buffer (YY_BUFFER_STATE b ); void pyscannerYY_flush_buffer (YY_BUFFER_STATE b ); void pyscannerYYpush_buffer_state (YY_BUFFER_STATE new_buffer ); void pyscannerYYpop_buffer_state (void ); static void pyscannerYYensure_buffer_stack (void ); static void pyscannerYY_load_buffer_state (void ); static void pyscannerYY_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER pyscannerYY_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE pyscannerYY_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE pyscannerYY_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE pyscannerYY_scan_bytes (yyconst char *bytes,yy_size_t len ); void *pyscannerYYalloc (yy_size_t ); void *pyscannerYYrealloc (void *,yy_size_t ); void pyscannerYYfree (void * ); #define yy_new_buffer pyscannerYY_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ pyscannerYYensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ pyscannerYY_create_buffer(pyscannerYYin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ pyscannerYYensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ pyscannerYY_create_buffer(pyscannerYYin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define pyscannerYYwrap() 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *pyscannerYYin = (FILE *) 0, *pyscannerYYout = (FILE *) 0; typedef int yy_state_type; extern int pyscannerYYlineno; int pyscannerYYlineno = 1; extern char *pyscannerYYtext; #define yytext_ptr pyscannerYYtext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up pyscannerYYtext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ pyscannerYYleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 152 #define YY_END_OF_BUFFER 153 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_acclist[760] = { 0, 16482,16482, 100, 100, 25, 25, 31, 31, 36, 36, 153, 151, 152, 150, 152, 21, 151, 152, 17, 150, 152, 12, 21, 151, 152, 21, 151, 152, 11, 21, 151, 152, 21, 151, 152, 15, 21, 151, 152, 15, 21, 151, 152, 15, 21, 151, 152, 15, 21, 151, 152, 15, 21, 151, 152, 16, 21, 151, 152, 15, 21, 151, 152,16393,16394, 15, 21, 151, 152,16393, 16394, 15, 21, 151, 152,16393,16394, 15, 21, 151, 152,16393,16394, 15, 21, 151, 152,16393,16394, 47, 48, 151, 152, 45, 150, 152, 44, 48, 151, 152, 48, 151, 152, 43, 48, 151, 152, 48, 151, 152, 46, 48, 151, 152, 46, 48, 151, 152, 46, 47, 48, 151, 152, 125, 127, 151, 152, 127, 151, 152, 126, 150, 152, 127, 151, 152, 127, 151, 152, 124, 127, 151, 152, 130, 132, 151, 152, 131, 150, 152, 132, 151, 152, 130, 132, 151, 152, 128, 132, 151, 152, 151, 152, 65, 151, 152, 64, 151, 152, 63, 151, 152, 72, 151, 152, 66, 151, 152, 72, 151, 152, 69, 151, 152, 66, 72, 151, 152, 70, 151, 152, 68, 72, 151, 152, 67, 72, 151, 152, 55, 59, 151, 152, 59, 151, 152, 58, 150, 152,16433, 54, 59, 151, 152, 57, 59, 151, 152, 53, 59, 151, 152, 52, 59, 151, 152, 57, 59, 151, 152, 76, 151, 152, 77, 150, 152, 73, 76, 151, 152, 75, 76, 151, 152, 74, 76, 151, 152, 90, 151, 152, 91, 151, 152, 91, 151, 152, 92, 151, 152, 93, 151, 152, 151, 152, 94, 150, 152, 8290, 151, 152, 151, 152, 151, 152, 97, 151, 152, 84, 87, 151, 152, 87, 151, 152, 85, 150, 152, 83, 87, 151, 152, 87, 151, 152, 82, 87, 151, 152, 81, 87, 151, 152, 112, 151, 152, 100, 112, 151, 152, 113, 150, 152, 104, 112, 151, 152, 110, 112, 151, 152, 103, 112, 151, 152, 107, 112, 151, 152, 101, 112, 151, 152, 101, 112, 151, 152, 99, 112, 151, 152, 111, 112, 151, 152, 111, 112, 151, 152, 111, 112, 151, 152, 108, 112, 151, 152, 111, 112, 151, 152, 109, 112, 151, 152, 121, 151, 152, 120, 150, 152, 118, 151, 152, 119, 150, 152, 116, 118, 151, 152, 114, 118, 151, 152, 115, 118, 151, 152, 117, 118, 151, 152, 137, 138, 151, 152, 138, 151, 152, 136, 138, 151, 152, 138, 151, 152, 143, 144, 151, 152, 142, 144, 151, 152, 144, 151, 152, 144, 151, 152, 147, 149, 151, 152, 147, 148, 150, 152, 147, 149, 151, 152, 147, 149, 151, 152, 149, 151, 152, 26, 151, 152, 25, 26, 151, 152, 24, 150, 152, 22, 26, 151, 152, 22, 26, 151, 152, 33, 151, 152, 31, 33, 151, 152, 30, 150, 152, 27, 33, 151, 152, 32, 33, 151, 152, 29, 33, 151, 152, 16412, 37, 151, 152, 36, 37, 151, 152, 35, 150, 152, 34, 37, 151, 152, 17, 14, 15, 15, 15, 15, 15, 16,16393,16394,16393,16394,16393,16394,16393, 16394,16393,16394, 15,16393,16394, 15,16393,16394, 15, 16393,16394, 15,16393,16394, 15,16393,16394, 47, 42, 46, 46, 46, 47, 125, 124, 130, 129, 130, 128, 128, 65, 64, 63, 66, 71, 70, 67, 55,16433, 57, 57, 52, 51, 56, 57, 90, 91, 93, 94, 97, 84, 86, 81, 80, 100, 110, 101, 101, 101, 111, 104, 103, 111, 117, 137, 134, 134, 133, 143, 140, 140, 139, 147, 147, 147, 25, 22, 22, 31, 8220, 29,16412, 36, 34, 18, 14, 20, 19, 15, 15, 15, 15,16393,16394,16393,16394,16393,16394,16393, 16394,16393,16394, 8202, 8202, 8202, 15,16393,16394, 15, 16393,16394, 15,16393,16394, 15,16393,16394, 39, 42, 41, 40, 46, 122, 123, 71, 50, 8241, 60, 57, 62, 62, 61, 56, 57, 93, 95, 96, 78, 88, 86, 89, 105, 106, 102, 101, 101, 135, 141, 145, 146, 22, 22, 8220, 34, 18, 19, 15, 2, 15, 15,16393,16394,16393,16394,16393,16394,16393,16394, 15, 16393,16394, 1, 2, 15,16393,16394, 15,16393,16394, 39, 40, 46, 122, 123, 60, 61, 93, 95, 96, 79, 88, 89, 105, 106, 102, 101, 145, 146, 22, 22, 34, 15, 6, 15,16393,16394, 1,16393,16394, 16393,16394, 15,16393,16394, 5, 6, 15,16393,16394, 102, 22, 4, 15,16393,16394, 5,16393,16394, 3, 4, 15,16393,16394,16422, 22, 23, 8, 3,16393, 16394, 7, 8,16422, 8230, 23, 7, 8201, 13 } ; static yyconst flex_int16_t yy_accept[454] = { 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, 26, 29, 33, 36, 40, 44, 48, 52, 56, 60, 66, 72, 78, 84, 90, 94, 97, 101, 104, 108, 111, 115, 119, 124, 128, 131, 134, 137, 140, 144, 148, 151, 154, 158, 162, 164, 167, 170, 173, 176, 179, 182, 185, 189, 192, 196, 200, 204, 207, 211, 215, 219, 223, 227, 231, 234, 237, 241, 245, 249, 252, 255, 258, 261, 264, 266, 269, 272, 274, 276, 279, 283, 286, 289, 293, 296, 300, 304, 307, 311, 314, 318, 322, 326, 330, 334, 338, 342, 346, 350, 354, 358, 362, 366, 369, 372, 375, 378, 382, 386, 390, 394, 398, 401, 405, 408, 412, 416, 419, 422, 426, 430, 434, 438, 441, 444, 448, 451, 455, 459, 462, 466, 469, 473, 477, 482, 485, 489, 492, 496, 497, 497, 498, 498, 498, 498, 499, 500, 501, 502, 503, 504, 506, 508, 510, 512, 514, 514, 517, 517, 520, 523, 526, 529, 530, 530, 531, 531, 531, 532, 533, 535, 536, 536, 536, 537, 538, 538, 539, 540, 541, 542, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 551, 551, 551, 552, 553, 553, 554, 555, 557, 558, 559, 559, 560, 560, 561, 561, 561, 562, 563, 563, 563, 563, 564, 564, 565, 566, 567, 567, 568, 568, 568, 569, 570, 571, 571, 572, 573, 574, 575, 576, 577, 577, 578, 579, 580, 581, 581, 582, 583, 584, 585, 585, 586, 587, 588, 588, 588, 589, 590, 591, 591, 592, 594, 595, 595, 595, 596, 597, 598, 599, 600, 600, 601, 602, 603, 604, 606, 608, 610, 612, 614, 615, 616, 617, 620, 623, 626, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 639, 640, 642, 643, 644, 646, 647, 648, 649, 649, 650, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 659, 660, 660, 661, 662, 662, 663, 664, 665, 665, 666, 667, 668, 668, 669, 670, 671, 672, 674, 676, 678, 680, 680, 680, 680, 683, 685, 688, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 706, 707, 708, 709, 710, 711, 712, 713, 713, 714, 715, 716, 718, 719, 721, 723, 723, 726, 728, 731, 731, 731, 732, 733, 733, 734, 735, 737, 738, 740, 740, 742, 745, 746, 748, 748, 749, 750, 752, 752, 754, 754, 755, 756, 757, 757, 758, 758, 758, 758, 758, 759, 759, 759, 760, 760 } ; static yyconst flex_int32_t 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, 20, 21, 21, 21, 21, 22, 21, 23, 23, 23, 24, 23, 25, 23, 23, 23, 23, 23, 26, 23, 23, 27, 23, 23, 28, 23, 23, 29, 30, 31, 1, 32, 7, 33, 21, 34, 35, 36, 37, 23, 38, 39, 24, 23, 40, 41, 23, 42, 43, 23, 44, 45, 46, 47, 23, 23, 28, 48, 23, 49, 7, 31, 7, 1, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50 } ; static yyconst flex_int32_t yy_meta[51] = { 0, 1, 2, 3, 1, 4, 5, 1, 4, 1, 1, 1, 1, 6, 7, 8, 8, 8, 1, 9, 1, 10, 10, 11, 11, 11, 11, 11, 11, 1, 12, 1, 11, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 13 } ; static yyconst flex_int16_t yy_base[531] = { 0, 1585, 1580, 0, 50, 100, 0, 1579, 1578, 149, 153, 156, 161, 167, 0, 217, 0, 266, 273, 279, 281, 294, 0, 344, 0, 394, 402, 410, 418, 426, 0, 1577, 1576, 476, 0, 524, 525, 531, 532, 538, 539, 569, 0, 619, 0, 669, 0, 1569, 1928, 1928, 1928, 1551, 1545, 1541, 1536, 1498, 0, 1502, 1505, 1494, 1494, 718, 398, 719, 529, 720, 721, 0, 1928, 1528, 1525, 1522, 1928, 0, 1493, 764, 0, 1928, 1928, 1521, 1515, 1518, 0, 271, 1928, 543, 1513, 548, 1928, 1928, 0, 1928, 1516, 0, 1928, 1928, 1515, 1928, 0, 0, 1928, 550, 1501, 1482, 1472, 163, 1473, 1928, 1928, 1928, 1928, 1928, 0, 1460, 1928, 1928, 1440, 283, 1928, 1928, 1448, 1441, 406, 0, 1928, 1440, 1438, 0, 1432, 556, 1928, 1426, 1928, 1412, 0, 1407, 1928, 801, 710, 1928, 0, 393, 723, 1928, 725, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 0, 0, 1406, 1928, 561, 0, 1928, 1400, 734, 1377, 1376, 1400, 1387, 738, 1928, 1392, 1928, 730, 746, 1928, 1391, 1928, 1928, 1928, 743, 1928, 1390, 1928, 740, 1386, 1381, 0, 0, 1374, 1333, 0, 1334, 1317, 1308, 1304, 768, 759, 770, 802, 789, 790, 804, 809, 745, 817, 818, 820, 825, 0, 1341, 0, 0, 1337, 0, 1304, 0, 0, 1337, 1333, 1331, 0, 784, 1928, 794, 1325, 1324, 833, 1928, 1928, 0, 1327, 0, 1326, 0, 0, 795, 1319, 1320, 1307, 0, 837, 1302, 796, 1928, 0, 0, 1304, 0, 1289, 843, 1928, 1288, 1283, 845, 0, 1273, 1276, 1272, 0, 1266, 850, 1928, 1269, 1254, 0, 1246, 841, 849, 855, 1928, 0, 0, 1928, 1928, 870, 0, 0, 1248, 1928, 857, 1928, 0, 1242, 1928, 874, 1928, 1218, 878, 1242, 1238, 1240, 810, 1235, 847, 880, 1234, 883, 1233, 885, 1232, 886, 1231, 888, 1226, 0, 1928, 1223, 1193, 1180, 1222, 1182, 1180, 865, 889, 890, 891, 895, 1928, 897, 1177, 899, 901, 902, 905, 1214, 0, 1928, 1211, 1166, 1052, 1051, 0, 1928, 1052, 1051, 1048, 0, 1928, 1047, 0, 1036, 1045, 1044, 0, 1045, 1044, 1041, 0, 1039, 1029, 1027, 913, 1928, 513, 1928, 903, 1928, 909, 1025, 1023, 1009, 911, 917, 993, 990, 932, 1928, 1928, 944, 942, 984, 959, 911, 913, 934, 937, 943, 914, 897, 884, 946, 948, 949, 950, 1928, 1928, 903, 1928, 1928, 1928, 1928, 840, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 958, 1928, 1928, 1928, 1928, 940, 958, 962, 795, 830, 828, 739, 961, 964, 969, 977, 720, 979, 980, 982, 0, 988, 992, 998, 724, 727, 565, 991, 995, 1011, 524, 1013, 1015, 1016, 975, 510, 423, 1017, 1018, 375, 1020, 1021, 1022, 1928, 1024, 375, 1023, 360, 247, 235, 232, 1928, 118, 118, 1928, 1928, 1057, 1070, 1083, 1096, 1109, 1122, 1135, 1148, 1161, 1174, 1187, 1200, 1206, 1218, 1230, 1243, 1256, 1262, 1275, 1288, 1294, 1307, 1313, 1326, 1338, 1351, 1364, 1370, 1377, 1390, 1399, 1412, 1425, 1431, 1437, 1450, 1463, 1476, 1489, 1502, 1514, 1526, 1538, 1551, 1564, 1576, 1589, 1602, 1615, 1628, 1640, 1653, 1666, 1672, 1676, 1683, 1696, 1708, 1721, 1734, 1740, 1743, 1749, 1762, 1775, 1787, 1799, 1811, 1823, 1835, 1848, 1854, 1861, 1874, 1886, 1898, 1902, 1914 } ; static yyconst flex_int16_t yy_def[531] = { 0, 453, 453, 452, 452, 452, 5, 453, 453, 454, 454, 455, 455, 452, 13, 452, 15, 456, 456, 457, 457, 452, 21, 452, 23, 458, 458, 459, 459, 452, 29, 460, 460, 452, 33, 461, 461, 462, 462, 463, 463, 452, 41, 452, 43, 452, 45, 452, 452, 452, 452, 452, 452, 464, 452, 452, 465, 465, 465, 465, 465, 466, 467, 467, 467, 467, 467, 468, 452, 452, 469, 452, 452, 470, 470, 470, 471, 452, 452, 452, 452, 452, 472, 452, 452, 472, 452, 452, 452, 452, 473, 452, 452, 474, 452, 452, 452, 452, 475, 476, 452, 477, 452, 478, 452, 452, 479, 452, 452, 452, 452, 452, 480, 452, 452, 452, 481, 452, 452, 452, 452, 452, 452, 482, 452, 483, 452, 484, 452, 452, 452, 452, 452, 452, 485, 452, 452, 452, 452, 452, 486, 486, 486, 452, 486, 452, 452, 452, 452, 452, 452, 452, 452, 487, 488, 452, 452, 489, 490, 452, 452, 491, 492, 492, 452, 452, 492, 452, 452, 452, 493, 493, 452, 452, 452, 452, 452, 494, 452, 452, 452, 495, 452, 452, 496, 497, 452, 452, 465, 465, 465, 465, 465, 466, 498, 498, 498, 498, 498, 452, 467, 499, 467, 467, 467, 467, 468, 452, 500, 501, 452, 470, 470, 75, 471, 452, 452, 452, 472, 452, 452, 472, 452, 452, 452, 452, 452, 473, 452, 502, 452, 475, 476, 477, 452, 503, 452, 478, 504, 452, 452, 452, 505, 506, 452, 507, 508, 452, 452, 452, 452, 452, 509, 452, 510, 452, 511, 452, 452, 452, 452, 452, 512, 452, 452, 452, 452, 452, 513, 514, 452, 452, 514, 515, 516, 452, 452, 452, 452, 517, 452, 452, 452, 452, 492, 492, 452, 452, 452, 452, 518, 519, 519, 452, 452, 452, 520, 452, 452, 521, 522, 452, 523, 452, 452, 452, 524, 524, 524, 524, 498, 498, 498, 498, 498, 452, 452, 452, 467, 467, 467, 467, 452, 500, 452, 452, 470, 452, 452, 502, 452, 452, 503, 452, 478, 452, 452, 505, 525, 452, 452, 526, 452, 510, 452, 511, 452, 452, 452, 452, 452, 513, 452, 452, 452, 452, 452, 452, 518, 527, 519, 452, 521, 528, 452, 452, 452, 524, 452, 524, 524, 498, 498, 498, 498, 452, 452, 452, 467, 452, 467, 467, 452, 452, 470, 452, 452, 452, 452, 525, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 527, 519, 528, 452, 524, 452, 524, 498, 452, 498, 498, 452, 467, 452, 467, 529, 452, 452, 519, 452, 452, 524, 498, 452, 498, 452, 452, 467, 530, 519, 452, 452, 452, 498, 452, 452, 452, 530, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 0, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452 } ; static yyconst flex_int16_t yy_nxt[1979] = { 0, 50, 50, 51, 50, 52, 53, 50, 54, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 55, 56, 56, 56, 56, 56, 56, 56, 56, 50, 50, 50, 56, 56, 57, 58, 56, 59, 56, 60, 56, 56, 56, 56, 56, 56, 56, 56, 56, 50, 56, 50, 61, 51, 50, 52, 53, 50, 54, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 55, 62, 62, 62, 62, 62, 62, 62, 62, 50, 50, 50, 62, 62, 63, 64, 62, 65, 62, 66, 62, 62, 62, 62, 62, 62, 62, 62, 62, 50, 62, 67, 67, 68, 67, 69, 70, 67, 71, 67, 67, 67, 67, 67, 72, 67, 67, 67, 67, 67, 67, 73, 73, 73, 73, 73, 73, 73, 73, 67, 67, 67, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 74, 73, 73, 73, 67, 75, 77, 78, 451, 79, 81, 78, 80, 79, 83, 450, 80, 84, 85, 83, 240, 241, 86, 48, 87, 49, 48, 48, 48, 48, 48, 88, 48, 48, 48, 48, 48, 48, 48, 48, 89, 48, 48, 90, 90, 90, 90, 90, 90, 90, 90, 48, 48, 48, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 48, 90, 91, 92, 49, 91, 91, 93, 91, 91, 48, 94, 91, 91, 95, 91, 91, 91, 91, 96, 97, 91, 98, 98, 98, 98, 98, 98, 98, 98, 91, 91, 91, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 91, 98, 100, 101, 449, 102, 103, 219, 104, 105, 101, 220, 102, 106, 100, 104, 108, 448, 108, 247, 248, 100, 109, 110, 109, 110, 111, 447, 111, 48, 48, 49, 48, 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, 112, 112, 48, 112, 48, 113, 49, 48, 48, 48, 48, 48, 114, 114, 48, 48, 114, 48, 48, 48, 48, 115, 48, 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, 116, 116, 48, 116, 48, 117, 118, 270, 120, 199, 271, 121, 48, 122, 118, 446, 120, 251, 248, 121, 445, 124, 125, 48, 126, 127, 201, 128, 444, 129, 125, 48, 126, 127, 433, 128, 130, 131, 132, 130, 133, 134, 130, 135, 136, 130, 130, 130, 130, 130, 137, 138, 138, 130, 139, 130, 140, 140, 140, 140, 140, 141, 142, 140, 143, 130, 130, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 141, 140, 140, 144, 140, 145, 140, 148, 148, 149, 148, 150, 148, 148, 148, 151, 152, 148, 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, 153, 153, 151, 153, 49, 49, 155, 155, 199, 156, 156, 49, 49, 159, 159, 399, 160, 160, 163, 163, 164, 164, 221, 165, 165, 201, 222, 224, 442, 233, 399, 157, 157, 234, 225, 258, 259, 436, 161, 161, 277, 278, 203, 226, 433, 166, 166, 167, 168, 169, 167, 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, 170, 171, 170, 170, 170, 170, 170, 170, 170, 170, 170, 167, 170, 172, 173, 174, 172, 172, 172, 172, 172, 172, 172, 175, 172, 176, 172, 172, 172, 172, 172, 172, 172, 177, 177, 177, 177, 177, 177, 177, 177, 172, 172, 172, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 172, 177, 178, 179, 180, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 181, 181, 181, 181, 181, 181, 181, 181, 178, 178, 178, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 181, 178, 181, 193, 199, 199, 199, 264, 266, 266, 266, 270, 422, 270, 271, 289, 271, 267, 267, 282, 283, 201, 201, 201, 452, 298, 284, 290, 294, 284, 316, 289, 272, 267, 272, 195, 196, 299, 197, 295, 198, 432, 202, 290, 199, 205, 427, 204, 206, 206, 272, 206, 272, 193, 206, 199, 206, 206, 206, 206, 206, 201, 213, 213, 213, 206, 206, 206, 423, 219, 292, 317, 201, 220, 199, 199, 206, 206, 206, 221, 233, 240, 241, 222, 234, 195, 196, 199, 197, 199, 198, 201, 201, 311, 199, 289, 206, 213, 264, 265, 265, 266, 199, 199, 201, 199, 201, 290, 267, 267, 199, 201, 268, 407, 314, 422, 313, 421, 224, 201, 201, 312, 201, 335, 267, 225, 237, 201, 247, 248, 251, 248, 289, 318, 226, 258, 259, 245, 319, 349, 349, 349, 353, 278, 290, 320, 264, 265, 265, 266, 199, 321, 264, 266, 266, 266, 267, 350, 270, 355, 283, 271, 267, 267, 452, 289, 284, 201, 294, 284, 294, 298, 350, 298, 199, 199, 199, 290, 267, 295, 199, 295, 375, 299, 199, 299, 379, 199, 353, 278, 199, 201, 201, 201, 355, 283, 289, 201, 199, 375, 417, 201, 289, 201, 201, 371, 360, 201, 290, 413, 372, 349, 349, 349, 290, 201, 373, 298, 397, 410, 398, 374, 199, 376, 377, 289, 380, 378, 199, 299, 381, 199, 397, 379, 415, 199, 201, 290, 408, 201, 376, 409, 403, 289, 407, 201, 199, 298, 201, 410, 201, 201, 201, 418, 425, 290, 419, 419, 419, 299, 441, 411, 199, 201, 428, 415, 201, 199, 412, 368, 406, 201, 290, 405, 414, 362, 434, 416, 361, 201, 425, 201, 201, 289, 201, 420, 419, 419, 419, 424, 419, 419, 419, 201, 358, 290, 199, 201, 428, 398, 437, 438, 434, 443, 426, 437, 438, 438, 443, 441, 401, 429, 400, 201, 396, 201, 395, 201, 440, 201, 201, 290, 201, 440, 440, 201, 394, 431, 393, 342, 342, 391, 390, 245, 388, 387, 331, 331, 386, 385, 435, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, 184, 184, 384, 184, 184, 184, 184, 184, 184, 184, 184, 184, 184, 188, 383, 188, 188, 382, 188, 194, 377, 370, 369, 368, 367, 366, 365, 194, 194, 364, 194, 200, 362, 297, 361, 293, 358, 200, 200, 200, 200, 288, 200, 206, 206, 357, 356, 285, 206, 354, 206, 206, 352, 348, 206, 206, 208, 208, 347, 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, 211, 260, 211, 211, 346, 211, 214, 344, 342, 341, 214, 214, 214, 214, 214, 214, 214, 214, 214, 218, 218, 340, 218, 339, 218, 218, 218, 218, 218, 218, 218, 218, 227, 245, 227, 227, 244, 227, 229, 229, 336, 229, 333, 229, 229, 229, 229, 229, 229, 229, 229, 231, 331, 231, 231, 330, 231, 232, 230, 228, 223, 223, 232, 217, 232, 232, 232, 232, 232, 232, 235, 328, 327, 235, 326, 325, 322, 309, 235, 235, 308, 235, 237, 237, 307, 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, 242, 242, 306, 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, 243, 305, 243, 243, 304, 243, 246, 246, 301, 246, 246, 182, 246, 252, 297, 293, 288, 287, 252, 252, 252, 252, 252, 252, 252, 252, 254, 286, 285, 285, 280, 254, 254, 275, 254, 256, 256, 263, 256, 261, 256, 256, 256, 256, 256, 256, 256, 256, 262, 262, 260, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 269, 257, 269, 269, 255, 269, 273, 253, 273, 273, 250, 273, 274, 274, 249, 245, 274, 274, 274, 274, 274, 274, 274, 244, 274, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 276, 279, 279, 238, 239, 279, 279, 279, 279, 279, 279, 279, 238, 279, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 284, 284, 284, 236, 284, 284, 284, 284, 284, 284, 284, 284, 284, 291, 230, 228, 223, 217, 291, 291, 216, 291, 291, 215, 291, 296, 212, 210, 209, 296, 207, 296, 192, 296, 296, 191, 296, 300, 190, 189, 187, 186, 300, 300, 185, 300, 300, 183, 300, 302, 302, 182, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 303, 303, 303, 303, 452, 303, 303, 303, 303, 303, 303, 303, 303, 310, 147, 147, 49, 49, 49, 310, 310, 310, 310, 49, 310, 315, 315, 315, 315, 315, 315, 315, 315, 452, 315, 315, 315, 315, 323, 323, 452, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 324, 324, 324, 324, 452, 324, 324, 324, 324, 324, 324, 324, 324, 329, 329, 452, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 332, 452, 452, 452, 452, 452, 332, 452, 332, 332, 452, 332, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 334, 337, 337, 452, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 243, 452, 243, 243, 452, 243, 338, 338, 452, 338, 246, 246, 452, 246, 246, 452, 246, 252, 452, 452, 452, 452, 252, 252, 252, 252, 252, 252, 252, 252, 343, 452, 452, 452, 452, 452, 343, 452, 343, 343, 452, 343, 345, 345, 452, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 262, 262, 452, 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, 351, 452, 351, 269, 452, 269, 269, 452, 269, 273, 452, 273, 273, 452, 273, 274, 274, 452, 452, 274, 274, 274, 274, 274, 274, 274, 452, 274, 279, 279, 452, 452, 279, 279, 279, 279, 279, 279, 279, 452, 279, 359, 452, 452, 452, 452, 452, 452, 452, 359, 359, 452, 359, 291, 452, 452, 452, 452, 291, 291, 452, 291, 291, 452, 291, 296, 452, 452, 452, 296, 452, 296, 452, 296, 296, 452, 296, 363, 452, 452, 452, 452, 452, 452, 452, 363, 363, 452, 363, 300, 452, 452, 452, 452, 300, 300, 452, 300, 300, 452, 300, 302, 302, 452, 302, 302, 302, 302, 302, 302, 302, 302, 302, 302, 188, 452, 188, 188, 452, 188, 389, 389, 452, 389, 389, 452, 389, 392, 392, 392, 392, 452, 392, 392, 392, 392, 392, 392, 392, 392, 402, 452, 452, 452, 452, 402, 402, 452, 402, 402, 452, 402, 404, 452, 452, 452, 452, 404, 404, 452, 404, 404, 452, 404, 430, 430, 452, 430, 439, 452, 452, 452, 452, 452, 439, 439, 439, 439, 452, 439, 47, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452 } ; static yyconst flex_int16_t yy_chk[1979] = { 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, 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, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 9, 9, 450, 9, 10, 10, 9, 10, 11, 449, 10, 11, 12, 12, 105, 105, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 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, 15, 15, 15, 15, 17, 17, 447, 17, 17, 83, 17, 18, 18, 83, 18, 18, 17, 18, 19, 446, 20, 117, 117, 18, 19, 19, 20, 20, 19, 445, 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, 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, 23, 23, 23, 23, 25, 25, 25, 141, 25, 62, 141, 25, 26, 26, 26, 444, 26, 122, 122, 26, 442, 27, 27, 25, 27, 27, 62, 27, 436, 28, 28, 26, 28, 28, 433, 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, 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, 33, 33, 33, 33, 35, 36, 35, 36, 64, 35, 36, 37, 38, 37, 38, 351, 37, 38, 39, 40, 39, 40, 85, 39, 40, 64, 85, 87, 432, 101, 351, 35, 36, 101, 87, 129, 129, 427, 37, 38, 157, 157, 64, 87, 423, 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, 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, 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, 45, 45, 45, 45, 61, 63, 65, 66, 138, 138, 138, 138, 142, 422, 144, 142, 170, 144, 138, 138, 161, 161, 63, 65, 66, 166, 181, 166, 170, 177, 166, 201, 171, 142, 138, 144, 61, 61, 181, 61, 177, 61, 421, 63, 171, 194, 66, 413, 65, 75, 75, 142, 75, 144, 193, 75, 195, 75, 75, 75, 75, 75, 194, 75, 75, 75, 75, 75, 75, 408, 219, 171, 201, 195, 219, 197, 198, 75, 75, 75, 221, 233, 240, 240, 221, 233, 193, 193, 196, 193, 199, 193, 197, 198, 195, 200, 289, 75, 75, 137, 137, 137, 137, 202, 203, 196, 204, 199, 289, 137, 137, 205, 200, 137, 407, 198, 406, 197, 405, 224, 202, 203, 196, 204, 238, 137, 224, 238, 205, 247, 247, 251, 251, 291, 202, 224, 258, 258, 389, 203, 264, 264, 264, 277, 277, 291, 204, 265, 265, 265, 265, 310, 205, 266, 266, 266, 266, 265, 265, 272, 282, 282, 272, 266, 266, 285, 292, 285, 310, 294, 285, 296, 298, 265, 300, 311, 312, 313, 292, 266, 294, 314, 296, 316, 298, 318, 300, 319, 320, 353, 353, 321, 311, 312, 313, 355, 355, 359, 314, 371, 375, 384, 318, 360, 319, 320, 311, 292, 321, 359, 377, 312, 349, 349, 349, 360, 371, 313, 363, 349, 372, 349, 314, 373, 316, 376, 402, 320, 318, 374, 363, 321, 378, 349, 379, 380, 381, 372, 402, 370, 373, 375, 371, 360, 403, 369, 374, 409, 404, 378, 410, 379, 380, 381, 397, 411, 403, 397, 397, 397, 404, 431, 373, 412, 409, 414, 415, 410, 416, 374, 368, 367, 411, 431, 366, 378, 362, 424, 381, 361, 412, 425, 414, 415, 420, 416, 403, 418, 418, 418, 409, 419, 419, 419, 424, 358, 420, 426, 425, 428, 419, 429, 430, 434, 435, 412, 437, 438, 439, 443, 441, 357, 416, 356, 426, 348, 428, 347, 429, 430, 434, 435, 441, 437, 438, 439, 443, 346, 420, 344, 343, 342, 340, 339, 338, 336, 333, 332, 331, 328, 327, 426, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 464, 464, 326, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 465, 325, 465, 465, 322, 465, 466, 317, 309, 308, 307, 306, 305, 304, 466, 466, 301, 466, 467, 299, 297, 295, 293, 290, 467, 467, 467, 467, 288, 467, 468, 468, 287, 286, 284, 468, 280, 468, 468, 275, 263, 468, 468, 469, 469, 261, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 470, 260, 470, 470, 257, 470, 471, 255, 254, 253, 471, 471, 471, 471, 471, 471, 471, 471, 471, 472, 472, 250, 472, 249, 472, 472, 472, 472, 472, 472, 472, 472, 473, 246, 473, 473, 244, 473, 474, 474, 239, 474, 236, 474, 474, 474, 474, 474, 474, 474, 474, 475, 235, 475, 475, 234, 475, 476, 230, 228, 223, 222, 476, 217, 476, 476, 476, 476, 476, 476, 477, 216, 215, 477, 212, 210, 207, 192, 477, 477, 191, 477, 478, 478, 190, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 479, 479, 189, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 480, 187, 480, 480, 186, 480, 481, 481, 183, 481, 481, 182, 481, 482, 179, 173, 168, 165, 482, 482, 482, 482, 482, 482, 482, 482, 483, 164, 163, 162, 160, 483, 483, 155, 483, 484, 484, 135, 484, 133, 484, 484, 484, 484, 484, 484, 484, 484, 485, 485, 131, 485, 485, 485, 485, 485, 485, 485, 485, 485, 485, 486, 128, 486, 486, 126, 486, 487, 125, 487, 487, 121, 487, 488, 488, 120, 116, 488, 488, 488, 488, 488, 488, 488, 113, 488, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 490, 490, 106, 104, 490, 490, 490, 490, 490, 490, 490, 103, 490, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 492, 492, 492, 102, 492, 492, 492, 492, 492, 492, 492, 492, 492, 493, 96, 92, 86, 81, 493, 493, 80, 493, 493, 79, 493, 494, 74, 71, 70, 494, 69, 494, 60, 494, 494, 59, 494, 495, 58, 57, 55, 54, 495, 495, 53, 495, 495, 52, 495, 496, 496, 51, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 497, 497, 497, 497, 47, 497, 497, 497, 497, 497, 497, 497, 497, 498, 32, 31, 8, 7, 2, 498, 498, 498, 498, 1, 498, 499, 499, 499, 499, 499, 499, 499, 499, 0, 499, 499, 499, 499, 500, 500, 0, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 501, 501, 501, 501, 0, 501, 501, 501, 501, 501, 501, 501, 501, 502, 502, 0, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 503, 0, 0, 0, 0, 0, 503, 0, 503, 503, 0, 503, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 505, 505, 0, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 506, 0, 506, 506, 0, 506, 507, 507, 0, 507, 508, 508, 0, 508, 508, 0, 508, 509, 0, 0, 0, 0, 509, 509, 509, 509, 509, 509, 509, 509, 510, 0, 0, 0, 0, 0, 510, 0, 510, 510, 0, 510, 511, 511, 0, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 512, 512, 0, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 513, 0, 513, 514, 0, 514, 514, 0, 514, 515, 0, 515, 515, 0, 515, 516, 516, 0, 0, 516, 516, 516, 516, 516, 516, 516, 0, 516, 517, 517, 0, 0, 517, 517, 517, 517, 517, 517, 517, 0, 517, 518, 0, 0, 0, 0, 0, 0, 0, 518, 518, 0, 518, 519, 0, 0, 0, 0, 519, 519, 0, 519, 519, 0, 519, 520, 0, 0, 0, 520, 0, 520, 0, 520, 520, 0, 520, 521, 0, 0, 0, 0, 0, 0, 0, 521, 521, 0, 521, 522, 0, 0, 0, 0, 522, 522, 0, 522, 522, 0, 522, 523, 523, 0, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 524, 0, 524, 524, 0, 524, 525, 525, 0, 525, 525, 0, 525, 526, 526, 526, 526, 0, 526, 526, 526, 526, 526, 526, 526, 526, 527, 0, 0, 0, 0, 527, 527, 0, 527, 527, 0, 527, 528, 0, 0, 0, 0, 528, 528, 0, 528, 528, 0, 528, 529, 529, 0, 529, 530, 0, 0, 0, 0, 0, 530, 530, 530, 530, 0, 530, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452 } ; extern int pyscannerYY_flex_debug; int pyscannerYY_flex_debug = 0; static yy_state_type *yy_state_buf=0, *yy_state_ptr=0; 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 pyscannerYYtext */ \ 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 *pyscannerYYtext; #line 1 "pyscanner.l" /****************************************************************************** * * * * Copyright (C) 1997-2013 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 #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" #include "arguments.h" // Toggle for some debugging info //#define DBG_CTX(x) fprintf x #define DBG_CTX(x) do { } while(0) #define YY_NEVER_INTERACTIVE 1 #define YY_NO_INPUT 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 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 bool g_packageCommentAllowed; //----------------------------------------------------------------------------- static void initParser() { protection = Public; mtype = Method; gstat = FALSE; virt = Normal; previous = 0; g_packageCommentAllowed = TRUE; g_packageNameCache.setAutoDelete(TRUE); } static void initEntry() { //current->python = TRUE; current->protection = protection ; current->mtype = mtype; current->virt = virt; current->stat = gstat; current->lang = SrcLangExt_Python; current->setParent(current_root); initGroupInfo(current); gstat = FALSE; } 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::COMPOUND_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() { DBG_CTX((stderr,"yyLineNr=%d\n",yyLineNr)); for (const char *p = pyscannerYYtext; *p; ++p) { yyLineNr += (*p == '\n') ; } } static void incLineNr() { DBG_CTX((stderr,"yyLineNr=%d\n",yyLineNr)); yyLineNr++; } #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; int lineNr = brief ? current->briefLine : current->docLine; while (parseCommentBlock( g_thisParser, (docBlockInBody && previous) ? previous : current, doc, // text yyFileName, // file lineNr, docBlockInBody ? FALSE : brief, docBlockJavaStyle, // javadoc style // or FALSE, docBlockInBody, protection, position, needsEntry) ) // need to start a new entry { if (needsEntry) { newEntry(); } } if (needsEntry) { newEntry(); } } static void endOfDef(int correction=0) { //printf("endOfDef at=%d\n",yyLineNr); if (bodyEntry) { bodyEntry->endBodyLine = yyLineNr-correction; 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 = pyscannerYYtext[3]=='!'; docBlock.resize(0); g_doubleQuote = TRUE; startCommentBlock(FALSE); } static void initTriSingleQuoteBlock() { docBlockContext = YY_START; docBlockInBody = FALSE; docBlockJavaStyle = TRUE; docBlockSpecial = pyscannerYYtext[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); } static void searchFoundDef() { current->fileName = yyFileName; current->startLine = yyLineNr; current->bodyLine = yyLineNr; current->section = Entry::FUNCTION_SEC; current->protection = protection = Public; current->lang = SrcLangExt_Python; current->virt = Normal; current->stat = gstat; current->mtype = mtype = Method; current->type.resize(0); current->name.resize(0); current->args.resize(0); current->argList->clear(); g_packageCommentAllowed = FALSE; gstat=FALSE; //printf("searchFoundDef at=%d\n",yyLineNr); } static void searchFoundClass() { current->section = Entry::CLASS_SEC; current->argList->clear(); current->type += "class" ; current->fileName = yyFileName; current->startLine = yyLineNr; current->bodyLine = yyLineNr; g_packageCommentAllowed = FALSE; } //----------------------------------------------------------------------------- /* ----------------------------------------------------------------- */ #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 */ /* Mid-comment states */ /* %x FuncDoubleComment */ /* %x ClassDoubleComment */ /* Function states */ /* Class states */ /* Variable states */ /* String states */ /* import */ #line 1645 "" #define INITIAL 0 #define Search 1 #define SearchMemVars 2 #define TryClassDocString 3 #define TripleComment 4 #define SpecialComment 5 #define FunctionDec 6 #define FunctionParams 7 #define FunctionBody 8 #define FunctionParamDefVal 9 #define ClassDec 10 #define ClassInheritance 11 #define ClassCaptureIndent 12 #define ClassBody 13 #define VariableDec 14 #define VariableEnd 15 #define VariableAtom 16 #define SingleQuoteString 17 #define DoubleQuoteString 18 #define TripleString 19 #define FromMod 20 #define FromModItem 21 #define Import 22 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int pyscannerYYlex_destroy (void ); int pyscannerYYget_debug (void ); void pyscannerYYset_debug (int debug_flag ); YY_EXTRA_TYPE pyscannerYYget_extra (void ); void pyscannerYYset_extra (YY_EXTRA_TYPE user_defined ); FILE *pyscannerYYget_in (void ); void pyscannerYYset_in (FILE * in_str ); FILE *pyscannerYYget_out (void ); void pyscannerYYset_out (FILE * out_str ); yy_size_t pyscannerYYget_leng (void ); char *pyscannerYYget_text (void ); int pyscannerYYget_lineno (void ); void pyscannerYYset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int pyscannerYYwrap (void ); #else extern int pyscannerYYwrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 262144 #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 do { if (fwrite( pyscannerYYtext, pyscannerYYleng, 1, pyscannerYYout )) {} } while (0) #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_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( pyscannerYYin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( pyscannerYYin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, pyscannerYYin))==0 && ferror(pyscannerYYin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(pyscannerYYin); \ } \ }\ \ #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 /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int pyscannerYYlex (void); #define YY_DECL int pyscannerYYlex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after pyscannerYYtext and pyscannerYYleng * 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 ( pyscannerYYleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (pyscannerYYtext[pyscannerYYleng - 1] == '\n'); \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 537 "pyscanner.l" /* ------------ Function recognition rules -------------- */ #line 1857 "" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif /* Create the reject buffer large enough to save one state per allowed character. */ if ( ! (yy_state_buf) ) (yy_state_buf) = (yy_state_type *)pyscannerYYalloc(YY_STATE_BUF_SIZE ); if ( ! (yy_state_buf) ) YY_FATAL_ERROR( "out of dynamic memory in pyscannerYYlex()" ); if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! pyscannerYYin ) pyscannerYYin = stdin; if ( ! pyscannerYYout ) pyscannerYYout = stdout; if ( ! YY_CURRENT_BUFFER ) { pyscannerYYensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = pyscannerYY_create_buffer(pyscannerYYin,YY_BUF_SIZE ); } pyscannerYY_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of pyscannerYYtext. */ *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 >= 453 ) 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] != 1928 ); 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: YY_RULE_SETUP #line 543 "pyscanner.l" { // start of a function/method definition with indent DBG_CTX((stderr,"Found def at %d\n",yyLineNr)); g_indent=computeIndent(pyscannerYYtext); searchFoundDef(); BEGIN( FunctionDec ); } YY_BREAK case 2: YY_RULE_SETUP #line 549 "pyscanner.l" { // start of a function/method definition searchFoundDef(); BEGIN( FunctionDec ); } YY_BREAK case 3: YY_RULE_SETUP #line 554 "pyscanner.l" { // start of a class definition with indent DBG_CTX((stderr,"Found class at %d\n",yyLineNr)); g_indent=computeIndent(pyscannerYYtext); searchFoundClass(); BEGIN( ClassDec ) ; } YY_BREAK case 4: YY_RULE_SETUP #line 560 "pyscanner.l" { // start of a class definition searchFoundClass(); BEGIN( ClassDec ) ; } YY_BREAK case 5: #line 565 "pyscanner.l" case 6: YY_RULE_SETUP #line 565 "pyscanner.l" { // start of an from import g_packageCommentAllowed = FALSE; BEGIN( FromMod ); } YY_BREAK case 7: #line 571 "pyscanner.l" case 8: YY_RULE_SETUP #line 571 "pyscanner.l" { // start of an import statement g_packageCommentAllowed = FALSE; BEGIN( Import ); } YY_BREAK case 9: YY_RULE_SETUP #line 575 "pyscanner.l" { // property current->section = Entry::VARIABLE_SEC; current->mtype = Property; current->name = QCString(pyscannerYYtext).stripWhiteSpace(); current->fileName = yyFileName; current->startLine = yyLineNr; current->bodyLine = yyLineNr; g_packageCommentAllowed = FALSE; BEGIN(VariableDec); } YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP #line 585 "pyscanner.l" { // variable g_indent=computeIndent(pyscannerYYtext); current->section = Entry::VARIABLE_SEC; current->name = QCString(pyscannerYYtext).stripWhiteSpace(); current->fileName = yyFileName; current->startLine = yyLineNr; current->bodyLine = yyLineNr; g_packageCommentAllowed = FALSE; BEGIN(VariableDec); } YY_BREAK case 11: YY_RULE_SETUP #line 595 "pyscanner.l" { // start of a single quoted string g_stringContext=YY_START; g_copyString=0; g_packageCommentAllowed = FALSE; BEGIN( SingleQuoteString ); } YY_BREAK case 12: YY_RULE_SETUP #line 601 "pyscanner.l" { // start of a double quoted string g_stringContext=YY_START; g_copyString=0; g_packageCommentAllowed = FALSE; BEGIN( DoubleQuoteString ); } YY_BREAK case 13: YY_RULE_SETUP #line 607 "pyscanner.l" { gstat=TRUE; } YY_BREAK case 14: YY_RULE_SETUP #line 610 "pyscanner.l" { // normal comment g_packageCommentAllowed = FALSE; } YY_BREAK case 15: YY_RULE_SETUP #line 613 "pyscanner.l" { // some other identifier g_packageCommentAllowed = FALSE; } YY_BREAK case 16: YY_RULE_SETUP #line 616 "pyscanner.l" { g_curIndent=computeIndent(pyscannerYYtext); } YY_BREAK case 17: /* rule 17 can match eol */ YY_RULE_SETUP #line 620 "pyscanner.l" { // new line lineCount(); } YY_BREAK case 18: YY_RULE_SETUP #line 624 "pyscanner.l" { // start of a comment block initTriDoubleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 19: YY_RULE_SETUP #line 629 "pyscanner.l" { // start of a comment block initTriSingleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 20: /* rule 20 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */ YY_RULE_SETUP #line 634 "pyscanner.l" { // start of a special comment g_curIndent=computeIndent(pyscannerYYtext); g_packageCommentAllowed = FALSE; initSpecialBlock(); BEGIN(SpecialComment); } YY_BREAK case 21: YY_RULE_SETUP #line 640 "pyscanner.l" { // any other character... // This is the major default // that should catch everything // else in Body. } YY_BREAK case 22: YY_RULE_SETUP #line 648 "pyscanner.l" { // from package import g_packageName=pyscannerYYtext; } YY_BREAK case 23: YY_RULE_SETUP #line 651 "pyscanner.l" { BEGIN(FromModItem); } YY_BREAK case 24: /* rule 24 can match eol */ YY_RULE_SETUP #line 654 "pyscanner.l" { incLineNr(); BEGIN(Search); } YY_BREAK case 25: YY_RULE_SETUP #line 658 "pyscanner.l" { } YY_BREAK case 26: YY_RULE_SETUP #line 660 "pyscanner.l" { unput(*pyscannerYYtext); BEGIN(Search); } YY_BREAK case 27: YY_RULE_SETUP #line 667 "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 28: YY_RULE_SETUP #line 678 "pyscanner.l" { QCString item=g_packageName+"."+pyscannerYYtext; 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(); } YY_BREAK case 29: YY_RULE_SETUP #line 688 "pyscanner.l" { QCString item=g_packageName+"."+pyscannerYYtext; 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 30: /* rule 30 can match eol */ YY_RULE_SETUP #line 699 "pyscanner.l" { incLineNr(); BEGIN(Search); } YY_BREAK case 31: YY_RULE_SETUP #line 703 "pyscanner.l" { } YY_BREAK case 32: YY_RULE_SETUP #line 705 "pyscanner.l" { } YY_BREAK case 33: YY_RULE_SETUP #line 707 "pyscanner.l" { unput(*pyscannerYYtext); BEGIN(Search); } YY_BREAK case 34: YY_RULE_SETUP #line 714 "pyscanner.l" { current->name=removeRedundantWhiteSpace(substitute(pyscannerYYtext,".","::")); 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 35: /* rule 35 can match eol */ YY_RULE_SETUP #line 724 "pyscanner.l" { incLineNr(); BEGIN(Search); } YY_BREAK case 36: YY_RULE_SETUP #line 728 "pyscanner.l" { } YY_BREAK case 37: YY_RULE_SETUP #line 730 "pyscanner.l" { unput(*pyscannerYYtext); BEGIN(Search); } YY_BREAK case 38: YY_RULE_SETUP #line 737 "pyscanner.l" { DBG_CTX((stderr,"Found member variable %s in %s at %d\n",&pyscannerYYtext[5],current_root->name.data(),yyLineNr)); current->name=&pyscannerYYtext[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 39: YY_RULE_SETUP #line 755 "pyscanner.l" { // start of a comment block initTriDoubleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 40: YY_RULE_SETUP #line 760 "pyscanner.l" { // start of a comment block initTriSingleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 41: /* rule 41 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */ YY_RULE_SETUP #line 765 "pyscanner.l" { // start of a special comment initSpecialBlock(); BEGIN(SpecialComment); } YY_BREAK case 42: YY_RULE_SETUP #line 769 "pyscanner.l" { // # } YY_BREAK case 43: YY_RULE_SETUP #line 771 "pyscanner.l" { // start of a single quoted string g_stringContext=YY_START; g_copyString=0; BEGIN( SingleQuoteString ); } YY_BREAK case 44: YY_RULE_SETUP #line 776 "pyscanner.l" { // start of a double quoted string g_stringContext=YY_START; g_copyString=0; BEGIN( DoubleQuoteString ); } YY_BREAK case 45: /* rule 45 can match eol */ YY_RULE_SETUP #line 781 "pyscanner.l" { incLineNr(); } YY_BREAK case 46: YY_RULE_SETUP #line 782 "pyscanner.l" // identifiers YY_BREAK case 47: YY_RULE_SETUP #line 783 "pyscanner.l" // other uninteresting stuff YY_BREAK case 48: YY_RULE_SETUP #line 784 "pyscanner.l" // anything else YY_BREAK case 49: /* rule 49 can match eol */ YY_RULE_SETUP #line 788 "pyscanner.l" { DBG_CTX((stderr,"indent %d<=%d\n",computeIndent(&pyscannerYYtext[1]),g_indent)); if (computeIndent(&pyscannerYYtext[1])<=g_indent) { int i; for (i=(int)pyscannerYYleng-1;i>=0;i--) { unput(pyscannerYYtext[i]); } endOfDef(); //YY_CURRENT_BUFFER->yy_at_bol=TRUE; BEGIN(Search); } else { incLineNr(); current->program+=pyscannerYYtext; } } YY_BREAK case 50: /* rule 50 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */ (yy_c_buf_p) = yy_cp -= 2; YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */ YY_RULE_SETUP #line 807 "pyscanner.l" { if (computeIndent(&pyscannerYYtext[1])<=g_indent) { int i; for (i=(int)pyscannerYYleng-1;i>=0;i--) { unput(pyscannerYYtext[i]); } endOfDef(); //YY_CURRENT_BUFFER->yy_at_bol=TRUE; BEGIN(Search); } else { incLineNr(); current->program+=pyscannerYYtext; } } YY_BREAK case YY_STATE_EOF(FunctionBody): #line 825 "pyscanner.l" { endOfDef(); yyterminate(); } YY_BREAK case 51: /* rule 51 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */ YY_RULE_SETUP #line 829 "pyscanner.l" { // skip empty line current->program+=pyscannerYYtext; } YY_BREAK case 52: YY_RULE_SETUP #line 832 "pyscanner.l" { // something at indent >0 current->program+=pyscannerYYtext; g_curIndent = computeIndent(pyscannerYYtext); if (g_curIndent<=g_indent) // jumped out of the function { endOfDef(1); BEGIN(Search); } } YY_BREAK case 53: YY_RULE_SETUP #line 842 "pyscanner.l" { // start of a single quoted string current->program+=pyscannerYYtext; g_stringContext=YY_START; g_specialBlock = FALSE; g_copyString=¤t->program; BEGIN( SingleQuoteString ); } YY_BREAK case 54: YY_RULE_SETUP #line 849 "pyscanner.l" { // start of a double quoted string current->program+=pyscannerYYtext; g_stringContext=YY_START; g_specialBlock = FALSE; g_copyString=¤t->program; BEGIN( DoubleQuoteString ); } YY_BREAK case 55: YY_RULE_SETUP #line 856 "pyscanner.l" { // non-special stuff current->program+=pyscannerYYtext; g_specialBlock = FALSE; } YY_BREAK case 56: YY_RULE_SETUP #line 860 "pyscanner.l" { // normal comment current->program+=pyscannerYYtext; } YY_BREAK case 57: YY_RULE_SETUP #line 863 "pyscanner.l" { // comment half way current->program+=pyscannerYYtext; } YY_BREAK case 58: /* rule 58 can match eol */ YY_RULE_SETUP #line 866 "pyscanner.l" { incLineNr(); current->program+=pyscannerYYtext; } YY_BREAK case 59: YY_RULE_SETUP #line 870 "pyscanner.l" { // any character current->program+=*pyscannerYYtext; g_specialBlock = FALSE; } YY_BREAK case 60: YY_RULE_SETUP #line 875 "pyscanner.l" { // start of a comment block current->program+=pyscannerYYtext; initTriDoubleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 61: YY_RULE_SETUP #line 881 "pyscanner.l" { // start of a comment block current->program+=pyscannerYYtext; initTriSingleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 62: /* rule 62 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */ (yy_c_buf_p) = yy_cp = yy_bp + 2; YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */ YY_RULE_SETUP #line 887 "pyscanner.l" { // start of a special comment initSpecialBlock(); BEGIN(SpecialComment); } YY_BREAK case 63: YY_RULE_SETUP #line 896 "pyscanner.l" { //found function name if (current->type.isEmpty()) { current->type = "def"; } current->name = pyscannerYYtext; current->name = current->name.stripWhiteSpace(); newFunction(); } YY_BREAK case 64: YY_RULE_SETUP #line 906 "pyscanner.l" { // function without arguments g_specialBlock = TRUE; // expecting a docstring bodyEntry = current; current->bodyLine = yyLineNr; BEGIN( FunctionBody ); } YY_BREAK case 65: YY_RULE_SETUP #line 913 "pyscanner.l" { BEGIN( FunctionParams ); } YY_BREAK case 66: YY_RULE_SETUP #line 919 "pyscanner.l" { } YY_BREAK case 67: YY_RULE_SETUP #line 922 "pyscanner.l" { // Name of parameter lineCount(); Argument *a = new Argument; current->argList->append(a); current->argList->getLast()->name = QCString(pyscannerYYtext).stripWhiteSpace(); current->argList->getLast()->type = ""; } YY_BREAK case 68: YY_RULE_SETUP #line 929 "pyscanner.l" { // default value // TODO: this rule is too simple, need to be able to // match things like =")" as well! QCString defVal=&pyscannerYYtext[1]; g_defVal.resize(0); g_braceCount=0; BEGIN(FunctionParamDefVal); } YY_BREAK case 69: YY_RULE_SETUP #line 938 "pyscanner.l" { // end of parameter list } YY_BREAK case 70: YY_RULE_SETUP #line 941 "pyscanner.l" { g_specialBlock = TRUE; // expecting a docstring bodyEntry = current; current->bodyLine = yyLineNr; BEGIN( FunctionBody ); } YY_BREAK case 71: YY_RULE_SETUP #line 947 "pyscanner.l" { // a comment } YY_BREAK case 72: YY_RULE_SETUP #line 949 "pyscanner.l" { // Default rule inside arguments. } YY_BREAK case 73: YY_RULE_SETUP #line 955 "pyscanner.l" { // internal opening brace g_braceCount++; g_defVal+=*pyscannerYYtext; } YY_BREAK case 74: #line 960 "pyscanner.l" case 75: YY_RULE_SETUP #line 960 "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+=*pyscannerYYtext; } } YY_BREAK case 76: YY_RULE_SETUP #line 975 "pyscanner.l" { g_defVal+=*pyscannerYYtext; } YY_BREAK case 77: /* rule 77 can match eol */ YY_RULE_SETUP #line 978 "pyscanner.l" { g_defVal+=*pyscannerYYtext; incLineNr(); } YY_BREAK case 78: /* rule 78 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */ YY_RULE_SETUP #line 986 "pyscanner.l" { // new def at indent 0 incLineNr(); endOfDef(); //g_hideClassDocs = FALSE; //YY_CURRENT_BUFFER->yy_at_bol=TRUE; BEGIN(Search); } YY_BREAK case 79: /* rule 79 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */ (yy_c_buf_p) = yy_cp = yy_bp + 1; YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */ YY_RULE_SETUP #line 993 "pyscanner.l" { // start of a special comment at indent 0 incLineNr(); endOfDef(); //g_hideClassDocs = FALSE; //YY_CURRENT_BUFFER->yy_at_bol=TRUE; BEGIN(Search); } YY_BREAK case 80: /* rule 80 can match eol */ *yy_cp = (yy_hold_char); /* undo effects of setting up pyscannerYYtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up pyscannerYYtext again */ YY_RULE_SETUP #line 1000 "pyscanner.l" { // skip empty line current->program+=pyscannerYYtext; } YY_BREAK case YY_STATE_EOF(ClassBody): #line 1003 "pyscanner.l" { endOfDef(); yyterminate(); } YY_BREAK case 81: YY_RULE_SETUP #line 1007 "pyscanner.l" { // something at indent >0 g_curIndent=computeIndent(pyscannerYYtext); DBG_CTX((stderr,"g_curIndent=%d g_indent=%d\n",g_curIndent,g_indent)); if (g_curIndent<=g_indent) // jumped out of the class/method { endOfDef(1); 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+=pyscannerYYtext; } } YY_BREAK case 82: YY_RULE_SETUP #line 1025 "pyscanner.l" { // start of a single quoted string current->program+=*pyscannerYYtext; g_stringContext=YY_START; g_specialBlock = FALSE; g_copyString=¤t->program; BEGIN( SingleQuoteString ); } YY_BREAK case 83: YY_RULE_SETUP #line 1032 "pyscanner.l" { // start of a double quoted string current->program+=*pyscannerYYtext; g_stringContext=YY_START; g_specialBlock = FALSE; g_copyString=¤t->program; BEGIN( DoubleQuoteString ); } YY_BREAK case 84: YY_RULE_SETUP #line 1039 "pyscanner.l" { // non-special stuff current->program+=pyscannerYYtext; g_specialBlock = FALSE; //g_hideClassDocs = FALSE; } YY_BREAK case 85: /* rule 85 can match eol */ YY_RULE_SETUP #line 1044 "pyscanner.l" { current->program+=*pyscannerYYtext; incLineNr(); } YY_BREAK case 86: YY_RULE_SETUP #line 1048 "pyscanner.l" { // normal comment current->program+=pyscannerYYtext; } YY_BREAK case 87: YY_RULE_SETUP #line 1051 "pyscanner.l" { // any character g_specialBlock = FALSE; current->program+=*pyscannerYYtext; } YY_BREAK case 88: YY_RULE_SETUP #line 1055 "pyscanner.l" { // start of a comment block //if (!g_hideClassDocs) current->program+=pyscannerYYtext; initTriDoubleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 89: YY_RULE_SETUP #line 1062 "pyscanner.l" { // start of a comment block //if (!g_hideClassDocs) current->program+=pyscannerYYtext; initTriSingleQuoteBlock(); BEGIN(TripleComment); } YY_BREAK case 90: YY_RULE_SETUP #line 1070 "pyscanner.l" { if (current->type.isEmpty()) { current->type = "class"; } current->section = Entry::CLASS_SEC; current->name = pyscannerYYtext; // 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 91: YY_RULE_SETUP #line 1097 "pyscanner.l" { // syntactic sugar for the list } YY_BREAK case 92: YY_RULE_SETUP #line 1100 "pyscanner.l" { // begin of the class definition g_specialBlock = TRUE; // expecting a docstring current->bodyLine = yyLineNr; current->program.resize(0); BEGIN(ClassCaptureIndent); } YY_BREAK case 93: YY_RULE_SETUP #line 1107 "pyscanner.l" { current->extends->append( new BaseInfo(substitute(pyscannerYYtext,".","::"),Public,Normal) ); //Has base class-do stuff } YY_BREAK case 94: /* rule 94 can match eol */ YY_RULE_SETUP #line 1117 "pyscanner.l" { // Blankline - ignore, keep looking for indentation. lineCount(); current->program+=pyscannerYYtext; } YY_BREAK case 95: YY_RULE_SETUP #line 1123 "pyscanner.l" { // start of a comment block initTriDoubleQuoteBlock(); current->program+=pyscannerYYtext; BEGIN(TripleComment); } YY_BREAK case 96: YY_RULE_SETUP #line 1129 "pyscanner.l" { // start of a comment block initTriSingleQuoteBlock(); current->program+=pyscannerYYtext; BEGIN(TripleComment); } YY_BREAK case 97: YY_RULE_SETUP #line 1135 "pyscanner.l" { current->program+=pyscannerYYtext; //current->startLine = yyLineNr; g_curIndent=computeIndent(pyscannerYYtext); bodyEntry = current; DBG_CTX((stderr,"setting indent %d\n",g_curIndent)); //printf("current->program=[%s]\n",current->program.data()); //g_hideClassDocs = TRUE; BEGIN(ClassBody); } YY_BREAK case 98: YY_RULE_SETUP #line 1146 "pyscanner.l" { // Just pushback an empty class, and // resume parsing the body. newEntry(); current->program+=pyscannerYYtext; // printf("Failed to find indent - skipping!"); BEGIN( Search ); } YY_BREAK case 99: YY_RULE_SETUP #line 1160 "pyscanner.l" { // the assignment operator //printf("====== VariableDec at line %d\n",yyLineNr); current->initializer = pyscannerYYtext; current->initializer += " "; } YY_BREAK case 100: YY_RULE_SETUP #line 1165 "pyscanner.l" { // spaces } YY_BREAK case 101: YY_RULE_SETUP #line 1167 "pyscanner.l" { // integer value current->type = "int"; current->initializer += pyscannerYYtext; BEGIN(VariableEnd); } YY_BREAK case 102: YY_RULE_SETUP #line 1172 "pyscanner.l" { // floating point value current->type = "float"; current->initializer += pyscannerYYtext; BEGIN(VariableEnd); } YY_BREAK case 103: YY_RULE_SETUP #line 1177 "pyscanner.l" { // string current->type = "string"; current->initializer += pyscannerYYtext; g_copyString=¤t->initializer; g_stringContext=VariableEnd; BEGIN( SingleQuoteString ); } YY_BREAK case 104: YY_RULE_SETUP #line 1184 "pyscanner.l" { // string current->type = "string"; current->initializer += pyscannerYYtext; g_copyString=¤t->initializer; g_stringContext=VariableEnd; BEGIN( DoubleQuoteString ); } YY_BREAK case 105: YY_RULE_SETUP #line 1191 "pyscanner.l" { // start of a comment block current->type = "string"; current->initializer += pyscannerYYtext; g_doubleQuote=TRUE; g_copyString=¤t->initializer; g_stringContext=VariableEnd; BEGIN(TripleString); } YY_BREAK case 106: YY_RULE_SETUP #line 1200 "pyscanner.l" { // start of a comment block current->type = "string"; current->initializer += pyscannerYYtext; g_doubleQuote=FALSE; g_copyString=¤t->initializer; g_stringContext=VariableEnd; BEGIN(TripleString); } YY_BREAK case 107: YY_RULE_SETUP #line 1208 "pyscanner.l" { // tuple if (current->mtype!=Property) { current->type = "tuple"; } current->initializer+=*pyscannerYYtext; g_atomStart='('; g_atomEnd=')'; g_atomCount=1; BEGIN( VariableAtom ); } YY_BREAK case 108: YY_RULE_SETUP #line 1219 "pyscanner.l" { // list current->type = "list"; current->initializer+=*pyscannerYYtext; g_atomStart='['; g_atomEnd=']'; g_atomCount=1; BEGIN( VariableAtom ); } YY_BREAK case 109: YY_RULE_SETUP #line 1227 "pyscanner.l" { // dictionary current->type = "dictionary"; current->initializer+=*pyscannerYYtext; g_atomStart='{'; g_atomEnd='}'; g_atomCount=1; BEGIN( VariableAtom ); } YY_BREAK case 110: YY_RULE_SETUP #line 1235 "pyscanner.l" { // comment BEGIN( VariableEnd ); } YY_BREAK case 111: YY_RULE_SETUP #line 1238 "pyscanner.l" { current->initializer+=pyscannerYYtext; } YY_BREAK case 112: YY_RULE_SETUP #line 1241 "pyscanner.l" { current->initializer+=*pyscannerYYtext; } YY_BREAK case 113: /* rule 113 can match eol */ YY_RULE_SETUP #line 1244 "pyscanner.l" { unput('\n'); BEGIN( VariableEnd ); } YY_BREAK case 114: YY_RULE_SETUP #line 1251 "pyscanner.l" { current->initializer+=*pyscannerYYtext; if (g_atomStart==*pyscannerYYtext) { g_atomCount++; } } YY_BREAK case 115: YY_RULE_SETUP #line 1258 "pyscanner.l" { current->initializer+=*pyscannerYYtext; if (g_atomEnd==*pyscannerYYtext) { g_atomCount--; } if (g_atomCount==0) { BEGIN(VariableEnd); } } YY_BREAK case 116: YY_RULE_SETUP #line 1269 "pyscanner.l" { g_stringContext=YY_START; current->initializer+="\""; g_copyString=¤t->initializer; BEGIN( DoubleQuoteString ); } YY_BREAK case 117: YY_RULE_SETUP #line 1275 "pyscanner.l" { current->initializer+=pyscannerYYtext; } YY_BREAK case 118: YY_RULE_SETUP #line 1278 "pyscanner.l" { current->initializer+=*pyscannerYYtext; } YY_BREAK case 119: /* rule 119 can match eol */ YY_RULE_SETUP #line 1281 "pyscanner.l" { current->initializer+=*pyscannerYYtext; incLineNr(); } YY_BREAK case 120: /* rule 120 can match eol */ YY_RULE_SETUP #line 1289 "pyscanner.l" { incLineNr(); newVariable(); BEGIN(Search); } YY_BREAK case 121: YY_RULE_SETUP #line 1294 "pyscanner.l" { unput(*pyscannerYYtext); newVariable(); BEGIN(Search); } YY_BREAK case YY_STATE_EOF(VariableEnd): #line 1299 "pyscanner.l" { yyterminate(); newEntry(); } YY_BREAK case 122: #line 1306 "pyscanner.l" case 123: YY_RULE_SETUP #line 1306 "pyscanner.l" { // printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock); if (g_doubleQuote==(pyscannerYYtext[0]=='"')) { if (g_specialBlock) // expecting a docstring { QCString actualDoc=docBlock; if (!docBlockSpecial) // legacy unformatted docstring { actualDoc.prepend("\\verbatim "); actualDoc.append("\\endverbatim "); } //printf("-------> current=%p bodyEntry=%p\n",current,bodyEntry); handleCommentBlock(actualDoc, FALSE); } else if (g_packageCommentAllowed) // expecting module docs { QCString actualDoc=docBlock; if (!docBlockSpecial) // legacy unformatted docstring { actualDoc.prepend("\\verbatim "); actualDoc.append("\\endverbatim "); } actualDoc.prepend("\\namespace "+g_moduleScope+"\\_linebr "); handleCommentBlock(actualDoc, FALSE); } if ((docBlockContext==ClassBody /*&& !g_hideClassDocs*/) || docBlockContext==FunctionBody) { current->program+=docBlock; current->program+=pyscannerYYtext; } //if (g_hideClassDocs) //{ // current->startLine = yyLineNr; //} //g_hideClassDocs=FALSE; BEGIN(docBlockContext); } else { docBlock += pyscannerYYtext; } g_packageCommentAllowed = FALSE; } YY_BREAK case 124: YY_RULE_SETUP #line 1353 "pyscanner.l" { // leading whitespace int indent = computeIndent(pyscannerYYtext); 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", // pyscannerYYtext, YY_START, yyLineNr); } */ case 150: /* rule 150 can match eol */ YY_RULE_SETUP #line 1481 "pyscanner.l" { //printf("[pyscanner] %d NEWLINE [line %d] no match\n", // YY_START, yyLineNr); lineCount(); } YY_BREAK case 151: YY_RULE_SETUP #line 1488 "pyscanner.l" { //printf("[pyscanner] '%s' [ state %d ] [line %d] no match\n", // pyscannerYYtext, YY_START, yyLineNr); } YY_BREAK case 152: YY_RULE_SETUP #line 1495 "pyscanner.l" ECHO; YY_BREAK #line 3523 "" 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_LVALUE->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 pyscannerYYin at a new source and called * pyscannerYYlex(). 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_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = pyscannerYYin; YY_CURRENT_BUFFER_LVALUE->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_LVALUE->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 ( pyscannerYYwrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * pyscannerYYtext, 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_LVALUE->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 pyscannerYYlex */ /* 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 (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->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_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->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_LVALUE->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_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->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; pyscannerYYrestart(pyscannerYYin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) pyscannerYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->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 (void) { 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 >= 453 ) 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 ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { 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 >= 453 ) 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 == 452); if ( ! yy_is_jam ) *(yy_state_ptr)++ = yy_current_state; return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up pyscannerYYtext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register yy_size_t number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->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; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #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_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ yy_size_t 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. */ pyscannerYYrestart(pyscannerYYin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( pyscannerYYwrap( ) ) 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 pyscannerYYtext */ (yy_hold_char) = *++(yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void pyscannerYYrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ pyscannerYYensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = pyscannerYY_create_buffer(pyscannerYYin,YY_BUF_SIZE ); } pyscannerYY_init_buffer(YY_CURRENT_BUFFER,input_file ); pyscannerYY_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void pyscannerYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * pyscannerYYpop_buffer_state(); * pyscannerYYpush_buffer_state(new_buffer); */ pyscannerYYensure_buffer_stack (); 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_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; pyscannerYY_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (pyscannerYYwrap()) processing, but the only time this flag * is looked at is after pyscannerYYwrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void pyscannerYY_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; pyscannerYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE pyscannerYY_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) pyscannerYYalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in pyscannerYY_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 *) pyscannerYYalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in pyscannerYY_create_buffer()" ); b->yy_is_our_buffer = 1; pyscannerYY_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with pyscannerYY_create_buffer() * */ void pyscannerYY_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) pyscannerYYfree((void *) b->yy_ch_buf ); pyscannerYYfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a pyscannerYYrestart() or at EOF. */ static void pyscannerYY_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; pyscannerYY_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then pyscannerYY_init_buffer was _probably_ * called from pyscannerYYrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void pyscannerYY_flush_buffer (YY_BUFFER_STATE b ) { 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 ) pyscannerYY_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void pyscannerYYpush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; pyscannerYYensure_buffer_stack(); /* This block is copied from pyscannerYY_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from pyscannerYY_switch_to_buffer. */ pyscannerYY_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void pyscannerYYpop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; pyscannerYY_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { pyscannerYY_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void pyscannerYYensure_buffer_stack (void) { yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)pyscannerYYalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in pyscannerYYensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)pyscannerYYrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in pyscannerYYensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE pyscannerYY_scan_buffer (char * base, yy_size_t size ) { 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) pyscannerYYalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in pyscannerYY_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; pyscannerYY_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to pyscannerYYlex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * pyscannerYY_scan_bytes() instead. */ YY_BUFFER_STATE pyscannerYY_scan_string (yyconst char * yystr ) { return pyscannerYY_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to pyscannerYYlex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE pyscannerYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) pyscannerYYalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in pyscannerYY_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = pyscannerYY_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in pyscannerYY_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; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (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 pyscannerYYtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ pyscannerYYtext[pyscannerYYleng] = (yy_hold_char); \ (yy_c_buf_p) = pyscannerYYtext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ pyscannerYYleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int pyscannerYYget_lineno (void) { return pyscannerYYlineno; } /** Get the input stream. * */ FILE *pyscannerYYget_in (void) { return pyscannerYYin; } /** Get the output stream. * */ FILE *pyscannerYYget_out (void) { return pyscannerYYout; } /** Get the length of the current token. * */ yy_size_t pyscannerYYget_leng (void) { return pyscannerYYleng; } /** Get the current token. * */ char *pyscannerYYget_text (void) { return pyscannerYYtext; } /** Set the current line number. * @param line_number * */ void pyscannerYYset_lineno (int line_number ) { pyscannerYYlineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see pyscannerYY_switch_to_buffer */ void pyscannerYYset_in (FILE * in_str ) { pyscannerYYin = in_str ; } void pyscannerYYset_out (FILE * out_str ) { pyscannerYYout = out_str ; } int pyscannerYYget_debug (void) { return pyscannerYY_flex_debug; } void pyscannerYYset_debug (int bdebug ) { pyscannerYY_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from pyscannerYYlex_destroy(), so don't allocate here. */ (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; (yy_state_buf) = 0; (yy_state_ptr) = 0; (yy_full_match) = 0; (yy_lp) = 0; /* Defined in main.c */ #ifdef YY_STDINIT pyscannerYYin = stdin; pyscannerYYout = stdout; #else pyscannerYYin = (FILE *) 0; pyscannerYYout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * pyscannerYYlex_init() */ return 0; } /* pyscannerYYlex_destroy is for both reentrant and non-reentrant scanners. */ int pyscannerYYlex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ pyscannerYY_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; pyscannerYYpop_buffer_state(); } /* Destroy the stack itself. */ pyscannerYYfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; pyscannerYYfree ( (yy_state_buf) ); (yy_state_buf) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * pyscannerYYlex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *pyscannerYYalloc (yy_size_t size ) { return (void *) malloc( size ); } void *pyscannerYYrealloc (void * ptr, yy_size_t size ) { /* 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 ); } void pyscannerYYfree (void * ptr ) { free( (char *) ptr ); /* see pyscannerYYrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 1495 "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; pyscannerYYrestart( pyscannerYYin ) ; 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->bodyLine ; if (current) delete current; current = new Entry; initEntry(); groupEnterCompound(yyFileName,yyLineNr,ce->name); pyscannerYYlex() ; 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_specialBlock = 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); QCString baseName=fi.baseName().utf8(); if (baseName!="__init__") // package initializer file is not a package itself { if (!g_moduleScope.isEmpty()) { g_moduleScope+="::"; } g_moduleScope+=baseName; } current = new Entry; initEntry(); 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(); initEntry(); pyscannerYYrestart( pyscannerYYin ); BEGIN( Search ); pyscannerYYlex(); 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_specialBlock = FALSE; g_packageCommentAllowed = FALSE; const char *orgInputString; int orgInputPosition; YY_BUFFER_STATE orgState; // save scanner state orgState = YY_CURRENT_BUFFER; pyscannerYY_switch_to_buffer(pyscannerYY_create_buffer(pyscannerYYin,YY_BUF_SIZE)); orgInputString = inputString; orgInputPosition = inputPosition; // set new string inputString = text; inputPosition = 0; pyscannerYYrestart( pyscannerYYin ); BEGIN( FunctionDec ); pyscannerYYlex(); 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; pyscannerYY_switch_to_buffer(orgState); pyscannerYY_delete_buffer(tmpBuf); inputString = orgInputString; inputPosition = orgInputPosition; //printf("**** parsePrototype end\n"); } void pyscanFreeScanner() { #if defined(YY_FLEX_SUBMINOR_VERSION) if (g_lexInit) { pyscannerYYlex_destroy(); } #endif } //---------------------------------------------------------------------------- void PythonLanguageScanner::parseInput(const char *fileName, const char *fileBuf, Entry *root, bool /*sameTranslationUnit*/, QStrList & /*filesInSameTranslationUnit*/) { g_thisParser = this; printlex(pyscannerYY_flex_debug, TRUE, __FILE__, fileName); ::parseMain(fileName,fileBuf,root); printlex(pyscannerYY_flex_debug, FALSE, __FILE__, fileName); // 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, SrcLangExt /*lang*/, bool isExampleBlock, const char *exampleName, FileDef *fileDef, int startLine, int endLine, bool inlineFragment, MemberDef *memberDef, bool showLineNumbers, Definition *searchCtx, bool collectXRefs ) { ::parsePythonCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName, fileDef,startLine,endLine,inlineFragment,memberDef, showLineNumbers,searchCtx,collectXRefs); } 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