Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/src/pyscanner.cpp

Source at commit 1322 created 9 years 5 months ago.
By meklort, Add doxygen to utils folder
1
2#line 3 "<stdout>"
3
4#define YY_INT_ALIGNED short int
5
6/* A lexical scanner generated by flex */
7
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
26
27#define FLEX_SCANNER
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
32#define FLEX_BETA
33#endif
34
35/* First, we deal with platform-specific or compiler-specific issues. */
36
37/* begin standard C headers. */
38#include <stdio.h>
39#include <string.h>
40#include <errno.h>
41#include <stdlib.h>
42
43/* end standard C headers. */
44
45/* flex integer type definitions */
46
47#ifndef FLEXINT_H
48#define FLEXINT_H
49
50/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
51
52#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
53
54/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
55 * if you want the limit (max/min) macros for int types.
56 */
57#ifndef __STDC_LIMIT_MACROS
58#define __STDC_LIMIT_MACROS 1
59#endif
60
61#include <inttypes.h>
62typedef int8_t flex_int8_t;
63typedef uint8_t flex_uint8_t;
64typedef int16_t flex_int16_t;
65typedef uint16_t flex_uint16_t;
66typedef int32_t flex_int32_t;
67typedef uint32_t flex_uint32_t;
68#else
69typedef signed char flex_int8_t;
70typedef short int flex_int16_t;
71typedef int flex_int32_t;
72typedef unsigned char flex_uint8_t;
73typedef unsigned short int flex_uint16_t;
74typedef unsigned int flex_uint32_t;
75#endif /* ! C99 */
76
77/* Limits of integral types. */
78#ifndef INT8_MIN
79#define INT8_MIN (-128)
80#endif
81#ifndef INT16_MIN
82#define INT16_MIN (-32767-1)
83#endif
84#ifndef INT32_MIN
85#define INT32_MIN (-2147483647-1)
86#endif
87#ifndef INT8_MAX
88#define INT8_MAX (127)
89#endif
90#ifndef INT16_MAX
91#define INT16_MAX (32767)
92#endif
93#ifndef INT32_MAX
94#define INT32_MAX (2147483647)
95#endif
96#ifndef UINT8_MAX
97#define UINT8_MAX (255U)
98#endif
99#ifndef UINT16_MAX
100#define UINT16_MAX (65535U)
101#endif
102#ifndef UINT32_MAX
103#define UINT32_MAX (4294967295U)
104#endif
105
106#endif /* ! FLEXINT_H */
107
108#ifdef __cplusplus
109
110/* The "const" storage-class-modifier is valid. */
111#define YY_USE_CONST
112
113#else/* ! __cplusplus */
114
115/* C99 requires __STDC__ to be defined as 1. */
116#if defined (__STDC__)
117
118#define YY_USE_CONST
119
120#endif/* defined (__STDC__) */
121#endif/* ! __cplusplus */
122
123#ifdef YY_USE_CONST
124#define yyconst const
125#else
126#define yyconst
127#endif
128
129/* Returned upon end-of-file. */
130#define YY_NULL 0
131
132/* Promotes a possibly negative, possibly signed char to an unsigned
133 * integer for use as an array index. If the signed char is negative,
134 * we want to instead treat it as an 8-bit unsigned char, hence the
135 * double cast.
136 */
137#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
138
139/* Enter a start condition. This macro really ought to take a parameter,
140 * but we do it the disgusting crufty way forced on us by the ()-less
141 * definition of BEGIN.
142 */
143#define BEGIN (yy_start) = 1 + 2 *
144
145/* Translate the current start state into a value that can be later handed
146 * to BEGIN to return to the state. The YYSTATE alias is for lex
147 * compatibility.
148 */
149#define YY_START (((yy_start) - 1) / 2)
150#define YYSTATE YY_START
151
152/* Action number for EOF rule of a given start state. */
153#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
154
155/* Special action meaning "start processing a new file". */
156#define YY_NEW_FILE pyscanYYrestart(pyscanYYin )
157
158#define YY_END_OF_BUFFER_CHAR 0
159
160/* Size of default input buffer. */
161#ifndef YY_BUF_SIZE
162#define YY_BUF_SIZE 262144
163#endif
164
165/* The state buf must be large enough to hold one state per character in the main buffer.
166 */
167#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
168
169#ifndef YY_TYPEDEF_YY_BUFFER_STATE
170#define YY_TYPEDEF_YY_BUFFER_STATE
171typedef struct yy_buffer_state *YY_BUFFER_STATE;
172#endif
173
174#ifndef YY_TYPEDEF_YY_SIZE_T
175#define YY_TYPEDEF_YY_SIZE_T
176typedef size_t yy_size_t;
177#endif
178
179extern yy_size_t pyscanYYleng;
180
181extern FILE *pyscanYYin, *pyscanYYout;
182
183#define EOB_ACT_CONTINUE_SCAN 0
184#define EOB_ACT_END_OF_FILE 1
185#define EOB_ACT_LAST_MATCH 2
186
187 #define YY_LESS_LINENO(n)
188
189/* Return all but the first "n" matched characters back to the input stream. */
190#define yyless(n) \
191do \
192{ \
193/* Undo effects of setting up pyscanYYtext. */ \
194 int yyless_macro_arg = (n); \
195 YY_LESS_LINENO(yyless_macro_arg);\
196*yy_cp = (yy_hold_char); \
197YY_RESTORE_YY_MORE_OFFSET \
198(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
199YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */ \
200} \
201while ( 0 )
202
203#define unput(c) yyunput( c, (yytext_ptr) )
204
205#ifndef YY_STRUCT_YY_BUFFER_STATE
206#define YY_STRUCT_YY_BUFFER_STATE
207struct yy_buffer_state
208{
209FILE *yy_input_file;
210
211char *yy_ch_buf;/* input buffer */
212char *yy_buf_pos;/* current position in input buffer */
213
214/* Size of input buffer in bytes, not including room for EOB
215 * characters.
216 */
217yy_size_t yy_buf_size;
218
219/* Number of characters read into yy_ch_buf, not including EOB
220 * characters.
221 */
222yy_size_t yy_n_chars;
223
224/* Whether we "own" the buffer - i.e., we know we created it,
225 * and can realloc() it to grow it, and should free() it to
226 * delete it.
227 */
228int yy_is_our_buffer;
229
230/* Whether this is an "interactive" input source; if so, and
231 * if we're using stdio for input, then we want to use getc()
232 * instead of fread(), to make sure we stop fetching input after
233 * each newline.
234 */
235int yy_is_interactive;
236
237/* Whether we're considered to be at the beginning of a line.
238 * If so, '^' rules will be active on the next match, otherwise
239 * not.
240 */
241int yy_at_bol;
242
243 int yy_bs_lineno; /**< The line count. */
244 int yy_bs_column; /**< The column count. */
245
246/* Whether to try to fill the input buffer when we reach the
247 * end of it.
248 */
249int yy_fill_buffer;
250
251int yy_buffer_status;
252
253#define YY_BUFFER_NEW 0
254#define YY_BUFFER_NORMAL 1
255/* When an EOF's been seen but there's still some text to process
256 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
257 * shouldn't try reading from the input source any more. We might
258 * still have a bunch of tokens to match, though, because of
259 * possible backing-up.
260 *
261 * When we actually see the EOF, we change the status to "new"
262 * (via pyscanYYrestart()), so that the user can continue scanning by
263 * just pointing pyscanYYin at a new input file.
264 */
265#define YY_BUFFER_EOF_PENDING 2
266
267};
268#endif /* !YY_STRUCT_YY_BUFFER_STATE */
269
270/* Stack of input buffers. */
271static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
272static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
273static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
274
275/* We provide macros for accessing buffer states in case in the
276 * future we want to put the buffer states in a more general
277 * "scanner state".
278 *
279 * Returns the top of the stack, or NULL.
280 */
281#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
282 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
283 : NULL)
284
285/* Same as previous macro, but useful when we know that the buffer stack is not
286 * NULL or when we need an lvalue. For internal use only.
287 */
288#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
289
290/* yy_hold_char holds the character lost when pyscanYYtext is formed. */
291static char yy_hold_char;
292static yy_size_t yy_n_chars;/* number of characters read into yy_ch_buf */
293yy_size_t pyscanYYleng;
294
295/* Points to current character in buffer. */
296static char *yy_c_buf_p = (char *) 0;
297static int yy_init = 0;/* whether we need to initialize */
298static int yy_start = 0;/* start state number */
299
300/* Flag which is used to allow pyscanYYwrap()'s to do buffer switches
301 * instead of setting up a fresh pyscanYYin. A bit of a hack ...
302 */
303static int yy_did_buffer_switch_on_eof;
304
305void pyscanYYrestart (FILE *input_file );
306void pyscanYY_switch_to_buffer (YY_BUFFER_STATE new_buffer );
307YY_BUFFER_STATE pyscanYY_create_buffer (FILE *file,int size );
308void pyscanYY_delete_buffer (YY_BUFFER_STATE b );
309void pyscanYY_flush_buffer (YY_BUFFER_STATE b );
310void pyscanYYpush_buffer_state (YY_BUFFER_STATE new_buffer );
311void pyscanYYpop_buffer_state (void );
312
313static void pyscanYYensure_buffer_stack (void );
314static void pyscanYY_load_buffer_state (void );
315static void pyscanYY_init_buffer (YY_BUFFER_STATE b,FILE *file );
316
317#define YY_FLUSH_BUFFER pyscanYY_flush_buffer(YY_CURRENT_BUFFER )
318
319YY_BUFFER_STATE pyscanYY_scan_buffer (char *base,yy_size_t size );
320YY_BUFFER_STATE pyscanYY_scan_string (yyconst char *yy_str );
321YY_BUFFER_STATE pyscanYY_scan_bytes (yyconst char *bytes,yy_size_t len );
322
323void *pyscanYYalloc (yy_size_t );
324void *pyscanYYrealloc (void *,yy_size_t );
325void pyscanYYfree (void * );
326
327#define yy_new_buffer pyscanYY_create_buffer
328
329#define yy_set_interactive(is_interactive) \
330{ \
331if ( ! YY_CURRENT_BUFFER ){ \
332 pyscanYYensure_buffer_stack (); \
333YY_CURRENT_BUFFER_LVALUE = \
334 pyscanYY_create_buffer(pyscanYYin,YY_BUF_SIZE ); \
335} \
336YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
337}
338
339#define yy_set_bol(at_bol) \
340{ \
341if ( ! YY_CURRENT_BUFFER ){\
342 pyscanYYensure_buffer_stack (); \
343YY_CURRENT_BUFFER_LVALUE = \
344 pyscanYY_create_buffer(pyscanYYin,YY_BUF_SIZE ); \
345} \
346YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
347}
348
349#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
350
351/* Begin user sect3 */
352
353#define pyscanYYwrap(n) 1
354#define YY_SKIP_YYWRAP
355
356typedef unsigned char YY_CHAR;
357
358FILE *pyscanYYin = (FILE *) 0, *pyscanYYout = (FILE *) 0;
359
360typedef int yy_state_type;
361
362extern int pyscanYYlineno;
363
364int pyscanYYlineno = 1;
365
366extern char *pyscanYYtext;
367#define yytext_ptr pyscanYYtext
368
369static yy_state_type yy_get_previous_state (void );
370static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
371static int yy_get_next_buffer (void );
372static void yy_fatal_error (yyconst char msg[] );
373
374/* Done after the current pattern has been matched and before the
375 * corresponding action - sets up pyscanYYtext.
376 */
377#define YY_DO_BEFORE_ACTION \
378(yytext_ptr) = yy_bp; \
379pyscanYYleng = (size_t) (yy_cp - yy_bp); \
380(yy_hold_char) = *yy_cp; \
381*yy_cp = '\0'; \
382(yy_c_buf_p) = yy_cp;
383
384#define YY_NUM_RULES 149
385#define YY_END_OF_BUFFER 150
386/* This struct is not used in this scanner,
387 but its presence is necessary. */
388struct yy_trans_info
389{
390flex_int32_t yy_verify;
391flex_int32_t yy_nxt;
392};
393static yyconst flex_int16_t yy_acclist[742] =
394 { 0,
395 16479,16479, 97, 97, 24, 24, 29, 29, 33, 33,
396 150, 148, 149, 147, 149, 20, 148, 149, 16, 147,
397 149, 12, 20, 148, 149, 20, 148, 149, 11, 20,
398 148, 149, 14, 20, 148, 149, 14, 20, 148, 149,
399 14, 20, 148, 149, 14, 20, 148, 149, 14, 20,
400 148, 149, 15, 20, 148, 149, 14, 20, 148, 149,
401 16393,16394, 14, 20, 148, 149,16393,16394, 14, 20,
402 148, 149,16393,16394, 14, 20, 148, 149,16393,16394,
403 14, 20, 148, 149,16393,16394, 44, 45, 148, 149,
404 42, 44, 147, 149, 41, 45, 148, 149, 45, 148,
405
406 149, 40, 45, 148, 149, 45, 148, 149, 43, 45,
407 148, 149, 43, 45, 148, 149, 122, 124, 148, 149,
408 124, 148, 149, 123, 147, 149, 124, 148, 149, 124,
409 148, 149, 121, 124, 148, 149, 127, 129, 148, 149,
410 128, 147, 149, 129, 148, 149, 127, 129, 148, 149,
411 125, 129, 148, 149, 148, 149, 62, 148, 149, 61,
412 148, 149, 60, 148, 149, 69, 148, 149, 63, 148,
413 149, 69, 148, 149, 66, 148, 149, 63, 69, 148,
414 149, 67, 148, 149, 65, 69, 148, 149, 64, 69,
415 148, 149, 52, 56, 148, 149, 56, 148, 149, 55,
416
417 147, 149,16430, 51, 56, 148, 149, 54, 56, 148,
418 149, 50, 56, 148, 149, 49, 56, 148, 149, 54,
419 56, 148, 149, 73, 148, 149, 74, 147, 149, 70,
420 73, 148, 149, 72, 73, 148, 149, 71, 73, 148,
421 149, 87, 148, 149, 88, 148, 149, 88, 148, 149,
422 89, 148, 149, 90, 148, 149, 148, 149, 91, 147,
423 149, 8287, 148, 149, 148, 149, 148, 149, 94, 148,
424 149, 81, 84, 148, 149, 84, 148, 149, 82, 147,
425 149, 80, 84, 148, 149, 84, 148, 149, 79, 84,
426 148, 149, 78, 84, 148, 149, 109, 148, 149, 97,
427
428 109, 148, 149, 110, 147, 149, 101, 109, 148, 149,
429 107, 109, 148, 149, 100, 109, 148, 149, 104, 109,
430 148, 149, 98, 109, 148, 149, 98, 109, 148, 149,
431 96, 109, 148, 149, 108, 109, 148, 149, 108, 109,
432 148, 149, 108, 109, 148, 149, 105, 109, 148, 149,
433 108, 109, 148, 149, 106, 109, 148, 149, 118, 148,
434 149, 117, 147, 149, 115, 148, 149, 116, 147, 149,
435 113, 115, 148, 149, 111, 115, 148, 149, 112, 115,
436 148, 149, 114, 115, 148, 149, 134, 135, 148, 149,
437 135, 148, 149, 133, 135, 148, 149, 135, 148, 149,
438
439 140, 141, 148, 149, 139, 141, 148, 149, 141, 148,
440 149, 141, 148, 149, 144, 146, 148, 149, 144, 145,
441 147, 149, 144, 146, 148, 149, 144, 146, 148, 149,
442 146, 148, 149, 25, 148, 149, 24, 25, 148, 149,
443 23, 147, 149, 21, 25, 148, 149, 21, 25, 148,
444 149, 30, 148, 149, 29, 30, 148, 149, 28, 147,
445 149, 26, 30, 148, 149, 27, 30, 148, 149, 34,
446 148, 149, 33, 34, 148, 149, 32, 147, 149, 31,
447 34, 148, 149, 16, 13, 14, 14, 14, 14, 14,
448 15,16393,16394,16393,16394,16393,16394,16393,16394,16393,
449
450 16394, 14,16393,16394, 14,16393,16394, 14,16393,16394,
451 14,16393,16394, 14,16393,16394, 44, 39, 43, 43,
452 122, 121, 127, 126, 127, 125, 125, 62, 61, 60,
453 63, 68, 67, 64, 52,16430, 54, 54, 49, 48,
454 53, 54, 87, 88, 90, 91, 94, 81, 83, 78,
455 77, 97, 107, 98, 98, 98, 108, 101, 100, 108,
456 114, 134, 131, 131, 130, 140, 137, 137, 136, 144,
457 144, 144, 24, 21, 21, 29, 27, 33, 31, 17,
458 13, 19, 18, 14, 14, 14, 14,16393,16394,16393,
459 16394,16393,16394,16393,16394,16393,16394, 8202, 8202, 8202,
460
461 14,16393,16394, 14,16393,16394, 14,16393,16394, 14,
462 16393,16394, 36, 39, 38, 37, 43, 119, 120, 68,
463 47, 8238, 57, 54, 59, 59, 58, 53, 54, 90,
464 92, 93, 75, 85, 83, 86, 102, 103, 99, 98,
465 98, 132, 138, 142, 143, 21, 21, 31, 17, 18,
466 14, 2, 14, 14,16393,16394,16393,16394,16393,16394,
467 16393,16394, 14,16393,16394, 1, 2, 14,16393,16394,
468 14,16393,16394, 36, 37, 43, 119, 120, 57, 58,
469 90, 92, 93, 76, 85, 86, 102, 103, 99, 98,
470 142, 143, 21, 21, 31, 14, 6, 14,16393,16394,
471
472 1,16393,16394,16393,16394, 14,16393,16394, 5, 6,
473 14,16393,16394, 99, 21, 4, 14,16393,16394, 5,
474 16393,16394, 3, 4, 14,16393,16394,16419, 21, 22,
475 8, 3,16393,16394, 7, 8,16419, 8227, 22, 7,
476 8201
477 } ;
478
479static yyconst flex_int16_t yy_accept[435] =
480 { 0,
481 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
482 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483 1, 1, 1, 1, 1, 2, 3, 3, 3, 4,
484 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
485 5, 6, 7, 8, 9, 10, 11, 12, 14, 16,
486 19, 22, 26, 29, 33, 37, 41, 45, 49, 53,
487 57, 63, 69, 75, 81, 87, 91, 95, 99, 102,
488 106, 109, 113, 117, 121, 124, 127, 130, 133, 137,
489 141, 144, 147, 151, 155, 157, 160, 163, 166, 169,
490 172, 175, 178, 182, 185, 189, 193, 197, 200, 204,
491
492 208, 212, 216, 220, 224, 227, 230, 234, 238, 242,
493 245, 248, 251, 254, 257, 259, 262, 265, 267, 269,
494 272, 276, 279, 282, 286, 289, 293, 297, 300, 304,
495 307, 311, 315, 319, 323, 327, 331, 335, 339, 343,
496 347, 351, 355, 359, 362, 365, 368, 371, 375, 379,
497 383, 387, 391, 394, 398, 401, 405, 409, 412, 415,
498 419, 423, 427, 431, 434, 437, 441, 444, 448, 452,
499 455, 459, 462, 466, 470, 473, 477, 480, 484, 485,
500 485, 486, 486, 486, 487, 488, 489, 490, 491, 492,
501 494, 496, 498, 500, 502, 502, 505, 505, 508, 511,
502
503 514, 517, 518, 518, 519, 519, 519, 520, 521, 522,
504 522, 522, 523, 524, 524, 525, 526, 527, 528, 528,
505 529, 530, 531, 532, 533, 534, 535, 536, 537, 537,
506 537, 537, 538, 539, 539, 540, 541, 543, 544, 545,
507 545, 546, 546, 547, 547, 547, 548, 549, 549, 549,
508 549, 550, 550, 551, 552, 553, 553, 554, 554, 554,
509 555, 556, 557, 557, 558, 559, 560, 561, 562, 563,
510 563, 564, 565, 566, 567, 567, 568, 569, 570, 571,
511 571, 572, 573, 574, 574, 574, 575, 576, 577, 578,
512 579, 579, 579, 580, 581, 582, 583, 584, 585, 586,
513
514 587, 588, 590, 592, 594, 596, 598, 599, 600, 601,
515 604, 607, 610, 613, 614, 615, 616, 617, 618, 619,
516 620, 621, 622, 623, 623, 624, 626, 627, 628, 630,
517 631, 632, 633, 633, 634, 634, 635, 636, 637, 638,
518 639, 640, 641, 642, 643, 643, 644, 644, 645, 646,
519 646, 647, 648, 648, 649, 650, 651, 652, 653, 654,
520 655, 657, 659, 661, 663, 663, 663, 663, 666, 668,
521 671, 674, 675, 676, 677, 678, 679, 680, 681, 682,
522 683, 684, 685, 686, 687, 688, 689, 689, 690, 691,
523 692, 693, 694, 695, 696, 697, 698, 699, 701, 702,
524
525 704, 706, 706, 709, 711, 714, 714, 714, 715, 716,
526 717, 718, 720, 721, 723, 723, 725, 728, 729, 731,
527 732, 733, 735, 735, 737, 737, 738, 739, 740, 741,
528 741, 741, 742, 742
529 } ;
530
531static yyconst flex_int32_t yy_ec[256] =
532 { 0,
533 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
534 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
535 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
536 1, 2, 4, 5, 6, 1, 7, 7, 8, 9,
537 10, 11, 12, 13, 12, 14, 7, 15, 16, 16,
538 16, 16, 16, 16, 16, 17, 17, 18, 7, 7,
539 19, 7, 1, 1, 20, 20, 20, 20, 21, 20,
540 22, 22, 22, 23, 22, 24, 22, 22, 22, 22,
541 22, 25, 22, 22, 26, 22, 22, 27, 22, 22,
542 28, 29, 30, 1, 31, 7, 32, 20, 33, 34,
543
544 35, 36, 22, 22, 37, 23, 22, 38, 39, 22,
545 40, 41, 22, 42, 43, 44, 45, 22, 22, 27,
546 46, 22, 47, 7, 30, 7, 1, 1, 1, 1,
547 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
548 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
549 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
550 1, 1, 1, 1, 1, 1, 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
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,
558 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
561 } ;
562
563static yyconst flex_int32_t yy_meta[48] =
564 { 0,
565 1, 2, 3, 1, 4, 5, 1, 4, 1, 1,
566 1, 1, 1, 6, 7, 7, 7, 1, 8, 9,
567 9, 10, 10, 10, 10, 10, 10, 1, 11, 1,
568 10, 9, 9, 9, 9, 9, 10, 10, 10, 10,
569 10, 10, 10, 10, 10, 10, 1
570 } ;
571
572static yyconst flex_int16_t yy_base[499] =
573 { 0,
574 1535, 1527, 0, 47, 94, 0, 1520, 1515, 140, 144,
575 147, 152, 158, 0, 205, 0, 251, 258, 264, 266,
576 279, 0, 326, 0, 373, 381, 385, 392, 400, 0,
577 1514, 1513, 447, 0, 492, 493, 499, 500, 506, 507,
578 536, 0, 583, 0, 630, 0, 1515, 1566, 1566, 1566,
579 1511, 1508, 1503, 1500, 0, 1469, 1471, 1463, 1465, 497,
580 377, 676, 677, 678, 679, 0, 0, 1496, 1485, 1478,
581 1566, 0, 1449, 0, 1566, 1566, 1478, 1474, 1479, 0,
582 256, 1566, 511, 1463, 514, 1566, 1566, 0, 1566, 1451,
583 0, 1566, 1566, 1449, 1566, 0, 0, 1566, 518, 1445,
584
585 1443, 1440, 154, 1432, 1566, 1566, 1566, 1566, 1566, 0,
586 1427, 1566, 1566, 1402, 268, 1566, 1566, 1405, 1390, 516,
587 0, 1566, 1391, 1391, 0, 1387, 523, 1566, 1385, 1566,
588 1369, 0, 1361, 1566, 707, 668, 1566, 0, 372, 685,
589 1566, 694, 1566, 1566, 1566, 1566, 1566, 1566, 1566, 1566,
590 0, 0, 1361, 1566, 684, 0, 1566, 1357, 686, 1335,
591 1331, 1351, 1345, 700, 1566, 1350, 1566, 699, 702, 1566,
592 1349, 1566, 1566, 0, 1566, 1340, 1566, 715, 1318, 1315,
593 0, 0, 1292, 0, 1267, 1258, 1250, 1239, 713, 692,
594 723, 724, 733, 735, 736, 737, 707, 738, 749, 758,
595
596 760, 0, 1266, 0, 0, 1261, 0, 1226, 0, 1258,
597 1254, 1252, 0, 726, 1566, 761, 1247, 1246, 762, 1566,
598 1566, 0, 1249, 0, 1245, 0, 0, 763, 1236, 1230,
599 1216, 0, 770, 1208, 779, 1566, 0, 0, 1213, 0,
600 1200, 781, 1566, 1207, 1203, 784, 0, 1198, 1201, 1197,
601 0, 1193, 786, 1566, 1198, 1191, 0, 1180, 775, 779,
602 790, 1566, 0, 0, 1566, 1566, 792, 0, 0, 1181,
603 1566, 806, 1566, 0, 1173, 1566, 808, 1566, 1144, 813,
604 1166, 1153, 1158, 764, 1157, 810, 813, 1153, 0, 1143,
605 817, 1139, 818, 1136, 0, 1566, 1133, 1093, 1133, 1088,
606
607 1086, 820, 821, 823, 824, 827, 1566, 731, 1083, 828,
608 831, 833, 836, 1120, 0, 1566, 1116, 1083, 1114, 1113,
609 0, 1566, 1114, 1113, 1107, 0, 1566, 1097, 0, 962,
610 971, 970, 0, 971, 970, 967, 0, 966, 965, 964,
611 846, 1566, 361, 1566, 834, 1566, 842, 960, 947, 941,
612 846, 856, 920, 863, 1566, 1566, 869, 906, 885, 837,
613 832, 847, 854, 855, 839, 836, 759, 880, 881, 882,
614 883, 1566, 1566, 744, 1566, 1566, 1566, 1566, 739, 1566,
615 1566, 1566, 1566, 1566, 1566, 1566, 874, 1566, 1566, 1566,
616 1566, 890, 892, 895, 742, 705, 656, 886, 896, 901,
617
618 905, 486, 908, 909, 911, 0, 901, 916, 912, 504,
619 390, 917, 919, 933, 243, 935, 938, 939, 946, 266,
620 940, 942, 213, 943, 944, 947, 1566, 951, 948, 107,
621 98, 1566, 1566, 977, 988, 999, 1010, 1021, 1032, 1043,
622 1054, 1065, 1076, 1087, 1098, 1103, 1112, 1121, 1131, 1142,
623 1147, 1157, 1168, 1173, 1183, 1188, 1198, 1208, 1218, 1229,
624 1234, 1239, 1249, 1256, 1266, 1277, 1282, 1286, 1296, 1306,
625 1317, 1327, 1338, 1348, 1352, 1361, 1371, 1382, 1392, 1402,
626 1413, 1424, 1435, 1445, 1455, 1466, 1469, 1478, 1488, 1493,
627 1501, 1510, 1515, 1525, 1535, 1544, 1546, 1555
628
629 } ;
630
631static yyconst flex_int16_t yy_def[499] =
632 { 0,
633 434, 434, 433, 433, 433, 5, 434, 434, 435, 435,
634 436, 436, 433, 13, 433, 15, 437, 437, 438, 438,
635 433, 21, 433, 23, 439, 439, 440, 440, 433, 29,
636 441, 441, 433, 33, 442, 442, 443, 443, 444, 444,
637 433, 41, 433, 43, 433, 45, 433, 433, 433, 433,
638 433, 433, 445, 433, 446, 446, 446, 446, 446, 447,
639 448, 448, 448, 448, 448, 449, 449, 433, 450, 433,
640 433, 451, 451, 452, 433, 433, 433, 433, 433, 453,
641 433, 433, 453, 433, 433, 433, 433, 454, 433, 433,
642 455, 433, 433, 433, 433, 456, 457, 433, 458, 433,
643
644 459, 433, 433, 460, 433, 433, 433, 433, 433, 461,
645 433, 433, 433, 462, 433, 433, 433, 433, 433, 433,
646 463, 433, 464, 433, 465, 433, 433, 433, 433, 433,
647 433, 466, 433, 433, 433, 433, 433, 467, 467, 467,
648 433, 467, 433, 433, 433, 433, 433, 433, 433, 433,
649 468, 469, 433, 433, 470, 471, 433, 433, 472, 473,
650 473, 433, 433, 473, 433, 433, 433, 474, 474, 433,
651 433, 433, 433, 475, 433, 433, 433, 476, 433, 433,
652 477, 478, 433, 446, 446, 446, 446, 446, 447, 479,
653 479, 479, 479, 479, 433, 448, 480, 448, 448, 448,
654
655 448, 449, 433, 481, 482, 433, 451, 451, 452, 433,
656 433, 433, 453, 433, 433, 453, 433, 433, 433, 433,
657 433, 454, 433, 483, 433, 456, 457, 458, 433, 484,
658 433, 459, 485, 433, 433, 433, 486, 461, 433, 487,
659 462, 433, 433, 433, 433, 433, 463, 433, 488, 433,
660 489, 433, 433, 433, 433, 433, 466, 433, 433, 433,
661 433, 433, 490, 467, 433, 433, 467, 468, 469, 433,
662 433, 433, 433, 471, 433, 433, 433, 433, 473, 473,
663 433, 433, 433, 433, 491, 474, 474, 433, 475, 433,
664 433, 492, 476, 433, 477, 433, 433, 446, 446, 446,
665
666 446, 479, 479, 479, 479, 479, 433, 433, 433, 448,
667 448, 448, 448, 433, 481, 433, 433, 451, 433, 433,
668 483, 433, 433, 484, 433, 459, 433, 433, 486, 493,
669 433, 433, 494, 433, 488, 433, 489, 433, 433, 433,
670 433, 433, 490, 433, 433, 433, 433, 433, 433, 491,
671 495, 474, 492, 496, 433, 433, 446, 433, 446, 446,
672 479, 479, 479, 479, 433, 433, 433, 448, 433, 448,
673 448, 433, 433, 451, 433, 433, 433, 433, 493, 433,
674 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
675 433, 495, 474, 496, 446, 433, 446, 479, 433, 479,
676
677 479, 433, 448, 433, 448, 497, 433, 433, 474, 433,
678 446, 479, 433, 479, 433, 433, 448, 498, 474, 433,
679 433, 479, 433, 433, 433, 498, 433, 433, 433, 433,
680 433, 433, 0, 433, 433, 433, 433, 433, 433, 433,
681 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
682 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
683 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
684 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
685 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
686 433, 433, 433, 433, 433, 433, 433, 433
687
688 } ;
689
690static yyconst flex_int16_t yy_nxt[1614] =
691 { 0,
692 50, 50, 51, 50, 52, 53, 50, 54, 50, 50,
693 50, 50, 50, 50, 50, 50, 50, 50, 50, 55,
694 55, 55, 55, 55, 55, 55, 55, 50, 50, 50,
695 55, 55, 56, 57, 55, 58, 59, 55, 55, 55,
696 55, 55, 55, 55, 55, 55, 50, 50, 60, 51,
697 50, 52, 53, 50, 54, 50, 50, 50, 50, 50,
698 50, 50, 50, 50, 50, 50, 61, 61, 61, 61,
699 61, 61, 61, 61, 50, 50, 50, 61, 61, 62,
700 63, 61, 64, 65, 61, 61, 61, 61, 61, 61,
701 61, 61, 61, 50, 66, 66, 67, 66, 68, 69,
702
703 66, 70, 66, 66, 66, 66, 66, 71, 66, 66,
704 66, 66, 66, 72, 72, 72, 72, 72, 72, 72,
705 72, 66, 66, 66, 72, 72, 72, 72, 72, 72,
706 72, 72, 72, 72, 72, 72, 73, 72, 72, 72,
707 66, 75, 76, 432, 77, 79, 76, 78, 77, 81,
708 431, 78, 82, 83, 81, 235, 236, 84, 48, 85,
709 49, 48, 48, 48, 48, 48, 86, 48, 48, 48,
710 48, 48, 48, 48, 48, 87, 48, 88, 88, 88,
711 88, 88, 88, 88, 88, 48, 48, 48, 88, 88,
712 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
713
714 88, 88, 88, 88, 48, 89, 90, 49, 89, 89,
715 91, 89, 89, 48, 92, 89, 89, 93, 89, 89,
716 89, 89, 94, 95, 96, 96, 96, 96, 96, 96,
717 96, 96, 89, 89, 89, 96, 96, 96, 96, 96,
718 96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
719 96, 89, 98, 99, 430, 100, 101, 214, 102, 103,
720 99, 215, 100, 104, 98, 102, 106, 420, 106, 242,
721 243, 98, 107, 108, 107, 108, 109, 423, 109, 48,
722 48, 49, 48, 48, 48, 48, 48, 48, 48, 48,
723 48, 48, 48, 48, 48, 48, 48, 48, 110, 110,
724
725 110, 110, 110, 110, 110, 110, 48, 48, 48, 110,
726 110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
727 110, 110, 110, 110, 110, 48, 48, 111, 49, 48,
728 48, 48, 48, 48, 112, 112, 48, 48, 112, 48,
729 48, 48, 48, 113, 48, 114, 114, 114, 114, 114,
730 114, 114, 114, 48, 48, 48, 114, 114, 114, 114,
731 114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
732 114, 114, 48, 48, 115, 116, 265, 118, 195, 266,
733 119, 48, 120, 116, 389, 118, 122, 123, 119, 124,
734 125, 420, 126, 127, 123, 197, 124, 125, 389, 126,
735
736 128, 129, 130, 128, 131, 132, 128, 133, 134, 128,
737 128, 128, 128, 128, 135, 136, 136, 128, 137, 138,
738 138, 138, 138, 138, 139, 140, 138, 141, 128, 128,
739 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
740 138, 139, 138, 138, 142, 138, 143, 146, 146, 147,
741 146, 148, 146, 146, 146, 149, 150, 146, 146, 146,
742 146, 146, 146, 146, 146, 146, 151, 151, 151, 151,
743 151, 151, 151, 151, 149, 146, 150, 151, 151, 151,
744 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
745 151, 151, 151, 149, 49, 49, 153, 153, 189, 154,
746
747 154, 49, 49, 157, 157, 410, 158, 158, 161, 161,
748 162, 162, 216, 163, 163, 219, 217, 246, 243, 228,
749 155, 155, 220, 229, 253, 254, 415, 159, 159, 191,
750 192, 221, 193, 194, 164, 164, 165, 166, 167, 165,
751 165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
752 165, 165, 165, 165, 165, 168, 168, 168, 168, 168,
753 168, 168, 168, 165, 165, 165, 168, 168, 168, 168,
754 168, 168, 169, 168, 168, 168, 168, 168, 168, 168,
755 168, 168, 165, 170, 171, 172, 170, 170, 170, 170,
756 170, 170, 170, 173, 170, 170, 170, 170, 170, 170,
757
758 170, 170, 174, 174, 174, 174, 174, 174, 174, 174,
759 170, 170, 170, 174, 174, 174, 174, 174, 174, 174,
760 174, 174, 174, 174, 174, 174, 174, 174, 174, 170,
761 175, 176, 177, 175, 175, 175, 175, 175, 175, 175,
762 175, 175, 175, 175, 175, 175, 175, 175, 175, 178,
763 178, 178, 178, 178, 178, 178, 178, 175, 175, 175,
764 178, 178, 178, 178, 178, 178, 178, 178, 178, 178,
765 178, 178, 178, 178, 178, 178, 175, 195, 195, 195,
766 195, 259, 261, 261, 261, 272, 273, 277, 278, 265,
767 262, 262, 266, 195, 197, 197, 197, 197, 265, 411,
768
769 284, 266, 433, 284, 279, 262, 396, 279, 308, 267,
770 197, 199, 285, 198, 189, 285, 291, 201, 267, 200,
771 259, 260, 260, 261, 195, 195, 267, 214, 292, 262,
772 262, 215, 365, 263, 195, 267, 195, 195, 195, 195,
773 287, 197, 197, 410, 262, 191, 192, 309, 193, 194,
774 195, 197, 240, 197, 197, 197, 197, 406, 304, 195,
775 303, 195, 216, 219, 228, 284, 217, 197, 229, 310,
776 220, 366, 327, 306, 305, 232, 197, 285, 197, 221,
777 235, 236, 242, 243, 311, 246, 243, 253, 254, 341,
778 341, 341, 259, 260, 260, 261, 265, 312, 402, 266,
779
780 313, 262, 342, 259, 261, 261, 261, 345, 273, 347,
781 278, 284, 262, 262, 284, 433, 342, 279, 291, 291,
782 279, 195, 195, 285, 195, 195, 285, 262, 195, 195,
783 292, 292, 369, 195, 195, 345, 273, 195, 197, 197,
784 365, 197, 197, 347, 278, 197, 197, 284, 399, 197,
785 197, 197, 361, 352, 197, 195, 195, 284, 362, 285,
786 341, 341, 341, 363, 291, 197, 387, 364, 388, 285,
787 368, 370, 197, 197, 398, 371, 292, 367, 397, 366,
788 387, 195, 369, 404, 195, 407, 396, 195, 408, 408,
789 408, 284, 400, 284, 401, 393, 291, 399, 197, 197,
790
791 197, 197, 413, 285, 197, 285, 195, 358, 292, 416,
792 404, 395, 195, 284, 197, 408, 408, 408, 421, 197,
793 413, 353, 403, 197, 405, 285, 197, 197, 412, 197,
794 408, 408, 408, 409, 195, 197, 416, 197, 388, 424,
795 425, 421, 350, 429, 424, 425, 414, 428, 425, 429,
796 391, 197, 428, 197, 417, 419, 197, 427, 197, 285,
797 197, 197, 427, 390, 285, 427, 197, 386, 385, 384,
798 383, 334, 334, 381, 380, 240, 422, 48, 48, 48,
799 48, 48, 48, 48, 48, 48, 48, 48, 74, 74,
800 74, 74, 74, 74, 74, 74, 74, 74, 74, 80,
801
802 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
803 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
804 97, 105, 105, 105, 105, 105, 105, 105, 105, 105,
805 105, 105, 117, 117, 117, 117, 117, 117, 117, 117,
806 117, 117, 117, 121, 121, 121, 121, 121, 121, 121,
807 121, 121, 121, 121, 144, 144, 144, 144, 144, 144,
808 144, 144, 144, 144, 144, 152, 152, 152, 152, 152,
809 152, 152, 152, 152, 152, 152, 156, 156, 156, 156,
810 156, 156, 156, 156, 156, 156, 156, 160, 160, 160,
811 160, 160, 160, 160, 160, 160, 160, 160, 181, 181,
812
813 378, 181, 181, 181, 181, 181, 181, 181, 181, 184,
814 377, 184, 184, 190, 323, 323, 376, 375, 374, 373,
815 190, 190, 196, 372, 367, 360, 359, 196, 196, 196,
816 196, 202, 202, 202, 358, 357, 356, 202, 202, 355,
817 353, 202, 204, 204, 290, 204, 204, 204, 204, 204,
818 204, 204, 204, 207, 288, 207, 207, 209, 350, 283,
819 349, 209, 209, 209, 209, 209, 209, 209, 213, 213,
820 348, 213, 280, 213, 213, 213, 213, 213, 213, 222,
821 346, 222, 222, 224, 224, 344, 224, 340, 224, 224,
822 224, 224, 224, 224, 226, 339, 226, 226, 227, 255,
823
824 338, 336, 334, 333, 227, 227, 227, 227, 227, 230,
825 332, 331, 230, 240, 239, 328, 230, 230, 232, 232,
826 325, 232, 232, 232, 232, 232, 232, 232, 232, 237,
827 237, 323, 237, 237, 237, 237, 237, 237, 237, 237,
828 238, 322, 238, 238, 241, 241, 225, 241, 241, 247,
829 223, 218, 218, 212, 247, 247, 247, 247, 247, 247,
830 249, 320, 319, 318, 249, 249, 251, 251, 317, 251,
831 314, 251, 251, 251, 251, 251, 251, 257, 257, 301,
832 257, 257, 257, 257, 257, 257, 257, 257, 264, 300,
833 264, 264, 268, 299, 268, 268, 269, 269, 298, 297,
834
835 269, 269, 269, 269, 269, 269, 271, 271, 271, 271,
836 271, 271, 271, 271, 271, 271, 271, 274, 274, 294,
837 179, 274, 274, 274, 274, 274, 274, 276, 276, 276,
838 276, 276, 276, 276, 276, 276, 276, 276, 279, 279,
839 279, 290, 279, 279, 279, 279, 279, 279, 279, 286,
840 288, 283, 282, 286, 286, 281, 286, 286, 289, 280,
841 289, 289, 293, 280, 275, 270, 293, 293, 258, 293,
842 293, 295, 295, 256, 295, 295, 295, 295, 295, 295,
843 295, 295, 296, 296, 296, 296, 255, 296, 296, 296,
844 296, 296, 296, 302, 252, 250, 248, 245, 302, 302,
845
846 302, 302, 307, 307, 307, 307, 307, 307, 307, 244,
847 307, 307, 307, 315, 315, 240, 315, 315, 315, 315,
848 315, 315, 315, 315, 316, 316, 316, 316, 239, 316,
849 316, 316, 316, 316, 316, 321, 321, 233, 321, 321,
850 321, 321, 321, 321, 321, 321, 324, 234, 233, 231,
851 225, 324, 223, 324, 324, 326, 326, 326, 326, 326,
852 326, 326, 326, 326, 326, 326, 329, 329, 218, 329,
853 329, 329, 329, 329, 329, 329, 329, 330, 330, 335,
854 212, 211, 210, 208, 335, 206, 335, 335, 337, 337,
855 205, 337, 337, 337, 337, 337, 337, 337, 337, 343,
856
857 203, 343, 351, 188, 187, 186, 185, 183, 182, 351,
858 351, 354, 180, 179, 433, 145, 145, 49, 354, 354,
859 379, 379, 49, 379, 379, 382, 382, 382, 382, 49,
860 382, 382, 382, 382, 382, 382, 392, 49, 433, 433,
861 392, 392, 433, 392, 392, 394, 433, 433, 433, 394,
862 394, 433, 394, 394, 418, 418, 426, 433, 433, 433,
863 433, 426, 426, 426, 426, 47, 433, 433, 433, 433,
864 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
865 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
866 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
867
868 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
869 433, 433, 433
870 } ;
871
872static yyconst flex_int16_t yy_chk[1614] =
873 { 0,
874 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
875 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
876 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
877 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
878 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
879 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
880 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
881 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
882 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
883 4, 4, 4, 4, 5, 5, 5, 5, 5, 5,
884
885 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
886 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
887 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
888 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
889 5, 9, 9, 431, 9, 10, 10, 9, 10, 11,
890 430, 10, 11, 12, 12, 103, 103, 12, 13, 13,
891 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
892 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
893 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
894 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
895
896 13, 13, 13, 13, 13, 15, 15, 15, 15, 15,
897 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
898 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
899 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
900 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
901 15, 15, 17, 17, 423, 17, 17, 81, 17, 18,
902 18, 81, 18, 18, 17, 18, 19, 420, 20, 115,
903 115, 18, 19, 19, 20, 20, 19, 415, 20, 21,
904 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
905 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
906
907 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
908 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
909 21, 21, 21, 21, 21, 21, 23, 23, 23, 23,
910 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
911 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
912 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
913 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
914 23, 23, 23, 25, 25, 25, 139, 25, 61, 139,
915 25, 26, 26, 26, 343, 26, 27, 27, 26, 27,
916 27, 411, 27, 28, 28, 61, 28, 28, 343, 28,
917
918 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
919 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
920 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
921 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
922 29, 29, 29, 29, 29, 29, 29, 33, 33, 33,
923 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
924 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
925 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
926 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
927 33, 33, 33, 33, 35, 36, 35, 36, 60, 35,
928
929 36, 37, 38, 37, 38, 410, 37, 38, 39, 40,
930 39, 40, 83, 39, 40, 85, 83, 120, 120, 99,
931 35, 36, 85, 99, 127, 127, 402, 37, 38, 60,
932 60, 85, 60, 60, 39, 40, 41, 41, 41, 41,
933 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
934 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
935 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
936 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
937 41, 41, 41, 43, 43, 43, 43, 43, 43, 43,
938 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
939
940 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
941 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
942 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
943 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
944 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
945 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
946 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
947 45, 45, 45, 45, 45, 45, 45, 62, 63, 64,
948 65, 136, 136, 136, 136, 155, 155, 159, 159, 140,
949 136, 136, 140, 190, 62, 63, 64, 65, 142, 397,
950
951 168, 142, 164, 169, 164, 136, 396, 164, 197, 140,
952 190, 63, 168, 62, 189, 169, 178, 65, 142, 64,
953 135, 135, 135, 135, 191, 192, 140, 214, 178, 135,
954 135, 214, 308, 135, 193, 142, 194, 195, 196, 198,
955 169, 191, 192, 395, 135, 189, 189, 197, 189, 189,
956 199, 193, 379, 194, 195, 196, 198, 374, 192, 200,
957 191, 201, 216, 219, 228, 284, 216, 199, 228, 198,
958 219, 308, 233, 194, 193, 233, 200, 284, 201, 219,
959 235, 235, 242, 242, 199, 246, 246, 253, 253, 259,
960 259, 259, 260, 260, 260, 260, 267, 200, 367, 267,
961
962 201, 260, 260, 261, 261, 261, 261, 272, 272, 277,
963 277, 286, 261, 261, 287, 280, 260, 280, 291, 293,
964 280, 302, 303, 286, 304, 305, 287, 261, 306, 310,
965 291, 293, 311, 361, 312, 345, 345, 313, 302, 303,
966 365, 304, 305, 347, 347, 306, 310, 351, 362, 311,
967 361, 312, 303, 287, 313, 363, 364, 352, 304, 351,
968 341, 341, 341, 305, 354, 362, 341, 306, 341, 352,
969 310, 312, 363, 364, 361, 313, 354, 366, 360, 365,
970 341, 368, 369, 370, 371, 387, 359, 398, 387, 387,
971 387, 392, 363, 393, 364, 352, 394, 399, 368, 369,
972
973 370, 371, 400, 392, 398, 393, 401, 358, 394, 403,
974 404, 357, 405, 409, 399, 407, 407, 407, 412, 400,
975 413, 353, 368, 401, 371, 409, 403, 404, 398, 405,
976 408, 408, 408, 393, 414, 412, 416, 413, 408, 417,
977 418, 421, 350, 422, 424, 425, 401, 419, 426, 429,
978 349, 414, 428, 416, 405, 409, 417, 418, 421, 419,
979 422, 424, 425, 348, 428, 426, 429, 340, 339, 338,
980 336, 335, 334, 332, 331, 330, 414, 434, 434, 434,
981 434, 434, 434, 434, 434, 434, 434, 434, 435, 435,
982 435, 435, 435, 435, 435, 435, 435, 435, 435, 436,
983
984 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
985 437, 437, 437, 437, 437, 437, 437, 437, 437, 437,
986 437, 438, 438, 438, 438, 438, 438, 438, 438, 438,
987 438, 438, 439, 439, 439, 439, 439, 439, 439, 439,
988 439, 439, 439, 440, 440, 440, 440, 440, 440, 440,
989 440, 440, 440, 440, 441, 441, 441, 441, 441, 441,
990 441, 441, 441, 441, 441, 442, 442, 442, 442, 442,
991 442, 442, 442, 442, 442, 442, 443, 443, 443, 443,
992 443, 443, 443, 443, 443, 443, 443, 444, 444, 444,
993 444, 444, 444, 444, 444, 444, 444, 444, 445, 445,
994
995 328, 445, 445, 445, 445, 445, 445, 445, 445, 446,
996 325, 446, 446, 447, 324, 323, 320, 319, 318, 317,
997 447, 447, 448, 314, 309, 301, 300, 448, 448, 448,
998 448, 449, 449, 449, 299, 298, 297, 449, 449, 294,
999 292, 449, 450, 450, 290, 450, 450, 450, 450, 450,
1000 450, 450, 450, 451, 288, 451, 451, 452, 285, 283,
1001 282, 452, 452, 452, 452, 452, 452, 452, 453, 453,
1002 281, 453, 279, 453, 453, 453, 453, 453, 453, 454,
1003 275, 454, 454, 455, 455, 270, 455, 258, 455, 455,
1004 455, 455, 455, 455, 456, 256, 456, 456, 457, 255,
1005
1006 252, 250, 249, 248, 457, 457, 457, 457, 457, 458,
1007 245, 244, 458, 241, 239, 234, 458, 458, 459, 459,
1008 231, 459, 459, 459, 459, 459, 459, 459, 459, 460,
1009 460, 230, 460, 460, 460, 460, 460, 460, 460, 460,
1010 461, 229, 461, 461, 462, 462, 225, 462, 462, 463,
1011 223, 218, 217, 212, 463, 463, 463, 463, 463, 463,
1012 464, 211, 210, 208, 464, 464, 465, 465, 206, 465,
1013 203, 465, 465, 465, 465, 465, 465, 466, 466, 188,
1014 466, 466, 466, 466, 466, 466, 466, 466, 467, 187,
1015 467, 467, 468, 186, 468, 468, 469, 469, 185, 183,
1016
1017 469, 469, 469, 469, 469, 469, 470, 470, 470, 470,
1018 470, 470, 470, 470, 470, 470, 470, 471, 471, 180,
1019 179, 471, 471, 471, 471, 471, 471, 472, 472, 472,
1020 472, 472, 472, 472, 472, 472, 472, 472, 473, 473,
1021 473, 176, 473, 473, 473, 473, 473, 473, 473, 474,
1022 171, 166, 163, 474, 474, 162, 474, 474, 475, 161,
1023 475, 475, 476, 160, 158, 153, 476, 476, 133, 476,
1024 476, 477, 477, 131, 477, 477, 477, 477, 477, 477,
1025 477, 477, 478, 478, 478, 478, 129, 478, 478, 478,
1026 478, 478, 478, 479, 126, 124, 123, 119, 479, 479,
1027
1028 479, 479, 480, 480, 480, 480, 480, 480, 480, 118,
1029 480, 480, 480, 481, 481, 114, 481, 481, 481, 481,
1030 481, 481, 481, 481, 482, 482, 482, 482, 111, 482,
1031 482, 482, 482, 482, 482, 483, 483, 104, 483, 483,
1032 483, 483, 483, 483, 483, 483, 484, 102, 101, 100,
1033 94, 484, 90, 484, 484, 485, 485, 485, 485, 485,
1034 485, 485, 485, 485, 485, 485, 486, 486, 84, 486,
1035 486, 486, 486, 486, 486, 486, 486, 487, 487, 488,
1036 79, 78, 77, 73, 488, 70, 488, 488, 489, 489,
1037 69, 489, 489, 489, 489, 489, 489, 489, 489, 490,
1038
1039 68, 490, 491, 59, 58, 57, 56, 54, 53, 491,
1040 491, 492, 52, 51, 47, 32, 31, 8, 492, 492,
1041 493, 493, 7, 493, 493, 494, 494, 494, 494, 2,
1042 494, 494, 494, 494, 494, 494, 495, 1, 0, 0,
1043 495, 495, 0, 495, 495, 496, 0, 0, 0, 496,
1044 496, 0, 496, 496, 497, 497, 498, 0, 0, 0,
1045 0, 498, 498, 498, 498, 433, 433, 433, 433, 433,
1046 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
1047 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
1048 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
1049
1050 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
1051 433, 433, 433
1052 } ;
1053
1054extern int pyscanYY_flex_debug;
1055int pyscanYY_flex_debug = 0;
1056
1057static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
1058static char *yy_full_match;
1059static int yy_lp;
1060static int yy_looking_for_trail_begin = 0;
1061static int yy_full_lp;
1062static int *yy_full_state;
1063#define YY_TRAILING_MASK 0x2000
1064#define YY_TRAILING_HEAD_MASK 0x4000
1065#define REJECT \
1066{ \
1067*yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */ \
1068yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
1069(yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
1070(yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
1071yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
1072++(yy_lp); \
1073goto find_rule; \
1074}
1075
1076#define yymore() yymore_used_but_not_detected
1077#define YY_MORE_ADJ 0
1078#define YY_RESTORE_YY_MORE_OFFSET
1079char *pyscanYYtext;
1080#line 1 "pyscanner.l"
1081/******************************************************************************
1082 *
1083 * $Id: pyscanner.l,v 1.9 2001/03/19 19:27:39 root Exp $
1084 *
1085 * Copyright (C) 1997-2011 by Dimitri van Heesch.
1086 *
1087 * Permission to use, copy, modify, and distribute this software and its
1088 * documentation under the terms of the GNU General Public License is hereby
1089 * granted. No representations are made about the suitability of this software
1090 * for any purpose. It is provided "as is" without express or implied warranty.
1091 * See the GNU General Public License for more details.
1092 *
1093 * Documents produced by Doxygen are derivative works derived from the
1094 * input used in their production; they are not affected by this license.
1095 *
1096 */
1097/* This code is based on the work done by the MoxyPyDoxy team
1098 * (Linda Leong, Mike Rivera, Kim Truong, and Gabriel Estrada)
1099 * in Spring 2005 as part of CS 179E: Compiler Design Project
1100 * at the University of California, Riverside; the course was
1101 * taught by Peter H. Froehlich <phf@acm.org>.
1102 */
1103#line 26 "pyscanner.l"
1104
1105/*
1106 *includes
1107 */
1108#include <stdio.h>
1109#include <stdlib.h>
1110#include <assert.h>
1111#include <ctype.h>
1112
1113#include "qtbc.h"
1114#include <qarray.h>
1115#include <qstack.h>
1116#include <qregexp.h>
1117#include <unistd.h>
1118#include <qfile.h>
1119#include <qfileinfo.h>
1120
1121#include "pyscanner.h"
1122#include "entry.h"
1123#include "message.h"
1124#include "config.h"
1125#include "doxygen.h"
1126#include "util.h"
1127#include "defargs.h"
1128#include "language.h"
1129#include "commentscan.h"
1130#include "pycode.h"
1131
1132#define YY_NEVER_INTERACTIVE 1
1133
1134/* -----------------------------------------------------------------
1135 *
1136 *statics
1137 */
1138
1139
1140static ParserInterface *g_thisParser;
1141static const char * inputString;
1142static intinputPosition;
1143static QFile inputFile;
1144
1145static Protectionprotection;
1146
1147static Entry*current_root = 0 ;
1148static Entry*current = 0 ;
1149static Entry*previous = 0 ;
1150static Entry*bodyEntry = 0 ;
1151static intyyLineNr = 1 ;
1152static QCStringyyFileName;
1153static MethodTypes mtype;
1154static bool gstat;
1155static Specifier virt;
1156
1157static int docBlockContext;
1158static QCString docBlock;
1159static QCString docBlockName;
1160static bool docBlockInBody;
1161static bool docBlockJavaStyle;
1162static bool docBrief;
1163static bool docBlockSpecial;
1164
1165static bool g_doubleQuote;
1166static bool g_specialBlock;
1167static int g_stringContext;
1168static QGString * g_copyString;
1169static int g_indent = 0;
1170static int g_curIndent = 0;
1171
1172static QDict<QCString> g_packageNameCache(257);
1173static QCString g_packageScope;
1174
1175static char g_atomStart;
1176static char g_atomEnd;
1177static int g_atomCount;
1178
1179//static bool g_insideConstructor;
1180
1181static QCString g_moduleScope;
1182static QCString g_packageName;
1183
1184static bool g_hideClassDocs;
1185
1186static QCString g_defVal;
1187static int g_braceCount;
1188
1189static bool g_lexInit = FALSE;
1190static bool g_packageCommentAllowed;
1191
1192//-----------------------------------------------------------------------------
1193
1194
1195static void initParser()
1196{
1197 protection = Public;
1198 mtype = Method;
1199 gstat = FALSE;
1200 virt = Normal;
1201 previous = 0;
1202 g_packageCommentAllowed = TRUE;
1203 g_packageNameCache.setAutoDelete(TRUE);
1204}
1205
1206static void initEntry()
1207{
1208 //current->python = TRUE;
1209 current->protection = protection ;
1210 current->mtype = mtype;
1211 current->virt = virt;
1212 current->stat = gstat;
1213 current->lang = SrcLangExt_Python;
1214 current->setParent(current_root);
1215 initGroupInfo(current);
1216}
1217
1218static void newEntry()
1219{
1220 previous = current;
1221 current_root->addSubEntry(current);
1222 current = new Entry ;
1223 initEntry();
1224}
1225
1226static void newVariable()
1227{
1228 if (!current->name.isEmpty() && current->name.at(0)=='_') // mark as private
1229 {
1230 current->protection=Private;
1231 }
1232 if (current_root->section&Entry::COMPOUND_MASK) // mark as class variable
1233 {
1234 current->stat = TRUE;
1235 }
1236 newEntry();
1237}
1238
1239static void newFunction()
1240{
1241 if (current->name.left(2)=="__" && current->name.right(2)=="__")
1242 {
1243 // special method name, see
1244 // http://docs.python.org/ref/specialnames.html
1245 current->protection=Public;
1246 }
1247 else if (current->name.at(0)=='_')
1248 {
1249 current->protection=Private;
1250 }
1251}
1252
1253static inline int computeIndent(const char *s)
1254{
1255 int col=0;
1256 static int tabSize=Config_getInt("TAB_SIZE");
1257 const char *p=s;
1258 char c;
1259 while ((c=*p++))
1260 {
1261 if (c==' ') col++;
1262 else if (c=='\t') col+=tabSize-(col%tabSize);
1263 else break;
1264 }
1265 return col;
1266}
1267
1268static QCString findPackageScopeFromPath(const QCString &path)
1269{
1270 QCString *pScope = g_packageNameCache.find(path);
1271 if (pScope)
1272 {
1273 return *pScope;
1274 }
1275 QFileInfo pf(path+"/__init__.py"); // found package initialization file
1276 if (pf.exists())
1277 {
1278 int i=path.findRev('/');
1279 if (i!=-1)
1280 {
1281 QCString scope = findPackageScopeFromPath(path.left(i));
1282 if (!scope.isEmpty())
1283 {
1284scope+="::";
1285 }
1286 scope+=path.mid(i+1);
1287 g_packageNameCache.insert(path,new QCString(scope));
1288 return scope;
1289 }
1290 }
1291 return "";
1292}
1293
1294static QCString findPackageScope(const char *fileName)
1295{
1296 if (fileName==0) return "";
1297 QFileInfo fi(fileName);
1298 return findPackageScopeFromPath(fi.dirPath(TRUE).data());
1299}
1300
1301//-----------------------------------------------------------------------------
1302
1303static void lineCount()
1304{
1305 for( const char* c = pyscanYYtext ; *c ; ++c )
1306 yyLineNr += (*c == '\n') ;
1307}
1308
1309#if 0
1310// Appends the current-name to current-type;
1311// Destroys current-name.
1312// Destroys current->args and current->argList
1313static void addType( Entry* current )
1314{
1315 uint tl=current->type.length();
1316 if ( tl>0 && !current->name.isEmpty() && current->type.at(tl-1)!='.')
1317 {
1318 current->type += ' ' ;
1319 }
1320 current->type += current->name ;
1321 current->name.resize(0) ;
1322 tl=current->type.length();
1323 if ( tl>0 && !current->args.isEmpty() && current->type.at(tl-1)!='.')
1324 {
1325 current->type += ' ' ;
1326 }
1327 current->type += current->args ;
1328 current->args.resize(0) ;
1329 current->argList->clear();
1330}
1331
1332static QCString stripQuotes(const char *s)
1333{
1334 QCString name;
1335 if (s==0 || *s==0) return name;
1336 name=s;
1337 if (name.at(0)=='"' && name.at(name.length()-1)=='"')
1338 {
1339 name=name.mid(1,name.length()-2);
1340 }
1341 return name;
1342}
1343#endif
1344//-----------------------------------------------------------------
1345
1346//-----------------------------------------------------------------
1347static void startCommentBlock(bool brief)
1348{
1349 if (brief)
1350 {
1351 current->briefFile = yyFileName;
1352 current->briefLine = yyLineNr;
1353 }
1354 else
1355 {
1356 current->docFile = yyFileName;
1357 current->docLine = yyLineNr;
1358 }
1359}
1360
1361/*
1362static void appendDocBlock() {
1363 previous = current;
1364 current_root->addSubEntry(current);
1365 current = new Entry;
1366 initEntry();
1367}
1368*/
1369
1370static void handleCommentBlock(const QCString &doc,bool brief)
1371{
1372 //printf("handleCommentBlock(doc=[%s] brief=%d docBlockInBody=%d docBlockJavaStyle=%d\n",
1373 // doc.data(),brief,docBlockInBody,docBlockJavaStyle);
1374
1375 // TODO: Fix me
1376 docBlockInBody=FALSE;
1377
1378 if (docBlockInBody && previous && !previous->doc.isEmpty())
1379 {
1380 previous->doc=previous->doc.stripWhiteSpace()+"\n\n";
1381 }
1382
1383 int position = 0;
1384 bool needsEntry;
1385 int lineNr = brief ? current->briefLine : current->docLine;
1386 while (parseCommentBlock(
1387g_thisParser,
1388(docBlockInBody && previous) ? previous : current,
1389doc, // text
1390yyFileName, // file
1391lineNr,
1392docBlockInBody ? FALSE : brief,
1393 docBlockJavaStyle, // javadoc style // or FALSE,
1394docBlockInBody,
1395protection,
1396 position,
1397 needsEntry)
1398 ) // need to start a new entry
1399 {
1400 if (needsEntry)
1401 {
1402 newEntry();
1403 }
1404 }
1405 if (needsEntry)
1406 {
1407 newEntry();
1408 }
1409
1410}
1411
1412static void endOfDef(int correction=0)
1413{
1414 if (bodyEntry)
1415 {
1416 bodyEntry->endBodyLine = yyLineNr-correction;
1417 bodyEntry = 0;
1418 }
1419 newEntry();
1420 //g_insideConstructor = FALSE;
1421}
1422
1423static inline void addToString(const char *s)
1424{
1425 if (g_copyString) (*g_copyString)+=s;
1426}
1427
1428static void initTriDoubleQuoteBlock()
1429{
1430 docBlockContext = YY_START;
1431 docBlockInBody = FALSE;
1432 docBlockJavaStyle = TRUE;
1433 docBlockSpecial = pyscanYYtext[3]=='!';
1434 docBlock.resize(0);
1435 g_doubleQuote = TRUE;
1436 startCommentBlock(FALSE);
1437}
1438
1439static void initTriSingleQuoteBlock()
1440{
1441 docBlockContext = YY_START;
1442 docBlockInBody = FALSE;
1443 docBlockJavaStyle = TRUE;
1444 docBlockSpecial = pyscanYYtext[3]=='!';
1445 docBlock.resize(0);
1446 g_doubleQuote = FALSE;
1447 startCommentBlock(FALSE);
1448}
1449
1450static void initSpecialBlock()
1451{
1452 docBlockContext = YY_START;
1453 docBlockInBody = FALSE;
1454 docBlockJavaStyle = TRUE;
1455 docBrief = TRUE;
1456 docBlock.resize(0);
1457 startCommentBlock(TRUE);
1458}
1459
1460static void searchFoundDef()
1461{
1462 current->fileName = yyFileName;
1463 current->startLine = yyLineNr;
1464 current->bodyLine = yyLineNr;
1465 current->section = Entry::FUNCTION_SEC;
1466 current->protection = protection = Public;
1467 current->lang = SrcLangExt_Python;
1468 current->virt = Normal;
1469 current->stat = FALSE;
1470 current->mtype = mtype = Method;
1471 current->type.resize(0);
1472 current->name.resize(0);
1473 current->args.resize(0);
1474 current->argList->clear();
1475 g_packageCommentAllowed = FALSE;
1476}
1477
1478static void searchFoundClass()
1479{
1480 current->section = Entry::CLASS_SEC;
1481 current->argList->clear();
1482 current->type += "class" ;
1483 current->fileName = yyFileName;
1484 current->bodyLine = yyLineNr;
1485 g_packageCommentAllowed = FALSE;
1486}
1487
1488//-----------------------------------------------------------------------------
1489/* ----------------------------------------------------------------- */
1490#undefYY_INPUT
1491#defineYY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
1492
1493static int yyread(char *buf,int max_size)
1494{
1495 int c=0;
1496 while ( c < max_size && inputString[inputPosition] )
1497 {
1498 *buf = inputString[inputPosition++] ;
1499 //printf("%d (%c)\n",*buf,*buf);
1500 c++; buf++;
1501 }
1502 return c;
1503}
1504
1505/* start command character */
1506/* Main start state */
1507
1508
1509/* Mid-comment states */
1510/* %x FuncDoubleComment */
1511/* %x ClassDoubleComment */
1512
1513
1514
1515/* Function states */
1516
1517
1518
1519
1520/* Class states */
1521
1522
1523
1524
1525/* Variable states */
1526
1527
1528
1529/* String states */
1530
1531
1532
1533/* import */
1534
1535
1536
1537#line 1538 "<stdout>"
1538
1539#define INITIAL 0
1540#define Search 1
1541#define SearchMemVars 2
1542#define TryClassDocString 3
1543#define TripleComment 4
1544#define SpecialComment 5
1545#define FunctionDec 6
1546#define FunctionParams 7
1547#define FunctionBody 8
1548#define FunctionParamDefVal 9
1549#define ClassDec 10
1550#define ClassInheritance 11
1551#define ClassCaptureIndent 12
1552#define ClassBody 13
1553#define VariableDec 14
1554#define VariableEnd 15
1555#define VariableAtom 16
1556#define SingleQuoteString 17
1557#define DoubleQuoteString 18
1558#define TripleString 19
1559#define FromMod 20
1560#define FromModItem 21
1561#define Import 22
1562
1563#ifndef YY_NO_UNISTD_H
1564/* Special case for "unistd.h", since it is non-ANSI. We include it way
1565 * down here because we want the user's section 1 to have been scanned first.
1566 * The user has a chance to override it with an option.
1567 */
1568#include <unistd.h>
1569#endif
1570
1571#ifndef YY_EXTRA_TYPE
1572#define YY_EXTRA_TYPE void *
1573#endif
1574
1575static int yy_init_globals (void );
1576
1577/* Accessor methods to globals.
1578 These are made visible to non-reentrant scanners for convenience. */
1579
1580int pyscanYYlex_destroy (void );
1581
1582int pyscanYYget_debug (void );
1583
1584void pyscanYYset_debug (int debug_flag );
1585
1586YY_EXTRA_TYPE pyscanYYget_extra (void );
1587
1588void pyscanYYset_extra (YY_EXTRA_TYPE user_defined );
1589
1590FILE *pyscanYYget_in (void );
1591
1592void pyscanYYset_in (FILE * in_str );
1593
1594FILE *pyscanYYget_out (void );
1595
1596void pyscanYYset_out (FILE * out_str );
1597
1598yy_size_t pyscanYYget_leng (void );
1599
1600char *pyscanYYget_text (void );
1601
1602int pyscanYYget_lineno (void );
1603
1604void pyscanYYset_lineno (int line_number );
1605
1606/* Macros after this point can all be overridden by user definitions in
1607 * section 1.
1608 */
1609
1610#ifndef YY_SKIP_YYWRAP
1611#ifdef __cplusplus
1612extern "C" int pyscanYYwrap (void );
1613#else
1614extern int pyscanYYwrap (void );
1615#endif
1616#endif
1617
1618 static void yyunput (int c,char *buf_ptr );
1619
1620#ifndef yytext_ptr
1621static void yy_flex_strncpy (char *,yyconst char *,int );
1622#endif
1623
1624#ifdef YY_NEED_STRLEN
1625static int yy_flex_strlen (yyconst char * );
1626#endif
1627
1628#ifndef YY_NO_INPUT
1629
1630#ifdef __cplusplus
1631static int yyinput (void );
1632#else
1633static int input (void );
1634#endif
1635
1636#endif
1637
1638/* Amount of stuff to slurp up with each read. */
1639#ifndef YY_READ_BUF_SIZE
1640#define YY_READ_BUF_SIZE 262144
1641#endif
1642
1643/* Copy whatever the last rule matched to the standard output. */
1644#ifndef ECHO
1645/* This used to be an fputs(), but since the string might contain NUL's,
1646 * we now use fwrite().
1647 */
1648#define ECHO fwrite( pyscanYYtext, pyscanYYleng, 1, pyscanYYout )
1649#endif
1650
1651/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1652 * is returned in "result".
1653 */
1654#ifndef YY_INPUT
1655#define YY_INPUT(buf,result,max_size) \
1656if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1657{ \
1658int c = '*'; \
1659yy_size_t n; \
1660for ( n = 0; n < max_size && \
1661 (c = getc( pyscanYYin )) != EOF && c != '\n'; ++n ) \
1662buf[n] = (char) c; \
1663if ( c == '\n' ) \
1664buf[n++] = (char) c; \
1665if ( c == EOF && ferror( pyscanYYin ) ) \
1666YY_FATAL_ERROR( "input in flex scanner failed" ); \
1667result = n; \
1668} \
1669else \
1670{ \
1671errno=0; \
1672while ( (result = fread(buf, 1, max_size, pyscanYYin))==0 && ferror(pyscanYYin)) \
1673{ \
1674if( errno != EINTR) \
1675{ \
1676YY_FATAL_ERROR( "input in flex scanner failed" ); \
1677break; \
1678} \
1679errno=0; \
1680clearerr(pyscanYYin); \
1681} \
1682}\
1683\
1684
1685#endif
1686
1687/* No semi-colon after return; correct usage is to write "yyterminate();" -
1688 * we don't want an extra ';' after the "return" because that will cause
1689 * some compilers to complain about unreachable statements.
1690 */
1691#ifndef yyterminate
1692#define yyterminate() return YY_NULL
1693#endif
1694
1695/* Number of entries by which start-condition stack grows. */
1696#ifndef YY_START_STACK_INCR
1697#define YY_START_STACK_INCR 25
1698#endif
1699
1700/* Report a fatal error. */
1701#ifndef YY_FATAL_ERROR
1702#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1703#endif
1704
1705/* end tables serialization structures and prototypes */
1706
1707/* Default declaration of generated scanner - a define so the user can
1708 * easily add parameters.
1709 */
1710#ifndef YY_DECL
1711#define YY_DECL_IS_OURS 1
1712
1713extern int pyscanYYlex (void);
1714
1715#define YY_DECL int pyscanYYlex (void)
1716#endif /* !YY_DECL */
1717
1718/* Code executed at the beginning of each rule, after pyscanYYtext and pyscanYYleng
1719 * have been set up.
1720 */
1721#ifndef YY_USER_ACTION
1722#define YY_USER_ACTION
1723#endif
1724
1725/* Code executed at the end of each rule. */
1726#ifndef YY_BREAK
1727#define YY_BREAK break;
1728#endif
1729
1730#define YY_RULE_SETUP \
1731if ( pyscanYYleng > 0 ) \
1732YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1733(pyscanYYtext[pyscanYYleng - 1] == '\n'); \
1734YY_USER_ACTION
1735
1736/** The main scanner function which does all the work.
1737 */
1738YY_DECL
1739{
1740register yy_state_type yy_current_state;
1741register char *yy_cp, *yy_bp;
1742register int yy_act;
1743
1744#line 518 "pyscanner.l"
1745
1746
1747 /* ------------ Function recognition rules -------------- */
1748
1749#line 1750 "<stdout>"
1750
1751if ( !(yy_init) )
1752{
1753(yy_init) = 1;
1754
1755#ifdef YY_USER_INIT
1756YY_USER_INIT;
1757#endif
1758
1759 /* Create the reject buffer large enough to save one state per allowed character. */
1760 if ( ! (yy_state_buf) )
1761 (yy_state_buf) = (yy_state_type *)pyscanYYalloc(YY_STATE_BUF_SIZE );
1762 if ( ! (yy_state_buf) )
1763 YY_FATAL_ERROR( "out of dynamic memory in pyscanYYlex()" );
1764
1765if ( ! (yy_start) )
1766(yy_start) = 1;/* first start state */
1767
1768if ( ! pyscanYYin )
1769pyscanYYin = stdin;
1770
1771if ( ! pyscanYYout )
1772pyscanYYout = stdout;
1773
1774if ( ! YY_CURRENT_BUFFER ) {
1775pyscanYYensure_buffer_stack ();
1776YY_CURRENT_BUFFER_LVALUE =
1777pyscanYY_create_buffer(pyscanYYin,YY_BUF_SIZE );
1778}
1779
1780pyscanYY_load_buffer_state( );
1781}
1782
1783while ( 1 )/* loops until end-of-file is reached */
1784{
1785yy_cp = (yy_c_buf_p);
1786
1787/* Support of pyscanYYtext. */
1788*yy_cp = (yy_hold_char);
1789
1790/* yy_bp points to the position in yy_ch_buf of the start of
1791 * the current run.
1792 */
1793yy_bp = yy_cp;
1794
1795yy_current_state = (yy_start);
1796yy_current_state += YY_AT_BOL();
1797
1798(yy_state_ptr) = (yy_state_buf);
1799*(yy_state_ptr)++ = yy_current_state;
1800
1801yy_match:
1802do
1803{
1804register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1805while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1806{
1807yy_current_state = (int) yy_def[yy_current_state];
1808if ( yy_current_state >= 434 )
1809yy_c = yy_meta[(unsigned int) yy_c];
1810}
1811yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1812*(yy_state_ptr)++ = yy_current_state;
1813++yy_cp;
1814}
1815while ( yy_base[yy_current_state] != 1566 );
1816
1817yy_find_action:
1818yy_current_state = *--(yy_state_ptr);
1819(yy_lp) = yy_accept[yy_current_state];
1820goto find_rule; /* Shut up GCC warning -Wall */
1821find_rule: /* we branch to this label when backing up */
1822for ( ; ; ) /* until we find what rule we matched */
1823{
1824if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
1825{
1826yy_act = yy_acclist[(yy_lp)];
1827if ( yy_act & YY_TRAILING_HEAD_MASK ||
1828 (yy_looking_for_trail_begin) )
1829{
1830if ( yy_act == (yy_looking_for_trail_begin) )
1831{
1832(yy_looking_for_trail_begin) = 0;
1833yy_act &= ~YY_TRAILING_HEAD_MASK;
1834break;
1835}
1836}
1837else if ( yy_act & YY_TRAILING_MASK )
1838{
1839(yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
1840(yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
1841}
1842else
1843{
1844(yy_full_match) = yy_cp;
1845(yy_full_state) = (yy_state_ptr);
1846(yy_full_lp) = (yy_lp);
1847break;
1848}
1849++(yy_lp);
1850goto find_rule;
1851}
1852--yy_cp;
1853yy_current_state = *--(yy_state_ptr);
1854(yy_lp) = yy_accept[yy_current_state];
1855}
1856
1857YY_DO_BEFORE_ACTION;
1858
1859do_action:/* This label is used only to access EOF actions. */
1860
1861switch ( yy_act )
1862{ /* beginning of action switch */
1863
1864case 1:
1865YY_RULE_SETUP
1866#line 524 "pyscanner.l"
1867{ // start of a function/method definition with indent
1868 g_indent=computeIndent(pyscanYYtext);
1869 searchFoundDef();
1870 BEGIN( FunctionDec );
1871 }
1872YY_BREAK
1873case 2:
1874YY_RULE_SETUP
1875#line 529 "pyscanner.l"
1876{ // start of a function/method definition
1877 searchFoundDef();
1878 BEGIN( FunctionDec );
1879 }
1880YY_BREAK
1881case 3:
1882YY_RULE_SETUP
1883#line 534 "pyscanner.l"
1884{ // start of a class definition with indent
1885 g_indent=computeIndent(pyscanYYtext);
1886 searchFoundClass();
1887 BEGIN( ClassDec ) ;
1888 }
1889YY_BREAK
1890case 4:
1891YY_RULE_SETUP
1892#line 539 "pyscanner.l"
1893{ // start of a class definition
1894 searchFoundClass();
1895 BEGIN( ClassDec ) ;
1896 }
1897YY_BREAK
1898case 5:
1899#line 544 "pyscanner.l"
1900case 6:
1901YY_RULE_SETUP
1902#line 544 "pyscanner.l"
1903{ // start of an from import
1904 g_packageCommentAllowed = FALSE;
1905 BEGIN( FromMod );
1906 }
1907YY_BREAK
1908case 7:
1909#line 550 "pyscanner.l"
1910case 8:
1911YY_RULE_SETUP
1912#line 550 "pyscanner.l"
1913{ // start of an import statement
1914 g_packageCommentAllowed = FALSE;
1915 BEGIN( Import );
1916 }
1917YY_BREAK
1918case 9:
1919YY_RULE_SETUP
1920#line 554 "pyscanner.l"
1921{ // property
1922 current->section = Entry::VARIABLE_SEC;
1923 current->mtype = Property;
1924current->name = QCString(pyscanYYtext).stripWhiteSpace();
1925current->fileName = yyFileName;
1926current->startLine = yyLineNr;
1927current->bodyLine = yyLineNr;
1928g_packageCommentAllowed = FALSE;
1929BEGIN(VariableDec);
1930 }
1931YY_BREAK
1932case 10:
1933/* rule 10 can match eol */
1934YY_RULE_SETUP
1935#line 564 "pyscanner.l"
1936{ // variable
1937 g_indent=computeIndent(pyscanYYtext);
1938 current->section = Entry::VARIABLE_SEC;
1939current->name = QCString(pyscanYYtext).stripWhiteSpace();
1940current->fileName = yyFileName;
1941current->startLine = yyLineNr;
1942current->bodyLine = yyLineNr;
1943g_packageCommentAllowed = FALSE;
1944BEGIN(VariableDec);
1945 }
1946YY_BREAK
1947case 11:
1948YY_RULE_SETUP
1949#line 574 "pyscanner.l"
1950{ // start of a single quoted string
1951 g_stringContext=YY_START;
1952 g_copyString=0;
1953g_packageCommentAllowed = FALSE;
1954 BEGIN( SingleQuoteString );
1955 }
1956YY_BREAK
1957case 12:
1958YY_RULE_SETUP
1959#line 580 "pyscanner.l"
1960{ // start of a double quoted string
1961 g_stringContext=YY_START;
1962g_copyString=0;
1963g_packageCommentAllowed = FALSE;
1964 BEGIN( DoubleQuoteString );
1965 }
1966YY_BREAK
1967case 13:
1968YY_RULE_SETUP
1969#line 587 "pyscanner.l"
1970{ // normal comment
1971g_packageCommentAllowed = FALSE;
1972 }
1973YY_BREAK
1974case 14:
1975YY_RULE_SETUP
1976#line 590 "pyscanner.l"
1977{ // some other identifier
1978g_packageCommentAllowed = FALSE;
1979 }
1980YY_BREAK
1981case 15:
1982YY_RULE_SETUP
1983#line 593 "pyscanner.l"
1984{
1985 g_curIndent=computeIndent(pyscanYYtext);
1986 }
1987YY_BREAK
1988case 16:
1989/* rule 16 can match eol */
1990YY_RULE_SETUP
1991#line 597 "pyscanner.l"
1992{ // new line
1993 lineCount();
1994 }
1995YY_BREAK
1996case 17:
1997YY_RULE_SETUP
1998#line 601 "pyscanner.l"
1999{ // start of a comment block
2000initTriDoubleQuoteBlock();
2001BEGIN(TripleComment);
2002 }
2003YY_BREAK
2004case 18:
2005YY_RULE_SETUP
2006#line 606 "pyscanner.l"
2007{ // start of a comment block
2008initTriSingleQuoteBlock();
2009BEGIN(TripleComment);
2010 }
2011YY_BREAK
2012case 19:
2013/* rule 19 can match eol */
2014*yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2015(yy_c_buf_p) = yy_cp = yy_bp + 2;
2016YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2017YY_RULE_SETUP
2018#line 611 "pyscanner.l"
2019{ // start of a special comment
2020 g_curIndent=computeIndent(pyscanYYtext);
2021g_packageCommentAllowed = FALSE;
2022initSpecialBlock();
2023BEGIN(SpecialComment);
2024 }
2025YY_BREAK
2026case 20:
2027YY_RULE_SETUP
2028#line 617 "pyscanner.l"
2029{ // any other character...
2030 // This is the major default
2031 // that should catch everything
2032 // else in Body.
2033 }
2034YY_BREAK
2035
2036
2037case 21:
2038YY_RULE_SETUP
2039#line 625 "pyscanner.l"
2040{ // from package import
2041 g_packageName=pyscanYYtext;
2042 }
2043YY_BREAK
2044case 22:
2045YY_RULE_SETUP
2046#line 628 "pyscanner.l"
2047{
2048 BEGIN(FromModItem);
2049 }
2050YY_BREAK
2051case 23:
2052/* rule 23 can match eol */
2053YY_RULE_SETUP
2054#line 631 "pyscanner.l"
2055{
2056 yyLineNr++;
2057 BEGIN(Search);
2058 }
2059YY_BREAK
2060case 24:
2061YY_RULE_SETUP
2062#line 635 "pyscanner.l"
2063{
2064 }
2065YY_BREAK
2066case 25:
2067YY_RULE_SETUP
2068#line 637 "pyscanner.l"
2069{
2070 unput(*pyscanYYtext);
2071 BEGIN(Search);
2072 }
2073YY_BREAK
2074
2075
2076case 26:
2077YY_RULE_SETUP
2078#line 644 "pyscanner.l"
2079{ // import all
2080 QCString item=g_packageName;
2081 current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
2082 current->fileName = yyFileName;
2083 //printf("Adding using directive: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
2084 current->section=Entry::USINGDIR_SEC;
2085 current_root->addSubEntry(current);
2086 current = new Entry ;
2087 initEntry();
2088 BEGIN(Search);
2089 }
2090YY_BREAK
2091case 27:
2092YY_RULE_SETUP
2093#line 655 "pyscanner.l"
2094{
2095 QCString item=g_packageName+"."+pyscanYYtext;
2096 current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
2097 current->fileName = yyFileName;
2098 //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
2099 current->section=Entry::USINGDECL_SEC;
2100 current_root->addSubEntry(current);
2101 current = new Entry ;
2102 initEntry();
2103 BEGIN(Search);
2104}
2105YY_BREAK
2106case 28:
2107/* rule 28 can match eol */
2108YY_RULE_SETUP
2109#line 666 "pyscanner.l"
2110{
2111 yyLineNr++;
2112 BEGIN(Search);
2113 }
2114YY_BREAK
2115case 29:
2116YY_RULE_SETUP
2117#line 670 "pyscanner.l"
2118{
2119}
2120YY_BREAK
2121case 30:
2122YY_RULE_SETUP
2123#line 672 "pyscanner.l"
2124{
2125 unput(*pyscanYYtext);
2126 BEGIN(Search);
2127 }
2128YY_BREAK
2129
2130
2131case 31:
2132YY_RULE_SETUP
2133#line 679 "pyscanner.l"
2134{
2135current->name=removeRedundantWhiteSpace(substitute(pyscanYYtext,".","::"));
2136current->fileName = yyFileName;
2137//printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
2138current->section=Entry::USINGDECL_SEC;
2139current_root->addSubEntry(current);
2140current = new Entry ;
2141initEntry();
2142BEGIN(Search);
2143 }
2144YY_BREAK
2145case 32:
2146/* rule 32 can match eol */
2147YY_RULE_SETUP
2148#line 689 "pyscanner.l"
2149{
2150 yyLineNr++;
2151 BEGIN(Search);
2152 }
2153YY_BREAK
2154case 33:
2155YY_RULE_SETUP
2156#line 693 "pyscanner.l"
2157{
2158}
2159YY_BREAK
2160case 34:
2161YY_RULE_SETUP
2162#line 695 "pyscanner.l"
2163{
2164 unput(*pyscanYYtext);
2165 BEGIN(Search);
2166 }
2167YY_BREAK
2168
2169
2170case 35:
2171YY_RULE_SETUP
2172#line 702 "pyscanner.l"
2173{
2174 //printf("Found member variable %s in %s\n",&pyscanYYtext[5],current_root->name.data());
2175current->name=&pyscanYYtext[5];
2176current->section=Entry::VARIABLE_SEC;
2177current->fileName = yyFileName;
2178current->startLine = yyLineNr;
2179current->bodyLine = yyLineNr;
2180current->type.resize(0);
2181if (current->name.at(0)=='_') // mark as private
2182{
2183 current->protection=Private;
2184}
2185else
2186{
2187 current->protection=Public;
2188}
2189newEntry();
2190 }
2191YY_BREAK
2192case 36:
2193YY_RULE_SETUP
2194#line 720 "pyscanner.l"
2195{ // start of a comment block
2196initTriDoubleQuoteBlock();
2197BEGIN(TripleComment);
2198 }
2199YY_BREAK
2200case 37:
2201YY_RULE_SETUP
2202#line 725 "pyscanner.l"
2203{ // start of a comment block
2204initTriSingleQuoteBlock();
2205BEGIN(TripleComment);
2206 }
2207YY_BREAK
2208case 38:
2209/* rule 38 can match eol */
2210*yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2211(yy_c_buf_p) = yy_cp = yy_bp + 2;
2212YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2213YY_RULE_SETUP
2214#line 730 "pyscanner.l"
2215{ // start of a special comment
2216initSpecialBlock();
2217BEGIN(SpecialComment);
2218 }
2219YY_BREAK
2220case 39:
2221YY_RULE_SETUP
2222#line 734 "pyscanner.l"
2223{ // #
2224 }
2225YY_BREAK
2226case 40:
2227YY_RULE_SETUP
2228#line 736 "pyscanner.l"
2229{ // start of a single quoted string
2230 g_stringContext=YY_START;
2231g_copyString=0;
2232 BEGIN( SingleQuoteString );
2233 }
2234YY_BREAK
2235case 41:
2236YY_RULE_SETUP
2237#line 741 "pyscanner.l"
2238{ // start of a double quoted string
2239 g_stringContext=YY_START;
2240g_copyString=0;
2241 BEGIN( DoubleQuoteString );
2242 }
2243YY_BREAK
2244case 42:
2245/* rule 42 can match eol */
2246YY_RULE_SETUP
2247#line 746 "pyscanner.l"
2248{ yyLineNr++; }
2249YY_BREAK
2250case 43:
2251YY_RULE_SETUP
2252#line 747 "pyscanner.l"
2253// identifiers
2254YY_BREAK
2255case 44:
2256/* rule 44 can match eol */
2257YY_RULE_SETUP
2258#line 748 "pyscanner.l"
2259// other uninteresting stuff
2260YY_BREAK
2261case 45:
2262YY_RULE_SETUP
2263#line 749 "pyscanner.l"
2264// anything else
2265YY_BREAK
2266
2267
2268case 46:
2269/* rule 46 can match eol */
2270YY_RULE_SETUP
2271#line 753 "pyscanner.l"
2272{
2273 //fprintf(stderr,"indent %d<=%d\n",computeIndent(&pyscanYYtext[1]),g_indent);
2274 if (computeIndent(&pyscanYYtext[1])<=g_indent)
2275{
2276 int i;
2277 for (i=pyscanYYleng-1;i>=0;i--)
2278 {
2279 unput(pyscanYYtext[i]);
2280 }
2281 endOfDef();
2282 //YY_CURRENT_BUFFER->yy_at_bol=TRUE;
2283 BEGIN(Search);
2284}
2285else
2286{
2287 yyLineNr++;
2288 current->program+=pyscanYYtext;
2289}
2290 }
2291YY_BREAK
2292case 47:
2293/* rule 47 can match eol */
2294*yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2295(yy_c_buf_p) = yy_cp -= 2;
2296YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2297YY_RULE_SETUP
2298#line 772 "pyscanner.l"
2299{
2300 if (computeIndent(&pyscanYYtext[1])<=g_indent)
2301{
2302 int i;
2303 for (i=pyscanYYleng-1;i>=0;i--)
2304 {
2305 unput(pyscanYYtext[i]);
2306 }
2307 endOfDef();
2308 //YY_CURRENT_BUFFER->yy_at_bol=TRUE;
2309 BEGIN(Search);
2310}
2311else
2312{
2313 yyLineNr++;
2314 current->program+=pyscanYYtext;
2315}
2316 }
2317YY_BREAK
2318case YY_STATE_EOF(FunctionBody):
2319#line 790 "pyscanner.l"
2320{
2321endOfDef();
2322yyterminate();
2323 }
2324YY_BREAK
2325case 48:
2326/* rule 48 can match eol */
2327*yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2328(yy_c_buf_p) = yy_cp -= 1;
2329YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2330YY_RULE_SETUP
2331#line 794 "pyscanner.l"
2332{ // skip empty line
2333 current->program+=pyscanYYtext;
2334 }
2335YY_BREAK
2336case 49:
2337YY_RULE_SETUP
2338#line 797 "pyscanner.l"
2339{ // something at indent >0
2340 current->program+=pyscanYYtext;
2341g_curIndent = computeIndent(pyscanYYtext);
2342 if (g_curIndent<=g_indent)
2343 // jumped out of the function
2344{
2345 endOfDef(1);
2346 BEGIN(Search);
2347}
2348 }
2349YY_BREAK
2350case 50:
2351YY_RULE_SETUP
2352#line 807 "pyscanner.l"
2353{ // start of a single quoted string
2354 current->program+=pyscanYYtext;
2355 g_stringContext=YY_START;
2356 g_specialBlock = FALSE;
2357g_copyString=&current->program;
2358 BEGIN( SingleQuoteString );
2359 }
2360YY_BREAK
2361case 51:
2362YY_RULE_SETUP
2363#line 814 "pyscanner.l"
2364{ // start of a double quoted string
2365 current->program+=pyscanYYtext;
2366 g_stringContext=YY_START;
2367 g_specialBlock = FALSE;
2368g_copyString=&current->program;
2369 BEGIN( DoubleQuoteString );
2370 }
2371YY_BREAK
2372case 52:
2373YY_RULE_SETUP
2374#line 821 "pyscanner.l"
2375{ // non-special stuff
2376 current->program+=pyscanYYtext;
2377 g_specialBlock = FALSE;
2378 }
2379YY_BREAK
2380case 53:
2381YY_RULE_SETUP
2382#line 825 "pyscanner.l"
2383{ // normal comment
2384 current->program+=pyscanYYtext;
2385 }
2386YY_BREAK
2387case 54:
2388YY_RULE_SETUP
2389#line 828 "pyscanner.l"
2390{ // comment half way
2391 current->program+=pyscanYYtext;
2392 }
2393YY_BREAK
2394case 55:
2395/* rule 55 can match eol */
2396YY_RULE_SETUP
2397#line 831 "pyscanner.l"
2398{ yyLineNr++;
2399 current->program+=pyscanYYtext;
2400 }
2401YY_BREAK
2402case 56:
2403YY_RULE_SETUP
2404#line 834 "pyscanner.l"
2405{ // any character
2406 current->program+=*pyscanYYtext;
2407 g_specialBlock = FALSE;
2408 }
2409YY_BREAK
2410case 57:
2411YY_RULE_SETUP
2412#line 839 "pyscanner.l"
2413{ // start of a comment block
2414current->program+=pyscanYYtext;
2415initTriDoubleQuoteBlock();
2416BEGIN(TripleComment);
2417 }
2418YY_BREAK
2419case 58:
2420YY_RULE_SETUP
2421#line 845 "pyscanner.l"
2422{ // start of a comment block
2423current->program+=pyscanYYtext;
2424initTriSingleQuoteBlock();
2425BEGIN(TripleComment);
2426 }
2427YY_BREAK
2428case 59:
2429/* rule 59 can match eol */
2430*yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2431(yy_c_buf_p) = yy_cp = yy_bp + 2;
2432YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2433YY_RULE_SETUP
2434#line 851 "pyscanner.l"
2435{ // start of a special comment
2436initSpecialBlock();
2437BEGIN(SpecialComment);
2438 }
2439YY_BREAK
2440
2441
2442case 60:
2443YY_RULE_SETUP
2444#line 860 "pyscanner.l"
2445{
2446 //found function name
2447 if (current->type.isEmpty())
2448 {
2449 current->type = "def";
2450 }
2451 current->name = pyscanYYtext;
2452 current->name = current->name.stripWhiteSpace();
2453 newFunction();
2454 }
2455YY_BREAK
2456case 61:
2457YY_RULE_SETUP
2458#line 870 "pyscanner.l"
2459{ // function without arguments
2460 g_specialBlock = TRUE; // expecting a docstring
2461 bodyEntry = current;
2462 BEGIN( FunctionBody );
2463 }
2464YY_BREAK
2465case 62:
2466YY_RULE_SETUP
2467#line 876 "pyscanner.l"
2468{
2469 BEGIN( FunctionParams );
2470 }
2471YY_BREAK
2472
2473
2474case 63:
2475YY_RULE_SETUP
2476#line 882 "pyscanner.l"
2477{
2478 }
2479YY_BREAK
2480case 64:
2481YY_RULE_SETUP
2482#line 885 "pyscanner.l"
2483{ // Name of parameter
2484 lineCount();
2485 Argument *a = new Argument;
2486 current->argList->append(a);
2487 current->argList->getLast()->name = QCString(pyscanYYtext).stripWhiteSpace();
2488 current->argList->getLast()->type = "";
2489 }
2490YY_BREAK
2491case 65:
2492YY_RULE_SETUP
2493#line 892 "pyscanner.l"
2494{ // default value
2495 // TODO: this rule is too simple, need to be able to
2496 // match things like =")" as well!
2497 QCString defVal=&pyscanYYtext[1];
2498 g_defVal.resize(0);
2499 g_braceCount=0;
2500 BEGIN(FunctionParamDefVal);
2501 }
2502YY_BREAK
2503case 66:
2504YY_RULE_SETUP
2505#line 901 "pyscanner.l"
2506{ // end of parameter list
2507 }
2508YY_BREAK
2509case 67:
2510YY_RULE_SETUP
2511#line 904 "pyscanner.l"
2512{
2513 g_specialBlock = TRUE; // expecting a docstring
2514 bodyEntry = current;
2515 BEGIN( FunctionBody );
2516 }
2517YY_BREAK
2518case 68:
2519YY_RULE_SETUP
2520#line 909 "pyscanner.l"
2521{ // a comment
2522}
2523YY_BREAK
2524case 69:
2525YY_RULE_SETUP
2526#line 911 "pyscanner.l"
2527{ // Default rule inside arguments.
2528 }
2529YY_BREAK
2530
2531
2532case 70:
2533YY_RULE_SETUP
2534#line 917 "pyscanner.l"
2535{ // internal opening brace
2536 g_braceCount++;
2537 g_defVal+=*pyscanYYtext;
2538 }
2539YY_BREAK
2540case 71:
2541#line 922 "pyscanner.l"
2542case 72:
2543YY_RULE_SETUP
2544#line 922 "pyscanner.l"
2545{
2546 if (g_braceCount==0) // end of default argument
2547 {
2548 if (current->argList->getLast())
2549 {
2550 current->argList->getLast()->defval=g_defVal.stripWhiteSpace();
2551 }
2552 BEGIN(FunctionParams);
2553 }
2554 else // continue
2555 {
2556 g_braceCount--;
2557 g_defVal+=*pyscanYYtext;
2558 }
2559 }
2560YY_BREAK
2561case 73:
2562YY_RULE_SETUP
2563#line 937 "pyscanner.l"
2564{
2565 g_defVal+=*pyscanYYtext;
2566 }
2567YY_BREAK
2568case 74:
2569/* rule 74 can match eol */
2570YY_RULE_SETUP
2571#line 940 "pyscanner.l"
2572{
2573 g_defVal+=*pyscanYYtext;
2574 yyLineNr++;
2575 }
2576YY_BREAK
2577
2578
2579case 75:
2580/* rule 75 can match eol */
2581*yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2582(yy_c_buf_p) = yy_cp = yy_bp + 1;
2583YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2584YY_RULE_SETUP
2585#line 948 "pyscanner.l"
2586{ // new def at indent 0
2587 yyLineNr++;
2588endOfDef();
2589g_hideClassDocs = FALSE;
2590//YY_CURRENT_BUFFER->yy_at_bol=TRUE;
2591 BEGIN(Search);
2592 }
2593YY_BREAK
2594case 76:
2595/* rule 76 can match eol */
2596*yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2597(yy_c_buf_p) = yy_cp = yy_bp + 1;
2598YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2599YY_RULE_SETUP
2600#line 955 "pyscanner.l"
2601{ // start of a special comment at indent 0
2602 yyLineNr++;
2603endOfDef();
2604g_hideClassDocs = FALSE;
2605//YY_CURRENT_BUFFER->yy_at_bol=TRUE;
2606 BEGIN(Search);
2607 }
2608YY_BREAK
2609case 77:
2610/* rule 77 can match eol */
2611*yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
2612(yy_c_buf_p) = yy_cp -= 1;
2613YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
2614YY_RULE_SETUP
2615#line 962 "pyscanner.l"
2616{ // skip empty line
2617 current->program+=pyscanYYtext;
2618 }
2619YY_BREAK
2620case YY_STATE_EOF(ClassBody):
2621#line 965 "pyscanner.l"
2622{
2623endOfDef();
2624yyterminate();
2625 }
2626YY_BREAK
2627case 78:
2628YY_RULE_SETUP
2629#line 969 "pyscanner.l"
2630{ // something at indent >0
2631 g_curIndent=computeIndent(pyscanYYtext);
2632//fprintf(stderr,"g_curIndent=%d g_indent=%d\n",g_curIndent,g_indent);
2633 if (g_curIndent<=g_indent)
2634 // jumped out of the class/method
2635{
2636 endOfDef(1);
2637 g_indent=g_curIndent;
2638 // make sure the next rule matches ^...
2639 //YY_CURRENT_BUFFER->yy_at_bol=TRUE;
2640 g_hideClassDocs = FALSE;
2641 BEGIN(Search);
2642}
2643else
2644{
2645 current->program+=pyscanYYtext;
2646}
2647 }
2648YY_BREAK
2649case 79:
2650YY_RULE_SETUP
2651#line 987 "pyscanner.l"
2652{ // start of a single quoted string
2653 current->program+=*pyscanYYtext;
2654 g_stringContext=YY_START;
2655 g_specialBlock = FALSE;
2656g_copyString=&current->program;
2657 BEGIN( SingleQuoteString );
2658 }
2659YY_BREAK
2660case 80:
2661YY_RULE_SETUP
2662#line 994 "pyscanner.l"
2663{ // start of a double quoted string
2664 current->program+=*pyscanYYtext;
2665 g_stringContext=YY_START;
2666 g_specialBlock = FALSE;
2667g_copyString=&current->program;
2668 BEGIN( DoubleQuoteString );
2669 }
2670YY_BREAK
2671case 81:
2672YY_RULE_SETUP
2673#line 1001 "pyscanner.l"
2674{ // non-special stuff
2675 current->program+=pyscanYYtext;
2676 g_specialBlock = FALSE;
2677g_hideClassDocs = FALSE;
2678 }
2679YY_BREAK
2680case 82:
2681/* rule 82 can match eol */
2682YY_RULE_SETUP
2683#line 1006 "pyscanner.l"
2684{
2685 current->program+=*pyscanYYtext;
2686yyLineNr++;
2687 }
2688YY_BREAK
2689case 83:
2690YY_RULE_SETUP
2691#line 1010 "pyscanner.l"
2692{ // normal comment
2693 current->program+=pyscanYYtext;
2694 }
2695YY_BREAK
2696case 84:
2697YY_RULE_SETUP
2698#line 1013 "pyscanner.l"
2699{ // any character
2700 g_specialBlock = FALSE;
2701 current->program+=*pyscanYYtext;
2702 }
2703YY_BREAK
2704case 85:
2705YY_RULE_SETUP
2706#line 1017 "pyscanner.l"
2707{ // start of a comment block
2708 if (!g_hideClassDocs) current->program+=pyscanYYtext;
2709initTriDoubleQuoteBlock();
2710BEGIN(TripleComment);
2711 }
2712YY_BREAK
2713case 86:
2714YY_RULE_SETUP
2715#line 1023 "pyscanner.l"
2716{ // start of a comment block
2717 if (!g_hideClassDocs) current->program+=pyscanYYtext;
2718initTriSingleQuoteBlock();
2719BEGIN(TripleComment);
2720 }
2721YY_BREAK
2722
2723case 87:
2724YY_RULE_SETUP
2725#line 1030 "pyscanner.l"
2726{
2727 if (current->type.isEmpty())
2728 {
2729 current->type = "class";
2730 }
2731
2732 current->section = Entry::CLASS_SEC;
2733 current->name = pyscanYYtext;
2734
2735 // prepend scope in case of nested classes
2736 if (current_root->section&Entry::SCOPE_MASK)
2737 {
2738 //printf("*** Prepending scope %s to class %s\n",current_root->name.data(),current->name.data());
2739 current->name.prepend(current_root->name+"::");
2740 }
2741
2742 current->name = current->name.stripWhiteSpace();
2743 current->fileName = yyFileName;
2744 docBlockContext = YY_START;
2745 docBlockInBody = FALSE;
2746 docBlockJavaStyle = FALSE;
2747 docBlock.resize(0);
2748
2749 BEGIN(ClassInheritance);
2750 }
2751YY_BREAK
2752
2753case 88:
2754YY_RULE_SETUP
2755#line 1057 "pyscanner.l"
2756{ // syntactic sugar for the list
2757 }
2758YY_BREAK
2759case 89:
2760YY_RULE_SETUP
2761#line 1060 "pyscanner.l"
2762{ // begin of the class definition
2763 g_specialBlock = TRUE; // expecting a docstring
2764 BEGIN(ClassCaptureIndent);
2765 }
2766YY_BREAK
2767case 90:
2768YY_RULE_SETUP
2769#line 1065 "pyscanner.l"
2770{
2771 current->extends->append(
2772 new BaseInfo(substitute(pyscanYYtext,".","::"),Public,Normal)
2773 );
2774 //Has base class-do stuff
2775 }
2776YY_BREAK
2777
2778
2779case 91:
2780/* rule 91 can match eol */
2781YY_RULE_SETUP
2782#line 1075 "pyscanner.l"
2783{
2784 // Blankline - ignore, keep looking for indentation.
2785 lineCount();
2786 }
2787YY_BREAK
2788case 92:
2789YY_RULE_SETUP
2790#line 1080 "pyscanner.l"
2791{ // start of a comment block
2792 initTriDoubleQuoteBlock();
2793 BEGIN(TripleComment);
2794 }
2795YY_BREAK
2796case 93:
2797YY_RULE_SETUP
2798#line 1085 "pyscanner.l"
2799{ // start of a comment block
2800 initTriSingleQuoteBlock();
2801 BEGIN(TripleComment);
2802 }
2803YY_BREAK
2804case 94:
2805YY_RULE_SETUP
2806#line 1090 "pyscanner.l"
2807{
2808 current->program=pyscanYYtext;
2809 current->startLine = yyLineNr;
2810 g_curIndent=computeIndent(pyscanYYtext);
2811 bodyEntry = current;
2812 //fprintf(stderr,"setting indent %d\n",g_curIndent);
2813 //printf("current->program=[%s]\n",current->program.data());
2814 g_hideClassDocs = TRUE;
2815 BEGIN(ClassBody);
2816 }
2817YY_BREAK
2818case 95:
2819YY_RULE_SETUP
2820#line 1101 "pyscanner.l"
2821{
2822
2823 // Just pushback an empty class, and
2824 // resume parsing the body.
2825 newEntry();
2826
2827 // printf("Failed to find indent - skipping!");
2828 BEGIN( Search );
2829 }
2830YY_BREAK
2831
2832
2833case 96:
2834YY_RULE_SETUP
2835#line 1114 "pyscanner.l"
2836{ // the assignment operator
2837 //printf("====== VariableDec at line %d\n",yyLineNr);
2838 }
2839YY_BREAK
2840case 97:
2841YY_RULE_SETUP
2842#line 1117 "pyscanner.l"
2843{ // spaces
2844 }
2845YY_BREAK
2846case 98:
2847YY_RULE_SETUP
2848#line 1119 "pyscanner.l"
2849{ // integer value
2850current->type = "int";
2851current->initializer = pyscanYYtext;
2852BEGIN(VariableEnd);
2853 }
2854YY_BREAK
2855case 99:
2856YY_RULE_SETUP
2857#line 1124 "pyscanner.l"
2858{ // floating point value
2859current->type = "float";
2860current->initializer = pyscanYYtext;
2861BEGIN(VariableEnd);
2862 }
2863YY_BREAK
2864case 100:
2865YY_RULE_SETUP
2866#line 1129 "pyscanner.l"
2867{ // string
2868current->type = "string";
2869current->initializer = pyscanYYtext;
2870g_copyString=&current->initializer;
2871 g_stringContext=VariableEnd;
2872 BEGIN( SingleQuoteString );
2873 }
2874YY_BREAK
2875case 101:
2876YY_RULE_SETUP
2877#line 1136 "pyscanner.l"
2878{ // string
2879current->type = "string";
2880current->initializer = pyscanYYtext;
2881g_copyString=&current->initializer;
2882 g_stringContext=VariableEnd;
2883 BEGIN( DoubleQuoteString );
2884 }
2885YY_BREAK
2886case 102:
2887YY_RULE_SETUP
2888#line 1143 "pyscanner.l"
2889{ // start of a comment block
2890current->type = "string";
2891current->initializer = pyscanYYtext;
2892g_doubleQuote=TRUE;
2893g_copyString=&current->initializer;
2894 g_stringContext=VariableEnd;
2895BEGIN(TripleString);
2896 }
2897YY_BREAK
2898case 103:
2899YY_RULE_SETUP
2900#line 1152 "pyscanner.l"
2901{ // start of a comment block
2902current->type = "string";
2903current->initializer = pyscanYYtext;
2904g_doubleQuote=FALSE;
2905g_copyString=&current->initializer;
2906 g_stringContext=VariableEnd;
2907BEGIN(TripleString);
2908 }
2909YY_BREAK
2910case 104:
2911YY_RULE_SETUP
2912#line 1160 "pyscanner.l"
2913{ // tuple
2914 if (current->mtype!=Property)
2915{
2916 current->type = "tuple";
2917}
2918 current->initializer+=*pyscanYYtext;
2919 g_atomStart='(';
2920g_atomEnd=')';
2921g_atomCount=1;
2922BEGIN( VariableAtom );
2923 }
2924YY_BREAK
2925case 105:
2926YY_RULE_SETUP
2927#line 1171 "pyscanner.l"
2928{ // list
2929current->type = "list";
2930 current->initializer+=*pyscanYYtext;
2931 g_atomStart='[';
2932g_atomEnd=']';
2933g_atomCount=1;
2934BEGIN( VariableAtom );
2935 }
2936YY_BREAK
2937case 106:
2938YY_RULE_SETUP
2939#line 1179 "pyscanner.l"
2940{ // dictionary
2941current->type = "dictionary";
2942 current->initializer+=*pyscanYYtext;
2943 g_atomStart='{';
2944g_atomEnd='}';
2945g_atomCount=1;
2946BEGIN( VariableAtom );
2947 }
2948YY_BREAK
2949case 107:
2950YY_RULE_SETUP
2951#line 1187 "pyscanner.l"
2952{ // comment
2953 BEGIN( VariableEnd );
2954 }
2955YY_BREAK
2956case 108:
2957YY_RULE_SETUP
2958#line 1190 "pyscanner.l"
2959{
2960 current->initializer+=pyscanYYtext;
2961 }
2962YY_BREAK
2963case 109:
2964YY_RULE_SETUP
2965#line 1193 "pyscanner.l"
2966{
2967 current->initializer+=*pyscanYYtext;
2968 }
2969YY_BREAK
2970case 110:
2971/* rule 110 can match eol */
2972YY_RULE_SETUP
2973#line 1196 "pyscanner.l"
2974{
2975 unput('\n');
2976 BEGIN( VariableEnd );
2977 }
2978YY_BREAK
2979
2980
2981case 111:
2982YY_RULE_SETUP
2983#line 1203 "pyscanner.l"
2984{
2985 current->initializer+=*pyscanYYtext;
2986 if (g_atomStart==*pyscanYYtext)
2987{
2988 g_atomCount++;
2989}
2990 }
2991YY_BREAK
2992case 112:
2993YY_RULE_SETUP
2994#line 1210 "pyscanner.l"
2995{
2996 current->initializer+=*pyscanYYtext;
2997 if (g_atomEnd==*pyscanYYtext)
2998{
2999 g_atomCount--;
3000}
3001if (g_atomCount==0)
3002{
3003 BEGIN(VariableEnd);
3004}
3005 }
3006YY_BREAK
3007case 113:
3008YY_RULE_SETUP
3009#line 1221 "pyscanner.l"
3010{
3011 g_stringContext=YY_START;
3012current->initializer+="\"";
3013g_copyString=&current->initializer;
3014 BEGIN( DoubleQuoteString );
3015 }
3016YY_BREAK
3017case 114:
3018YY_RULE_SETUP
3019#line 1227 "pyscanner.l"
3020{
3021 current->initializer+=pyscanYYtext;
3022 }
3023YY_BREAK
3024case 115:
3025YY_RULE_SETUP
3026#line 1230 "pyscanner.l"
3027{
3028 current->initializer+=*pyscanYYtext;
3029 }
3030YY_BREAK
3031case 116:
3032/* rule 116 can match eol */
3033YY_RULE_SETUP
3034#line 1233 "pyscanner.l"
3035{
3036 current->initializer+=*pyscanYYtext;
3037 yyLineNr++;
3038 }
3039YY_BREAK
3040
3041
3042case 117:
3043/* rule 117 can match eol */
3044YY_RULE_SETUP
3045#line 1241 "pyscanner.l"
3046{
3047 yyLineNr++;
3048newVariable();
3049 BEGIN(Search);
3050 }
3051YY_BREAK
3052case 118:
3053YY_RULE_SETUP
3054#line 1246 "pyscanner.l"
3055{
3056 unput(*pyscanYYtext);
3057newVariable();
3058 BEGIN(Search);
3059 }
3060YY_BREAK
3061case YY_STATE_EOF(VariableEnd):
3062#line 1251 "pyscanner.l"
3063{ yyterminate();
3064 newEntry();
3065 }
3066YY_BREAK
3067
3068
3069case 119:
3070#line 1258 "pyscanner.l"
3071case 120:
3072YY_RULE_SETUP
3073#line 1258 "pyscanner.l"
3074{
3075 // printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock);
3076 if (g_doubleQuote==(pyscanYYtext[0]=='"'))
3077 {
3078 if (g_specialBlock) // expecting a docstring
3079 {
3080 QCString actualDoc=docBlock;
3081 if (!docBlockSpecial) // legacy unformatted docstring
3082 {
3083 actualDoc.prepend("\\verbatim ");
3084 actualDoc.append("\\endverbatim ");
3085 }
3086 //printf("-------> current=%p bodyEntry=%p\n",current,bodyEntry);
3087 handleCommentBlock(actualDoc, FALSE);
3088 }
3089 else if (g_packageCommentAllowed) // expecting module docs
3090 {
3091 QCString actualDoc=docBlock;
3092 if (!docBlockSpecial) // legacy unformatted docstring
3093 {
3094 actualDoc.prepend("\\verbatim ");
3095 actualDoc.append("\\endverbatim ");
3096 }
3097 actualDoc.prepend("\\namespace "+g_moduleScope+"\\_linebr ");
3098 handleCommentBlock(actualDoc, FALSE);
3099 }
3100 if ((docBlockContext==ClassBody && !g_hideClassDocs) ||
3101docBlockContext==FunctionBody)
3102 {
3103 current->program+=docBlock;
3104 current->program+=pyscanYYtext;
3105 }
3106 if (g_hideClassDocs)
3107 current->startLine = yyLineNr;
3108 g_hideClassDocs=FALSE;
3109 BEGIN(docBlockContext);
3110 }
3111 else
3112 {
3113 docBlock += pyscanYYtext;
3114 }
3115 g_packageCommentAllowed = FALSE;
3116 }
3117YY_BREAK
3118case 121:
3119YY_RULE_SETUP
3120#line 1303 "pyscanner.l"
3121{ // leading whitespace
3122 int indent = computeIndent(pyscanYYtext);
3123 if (indent>=g_curIndent)
3124 { // strip g_curIndent amount of whitespace
3125 int i;
3126 for (i=0;i<indent-g_curIndent;i++) docBlock+=' ';
3127 //fprintf(stderr,"stripping indent %d\n",g_curIndent);
3128 }
3129 else
3130 {
3131 //fprintf(stderr,"not stripping: %d<%d\n",indent,g_curIndent);
3132 docBlock += pyscanYYtext;
3133 }
3134 }
3135YY_BREAK
3136case 122:
3137YY_RULE_SETUP
3138#line 1317 "pyscanner.l"
3139{
3140 docBlock += pyscanYYtext;
3141 }
3142YY_BREAK
3143case 123:
3144/* rule 123 can match eol */
3145YY_RULE_SETUP
3146#line 1320 "pyscanner.l"
3147{
3148 yyLineNr++;
3149 docBlock += pyscanYYtext;
3150 }
3151YY_BREAK
3152case 124:
3153YY_RULE_SETUP
3154#line 1324 "pyscanner.l"
3155{
3156 docBlock += pyscanYYtext;
3157 }
3158YY_BREAK
3159
3160
3161case 125:
3162YY_RULE_SETUP
3163#line 1330 "pyscanner.l"
3164{ // skip leading hashes
3165 }
3166YY_BREAK
3167case 126:
3168/* rule 126 can match eol */
3169*yy_cp = (yy_hold_char); /* undo effects of setting up pyscanYYtext */
3170(yy_c_buf_p) = yy_cp = yy_bp + 1;
3171YY_DO_BEFORE_ACTION; /* set up pyscanYYtext again */
3172YY_RULE_SETUP
3173#line 1332 "pyscanner.l"
3174{ // continuation of the comment on the next line
3175 docBlock+='\n';
3176 docBrief = FALSE;
3177 startCommentBlock(FALSE);
3178 yyLineNr++;
3179 }
3180YY_BREAK
3181case 127:
3182YY_RULE_SETUP
3183#line 1338 "pyscanner.l"
3184{ // any other stuff
3185 docBlock+=pyscanYYtext;
3186 }
3187YY_BREAK
3188case 128:
3189/* rule 128 can match eol */
3190YY_RULE_SETUP
3191#line 1341 "pyscanner.l"
3192{ // new line that ends the comment
3193 handleCommentBlock(docBlock, docBrief);
3194 yyLineNr++;
3195 BEGIN(docBlockContext);
3196 }
3197YY_BREAK
3198case 129:
3199YY_RULE_SETUP
3200#line 1346 "pyscanner.l"
3201{ // anything we missed
3202 docBlock+=*pyscanYYtext;
3203 }
3204YY_BREAK
3205
3206
3207case 130:
3208/* rule 130 can match eol */
3209YY_RULE_SETUP
3210#line 1352 "pyscanner.l"
3211{ // line continuation
3212 addToString(pyscanYYtext);
3213 yyLineNr++;
3214 }
3215YY_BREAK
3216case 131:
3217YY_RULE_SETUP
3218#line 1356 "pyscanner.l"
3219{ // espaced char
3220 addToString(pyscanYYtext);
3221 }
3222YY_BREAK
3223case 132:
3224YY_RULE_SETUP
3225#line 1359 "pyscanner.l"
3226{ // tripple double quotes
3227 addToString(pyscanYYtext);
3228 }
3229YY_BREAK
3230case 133:
3231YY_RULE_SETUP
3232#line 1362 "pyscanner.l"
3233{ // end of the string
3234 addToString(pyscanYYtext);
3235 BEGIN(g_stringContext);
3236 }
3237YY_BREAK
3238case 134:
3239YY_RULE_SETUP
3240#line 1366 "pyscanner.l"
3241{ // normal chars
3242 addToString(pyscanYYtext);
3243 }
3244YY_BREAK
3245case 135:
3246YY_RULE_SETUP
3247#line 1369 "pyscanner.l"
3248{ // normal char
3249 addToString(pyscanYYtext);
3250 }
3251YY_BREAK
3252
3253
3254case 136:
3255/* rule 136 can match eol */
3256YY_RULE_SETUP
3257#line 1375 "pyscanner.l"
3258{ // line continuation
3259 addToString(pyscanYYtext);
3260 yyLineNr++;
3261 }
3262YY_BREAK
3263case 137:
3264YY_RULE_SETUP
3265#line 1379 "pyscanner.l"
3266{ // espaced char
3267 addToString(pyscanYYtext);
3268 }
3269YY_BREAK
3270case 138:
3271YY_RULE_SETUP
3272#line 1382 "pyscanner.l"
3273{ // tripple single quotes
3274 addToString(pyscanYYtext);
3275 }
3276YY_BREAK
3277case 139:
3278YY_RULE_SETUP
3279#line 1385 "pyscanner.l"
3280{ // end of the string
3281 addToString(pyscanYYtext);
3282 BEGIN(g_stringContext);
3283 }
3284YY_BREAK
3285case 140:
3286YY_RULE_SETUP
3287#line 1389 "pyscanner.l"
3288{ // normal chars
3289 addToString(pyscanYYtext);
3290 }
3291YY_BREAK
3292case 141:
3293YY_RULE_SETUP
3294#line 1392 "pyscanner.l"
3295{ // normal char
3296 addToString(pyscanYYtext);
3297 }
3298YY_BREAK
3299
3300
3301case 142:
3302#line 1399 "pyscanner.l"
3303case 143:
3304YY_RULE_SETUP
3305#line 1399 "pyscanner.l"
3306{
3307 *g_copyString += pyscanYYtext;
3308 if (g_doubleQuote==(pyscanYYtext[0]=='"'))
3309 {
3310 BEGIN(g_stringContext);
3311 }
3312 }
3313YY_BREAK
3314case 144:
3315/* rule 144 can match eol */
3316YY_RULE_SETUP
3317#line 1408 "pyscanner.l"
3318{
3319 lineCount();
3320 *g_copyString += pyscanYYtext;
3321 }
3322YY_BREAK
3323case 145:
3324/* rule 145 can match eol */
3325YY_RULE_SETUP
3326#line 1412 "pyscanner.l"
3327{
3328 yyLineNr++;
3329 *g_copyString += pyscanYYtext;
3330 }
3331YY_BREAK
3332case 146:
3333YY_RULE_SETUP
3334#line 1416 "pyscanner.l"
3335{
3336 *g_copyString += *pyscanYYtext;
3337 }
3338YY_BREAK
3339
3340/* ------------ End rules -------------- */
3341/*
3342<*>({NONEMPTY}|{EXPCHAR}|{BB}) { // This should go one character at a time.
3343 // printf("[pyscanner] '%s' [ state %d ] [line %d] no match\n",
3344 // pyscanYYtext, YY_START, yyLineNr);
3345
3346 }
3347 */
3348case 147:
3349/* rule 147 can match eol */
3350YY_RULE_SETUP
3351#line 1431 "pyscanner.l"
3352{
3353 //printf("[pyscanner] %d NEWLINE [line %d] no match\n",
3354 // YY_START, yyLineNr);
3355
3356 lineCount();
3357 }
3358YY_BREAK
3359case 148:
3360YY_RULE_SETUP
3361#line 1438 "pyscanner.l"
3362{
3363 //printf("[pyscanner] '%s' [ state %d ] [line %d] no match\n",
3364 // pyscanYYtext, YY_START, yyLineNr);
3365
3366 }
3367YY_BREAK
3368case 149:
3369YY_RULE_SETUP
3370#line 1445 "pyscanner.l"
3371ECHO;
3372YY_BREAK
3373#line 3374 "<stdout>"
3374case YY_STATE_EOF(INITIAL):
3375case YY_STATE_EOF(Search):
3376case YY_STATE_EOF(SearchMemVars):
3377case YY_STATE_EOF(TryClassDocString):
3378case YY_STATE_EOF(TripleComment):
3379case YY_STATE_EOF(SpecialComment):
3380case YY_STATE_EOF(FunctionDec):
3381case YY_STATE_EOF(FunctionParams):
3382case YY_STATE_EOF(FunctionParamDefVal):
3383case YY_STATE_EOF(ClassDec):
3384case YY_STATE_EOF(ClassInheritance):
3385case YY_STATE_EOF(ClassCaptureIndent):
3386case YY_STATE_EOF(VariableDec):
3387case YY_STATE_EOF(VariableAtom):
3388case YY_STATE_EOF(SingleQuoteString):
3389case YY_STATE_EOF(DoubleQuoteString):
3390case YY_STATE_EOF(TripleString):
3391case YY_STATE_EOF(FromMod):
3392case YY_STATE_EOF(FromModItem):
3393case YY_STATE_EOF(Import):
3394yyterminate();
3395
3396case YY_END_OF_BUFFER:
3397{
3398/* Amount of text matched not including the EOB char. */
3399int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
3400
3401/* Undo the effects of YY_DO_BEFORE_ACTION. */
3402*yy_cp = (yy_hold_char);
3403YY_RESTORE_YY_MORE_OFFSET
3404
3405if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
3406{
3407/* We're scanning a new file or input source. It's
3408 * possible that this happened because the user
3409 * just pointed pyscanYYin at a new source and called
3410 * pyscanYYlex(). If so, then we have to assure
3411 * consistency between YY_CURRENT_BUFFER and our
3412 * globals. Here is the right place to do so, because
3413 * this is the first action (other than possibly a
3414 * back-up) that will match for the new input source.
3415 */
3416(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3417YY_CURRENT_BUFFER_LVALUE->yy_input_file = pyscanYYin;
3418YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
3419}
3420
3421/* Note that here we test for yy_c_buf_p "<=" to the position
3422 * of the first EOB in the buffer, since yy_c_buf_p will
3423 * already have been incremented past the NUL character
3424 * (since all states make transitions on EOB to the
3425 * end-of-buffer state). Contrast this with the test
3426 * in input().
3427 */
3428if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3429{ /* This was really a NUL. */
3430yy_state_type yy_next_state;
3431
3432(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
3433
3434yy_current_state = yy_get_previous_state( );
3435
3436/* Okay, we're now positioned to make the NUL
3437 * transition. We couldn't have
3438 * yy_get_previous_state() go ahead and do it
3439 * for us because it doesn't know how to deal
3440 * with the possibility of jamming (and we don't
3441 * want to build jamming into it because then it
3442 * will run more slowly).
3443 */
3444
3445yy_next_state = yy_try_NUL_trans( yy_current_state );
3446
3447yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3448
3449if ( yy_next_state )
3450{
3451/* Consume the NUL. */
3452yy_cp = ++(yy_c_buf_p);
3453yy_current_state = yy_next_state;
3454goto yy_match;
3455}
3456
3457else
3458{
3459yy_cp = (yy_c_buf_p);
3460goto yy_find_action;
3461}
3462}
3463
3464else switch ( yy_get_next_buffer( ) )
3465{
3466case EOB_ACT_END_OF_FILE:
3467{
3468(yy_did_buffer_switch_on_eof) = 0;
3469
3470if ( pyscanYYwrap( ) )
3471{
3472/* Note: because we've taken care in
3473 * yy_get_next_buffer() to have set up
3474 * pyscanYYtext, we can now set up
3475 * yy_c_buf_p so that if some total
3476 * hoser (like flex itself) wants to
3477 * call the scanner after we return the
3478 * YY_NULL, it'll still work - another
3479 * YY_NULL will get returned.
3480 */
3481(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
3482
3483yy_act = YY_STATE_EOF(YY_START);
3484goto do_action;
3485}
3486
3487else
3488{
3489if ( ! (yy_did_buffer_switch_on_eof) )
3490YY_NEW_FILE;
3491}
3492break;
3493}
3494
3495case EOB_ACT_CONTINUE_SCAN:
3496(yy_c_buf_p) =
3497(yytext_ptr) + yy_amount_of_matched_text;
3498
3499yy_current_state = yy_get_previous_state( );
3500
3501yy_cp = (yy_c_buf_p);
3502yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3503goto yy_match;
3504
3505case EOB_ACT_LAST_MATCH:
3506(yy_c_buf_p) =
3507&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
3508
3509yy_current_state = yy_get_previous_state( );
3510
3511yy_cp = (yy_c_buf_p);
3512yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3513goto yy_find_action;
3514}
3515break;
3516}
3517
3518default:
3519YY_FATAL_ERROR(
3520"fatal flex scanner internal error--no action found" );
3521} /* end of action switch */
3522} /* end of scanning one token */
3523} /* end of pyscanYYlex */
3524
3525/* yy_get_next_buffer - try to read in a new buffer
3526 *
3527 * Returns a code representing an action:
3528 *EOB_ACT_LAST_MATCH -
3529 *EOB_ACT_CONTINUE_SCAN - continue scanning from current position
3530 *EOB_ACT_END_OF_FILE - end of file
3531 */
3532static int yy_get_next_buffer (void)
3533{
3534 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
3535register char *source = (yytext_ptr);
3536register int number_to_move, i;
3537int ret_val;
3538
3539if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
3540YY_FATAL_ERROR(
3541"fatal flex scanner internal error--end of buffer missed" );
3542
3543if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
3544{ /* Don't try to fill the buffer, so this is an EOF. */
3545if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
3546{
3547/* We matched a single character, the EOB, so
3548 * treat this as a final EOF.
3549 */
3550return EOB_ACT_END_OF_FILE;
3551}
3552
3553else
3554{
3555/* We matched some text prior to the EOB, first
3556 * process it.
3557 */
3558return EOB_ACT_LAST_MATCH;
3559}
3560}
3561
3562/* Try to read more data. */
3563
3564/* First move last chars to start of buffer. */
3565number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
3566
3567for ( i = 0; i < number_to_move; ++i )
3568*(dest++) = *(source++);
3569
3570if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
3571/* don't do the read, it's not guaranteed to return an EOF,
3572 * just force an EOF
3573 */
3574YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
3575
3576else
3577{
3578yy_size_t num_to_read =
3579YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
3580
3581while ( num_to_read <= 0 )
3582{ /* Not enough room in the buffer - grow it. */
3583
3584YY_FATAL_ERROR(
3585"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
3586
3587}
3588
3589if ( num_to_read > YY_READ_BUF_SIZE )
3590num_to_read = YY_READ_BUF_SIZE;
3591
3592/* Read in more data. */
3593YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
3594(yy_n_chars), num_to_read );
3595
3596YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3597}
3598
3599if ( (yy_n_chars) == 0 )
3600{
3601if ( number_to_move == YY_MORE_ADJ )
3602{
3603ret_val = EOB_ACT_END_OF_FILE;
3604pyscanYYrestart(pyscanYYin );
3605}
3606
3607else
3608{
3609ret_val = EOB_ACT_LAST_MATCH;
3610YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
3611YY_BUFFER_EOF_PENDING;
3612}
3613}
3614
3615else
3616ret_val = EOB_ACT_CONTINUE_SCAN;
3617
3618if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
3619/* Extend the array by 50%, plus the number we really need. */
3620yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
3621YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) pyscanYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
3622if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3623YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
3624}
3625
3626(yy_n_chars) += number_to_move;
3627YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
3628YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
3629
3630(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
3631
3632return ret_val;
3633}
3634
3635/* yy_get_previous_state - get the state just before the EOB char was reached */
3636
3637 static yy_state_type yy_get_previous_state (void)
3638{
3639register yy_state_type yy_current_state;
3640register char *yy_cp;
3641
3642yy_current_state = (yy_start);
3643yy_current_state += YY_AT_BOL();
3644
3645(yy_state_ptr) = (yy_state_buf);
3646*(yy_state_ptr)++ = yy_current_state;
3647
3648for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
3649{
3650register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
3651while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3652{
3653yy_current_state = (int) yy_def[yy_current_state];
3654if ( yy_current_state >= 434 )
3655yy_c = yy_meta[(unsigned int) yy_c];
3656}
3657yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3658*(yy_state_ptr)++ = yy_current_state;
3659}
3660
3661return yy_current_state;
3662}
3663
3664/* yy_try_NUL_trans - try to make a transition on the NUL character
3665 *
3666 * synopsis
3667 *next_state = yy_try_NUL_trans( current_state );
3668 */
3669 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
3670{
3671register int yy_is_jam;
3672
3673register YY_CHAR yy_c = 1;
3674while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3675{
3676yy_current_state = (int) yy_def[yy_current_state];
3677if ( yy_current_state >= 434 )
3678yy_c = yy_meta[(unsigned int) yy_c];
3679}
3680yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3681yy_is_jam = (yy_current_state == 433);
3682if ( ! yy_is_jam )
3683*(yy_state_ptr)++ = yy_current_state;
3684
3685return yy_is_jam ? 0 : yy_current_state;
3686}
3687
3688 static void yyunput (int c, register char * yy_bp )
3689{
3690register char *yy_cp;
3691
3692 yy_cp = (yy_c_buf_p);
3693
3694/* undo effects of setting up pyscanYYtext */
3695*yy_cp = (yy_hold_char);
3696
3697if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3698{ /* need to shift things up to make room */
3699/* +2 for EOB chars. */
3700register yy_size_t number_to_move = (yy_n_chars) + 2;
3701register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
3702YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
3703register char *source =
3704&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
3705
3706while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3707*--dest = *--source;
3708
3709yy_cp += (int) (dest - source);
3710yy_bp += (int) (dest - source);
3711YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
3712(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
3713
3714if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3715YY_FATAL_ERROR( "flex scanner push-back overflow" );
3716}
3717
3718*--yy_cp = (char) c;
3719
3720(yytext_ptr) = yy_bp;
3721(yy_hold_char) = *yy_cp;
3722(yy_c_buf_p) = yy_cp;
3723}
3724
3725#ifndef YY_NO_INPUT
3726#ifdef __cplusplus
3727 static int yyinput (void)
3728#else
3729 static int input (void)
3730#endif
3731
3732{
3733int c;
3734
3735*(yy_c_buf_p) = (yy_hold_char);
3736
3737if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
3738{
3739/* yy_c_buf_p now points to the character we want to return.
3740 * If this occurs *before* the EOB characters, then it's a
3741 * valid NUL; if not, then we've hit the end of the buffer.
3742 */
3743if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3744/* This was really a NUL. */
3745*(yy_c_buf_p) = '\0';
3746
3747else
3748{ /* need more input */
3749yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
3750++(yy_c_buf_p);
3751
3752switch ( yy_get_next_buffer( ) )
3753{
3754case EOB_ACT_LAST_MATCH:
3755/* This happens because yy_g_n_b()
3756 * sees that we've accumulated a
3757 * token and flags that we need to
3758 * try matching the token before
3759 * proceeding. But for input(),
3760 * there's no matching to consider.
3761 * So convert the EOB_ACT_LAST_MATCH
3762 * to EOB_ACT_END_OF_FILE.
3763 */
3764
3765/* Reset buffer status. */
3766pyscanYYrestart(pyscanYYin );
3767
3768/*FALLTHROUGH*/
3769
3770case EOB_ACT_END_OF_FILE:
3771{
3772if ( pyscanYYwrap( ) )
3773return 0;
3774
3775if ( ! (yy_did_buffer_switch_on_eof) )
3776YY_NEW_FILE;
3777#ifdef __cplusplus
3778return yyinput();
3779#else
3780return input();
3781#endif
3782}
3783
3784case EOB_ACT_CONTINUE_SCAN:
3785(yy_c_buf_p) = (yytext_ptr) + offset;
3786break;
3787}
3788}
3789}
3790
3791c = *(unsigned char *) (yy_c_buf_p);/* cast for 8-bit char's */
3792*(yy_c_buf_p) = '\0';/* preserve pyscanYYtext */
3793(yy_hold_char) = *++(yy_c_buf_p);
3794
3795YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
3796
3797return c;
3798}
3799#endif/* ifndef YY_NO_INPUT */
3800
3801/** Immediately switch to a different input stream.
3802 * @param input_file A readable stream.
3803 *
3804 * @note This function does not reset the start condition to @c INITIAL .
3805 */
3806 void pyscanYYrestart (FILE * input_file )
3807{
3808
3809if ( ! YY_CURRENT_BUFFER ){
3810 pyscanYYensure_buffer_stack ();
3811YY_CURRENT_BUFFER_LVALUE =
3812 pyscanYY_create_buffer(pyscanYYin,YY_BUF_SIZE );
3813}
3814
3815pyscanYY_init_buffer(YY_CURRENT_BUFFER,input_file );
3816pyscanYY_load_buffer_state( );
3817}
3818
3819/** Switch to a different input buffer.
3820 * @param new_buffer The new input buffer.
3821 *
3822 */
3823 void pyscanYY_switch_to_buffer (YY_BUFFER_STATE new_buffer )
3824{
3825
3826/* TODO. We should be able to replace this entire function body
3827 * with
3828 *pyscanYYpop_buffer_state();
3829 *pyscanYYpush_buffer_state(new_buffer);
3830 */
3831pyscanYYensure_buffer_stack ();
3832if ( YY_CURRENT_BUFFER == new_buffer )
3833return;
3834
3835if ( YY_CURRENT_BUFFER )
3836{
3837/* Flush out information for old buffer. */
3838*(yy_c_buf_p) = (yy_hold_char);
3839YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3840YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3841}
3842
3843YY_CURRENT_BUFFER_LVALUE = new_buffer;
3844pyscanYY_load_buffer_state( );
3845
3846/* We don't actually know whether we did this switch during
3847 * EOF (pyscanYYwrap()) processing, but the only time this flag
3848 * is looked at is after pyscanYYwrap() is called, so it's safe
3849 * to go ahead and always set it.
3850 */
3851(yy_did_buffer_switch_on_eof) = 1;
3852}
3853
3854static void pyscanYY_load_buffer_state (void)
3855{
3856 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3857(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3858pyscanYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3859(yy_hold_char) = *(yy_c_buf_p);
3860}
3861
3862/** Allocate and initialize an input buffer state.
3863 * @param file A readable stream.
3864 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3865 *
3866 * @return the allocated buffer state.
3867 */
3868 YY_BUFFER_STATE pyscanYY_create_buffer (FILE * file, int size )
3869{
3870YY_BUFFER_STATE b;
3871
3872b = (YY_BUFFER_STATE) pyscanYYalloc(sizeof( struct yy_buffer_state ) );
3873if ( ! b )
3874YY_FATAL_ERROR( "out of dynamic memory in pyscanYY_create_buffer()" );
3875
3876b->yy_buf_size = size;
3877
3878/* yy_ch_buf has to be 2 characters longer than the size given because
3879 * we need to put in 2 end-of-buffer characters.
3880 */
3881b->yy_ch_buf = (char *) pyscanYYalloc(b->yy_buf_size + 2 );
3882if ( ! b->yy_ch_buf )
3883YY_FATAL_ERROR( "out of dynamic memory in pyscanYY_create_buffer()" );
3884
3885b->yy_is_our_buffer = 1;
3886
3887pyscanYY_init_buffer(b,file );
3888
3889return b;
3890}
3891
3892/** Destroy the buffer.
3893 * @param b a buffer created with pyscanYY_create_buffer()
3894 *
3895 */
3896 void pyscanYY_delete_buffer (YY_BUFFER_STATE b )
3897{
3898
3899if ( ! b )
3900return;
3901
3902if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3903YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3904
3905if ( b->yy_is_our_buffer )
3906pyscanYYfree((void *) b->yy_ch_buf );
3907
3908pyscanYYfree((void *) b );
3909}
3910
3911#ifndef __cplusplus
3912extern int isatty (int );
3913#endif /* __cplusplus */
3914
3915/* Initializes or reinitializes a buffer.
3916 * This function is sometimes called more than once on the same buffer,
3917 * such as during a pyscanYYrestart() or at EOF.
3918 */
3919 static void pyscanYY_init_buffer (YY_BUFFER_STATE b, FILE * file )
3920
3921{
3922int oerrno = errno;
3923
3924pyscanYY_flush_buffer(b );
3925
3926b->yy_input_file = file;
3927b->yy_fill_buffer = 1;
3928
3929 /* If b is the current buffer, then pyscanYY_init_buffer was _probably_
3930 * called from pyscanYYrestart() or through yy_get_next_buffer.
3931 * In that case, we don't want to reset the lineno or column.
3932 */
3933 if (b != YY_CURRENT_BUFFER){
3934 b->yy_bs_lineno = 1;
3935 b->yy_bs_column = 0;
3936 }
3937
3938 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3939
3940errno = oerrno;
3941}
3942
3943/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3944 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3945 *
3946 */
3947 void pyscanYY_flush_buffer (YY_BUFFER_STATE b )
3948{
3949 if ( ! b )
3950return;
3951
3952b->yy_n_chars = 0;
3953
3954/* We always need two end-of-buffer characters. The first causes
3955 * a transition to the end-of-buffer state. The second causes
3956 * a jam in that state.
3957 */
3958b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3959b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3960
3961b->yy_buf_pos = &b->yy_ch_buf[0];
3962
3963b->yy_at_bol = 1;
3964b->yy_buffer_status = YY_BUFFER_NEW;
3965
3966if ( b == YY_CURRENT_BUFFER )
3967pyscanYY_load_buffer_state( );
3968}
3969
3970/** Pushes the new state onto the stack. The new state becomes
3971 * the current state. This function will allocate the stack
3972 * if necessary.
3973 * @param new_buffer The new state.
3974 *
3975 */
3976void pyscanYYpush_buffer_state (YY_BUFFER_STATE new_buffer )
3977{
3978 if (new_buffer == NULL)
3979return;
3980
3981pyscanYYensure_buffer_stack();
3982
3983/* This block is copied from pyscanYY_switch_to_buffer. */
3984if ( YY_CURRENT_BUFFER )
3985{
3986/* Flush out information for old buffer. */
3987*(yy_c_buf_p) = (yy_hold_char);
3988YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3989YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3990}
3991
3992/* Only push if top exists. Otherwise, replace top. */
3993if (YY_CURRENT_BUFFER)
3994(yy_buffer_stack_top)++;
3995YY_CURRENT_BUFFER_LVALUE = new_buffer;
3996
3997/* copied from pyscanYY_switch_to_buffer. */
3998pyscanYY_load_buffer_state( );
3999(yy_did_buffer_switch_on_eof) = 1;
4000}
4001
4002/** Removes and deletes the top of the stack, if present.
4003 * The next element becomes the new top.
4004 *
4005 */
4006void pyscanYYpop_buffer_state (void)
4007{
4008 if (!YY_CURRENT_BUFFER)
4009return;
4010
4011pyscanYY_delete_buffer(YY_CURRENT_BUFFER );
4012YY_CURRENT_BUFFER_LVALUE = NULL;
4013if ((yy_buffer_stack_top) > 0)
4014--(yy_buffer_stack_top);
4015
4016if (YY_CURRENT_BUFFER) {
4017pyscanYY_load_buffer_state( );
4018(yy_did_buffer_switch_on_eof) = 1;
4019}
4020}
4021
4022/* Allocates the stack if it does not exist.
4023 * Guarantees space for at least one push.
4024 */
4025static void pyscanYYensure_buffer_stack (void)
4026{
4027yy_size_t num_to_alloc;
4028
4029if (!(yy_buffer_stack)) {
4030
4031/* First allocation is just for 2 elements, since we don't know if this
4032 * scanner will even need a stack. We use 2 instead of 1 to avoid an
4033 * immediate realloc on the next call.
4034 */
4035num_to_alloc = 1;
4036(yy_buffer_stack) = (struct yy_buffer_state**)pyscanYYalloc
4037(num_to_alloc * sizeof(struct yy_buffer_state*)
4038);
4039if ( ! (yy_buffer_stack) )
4040YY_FATAL_ERROR( "out of dynamic memory in pyscanYYensure_buffer_stack()" );
4041
4042memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
4043
4044(yy_buffer_stack_max) = num_to_alloc;
4045(yy_buffer_stack_top) = 0;
4046return;
4047}
4048
4049if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
4050
4051/* Increase the buffer to prepare for a possible push. */
4052int grow_size = 8 /* arbitrary grow size */;
4053
4054num_to_alloc = (yy_buffer_stack_max) + grow_size;
4055(yy_buffer_stack) = (struct yy_buffer_state**)pyscanYYrealloc
4056((yy_buffer_stack),
4057num_to_alloc * sizeof(struct yy_buffer_state*)
4058);
4059if ( ! (yy_buffer_stack) )
4060YY_FATAL_ERROR( "out of dynamic memory in pyscanYYensure_buffer_stack()" );
4061
4062/* zero only the new slots.*/
4063memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
4064(yy_buffer_stack_max) = num_to_alloc;
4065}
4066}
4067
4068/** Setup the input buffer state to scan directly from a user-specified character buffer.
4069 * @param base the character buffer
4070 * @param size the size in bytes of the character buffer
4071 *
4072 * @return the newly allocated buffer state object.
4073 */
4074YY_BUFFER_STATE pyscanYY_scan_buffer (char * base, yy_size_t size )
4075{
4076YY_BUFFER_STATE b;
4077
4078if ( size < 2 ||
4079 base[size-2] != YY_END_OF_BUFFER_CHAR ||
4080 base[size-1] != YY_END_OF_BUFFER_CHAR )
4081/* They forgot to leave room for the EOB's. */
4082return 0;
4083
4084b = (YY_BUFFER_STATE) pyscanYYalloc(sizeof( struct yy_buffer_state ) );
4085if ( ! b )
4086YY_FATAL_ERROR( "out of dynamic memory in pyscanYY_scan_buffer()" );
4087
4088b->yy_buf_size = size - 2;/* "- 2" to take care of EOB's */
4089b->yy_buf_pos = b->yy_ch_buf = base;
4090b->yy_is_our_buffer = 0;
4091b->yy_input_file = 0;
4092b->yy_n_chars = b->yy_buf_size;
4093b->yy_is_interactive = 0;
4094b->yy_at_bol = 1;
4095b->yy_fill_buffer = 0;
4096b->yy_buffer_status = YY_BUFFER_NEW;
4097
4098pyscanYY_switch_to_buffer(b );
4099
4100return b;
4101}
4102
4103/** Setup the input buffer state to scan a string. The next call to pyscanYYlex() will
4104 * scan from a @e copy of @a str.
4105 * @param yystr a NUL-terminated string to scan
4106 *
4107 * @return the newly allocated buffer state object.
4108 * @note If you want to scan bytes that may contain NUL values, then use
4109 * pyscanYY_scan_bytes() instead.
4110 */
4111YY_BUFFER_STATE pyscanYY_scan_string (yyconst char * yystr )
4112{
4113
4114return pyscanYY_scan_bytes(yystr,strlen(yystr) );
4115}
4116
4117/** Setup the input buffer state to scan the given bytes. The next call to pyscanYYlex() will
4118 * scan from a @e copy of @a bytes.
4119 * @param bytes the byte buffer to scan
4120 * @param len the number of bytes in the buffer pointed to by @a bytes.
4121 *
4122 * @return the newly allocated buffer state object.
4123 */
4124YY_BUFFER_STATE pyscanYY_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
4125{
4126YY_BUFFER_STATE b;
4127char *buf;
4128yy_size_t n, i;
4129
4130/* Get memory for full buffer, including space for trailing EOB's. */
4131n = _yybytes_len + 2;
4132buf = (char *) pyscanYYalloc(n );
4133if ( ! buf )
4134YY_FATAL_ERROR( "out of dynamic memory in pyscanYY_scan_bytes()" );
4135
4136for ( i = 0; i < _yybytes_len; ++i )
4137buf[i] = yybytes[i];
4138
4139buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
4140
4141b = pyscanYY_scan_buffer(buf,n );
4142if ( ! b )
4143YY_FATAL_ERROR( "bad buffer in pyscanYY_scan_bytes()" );
4144
4145/* It's okay to grow etc. this buffer, and we should throw it
4146 * away when we're done.
4147 */
4148b->yy_is_our_buffer = 1;
4149
4150return b;
4151}
4152
4153#ifndef YY_EXIT_FAILURE
4154#define YY_EXIT_FAILURE 2
4155#endif
4156
4157static void yy_fatal_error (yyconst char* msg )
4158{
4159 (void) fprintf( stderr, "%s\n", msg );
4160exit( YY_EXIT_FAILURE );
4161}
4162
4163/* Redefine yyless() so it works in section 3 code. */
4164
4165#undef yyless
4166#define yyless(n) \
4167do \
4168{ \
4169/* Undo effects of setting up pyscanYYtext. */ \
4170 int yyless_macro_arg = (n); \
4171 YY_LESS_LINENO(yyless_macro_arg);\
4172pyscanYYtext[pyscanYYleng] = (yy_hold_char); \
4173(yy_c_buf_p) = pyscanYYtext + yyless_macro_arg; \
4174(yy_hold_char) = *(yy_c_buf_p); \
4175*(yy_c_buf_p) = '\0'; \
4176pyscanYYleng = yyless_macro_arg; \
4177} \
4178while ( 0 )
4179
4180/* Accessor methods (get/set functions) to struct members. */
4181
4182/** Get the current line number.
4183 *
4184 */
4185int pyscanYYget_lineno (void)
4186{
4187
4188 return pyscanYYlineno;
4189}
4190
4191/** Get the input stream.
4192 *
4193 */
4194FILE *pyscanYYget_in (void)
4195{
4196 return pyscanYYin;
4197}
4198
4199/** Get the output stream.
4200 *
4201 */
4202FILE *pyscanYYget_out (void)
4203{
4204 return pyscanYYout;
4205}
4206
4207/** Get the length of the current token.
4208 *
4209 */
4210yy_size_t pyscanYYget_leng (void)
4211{
4212 return pyscanYYleng;
4213}
4214
4215/** Get the current token.
4216 *
4217 */
4218
4219char *pyscanYYget_text (void)
4220{
4221 return pyscanYYtext;
4222}
4223
4224/** Set the current line number.
4225 * @param line_number
4226 *
4227 */
4228void pyscanYYset_lineno (int line_number )
4229{
4230
4231 pyscanYYlineno = line_number;
4232}
4233
4234/** Set the input stream. This does not discard the current
4235 * input buffer.
4236 * @param in_str A readable stream.
4237 *
4238 * @see pyscanYY_switch_to_buffer
4239 */
4240void pyscanYYset_in (FILE * in_str )
4241{
4242 pyscanYYin = in_str ;
4243}
4244
4245void pyscanYYset_out (FILE * out_str )
4246{
4247 pyscanYYout = out_str ;
4248}
4249
4250int pyscanYYget_debug (void)
4251{
4252 return pyscanYY_flex_debug;
4253}
4254
4255void pyscanYYset_debug (int bdebug )
4256{
4257 pyscanYY_flex_debug = bdebug ;
4258}
4259
4260static int yy_init_globals (void)
4261{
4262 /* Initialization is the same as for the non-reentrant scanner.
4263 * This function is called from pyscanYYlex_destroy(), so don't allocate here.
4264 */
4265
4266 (yy_buffer_stack) = 0;
4267 (yy_buffer_stack_top) = 0;
4268 (yy_buffer_stack_max) = 0;
4269 (yy_c_buf_p) = (char *) 0;
4270 (yy_init) = 0;
4271 (yy_start) = 0;
4272
4273 (yy_state_buf) = 0;
4274 (yy_state_ptr) = 0;
4275 (yy_full_match) = 0;
4276 (yy_lp) = 0;
4277
4278/* Defined in main.c */
4279#ifdef YY_STDINIT
4280 pyscanYYin = stdin;
4281 pyscanYYout = stdout;
4282#else
4283 pyscanYYin = (FILE *) 0;
4284 pyscanYYout = (FILE *) 0;
4285#endif
4286
4287 /* For future reference: Set errno on error, since we are called by
4288 * pyscanYYlex_init()
4289 */
4290 return 0;
4291}
4292
4293/* pyscanYYlex_destroy is for both reentrant and non-reentrant scanners. */
4294int pyscanYYlex_destroy (void)
4295{
4296
4297 /* Pop the buffer stack, destroying each element. */
4298while(YY_CURRENT_BUFFER){
4299pyscanYY_delete_buffer(YY_CURRENT_BUFFER );
4300YY_CURRENT_BUFFER_LVALUE = NULL;
4301pyscanYYpop_buffer_state();
4302}
4303
4304/* Destroy the stack itself. */
4305pyscanYYfree((yy_buffer_stack) );
4306(yy_buffer_stack) = NULL;
4307
4308 pyscanYYfree ( (yy_state_buf) );
4309 (yy_state_buf) = NULL;
4310
4311 /* Reset the globals. This is important in a non-reentrant scanner so the next time
4312 * pyscanYYlex() is called, initialization will occur. */
4313 yy_init_globals( );
4314
4315 return 0;
4316}
4317
4318/*
4319 * Internal utility routines.
4320 */