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