#line 3 "" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer pycodeYY_create_buffer #define yy_delete_buffer pycodeYY_delete_buffer #define yy_flex_debug pycodeYY_flex_debug #define yy_init_buffer pycodeYY_init_buffer #define yy_flush_buffer pycodeYY_flush_buffer #define yy_load_buffer_state pycodeYY_load_buffer_state #define yy_switch_to_buffer pycodeYY_switch_to_buffer #define yyin pycodeYYin #define yyleng pycodeYYleng #define yylex pycodeYYlex #define yylineno pycodeYYlineno #define yyout pycodeYYout #define yyrestart pycodeYYrestart #define yytext pycodeYYtext #define yywrap pycodeYYwrap #define yyalloc pycodeYYalloc #define yyrealloc pycodeYYrealloc #define yyfree pycodeYYfree #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 pycodeYYrestart(pycodeYYin ) #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 pycodeYYleng; extern FILE *pycodeYYin, *pycodeYYout; #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 pycodeYYtext. */ \ 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 pycodeYYtext 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 pycodeYYrestart()), so that the user can continue scanning by * just pointing pycodeYYin 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 pycodeYYtext 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 pycodeYYleng; /* 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 pycodeYYwrap()'s to do buffer switches * instead of setting up a fresh pycodeYYin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void pycodeYYrestart (FILE *input_file ); void pycodeYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE pycodeYY_create_buffer (FILE *file,int size ); void pycodeYY_delete_buffer (YY_BUFFER_STATE b ); void pycodeYY_flush_buffer (YY_BUFFER_STATE b ); void pycodeYYpush_buffer_state (YY_BUFFER_STATE new_buffer ); void pycodeYYpop_buffer_state (void ); static void pycodeYYensure_buffer_stack (void ); static void pycodeYY_load_buffer_state (void ); static void pycodeYY_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER pycodeYY_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE pycodeYY_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE pycodeYY_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE pycodeYY_scan_bytes (yyconst char *bytes,yy_size_t len ); void *pycodeYYalloc (yy_size_t ); void *pycodeYYrealloc (void *,yy_size_t ); void pycodeYYfree (void * ); #define yy_new_buffer pycodeYY_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ pycodeYYensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ pycodeYY_create_buffer(pycodeYYin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ pycodeYYensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ pycodeYY_create_buffer(pycodeYYin,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 pycodeYYwrap() 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *pycodeYYin = (FILE *) 0, *pycodeYYout = (FILE *) 0; typedef int yy_state_type; extern int pycodeYYlineno; int pycodeYYlineno = 1; extern char *pycodeYYtext; #define yytext_ptr pycodeYYtext 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 pycodeYYtext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ pycodeYYleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 61 #define YY_END_OF_BUFFER 62 /* 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[957] = { 0, 16416,16416, 62, 60, 61, 59, 60, 61, 58, 61, 56, 60, 61, 57, 60, 61, 55, 60, 61, 60, 61, 60, 61, 60, 61, 35, 58, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 20, 34, 60, 61, 59, 60, 61, 11, 60, 61, 10, 60, 61, 10, 60, 61, 10, 60, 61, 10, 60, 61, 13, 60, 61, 12, 59, 60, 61, 13, 56, 60, 61, 13, 57, 60, 61, 13, 55, 60, 61, 14, 60, 61, 12, 13, 60, 61, 15, 60, 61, 13, 60, 61, 13, 60, 61, 13, 60, 61, 13, 60, 61, 6, 60, 61, 6, 60, 61, 6, 60, 61, 6, 60, 61, 7, 59, 60, 61, 7, 60, 61, 9, 60, 61, 8, 60, 61, 8, 60, 61, 8, 60, 61, 8, 60, 61, 33, 58, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 20, 60, 61, 29, 59, 60, 61, 28, 58, 61, 21, 59, 60, 61, 27, 58, 61, 26, 57, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 25, 60, 61, 59, 60, 61,16414, 31, 58, 61, 8224, 60, 61, 8224, 57, 60, 61, 8224, 60, 61, 8224, 60, 61, 8224, 60, 61, 40, 41, 60, 61, 40, 41, 59, 60, 61, 41, 56, 60, 61, 40, 41, 57, 60, 61, 39, 41, 55, 60, 61, 40, 41, 60, 61, 40, 41, 60, 61, 41, 60, 61, 40, 41, 60, 61, 46, 47, 60, 61, 46, 47, 59, 60, 61, 45, 47, 56, 60, 61, 46, 47, 57, 60, 61, 47, 55, 60, 61, 46, 47, 60, 61, 46, 47, 60, 61, 47, 60, 61, 46, 47, 60, 61, 50, 52, 60, 61, 50, 52, 59, 60, 61, 50, 51, 58, 61, 50, 52, 56, 60, 61, 50, 52, 57, 60, 61, 50, 52, 55, 60, 61, 50, 52, 60, 61, 50, 52, 60, 61, 52, 60, 61, 50, 52, 60, 61, 59, 57, 56, 55, 18, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 16, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 17, 20, 34, 20, 34, 17, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 59, 11, 10, 10, 13, 12, 59, 13, 13, 57, 13, 13, 13, 56, 13, 55, 13, 6, 6, 7, 59, 8, 8, 20, 20, 20, 20, 20, 20, 16, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 17, 20, 20, 17, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 29, 59, 28, 21, 59, 26, 57, 25, 25, 25, 25, 25, 23, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 24, 25, 25, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 59,16414, 31, 8222, 40, 40, 59, 40, 57, 56, 40, 37, 37, 36, 46, 46, 59, 46, 57, 55, 46, 43, 43, 42, 50, 50, 59, 50, 50, 57, 57, 50, 50, 54, 53, 19, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 16, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 13, 54, 13, 53, 8, 20, 20, 20, 20, 20, 20, 20, 16, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 25, 25, 25, 25, 25, 25, 23, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 38, 54, 44, 53, 48, 54, 49, 53, 19, 20, 34, 3, 20, 34, 16, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 1, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 3, 20, 16, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 22, 24, 25, 25, 25, 25, 25, 25, 20, 34, 16, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 34, 20, 16, 20, 20, 20, 20, 20, 20, 20, 20, 25, 25, 25, 25, 25, 25, 25, 25, 2, 20, 34, 20, 34, 5, 19, 20, 20, 25, 25, 20, 34, 4, 18, 5, 19, 20, 25 } ; static yyconst flex_int16_t yy_accept[506] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 6, 9, 11, 14, 17, 20, 22, 24, 26, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93, 97, 101, 105, 109, 113, 117, 121, 125, 128, 131, 134, 137, 140, 143, 146, 150, 154, 158, 162, 165, 169, 172, 175, 178, 181, 184, 187, 190, 193, 196, 200, 203, 206, 209, 212, 215, 218, 221, 224, 227, 230, 233, 236, 239, 242, 245, 248, 251, 254, 257, 260, 263, 266, 269, 272, 275, 278, 281, 284, 287, 290, 293, 297, 300, 304, 307, 311, 314, 317, 320, 323, 326, 329, 332, 335, 338, 341, 344, 347, 350, 353, 356, 359, 362, 365, 368, 371, 374, 377, 381, 384, 387, 391, 394, 397, 400, 404, 409, 413, 418, 423, 427, 431, 434, 438, 442, 447, 452, 457, 461, 465, 469, 472, 476, 480, 485, 489, 494, 499, 504, 508, 512, 515, 519, 520, 520, 521, 521, 522, 523, 523, 524, 524, 526, 528, 530, 532, 534, 536, 539, 541, 543, 545, 547, 549, 551, 553, 555, 557, 559, 562, 564, 567, 569, 571, 573, 575, 577, 579, 581, 583, 585, 587, 588, 589, 590, 591, 592, 594, 595, 597, 598, 599, 601, 603, 604, 605, 606, 608, 608, 609, 610, 611, 612, 613, 614, 615, 616, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 630, 631, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 645, 646, 648, 650, 651, 652, 653, 654, 655, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 669, 670, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 683, 684, 685, 686, 688, 688, 690, 691, 692, 693, 694, 695, 696, 698, 700, 700, 701, 702, 703, 704, 705, 706, 706, 708, 709, 711, 712, 713, 714, 715, 716, 717, 719, 721, 723, 725, 727, 729, 731, 734, 736, 738, 740, 742, 744, 746, 748, 750, 752, 754, 756, 758, 760, 762, 764, 766, 768, 769, 770, 771, 772, 773, 774, 775, 776, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 817, 817, 819, 819, 821, 823, 824, 826, 829, 832, 834, 836, 838, 840, 841, 843, 845, 847, 849, 851, 853, 855, 857, 859, 861, 863, 864, 866, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 896, 897, 898, 899, 900, 901, 903, 906, 908, 910, 912, 914, 916, 918, 920, 920, 921, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 941, 943, 945, 946, 947, 948, 949, 951, 953, 955, 956, 957, 957 } ; 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, 4, 4, 7, 8, 9, 4, 4, 10, 4, 11, 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 4, 4, 4, 4, 1, 1, 14, 14, 14, 14, 14, 15, 14, 14, 14, 14, 14, 14, 14, 16, 14, 14, 14, 17, 14, 18, 19, 14, 14, 14, 14, 14, 4, 20, 4, 1, 21, 4, 22, 23, 24, 25, 26, 27, 28, 29, 30, 14, 31, 32, 33, 34, 35, 36, 14, 37, 38, 39, 40, 14, 41, 42, 43, 14, 4, 4, 4, 4, 1, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14 } ; static yyconst flex_int32_t yy_meta[44] = { 0, 1, 2, 3, 4, 5, 4, 5, 6, 2, 4, 7, 8, 2, 9, 9, 9, 9, 9, 9, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 } ; static yyconst flex_int16_t yy_base[535] = { 0, 0, 39, 79, 0, 122, 0, 165, 0, 208, 0, 251, 0, 294, 0, 6, 8, 337, 0, 380, 420, 0, 0, 0, 0, 459, 498, 537, 576, 615, 654, 1626, 1627, 1623, 1627, 1596, 0, 1572, 7, 11, 15, 1627, 13, 25, 15, 46, 23, 387, 27, 382, 380, 51, 398, 399, 400, 420, 56, 433, 405, 437, 462, 392, 435, 475, 427, 19, 61, 1627, 0, 8, 470, 504, 0, 1570, 1565, 489, 1543, 1627, 0, 1627, 694, 714, 38, 434, 0, 61, 509, 515, 1541, 1627, 1627, 1530, 518, 548, 553, 1627, 62, 441, 502, 523, 482, 592, 537, 525, 576, 565, 594, 593, 578, 604, 539, 516, 555, 632, 640, 638, 561, 670, 657, 633, 69, 1627, 1531, 1627, 0, 0, 1498, 501, 1467, 665, 5, 1464, 370, 1474, 453, 653, 1459, 679, 1462, 1446, 1443, 602, 704, 1428, 722, 1382, 1380, 565, 1627, 1627, 0, 620, 726, 730, 0, 1405, 1401, 703, 1398, 731, 735, 604, 739, 0, 1402, 1398, 744, 1393, 743, 748, 677, 753, 1379, 394, 1378, 1391, 766, 1388, 761, 772, 775, 786, 1391, 1387, 0, 1383, 1380, 1371, 789, 1627, 0, 642, 776, 787, 789, 794, 799, 803, 804, 681, 805, 809, 814, 823, 824, 685, 829, 834, 746, 835, 840, 842, 846, 848, 852, 854, 859, 865, 866, 870, 879, 586, 1627, 0, 821, 0, 1367, 1347, 886, 1337, 861, 1337, 1330, 0, 0, 884, 1333, 0, 1320, 896, 872, 885, 900, 902, 907, 908, 912, 913, 914, 918, 919, 924, 920, 929, 930, 937, 945, 947, 949, 953, 957, 958, 962, 963, 968, 967, 973, 975, 980, 981, 682, 1627, 1314, 0, 0, 1282, 1261, 897, 1270, 1249, 1255, 1258, 1228, 1233, 451, 1231, 1214, 1204, 1192, 1191, 0, 1186, 0, 1188, 1157, 1156, 1160, 1153, 1143, 1130, 1139, 1126, 759, 1627, 1627, 0, 1145, 1132, 989, 1114, 942, 1627, 772, 1627, 0, 1115, 994, 1108, 1093, 997, 1627, 816, 1627, 1078, 1008, 656, 1084, 1014, 1069, 1063, 1015, 1627, 1627, 1015, 1016, 1017, 1021, 1022, 1028, 1029, 1030, 1044, 1034, 1045, 1049, 1051, 1055, 1057, 1066, 1068, 1070, 1075, 1074, 1076, 1084, 1082, 1086, 0, 0, 1053, 1088, 1094, 1095, 1096, 1102, 1117, 1119, 1121, 1123, 1125, 1127, 1132, 1131, 1133, 1137, 1138, 1149, 1151, 1155, 1157, 1159, 1163, 1167, 1020, 1025, 1023, 1022, 993, 977, 0, 985, 982, 977, 973, 954, 959, 942, 936, 913, 909, 868, 852, 847, 840, 1627, 1174, 1627, 1177, 1627, 1627, 1173, 1180, 1181, 1190, 1192, 1194, 1196, 1200, 859, 1201, 1206, 1202, 1207, 1208, 1212, 1220, 1224, 1228, 1232, 1234, 1239, 1241, 1245, 1246, 1255, 1256, 1260, 1261, 1266, 1262, 1267, 1268, 1274, 1280, 1281, 1288, 1294, 1292, 829, 812, 807, 795, 797, 768, 756, 761, 708, 716, 0, 693, 702, 679, 671, 642, 1299, 1313, 1300, 1301, 1311, 1315, 1317, 1319, 1321, 0, 1325, 1337, 1338, 1342, 1343, 1350, 1349, 1351, 1355, 594, 585, 575, 548, 517, 455, 433, 416, 431, 1357, 1359, 1363, 1368, 1369, 361, 346, 1375, 1627, 1376, 1383, 358, 1627, 1412, 1422, 1432, 1442, 1452, 1462, 1467, 1469, 1478, 1488, 1498, 1501, 1504, 1508, 1517, 1520, 1528, 1538, 1547, 1557, 1567, 1576, 1586, 1596, 1606, 65, 20, 1611, 16, 1615 } ; static yyconst flex_int16_t yy_def[535] = { 0, 505, 505, 504, 3, 504, 5, 504, 7, 504, 9, 504, 11, 504, 13, 2, 2, 504, 17, 506, 506, 2, 2, 2, 2, 507, 507, 508, 508, 509, 509, 504, 504, 504, 504, 504, 510, 504, 504, 504, 504, 504, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 504, 504, 512, 512, 512, 512, 513, 504, 513, 514, 513, 504, 513, 504, 515, 515, 81, 81, 516, 516, 516, 516, 504, 504, 504, 517, 517, 517, 517, 504, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 504, 504, 504, 504, 519, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 521, 504, 504, 510, 504, 504, 504, 522, 522, 504, 523, 504, 522, 522, 524, 522, 525, 525, 504, 526, 504, 525, 525, 527, 525, 528, 528, 528, 504, 529, 504, 528, 528, 528, 528, 504, 504, 510, 504, 504, 504, 504, 504, 530, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 504, 504, 512, 512, 513, 504, 513, 514, 513, 81, 513, 513, 81, 516, 516, 504, 531, 517, 517, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 504, 504, 504, 519, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 521, 504, 504, 522, 522, 504, 523, 504, 522, 504, 504, 504, 525, 525, 526, 504, 504, 525, 504, 504, 504, 528, 528, 528, 504, 529, 529, 504, 528, 504, 504, 532, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 513, 513, 517, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 504, 504, 504, 504, 504, 504, 532, 511, 511, 511, 511, 511, 511, 511, 504, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 511, 511, 511, 511, 511, 511, 511, 511, 511, 533, 518, 518, 518, 518, 518, 518, 518, 518, 518, 520, 520, 520, 520, 520, 520, 520, 520, 504, 511, 511, 534, 518, 518, 520, 520, 511, 504, 534, 518, 520, 0, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504 } ; static yyconst flex_int16_t yy_nxt[1671] = { 0, 504, 33, 34, 504, 35, 36, 37, 120, 121, 120, 121, 186, 186, 187, 187, 186, 38, 187, 39, 186, 189, 187, 189, 190, 494, 190, 189, 188, 359, 190, 189, 188, 189, 190, 189, 190, 38, 190, 278, 40, 33, 34, 279, 35, 36, 37, 192, 188, 220, 193, 186, 188, 187, 189, 233, 38, 190, 39, 189, 194, 196, 190, 221, 189, 197, 186, 190, 187, 222, 189, 270, 271, 190, 333, 233, 38, 201, 211, 40, 32, 33, 41, 32, 35, 36, 37, 32, 32, 32, 32, 32, 32, 42, 43, 44, 45, 46, 47, 32, 42, 48, 49, 50, 51, 52, 53, 54, 42, 55, 42, 56, 42, 57, 58, 59, 60, 61, 62, 63, 64, 42, 65, 32, 66, 34, 32, 35, 36, 37, 67, 32, 32, 32, 32, 32, 68, 68, 68, 69, 68, 70, 32, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 69, 68, 68, 71, 68, 68, 68, 72, 73, 34, 72, 74, 75, 76, 32, 77, 78, 72, 72, 79, 80, 80, 80, 81, 80, 82, 72, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 80, 80, 83, 80, 80, 80, 32, 33, 34, 32, 35, 36, 37, 32, 32, 32, 32, 32, 32, 84, 84, 84, 85, 84, 86, 32, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 85, 84, 84, 87, 84, 84, 84, 32, 88, 34, 32, 35, 36, 37, 89, 89, 89, 32, 32, 90, 91, 91, 91, 92, 91, 93, 32, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 92, 91, 91, 94, 91, 91, 91, 32, 33, 95, 32, 35, 36, 37, 32, 32, 32, 32, 32, 32, 96, 97, 98, 99, 100, 101, 32, 96, 102, 103, 104, 105, 106, 107, 108, 96, 109, 96, 110, 96, 111, 112, 113, 114, 115, 116, 117, 118, 96, 119, 32, 122, 123, 32, 35, 124, 37, 32, 32, 32, 32, 32, 32, 125, 126, 125, 127, 128, 129, 32, 125, 130, 131, 132, 133, 134, 135, 136, 125, 137, 125, 138, 125, 139, 140, 141, 142, 125, 143, 144, 145, 125, 146, 32, 147, 148, 292, 35, 150, 37, 189, 292, 189, 190, 186, 190, 187, 189, 325, 151, 190, 152, 189, 503, 281, 190, 195, 282, 189, 189, 189, 190, 190, 190, 199, 189, 324, 200, 190, 151, 217, 198, 153, 32, 147, 148, 195, 35, 150, 37, 189, 204, 202, 190, 207, 491, 205, 189, 206, 151, 190, 152, 203, 189, 210, 189, 190, 189, 190, 208, 190, 189, 292, 233, 190, 209, 210, 389, 219, 151, 210, 213, 153, 155, 34, 241, 156, 157, 158, 186, 212, 187, 189, 233, 218, 190, 214, 186, 159, 187, 160, 161, 186, 390, 187, 189, 215, 284, 190, 224, 216, 391, 189, 184, 195, 190, 389, 285, 159, 184, 184, 162, 155, 34, 184, 156, 157, 158, 186, 224, 187, 186, 189, 187, 195, 190, 186, 159, 187, 160, 161, 243, 186, 224, 187, 186, 189, 187, 235, 190, 186, 237, 187, 189, 235, 189, 190, 159, 190, 242, 162, 164, 34, 224, 165, 166, 167, 189, 235, 189, 190, 389, 190, 261, 235, 186, 168, 187, 169, 170, 186, 237, 187, 260, 247, 189, 237, 239, 190, 302, 303, 189, 239, 245, 190, 189, 168, 246, 190, 171, 164, 34, 498, 165, 166, 167, 189, 239, 189, 190, 221, 190, 239, 250, 259, 168, 222, 169, 170, 186, 267, 187, 189, 189, 189, 190, 190, 190, 312, 313, 248, 244, 256, 249, 189, 168, 292, 190, 171, 173, 174, 497, 175, 176, 177, 253, 295, 186, 251, 187, 254, 244, 255, 257, 178, 389, 179, 180, 252, 258, 259, 296, 189, 189, 259, 190, 190, 186, 189, 187, 189, 190, 189, 190, 178, 190, 262, 181, 173, 174, 325, 175, 176, 177, 264, 269, 266, 189, 265, 292, 190, 263, 186, 178, 187, 179, 180, 186, 324, 187, 189, 321, 322, 190, 277, 286, 270, 271, 268, 244, 287, 189, 288, 178, 190, 189, 181, 225, 190, 292, 225, 225, 225, 225, 277, 339, 225, 225, 290, 244, 184, 186, 184, 187, 291, 292, 225, 225, 490, 292, 225, 231, 225, 232, 210, 184, 225, 225, 297, 186, 292, 187, 298, 186, 292, 187, 225, 186, 309, 187, 187, 277, 309, 489, 187, 188, 309, 488, 187, 188, 186, 184, 318, 184, 310, 186, 189, 318, 310, 190, 186, 277, 318, 302, 303, 188, 184, 319, 186, 188, 187, 323, 319, 184, 310, 184, 405, 313, 310, 186, 504, 187, 323, 324, 323, 487, 189, 319, 328, 190, 486, 330, 319, 186, 324, 187, 186, 189, 187, 189, 190, 186, 190, 187, 189, 330, 485, 190, 324, 189, 334, 330, 190, 189, 189, 189, 190, 190, 190, 189, 407, 322, 190, 335, 189, 330, 210, 190, 186, 484, 187, 336, 338, 189, 189, 389, 190, 190, 341, 189, 292, 340, 190, 337, 189, 189, 342, 190, 190, 344, 189, 483, 189, 190, 343, 190, 189, 389, 189, 190, 345, 190, 189, 418, 189, 190, 346, 190, 225, 189, 225, 347, 190, 348, 463, 189, 189, 349, 190, 190, 189, 462, 189, 190, 351, 190, 352, 210, 350, 189, 184, 186, 190, 187, 461, 189, 184, 184, 190, 354, 353, 184, 355, 186, 186, 187, 187, 356, 460, 237, 189, 210, 189, 190, 186, 190, 187, 189, 189, 360, 190, 190, 189, 189, 189, 190, 190, 190, 189, 189, 189, 190, 190, 190, 189, 259, 361, 190, 365, 189, 189, 364, 190, 190, 362, 459, 370, 189, 367, 309, 190, 187, 363, 458, 366, 189, 368, 189, 190, 189, 190, 457, 190, 189, 369, 371, 190, 189, 189, 259, 190, 190, 189, 189, 372, 190, 190, 189, 189, 456, 190, 190, 373, 189, 455, 189, 190, 374, 190, 389, 189, 189, 375, 190, 190, 377, 184, 454, 184, 259, 378, 184, 376, 184, 186, 453, 318, 380, 379, 382, 292, 184, 381, 504, 292, 323, 184, 323, 452, 323, 259, 184, 186, 184, 187, 189, 189, 189, 190, 190, 190, 189, 189, 451, 190, 190, 328, 324, 189, 189, 189, 190, 190, 190, 189, 412, 450, 190, 418, 413, 414, 449, 415, 389, 189, 189, 411, 190, 190, 189, 448, 189, 190, 210, 190, 189, 237, 189, 190, 416, 190, 417, 409, 210, 504, 420, 189, 419, 189, 190, 189, 190, 421, 190, 189, 189, 189, 190, 190, 190, 413, 408, 189, 423, 189, 190, 189, 190, 189, 190, 324, 190, 317, 422, 189, 189, 189, 190, 190, 190, 210, 424, 189, 427, 425, 190, 428, 406, 426, 315, 429, 307, 431, 432, 433, 418, 434, 189, 430, 189, 190, 189, 190, 189, 190, 189, 190, 189, 190, 404, 190, 189, 189, 189, 190, 190, 190, 189, 189, 306, 190, 190, 259, 259, 403, 437, 438, 435, 439, 189, 436, 189, 190, 441, 190, 189, 432, 189, 190, 189, 190, 402, 190, 189, 440, 292, 190, 189, 405, 313, 190, 407, 322, 189, 401, 400, 190, 442, 445, 259, 189, 189, 399, 190, 190, 443, 398, 446, 292, 444, 189, 447, 189, 190, 189, 190, 189, 190, 413, 190, 189, 189, 189, 190, 190, 190, 189, 189, 189, 190, 190, 190, 189, 397, 396, 190, 469, 210, 395, 394, 189, 464, 466, 190, 189, 471, 465, 190, 189, 467, 468, 473, 189, 292, 189, 190, 470, 190, 210, 189, 393, 189, 190, 210, 190, 189, 189, 392, 190, 190, 210, 210, 389, 472, 388, 189, 189, 432, 190, 190, 189, 189, 189, 190, 190, 190, 189, 189, 189, 190, 190, 190, 387, 386, 189, 474, 479, 190, 259, 385, 189, 189, 476, 190, 190, 481, 475, 292, 189, 477, 478, 473, 189, 384, 189, 190, 480, 190, 259, 189, 189, 189, 190, 190, 190, 259, 383, 491, 272, 259, 482, 189, 259, 189, 190, 189, 190, 189, 190, 189, 190, 189, 190, 237, 190, 189, 492, 236, 190, 229, 413, 491, 210, 413, 227, 493, 358, 189, 189, 413, 190, 190, 189, 189, 357, 190, 190, 210, 413, 189, 189, 189, 190, 190, 190, 189, 432, 189, 190, 189, 190, 226, 190, 500, 495, 432, 190, 496, 189, 189, 185, 190, 190, 259, 432, 189, 500, 183, 190, 190, 432, 259, 332, 189, 331, 182, 190, 329, 326, 499, 324, 324, 317, 210, 210, 183, 315, 185, 307, 306, 502, 259, 301, 300, 259, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 184, 184, 299, 184, 184, 184, 184, 184, 184, 184, 191, 191, 191, 191, 223, 223, 225, 292, 294, 225, 225, 293, 225, 225, 225, 225, 228, 228, 289, 228, 228, 228, 228, 228, 228, 228, 230, 283, 280, 230, 230, 276, 230, 230, 230, 230, 234, 234, 238, 238, 238, 240, 240, 240, 240, 273, 273, 275, 273, 273, 273, 273, 273, 273, 273, 274, 274, 304, 304, 304, 272, 304, 304, 304, 304, 304, 305, 305, 237, 305, 236, 305, 305, 305, 305, 308, 308, 229, 308, 308, 308, 308, 308, 308, 308, 311, 311, 311, 311, 311, 311, 311, 311, 311, 311, 314, 314, 227, 314, 226, 314, 314, 314, 314, 316, 316, 185, 316, 316, 316, 316, 316, 316, 316, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 323, 323, 323, 323, 183, 323, 323, 323, 323, 323, 327, 327, 327, 327, 327, 327, 327, 327, 327, 327, 410, 410, 410, 410, 501, 501, 501, 501, 182, 504, 31, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504 } ; static yyconst flex_int16_t yy_chk[1671] = { 0, 0, 1, 1, 0, 1, 1, 1, 15, 15, 16, 16, 38, 69, 38, 69, 39, 1, 39, 1, 40, 42, 40, 44, 42, 533, 44, 65, 39, 531, 65, 46, 40, 43, 46, 48, 43, 1, 48, 130, 1, 2, 2, 130, 2, 2, 2, 43, 39, 65, 44, 45, 40, 45, 45, 82, 2, 45, 2, 51, 46, 48, 51, 66, 56, 48, 85, 56, 85, 66, 96, 120, 120, 96, 530, 82, 2, 51, 56, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 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, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 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, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 19, 19, 19, 503, 19, 19, 19, 50, 498, 49, 50, 47, 49, 47, 47, 173, 19, 47, 19, 61, 497, 132, 61, 47, 132, 52, 53, 54, 52, 53, 54, 50, 58, 173, 50, 58, 19, 61, 49, 19, 20, 20, 20, 47, 20, 20, 20, 55, 53, 52, 55, 54, 491, 53, 64, 53, 20, 64, 20, 52, 57, 58, 62, 57, 59, 62, 55, 59, 97, 490, 83, 97, 55, 55, 489, 64, 20, 55, 59, 20, 25, 25, 97, 25, 25, 25, 60, 57, 60, 60, 83, 62, 60, 59, 70, 25, 70, 25, 25, 63, 284, 63, 63, 60, 134, 63, 70, 60, 284, 100, 75, 63, 100, 488, 134, 25, 75, 75, 25, 26, 26, 75, 26, 26, 26, 127, 70, 127, 71, 98, 71, 63, 98, 86, 26, 86, 26, 26, 100, 87, 71, 87, 92, 111, 92, 86, 111, 99, 92, 99, 99, 87, 103, 99, 26, 103, 98, 26, 27, 27, 71, 27, 27, 27, 102, 86, 110, 102, 487, 110, 111, 87, 93, 27, 93, 27, 27, 94, 93, 94, 110, 103, 112, 94, 93, 112, 147, 147, 116, 94, 102, 116, 105, 27, 102, 105, 27, 28, 28, 486, 28, 28, 28, 104, 93, 108, 104, 221, 108, 94, 105, 112, 28, 221, 28, 28, 101, 116, 101, 101, 107, 106, 101, 107, 106, 161, 161, 104, 101, 108, 104, 109, 28, 485, 109, 28, 29, 29, 484, 29, 29, 29, 107, 141, 151, 106, 151, 107, 101, 107, 109, 29, 483, 29, 29, 106, 109, 109, 141, 113, 119, 109, 113, 119, 114, 115, 114, 114, 115, 191, 114, 29, 191, 113, 29, 30, 30, 325, 30, 30, 30, 114, 119, 115, 118, 114, 463, 118, 113, 129, 30, 129, 30, 30, 117, 325, 117, 117, 170, 170, 117, 129, 135, 270, 270, 118, 117, 135, 199, 135, 30, 199, 205, 30, 80, 205, 462, 80, 80, 80, 80, 129, 199, 80, 80, 137, 117, 157, 142, 157, 142, 137, 137, 80, 81, 461, 137, 81, 81, 81, 81, 205, 157, 81, 81, 142, 144, 460, 144, 142, 152, 459, 152, 81, 153, 159, 153, 159, 144, 160, 457, 160, 152, 162, 456, 162, 153, 168, 166, 168, 166, 160, 169, 208, 169, 162, 208, 171, 144, 171, 302, 302, 152, 166, 169, 178, 153, 178, 176, 171, 176, 160, 176, 312, 312, 162, 179, 180, 179, 180, 178, 180, 455, 192, 169, 176, 192, 454, 179, 171, 181, 179, 181, 188, 193, 188, 194, 193, 195, 194, 195, 195, 181, 453, 195, 181, 196, 192, 179, 196, 197, 198, 200, 197, 198, 200, 201, 321, 321, 201, 193, 202, 181, 196, 202, 224, 452, 224, 194, 198, 203, 204, 451, 203, 204, 201, 206, 450, 200, 206, 197, 207, 209, 202, 207, 209, 203, 210, 449, 211, 210, 202, 211, 212, 448, 213, 212, 204, 213, 214, 418, 215, 214, 206, 215, 230, 216, 230, 207, 216, 209, 403, 217, 218, 211, 217, 218, 219, 402, 240, 219, 214, 240, 215, 212, 213, 220, 228, 235, 220, 235, 401, 241, 228, 228, 241, 217, 216, 228, 219, 239, 277, 239, 277, 220, 400, 239, 242, 218, 243, 242, 244, 243, 244, 244, 245, 241, 244, 245, 246, 247, 248, 246, 247, 248, 249, 250, 252, 249, 250, 252, 251, 245, 242, 251, 248, 253, 254, 247, 253, 254, 243, 399, 252, 255, 250, 310, 255, 310, 246, 398, 249, 256, 251, 257, 256, 258, 257, 397, 258, 259, 251, 253, 259, 260, 261, 254, 260, 261, 262, 263, 255, 262, 263, 265, 264, 396, 265, 264, 256, 266, 395, 267, 266, 258, 267, 394, 268, 269, 260, 268, 269, 263, 308, 393, 308, 261, 264, 316, 262, 316, 319, 392, 319, 266, 265, 269, 391, 308, 268, 324, 390, 324, 316, 324, 388, 327, 267, 327, 330, 327, 330, 333, 334, 335, 333, 334, 335, 336, 337, 387, 336, 337, 327, 330, 338, 339, 340, 338, 339, 340, 342, 335, 386, 342, 341, 336, 337, 385, 338, 384, 341, 343, 334, 341, 343, 344, 383, 345, 344, 342, 345, 346, 359, 347, 346, 339, 347, 340, 329, 343, 328, 345, 348, 344, 349, 348, 350, 349, 347, 350, 352, 351, 353, 352, 351, 353, 346, 326, 355, 349, 354, 355, 356, 354, 360, 356, 323, 360, 318, 348, 361, 362, 363, 361, 362, 363, 350, 351, 364, 354, 352, 364, 355, 317, 353, 315, 356, 309, 361, 362, 363, 367, 364, 365, 360, 366, 365, 367, 366, 368, 367, 369, 368, 370, 369, 307, 370, 372, 371, 373, 372, 371, 373, 374, 375, 306, 374, 375, 368, 369, 301, 370, 371, 365, 373, 376, 366, 377, 376, 375, 377, 378, 372, 379, 378, 380, 379, 300, 380, 381, 374, 299, 381, 382, 405, 405, 382, 407, 407, 410, 298, 297, 410, 377, 380, 376, 411, 412, 296, 411, 412, 378, 295, 381, 294, 379, 413, 382, 414, 413, 415, 414, 416, 415, 411, 416, 417, 419, 421, 417, 419, 421, 420, 422, 423, 420, 422, 423, 424, 293, 291, 424, 421, 415, 289, 288, 425, 414, 417, 425, 426, 423, 416, 426, 427, 419, 420, 427, 428, 287, 429, 428, 422, 429, 425, 430, 286, 431, 430, 424, 431, 432, 433, 285, 432, 433, 428, 429, 283, 426, 282, 434, 435, 430, 434, 435, 436, 437, 439, 436, 437, 439, 438, 440, 441, 438, 440, 441, 281, 280, 442, 433, 439, 442, 434, 279, 443, 444, 436, 443, 444, 441, 435, 278, 445, 437, 438, 445, 447, 276, 446, 447, 440, 446, 443, 464, 466, 467, 464, 466, 467, 442, 275, 465, 272, 447, 444, 468, 446, 465, 468, 469, 465, 470, 469, 471, 470, 472, 471, 238, 472, 474, 466, 236, 474, 232, 464, 475, 467, 471, 231, 468, 229, 475, 476, 469, 475, 476, 477, 478, 227, 477, 478, 472, 470, 480, 479, 481, 480, 479, 481, 482, 474, 492, 482, 493, 492, 226, 493, 494, 476, 481, 494, 478, 495, 496, 187, 495, 496, 477, 479, 499, 501, 186, 499, 501, 480, 482, 185, 502, 183, 182, 502, 177, 175, 492, 174, 172, 167, 499, 493, 165, 164, 158, 156, 155, 495, 502, 146, 145, 496, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 508, 508, 508, 508, 508, 508, 508, 508, 508, 508, 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, 510, 510, 143, 510, 510, 510, 510, 510, 510, 510, 511, 511, 511, 511, 512, 512, 513, 140, 139, 513, 513, 138, 513, 513, 513, 513, 514, 514, 136, 514, 514, 514, 514, 514, 514, 514, 515, 133, 131, 515, 515, 128, 515, 515, 515, 515, 516, 516, 517, 517, 517, 518, 518, 518, 518, 519, 519, 126, 519, 519, 519, 519, 519, 519, 519, 520, 520, 521, 521, 521, 122, 521, 521, 521, 521, 521, 522, 522, 91, 522, 88, 522, 522, 522, 522, 523, 523, 76, 523, 523, 523, 523, 523, 523, 523, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 525, 525, 74, 525, 73, 525, 525, 525, 525, 526, 526, 37, 526, 526, 526, 526, 526, 526, 526, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 528, 528, 528, 528, 35, 528, 528, 528, 528, 528, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 532, 532, 532, 532, 534, 534, 534, 534, 33, 31, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504 } ; extern int pycodeYY_flex_debug; int pycodeYY_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 pycodeYYtext */ \ 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 *pycodeYYtext; #line 1 "pycode.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 "pycode.l" #include #include #include "pycode.h" #include "message.h" #include "scanner.h" #include "entry.h" #include "doxygen.h" #include "outputlist.h" #include "util.h" #include "membername.h" #include "searchindex.h" #include "config.h" #include "groupdef.h" #include "classlist.h" #include "filedef.h" #include "namespacedef.h" #include "tooltip.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 static ClassSDict g_codeClassSDict(17); static QCString g_curClassName; static QStrList g_curClassBases; static CodeOutputInterface * g_code; static const char * g_inputString; //!< the code fragment as text static int g_inputPosition; //!< read offset during parsing static const char * g_currentFontClass; static bool g_needsTermination; static Definition *g_searchCtx; static bool g_collectXRefs; static int g_inputLines; //!< number of line in the code fragment static int g_yyLineNr; //!< current line number static FileDef * g_sourceFileDef; static Definition * g_currentDefinition; static MemberDef * g_currentMemberDef; static bool g_includeCodeFragment; static QCString g_realScope; //static bool g_insideBody; static int g_bodyCurlyCount; static bool g_searchingForBody; static QCString g_classScope; static int g_paramParens; //static int g_anchorCount; static bool g_exampleBlock; static QCString g_exampleName; static QCString g_exampleFile; static QCString g_type; static QCString g_name; static bool g_doubleStringIsDoc; static bool g_doubleQuote; static bool g_noSuiteFound; static int g_stringContext; static QValueStack g_indents; //!< Tracks indentation levels for scoping in python static void endFontClass(); static void adjustScopesAndSuites(unsigned indentLength); /*! Represents a stack of variable to class mappings as found in the * code. Each scope is enclosed in pushScope() and popScope() calls. * Variables are added by calling addVariables() and one can search * for variable using findVariable(). */ class PyVariableContext { public: static const ClassDef *dummyContext; class Scope : public SDict { public: Scope() : SDict(17) {} }; PyVariableContext() { m_scopes.setAutoDelete(TRUE); } virtual ~PyVariableContext() { } void pushScope() { m_scopes.append(new Scope); } void popScope() { if (m_scopes.count()>0) { m_scopes.remove(m_scopes.count()-1); } } void clear() { m_scopes.clear(); m_globalScope.clear(); } void clearExceptGlobal() { m_scopes.clear(); } void addVariable(const QCString &type,const QCString &name); ClassDef *findVariable(const QCString &name); private: Scope m_globalScope; QList m_scopes; }; void PyVariableContext::addVariable(const QCString &type,const QCString &name) { //printf("PyVariableContext::addVariable(%s,%s)\n",type.data(),name.data()); QCString ltype = type.simplifyWhiteSpace(); QCString lname = name.simplifyWhiteSpace(); Scope *scope = m_scopes.count()==0 ? &m_globalScope : m_scopes.getLast(); ClassDef *varType; if ( (varType=g_codeClassSDict[ltype]) || // look for class definitions inside the code block (varType=getResolvedClass(g_currentDefinition,g_sourceFileDef,ltype)) // look for global class definitions ) { scope->append(lname,varType); // add it to a list } else { if (m_scopes.count()>0) // for local variables add a dummy entry so the name // is hidden to avoid FALSE links to global variables with the same name // TODO: make this work for namespaces as well! { scope->append(lname,dummyContext); } } } ClassDef *PyVariableContext::findVariable(const QCString &name) { if (name.isEmpty()) return 0; ClassDef *result = 0; QListIterator sli(m_scopes); Scope *scope; // search from inner to outer scope for (sli.toLast();(scope=sli.current());--sli) { result = scope->find(name); if (result) { return result; } } // nothing found -> also try the global scope result=m_globalScope.find(name); return result; } static PyVariableContext g_theVarContext; const ClassDef *PyVariableContext::dummyContext = (ClassDef*)0x8; class PyCallContext { public: struct Ctx { Ctx() : name(g_name), type(g_type), cd(0) {} QCString name; QCString type; ClassDef *cd; }; PyCallContext() { m_classList.append(new Ctx); m_classList.setAutoDelete(TRUE); } virtual ~PyCallContext() {} void setClass(ClassDef *cd) { Ctx *ctx = m_classList.getLast(); if (ctx) { ctx->cd=cd; } } void pushScope() { m_classList.append(new Ctx); } void popScope() { if (m_classList.count()>1) { Ctx *ctx = m_classList.getLast(); if (ctx) { g_name = ctx->name; g_type = ctx->type; } m_classList.removeLast(); } else { } } void clear() { m_classList.clear(); m_classList.append(new Ctx); } ClassDef *getClass() const { Ctx *ctx = m_classList.getLast(); if (ctx) return ctx->cd; else return 0; } private: QList m_classList; }; static PyCallContext g_theCallContext; /*! counts the number of lines in the input */ static int countLines() { const char *p=g_inputString; char c; int count=1; while ((c=*p)) { p++ ; if (c=='\n') count++; } if (p>g_inputString && *(p-1)!='\n') { // last line does not end with a \n, so we add an extra // line and explicitly terminate the line after parsing. count++, g_needsTermination=TRUE; } return count; } static void setCurrentDoc(const QCString &anchor) { if (Doxygen::searchIndex) { if (g_searchCtx) { Doxygen::searchIndex->setCurrentDoc(g_searchCtx,g_searchCtx->anchor(),FALSE); } else { Doxygen::searchIndex->setCurrentDoc(g_sourceFileDef,anchor,TRUE); } } } static void addToSearchIndex(const char *text) { if (Doxygen::searchIndex) { Doxygen::searchIndex->addWord(text,FALSE); } } static ClassDef *stripClassName(const char *s,Definition *d=g_currentDefinition) { int pos=0; QCString type = s; QCString className; QCString templSpec; while (extractClassNameFromType(type,pos,className,templSpec)!=-1) { QCString clName=className+templSpec; ClassDef *cd=0; if (!g_classScope.isEmpty()) { cd=getResolvedClass(d,g_sourceFileDef,g_classScope+"::"+clName); } if (cd==0) { cd=getResolvedClass(d,g_sourceFileDef,clName); } if (cd) { return cd; } } return 0; } /*! start a new line of code, inserting a line number if g_sourceFileDef * is TRUE. If a definition starts at the current line, then the line * number is linked to the documentation of that definition. */ static void startCodeLine() { //if (g_currentFontClass) { g_code->endFontClass(); } if (g_sourceFileDef) { //QCString lineNumber,lineAnchor; //lineNumber.sprintf("%05d",g_yyLineNr); //lineAnchor.sprintf("l%05d",g_yyLineNr); Definition *d = g_sourceFileDef->getSourceDefinition(g_yyLineNr); //printf("startCodeLine %d d=%p\n",g_yyLineNr,d); //g_code->startLineNumber(); if (!g_includeCodeFragment && d && d->isLinkableInProject()) { g_currentDefinition = d; g_currentMemberDef = g_sourceFileDef->getSourceMember(g_yyLineNr); //g_insideBody = FALSE; g_searchingForBody = TRUE; g_realScope = d->name().copy(); g_classScope = d->name().copy(); //printf("Real scope: `%s'\n",g_realScope.data()); g_bodyCurlyCount = 0; QCString lineAnchor; lineAnchor.sprintf("l%05d",g_yyLineNr); if (g_currentMemberDef) { g_code->writeLineNumber(g_currentMemberDef->getReference(), g_currentMemberDef->getOutputFileBase(), g_currentMemberDef->anchor(),g_yyLineNr); setCurrentDoc(lineAnchor); } else { g_code->writeLineNumber(d->getReference(), d->getOutputFileBase(), 0,g_yyLineNr); setCurrentDoc(lineAnchor); } } else { //g_code->codify(lineNumber); g_code->writeLineNumber(0,0,0,g_yyLineNr); } //g_code->endLineNumber(); } g_code->startCodeLine(g_sourceFileDef); if (g_currentFontClass) { g_code->startFontClass(g_currentFontClass); } } static void codify(const char* text) { g_code->codify(text); } static void endCodeLine() { endFontClass(); g_code->endCodeLine(); } static void nextCodeLine() { const char *fc = g_currentFontClass; endCodeLine(); if (g_yyLineNraddTooltip(d); QCString ref = d->getReference(); QCString file = d->getOutputFileBase(); QCString anchor = d->anchor(); QCString tooltip; if (!sourceTooltips) // fall back to simple "title" tooltips { tooltip = d->briefDescriptionAsTooltip(); } bool done=FALSE; char *p=(char *)text; while (!done) { char *sp=p; char c; while ((c=*p++) && c!='\n') { } if (c=='\n') { g_yyLineNr++; *(p-1)='\0'; //printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp); ol.writeCodeLink(ref,file,anchor,sp,tooltip); nextCodeLine(); } else { //printf("writeCodeLink(%s,%s,%s,%s)\n",ref,file,anchor,sp); ol.writeCodeLink(ref,file,anchor,sp,tooltip); done=TRUE; } } } static void codifyLines(char *text) { //printf("codifyLines(%d,\"%s\")\n",g_yyLineNr,text); char *p=text,*sp=p; char c; bool done=FALSE; while (!done) { sp=p; while ((c=*p++) && c!='\n') { } if (c=='\n') { g_yyLineNr++; *(p-1)='\0'; g_code->codify(sp); nextCodeLine(); } else { g_code->codify(sp); done=TRUE; } } } static bool getLinkInScope(const QCString &c, // scope const QCString &m, // member const char *memberText, // exact text CodeOutputInterface &ol, const char *text ) { MemberDef *md; ClassDef *cd; FileDef *fd; NamespaceDef *nd; GroupDef *gd; //printf("Trying `%s'::`%s'\n",c.data(),m.data()); if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef) && md->isLinkable()) { //Definition *d=0; //if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd; Definition *d = md->getOuterScope()==Doxygen::globalScope ? md->getBodyDef() : md->getOuterScope(); //printf("Found! d=%s\n",d?d->name().data():""); if (md->getGroupDef()) d = md->getGroupDef(); if (d && d->isLinkable()) { g_theCallContext.setClass(stripClassName(md->typeString(),md->getOuterScope())); //printf("g_currentDefinition=%p g_currentMemberDef=%p\n", // g_currentDefinition,g_currentMemberDef); if (g_currentDefinition && g_currentMemberDef && md!=g_currentMemberDef && g_collectXRefs) { addDocCrossReference(g_currentMemberDef,md); } //printf("d->getReference()=`%s' d->getOutputBase()=`%s' name=`%s' member name=`%s'\n",d->getReference().data(),d->getOutputFileBase().data(),d->name().data(),md->name().data()); writeMultiLineCodeLink(ol,md, text ? text : memberText); addToSearchIndex(text ? text : memberText); return TRUE; } } return FALSE; } static bool getLink(const char *className, const char *memberName, CodeOutputInterface &ol, const char *text=0) { QCString m=removeRedundantWhiteSpace(memberName); QCString c=className; if (!getLinkInScope(c,m,memberName,ol,text)) { if (!g_curClassName.isEmpty()) { if (!c.isEmpty()) c.prepend("::"); c.prepend(g_curClassName); return getLinkInScope(c,m,memberName,ol,text); } return FALSE; } return TRUE; } /* For a given string in the source code, finds its class or global id and links to it. */ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName, bool typeOnly=FALSE) { QCString className=clName; // Don't do anything for empty text if (className.isEmpty()) return; DBG_CTX((stderr,"generateClassOrGlobalLink(className=%s)\n",className.data())); ClassDef *cd=0,*lcd=0; /** Class def that we may find */ MemberDef *md=0; /** Member def that we may find */ //bool isLocal=FALSE; if ((lcd=g_theVarContext.findVariable(className))==0) // not a local variable { Definition *d = g_currentDefinition; QCString scope = substitute(className,".","::"); cd = getResolvedClass(d,g_sourceFileDef,substitute(className,".","::"),&md); DBG_CTX((stderr,"d=%s g_sourceFileDef=%s\n", d?d->displayName().data():"", g_currentDefinition?g_currentDefinition->displayName().data():"")); DBG_CTX((stderr,"is found as a type %s\n",cd?cd->name().data():"")); if (cd==0 && md==0) // also see if it is variable or enum or enum value { NamespaceDef *nd = getResolvedNamespace(scope); if (nd) { writeMultiLineCodeLink(ol,nd,clName); addToSearchIndex(className); return; } else if (getLink(g_classScope,clName,ol,clName)) { return; } } } else { if (lcd!=PyVariableContext::dummyContext) { g_theCallContext.setClass(lcd); } //isLocal=TRUE; DBG_CTX((stderr,"is a local variable cd=%p!\n",cd)); } if (cd && cd->isLinkable()) // is it a linkable class { writeMultiLineCodeLink(ol,cd,clName); addToSearchIndex(className); if (md) { Definition *d = md->getOuterScope()==Doxygen::globalScope ? md->getBodyDef() : md->getOuterScope(); if (md->getGroupDef()) d = md->getGroupDef(); if (d && d->isLinkable() && md->isLinkable() && g_currentMemberDef && g_collectXRefs) { addDocCrossReference(g_currentMemberDef,md); } } } else // not a class, maybe a global member { int scopeEnd = className.findRev("."); if (scopeEnd!=-1 && !typeOnly) // name with explicit scope { QCString scope = substitute(className.left(scopeEnd),".","::"); QCString locName = className.right(className.length()-scopeEnd-1); ClassDef *mcd = getClass(scope); DBG_CTX((stderr,"scope=%s locName=%s mcd=%p\n",scope.data(),locName.data(),mcd)); if (mcd) { MemberDef *md = mcd->getMemberByName(locName); if (md) { g_theCallContext.setClass(stripClassName(md->typeString(),md->getOuterScope())); writeMultiLineCodeLink(ol,md,clName); addToSearchIndex(className); Definition *d = md->getOuterScope()==Doxygen::globalScope ? md->getBodyDef() : md->getOuterScope(); if (md->getGroupDef()) d = md->getGroupDef(); if (d && d->isLinkable() && md->isLinkable() && g_currentMemberDef && g_collectXRefs) { addDocCrossReference(g_currentMemberDef,md); } return; } } else // check namespace as well { NamespaceDef *mnd = getResolvedNamespace(scope); if (mnd) { MemberDef *md=mnd->getMemberByName(locName); if (md) { //printf("name=%s scope=%s\n",locName.data(),scope.data()); g_theCallContext.setClass(stripClassName(md->typeString(),md->getOuterScope())); writeMultiLineCodeLink(ol,md,clName); addToSearchIndex(className); Definition *d = md->getOuterScope()==Doxygen::globalScope ? md->getBodyDef() : md->getOuterScope(); if (md->getGroupDef()) d = md->getGroupDef(); if (d && d->isLinkable() && md->isLinkable() && g_currentMemberDef && g_collectXRefs) { addDocCrossReference(g_currentMemberDef,md); } return; } } } } // nothing found, just write out the word codifyLines(clName); addToSearchIndex(clName); } } /* As of June 1, this function seems to work for file members, but scopes are not being correctly tracked for classes so it doesn't work for classes yet. */ static void generateFunctionLink(CodeOutputInterface &ol,char *funcName) { //CodeClassDef *ccd=0; ClassDef *ccd=0; QCString locScope=g_classScope.copy(); QCString locFunc=removeRedundantWhiteSpace(funcName); DBG_CTX((stdout,"*** locScope=%s locFunc=%s\n",locScope.data(),locFunc.data())); int i=locFunc.findRev("::"); if (i>0) { locScope=locFunc.left(i); locFunc=locFunc.right(locFunc.length()-i-2).stripWhiteSpace(); } //printf("generateFunctionLink(%s) classScope=`%s'\n",locFunc.data(),locScope.data()); if (!locScope.isEmpty() && (ccd=g_codeClassSDict[locScope])) { //printf("using classScope %s\n",g_classScope.data()); if (ccd->baseClasses()) { BaseClassListIterator bcli(*ccd->baseClasses()); for ( ; bcli.current() ; ++bcli) { if (getLink(bcli.current()->classDef->name(),locFunc,ol,funcName)) { return; } } } } if (!getLink(locScope,locFunc,ol,funcName)) { generateClassOrGlobalLink(ol,funcName); } return; } static bool findMemberLink(CodeOutputInterface &ol,Definition *sym,const char *symName) { //printf("sym %s outerScope=%s equal=%d\n", // sym->name().data(),sym->getOuterScope()->name().data(), // sym->getOuterScope()==g_currentDefinition); if (sym->getOuterScope() && sym->getOuterScope()->definitionType()==Definition::TypeClass && g_currentDefinition->definitionType()==Definition::TypeClass) { ClassDef *cd = (ClassDef*)sym->getOuterScope(); ClassDef *thisCd = (ClassDef *)g_currentDefinition; if (sym->definitionType()==Definition::TypeMember) { if (g_currentMemberDef && g_collectXRefs) { addDocCrossReference(g_currentMemberDef,(MemberDef*)sym); } } DBG_CTX((stderr,"cd=%s thisCd=%s\n",cd?cd->name().data():"",thisCd?thisCd->name().data():"")); // TODO: find the nearest base class in case cd is a base class of // thisCd if (cd==thisCd || (thisCd && thisCd->isBaseClass(cd,TRUE))) { writeMultiLineCodeLink(ol,sym,symName); return TRUE; } } return FALSE; } static void findMemberLink(CodeOutputInterface &ol,char *symName) { //printf("Member reference: %s scope=%s member=%s\n", // pycodeYYtext, // g_currentDefinition?g_currentDefinition->name().data():"", // g_currentMemberDef?g_currentMemberDef->name().data():"" // ); if (g_currentDefinition) { DefinitionIntf *di = Doxygen::symbolMap->find(symName); if (di) { if (di->definitionType()==DefinitionIntf::TypeSymbolList) // multiple symbols { DefinitionListIterator dli(*(DefinitionList*)di); Definition *sym; for (dli.toFirst();(sym=dli.current());++dli) { if (findMemberLink(ol,sym,symName)) return; } } else // single symbol { if (findMemberLink(ol,(Definition*)di,symName)) return; } } } //printf("sym %s not found\n",&pycodeYYtext[5]); codify(symName); } static void startFontClass(const char *s) { endFontClass(); g_code->startFontClass(s); g_currentFontClass=s; } static void endFontClass() { if (g_currentFontClass) { g_code->endFontClass(); g_currentFontClass=0; } } #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 && g_inputString[g_inputPosition] ) { *buf = g_inputString[g_inputPosition++] ; c++; buf++; } return c; } #line 1973 "" #define INITIAL 0 #define Body 1 #define FunctionDec 2 #define FunctionParams 3 #define ClassDec 4 #define ClassInheritance 5 #define Suite 6 #define SuiteCaptureIndent 7 #define SuiteStart 8 #define SuiteMaintain 9 #define SuiteContinuing 10 #define LongString 11 #define SingleQuoteString 12 #define DoubleQuoteString 13 #define TripleString 14 #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 pycodeYYlex_destroy (void ); int pycodeYYget_debug (void ); void pycodeYYset_debug (int debug_flag ); YY_EXTRA_TYPE pycodeYYget_extra (void ); void pycodeYYset_extra (YY_EXTRA_TYPE user_defined ); FILE *pycodeYYget_in (void ); void pycodeYYset_in (FILE * in_str ); FILE *pycodeYYget_out (void ); void pycodeYYset_out (FILE * out_str ); yy_size_t pycodeYYget_leng (void ); char *pycodeYYget_text (void ); int pycodeYYget_lineno (void ); void pycodeYYset_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 pycodeYYwrap (void ); #else extern int pycodeYYwrap (void ); #endif #endif #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( pycodeYYtext, pycodeYYleng, 1, pycodeYYout )) {} } 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( pycodeYYin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( pycodeYYin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, pycodeYYin))==0 && ferror(pycodeYYin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(pycodeYYin); \ } \ }\ \ #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 pycodeYYlex (void); #define YY_DECL int pycodeYYlex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after pycodeYYtext and pycodeYYleng * 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 \ 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 964 "pycode.l" #line 2170 "" 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 *)pycodeYYalloc(YY_STATE_BUF_SIZE ); if ( ! (yy_state_buf) ) YY_FATAL_ERROR( "out of dynamic memory in pycodeYYlex()" ); if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! pycodeYYin ) pycodeYYin = stdin; if ( ! pycodeYYout ) pycodeYYout = stdout; if ( ! YY_CURRENT_BUFFER ) { pycodeYYensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = pycodeYY_create_buffer(pycodeYYin,YY_BUF_SIZE ); } pycodeYY_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of pycodeYYtext. */ *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_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 >= 505 ) 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] != 1627 ); 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; (yy_full_match) = yy_cp; (yy_full_state) = (yy_state_ptr); (yy_full_lp) = (yy_lp); } 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 967 "pycode.l" { startFontClass("keyword"); codify(pycodeYYtext); endFontClass(); BEGIN( FunctionDec ); } YY_BREAK case 2: YY_RULE_SETUP #line 974 "pycode.l" { startFontClass("keyword"); codify(pycodeYYtext); endFontClass(); BEGIN( ClassDec ); } YY_BREAK case 3: YY_RULE_SETUP #line 980 "pycode.l" { startFontClass("keywordtype"); codify(pycodeYYtext); endFontClass(); } YY_BREAK case 4: *yy_cp = (yy_hold_char); /* undo effects of setting up pycodeYYtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up pycodeYYtext again */ YY_RULE_SETUP #line 985 "pycode.l" { codify("self."); findMemberLink(*g_code,&pycodeYYtext[5]); } YY_BREAK case 5: YY_RULE_SETUP #line 989 "pycode.l" { codify("self."); findMemberLink(*g_code,&pycodeYYtext[5]); } YY_BREAK case 6: YY_RULE_SETUP #line 995 "pycode.l" { generateClassOrGlobalLink(*g_code,pycodeYYtext); // codify(pycodeYYtext); g_curClassName = pycodeYYtext; g_curClassBases.clear(); BEGIN( ClassInheritance ); } YY_BREAK case 7: YY_RULE_SETUP #line 1005 "pycode.l" { codify(pycodeYYtext); } YY_BREAK case 8: YY_RULE_SETUP #line 1009 "pycode.l" { // The parser // is assuming // that ALL identifiers // in this state // are base classes; // it doesn't check to see // that the first parenthesis // has been seen. // This is bad - it should // probably be more strict // about what to accept. g_curClassBases.inSort(pycodeYYtext); generateClassOrGlobalLink(*g_code,pycodeYYtext); // codify(pycodeYYtext); } YY_BREAK case 9: YY_RULE_SETUP #line 1028 "pycode.l" { codify(pycodeYYtext); // Assume this will // be a one-line suite; // found counter-example // in SuiteStart. // Push a class scope ClassDef *classDefToAdd = new ClassDef("",1,1,g_curClassName,ClassDef::Class,0,0,FALSE); g_codeClassSDict.append(g_curClassName,classDefToAdd); char *s=g_curClassBases.first(); while (s) { ClassDef *baseDefToAdd; baseDefToAdd=g_codeClassSDict[s]; // Try to find class in global // scope if (baseDefToAdd==0) { baseDefToAdd=getResolvedClass(g_currentDefinition,g_sourceFileDef,s); } if (baseDefToAdd && baseDefToAdd!=classDefToAdd) { classDefToAdd->insertBaseClass(baseDefToAdd,s,Public,Normal); } s=g_curClassBases.next(); } // Reset class-parsing variables. g_curClassName.resize(0); g_curClassBases.clear(); g_noSuiteFound = TRUE; BEGIN( SuiteStart ); } YY_BREAK case 10: YY_RULE_SETUP #line 1072 "pycode.l" { generateFunctionLink(*g_code,pycodeYYtext); } YY_BREAK case 11: YY_RULE_SETUP #line 1076 "pycode.l" { codify(pycodeYYtext); BEGIN( FunctionParams ); } YY_BREAK case 12: YY_RULE_SETUP #line 1083 "pycode.l" { // Parses delimiters codify(pycodeYYtext); } YY_BREAK case 13: YY_RULE_SETUP #line 1088 "pycode.l" { codify(pycodeYYtext); } YY_BREAK case 14: YY_RULE_SETUP #line 1092 "pycode.l" { codify(pycodeYYtext); } YY_BREAK case 15: YY_RULE_SETUP #line 1096 "pycode.l" { codify(pycodeYYtext); // Assume this will // be a one-line suite; // found counter-example // in SuiteStart. g_noSuiteFound = TRUE; BEGIN( SuiteStart ); } YY_BREAK case 16: YY_RULE_SETUP #line 1110 "pycode.l" { // Position-sensitive rules! // Must come AFTER keyword-triggered rules // Must come BEFORE identifier NONEMPTY-like rules // to syntax highlight. startFontClass("keyword"); codify(pycodeYYtext); endFontClass(); } YY_BREAK case 17: YY_RULE_SETUP #line 1121 "pycode.l" { startFontClass("keywordflow"); codify(pycodeYYtext); endFontClass(); } YY_BREAK case 18: *yy_cp = (yy_hold_char); /* undo effects of setting up pycodeYYtext */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up pycodeYYtext again */ YY_RULE_SETUP #line 1126 "pycode.l" { generateClassOrGlobalLink(*g_code,pycodeYYtext); } YY_BREAK case 19: YY_RULE_SETUP #line 1129 "pycode.l" { generateClassOrGlobalLink(*g_code,pycodeYYtext,TRUE); } YY_BREAK case 20: YY_RULE_SETUP #line 1132 "pycode.l" { codify(pycodeYYtext); } YY_BREAK case 21: YY_RULE_SETUP #line 1140 "pycode.l" { codify(pycodeYYtext); } YY_BREAK case 22: YY_RULE_SETUP #line 1143 "pycode.l" { startFontClass("keyword"); codifyLines(pycodeYYtext); endFontClass(); BEGIN(Body); } YY_BREAK case 23: YY_RULE_SETUP #line 1149 "pycode.l" { startFontClass("keyword"); codifyLines(pycodeYYtext); endFontClass(); // No indentation necessary g_noSuiteFound = FALSE; } YY_BREAK case 24: YY_RULE_SETUP #line 1158 "pycode.l" { startFontClass("keywordflow"); codifyLines(pycodeYYtext); endFontClass(); // No indentation necessary g_noSuiteFound = FALSE; } YY_BREAK case 25: YY_RULE_SETUP #line 1166 "pycode.l" { codify(pycodeYYtext); } YY_BREAK case 26: YY_RULE_SETUP #line 1171 "pycode.l" { // This eats EVERYTHING // except the newline startFontClass("comment"); codifyLines(pycodeYYtext); endFontClass(); } YY_BREAK case 27: /* rule 27 can match eol */ YY_RULE_SETUP #line 1179 "pycode.l" { codifyLines(pycodeYYtext); if ( g_noSuiteFound ) { // printf("New suite to capture! [%d]\n", g_yyLineNr); BEGIN ( SuiteCaptureIndent ); } } YY_BREAK case 28: /* rule 28 can match eol */ YY_RULE_SETUP #line 1190 "pycode.l" { // Blankline - ignore, keep looking for indentation. codifyLines(pycodeYYtext); } YY_BREAK case 29: YY_RULE_SETUP #line 1195 "pycode.l" { // This state lasts momentarily, // to check the indentation // level that is about to be // used. codifyLines(pycodeYYtext); g_indents.push(pycodeYYleng); // printf("Captured indent of %d [line %d]\n", pycodeYYleng, g_yyLineNr); BEGIN( Suite ); } YY_BREAK case 30: YY_RULE_SETUP #line 1209 "pycode.l" { // This implements poor // indendation-tracking; // should be improved. // (translate tabs to space, etc) codifyLines(pycodeYYtext); adjustScopesAndSuites((int)pycodeYYleng); } YY_BREAK case 31: /* rule 31 can match eol */ YY_RULE_SETUP #line 1218 "pycode.l" { // If this ever succeeds, // it means that this is // a blank line, and // can be ignored. codifyLines(pycodeYYtext); } YY_BREAK case 32: YY_RULE_SETUP #line 1226 "pycode.l" { // Default rule; matches // the empty string, assuming // real text starts here. // Just go straight to Body. adjustScopesAndSuites(0); } YY_BREAK case 33: /* rule 33 can match eol */ YY_RULE_SETUP #line 1236 "pycode.l" { codifyLines(pycodeYYtext); BEGIN( SuiteMaintain ); } YY_BREAK case 34: YY_RULE_SETUP #line 1240 "pycode.l" { codify(pycodeYYtext); } YY_BREAK case 35: /* rule 35 can match eol */ YY_RULE_SETUP #line 1243 "pycode.l" { codifyLines(pycodeYYtext); } YY_BREAK // Single quoted string like 'That\'s a """nice""" string!' case 36: /* rule 36 can match eol */ YY_RULE_SETUP #line 1248 "pycode.l" { // line continuation codifyLines(pycodeYYtext); } YY_BREAK case 37: YY_RULE_SETUP #line 1251 "pycode.l" { // espaced char codify(pycodeYYtext); } YY_BREAK case 38: YY_RULE_SETUP #line 1254 "pycode.l" { // tripple double quotes codify(pycodeYYtext); } YY_BREAK case 39: YY_RULE_SETUP #line 1257 "pycode.l" { // end of the string codify(pycodeYYtext); endFontClass(); BEGIN(g_stringContext); } YY_BREAK case 40: YY_RULE_SETUP #line 1262 "pycode.l" { // normal chars codify(pycodeYYtext); } YY_BREAK case 41: YY_RULE_SETUP #line 1265 "pycode.l" { // normal char codify(pycodeYYtext); } YY_BREAK // Double quoted string like "That's \"a '''nice'''\" string!" case 42: /* rule 42 can match eol */ YY_RULE_SETUP #line 1271 "pycode.l" { // line continuation codifyLines(pycodeYYtext); } YY_BREAK case 43: YY_RULE_SETUP #line 1274 "pycode.l" { // espaced char codify(pycodeYYtext); } YY_BREAK case 44: YY_RULE_SETUP #line 1277 "pycode.l" { // tripple single quotes codify(pycodeYYtext); } YY_BREAK case 45: YY_RULE_SETUP #line 1280 "pycode.l" { // end of the string codify(pycodeYYtext); endFontClass(); BEGIN(g_stringContext); } YY_BREAK case 46: YY_RULE_SETUP #line 1285 "pycode.l" { // normal chars codify(pycodeYYtext); } YY_BREAK case 47: YY_RULE_SETUP #line 1288 "pycode.l" { // normal char codify(pycodeYYtext); } YY_BREAK case 48: #line 1295 "pycode.l" case 49: YY_RULE_SETUP #line 1295 "pycode.l" { codify(pycodeYYtext); if (g_doubleQuote==(pycodeYYtext[0]=='"')) { endFontClass(); BEGIN(g_stringContext); } } YY_BREAK case 50: /* rule 50 can match eol */ YY_RULE_SETUP #line 1303 "pycode.l" { codifyLines(pycodeYYtext); } YY_BREAK case 51: /* rule 51 can match eol */ YY_RULE_SETUP #line 1306 "pycode.l" { codifyLines(pycodeYYtext); } YY_BREAK case 52: YY_RULE_SETUP #line 1309 "pycode.l" { codify(pycodeYYtext); } YY_BREAK /* <*>({NONEMPTY}|{EXPCHAR}|{BB}) { // This should go one character at a time. codify(pycodeYYtext); // printf("[pycode] '%s' [ state %d ] [line %d] no match\n", // pycodeYYtext, YY_START, g_yyLineNr); //endFontClass(); BEGIN(Body); } */ case 53: #line 1326 "pycode.l" case 54: YY_RULE_SETUP #line 1326 "pycode.l" { startFontClass("stringliteral"); g_stringContext=YY_START; g_doubleQuote=pycodeYYtext[pycodeYYleng-1]=='"'; codify(pycodeYYtext); BEGIN(TripleString); } YY_BREAK case 55: YY_RULE_SETUP #line 1333 "pycode.l" { // single quoted string startFontClass("stringliteral"); g_stringContext=YY_START; codify(pycodeYYtext); BEGIN(SingleQuoteString); } YY_BREAK case 56: YY_RULE_SETUP #line 1339 "pycode.l" { // double quoted string startFontClass("stringliteral"); g_stringContext=YY_START; codify(pycodeYYtext); BEGIN(DoubleQuoteString); } YY_BREAK case 57: YY_RULE_SETUP #line 1345 "pycode.l" { if (YY_START==SingleQuoteString || YY_START==DoubleQuoteString || YY_START==TripleString ) { REJECT; } // This eats EVERYTHING // except the newline startFontClass("comment"); codifyLines(pycodeYYtext); endFontClass(); } YY_BREAK case 58: /* rule 58 can match eol */ YY_RULE_SETUP #line 1359 "pycode.l" { codifyLines(pycodeYYtext); //printf("[pycode] %d NEWLINE [line %d] no match\n", // YY_START, g_yyLineNr); //endFontClass(); BEGIN(Body); } YY_BREAK case 59: YY_RULE_SETUP #line 1368 "pycode.l" { codify(pycodeYYtext); BEGIN(Body); } YY_BREAK case 60: YY_RULE_SETUP #line 1372 "pycode.l" { codify(pycodeYYtext); // printf("[pycode] '%s' [ state %d ] [line %d] no match\n", // pycodeYYtext, YY_START, g_yyLineNr); //endFontClass(); BEGIN(Body); } YY_BREAK case 61: YY_RULE_SETUP #line 1381 "pycode.l" ECHO; YY_BREAK #line 2916 "" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(Body): case YY_STATE_EOF(FunctionDec): case YY_STATE_EOF(FunctionParams): case YY_STATE_EOF(ClassDec): case YY_STATE_EOF(ClassInheritance): case YY_STATE_EOF(Suite): case YY_STATE_EOF(SuiteCaptureIndent): case YY_STATE_EOF(SuiteStart): case YY_STATE_EOF(SuiteMaintain): case YY_STATE_EOF(SuiteContinuing): case YY_STATE_EOF(LongString): case YY_STATE_EOF(SingleQuoteString): case YY_STATE_EOF(DoubleQuoteString): case YY_STATE_EOF(TripleString): 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 pycodeYYin at a new source and called * pycodeYYlex(). 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 = pycodeYYin; 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 ( pycodeYYwrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * pycodeYYtext, 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 pycodeYYlex */ /* 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; pycodeYYrestart(pycodeYYin ); } 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 *) pycodeYYrealloc((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_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 >= 505 ) 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 >= 505 ) 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 == 504); if ( ! yy_is_jam ) *(yy_state_ptr)++ = yy_current_state; return yy_is_jam ? 0 : yy_current_state; } #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. */ pycodeYYrestart(pycodeYYin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( pycodeYYwrap( ) ) 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 pycodeYYtext */ (yy_hold_char) = *++(yy_c_buf_p); 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 pycodeYYrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ pycodeYYensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = pycodeYY_create_buffer(pycodeYYin,YY_BUF_SIZE ); } pycodeYY_init_buffer(YY_CURRENT_BUFFER,input_file ); pycodeYY_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void pycodeYY_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * pycodeYYpop_buffer_state(); * pycodeYYpush_buffer_state(new_buffer); */ pycodeYYensure_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; pycodeYY_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (pycodeYYwrap()) processing, but the only time this flag * is looked at is after pycodeYYwrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void pycodeYY_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; pycodeYYin = 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 pycodeYY_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) pycodeYYalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in pycodeYY_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 *) pycodeYYalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in pycodeYY_create_buffer()" ); b->yy_is_our_buffer = 1; pycodeYY_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with pycodeYY_create_buffer() * */ void pycodeYY_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 ) pycodeYYfree((void *) b->yy_ch_buf ); pycodeYYfree((void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a pycodeYYrestart() or at EOF. */ static void pycodeYY_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; pycodeYY_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then pycodeYY_init_buffer was _probably_ * called from pycodeYYrestart() 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 pycodeYY_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 ) pycodeYY_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 pycodeYYpush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; pycodeYYensure_buffer_stack(); /* This block is copied from pycodeYY_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 pycodeYY_switch_to_buffer. */ pycodeYY_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 pycodeYYpop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; pycodeYY_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { pycodeYY_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 pycodeYYensure_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**)pycodeYYalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in pycodeYYensure_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**)pycodeYYrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in pycodeYYensure_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 pycodeYY_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) pycodeYYalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in pycodeYY_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; pycodeYY_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to pycodeYYlex() 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 * pycodeYY_scan_bytes() instead. */ YY_BUFFER_STATE pycodeYY_scan_string (yyconst char * yystr ) { return pycodeYY_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to pycodeYYlex() 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 pycodeYY_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 *) pycodeYYalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in pycodeYY_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 = pycodeYY_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in pycodeYY_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 pycodeYYtext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ pycodeYYtext[pycodeYYleng] = (yy_hold_char); \ (yy_c_buf_p) = pycodeYYtext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ pycodeYYleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int pycodeYYget_lineno (void) { return pycodeYYlineno; } /** Get the input stream. * */ FILE *pycodeYYget_in (void) { return pycodeYYin; } /** Get the output stream. * */ FILE *pycodeYYget_out (void) { return pycodeYYout; } /** Get the length of the current token. * */ yy_size_t pycodeYYget_leng (void) { return pycodeYYleng; } /** Get the current token. * */ char *pycodeYYget_text (void) { return pycodeYYtext; } /** Set the current line number. * @param line_number * */ void pycodeYYset_lineno (int line_number ) { pycodeYYlineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see pycodeYY_switch_to_buffer */ void pycodeYYset_in (FILE * in_str ) { pycodeYYin = in_str ; } void pycodeYYset_out (FILE * out_str ) { pycodeYYout = out_str ; } int pycodeYYget_debug (void) { return pycodeYY_flex_debug; } void pycodeYYset_debug (int bdebug ) { pycodeYY_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from pycodeYYlex_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 pycodeYYin = stdin; pycodeYYout = stdout; #else pycodeYYin = (FILE *) 0; pycodeYYout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * pycodeYYlex_init() */ return 0; } /* pycodeYYlex_destroy is for both reentrant and non-reentrant scanners. */ int pycodeYYlex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ pycodeYY_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; pycodeYYpop_buffer_state(); } /* Destroy the stack itself. */ pycodeYYfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; pycodeYYfree ( (yy_state_buf) ); (yy_state_buf) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * pycodeYYlex() 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 *pycodeYYalloc (yy_size_t size ) { return (void *) malloc( size ); } void *pycodeYYrealloc (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 pycodeYYfree (void * ptr ) { free( (char *) ptr ); /* see pycodeYYrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 1381 "pycode.l" /*@ ---------------------------------------------------------------------------- */ void resetPythonCodeParserState() { g_currentDefinition = 0; g_currentMemberDef = 0; g_doubleStringIsDoc = FALSE; g_paramParens = 0; g_indents.clear(); BEGIN( Body ); } /*! Examines current stack of white-space indentations; re-syncs the parser with the correct scope. */ static void adjustScopesAndSuites(unsigned indentLength) { // States to pop if (!g_indents.isEmpty() && indentLength < g_indents.top()) { while (!g_indents.isEmpty() && indentLength < g_indents.top()) { // printf("Exited scope indent of [%d]\n", g_indents.top()); g_indents.pop(); // Pop the old suite's indentation g_currentMemberDef=0; if (g_currentDefinition) g_currentDefinition=g_currentDefinition->getOuterScope(); } } // Are there any remaining indentation levels for suites? if (!g_indents.isEmpty()) { BEGIN( Suite ); } else { BEGIN( Body ); } } void parsePythonCode(CodeOutputInterface &od,const char * /*className*/, const QCString &s,bool exBlock, const char *exName, FileDef *fd,int startLine,int endLine,bool /*inlineFragment*/, MemberDef *,bool,Definition *searchCtx,bool collectXRefs) { //printf("***parseCode()\n"); //-------------------------------------- if (s.isEmpty()) return; printlex(pycodeYY_flex_debug, TRUE, __FILE__, fd ? fd->fileName().data(): NULL); TooltipManager::instance()->clearTooltips(); g_code = &od; g_inputString = s; g_inputPosition = 0; g_currentFontClass = 0; g_needsTermination = FALSE; g_searchCtx=searchCtx; g_collectXRefs=collectXRefs; if (endLine!=-1) g_inputLines = endLine+1; else g_inputLines = countLines(); if (startLine!=-1) g_yyLineNr = startLine; else g_yyLineNr = 1; g_exampleBlock = exBlock; g_exampleName = exName; g_sourceFileDef = fd; bool cleanupSourceDef = FALSE; if (fd==0) { // create a dummy filedef for the example g_sourceFileDef = new FileDef("",(exName?exName:"generated")); cleanupSourceDef = TRUE; } if (g_sourceFileDef) { setCurrentDoc("l00001"); } // Starts line 1 on the output startCodeLine(); pycodeYYrestart( pycodeYYin ); pycodeYYlex(); if (!g_indents.isEmpty()) { // printf("Exited pysourceparser in inconsistent state!\n"); } if (g_needsTermination) { endCodeLine(); } if (fd) { TooltipManager::instance()->writeTooltips(*g_code); } if (cleanupSourceDef) { // delete the temporary file definition used for this example delete g_sourceFileDef; g_sourceFileDef=0; } printlex(pycodeYY_flex_debug, FALSE, __FILE__, fd ? fd->fileName().data(): NULL); return; } #if !defined(YY_FLEX_SUBMINOR_VERSION) extern "C" { // some bogus code to keep the compiler happy void pycodeYYdummy() { yy_flex_realloc(0,0); } } #elif YY_FLEX_SUBMINOR_VERSION<33 #error "You seem to be using a version of flex newer than 2.5.4. These are currently incompatible with 2.5.4, and do NOT work with doxygen! Please use version 2.5.4 or expect things to be parsed wrongly! A bug report has been submitted (#732132)." #endif