4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
8 #define yy_create_buffer pyscanYY_create_buffer
9 #define yy_delete_buffer pyscanYY_delete_buffer
10 #define yy_flex_debug pyscanYY_flex_debug
11 #define yy_init_buffer pyscanYY_init_buffer
12 #define yy_flush_buffer pyscanYY_flush_buffer
13 #define yy_load_buffer_state pyscanYY_load_buffer_state
14 #define yy_switch_to_buffer pyscanYY_switch_to_buffer
15 #define yyin pyscanYYin
16 #define yyleng pyscanYYleng
17 #define yylex pyscanYYlex
18 #define yylineno pyscanYYlineno
19 #define yyout pyscanYYout
20 #define yyrestart pyscanYYrestart
21 #define yytext pyscanYYtext
22 #define yywrap pyscanYYwrap
23 #define yyalloc pyscanYYalloc
24 #define yyrealloc pyscanYYrealloc
25 #define yyfree pyscanYYfree
28 #define YY_FLEX_MAJOR_VERSION 2
29 #define YY_FLEX_MINOR_VERSION 5
30 #define YY_FLEX_SUBMINOR_VERSION 35
31 #if YY_FLEX_SUBMINOR_VERSION > 0
35 /* First, we deal with platform-specific or compiler-specific issues. */
37 /* begin standard C headers. */
43 /* end standard C headers. */
45 /* flex integer type definitions */
50 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
55 * if you want the limit (max/min) macros for int types.
57 #ifndef __STDC_LIMIT_MACROS
58 #define __STDC_LIMIT_MACROS 1
62 typedef int8_t flex_int8_t;
63 typedef uint8_t flex_uint8_t;
64 typedef int16_t flex_int16_t;
65 typedef uint16_t flex_uint16_t;
66 typedef int32_t flex_int32_t;
67 typedef uint32_t flex_uint32_t;
68 typedef uint64_t flex_uint64_t;
70 typedef signed char flex_int8_t;
71 typedef short int flex_int16_t;
72 typedef int flex_int32_t;
73 typedef unsigned char flex_uint8_t;
74 typedef unsigned short int flex_uint16_t;
75 typedef unsigned int flex_uint32_t;
78 /* Limits of integral types. */
80 #define INT8_MIN (-128)
83 #define INT16_MIN (-32767-1)
86 #define INT32_MIN (-2147483647-1)
89 #define INT8_MAX (127)
92 #define INT16_MAX (32767)
95 #define INT32_MAX (2147483647)
98 #define UINT8_MAX (255U)
101 #define UINT16_MAX (65535U)
104 #define UINT32_MAX (4294967295U)
107 #endif /* ! FLEXINT_H */
111 /* The "const" storage-class-modifier is valid. */
114 #else /* ! __cplusplus */
116 /* C99 requires __STDC__ to be defined as 1. */
117 #if defined (__STDC__)
121 #endif /* defined (__STDC__) */
122 #endif /* ! __cplusplus */
125 #define yyconst const
130 /* Returned upon end-of-file. */
133 /* Promotes a possibly negative, possibly signed char to an unsigned
134 * integer for use as an array index. If the signed char is negative,
135 * we want to instead treat it as an 8-bit unsigned char, hence the
138 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
140 /* Enter a start condition. This macro really ought to take a parameter,
141 * but we do it the disgusting crufty way forced on us by the ()-less
142 * definition of BEGIN.
144 #define BEGIN (yy_start) = 1 + 2 *
146 /* Translate the current start state into a value that can be later handed
147 * to BEGIN to return to the state. The YYSTATE alias is for lex
150 #define YY_START (((yy_start) - 1) / 2)
151 #define YYSTATE YY_START
153 /* Action number for EOF rule of a given start state. */
154 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
156 /* Special action meaning "start processing a new file". */
157 #define YY_NEW_FILE pyscanYYrestart(pyscanYYin )
159 #define YY_END_OF_BUFFER_CHAR 0
161 /* Size of default input buffer. */
163 #define YY_BUF_SIZE 262144
166 /* The state buf must be large enough to hold one state per character in the main buffer.
168 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
170 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
171 #define YY_TYPEDEF_YY_BUFFER_STATE
172 typedef struct yy_buffer_state *YY_BUFFER_STATE;
175 #ifndef YY_TYPEDEF_YY_SIZE_T
176 #define YY_TYPEDEF_YY_SIZE_T
177 typedef size_t yy_size_t;
180 extern yy_size_t pyscanYYleng;
182 extern FILE *pyscanYYin, *pyscanYYout;
184 #define EOB_ACT_CONTINUE_SCAN 0
185 #define EOB_ACT_END_OF_FILE 1
186 #define EOB_ACT_LAST_MATCH 2
188 #define YY_LESS_LINENO(n)
190 /* Return all but the first "n" matched characters back to the input stream. */
194 /* Undo effects of setting up pyscanYYtext. */ \
195 int yyless_macro_arg = (n); \
196 YY_LESS_LINENO(yyless_macro_arg);\
197 *yy_cp = (yy_hold_char); \
198 YY_RESTORE_YY_MORE_OFFSET \
199 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
200 YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */ \
204 #define unput(c) yyunput( c, (yytext_ptr) )
206 #ifndef YY_STRUCT_YY_BUFFER_STATE
207 #define YY_STRUCT_YY_BUFFER_STATE
208 struct yy_buffer_state
212 char *yy_ch_buf; /* input buffer */
213 char *yy_buf_pos; /* current position in input buffer */
215 /* Size of input buffer in bytes, not including room for EOB
218 yy_size_t yy_buf_size;
220 /* Number of characters read into yy_ch_buf, not including EOB
223 yy_size_t yy_n_chars;
225 /* Whether we "own" the buffer - i.e., we know we created it,
226 * and can realloc() it to grow it, and should free() it to
229 int yy_is_our_buffer;
231 /* Whether this is an "interactive" input source; if so, and
232 * if we're using stdio for input, then we want to use getc()
233 * instead of fread(), to make sure we stop fetching input after
236 int yy_is_interactive;
238 /* Whether we're considered to be at the beginning of a line.
239 * If so, '^' rules will be active on the next match, otherwise
244 int yy_bs_lineno; /**< The line count. */
245 int yy_bs_column; /**< The column count. */
247 /* Whether to try to fill the input buffer when we reach the
252 int yy_buffer_status;
254 #define YY_BUFFER_NEW 0
255 #define YY_BUFFER_NORMAL 1
256 /* When an EOF's been seen but there's still some text to process
257 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
258 * shouldn't try reading from the input source any more. We might
259 * still have a bunch of tokens to match, though, because of
260 * possible backing-up.
262 * When we actually see the EOF, we change the status to "new"
263 * (via pyscanYYrestart()), so that the user can continue scanning by
264 * just pointing pyscanYYin at a new input file.
266 #define YY_BUFFER_EOF_PENDING 2
269 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
271 /* Stack of input buffers. */
272 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
273 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
274 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
276 /* We provide macros for accessing buffer states in case in the
277 * future we want to put the buffer states in a more general
280 * Returns the top of the stack, or NULL.
282 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
283 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
286 /* Same as previous macro, but useful when we know that the buffer stack is not
287 * NULL or when we need an lvalue. For internal use only.
289 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
291 /* yy_hold_char holds the character lost when pyscanYYtext is formed. */
292 static char yy_hold_char;
293 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
294 yy_size_t pyscanYYleng;
296 /* Points to current character in buffer. */
297 static char *yy_c_buf_p = (char *) 0;
298 static int yy_init = 0; /* whether we need to initialize */
299 static int yy_start = 0; /* start state number */
301 /* Flag which is used to allow pyscanYYwrap()'s to do buffer switches
302 * instead of setting up a fresh pyscanYYin. A bit of a hack ...
304 static int yy_did_buffer_switch_on_eof;
306 void pyscanYYrestart (FILE *input_file );
307 void pyscanYY_switch_to_buffer (YY_BUFFER_STATE new_buffer );
308 YY_BUFFER_STATE pyscanYY_create_buffer (FILE *file,int size );
309 void pyscanYY_delete_buffer (YY_BUFFER_STATE b );
310 void pyscanYY_flush_buffer (YY_BUFFER_STATE b );
311 void pyscanYYpush_buffer_state (YY_BUFFER_STATE new_buffer );
312 void pyscanYYpop_buffer_state (void );
314 static void pyscanYYensure_buffer_stack (void );
315 static void pyscanYY_load_buffer_state (void );
316 static void pyscanYY_init_buffer (YY_BUFFER_STATE b,FILE *file );
318 #define YY_FLUSH_BUFFER pyscanYY_flush_buffer(YY_CURRENT_BUFFER )
320 YY_BUFFER_STATE pyscanYY_scan_buffer (char *base,yy_size_t size );
321 YY_BUFFER_STATE pyscanYY_scan_string (yyconst char *yy_str );
322 YY_BUFFER_STATE pyscanYY_scan_bytes (yyconst char *bytes,yy_size_t len );
324 void *pyscanYYalloc (yy_size_t );
325 void *pyscanYYrealloc (void *,yy_size_t );
326 void pyscanYYfree (void * );
328 #define yy_new_buffer pyscanYY_create_buffer
330 #define yy_set_interactive(is_interactive) \
332 if ( ! YY_CURRENT_BUFFER ){ \
333 pyscanYYensure_buffer_stack (); \
334 YY_CURRENT_BUFFER_LVALUE = \
335 pyscanYY_create_buffer(pyscanYYin,YY_BUF_SIZE ); \
337 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
340 #define yy_set_bol(at_bol) \
342 if ( ! YY_CURRENT_BUFFER ){\
343 pyscanYYensure_buffer_stack (); \
344 YY_CURRENT_BUFFER_LVALUE = \
345 pyscanYY_create_buffer(pyscanYYin,YY_BUF_SIZE ); \
347 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
350 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
352 /* Begin user sect3 */
354 #define pyscanYYwrap(n) 1
355 #define YY_SKIP_YYWRAP
357 typedef unsigned char YY_CHAR;
359 FILE *pyscanYYin = (FILE *) 0, *pyscanYYout = (FILE *) 0;
361 typedef int yy_state_type;
363 extern int pyscanYYlineno;
365 int pyscanYYlineno = 1;
367 extern char *pyscanYYtext;
368 #define yytext_ptr pyscanYYtext
370 static yy_state_type yy_get_previous_state (void );
371 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
372 static int yy_get_next_buffer (void );
373 static void yy_fatal_error (yyconst char msg[] );
375 /* Done after the current pattern has been matched and before the
376 * corresponding action - sets up pyscanYYtext.
378 #define YY_DO_BEFORE_ACTION \
379 (yytext_ptr) = yy_bp; \
380 pyscanYYleng = (yy_size_t) (yy_cp - yy_bp); \
381 (yy_hold_char) = *yy_cp; \
383 (yy_c_buf_p) = yy_cp;
385 #define YY_NUM_RULES 152
386 #define YY_END_OF_BUFFER 153
387 /* This struct is not used in this scanner,
388 but its presence is necessary. */
391 flex_int32_t yy_verify;
394 static yyconst flex_int16_t yy_acclist[753] =
396 16482,16482, 100, 100, 25, 25, 31, 31, 36, 36,
397 153, 151, 152, 150, 152, 21, 151, 152, 17, 150,
398 152, 12, 21, 151, 152, 21, 151, 152, 11, 21,
399 151, 152, 21, 151, 152, 15, 21, 151, 152, 15,
400 21, 151, 152, 15, 21, 151, 152, 15, 21, 151,
401 152, 15, 21, 151, 152, 16, 21, 151, 152, 15,
402 21, 151, 152,16393,16394, 15, 21, 151, 152,16393,
403 16394, 15, 21, 151, 152,16393,16394, 15, 21, 151,
404 152,16393,16394, 15, 21, 151, 152,16393,16394, 47,
405 48, 151, 152, 45, 150, 152, 44, 48, 151, 152,
407 48, 151, 152, 43, 48, 151, 152, 48, 151, 152,
408 46, 48, 151, 152, 46, 48, 151, 152, 125, 127,
409 151, 152, 127, 151, 152, 126, 150, 152, 127, 151,
410 152, 127, 151, 152, 124, 127, 151, 152, 130, 132,
411 151, 152, 131, 150, 152, 132, 151, 152, 130, 132,
412 151, 152, 128, 132, 151, 152, 151, 152, 65, 151,
413 152, 64, 151, 152, 63, 151, 152, 72, 151, 152,
414 66, 151, 152, 72, 151, 152, 69, 151, 152, 66,
415 72, 151, 152, 70, 151, 152, 68, 72, 151, 152,
416 67, 72, 151, 152, 55, 59, 151, 152, 59, 151,
418 152, 58, 150, 152,16433, 54, 59, 151, 152, 57,
419 59, 151, 152, 53, 59, 151, 152, 52, 59, 151,
420 152, 57, 59, 151, 152, 76, 151, 152, 77, 150,
421 152, 73, 76, 151, 152, 75, 76, 151, 152, 74,
422 76, 151, 152, 90, 151, 152, 91, 151, 152, 91,
423 151, 152, 92, 151, 152, 93, 151, 152, 151, 152,
424 94, 150, 152, 8290, 151, 152, 151, 152, 151, 152,
425 97, 151, 152, 84, 87, 151, 152, 87, 151, 152,
426 85, 150, 152, 83, 87, 151, 152, 87, 151, 152,
427 82, 87, 151, 152, 81, 87, 151, 152, 112, 151,
429 152, 100, 112, 151, 152, 113, 150, 152, 104, 112,
430 151, 152, 110, 112, 151, 152, 103, 112, 151, 152,
431 107, 112, 151, 152, 101, 112, 151, 152, 101, 112,
432 151, 152, 99, 112, 151, 152, 111, 112, 151, 152,
433 111, 112, 151, 152, 111, 112, 151, 152, 108, 112,
434 151, 152, 111, 112, 151, 152, 109, 112, 151, 152,
435 121, 151, 152, 120, 150, 152, 118, 151, 152, 119,
436 150, 152, 116, 118, 151, 152, 114, 118, 151, 152,
437 115, 118, 151, 152, 117, 118, 151, 152, 137, 138,
438 151, 152, 138, 151, 152, 136, 138, 151, 152, 138,
440 151, 152, 143, 144, 151, 152, 142, 144, 151, 152,
441 144, 151, 152, 144, 151, 152, 147, 149, 151, 152,
442 147, 148, 150, 152, 147, 149, 151, 152, 147, 149,
443 151, 152, 149, 151, 152, 26, 151, 152, 25, 26,
444 151, 152, 24, 150, 152, 22, 26, 151, 152, 22,
445 26, 151, 152, 33, 151, 152, 31, 33, 151, 152,
446 30, 150, 152, 27, 33, 151, 152, 32, 33, 151,
447 152, 29, 33, 151, 152,16412, 37, 151, 152, 36,
448 37, 151, 152, 35, 150, 152, 34, 37, 151, 152,
449 17, 14, 15, 15, 15, 15, 15, 16,16393,16394,
451 16393,16394,16393,16394,16393,16394,16393,16394, 15,16393,
452 16394, 15,16393,16394, 15,16393,16394, 15,16393,16394,
453 15,16393,16394, 47, 42, 46, 46, 125, 124, 130,
454 129, 130, 128, 128, 65, 64, 63, 66, 71, 70,
455 67, 55,16433, 57, 57, 52, 51, 56, 57, 90,
456 91, 93, 94, 97, 84, 86, 81, 80, 100, 110,
457 101, 101, 101, 111, 104, 103, 111, 117, 137, 134,
458 134, 133, 143, 140, 140, 139, 147, 147, 147, 25,
459 22, 22, 31, 8220, 29,16412, 36, 34, 18, 14,
460 20, 19, 15, 15, 15, 15,16393,16394,16393,16394,
462 16393,16394,16393,16394,16393,16394, 8202, 8202, 8202, 15,
463 16393,16394, 15,16393,16394, 15,16393,16394, 15,16393,
464 16394, 39, 42, 41, 40, 46, 122, 123, 71, 50,
465 8241, 60, 57, 62, 62, 61, 56, 57, 93, 95,
466 96, 78, 88, 86, 89, 105, 106, 102, 101, 101,
467 135, 141, 145, 146, 22, 22, 8220, 34, 18, 19,
468 15, 2, 15, 15,16393,16394,16393,16394,16393,16394,
469 16393,16394, 15,16393,16394, 1, 2, 15,16393,16394,
470 15,16393,16394, 39, 40, 46, 122, 123, 60, 61,
471 93, 95, 96, 79, 88, 89, 105, 106, 102, 101,
473 145, 146, 22, 22, 34, 15, 6, 15,16393,16394,
474 1,16393,16394,16393,16394, 15,16393,16394, 5, 6,
475 15,16393,16394, 102, 22, 4, 15,16393,16394, 5,
476 16393,16394, 3, 4, 15,16393,16394,16422, 22, 23,
477 8, 3,16393,16394, 7, 8,16422, 8230, 23, 7,
481 static yyconst flex_int16_t yy_accept[452] =
483 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
485 1, 1, 1, 1, 1, 2, 3, 3, 3, 4,
486 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
487 5, 6, 7, 8, 9, 10, 11, 12, 14, 16,
488 19, 22, 26, 29, 33, 36, 40, 44, 48, 52,
489 56, 60, 66, 72, 78, 84, 90, 94, 97, 101,
490 104, 108, 111, 115, 119, 123, 126, 129, 132, 135,
491 139, 143, 146, 149, 153, 157, 159, 162, 165, 168,
492 171, 174, 177, 180, 184, 187, 191, 195, 199, 202,
494 206, 210, 214, 218, 222, 226, 229, 232, 236, 240,
495 244, 247, 250, 253, 256, 259, 261, 264, 267, 269,
496 271, 274, 278, 281, 284, 288, 291, 295, 299, 302,
497 306, 309, 313, 317, 321, 325, 329, 333, 337, 341,
498 345, 349, 353, 357, 361, 364, 367, 370, 373, 377,
499 381, 385, 389, 393, 396, 400, 403, 407, 411, 414,
500 417, 421, 425, 429, 433, 436, 439, 443, 446, 450,
501 454, 457, 461, 464, 468, 472, 477, 480, 484, 487,
502 491, 492, 492, 493, 493, 493, 493, 494, 495, 496,
503 497, 498, 499, 501, 503, 505, 507, 509, 509, 512,
505 512, 515, 518, 521, 524, 525, 525, 526, 526, 526,
506 527, 528, 529, 529, 529, 530, 531, 531, 532, 533,
507 534, 535, 535, 536, 537, 538, 539, 540, 541, 542,
508 543, 544, 544, 544, 544, 545, 546, 546, 547, 548,
509 550, 551, 552, 552, 553, 553, 554, 554, 554, 555,
510 556, 556, 556, 556, 557, 557, 558, 559, 560, 560,
511 561, 561, 561, 562, 563, 564, 564, 565, 566, 567,
512 568, 569, 570, 570, 571, 572, 573, 574, 574, 575,
513 576, 577, 578, 578, 579, 580, 581, 581, 581, 582,
514 583, 584, 584, 585, 587, 588, 588, 588, 589, 590,
516 591, 592, 593, 593, 594, 595, 596, 597, 599, 601,
517 603, 605, 607, 608, 609, 610, 613, 616, 619, 622,
518 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
519 632, 633, 635, 636, 637, 639, 640, 641, 642, 642,
520 643, 643, 644, 645, 646, 647, 648, 649, 650, 651,
521 652, 652, 653, 653, 654, 655, 655, 656, 657, 658,
522 658, 659, 660, 661, 661, 662, 663, 664, 665, 667,
523 669, 671, 673, 673, 673, 673, 676, 678, 681, 684,
524 685, 686, 687, 688, 689, 690, 691, 692, 693, 694,
525 695, 696, 697, 698, 699, 699, 700, 701, 702, 703,
527 704, 705, 706, 706, 707, 708, 709, 711, 712, 714,
528 716, 716, 719, 721, 724, 724, 724, 725, 726, 726,
529 727, 728, 730, 731, 733, 733, 735, 738, 739, 741,
530 741, 742, 743, 745, 745, 747, 747, 748, 749, 750,
531 750, 751, 751, 751, 751, 751, 752, 752, 752, 753,
535 static yyconst flex_int32_t yy_ec[256] =
537 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
538 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
539 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
540 1, 2, 4, 5, 6, 1, 7, 7, 8, 9,
541 10, 11, 12, 13, 12, 14, 7, 15, 16, 16,
542 16, 16, 16, 16, 16, 17, 17, 18, 7, 7,
543 19, 7, 1, 20, 21, 21, 21, 21, 22, 21,
544 23, 23, 23, 24, 23, 25, 23, 23, 23, 23,
545 23, 26, 23, 23, 27, 23, 23, 28, 23, 23,
546 29, 30, 31, 1, 32, 7, 33, 21, 34, 35,
548 36, 37, 23, 38, 39, 24, 23, 40, 41, 23,
549 42, 43, 23, 44, 45, 46, 47, 23, 23, 28,
550 48, 23, 49, 7, 31, 7, 1, 1, 1, 1,
551 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
552 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
553 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
554 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
555 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
556 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
557 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
559 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
560 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
561 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
562 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
563 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
567 static yyconst flex_int32_t yy_meta[50] =
569 1, 2, 3, 1, 4, 5, 1, 4, 1, 1,
570 1, 1, 6, 7, 8, 8, 8, 1, 9, 1,
571 10, 10, 11, 11, 11, 11, 11, 11, 1, 12,
572 1, 11, 10, 10, 10, 10, 10, 11, 11, 11,
573 11, 11, 11, 11, 11, 11, 11, 11, 1
576 static yyconst flex_int16_t yy_base[516] =
578 1602, 1601, 0, 49, 98, 0, 1600, 1599, 146, 150,
579 153, 158, 164, 0, 213, 0, 261, 268, 274, 276,
580 289, 0, 338, 0, 387, 395, 403, 411, 419, 0,
581 1595, 1594, 468, 0, 515, 516, 522, 523, 529, 530,
582 560, 0, 609, 0, 658, 0, 1596, 1660, 1660, 1660,
583 1592, 1589, 1587, 1584, 1544, 0, 1538, 1537, 1527, 1529,
584 706, 391, 707, 520, 708, 709, 0, 1660, 1564, 1562,
585 1559, 1660, 0, 1518, 0, 1660, 1660, 1532, 1527, 1532,
586 0, 266, 1660, 534, 1527, 539, 1660, 1660, 0, 1660,
587 1530, 0, 1660, 1660, 1529, 1660, 0, 0, 1660, 541,
589 1515, 1504, 1488, 160, 1484, 1660, 1660, 1660, 1660, 1660,
590 0, 1475, 1660, 1660, 1462, 278, 1660, 1660, 1470, 1466,
591 399, 0, 1660, 1467, 1459, 0, 1442, 547, 1660, 1443,
592 1660, 1437, 0, 1433, 1660, 739, 698, 1660, 0, 386,
593 713, 1660, 725, 1660, 1660, 1660, 1660, 1660, 1660, 1660,
594 1660, 0, 0, 1435, 1660, 552, 0, 1660, 1431, 714,
595 1405, 1403, 1426, 1422, 726, 1660, 1427, 1660, 718, 734,
596 1660, 1423, 1660, 1660, 1660, 722, 1660, 1420, 1660, 723,
597 1418, 1415, 0, 0, 1411, 1363, 0, 1353, 1348, 1321,
598 1319, 747, 740, 758, 742, 764, 766, 768, 769, 756,
600 770, 772, 771, 774, 0, 1352, 0, 0, 1345, 0,
601 1302, 0, 1327, 1322, 1323, 0, 790, 1660, 795, 1318,
602 1317, 793, 1660, 1660, 0, 1320, 0, 1311, 0, 0,
603 798, 1306, 1309, 1305, 0, 759, 1298, 803, 1660, 0,
604 0, 1299, 0, 1276, 812, 1660, 1273, 1265, 816, 0,
605 1266, 1269, 1265, 0, 1260, 818, 1660, 1265, 1255, 0,
606 1250, 807, 811, 815, 1660, 0, 0, 1660, 1660, 829,
607 0, 0, 1252, 1660, 839, 1660, 0, 1248, 1660, 841,
608 1660, 1225, 842, 1246, 1234, 1238, 844, 1233, 846, 847,
609 1224, 850, 1222, 851, 1211, 852, 1210, 854, 1207, 0,
611 1660, 1203, 1163, 1147, 1189, 1147, 1144, 814, 855, 857,
612 860, 863, 1660, 865, 1141, 867, 868, 870, 873, 1180,
613 0, 1660, 1173, 1139, 1171, 1170, 0, 1660, 1171, 1167,
614 1164, 0, 1660, 1163, 0, 1152, 1161, 1160, 0, 1161,
615 1157, 1144, 0, 1008, 1007, 1006, 881, 1660, 504, 1660,
616 875, 1660, 878, 1005, 1004, 1005, 869, 871, 1004, 1003,
617 893, 1660, 1660, 957, 953, 994, 985, 909, 882, 891,
618 897, 902, 889, 907, 907, 907, 912, 916, 917, 1660,
619 1660, 934, 1660, 1660, 1660, 1660, 886, 1660, 1660, 1660,
620 1660, 1660, 1660, 1660, 908, 1660, 1660, 1660, 1660, 920,
622 926, 927, 799, 810, 808, 748, 928, 931, 935, 937,
623 737, 940, 941, 943, 0, 948, 951, 944, 712, 717,
624 556, 953, 955, 967, 515, 969, 974, 975, 977, 501,
625 416, 976, 978, 368, 980, 981, 982, 1660, 990, 368,
626 983, 353, 242, 230, 227, 1660, 115, 115, 1660, 1660,
627 1013, 1025, 1037, 1049, 1061, 1073, 1085, 1097, 1109, 1121,
628 1133, 1145, 1150, 1160, 1170, 1181, 1193, 1198, 1209, 1221,
629 1226, 1237, 1242, 1253, 1264, 1275, 1287, 1292, 1297, 1308,
630 1316, 1327, 1339, 1344, 1348, 1359, 1370, 1382, 1393, 1405,
631 1416, 1426, 1436, 1447, 1459, 1470, 1481, 1493, 1505, 1517,
633 1528, 1539, 1551, 1554, 1564, 1575, 1580, 1589, 1599, 1604,
634 1615, 1626, 1636, 1638, 1648
637 static yyconst flex_int16_t yy_def[516] =
639 451, 451, 450, 450, 450, 5, 451, 451, 452, 452,
640 453, 453, 450, 13, 450, 15, 454, 454, 455, 455,
641 450, 21, 450, 23, 456, 456, 457, 457, 450, 29,
642 458, 458, 450, 33, 459, 459, 460, 460, 461, 461,
643 450, 41, 450, 43, 450, 45, 450, 450, 450, 450,
644 450, 450, 462, 450, 450, 463, 463, 463, 463, 463,
645 464, 465, 465, 465, 465, 465, 466, 450, 450, 467,
646 450, 450, 468, 468, 469, 450, 450, 450, 450, 450,
647 470, 450, 450, 470, 450, 450, 450, 450, 471, 450,
648 450, 472, 450, 450, 450, 450, 473, 474, 450, 475,
650 450, 476, 450, 450, 477, 450, 450, 450, 450, 450,
651 478, 450, 450, 450, 479, 450, 450, 450, 450, 450,
652 450, 480, 450, 481, 450, 482, 450, 450, 450, 450,
653 450, 450, 483, 450, 450, 450, 450, 450, 484, 484,
654 484, 450, 484, 450, 450, 450, 450, 450, 450, 450,
655 450, 485, 486, 450, 450, 487, 488, 450, 450, 489,
656 490, 490, 450, 450, 490, 450, 450, 450, 491, 491,
657 450, 450, 450, 450, 450, 492, 450, 450, 450, 493,
658 450, 450, 494, 495, 450, 450, 463, 463, 463, 463,
659 463, 464, 496, 496, 496, 496, 496, 450, 465, 497,
661 465, 465, 465, 465, 466, 450, 498, 499, 450, 468,
662 468, 469, 450, 450, 450, 470, 450, 450, 470, 450,
663 450, 450, 450, 450, 471, 450, 500, 450, 473, 474,
664 475, 450, 501, 450, 476, 502, 450, 450, 450, 503,
665 478, 450, 504, 479, 450, 450, 450, 450, 450, 480,
666 450, 505, 450, 506, 450, 450, 450, 450, 450, 483,
667 450, 450, 450, 450, 450, 507, 484, 450, 450, 484,
668 485, 486, 450, 450, 450, 450, 488, 450, 450, 450,
669 450, 490, 490, 450, 450, 450, 450, 508, 491, 491,
670 450, 450, 450, 492, 450, 450, 509, 493, 450, 494,
672 450, 450, 450, 463, 463, 463, 463, 496, 496, 496,
673 496, 496, 450, 450, 450, 465, 465, 465, 465, 450,
674 498, 450, 450, 468, 450, 450, 500, 450, 450, 501,
675 450, 476, 450, 450, 503, 510, 450, 450, 511, 450,
676 505, 450, 506, 450, 450, 450, 450, 450, 507, 450,
677 450, 450, 450, 450, 450, 508, 512, 491, 450, 509,
678 513, 450, 450, 450, 463, 450, 463, 463, 496, 496,
679 496, 496, 450, 450, 450, 465, 450, 465, 465, 450,
680 450, 468, 450, 450, 450, 450, 510, 450, 450, 450,
681 450, 450, 450, 450, 450, 450, 450, 450, 450, 512,
683 491, 513, 450, 463, 450, 463, 496, 450, 496, 496,
684 450, 465, 450, 465, 514, 450, 450, 491, 450, 450,
685 463, 496, 450, 496, 450, 450, 465, 515, 491, 450,
686 450, 450, 496, 450, 450, 450, 515, 450, 450, 450,
687 450, 450, 450, 450, 450, 450, 450, 450, 450, 0,
688 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
689 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
690 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
691 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
692 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
694 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
695 450, 450, 450, 450, 450
698 static yyconst flex_int16_t yy_nxt[1710] =
700 50, 50, 51, 50, 52, 53, 50, 54, 50, 50,
701 50, 50, 50, 50, 50, 50, 50, 50, 50, 55,
702 56, 56, 56, 56, 56, 56, 56, 56, 50, 50,
703 50, 56, 56, 57, 58, 56, 59, 56, 60, 56,
704 56, 56, 56, 56, 56, 56, 56, 56, 50, 50,
705 61, 51, 50, 52, 53, 50, 54, 50, 50, 50,
706 50, 50, 50, 50, 50, 50, 50, 50, 55, 62,
707 62, 62, 62, 62, 62, 62, 62, 50, 50, 50,
708 62, 62, 63, 64, 62, 65, 62, 66, 62, 62,
709 62, 62, 62, 62, 62, 62, 62, 50, 67, 67,
711 68, 67, 69, 70, 67, 71, 67, 67, 67, 67,
712 67, 72, 67, 67, 67, 67, 67, 67, 73, 73,
713 73, 73, 73, 73, 73, 73, 67, 67, 67, 73,
714 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
715 73, 73, 74, 73, 73, 73, 67, 76, 77, 449,
716 78, 80, 77, 79, 78, 82, 448, 79, 83, 84,
717 82, 238, 239, 85, 48, 86, 49, 48, 48, 48,
718 48, 48, 87, 48, 48, 48, 48, 48, 48, 48,
719 48, 88, 48, 48, 89, 89, 89, 89, 89, 89,
720 89, 89, 48, 48, 48, 89, 89, 89, 89, 89,
722 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
723 89, 89, 48, 90, 91, 49, 90, 90, 92, 90,
724 90, 48, 93, 90, 90, 94, 90, 90, 90, 90,
725 95, 96, 90, 97, 97, 97, 97, 97, 97, 97,
726 97, 90, 90, 90, 97, 97, 97, 97, 97, 97,
727 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
728 97, 90, 99, 100, 447, 101, 102, 217, 103, 104,
729 100, 218, 101, 105, 99, 103, 107, 446, 107, 245,
730 246, 99, 108, 109, 108, 109, 110, 445, 110, 48,
731 48, 49, 48, 48, 48, 48, 48, 48, 48, 48,
733 48, 48, 48, 48, 48, 48, 48, 48, 48, 111,
734 111, 111, 111, 111, 111, 111, 111, 48, 48, 48,
735 111, 111, 111, 111, 111, 111, 111, 111, 111, 111,
736 111, 111, 111, 111, 111, 111, 111, 48, 48, 112,
737 49, 48, 48, 48, 48, 48, 113, 113, 48, 48,
738 113, 48, 48, 48, 48, 114, 48, 48, 115, 115,
739 115, 115, 115, 115, 115, 115, 48, 48, 48, 115,
740 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
741 115, 115, 115, 115, 115, 115, 48, 48, 116, 117,
742 268, 119, 198, 269, 120, 48, 121, 117, 444, 119,
744 249, 246, 120, 443, 123, 124, 48, 125, 126, 200,
745 127, 442, 128, 124, 48, 125, 126, 431, 127, 129,
746 130, 131, 129, 132, 133, 129, 134, 135, 129, 129,
747 129, 129, 129, 136, 137, 137, 129, 138, 129, 139,
748 139, 139, 139, 139, 140, 141, 139, 142, 129, 129,
749 139, 139, 139, 139, 139, 139, 139, 139, 139, 139,
750 139, 139, 140, 139, 139, 143, 139, 144, 147, 147,
751 148, 147, 149, 147, 147, 147, 150, 151, 147, 147,
752 147, 147, 147, 147, 147, 147, 147, 147, 152, 152,
753 152, 152, 152, 152, 152, 152, 150, 147, 151, 152,
755 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
756 152, 152, 152, 152, 152, 152, 150, 49, 49, 154,
757 154, 198, 155, 155, 49, 49, 158, 158, 397, 159,
758 159, 162, 162, 163, 163, 219, 164, 164, 200, 220,
759 222, 440, 231, 397, 156, 156, 232, 223, 256, 257,
760 434, 160, 160, 275, 276, 202, 224, 431, 165, 165,
761 166, 167, 168, 166, 166, 166, 166, 166, 166, 166,
762 166, 166, 166, 166, 166, 166, 166, 166, 166, 166,
763 169, 169, 169, 169, 169, 169, 169, 169, 166, 166,
764 166, 169, 169, 169, 169, 169, 169, 169, 170, 169,
766 169, 169, 169, 169, 169, 169, 169, 169, 166, 171,
767 172, 173, 171, 171, 171, 171, 171, 171, 171, 174,
768 171, 175, 171, 171, 171, 171, 171, 171, 171, 176,
769 176, 176, 176, 176, 176, 176, 176, 171, 171, 171,
770 176, 176, 176, 176, 176, 176, 176, 176, 176, 176,
771 176, 176, 176, 176, 176, 176, 176, 171, 177, 178,
772 179, 177, 177, 177, 177, 177, 177, 177, 177, 177,
773 177, 177, 177, 177, 177, 177, 177, 177, 180, 180,
774 180, 180, 180, 180, 180, 180, 177, 177, 177, 180,
775 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
777 180, 180, 180, 180, 180, 180, 177, 192, 198, 198,
778 198, 262, 264, 264, 264, 280, 281, 268, 420, 287,
779 269, 265, 265, 292, 296, 200, 200, 200, 450, 268,
780 282, 288, 269, 282, 293, 287, 297, 265, 270, 194,
781 195, 198, 196, 198, 197, 430, 201, 288, 192, 204,
782 270, 203, 262, 263, 263, 264, 270, 314, 200, 198,
783 200, 333, 265, 265, 235, 198, 266, 198, 270, 198,
784 198, 198, 198, 198, 290, 198, 200, 310, 265, 425,
785 194, 195, 200, 196, 200, 197, 200, 200, 200, 200,
786 200, 217, 200, 421, 222, 218, 219, 309, 315, 231,
788 220, 223, 316, 232, 238, 239, 312, 311, 317, 405,
789 224, 420, 318, 245, 246, 198, 319, 249, 246, 256,
790 257, 347, 347, 347, 262, 263, 263, 264, 262, 264,
791 264, 264, 200, 268, 265, 348, 269, 419, 265, 265,
792 351, 276, 353, 281, 450, 287, 282, 287, 287, 282,
793 348, 292, 292, 296, 265, 296, 198, 288, 198, 288,
794 288, 198, 293, 293, 198, 297, 373, 297, 198, 377,
795 287, 198, 287, 200, 198, 200, 351, 276, 200, 353,
796 281, 200, 288, 198, 288, 200, 200, 369, 200, 358,
797 373, 200, 408, 370, 296, 347, 347, 347, 198, 243,
799 200, 371, 395, 198, 396, 372, 297, 374, 198, 200,
800 378, 376, 401, 377, 379, 200, 395, 413, 198, 416,
801 200, 287, 417, 417, 417, 200, 407, 287, 296, 198,
802 200, 374, 408, 288, 200, 200, 423, 409, 198, 288,
803 297, 426, 413, 410, 198, 287, 200, 415, 411, 200,
804 375, 412, 406, 200, 432, 200, 423, 288, 200, 200,
805 414, 200, 417, 417, 417, 417, 417, 417, 198, 418,
806 426, 200, 422, 200, 396, 435, 436, 432, 439, 441,
807 424, 435, 436, 436, 441, 200, 405, 200, 427, 429,
808 288, 439, 200, 438, 200, 366, 200, 404, 200, 438,
810 438, 200, 403, 288, 360, 359, 356, 399, 398, 394,
811 393, 392, 433, 48, 48, 48, 48, 48, 48, 48,
812 48, 48, 48, 48, 48, 75, 75, 75, 75, 75,
813 75, 75, 75, 75, 75, 75, 75, 81, 81, 81,
814 81, 81, 81, 81, 81, 81, 81, 81, 81, 98,
815 98, 98, 98, 98, 98, 98, 98, 98, 98, 98,
816 98, 106, 106, 106, 106, 106, 106, 106, 106, 106,
817 106, 106, 106, 118, 118, 118, 118, 118, 118, 118,
818 118, 118, 118, 118, 118, 122, 122, 122, 122, 122,
819 122, 122, 122, 122, 122, 122, 122, 145, 145, 145,
821 145, 145, 145, 145, 145, 145, 145, 145, 145, 153,
822 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
823 153, 157, 157, 157, 157, 157, 157, 157, 157, 157,
824 157, 157, 157, 161, 161, 161, 161, 161, 161, 161,
825 161, 161, 161, 161, 161, 183, 183, 391, 183, 183,
826 183, 183, 183, 183, 183, 183, 183, 187, 340, 187,
827 187, 193, 340, 389, 388, 243, 386, 385, 329, 193,
828 193, 199, 329, 384, 383, 382, 381, 199, 199, 199,
829 199, 205, 205, 380, 375, 368, 205, 367, 205, 205,
830 366, 365, 205, 207, 207, 364, 207, 207, 207, 207,
832 207, 207, 207, 207, 207, 210, 363, 210, 210, 212,
833 362, 360, 295, 212, 212, 212, 212, 212, 212, 212,
834 212, 216, 216, 359, 216, 291, 216, 216, 216, 216,
835 216, 216, 216, 225, 356, 225, 225, 227, 227, 286,
836 227, 355, 227, 227, 227, 227, 227, 227, 227, 229,
837 354, 229, 229, 230, 283, 352, 350, 346, 230, 345,
838 230, 230, 230, 230, 230, 233, 258, 344, 233, 342,
839 340, 339, 338, 233, 233, 235, 235, 337, 235, 235,
840 235, 235, 235, 235, 235, 235, 235, 240, 240, 243,
841 240, 240, 240, 240, 240, 240, 240, 240, 240, 241,
843 242, 241, 241, 244, 244, 334, 244, 244, 250, 331,
844 329, 328, 228, 250, 250, 250, 250, 250, 250, 250,
845 252, 226, 221, 221, 215, 252, 252, 254, 254, 326,
846 254, 325, 254, 254, 254, 254, 254, 254, 254, 260,
847 260, 324, 260, 260, 260, 260, 260, 260, 260, 260,
848 260, 267, 323, 267, 267, 271, 320, 271, 271, 272,
849 272, 307, 306, 272, 272, 272, 272, 272, 272, 272,
850 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
851 274, 274, 277, 277, 305, 304, 277, 277, 277, 277,
852 277, 277, 277, 279, 279, 279, 279, 279, 279, 279,
854 279, 279, 279, 279, 279, 282, 282, 282, 303, 282,
855 282, 282, 282, 282, 282, 282, 282, 289, 302, 299,
856 181, 295, 289, 289, 291, 289, 289, 294, 286, 285,
857 284, 294, 283, 294, 283, 294, 294, 298, 278, 273,
858 261, 259, 298, 298, 258, 298, 298, 300, 300, 255,
859 300, 300, 300, 300, 300, 300, 300, 300, 300, 301,
860 301, 301, 301, 253, 301, 301, 301, 301, 301, 301,
861 301, 308, 251, 248, 247, 243, 242, 308, 308, 308,
862 308, 313, 313, 313, 313, 313, 313, 313, 313, 236,
863 313, 313, 313, 321, 321, 237, 321, 321, 321, 321,
865 321, 321, 321, 321, 321, 322, 322, 322, 322, 236,
866 322, 322, 322, 322, 322, 322, 322, 327, 327, 234,
867 327, 327, 327, 327, 327, 327, 327, 327, 327, 330,
868 228, 226, 221, 215, 214, 330, 213, 330, 330, 332,
869 332, 332, 332, 332, 332, 332, 332, 332, 332, 332,
870 332, 335, 335, 211, 335, 335, 335, 335, 335, 335,
871 335, 335, 335, 336, 336, 341, 209, 208, 206, 191,
872 190, 341, 189, 341, 341, 343, 343, 188, 343, 343,
873 343, 343, 343, 343, 343, 343, 343, 349, 186, 349,
874 357, 185, 184, 182, 181, 450, 146, 146, 357, 357,
876 361, 49, 49, 49, 49, 450, 450, 450, 361, 361,
877 387, 387, 450, 387, 387, 390, 390, 390, 390, 450,
878 390, 390, 390, 390, 390, 390, 390, 400, 450, 450,
879 450, 450, 400, 400, 450, 400, 400, 402, 450, 450,
880 450, 450, 402, 402, 450, 402, 402, 428, 428, 437,
881 450, 450, 450, 450, 450, 437, 437, 437, 437, 47,
882 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
883 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
884 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
885 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
887 450, 450, 450, 450, 450, 450, 450, 450, 450
890 static yyconst flex_int16_t yy_chk[1710] =
892 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
893 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
894 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
895 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
896 3, 3, 3, 3, 3, 3, 3, 3, 3, 4,
897 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
898 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
899 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
900 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
901 4, 4, 4, 4, 4, 4, 4, 4, 5, 5,
903 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
904 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
905 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
906 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
907 5, 5, 5, 5, 5, 5, 5, 9, 9, 448,
908 9, 10, 10, 9, 10, 11, 447, 10, 11, 12,
909 12, 104, 104, 12, 13, 13, 13, 13, 13, 13,
910 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
911 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
912 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
914 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
915 13, 13, 13, 15, 15, 15, 15, 15, 15, 15,
916 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
917 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
918 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
919 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
920 15, 15, 17, 17, 445, 17, 17, 82, 17, 18,
921 18, 82, 18, 18, 17, 18, 19, 444, 20, 116,
922 116, 18, 19, 19, 20, 20, 19, 443, 20, 21,
923 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
925 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
926 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
927 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
928 21, 21, 21, 21, 21, 21, 21, 21, 23, 23,
929 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
930 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
931 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
932 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
933 23, 23, 23, 23, 23, 23, 23, 25, 25, 25,
934 140, 25, 62, 140, 25, 26, 26, 26, 442, 26,
936 121, 121, 26, 440, 27, 27, 25, 27, 27, 62,
937 27, 434, 28, 28, 26, 28, 28, 431, 28, 29,
938 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
939 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
940 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
941 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
942 29, 29, 29, 29, 29, 29, 29, 29, 33, 33,
943 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
944 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
945 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
947 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
948 33, 33, 33, 33, 33, 33, 33, 35, 36, 35,
949 36, 64, 35, 36, 37, 38, 37, 38, 349, 37,
950 38, 39, 40, 39, 40, 84, 39, 40, 64, 84,
951 86, 430, 100, 349, 35, 36, 100, 86, 128, 128,
952 425, 37, 38, 156, 156, 64, 86, 421, 39, 40,
953 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
954 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
955 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
956 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
958 41, 41, 41, 41, 41, 41, 41, 41, 41, 43,
959 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
960 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
961 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
962 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
963 43, 43, 43, 43, 43, 43, 43, 43, 45, 45,
964 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
965 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
966 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
967 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
969 45, 45, 45, 45, 45, 45, 45, 61, 63, 65,
970 66, 137, 137, 137, 137, 160, 160, 141, 420, 169,
971 141, 137, 137, 176, 180, 63, 65, 66, 165, 143,
972 165, 169, 143, 165, 176, 170, 180, 137, 141, 61,
973 61, 193, 61, 195, 61, 419, 63, 170, 192, 66,
974 143, 65, 136, 136, 136, 136, 141, 200, 193, 194,
975 195, 236, 136, 136, 236, 196, 136, 197, 143, 198,
976 199, 201, 203, 202, 170, 204, 194, 195, 136, 411,
977 192, 192, 196, 192, 197, 192, 198, 199, 201, 203,
978 202, 217, 204, 406, 222, 217, 219, 194, 200, 231,
980 219, 222, 201, 231, 238, 238, 197, 196, 202, 405,
981 222, 404, 203, 245, 245, 308, 204, 249, 249, 256,
982 256, 262, 262, 262, 263, 263, 263, 263, 264, 264,
983 264, 264, 308, 270, 263, 263, 270, 403, 264, 264,
984 275, 275, 280, 280, 283, 287, 283, 289, 290, 283,
985 263, 292, 294, 296, 264, 298, 309, 287, 310, 289,
986 290, 311, 292, 294, 312, 296, 314, 298, 316, 317,
987 357, 318, 358, 309, 319, 310, 351, 351, 311, 353,
988 353, 312, 357, 369, 358, 316, 317, 309, 318, 290,
989 373, 319, 370, 310, 361, 347, 347, 347, 371, 387,
991 369, 311, 347, 372, 347, 312, 361, 314, 376, 370,
992 318, 316, 358, 377, 319, 371, 347, 378, 379, 395,
993 372, 400, 395, 395, 395, 376, 369, 401, 402, 407,
994 377, 373, 408, 400, 378, 379, 409, 371, 410, 401,
995 402, 412, 413, 372, 414, 418, 407, 382, 375, 408,
996 374, 376, 368, 409, 422, 410, 423, 418, 412, 413,
997 379, 414, 416, 416, 416, 417, 417, 417, 424, 401,
998 426, 422, 407, 423, 417, 427, 428, 432, 429, 433,
999 410, 435, 436, 437, 441, 424, 367, 426, 414, 418,
1000 429, 439, 427, 428, 432, 366, 433, 365, 435, 436,
1002 437, 441, 364, 439, 360, 359, 356, 355, 354, 346,
1003 345, 344, 424, 451, 451, 451, 451, 451, 451, 451,
1004 451, 451, 451, 451, 451, 452, 452, 452, 452, 452,
1005 452, 452, 452, 452, 452, 452, 452, 453, 453, 453,
1006 453, 453, 453, 453, 453, 453, 453, 453, 453, 454,
1007 454, 454, 454, 454, 454, 454, 454, 454, 454, 454,
1008 454, 455, 455, 455, 455, 455, 455, 455, 455, 455,
1009 455, 455, 455, 456, 456, 456, 456, 456, 456, 456,
1010 456, 456, 456, 456, 456, 457, 457, 457, 457, 457,
1011 457, 457, 457, 457, 457, 457, 457, 458, 458, 458,
1013 458, 458, 458, 458, 458, 458, 458, 458, 458, 459,
1014 459, 459, 459, 459, 459, 459, 459, 459, 459, 459,
1015 459, 460, 460, 460, 460, 460, 460, 460, 460, 460,
1016 460, 460, 460, 461, 461, 461, 461, 461, 461, 461,
1017 461, 461, 461, 461, 461, 462, 462, 342, 462, 462,
1018 462, 462, 462, 462, 462, 462, 462, 463, 341, 463,
1019 463, 464, 340, 338, 337, 336, 334, 331, 330, 464,
1020 464, 465, 329, 326, 325, 324, 323, 465, 465, 465,
1021 465, 466, 466, 320, 315, 307, 466, 306, 466, 466,
1022 305, 304, 466, 467, 467, 303, 467, 467, 467, 467,
1024 467, 467, 467, 467, 467, 468, 302, 468, 468, 469,
1025 299, 297, 295, 469, 469, 469, 469, 469, 469, 469,
1026 469, 470, 470, 293, 470, 291, 470, 470, 470, 470,
1027 470, 470, 470, 471, 288, 471, 471, 472, 472, 286,
1028 472, 285, 472, 472, 472, 472, 472, 472, 472, 473,
1029 284, 473, 473, 474, 282, 278, 273, 261, 474, 259,
1030 474, 474, 474, 474, 474, 475, 258, 255, 475, 253,
1031 252, 251, 248, 475, 475, 476, 476, 247, 476, 476,
1032 476, 476, 476, 476, 476, 476, 476, 477, 477, 244,
1033 477, 477, 477, 477, 477, 477, 477, 477, 477, 478,
1035 242, 478, 478, 479, 479, 237, 479, 479, 480, 234,
1036 233, 232, 228, 480, 480, 480, 480, 480, 480, 480,
1037 481, 226, 221, 220, 215, 481, 481, 482, 482, 214,
1038 482, 213, 482, 482, 482, 482, 482, 482, 482, 483,
1039 483, 211, 483, 483, 483, 483, 483, 483, 483, 483,
1040 483, 484, 209, 484, 484, 485, 206, 485, 485, 486,
1041 486, 191, 190, 486, 486, 486, 486, 486, 486, 486,
1042 487, 487, 487, 487, 487, 487, 487, 487, 487, 487,
1043 487, 487, 488, 488, 189, 188, 488, 488, 488, 488,
1044 488, 488, 488, 489, 489, 489, 489, 489, 489, 489,
1046 489, 489, 489, 489, 489, 490, 490, 490, 186, 490,
1047 490, 490, 490, 490, 490, 490, 490, 491, 185, 182,
1048 181, 178, 491, 491, 172, 491, 491, 492, 167, 164,
1049 163, 492, 162, 492, 161, 492, 492, 493, 159, 154,
1050 134, 132, 493, 493, 130, 493, 493, 494, 494, 127,
1051 494, 494, 494, 494, 494, 494, 494, 494, 494, 495,
1052 495, 495, 495, 125, 495, 495, 495, 495, 495, 495,
1053 495, 496, 124, 120, 119, 115, 112, 496, 496, 496,
1054 496, 497, 497, 497, 497, 497, 497, 497, 497, 105,
1055 497, 497, 497, 498, 498, 103, 498, 498, 498, 498,
1057 498, 498, 498, 498, 498, 499, 499, 499, 499, 102,
1058 499, 499, 499, 499, 499, 499, 499, 500, 500, 101,
1059 500, 500, 500, 500, 500, 500, 500, 500, 500, 501,
1060 95, 91, 85, 80, 79, 501, 78, 501, 501, 502,
1061 502, 502, 502, 502, 502, 502, 502, 502, 502, 502,
1062 502, 503, 503, 74, 503, 503, 503, 503, 503, 503,
1063 503, 503, 503, 504, 504, 505, 71, 70, 69, 60,
1064 59, 505, 58, 505, 505, 506, 506, 57, 506, 506,
1065 506, 506, 506, 506, 506, 506, 506, 507, 55, 507,
1066 508, 54, 53, 52, 51, 47, 32, 31, 508, 508,
1068 509, 8, 7, 2, 1, 0, 0, 0, 509, 509,
1069 510, 510, 0, 510, 510, 511, 511, 511, 511, 0,
1070 511, 511, 511, 511, 511, 511, 511, 512, 0, 0,
1071 0, 0, 512, 512, 0, 512, 512, 513, 0, 0,
1072 0, 0, 513, 513, 0, 513, 513, 514, 514, 515,
1073 0, 0, 0, 0, 0, 515, 515, 515, 515, 450,
1074 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
1075 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
1076 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
1077 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
1079 450, 450, 450, 450, 450, 450, 450, 450, 450
1082 extern int pyscanYY_flex_debug;
1083 int pyscanYY_flex_debug = 0;
1085 static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
1086 static char *yy_full_match;
1088 static int yy_looking_for_trail_begin = 0;
1089 static int yy_full_lp;
1090 static int *yy_full_state;
1091 #define YY_TRAILING_MASK 0x2000
1092 #define YY_TRAILING_HEAD_MASK 0x4000
1095 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */ \
1096 yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
1097 (yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
1098 (yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
1099 yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
1104 #define yymore() yymore_used_but_not_detected
1105 #define YY_MORE_ADJ 0
1106 #define YY_RESTORE_YY_MORE_OFFSET
1108 #line 1 "pyscanner.l"
1109 /******************************************************************************
1111 * $Id: pyscanner.l,v 1.9 2001/03/19 19:27:39 root Exp $
1113 * Copyright (C) 1997-2012 by Dimitri van Heesch.
1115 * Permission to use, copy, modify, and distribute this software and its
1116 * documentation under the terms of the GNU General Public License is hereby
1117 * granted. No representations are made about the suitability of this software
1118 * for any purpose. It is provided "as is" without express or implied warranty.
1119 * See the GNU General Public License for more details.
1121 * Documents produced by Doxygen are derivative works derived from the
1122 * input used in their production; they are not affected by this license.
1125 /* This code is based on the work done by the MoxyPyDoxy team
1126 * (Linda Leong, Mike Rivera, Kim Truong, and Gabriel Estrada)
1127 * in Spring 2005 as part of CS 179E: Compiler Design Project
1128 * at the University of California, Riverside; the course was
1129 * taught by Peter H. Froehlich <phf@acm.org>.
1131 #line 26 "pyscanner.l"
1144 #include <qregexp.h>
1147 #include <qfileinfo.h>
1149 #include "pyscanner.h"
1151 #include "message.h"
1153 #include "doxygen.h"
1155 #include "defargs.h"
1156 #include "language.h"
1157 #include "commentscan.h"
1159 #include "arguments.h"
1161 #define YY_NEVER_INTERACTIVE 1
1162 #define YY_NO_INPUT 1
1164 /* -----------------------------------------------------------------
1170 static ParserInterface *g_thisParser;
1171 static const char * inputString;
1172 static int inputPosition;
1173 static QFile inputFile;
1175 static Protection protection;
1177 static Entry* current_root = 0 ;
1178 static Entry* current = 0 ;
1179 static Entry* previous = 0 ;
1180 static Entry* bodyEntry = 0 ;
1181 static int yyLineNr = 1 ;
1182 static QCString yyFileName;
1183 static MethodTypes mtype;
1185 static Specifier virt;
1187 static int docBlockContext;
1188 static QCString docBlock;
1189 static QCString docBlockName;
1190 static bool docBlockInBody;
1191 static bool docBlockJavaStyle;
1192 static bool docBrief;
1193 static bool docBlockSpecial;
1195 static bool g_doubleQuote;
1196 static bool g_specialBlock;
1197 static int g_stringContext;
1198 static QGString * g_copyString;
1199 static int g_indent = 0;
1200 static int g_curIndent = 0;
1202 static QDict<QCString> g_packageNameCache(257);
1203 static QCString g_packageScope;
1205 static char g_atomStart;
1206 static char g_atomEnd;
1207 static int g_atomCount;
1209 //static bool g_insideConstructor;
1211 static QCString g_moduleScope;
1212 static QCString g_packageName;
1214 //static bool g_hideClassDocs;
1216 static QCString g_defVal;
1217 static int g_braceCount;
1219 static bool g_lexInit = FALSE;
1220 static bool g_packageCommentAllowed;
1222 //-----------------------------------------------------------------------------
1225 static void initParser()
1227 protection = Public;
1232 g_packageCommentAllowed = TRUE;
1233 g_packageNameCache.setAutoDelete(TRUE);
1236 static void initEntry()
1238 //current->python = TRUE;
1239 current->protection = protection ;
1240 current->mtype = mtype;
1241 current->virt = virt;
1242 current->stat = gstat;
1243 current->lang = SrcLangExt_Python;
1244 current->setParent(current_root);
1245 initGroupInfo(current);
1249 static void newEntry()
1252 current_root->addSubEntry(current);
1253 current = new Entry ;
1257 static void newVariable()
1259 if (!current->name.isEmpty() && current->name.at(0)=='_') // mark as private
1261 current->protection=Private;
1263 if (current_root->section&Entry::COMPOUND_MASK) // mark as class variable
1265 current->stat = TRUE;
1270 static void newFunction()
1272 if (current->name.left(2)=="__" && current->name.right(2)=="__")
1274 // special method name, see
1275 // http://docs.python.org/ref/specialnames.html
1276 current->protection=Public;
1278 else if (current->name.at(0)=='_')
1280 current->protection=Private;
1284 static inline int computeIndent(const char *s)
1287 static int tabSize=Config_getInt("TAB_SIZE");
1293 else if (c=='\t') col+=tabSize-(col%tabSize);
1299 static QCString findPackageScopeFromPath(const QCString &path)
1301 QCString *pScope = g_packageNameCache.find(path);
1306 QFileInfo pf(path+"/__init__.py"); // found package initialization file
1309 int i=path.findRev('/');
1312 QCString scope = findPackageScopeFromPath(path.left(i));
1313 if (!scope.isEmpty())
1317 scope+=path.mid(i+1);
1318 g_packageNameCache.insert(path,new QCString(scope));
1325 static QCString findPackageScope(const char *fileName)
1327 if (fileName==0) return "";
1328 QFileInfo fi(fileName);
1329 return findPackageScopeFromPath(fi.dirPath(TRUE).data());
1332 //-----------------------------------------------------------------------------
1334 static void lineCount()
1336 //fprintf(stderr,"yyLineNr=%d\n",yyLineNr);
1337 for (const char *p = pyscanYYtext; *p; ++p)
1339 yyLineNr += (*p == '\n') ;
1343 static void incLineNr()
1345 //fprintf(stderr,"yyLineNr=%d\n",yyLineNr);
1350 // Appends the current-name to current-type;
1351 // Destroys current-name.
1352 // Destroys current->args and current->argList
1353 static void addType( Entry* current )
1355 uint tl=current->type.length();
1356 if ( tl>0 && !current->name.isEmpty() && current->type.at(tl-1)!='.')
1358 current->type += ' ' ;
1360 current->type += current->name ;
1361 current->name.resize(0) ;
1362 tl=current->type.length();
1363 if ( tl>0 && !current->args.isEmpty() && current->type.at(tl-1)!='.')
1365 current->type += ' ' ;
1367 current->type += current->args ;
1368 current->args.resize(0) ;
1369 current->argList->clear();
1372 static QCString stripQuotes(const char *s)
1375 if (s==0 || *s==0) return name;
1377 if (name.at(0)=='"' && name.at(name.length()-1)=='"')
1379 name=name.mid(1,name.length()-2);
1384 //-----------------------------------------------------------------
1386 //-----------------------------------------------------------------
1387 static void startCommentBlock(bool brief)
1391 current->briefFile = yyFileName;
1392 current->briefLine = yyLineNr;
1396 current->docFile = yyFileName;
1397 current->docLine = yyLineNr;
1402 static void appendDocBlock() {
1404 current_root->addSubEntry(current);
1405 current = new Entry;
1410 static void handleCommentBlock(const QCString &doc,bool brief)
1412 //printf("handleCommentBlock(doc=[%s] brief=%d docBlockInBody=%d docBlockJavaStyle=%d\n",
1413 // doc.data(),brief,docBlockInBody,docBlockJavaStyle);
1416 docBlockInBody=FALSE;
1418 if (docBlockInBody && previous && !previous->doc.isEmpty())
1420 previous->doc=previous->doc.stripWhiteSpace()+"\n\n";
1425 int lineNr = brief ? current->briefLine : current->docLine;
1426 while (parseCommentBlock(
1428 (docBlockInBody && previous) ? previous : current,
1432 docBlockInBody ? FALSE : brief,
1433 docBlockJavaStyle, // javadoc style // or FALSE,
1438 ) // need to start a new entry
1452 static void endOfDef(int correction=0)
1454 //printf("endOfDef at=%d\n",yyLineNr);
1457 bodyEntry->endBodyLine = yyLineNr-correction;
1461 //g_insideConstructor = FALSE;
1464 static inline void addToString(const char *s)
1466 if (g_copyString) (*g_copyString)+=s;
1469 static void initTriDoubleQuoteBlock()
1471 docBlockContext = YY_START;
1472 docBlockInBody = FALSE;
1473 docBlockJavaStyle = TRUE;
1474 docBlockSpecial = pyscanYYtext[3]=='!';
1476 g_doubleQuote = TRUE;
1477 startCommentBlock(FALSE);
1480 static void initTriSingleQuoteBlock()
1482 docBlockContext = YY_START;
1483 docBlockInBody = FALSE;
1484 docBlockJavaStyle = TRUE;
1485 docBlockSpecial = pyscanYYtext[3]=='!';
1487 g_doubleQuote = FALSE;
1488 startCommentBlock(FALSE);
1491 static void initSpecialBlock()
1493 docBlockContext = YY_START;
1494 docBlockInBody = FALSE;
1495 docBlockJavaStyle = TRUE;
1498 startCommentBlock(TRUE);
1501 static void searchFoundDef()
1503 current->fileName = yyFileName;
1504 current->startLine = yyLineNr;
1505 current->bodyLine = yyLineNr;
1506 current->section = Entry::FUNCTION_SEC;
1507 current->protection = protection = Public;
1508 current->lang = SrcLangExt_Python;
1509 current->virt = Normal;
1510 current->stat = gstat;
1511 current->mtype = mtype = Method;
1512 current->type.resize(0);
1513 current->name.resize(0);
1514 current->args.resize(0);
1515 current->argList->clear();
1516 g_packageCommentAllowed = FALSE;
1518 //printf("searchFoundDef at=%d\n",yyLineNr);
1521 static void searchFoundClass()
1523 current->section = Entry::CLASS_SEC;
1524 current->argList->clear();
1525 current->type += "class" ;
1526 current->fileName = yyFileName;
1527 current->startLine = yyLineNr;
1528 current->bodyLine = yyLineNr;
1529 g_packageCommentAllowed = FALSE;
1532 //-----------------------------------------------------------------------------
1533 /* ----------------------------------------------------------------- */
1535 #define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
1537 static int yyread(char *buf,int max_size)
1540 while ( c < max_size && inputString[inputPosition] )
1542 *buf = inputString[inputPosition++] ;
1543 //printf("%d (%c)\n",*buf,*buf);
1549 /* start command character */
1550 /* Main start state */
1553 /* Mid-comment states */
1554 /* %x FuncDoubleComment */
1555 /* %x ClassDoubleComment */
1559 /* Function states */
1569 /* Variable states */
1581 #line 1582 "<stdout>"
1585 #define SearchMemVars 2
1586 #define TryClassDocString 3
1587 #define TripleComment 4
1588 #define SpecialComment 5
1589 #define FunctionDec 6
1590 #define FunctionParams 7
1591 #define FunctionBody 8
1592 #define FunctionParamDefVal 9
1594 #define ClassInheritance 11
1595 #define ClassCaptureIndent 12
1596 #define ClassBody 13
1597 #define VariableDec 14
1598 #define VariableEnd 15
1599 #define VariableAtom 16
1600 #define SingleQuoteString 17
1601 #define DoubleQuoteString 18
1602 #define TripleString 19
1604 #define FromModItem 21
1607 #ifndef YY_NO_UNISTD_H
1608 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1609 * down here because we want the user's section 1 to have been scanned first.
1610 * The user has a chance to override it with an option.
1615 #ifndef YY_EXTRA_TYPE
1616 #define YY_EXTRA_TYPE void *
1619 static int yy_init_globals (void );
1621 /* Accessor methods to globals.
1622 These are made visible to non-reentrant scanners for convenience. */
1624 int pyscanYYlex_destroy (void );
1626 int pyscanYYget_debug (void );
1628 void pyscanYYset_debug (int debug_flag );
1630 YY_EXTRA_TYPE pyscanYYget_extra (void );
1632 void pyscanYYset_extra (YY_EXTRA_TYPE user_defined );
1634 FILE *pyscanYYget_in (void );
1636 void pyscanYYset_in (FILE * in_str );
1638 FILE *pyscanYYget_out (void );
1640 void pyscanYYset_out (FILE * out_str );
1642 yy_size_t pyscanYYget_leng (void );
1644 char *pyscanYYget_text (void );
1646 int pyscanYYget_lineno (void );
1648 void pyscanYYset_lineno (int line_number );
1650 /* Macros after this point can all be overridden by user definitions in
1654 #ifndef YY_SKIP_YYWRAP
1656 extern "C" int pyscanYYwrap (void );
1658 extern int pyscanYYwrap (void );
1662 static void yyunput (int c,char *buf_ptr );
1665 static void yy_flex_strncpy (char *,yyconst char *,int );
1668 #ifdef YY_NEED_STRLEN
1669 static int yy_flex_strlen (yyconst char * );
1675 static int yyinput (void );
1677 static int input (void );
1682 /* Amount of stuff to slurp up with each read. */
1683 #ifndef YY_READ_BUF_SIZE
1684 #define YY_READ_BUF_SIZE 262144
1687 /* Copy whatever the last rule matched to the standard output. */
1689 /* This used to be an fputs(), but since the string might contain NUL's,
1690 * we now use fwrite().
1692 #define ECHO fwrite( pyscanYYtext, pyscanYYleng, 1, pyscanYYout )
1695 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1696 * is returned in "result".
1699 #define YY_INPUT(buf,result,max_size) \
1700 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1704 for ( n = 0; n < max_size && \
1705 (c = getc( pyscanYYin )) != EOF && c != '\n'; ++n ) \
1706 buf[n] = (char) c; \
1708 buf[n++] = (char) c; \
1709 if ( c == EOF && ferror( pyscanYYin ) ) \
1710 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1716 while ( (result = fread(buf, 1, max_size, pyscanYYin))==0 && ferror(pyscanYYin)) \
1718 if( errno != EINTR) \
1720 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1724 clearerr(pyscanYYin); \
1731 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1732 * we don't want an extra ';' after the "return" because that will cause
1733 * some compilers to complain about unreachable statements.
1736 #define yyterminate() return YY_NULL
1739 /* Number of entries by which start-condition stack grows. */
1740 #ifndef YY_START_STACK_INCR
1741 #define YY_START_STACK_INCR 25
1744 /* Report a fatal error. */
1745 #ifndef YY_FATAL_ERROR
1746 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1749 /* end tables serialization structures and prototypes */
1751 /* Default declaration of generated scanner - a define so the user can
1752 * easily add parameters.
1755 #define YY_DECL_IS_OURS 1
1757 extern int pyscanYYlex (void);
1759 #define YY_DECL int pyscanYYlex (void)
1760 #endif /* !YY_DECL */
1762 /* Code executed at the beginning of each rule, after pyscanYYtext and pyscanYYleng
1765 #ifndef YY_USER_ACTION
1766 #define YY_USER_ACTION
1769 /* Code executed at the end of each rule. */
1771 #define YY_BREAK break;
1774 #define YY_RULE_SETUP \
1775 if ( pyscanYYleng > 0 ) \
1776 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1777 (pyscanYYtext[pyscanYYleng - 1] == '\n'); \
1780 /** The main scanner function which does all the work.
1784 register yy_state_type yy_current_state;
1785 register char *yy_cp, *yy_bp;
1786 register int yy_act;
1788 #line 534 "pyscanner.l"
1791 /* ------------ Function recognition rules -------------- */
1793 #line 1794 "<stdout>"
1803 /* Create the reject buffer large enough to save one state per allowed character. */
1804 if ( ! (yy_state_buf) )
1805 (yy_state_buf) = (yy_state_type *)pyscanYYalloc(YY_STATE_BUF_SIZE );
1806 if ( ! (yy_state_buf) )
1807 YY_FATAL_ERROR( "out of dynamic memory in pyscanYYlex()" );
1810 (yy_start) = 1; /* first start state */
1815 if ( ! pyscanYYout )
1816 pyscanYYout = stdout;
1818 if ( ! YY_CURRENT_BUFFER ) {
1819 pyscanYYensure_buffer_stack ();
1820 YY_CURRENT_BUFFER_LVALUE =
1821 pyscanYY_create_buffer(pyscanYYin,YY_BUF_SIZE );
1824 pyscanYY_load_buffer_state( );
1827 while ( 1 ) /* loops until end-of-file is reached */
1829 yy_cp = (yy_c_buf_p);
1831 /* Support of pyscanYYtext. */
1832 *yy_cp = (yy_hold_char);
1834 /* yy_bp points to the position in yy_ch_buf of the start of
1839 yy_current_state = (yy_start);
1840 yy_current_state += YY_AT_BOL();
1842 (yy_state_ptr) = (yy_state_buf);
1843 *(yy_state_ptr)++ = yy_current_state;
1848 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1849 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1851 yy_current_state = (int) yy_def[yy_current_state];
1852 if ( yy_current_state >= 451 )
1853 yy_c = yy_meta[(unsigned int) yy_c];
1855 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1856 *(yy_state_ptr)++ = yy_current_state;
1859 while ( yy_base[yy_current_state] != 1660 );
1862 yy_current_state = *--(yy_state_ptr);
1863 (yy_lp) = yy_accept[yy_current_state];
1864 goto find_rule; /* Shut up GCC warning -Wall */
1865 find_rule: /* we branch to this label when backing up */
1866 for ( ; ; ) /* until we find what rule we matched */
1868 if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
1870 yy_act = yy_acclist[(yy_lp)];
1871 if ( yy_act & YY_TRAILING_HEAD_MASK ||
1872 (yy_looking_for_trail_begin) )
1874 if ( yy_act == (yy_looking_for_trail_begin) )
1876 (yy_looking_for_trail_begin) = 0;
1877 yy_act &= ~YY_TRAILING_HEAD_MASK;
1881 else if ( yy_act & YY_TRAILING_MASK )
1883 (yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
1884 (yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
1888 (yy_full_match) = yy_cp;
1889 (yy_full_state) = (yy_state_ptr);
1890 (yy_full_lp) = (yy_lp);
1897 yy_current_state = *--(yy_state_ptr);
1898 (yy_lp) = yy_accept[yy_current_state];
1901 YY_DO_BEFORE_ACTION;
1903 do_action: /* This label is used only to access EOF actions. */
1906 { /* beginning of action switch */
1910 #line 540 "pyscanner.l"
1911 { // start of a function/method definition with indent
1912 //fprintf(stderr,"Found def at %d\n",yyLineNr);
1913 g_indent=computeIndent(pyscanYYtext);
1915 BEGIN( FunctionDec );
1920 #line 546 "pyscanner.l"
1921 { // start of a function/method definition
1923 BEGIN( FunctionDec );
1928 #line 551 "pyscanner.l"
1929 { // start of a class definition with indent
1930 //fprintf(stderr,"Found class at %d\n",yyLineNr);
1931 g_indent=computeIndent(pyscanYYtext);
1938 #line 557 "pyscanner.l"
1939 { // start of a class definition
1945 #line 562 "pyscanner.l"
1948 #line 562 "pyscanner.l"
1949 { // start of an from import
1950 g_packageCommentAllowed = FALSE;
1955 #line 568 "pyscanner.l"
1958 #line 568 "pyscanner.l"
1959 { // start of an import statement
1960 g_packageCommentAllowed = FALSE;
1966 #line 572 "pyscanner.l"
1968 current->section = Entry::VARIABLE_SEC;
1969 current->mtype = Property;
1970 current->name = QCString(pyscanYYtext).stripWhiteSpace();
1971 current->fileName = yyFileName;
1972 current->startLine = yyLineNr;
1973 current->bodyLine = yyLineNr;
1974 g_packageCommentAllowed = FALSE;
1979 /* rule 10 can match eol */
1981 #line 582 "pyscanner.l"
1983 g_indent=computeIndent(pyscanYYtext);
1984 current->section = Entry::VARIABLE_SEC;
1985 current->name = QCString(pyscanYYtext).stripWhiteSpace();
1986 current->fileName = yyFileName;
1987 current->startLine = yyLineNr;
1988 current->bodyLine = yyLineNr;
1989 g_packageCommentAllowed = FALSE;
1995 #line 592 "pyscanner.l"
1996 { // start of a single quoted string
1997 g_stringContext=YY_START;
1999 g_packageCommentAllowed = FALSE;
2000 BEGIN( SingleQuoteString );
2005 #line 598 "pyscanner.l"
2006 { // start of a double quoted string
2007 g_stringContext=YY_START;
2009 g_packageCommentAllowed = FALSE;
2010 BEGIN( DoubleQuoteString );
2015 #line 604 "pyscanner.l"
2022 #line 607 "pyscanner.l"
2024 g_packageCommentAllowed = FALSE;
2029 #line 610 "pyscanner.l"
2030 { // some other identifier
2031 g_packageCommentAllowed = FALSE;
2036 #line 613 "pyscanner.l"
2038 g_curIndent=computeIndent(pyscanYYtext);
2042 /* rule 17 can match eol */
2044 #line 617 "pyscanner.l"
2051 #line 621 "pyscanner.l"
2052 { // start of a comment block
2053 initTriDoubleQuoteBlock();
2054 BEGIN(TripleComment);
2059 #line 626 "pyscanner.l"
2060 { // start of a comment block
2061 initTriSingleQuoteBlock();
2062 BEGIN(TripleComment);
2066 /* rule 20 can match eol */
2067 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2068 (yy_c_buf_p) = yy_cp = yy_bp + 2;
2069 YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2071 #line 631 "pyscanner.l"
2072 { // start of a special comment
2073 g_curIndent=computeIndent(pyscanYYtext);
2074 g_packageCommentAllowed = FALSE;
2076 BEGIN(SpecialComment);
2081 #line 637 "pyscanner.l"
2082 { // any other character...
2083 // This is the major default
2084 // that should catch everything
2092 #line 645 "pyscanner.l"
2093 { // from package import
2094 g_packageName=pyscanYYtext;
2099 #line 648 "pyscanner.l"
2105 /* rule 24 can match eol */
2107 #line 651 "pyscanner.l"
2115 #line 655 "pyscanner.l"
2121 #line 657 "pyscanner.l"
2123 unput(*pyscanYYtext);
2131 #line 664 "pyscanner.l"
2133 QCString item=g_packageName;
2134 current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
2135 current->fileName = yyFileName;
2136 //printf("Adding using directive: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
2137 current->section=Entry::USINGDIR_SEC;
2138 current_root->addSubEntry(current);
2139 current = new Entry ;
2146 #line 675 "pyscanner.l"
2148 QCString item=g_packageName+"."+pyscanYYtext;
2149 current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
2150 current->fileName = yyFileName;
2151 //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
2152 current->section=Entry::USINGDECL_SEC;
2153 current_root->addSubEntry(current);
2154 current = new Entry ;
2160 #line 685 "pyscanner.l"
2162 QCString item=g_packageName+"."+pyscanYYtext;
2163 current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
2164 current->fileName = yyFileName;
2165 //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
2166 current->section=Entry::USINGDECL_SEC;
2167 current_root->addSubEntry(current);
2168 current = new Entry ;
2174 /* rule 30 can match eol */
2176 #line 696 "pyscanner.l"
2184 #line 700 "pyscanner.l"
2190 #line 702 "pyscanner.l"
2196 #line 704 "pyscanner.l"
2198 unput(*pyscanYYtext);
2206 #line 711 "pyscanner.l"
2208 current->name=removeRedundantWhiteSpace(substitute(pyscanYYtext,".","::"));
2209 current->fileName = yyFileName;
2210 //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
2211 current->section=Entry::USINGDECL_SEC;
2212 current_root->addSubEntry(current);
2213 current = new Entry ;
2219 /* rule 35 can match eol */
2221 #line 721 "pyscanner.l"
2229 #line 725 "pyscanner.l"
2235 #line 727 "pyscanner.l"
2237 unput(*pyscanYYtext);
2245 #line 734 "pyscanner.l"
2247 //fprintf(stderr,"Found member variable %s in %s at %d\n",&pyscanYYtext[5],current_root->name.data(),yyLineNr);
2248 current->name=&pyscanYYtext[5];
2249 current->section=Entry::VARIABLE_SEC;
2250 current->fileName = yyFileName;
2251 current->startLine = yyLineNr;
2252 current->bodyLine = yyLineNr;
2253 current->type.resize(0);
2254 if (current->name.at(0)=='_') // mark as private
2256 current->protection=Private;
2260 current->protection=Public;
2267 #line 752 "pyscanner.l"
2268 { // start of a comment block
2269 initTriDoubleQuoteBlock();
2270 BEGIN(TripleComment);
2275 #line 757 "pyscanner.l"
2276 { // start of a comment block
2277 initTriSingleQuoteBlock();
2278 BEGIN(TripleComment);
2282 /* rule 41 can match eol */
2283 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2284 (yy_c_buf_p) = yy_cp = yy_bp + 2;
2285 YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2287 #line 762 "pyscanner.l"
2288 { // start of a special comment
2290 BEGIN(SpecialComment);
2295 #line 766 "pyscanner.l"
2301 #line 768 "pyscanner.l"
2302 { // start of a single quoted string
2303 g_stringContext=YY_START;
2305 BEGIN( SingleQuoteString );
2310 #line 773 "pyscanner.l"
2311 { // start of a double quoted string
2312 g_stringContext=YY_START;
2314 BEGIN( DoubleQuoteString );
2318 /* rule 45 can match eol */
2320 #line 778 "pyscanner.l"
2325 #line 779 "pyscanner.l"
2330 #line 780 "pyscanner.l"
2331 // other uninteresting stuff
2335 #line 781 "pyscanner.l"
2341 /* rule 49 can match eol */
2343 #line 785 "pyscanner.l"
2345 //fprintf(stderr,"indent %d<=%d\n",computeIndent(&pyscanYYtext[1]),g_indent);
2346 if (computeIndent(&pyscanYYtext[1])<=g_indent)
2349 for (i=pyscanYYleng-1;i>=0;i--)
2351 unput(pyscanYYtext[i]);
2354 //YY_CURRENT_BUFFER->yy_at_bol=TRUE;
2360 current->program+=pyscanYYtext;
2365 /* rule 50 can match eol */
2366 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2367 (yy_c_buf_p) = yy_cp -= 2;
2368 YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2370 #line 804 "pyscanner.l"
2372 if (computeIndent(&pyscanYYtext[1])<=g_indent)
2375 for (i=pyscanYYleng-1;i>=0;i--)
2377 unput(pyscanYYtext[i]);
2380 //YY_CURRENT_BUFFER->yy_at_bol=TRUE;
2386 current->program+=pyscanYYtext;
2390 case YY_STATE_EOF(FunctionBody):
2391 #line 822 "pyscanner.l"
2398 /* rule 51 can match eol */
2399 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2400 (yy_c_buf_p) = yy_cp -= 1;
2401 YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2403 #line 826 "pyscanner.l"
2404 { // skip empty line
2405 current->program+=pyscanYYtext;
2410 #line 829 "pyscanner.l"
2411 { // something at indent >0
2412 current->program+=pyscanYYtext;
2413 g_curIndent = computeIndent(pyscanYYtext);
2414 if (g_curIndent<=g_indent)
2415 // jumped out of the function
2424 #line 839 "pyscanner.l"
2425 { // start of a single quoted string
2426 current->program+=pyscanYYtext;
2427 g_stringContext=YY_START;
2428 g_specialBlock = FALSE;
2429 g_copyString=¤t->program;
2430 BEGIN( SingleQuoteString );
2435 #line 846 "pyscanner.l"
2436 { // start of a double quoted string
2437 current->program+=pyscanYYtext;
2438 g_stringContext=YY_START;
2439 g_specialBlock = FALSE;
2440 g_copyString=¤t->program;
2441 BEGIN( DoubleQuoteString );
2446 #line 853 "pyscanner.l"
2447 { // non-special stuff
2448 current->program+=pyscanYYtext;
2449 g_specialBlock = FALSE;
2454 #line 857 "pyscanner.l"
2456 current->program+=pyscanYYtext;
2461 #line 860 "pyscanner.l"
2462 { // comment half way
2463 current->program+=pyscanYYtext;
2467 /* rule 58 can match eol */
2469 #line 863 "pyscanner.l"
2472 current->program+=pyscanYYtext;
2477 #line 867 "pyscanner.l"
2479 current->program+=*pyscanYYtext;
2480 g_specialBlock = FALSE;
2485 #line 872 "pyscanner.l"
2486 { // start of a comment block
2487 current->program+=pyscanYYtext;
2488 initTriDoubleQuoteBlock();
2489 BEGIN(TripleComment);
2494 #line 878 "pyscanner.l"
2495 { // start of a comment block
2496 current->program+=pyscanYYtext;
2497 initTriSingleQuoteBlock();
2498 BEGIN(TripleComment);
2502 /* rule 62 can match eol */
2503 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2504 (yy_c_buf_p) = yy_cp = yy_bp + 2;
2505 YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2507 #line 884 "pyscanner.l"
2508 { // start of a special comment
2510 BEGIN(SpecialComment);
2517 #line 893 "pyscanner.l"
2519 //found function name
2520 if (current->type.isEmpty())
2522 current->type = "def";
2524 current->name = pyscanYYtext;
2525 current->name = current->name.stripWhiteSpace();
2531 #line 903 "pyscanner.l"
2532 { // function without arguments
2533 g_specialBlock = TRUE; // expecting a docstring
2534 bodyEntry = current;
2535 current->bodyLine = yyLineNr;
2536 BEGIN( FunctionBody );
2541 #line 910 "pyscanner.l"
2543 BEGIN( FunctionParams );
2550 #line 916 "pyscanner.l"
2556 #line 919 "pyscanner.l"
2557 { // Name of parameter
2559 Argument *a = new Argument;
2560 current->argList->append(a);
2561 current->argList->getLast()->name = QCString(pyscanYYtext).stripWhiteSpace();
2562 current->argList->getLast()->type = "";
2567 #line 926 "pyscanner.l"
2569 // TODO: this rule is too simple, need to be able to
2570 // match things like =")" as well!
2571 QCString defVal=&pyscanYYtext[1];
2574 BEGIN(FunctionParamDefVal);
2579 #line 935 "pyscanner.l"
2580 { // end of parameter list
2585 #line 938 "pyscanner.l"
2587 g_specialBlock = TRUE; // expecting a docstring
2588 bodyEntry = current;
2589 current->bodyLine = yyLineNr;
2590 BEGIN( FunctionBody );
2595 #line 944 "pyscanner.l"
2601 #line 946 "pyscanner.l"
2602 { // Default rule inside arguments.
2609 #line 952 "pyscanner.l"
2610 { // internal opening brace
2612 g_defVal+=*pyscanYYtext;
2616 #line 957 "pyscanner.l"
2619 #line 957 "pyscanner.l"
2621 if (g_braceCount==0) // end of default argument
2623 if (current->argList->getLast())
2625 current->argList->getLast()->defval=g_defVal.stripWhiteSpace();
2627 BEGIN(FunctionParams);
2632 g_defVal+=*pyscanYYtext;
2638 #line 972 "pyscanner.l"
2640 g_defVal+=*pyscanYYtext;
2644 /* rule 77 can match eol */
2646 #line 975 "pyscanner.l"
2648 g_defVal+=*pyscanYYtext;
2655 /* rule 78 can match eol */
2656 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2657 (yy_c_buf_p) = yy_cp = yy_bp + 1;
2658 YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2660 #line 983 "pyscanner.l"
2661 { // new def at indent 0
2664 //g_hideClassDocs = FALSE;
2665 //YY_CURRENT_BUFFER->yy_at_bol=TRUE;
2670 /* rule 79 can match eol */
2671 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2672 (yy_c_buf_p) = yy_cp = yy_bp + 1;
2673 YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2675 #line 990 "pyscanner.l"
2676 { // start of a special comment at indent 0
2679 //g_hideClassDocs = FALSE;
2680 //YY_CURRENT_BUFFER->yy_at_bol=TRUE;
2685 /* rule 80 can match eol */
2686 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2687 (yy_c_buf_p) = yy_cp -= 1;
2688 YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2690 #line 997 "pyscanner.l"
2691 { // skip empty line
2692 current->program+=pyscanYYtext;
2695 case YY_STATE_EOF(ClassBody):
2696 #line 1000 "pyscanner.l"
2704 #line 1004 "pyscanner.l"
2705 { // something at indent >0
2706 g_curIndent=computeIndent(pyscanYYtext);
2707 //fprintf(stderr,"g_curIndent=%d g_indent=%d\n",g_curIndent,g_indent);
2708 if (g_curIndent<=g_indent)
2709 // jumped out of the class/method
2712 g_indent=g_curIndent;
2713 // make sure the next rule matches ^...
2714 //YY_CURRENT_BUFFER->yy_at_bol=TRUE;
2715 //g_hideClassDocs = FALSE;
2720 current->program+=pyscanYYtext;
2726 #line 1022 "pyscanner.l"
2727 { // start of a single quoted string
2728 current->program+=*pyscanYYtext;
2729 g_stringContext=YY_START;
2730 g_specialBlock = FALSE;
2731 g_copyString=¤t->program;
2732 BEGIN( SingleQuoteString );
2737 #line 1029 "pyscanner.l"
2738 { // start of a double quoted string
2739 current->program+=*pyscanYYtext;
2740 g_stringContext=YY_START;
2741 g_specialBlock = FALSE;
2742 g_copyString=¤t->program;
2743 BEGIN( DoubleQuoteString );
2748 #line 1036 "pyscanner.l"
2749 { // non-special stuff
2750 current->program+=pyscanYYtext;
2751 g_specialBlock = FALSE;
2752 //g_hideClassDocs = FALSE;
2756 /* rule 85 can match eol */
2758 #line 1041 "pyscanner.l"
2760 current->program+=*pyscanYYtext;
2766 #line 1045 "pyscanner.l"
2768 current->program+=pyscanYYtext;
2773 #line 1048 "pyscanner.l"
2775 g_specialBlock = FALSE;
2776 current->program+=*pyscanYYtext;
2781 #line 1052 "pyscanner.l"
2782 { // start of a comment block
2783 //if (!g_hideClassDocs)
2784 current->program+=pyscanYYtext;
2785 initTriDoubleQuoteBlock();
2786 BEGIN(TripleComment);
2791 #line 1059 "pyscanner.l"
2792 { // start of a comment block
2793 //if (!g_hideClassDocs)
2794 current->program+=pyscanYYtext;
2795 initTriSingleQuoteBlock();
2796 BEGIN(TripleComment);
2802 #line 1067 "pyscanner.l"
2804 if (current->type.isEmpty())
2806 current->type = "class";
2809 current->section = Entry::CLASS_SEC;
2810 current->name = pyscanYYtext;
2812 // prepend scope in case of nested classes
2813 if (current_root->section&Entry::SCOPE_MASK)
2815 //printf("*** Prepending scope %s to class %s\n",current_root->name.data(),current->name.data());
2816 current->name.prepend(current_root->name+"::");
2819 current->name = current->name.stripWhiteSpace();
2820 current->fileName = yyFileName;
2821 docBlockContext = YY_START;
2822 docBlockInBody = FALSE;
2823 docBlockJavaStyle = FALSE;
2826 BEGIN(ClassInheritance);
2832 #line 1094 "pyscanner.l"
2833 { // syntactic sugar for the list
2838 #line 1097 "pyscanner.l"
2839 { // begin of the class definition
2840 g_specialBlock = TRUE; // expecting a docstring
2841 current->bodyLine = yyLineNr;
2842 current->program.resize(0);
2843 BEGIN(ClassCaptureIndent);
2848 #line 1104 "pyscanner.l"
2850 current->extends->append(
2851 new BaseInfo(substitute(pyscanYYtext,".","::"),Public,Normal)
2853 //Has base class-do stuff
2859 /* rule 94 can match eol */
2861 #line 1114 "pyscanner.l"
2863 // Blankline - ignore, keep looking for indentation.
2865 current->program+=pyscanYYtext;
2870 #line 1120 "pyscanner.l"
2871 { // start of a comment block
2872 initTriDoubleQuoteBlock();
2873 current->program+=pyscanYYtext;
2874 BEGIN(TripleComment);
2879 #line 1126 "pyscanner.l"
2880 { // start of a comment block
2881 initTriSingleQuoteBlock();
2882 current->program+=pyscanYYtext;
2883 BEGIN(TripleComment);
2888 #line 1132 "pyscanner.l"
2890 current->program+=pyscanYYtext;
2891 //current->startLine = yyLineNr;
2892 g_curIndent=computeIndent(pyscanYYtext);
2893 bodyEntry = current;
2894 //fprintf(stderr,"setting indent %d\n",g_curIndent);
2895 //printf("current->program=[%s]\n",current->program.data());
2896 //g_hideClassDocs = TRUE;
2902 #line 1143 "pyscanner.l"
2905 // Just pushback an empty class, and
2906 // resume parsing the body.
2908 current->program+=pyscanYYtext;
2910 // printf("Failed to find indent - skipping!");
2918 #line 1157 "pyscanner.l"
2919 { // the assignment operator
2920 //printf("====== VariableDec at line %d\n",yyLineNr);
2925 #line 1160 "pyscanner.l"
2931 #line 1162 "pyscanner.l"
2933 current->type = "int";
2934 current->initializer = pyscanYYtext;
2940 #line 1167 "pyscanner.l"
2941 { // floating point value
2942 current->type = "float";
2943 current->initializer = pyscanYYtext;
2949 #line 1172 "pyscanner.l"
2951 current->type = "string";
2952 current->initializer = pyscanYYtext;
2953 g_copyString=¤t->initializer;
2954 g_stringContext=VariableEnd;
2955 BEGIN( SingleQuoteString );
2960 #line 1179 "pyscanner.l"
2962 current->type = "string";
2963 current->initializer = pyscanYYtext;
2964 g_copyString=¤t->initializer;
2965 g_stringContext=VariableEnd;
2966 BEGIN( DoubleQuoteString );
2971 #line 1186 "pyscanner.l"
2972 { // start of a comment block
2973 current->type = "string";
2974 current->initializer = pyscanYYtext;
2976 g_copyString=¤t->initializer;
2977 g_stringContext=VariableEnd;
2978 BEGIN(TripleString);
2983 #line 1195 "pyscanner.l"
2984 { // start of a comment block
2985 current->type = "string";
2986 current->initializer = pyscanYYtext;
2987 g_doubleQuote=FALSE;
2988 g_copyString=¤t->initializer;
2989 g_stringContext=VariableEnd;
2990 BEGIN(TripleString);
2995 #line 1203 "pyscanner.l"
2997 if (current->mtype!=Property)
2999 current->type = "tuple";
3001 current->initializer+=*pyscanYYtext;
3005 BEGIN( VariableAtom );
3010 #line 1214 "pyscanner.l"
3012 current->type = "list";
3013 current->initializer+=*pyscanYYtext;
3017 BEGIN( VariableAtom );
3022 #line 1222 "pyscanner.l"
3024 current->type = "dictionary";
3025 current->initializer+=*pyscanYYtext;
3029 BEGIN( VariableAtom );
3034 #line 1230 "pyscanner.l"
3036 BEGIN( VariableEnd );
3041 #line 1233 "pyscanner.l"
3043 current->initializer+=pyscanYYtext;
3048 #line 1236 "pyscanner.l"
3050 current->initializer+=*pyscanYYtext;
3054 /* rule 113 can match eol */
3056 #line 1239 "pyscanner.l"
3059 BEGIN( VariableEnd );
3066 #line 1246 "pyscanner.l"
3068 current->initializer+=*pyscanYYtext;
3069 if (g_atomStart==*pyscanYYtext)
3077 #line 1253 "pyscanner.l"
3079 current->initializer+=*pyscanYYtext;
3080 if (g_atomEnd==*pyscanYYtext)
3092 #line 1264 "pyscanner.l"
3094 g_stringContext=YY_START;
3095 current->initializer+="\"";
3096 g_copyString=¤t->initializer;
3097 BEGIN( DoubleQuoteString );
3102 #line 1270 "pyscanner.l"
3104 current->initializer+=pyscanYYtext;
3109 #line 1273 "pyscanner.l"
3111 current->initializer+=*pyscanYYtext;
3115 /* rule 119 can match eol */
3117 #line 1276 "pyscanner.l"
3119 current->initializer+=*pyscanYYtext;
3126 /* rule 120 can match eol */
3128 #line 1284 "pyscanner.l"
3137 #line 1289 "pyscanner.l"
3139 unput(*pyscanYYtext);
3144 case YY_STATE_EOF(VariableEnd):
3145 #line 1294 "pyscanner.l"
3153 #line 1301 "pyscanner.l"
3156 #line 1301 "pyscanner.l"
3158 // printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock);
3159 if (g_doubleQuote==(pyscanYYtext[0]=='"'))
3161 if (g_specialBlock) // expecting a docstring
3163 QCString actualDoc=docBlock;
3164 if (!docBlockSpecial) // legacy unformatted docstring
3166 actualDoc.prepend("\\verbatim ");
3167 actualDoc.append("\\endverbatim ");
3169 //printf("-------> current=%p bodyEntry=%p\n",current,bodyEntry);
3170 handleCommentBlock(actualDoc, FALSE);
3172 else if (g_packageCommentAllowed) // expecting module docs
3174 QCString actualDoc=docBlock;
3175 if (!docBlockSpecial) // legacy unformatted docstring
3177 actualDoc.prepend("\\verbatim ");
3178 actualDoc.append("\\endverbatim ");
3180 actualDoc.prepend("\\namespace "+g_moduleScope+"\\_linebr ");
3181 handleCommentBlock(actualDoc, FALSE);
3183 if ((docBlockContext==ClassBody /*&& !g_hideClassDocs*/) ||
3184 docBlockContext==FunctionBody)
3186 current->program+=docBlock;
3187 current->program+=pyscanYYtext;
3189 //if (g_hideClassDocs)
3191 // current->startLine = yyLineNr;
3193 //g_hideClassDocs=FALSE;
3194 BEGIN(docBlockContext);
3198 docBlock += pyscanYYtext;
3200 g_packageCommentAllowed = FALSE;
3205 #line 1348 "pyscanner.l"
3206 { // leading whitespace
3207 int indent = computeIndent(pyscanYYtext);
3208 if (indent>=g_curIndent)
3209 { // strip g_curIndent amount of whitespace
3211 for (i=0;i<indent-g_curIndent;i++) docBlock+=' ';
3212 //fprintf(stderr,"stripping indent %d\n",g_curIndent);
3216 //fprintf(stderr,"not stripping: %d<%d\n",indent,g_curIndent);
3217 docBlock += pyscanYYtext;
3223 #line 1362 "pyscanner.l"
3225 docBlock += pyscanYYtext;
3229 /* rule 126 can match eol */
3231 #line 1365 "pyscanner.l"
3234 docBlock += pyscanYYtext;
3239 #line 1369 "pyscanner.l"
3241 docBlock += pyscanYYtext;
3248 #line 1375 "pyscanner.l"
3249 { // skip leading hashes
3253 /* rule 129 can match eol */
3254 *yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
3255 (yy_c_buf_p) = yy_cp = yy_bp + 1;
3256 YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
3258 #line 1377 "pyscanner.l"
3259 { // continuation of the comment on the next line
3262 startCommentBlock(FALSE);
3268 #line 1383 "pyscanner.l"
3269 { // any other stuff
3270 docBlock+=pyscanYYtext;
3274 /* rule 131 can match eol */
3276 #line 1386 "pyscanner.l"
3277 { // new line that ends the comment
3278 handleCommentBlock(docBlock, docBrief);
3280 BEGIN(docBlockContext);
3285 #line 1391 "pyscanner.l"
3286 { // anything we missed
3287 docBlock+=*pyscanYYtext;
3293 /* rule 133 can match eol */
3295 #line 1397 "pyscanner.l"
3296 { // line continuation
3297 addToString(pyscanYYtext);
3303 #line 1401 "pyscanner.l"
3305 addToString(pyscanYYtext);
3310 #line 1404 "pyscanner.l"
3311 { // tripple double quotes
3312 addToString(pyscanYYtext);
3317 #line 1407 "pyscanner.l"
3318 { // end of the string
3319 addToString(pyscanYYtext);
3320 BEGIN(g_stringContext);
3325 #line 1411 "pyscanner.l"
3327 addToString(pyscanYYtext);
3332 #line 1414 "pyscanner.l"
3334 addToString(pyscanYYtext);
3340 /* rule 139 can match eol */
3342 #line 1420 "pyscanner.l"
3343 { // line continuation
3344 addToString(pyscanYYtext);
3350 #line 1424 "pyscanner.l"
3352 addToString(pyscanYYtext);
3357 #line 1427 "pyscanner.l"
3358 { // tripple single quotes
3359 addToString(pyscanYYtext);
3364 #line 1430 "pyscanner.l"
3365 { // end of the string
3366 addToString(pyscanYYtext);
3367 BEGIN(g_stringContext);
3372 #line 1434 "pyscanner.l"
3374 addToString(pyscanYYtext);
3379 #line 1437 "pyscanner.l"
3381 addToString(pyscanYYtext);
3387 #line 1444 "pyscanner.l"
3390 #line 1444 "pyscanner.l"
3392 *g_copyString += pyscanYYtext;
3393 if (g_doubleQuote==(pyscanYYtext[0]=='"'))
3395 BEGIN(g_stringContext);
3400 /* rule 147 can match eol */
3402 #line 1453 "pyscanner.l"
3405 *g_copyString += pyscanYYtext;
3409 /* rule 148 can match eol */
3411 #line 1457 "pyscanner.l"
3414 *g_copyString += pyscanYYtext;
3419 #line 1461 "pyscanner.l"
3421 *g_copyString += *pyscanYYtext;
3425 /* ------------ End rules -------------- */
3427 <*>({NONEMPTY}|{EXPCHAR}|{BB}) { // This should go one character at a time.
3428 // printf("[pyscanner] '%s' [ state %d ] [line %d] no match\n",
3429 // pyscanYYtext, YY_START, yyLineNr);
3434 /* rule 150 can match eol */
3436 #line 1476 "pyscanner.l"
3438 //printf("[pyscanner] %d NEWLINE [line %d] no match\n",
3439 // YY_START, yyLineNr);
3446 #line 1483 "pyscanner.l"
3448 //printf("[pyscanner] '%s' [ state %d ] [line %d] no match\n",
3449 // pyscanYYtext, YY_START, yyLineNr);
3455 #line 1490 "pyscanner.l"
3458 #line 3459 "<stdout>"
3459 case YY_STATE_EOF(INITIAL):
3460 case YY_STATE_EOF(Search):
3461 case YY_STATE_EOF(SearchMemVars):
3462 case YY_STATE_EOF(TryClassDocString):
3463 case YY_STATE_EOF(TripleComment):
3464 case YY_STATE_EOF(SpecialComment):
3465 case YY_STATE_EOF(FunctionDec):
3466 case YY_STATE_EOF(FunctionParams):
3467 case YY_STATE_EOF(FunctionParamDefVal):
3468 case YY_STATE_EOF(ClassDec):
3469 case YY_STATE_EOF(ClassInheritance):
3470 case YY_STATE_EOF(ClassCaptureIndent):
3471 case YY_STATE_EOF(VariableDec):
3472 case YY_STATE_EOF(VariableAtom):
3473 case YY_STATE_EOF(SingleQuoteString):
3474 case YY_STATE_EOF(DoubleQuoteString):
3475 case YY_STATE_EOF(TripleString):
3476 case YY_STATE_EOF(FromMod):
3477 case YY_STATE_EOF(FromModItem):
3478 case YY_STATE_EOF(Import):
3481 case YY_END_OF_BUFFER:
3483 /* Amount of text matched not including the EOB char. */
3484 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
3486 /* Undo the effects of YY_DO_BEFORE_ACTION. */
3487 *yy_cp = (yy_hold_char);
3488 YY_RESTORE_YY_MORE_OFFSET
3490 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
3492 /* We're scanning a new file or input source. It's
3493 * possible that this happened because the user
3494 * just pointed pyscanYYin at a new source and called
3495 * pyscanYYlex(). If so, then we have to assure
3496 * consistency between YY_CURRENT_BUFFER and our
3497 * globals. Here is the right place to do so, because
3498 * this is the first action (other than possibly a
3499 * back-up) that will match for the new input source.
3501 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3502 YY_CURRENT_BUFFER_LVALUE->yy_input_file = pyscanYYin;
3503 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
3506 /* Note that here we test for yy_c_buf_p "<=" to the position
3507 * of the first EOB in the buffer, since yy_c_buf_p will
3508 * already have been incremented past the NUL character
3509 * (since all states make transitions on EOB to the
3510 * end-of-buffer state). Contrast this with the test
3513 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3514 { /* This was really a NUL. */
3515 yy_state_type yy_next_state;
3517 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
3519 yy_current_state = yy_get_previous_state( );
3521 /* Okay, we're now positioned to make the NUL
3522 * transition. We couldn't have
3523 * yy_get_previous_state() go ahead and do it
3524 * for us because it doesn't know how to deal
3525 * with the possibility of jamming (and we don't
3526 * want to build jamming into it because then it
3527 * will run more slowly).
3530 yy_next_state = yy_try_NUL_trans( yy_current_state );
3532 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3534 if ( yy_next_state )
3536 /* Consume the NUL. */
3537 yy_cp = ++(yy_c_buf_p);
3538 yy_current_state = yy_next_state;
3544 yy_cp = (yy_c_buf_p);
3545 goto yy_find_action;
3549 else switch ( yy_get_next_buffer( ) )
3551 case EOB_ACT_END_OF_FILE:
3553 (yy_did_buffer_switch_on_eof) = 0;
3555 if ( pyscanYYwrap( ) )
3557 /* Note: because we've taken care in
3558 * yy_get_next_buffer() to have set up
3559 * pyscanYYtext, we can now set up
3560 * yy_c_buf_p so that if some total
3561 * hoser (like flex itself) wants to
3562 * call the scanner after we return the
3563 * YY_NULL, it'll still work - another
3564 * YY_NULL will get returned.
3566 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
3568 yy_act = YY_STATE_EOF(YY_START);
3574 if ( ! (yy_did_buffer_switch_on_eof) )
3580 case EOB_ACT_CONTINUE_SCAN:
3582 (yytext_ptr) + yy_amount_of_matched_text;
3584 yy_current_state = yy_get_previous_state( );
3586 yy_cp = (yy_c_buf_p);
3587 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3590 case EOB_ACT_LAST_MATCH:
3592 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
3594 yy_current_state = yy_get_previous_state( );
3596 yy_cp = (yy_c_buf_p);
3597 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3598 goto yy_find_action;
3605 "fatal flex scanner internal error--no action found" );
3606 } /* end of action switch */
3607 } /* end of scanning one token */
3608 } /* end of pyscanYYlex */
3610 /* yy_get_next_buffer - try to read in a new buffer
3612 * Returns a code representing an action:
3613 * EOB_ACT_LAST_MATCH -
3614 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
3615 * EOB_ACT_END_OF_FILE - end of file
3617 static int yy_get_next_buffer (void)
3619 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
3620 register char *source = (yytext_ptr);
3621 register int number_to_move, i;
3624 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
3626 "fatal flex scanner internal error--end of buffer missed" );
3628 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
3629 { /* Don't try to fill the buffer, so this is an EOF. */
3630 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
3632 /* We matched a single character, the EOB, so
3633 * treat this as a final EOF.
3635 return EOB_ACT_END_OF_FILE;
3640 /* We matched some text prior to the EOB, first
3643 return EOB_ACT_LAST_MATCH;
3647 /* Try to read more data. */
3649 /* First move last chars to start of buffer. */
3650 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
3652 for ( i = 0; i < number_to_move; ++i )
3653 *(dest++) = *(source++);
3655 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
3656 /* don't do the read, it's not guaranteed to return an EOF,
3659 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
3663 yy_size_t num_to_read =
3664 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
3666 while ( num_to_read <= 0 )
3667 { /* Not enough room in the buffer - grow it. */
3670 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
3674 if ( num_to_read > YY_READ_BUF_SIZE )
3675 num_to_read = YY_READ_BUF_SIZE;
3677 /* Read in more data. */
3678 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
3679 (yy_n_chars), num_to_read );
3681 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3684 if ( (yy_n_chars) == 0 )
3686 if ( number_to_move == YY_MORE_ADJ )
3688 ret_val = EOB_ACT_END_OF_FILE;
3689 pyscanYYrestart(pyscanYYin );
3694 ret_val = EOB_ACT_LAST_MATCH;
3695 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
3696 YY_BUFFER_EOF_PENDING;
3701 ret_val = EOB_ACT_CONTINUE_SCAN;
3703 if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
3704 /* Extend the array by 50%, plus the number we really need. */
3705 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
3706 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) pyscanYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
3707 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3708 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
3711 (yy_n_chars) += number_to_move;
3712 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
3713 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
3715 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
3720 /* yy_get_previous_state - get the state just before the EOB char was reached */
3722 static yy_state_type yy_get_previous_state (void)
3724 register yy_state_type yy_current_state;
3725 register char *yy_cp;
3727 yy_current_state = (yy_start);
3728 yy_current_state += YY_AT_BOL();
3730 (yy_state_ptr) = (yy_state_buf);
3731 *(yy_state_ptr)++ = yy_current_state;
3733 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
3735 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
3736 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3738 yy_current_state = (int) yy_def[yy_current_state];
3739 if ( yy_current_state >= 451 )
3740 yy_c = yy_meta[(unsigned int) yy_c];
3742 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3743 *(yy_state_ptr)++ = yy_current_state;
3746 return yy_current_state;
3749 /* yy_try_NUL_trans - try to make a transition on the NUL character
3752 * next_state = yy_try_NUL_trans( current_state );
3754 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
3756 register int yy_is_jam;
3758 register YY_CHAR yy_c = 1;
3759 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3761 yy_current_state = (int) yy_def[yy_current_state];
3762 if ( yy_current_state >= 451 )
3763 yy_c = yy_meta[(unsigned int) yy_c];
3765 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3766 yy_is_jam = (yy_current_state == 450);
3768 *(yy_state_ptr)++ = yy_current_state;
3770 return yy_is_jam ? 0 : yy_current_state;
3773 static void yyunput (int c, register char * yy_bp )
3775 register char *yy_cp;
3777 yy_cp = (yy_c_buf_p);
3779 /* undo effects of setting up pyscanYYtext */
3780 *yy_cp = (yy_hold_char);
3782 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3783 { /* need to shift things up to make room */
3784 /* +2 for EOB chars. */
3785 register yy_size_t number_to_move = (yy_n_chars) + 2;
3786 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
3787 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
3788 register char *source =
3789 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
3791 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3792 *--dest = *--source;
3794 yy_cp += (int) (dest - source);
3795 yy_bp += (int) (dest - source);
3796 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
3797 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
3799 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3800 YY_FATAL_ERROR( "flex scanner push-back overflow" );
3803 *--yy_cp = (char) c;
3805 (yytext_ptr) = yy_bp;
3806 (yy_hold_char) = *yy_cp;
3807 (yy_c_buf_p) = yy_cp;
3812 static int yyinput (void)
3814 static int input (void)
3820 *(yy_c_buf_p) = (yy_hold_char);
3822 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
3824 /* yy_c_buf_p now points to the character we want to return.
3825 * If this occurs *before* the EOB characters, then it's a
3826 * valid NUL; if not, then we've hit the end of the buffer.
3828 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3829 /* This was really a NUL. */
3830 *(yy_c_buf_p) = '\0';
3833 { /* need more input */
3834 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
3837 switch ( yy_get_next_buffer( ) )
3839 case EOB_ACT_LAST_MATCH:
3840 /* This happens because yy_g_n_b()
3841 * sees that we've accumulated a
3842 * token and flags that we need to
3843 * try matching the token before
3844 * proceeding. But for input(),
3845 * there's no matching to consider.
3846 * So convert the EOB_ACT_LAST_MATCH
3847 * to EOB_ACT_END_OF_FILE.
3850 /* Reset buffer status. */
3851 pyscanYYrestart(pyscanYYin );
3855 case EOB_ACT_END_OF_FILE:
3857 if ( pyscanYYwrap( ) )
3860 if ( ! (yy_did_buffer_switch_on_eof) )
3869 case EOB_ACT_CONTINUE_SCAN:
3870 (yy_c_buf_p) = (yytext_ptr) + offset;
3876 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
3877 *(yy_c_buf_p) = '\0'; /* preserve pyscanYYtext */
3878 (yy_hold_char) = *++(yy_c_buf_p);
3880 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
3884 #endif /* ifndef YY_NO_INPUT */
3886 /** Immediately switch to a different input stream.
3887 * @param input_file A readable stream.
3889 * @note This function does not reset the start condition to @c INITIAL .
3891 void pyscanYYrestart (FILE * input_file )
3894 if ( ! YY_CURRENT_BUFFER ){
3895 pyscanYYensure_buffer_stack ();
3896 YY_CURRENT_BUFFER_LVALUE =
3897 pyscanYY_create_buffer(pyscanYYin,YY_BUF_SIZE );
3900 pyscanYY_init_buffer(YY_CURRENT_BUFFER,input_file );
3901 pyscanYY_load_buffer_state( );
3904 /** Switch to a different input buffer.
3905 * @param new_buffer The new input buffer.
3908 void pyscanYY_switch_to_buffer (YY_BUFFER_STATE new_buffer )
3911 /* TODO. We should be able to replace this entire function body
3913 * pyscanYYpop_buffer_state();
3914 * pyscanYYpush_buffer_state(new_buffer);
3916 pyscanYYensure_buffer_stack ();
3917 if ( YY_CURRENT_BUFFER == new_buffer )
3920 if ( YY_CURRENT_BUFFER )
3922 /* Flush out information for old buffer. */
3923 *(yy_c_buf_p) = (yy_hold_char);
3924 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3925 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3928 YY_CURRENT_BUFFER_LVALUE = new_buffer;
3929 pyscanYY_load_buffer_state( );
3931 /* We don't actually know whether we did this switch during
3932 * EOF (pyscanYYwrap()) processing, but the only time this flag
3933 * is looked at is after pyscanYYwrap() is called, so it's safe
3934 * to go ahead and always set it.
3936 (yy_did_buffer_switch_on_eof) = 1;
3939 static void pyscanYY_load_buffer_state (void)
3941 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3942 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3943 pyscanYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3944 (yy_hold_char) = *(yy_c_buf_p);
3947 /** Allocate and initialize an input buffer state.
3948 * @param file A readable stream.
3949 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3951 * @return the allocated buffer state.
3953 YY_BUFFER_STATE pyscanYY_create_buffer (FILE * file, int size )
3957 b = (YY_BUFFER_STATE) pyscanYYalloc(sizeof( struct yy_buffer_state ) );
3959 YY_FATAL_ERROR( "out of dynamic memory in pyscanYY_create_buffer()" );
3961 b->yy_buf_size = size;
3963 /* yy_ch_buf has to be 2 characters longer than the size given because
3964 * we need to put in 2 end-of-buffer characters.
3966 b->yy_ch_buf = (char *) pyscanYYalloc(b->yy_buf_size + 2 );
3967 if ( ! b->yy_ch_buf )
3968 YY_FATAL_ERROR( "out of dynamic memory in pyscanYY_create_buffer()" );
3970 b->yy_is_our_buffer = 1;
3972 pyscanYY_init_buffer(b,file );
3977 /** Destroy the buffer.
3978 * @param b a buffer created with pyscanYY_create_buffer()
3981 void pyscanYY_delete_buffer (YY_BUFFER_STATE b )
3987 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3988 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3990 if ( b->yy_is_our_buffer )
3991 pyscanYYfree((void *) b->yy_ch_buf );
3993 pyscanYYfree((void *) b );
3997 extern int isatty (int );
3998 #endif /* __cplusplus */
4000 /* Initializes or reinitializes a buffer.
4001 * This function is sometimes called more than once on the same buffer,
4002 * such as during a pyscanYYrestart() or at EOF.
4004 static void pyscanYY_init_buffer (YY_BUFFER_STATE b, FILE * file )
4009 pyscanYY_flush_buffer(b );
4011 b->yy_input_file = file;
4012 b->yy_fill_buffer = 1;
4014 /* If b is the current buffer, then pyscanYY_init_buffer was _probably_
4015 * called from pyscanYYrestart() or through yy_get_next_buffer.
4016 * In that case, we don't want to reset the lineno or column.
4018 if (b != YY_CURRENT_BUFFER){
4019 b->yy_bs_lineno = 1;
4020 b->yy_bs_column = 0;
4023 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
4028 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
4029 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
4032 void pyscanYY_flush_buffer (YY_BUFFER_STATE b )
4039 /* We always need two end-of-buffer characters. The first causes
4040 * a transition to the end-of-buffer state. The second causes
4041 * a jam in that state.
4043 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
4044 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
4046 b->yy_buf_pos = &b->yy_ch_buf[0];
4049 b->yy_buffer_status = YY_BUFFER_NEW;
4051 if ( b == YY_CURRENT_BUFFER )
4052 pyscanYY_load_buffer_state( );
4055 /** Pushes the new state onto the stack. The new state becomes
4056 * the current state. This function will allocate the stack
4058 * @param new_buffer The new state.
4061 void pyscanYYpush_buffer_state (YY_BUFFER_STATE new_buffer )
4063 if (new_buffer == NULL)
4066 pyscanYYensure_buffer_stack();
4068 /* This block is copied from pyscanYY_switch_to_buffer. */
4069 if ( YY_CURRENT_BUFFER )
4071 /* Flush out information for old buffer. */
4072 *(yy_c_buf_p) = (yy_hold_char);
4073 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
4074 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
4077 /* Only push if top exists. Otherwise, replace top. */
4078 if (YY_CURRENT_BUFFER)
4079 (yy_buffer_stack_top)++;
4080 YY_CURRENT_BUFFER_LVALUE = new_buffer;
4082 /* copied from pyscanYY_switch_to_buffer. */
4083 pyscanYY_load_buffer_state( );
4084 (yy_did_buffer_switch_on_eof) = 1;
4087 /** Removes and deletes the top of the stack, if present.
4088 * The next element becomes the new top.
4091 void pyscanYYpop_buffer_state (void)
4093 if (!YY_CURRENT_BUFFER)
4096 pyscanYY_delete_buffer(YY_CURRENT_BUFFER );
4097 YY_CURRENT_BUFFER_LVALUE = NULL;
4098 if ((yy_buffer_stack_top) > 0)
4099 --(yy_buffer_stack_top);
4101 if (YY_CURRENT_BUFFER) {
4102 pyscanYY_load_buffer_state( );
4103 (yy_did_buffer_switch_on_eof) = 1;
4107 /* Allocates the stack if it does not exist.
4108 * Guarantees space for at least one push.
4110 static void pyscanYYensure_buffer_stack (void)
4112 yy_size_t num_to_alloc;
4114 if (!(yy_buffer_stack)) {
4116 /* First allocation is just for 2 elements, since we don't know if this
4117 * scanner will even need a stack. We use 2 instead of 1 to avoid an
4118 * immediate realloc on the next call.
4121 (yy_buffer_stack) = (struct yy_buffer_state**)pyscanYYalloc
4122 (num_to_alloc * sizeof(struct yy_buffer_state*)
4124 if ( ! (yy_buffer_stack) )
4125 YY_FATAL_ERROR( "out of dynamic memory in pyscanYYensure_buffer_stack()" );
4127 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
4129 (yy_buffer_stack_max) = num_to_alloc;
4130 (yy_buffer_stack_top) = 0;
4134 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
4136 /* Increase the buffer to prepare for a possible push. */
4137 int grow_size = 8 /* arbitrary grow size */;
4139 num_to_alloc = (yy_buffer_stack_max) + grow_size;
4140 (yy_buffer_stack) = (struct yy_buffer_state**)pyscanYYrealloc
4142 num_to_alloc * sizeof(struct yy_buffer_state*)
4144 if ( ! (yy_buffer_stack) )
4145 YY_FATAL_ERROR( "out of dynamic memory in pyscanYYensure_buffer_stack()" );
4147 /* zero only the new slots.*/
4148 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
4149 (yy_buffer_stack_max) = num_to_alloc;
4153 /** Setup the input buffer state to scan directly from a user-specified character buffer.
4154 * @param base the character buffer
4155 * @param size the size in bytes of the character buffer
4157 * @return the newly allocated buffer state object.
4159 YY_BUFFER_STATE pyscanYY_scan_buffer (char * base, yy_size_t size )
4164 base[size-2] != YY_END_OF_BUFFER_CHAR ||
4165 base[size-1] != YY_END_OF_BUFFER_CHAR )
4166 /* They forgot to leave room for the EOB's. */
4169 b = (YY_BUFFER_STATE) pyscanYYalloc(sizeof( struct yy_buffer_state ) );
4171 YY_FATAL_ERROR( "out of dynamic memory in pyscanYY_scan_buffer()" );
4173 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
4174 b->yy_buf_pos = b->yy_ch_buf = base;
4175 b->yy_is_our_buffer = 0;
4176 b->yy_input_file = 0;
4177 b->yy_n_chars = b->yy_buf_size;
4178 b->yy_is_interactive = 0;
4180 b->yy_fill_buffer = 0;
4181 b->yy_buffer_status = YY_BUFFER_NEW;
4183 pyscanYY_switch_to_buffer(b );
4188 /** Setup the input buffer state to scan a string. The next call to pyscanYYlex() will
4189 * scan from a @e copy of @a str.
4190 * @param yystr a NUL-terminated string to scan
4192 * @return the newly allocated buffer state object.
4193 * @note If you want to scan bytes that may contain NUL values, then use
4194 * pyscanYY_scan_bytes() instead.
4196 YY_BUFFER_STATE pyscanYY_scan_string (yyconst char * yystr )
4199 return pyscanYY_scan_bytes(yystr,strlen(yystr) );
4202 /** Setup the input buffer state to scan the given bytes. The next call to pyscanYYlex() will
4203 * scan from a @e copy of @a bytes.
4204 * @param bytes the byte buffer to scan
4205 * @param len the number of bytes in the buffer pointed to by @a bytes.
4207 * @return the newly allocated buffer state object.
4209 YY_BUFFER_STATE pyscanYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
4215 /* Get memory for full buffer, including space for trailing EOB's. */
4216 n = _yybytes_len + 2;
4217 buf = (char *) pyscanYYalloc(n );
4219 YY_FATAL_ERROR( "out of dynamic memory in pyscanYY_scan_bytes()" );
4221 for ( i = 0; i < _yybytes_len; ++i )
4222 buf[i] = yybytes[i];
4224 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
4226 b = pyscanYY_scan_buffer(buf,n );
4228 YY_FATAL_ERROR( "bad buffer in pyscanYY_scan_bytes()" );
4230 /* It's okay to grow etc. this buffer, and we should throw it
4231 * away when we're done.
4233 b->yy_is_our_buffer = 1;
4238 #ifndef YY_EXIT_FAILURE
4239 #define YY_EXIT_FAILURE 2
4242 static void yy_fatal_error (yyconst char* msg )
4244 (void) fprintf( stderr, "%s\n", msg );
4245 exit( YY_EXIT_FAILURE );
4248 /* Redefine yyless() so it works in section 3 code. */
4254 /* Undo effects of setting up pyscanYYtext. */ \
4255 int yyless_macro_arg = (n); \
4256 YY_LESS_LINENO(yyless_macro_arg);\
4257 pyscanYYtext[pyscanYYleng] = (yy_hold_char); \
4258 (yy_c_buf_p) = pyscanYYtext + yyless_macro_arg; \
4259 (yy_hold_char) = *(yy_c_buf_p); \
4260 *(yy_c_buf_p) = '\0'; \
4261 pyscanYYleng = yyless_macro_arg; \
4265 /* Accessor methods (get/set functions) to struct members. */
4267 /** Get the current line number.
4270 int pyscanYYget_lineno (void)
4273 return pyscanYYlineno;
4276 /** Get the input stream.
4279 FILE *pyscanYYget_in (void)
4284 /** Get the output stream.
4287 FILE *pyscanYYget_out (void)
4292 /** Get the length of the current token.
4295 yy_size_t pyscanYYget_leng (void)
4297 return pyscanYYleng;
4300 /** Get the current token.
4304 char *pyscanYYget_text (void)
4306 return pyscanYYtext;
4309 /** Set the current line number.
4310 * @param line_number
4313 void pyscanYYset_lineno (int line_number )
4316 pyscanYYlineno = line_number;
4319 /** Set the input stream. This does not discard the current
4321 * @param in_str A readable stream.
4323 * @see pyscanYY_switch_to_buffer
4325 void pyscanYYset_in (FILE * in_str )
4327 pyscanYYin = in_str ;
4330 void pyscanYYset_out (FILE * out_str )
4332 pyscanYYout = out_str ;
4335 int pyscanYYget_debug (void)
4337 return pyscanYY_flex_debug;
4340 void pyscanYYset_debug (int bdebug )
4342 pyscanYY_flex_debug = bdebug ;
4345 static int yy_init_globals (void)
4347 /* Initialization is the same as for the non-reentrant scanner.
4348 * This function is called from pyscanYYlex_destroy(), so don't allocate here.
4351 (yy_buffer_stack) = 0;
4352 (yy_buffer_stack_top) = 0;
4353 (yy_buffer_stack_max) = 0;
4354 (yy_c_buf_p) = (char *) 0;
4360 (yy_full_match) = 0;
4363 /* Defined in main.c */
4366 pyscanYYout = stdout;
4368 pyscanYYin = (FILE *) 0;
4369 pyscanYYout = (FILE *) 0;
4372 /* For future reference: Set errno on error, since we are called by
4373 * pyscanYYlex_init()
4378 /* pyscanYYlex_destroy is for both reentrant and non-reentrant scanners. */
4379 int pyscanYYlex_destroy (void)
4382 /* Pop the buffer stack, destroying each element. */
4383 while(YY_CURRENT_BUFFER){
4384 pyscanYY_delete_buffer(YY_CURRENT_BUFFER );
4385 YY_CURRENT_BUFFER_LVALUE = NULL;
4386 pyscanYYpop_buffer_state();
4389 /* Destroy the stack itself. */
4390 pyscanYYfree((yy_buffer_stack) );
4391 (yy_buffer_stack) = NULL;
4393 pyscanYYfree ( (yy_state_buf) );
4394 (yy_state_buf) = NULL;
4396 /* Reset the globals. This is important in a non-reentrant scanner so the next time
4397 * pyscanYYlex() is called, initialization will occur. */
4404 * Internal utility routines.
4408 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
4411 for ( i = 0; i < n; ++i )
4416 #ifdef YY_NEED_STRLEN
4417 static int yy_flex_strlen (yyconst char * s )
4420 for ( n = 0; s[n]; ++n )
4427 void *pyscanYYalloc (yy_size_t size )
4429 return (void *) malloc( size );
4432 void *pyscanYYrealloc (void * ptr, yy_size_t size )
4434 /* The cast to (char *) in the following accommodates both
4435 * implementations that use char* generic pointers, and those
4436 * that use void* generic pointers. It works with the latter
4437 * because both ANSI C and C++ allow castless assignment from
4438 * any pointer type to void*, and deal with argument conversions
4439 * as though doing an assignment.
4441 return (void *) realloc( (char *) ptr, size );
4444 void pyscanYYfree (void * ptr )
4446 free( (char *) ptr ); /* see pyscanYYrealloc() for (char *) cast */
4449 #define YYTABLES_NAME "yytables"
4451 #line 1490 "pyscanner.l"
4455 //----------------------------------------------------------------------------
4457 static void parseCompounds(Entry *rt)
4459 //printf("parseCompounds(%s)\n",rt->name.data());
4460 EntryListIterator eli(*rt->children());
4462 for (;(ce=eli.current());++eli)
4464 if (!ce->program.isEmpty())
4466 //printf("-- %s ---------\n%s\n---------------\n",
4467 // ce->name.data(),ce->program.data());
4468 // init scanner state
4469 inputString = ce->program;
4471 pyscanYYrestart( pyscanYYin ) ;
4472 if (ce->section&Entry::COMPOUND_MASK)
4477 else if (ce->parent())
4479 current_root = ce->parent();
4480 //printf("Searching for member variables in %s parent=%s\n",
4481 // ce->name.data(),ce->parent->name.data());
4482 BEGIN( SearchMemVars );
4484 yyFileName = ce->fileName;
4485 yyLineNr = ce->bodyLine ;
4486 if (current) delete current;
4487 current = new Entry;
4490 groupEnterCompound(yyFileName,yyLineNr,ce->name);
4494 delete current; current=0;
4495 ce->program.resize(0);
4497 groupLeaveCompound(yyFileName,yyLineNr,ce->name);
4504 //----------------------------------------------------------------------------
4507 static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
4511 inputString = fileBuf;
4514 protection = Public;
4519 g_specialBlock = FALSE;
4522 inputFile.setName(fileName);
4523 if (inputFile.open(IO_ReadOnly))
4526 yyFileName = fileName;
4528 msg("Parsing file %s...\n",yyFileName.data());
4530 QFileInfo fi(fileName);
4531 g_moduleScope = findPackageScope(fileName);
4532 QCString baseName=fi.baseName().utf8();
4533 if (baseName!="__init__") // package initializer file is not a package itself
4535 if (!g_moduleScope.isEmpty())
4537 g_moduleScope+="::";
4539 g_moduleScope+=baseName;
4542 current = new Entry;
4544 current->name = g_moduleScope;
4545 current->section = Entry::NAMESPACE_SEC;
4546 current->type = "namespace";
4547 current->fileName = yyFileName;
4548 current->startLine = yyLineNr;
4549 current->bodyLine = yyLineNr;
4551 rt->addSubEntry(current);
4553 current_root = current ;
4555 current = new Entry;
4557 groupEnterFile(yyFileName,yyLineNr);
4561 pyscanYYrestart( pyscanYYin );
4566 groupLeaveFile(yyFileName,yyLineNr);
4568 current_root->program.resize(0);
4569 delete current; current=0;
4571 parseCompounds(current_root);
4578 //----------------------------------------------------------------------------
4580 static void parsePrototype(const QCString &text)
4582 //printf("**** parsePrototype(%s) begin\n",text.data());
4585 warn(yyFileName,yyLineNr,"Empty prototype found!");
4589 g_specialBlock = FALSE;
4590 g_packageCommentAllowed = FALSE;
4592 const char *orgInputString;
4593 int orgInputPosition;
4594 YY_BUFFER_STATE orgState;
4596 // save scanner state
4597 orgState = YY_CURRENT_BUFFER;
4598 pyscanYY_switch_to_buffer(pyscanYY_create_buffer(pyscanYYin,YY_BUF_SIZE));
4599 orgInputString = inputString;
4600 orgInputPosition = inputPosition;
4605 pyscanYYrestart( pyscanYYin );
4607 BEGIN( FunctionDec );
4612 current->name = current->name.stripWhiteSpace();
4613 if (current->section == Entry::MEMBERDOC_SEC && current->args.isEmpty())
4614 current->section = Entry::VARIABLEDOC_SEC;
4616 // restore original scanner state
4618 YY_BUFFER_STATE tmpBuf = YY_CURRENT_BUFFER;
4619 pyscanYY_switch_to_buffer(orgState);
4620 pyscanYY_delete_buffer(tmpBuf);
4622 inputString = orgInputString;
4623 inputPosition = orgInputPosition;
4625 //printf("**** parsePrototype end\n");
4628 void pyscanFreeScanner()
4630 #if defined(YY_FLEX_SUBMINOR_VERSION)
4633 pyscanYYlex_destroy();
4638 //----------------------------------------------------------------------------
4640 void PythonLanguageScanner::parseInput(const char *fileName,const char *fileBuf,Entry *root)
4642 g_thisParser = this;
4643 ::parseMain(fileName,fileBuf,root);
4645 // May print the AST for debugging purposes
4646 // printAST(global_root);
4649 bool PythonLanguageScanner::needsPreprocessing(const QCString &)
4654 void PythonLanguageScanner::parseCode(CodeOutputInterface &codeOutIntf,
4655 const char *scopeName,
4656 const QCString &input,
4657 bool isExampleBlock,
4658 const char *exampleName,
4662 bool inlineFragment,
4663 MemberDef *memberDef,
4664 bool showLineNumbers,
4665 Definition *searchCtx
4668 ::parsePythonCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
4669 fileDef,startLine,endLine,inlineFragment,memberDef,
4670 showLineNumbers,searchCtx);
4673 void PythonLanguageScanner::parsePrototype(const char *text)
4675 ::parsePrototype(text);
4679 void PythonLanguageScanner::resetCodeParserState()
4681 ::resetPythonCodeParserState();
4684 //----------------------------------------------------------------------------
4686 #if !defined(YY_FLEX_SUBMINOR_VERSION)
4687 //----------------------------------------------------------------------------
4688 extern "C" { // some bogus code to keep the compiler happy
4689 void pyscannerYYdummy() { yy_flex_realloc(0,0); }