#define yy_create_buffer pyscanYY_create_buffer
#define yy_delete_buffer pyscanYY_delete_buffer
#define yy_scan_buffer pyscanYY_scan_buffer
#define yy_scan_string pyscanYY_scan_string
#define yy_scan_bytes pyscanYY_scan_bytes
#define yy_flex_debug pyscanYY_flex_debug
#define yy_init_buffer pyscanYY_init_buffer
#define yy_flush_buffer pyscanYY_flush_buffer
#define yy_load_buffer_state pyscanYY_load_buffer_state
#define yy_switch_to_buffer pyscanYY_switch_to_buffer
#define yyin pyscanYYin
#define yyleng pyscanYYleng
#define yylex pyscanYYlex
#define yyout pyscanYYout
#define yyrestart pyscanYYrestart
#define yytext pyscanYYtext

/* A lexical scanner generated by flex */

/* Scanner skeleton version:
 * $Header: /cvs/root/flex/flex/skel.c,v 1.1.1.1 1999/04/23 00:46:30 wsanchez Exp $
 */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5

#include <stdio.h>


/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif


#ifdef __cplusplus

#include <stdlib.h>
#include <unistd.h>

/* Use prototypes in function declarations. */
#define YY_USE_PROTOS

/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST

#else	/* ! __cplusplus */

#if __STDC__

#define YY_USE_PROTOS
#define YY_USE_CONST

#endif	/* __STDC__ */
#endif	/* ! __cplusplus */

#ifdef __TURBOC__
 #pragma warn -rch
 #pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif

#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif


#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
 * we want to instead treat it as an 8-bit unsigned char, hence the
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* Enter a start condition.  This macro really ought to take a parameter,
 * but we do it the disgusting crufty way forced on us by the ()-less
 * definition of BEGIN.
 */
#define BEGIN yy_start = 1 + 2 *

/* Translate the current start state into a value that can be later handed
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
 * compatibility.
 */
#define YY_START ((yy_start - 1) / 2)
#define YYSTATE YY_START

/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)

/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#define YY_BUF_SIZE 262144

typedef struct yy_buffer_state *YY_BUFFER_STATE;

extern int yyleng;
extern FILE *yyin, *yyout;

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

/* The funky do-while in the following #define is used to turn the definition
 * int a single C statement (which needs a semi-colon terminator).  This
 * avoids problems with code like:
 *
 * 	if ( condition_holds )
 *		yyless( 5 );
 *	else
 *		do_something_else();
 *
 * Prior to using the do-while the compiler would get upset at the
 * "else" because it interpreted the "if" statement as being all
 * done when it reached the ';' after the yyless() call.
 */

/* Return all but the first 'n' matched characters back to the input stream. */

#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
		*yy_cp = yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yytext_ptr )

/* The following is because we cannot portably get our hands on size_t
 * (without autoconf's help, which isn't available because we want
 * flex-generated scanners to compile on their own).
 */
typedef unsigned int yy_size_t;


struct yy_buffer_state
	{
	FILE *yy_input_file;

	char *yy_ch_buf;		/* input buffer */
	char *yy_buf_pos;		/* current position in input buffer */

	/* Size of input buffer in bytes, not including room for EOB
	 * characters.
	 */
	yy_size_t yy_buf_size;

	/* Number of characters read into yy_ch_buf, not including EOB
	 * characters.
	 */
	int yy_n_chars;

	/* Whether we "own" the buffer - i.e., we know we created it,
	 * and can realloc() it to grow it, and should free() it to
	 * delete it.
	 */
	int yy_is_our_buffer;

	/* Whether this is an "interactive" input source; if so, and
	 * if we're using stdio for input, then we want to use getc()
	 * instead of fread(), to make sure we stop fetching input after
	 * each newline.
	 */
	int yy_is_interactive;

	/* Whether we're considered to be at the beginning of a line.
	 * If so, '^' rules will be active on the next match, otherwise
	 * not.
	 */
	int yy_at_bol;

	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
	/* When an EOF's been seen but there's still some text to process
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
	 * shouldn't try reading from the input source any more.  We might
	 * still have a bunch of tokens to match, though, because of
	 * possible backing-up.
	 *
	 * When we actually see the EOF, we change the status to "new"
	 * (via yyrestart()), so that the user can continue scanning by
	 * just pointing yyin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2
	};

static YY_BUFFER_STATE yy_current_buffer = 0;

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 */
#define YY_CURRENT_BUFFER yy_current_buffer


/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;

static int yy_n_chars;		/* number of characters read into yy_ch_buf */


int yyleng;

/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 1;		/* whether we need to initialize */
static int yy_start = 0;	/* start state number */

/* Flag which is used to allow yywrap()'s to do buffer switches
 * instead of setting up a fresh yyin.  A bit of a hack ...
 */
static int yy_did_buffer_switch_on_eof;

void yyrestart YY_PROTO(( FILE *input_file ));

void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )

YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));

static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
static void yy_flex_free YY_PROTO(( void * ));

#define yy_new_buffer yy_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! yy_current_buffer ) \
		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
	yy_current_buffer->yy_is_interactive = is_interactive; \
	}

#define yy_set_bol(at_bol) \
	{ \
	if ( ! yy_current_buffer ) \
		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
	yy_current_buffer->yy_at_bol = at_bol; \
	}

#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)


#define YY_USES_REJECT

#define yywrap() 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
#define yytext_ptr yytext

static yy_state_type yy_get_previous_state YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	yytext_ptr = yy_bp; \
	yyleng = (int) (yy_cp - yy_bp); \
	yy_hold_char = *yy_cp; \
	*yy_cp = '\0'; \
	yy_c_buf_p = yy_cp;

#define YY_NUM_RULES 106
#define YY_END_OF_BUFFER 107
static yyconst short int yy_acclist[459] =
    {   0,
    16439,16439,   57,   57,  107,  105,  106,  104,  106,    8,
      105,  106,    8,  105,  106,    9,  104,  106,    5,    8,
      105,  106,    8,  105,  106,    4,    8,  105,  106,    7,
        8,  105,  106,    8,  105,  106,    8,  105,  106,    7,
        8,  105,  106,16387,    7,    8,  105,  106,16387,    7,
        8,  105,  106,16387,   79,   81,  105,  106,   79,   80,
      104,  106,   79,   81,  105,  106,   79,   81,  105,  106,
       81,  105,  106,   84,   86,  105,  106,   85,  104,  106,
       86,  105,  106,   84,   86,  105,  106,   82,   86,  105,
      106,  105,  106,   29,  105,  106,   28,  105,  106,   35,

      105,  106,   30,  105,  106,   33,  105,  106,   30,   35,
      105,  106,   34,  105,  106,   35,  105,  106,   31,   35,
      105,  106,   20,   24,  105,  106,   24,  105,  106,   23,
      104,  106,16397,   19,   24,  105,  106,   22,   24,  105,
      106,   18,   24,  105,  106,   20,   24,  105,  106,   17,
       24,  105,  106,   22,   24,  105,  106,   47,  105,  106,
       48,  105,  106,   48,  105,  106,   49,  105,  106,   50,
      105,  106,  105,  106,   51,  104,  106, 8247,  105,  106,
      105,  106,  105,  106,   54,  105,  106,   41,   44,  105,
      106,   44,  105,  106,   43,  104,  106,   40,   44,  105,

      106,   39,   44,  105,  106,   38,   44,  105,  106,   44,
      105,  106,   68,  105,  106,   57,   68,  105,  106,   69,
      104,  106,   61,   68,  105,  106,   67,   68,  105,  106,
       60,   68,  105,  106,   64,   68,  105,  106,   58,   68,
      105,  106,   58,   68,  105,  106,   56,   68,  105,  106,
       68,  105,  106,   68,  105,  106,   65,   68,  105,  106,
       68,  105,  106,   66,   68,  105,  106,   76,  105,  106,
       75,  104,  106,   73,  105,  106,   74,  104,  106,   70,
       73,  105,  106,   71,   73,  105,  106,   72,   73,  105,
      106,   91,   92,  105,  106,   92,  105,  106,   90,   92,

      105,  106,   92,  105,  106,   97,   98,  105,  106,   96,
       98,  105,  106,   98,  105,  106,   98,  105,  106,  101,
      103,  105,  106,  101,  102,  104,  106,  101,  103,  105,
      106,  101,  103,  105,  106,  103,  105,  106,    9,    6,
        7,16387,16387,16387,    7,16387,    7,16387,    7,16387,
       79,   79,   79,   84,   83,   84,   82,   82,   29,   28,
       30,   32,   31,   20,16397,   22,   20,   17,   16,   21,
       22,   22,   47,   48,   50,   51,   54,   41,   38,   37,
       42,   57,   67,   58,   58,   58,   61,   60,   72,   91,
       88,   88,   87,   97,   94,   94,   93,  101,  101,  101,

       10,    6,   11,16387,16387,16387,   12, 8195,    7,16387,
        7,16387,   77,   78,   14, 8205,   25,   26,   20,   21,
       21,   22,   22,   27,   27,   52,   53,   36,   45,   46,
       42,   62,   63,   59,   58,   58,   89,   95,   99,  100,
    16387,16387,    7,16387,    1,   20,   21,   59,   58,16387,
        7,16387,   59,16387,    2,16399,16399, 8207
    } ;

static yyconst short int yy_accept[287] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    2,    3,    3,    3,    4,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    6,    8,   10,
       13,   16,   19,   23,   26,   30,   34,   37,   40,   45,
       50,   55,   59,   63,   67,   71,   74,   78,   81,   84,
       88,   92,   94,   97,  100,  103,  106,  109,  113,  116,
      119,  123,  127,  130,  134,  138,  142,  146,  150,  154,
      158,  161,  164,  167,  170,  173,  175,  178,  181,  183,
      185,  188,  192,  195,  198,  202,  206,  210,  213,  216,

      220,  223,  227,  231,  235,  239,  243,  247,  251,  254,
      257,  261,  264,  268,  271,  274,  277,  280,  284,  288,
      292,  296,  299,  303,  306,  310,  314,  317,  320,  324,
      328,  332,  336,  339,  339,  339,  340,  340,  341,  341,
      342,  342,  342,  343,  344,  345,  345,  345,  347,  347,
      349,  351,  352,  352,  353,  354,  355,  355,  356,  357,
      358,  359,  359,  360,  361,  362,  363,  364,  365,  366,
      366,  366,  366,  367,  367,  368,  369,  370,  370,  372,
      373,  374,  375,  376,  376,  377,  377,  377,  378,  379,
      379,  379,  379,  380,  381,  381,  382,  383,  383,  384,

      384,  384,  385,  386,  387,  387,  388,  389,  389,  390,
      391,  391,  392,  393,  394,  395,  395,  396,  397,  398,
      399,  399,  400,  401,  402,  403,  404,  405,  406,  407,
      408,  409,  411,  413,  414,  415,  416,  417,  417,  418,
      419,  420,  421,  421,  423,  425,  426,  427,  428,  429,
      429,  430,  431,  432,  433,  434,  435,  436,  437,  438,
      438,  439,  439,  440,  441,  442,  443,  445,  446,  447,
      448,  448,  449,  450,  451,  453,  453,  453,  454,  455,
      456,  457,  457,  458,  459,  459
    } ;

static yyconst int yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    2,    4,    5,    6,    1,    4,    4,    7,    8,
        9,    4,   10,   11,   10,   12,    4,   13,   14,   14,
       14,   14,   14,   14,   14,   15,   15,   16,    4,    4,
       17,    4,    1,    1,   18,   18,   18,   18,   19,   18,
       20,   20,   20,   21,   20,   22,   20,   20,   20,   20,
       20,   23,   20,   20,   24,   20,   20,   25,   20,   20,
       26,   27,   28,    1,   29,    4,   30,   18,   31,   32,

       33,   34,   20,   20,   20,   21,   20,   35,   20,   20,
       20,   20,   20,   36,   37,   20,   38,   20,   20,   25,
       20,   20,   39,    4,   28,    4,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

static yyconst int yy_meta[40] =
    {   0,
        1,    2,    3,    1,    4,    5,    4,    1,    6,    1,
        6,    7,    8,    8,    8,    1,    9,   10,   10,   11,
       11,   11,   11,   11,   11,    1,   12,    1,   11,   10,
       10,   10,   10,   10,   11,   11,   11,   11,    1
    } ;

static yyconst short int yy_base[336] =
    {   0,
      914,  891,    0,   39,  890,  868,   76,   77,   82,   84,
      104,    0,  143,    0,  181,  217,  252,    0,  290,    0,
       90,  189,  195,  201,  329,    0,  867,  862,  368,    0,
      206,  207,  223,  232,  233,  238,  854, 1079, 1079, 1079,
       92,  841,  837,    0,  823,    0,  215,  823,  214,  406,
      225,  801,  800,  818,  812,  246,    0,   94, 1079,  183,
      802,  197, 1079,    0, 1079,  794, 1079, 1079, 1079,    0,
        0,    0, 1079,  242,  786,    0,  783,  756,  260,  782,
        0,  784, 1079, 1079,    0,   99, 1079, 1079,  780,  771,
      254,    0, 1079,    0,  771,  768,  407,    0, 1079,  772,

     1079,  768,    0,  762, 1079,  430,  254, 1079,  273,  410,
     1079,  411, 1079, 1079, 1079, 1079, 1079, 1079, 1079,    0,
        0,  756, 1079,  409,    0, 1079,  751,  417,  726,  717,
      737,  724,  419,  419,    0,  720,  717,    0,  714,    0,
      425,  714,  412,  433,  436,    0,  437,  446,    0,  447,
      456,  692,  425,  710,  707,    0,  434, 1079,  460,  707,
      706,  459, 1079,    0,  708,    0,    0,    0,  468,  703,
      703,  691,    0,  687,  535,  469, 1079,  562,    0,  258,
        0,  565,    0,  457, 1079,  561,  557,  476,    0,  561,
      557,  554,  478, 1079,    0,    0,  542,  528,    0,  518,

      472,  466,    0, 1079,    0, 1079, 1079,  487,    0,    0,
      512, 1079,  480, 1079,    0,  469, 1079,  493, 1079,  410,
      495,  264,  245, 1079,    0, 1079,  487,  491,  495, 1079,
     1079,  497,  501, 1079, 1079, 1079,  230,  223, 1079, 1079,
      181,    0,    0,    0,    0, 1079, 1079, 1079,  193,   97,
     1079, 1079,    0, 1079, 1079,  522, 1079,  484, 1079,  507,
     1079,  513, 1079, 1079,  503,  505,  509,  511,   77,    0,
      517, 1079, 1079,  521,  522,    0,  534,  538,  540,  543,
      548,  552,  554, 1079, 1079,  571,  583,  595,  607,  619,
      631,  643,  655,  667,  679,  691,  696,  706,  716,  727,

      739,  744,  755,  760,  771,  782,  793,  805,  810,  814,
      825,  828,  839,  851,  856,  867,  878,  890,  901,  913,
      925,  936,  947,  959,  970,  981,  993, 1005, 1016, 1027,
     1032, 1042, 1054, 1057, 1067
    } ;

static yyconst short int yy_def[336] =
    {   0,
      286,  286,  285,  285,  286,  286,  287,  287,  288,  288,
      285,   11,  285,   13,  289,  289,  286,   17,  285,   19,
      290,  290,  291,  291,  285,   25,  292,  292,  285,   29,
      293,  293,  294,  294,  295,  295,  285,  285,  285,  285,
      285,  285,  285,  296,  285,  297,  298,  296,  299,  299,
      299,  300,  300,  285,  285,  300,  301,  285,  285,  301,
      285,  285,  285,  302,  285,  285,  285,  285,  285,  303,
      304,  305,  285,  306,  285,  307,  285,  305,  285,  308,
      309,  285,  285,  285,  310,  285,  285,  285,  285,  285,
      285,  311,  285,  312,  285,  285,  285,  313,  285,  285,

      285,  285,  314,  285,  285,  285,  106,  285,  285,  285,
      285,  285,  285,  285,  285,  285,  285,  285,  285,  315,
      316,  285,  285,  317,  318,  285,  285,  319,  320,  320,
      285,  285,  320,  285,  296,  285,  285,  321,  285,  297,
      298,  296,  322,  322,  322,  323,  285,  299,  324,  299,
      299,  300,  300,  285,  285,  301,  285,  285,  301,  285,
      285,  285,  285,  302,  285,  303,  304,  305,  306,  285,
      325,  285,  307,  285,  305,  285,  285,  326,  327,  328,
      309,  285,  310,  285,  285,  285,  285,  285,  311,  329,
      285,  285,  285,  285,  313,  330,  285,  285,  314,  285,

      285,  106,  107,  285,  331,  285,  285,  285,  315,  316,
      285,  285,  285,  285,  318,  285,  285,  285,  285,  320,
      320,  285,  285,  285,  321,  285,  322,  322,  322,  285,
      285,  299,  299,  285,  285,  285,  285,  325,  285,  285,
      305,  332,  333,  327,  307,  285,  285,  285,  285,  329,
      285,  285,  330,  285,  285,  285,  285,  331,  285,  285,
      285,  285,  285,  285,  322,  322,  299,  285,  305,  332,
      285,  285,  285,  322,  299,  334,  285,  285,  322,  285,
      335,  285,  335,  285,    0,  285,  285,  285,  285,  285,
      285,  285,  285,  285,  285,  285,  285,  285,  285,  285,

      285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
      285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
      285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
      285,  285,  285,  285,  285
    } ;

static yyconst short int yy_nxt[1119] =
    {   0,
       40,   41,   42,   40,   43,   44,   45,   40,   40,   40,
       40,   40,   40,   40,   40,   40,   40,   46,   46,   46,
       46,   46,   46,   46,   46,   40,   40,   40,   46,   46,
       46,   46,   46,   46,   46,   46,   46,   46,   40,   40,
       47,   42,   40,   43,   48,   45,   40,   40,   40,   40,
       40,   40,   40,   40,   40,   40,   49,   49,   49,   49,
       49,   49,   49,   49,   40,   40,   40,   49,   49,   50,
       51,   49,   49,   49,   49,   49,   49,   40,   53,   53,
       54,   54,   55,   55,   58,   60,   58,   59,  276,   61,
       38,   86,   87,  134,   89,  157,   90,  135,  249,  158,

      184,  185,   56,   56,   38,   62,   39,   38,   38,   38,
       38,   63,   38,   38,   38,   38,   38,   38,   38,   38,
       38,   64,   64,   64,   64,   64,   64,   64,   64,   38,
       38,   38,   64,   64,   64,   64,   64,   64,   64,   64,
       64,   64,   38,   65,   66,   39,   65,   65,   65,   65,
       38,   67,   65,   68,   65,   65,   65,   65,   69,   70,
       71,   71,   71,   71,   71,   71,   71,   71,   65,   65,
       65,   71,   71,   71,   71,   71,   71,   71,   71,   71,
       71,   65,   73,   74,  159,   75,   76,   77,  160,   38,
       91,   87,   73,   89,  249,   90,   93,   94,  162,   95,

       93,   96,   97,   94,  163,   95,   98,   96,   39,   39,
      122,  122,  123,  123,  269,  147,  141,   78,   79,   74,
      142,   75,   80,   77,  237,   39,  147,  126,   73,  127,
      149,  237,  124,  124,   39,  130,  126,  131,  127,  132,
      130,  149,  131,  169,  132,  144,  145,  170,  285,  128,
      152,  264,  152,   78,   39,  188,  185,  151,  128,  133,
      246,  176,  177,  173,  133,  178,  203,  203,  263,   81,
       81,   81,   81,   81,   81,   81,   81,  206,  285,  207,
       81,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       38,   82,   39,   38,   38,   38,   38,   83,   83,   38,

       83,   38,   38,   38,   38,   84,   38,   85,   85,   85,
       85,   85,   85,   85,   85,   38,   38,   38,   85,   85,
       85,   85,   85,   85,   85,   85,   85,   85,   38,   99,
      100,  101,   99,  102,  103,  104,  105,   99,   99,   99,
       99,  106,  107,  107,   99,  108,   99,   99,   99,   99,
       99,  109,  110,   99,  111,   99,   99,   99,   99,   99,
       99,   99,   99,   99,  109,   99,  112,  113,  116,  116,
      117,  116,  116,  116,  116,  118,  119,  116,  116,  116,
      116,  116,  116,  116,  116,  120,  120,  120,  120,  120,
      120,  120,  120,  118,  116,  119,  120,  120,  120,  120,

      120,  120,  120,  120,  120,  120,  118,  147,  193,  194,
      213,  214,  195,  147,  206,  206,  207,  207,  218,  219,
      134,  285,  149,  220,  135,  220,  141,  285,  149,  152,
      142,  152,  208,  208,  147,  157,  221,  147,  147,  158,
      150,  201,  202,  202,  203,  208,  208,  147,  147,  149,
      204,  204,  149,  149,  205,  144,  145,  147,  184,  185,
      162,  159,  149,  149,  204,  160,  163,  228,  229,  169,
      176,  177,  149,  170,  178,  261,  232,  188,  185,  193,
      194,  260,  214,  195,  256,  256,  256,  257,  147,  233,
      285,  206,  147,  207,  262,  219,  147,  285,  147,  220,

      257,  220,  268,  149,  147,  273,  268,  149,  260,  214,
      147,  149,  268,  149,  262,  219,  259,  149,  273,  149,
      265,  149,  147,  280,  255,  149,  277,  149,  266,  278,
      278,  278,  254,  267,  256,  256,  256,  149,  149,  274,
      271,  280,  272,  197,  280,  275,  278,  278,  278,  282,
      278,  278,  278,  282,  271,  282,  149,  279,  272,  149,
      252,  251,  249,  248,  284,  247,  182,  243,  284,  241,
      284,   38,   38,   38,   38,   38,   38,   38,   38,   38,
       38,   38,   38,   52,   52,   52,   52,   52,   52,   52,
       52,   52,   52,   52,   52,   57,   57,   57,   57,   57,

       57,   57,   57,   57,   57,   57,   57,   72,   72,   72,
       72,   72,   72,   72,   72,   72,   72,   72,   72,   88,
       88,   88,   88,   88,   88,   88,   88,   88,   88,   88,
       88,   92,   92,   92,   92,   92,   92,   92,   92,   92,
       92,   92,   92,  114,  114,  114,  114,  114,  114,  114,
      114,  114,  114,  114,  114,  121,  121,  121,  121,  121,
      121,  121,  121,  121,  121,  121,  121,  125,  125,  125,
      125,  125,  125,  125,  125,  125,  125,  125,  125,  129,
      129,  129,  129,  129,  129,  129,  129,  129,  129,  129,
      129,  138,  138,  240,  138,  239,  138,  138,  138,  138,

      138,  138,  138,  140,  237,  140,  140,  143,  236,  165,
      143,  161,  161,  235,  234,  143,  143,  148,  153,  146,
      226,  224,  136,  148,  148,  148,  148,  152,  152,  152,
      223,  152,  152,  152,  152,  152,  152,  152,  152,  156,
      156,  222,  156,  221,  156,  156,  156,  156,  156,  156,
      156,  164,  221,  164,  164,  166,  166,  216,  166,  166,
      211,  166,  166,  166,  166,  166,  166,  167,  200,  167,
      167,  168,  198,  197,  192,  191,  168,  187,  168,  168,
      168,  168,  168,  171,  186,  182,  171,  180,  175,  174,
      172,  171,  171,  173,  173,  165,  173,  173,  173,  173,

      173,  173,  173,  173,  173,  179,  179,  161,  179,  179,
      179,  179,  179,  179,  179,  179,  179,  181,  155,  181,
      181,  183,  154,  183,  183,  189,  153,  153,  146,  139,
      189,  189,  189,  189,  189,  189,  189,  190,  190,  196,
      196,  137,  196,  136,  196,  196,  196,  196,  196,  196,
      196,  199,  199,  285,  199,  199,  199,  199,  199,  199,
      199,  199,  199,  209,  115,  209,  209,  210,  210,  115,
       39,  210,  210,  210,  210,  210,  210,  210,  212,  212,
      212,  212,  212,  212,  212,  212,  212,  212,  212,  212,
      215,  215,   39,   39,  215,  215,  215,  215,  215,  215,

      215,  217,  217,  217,  217,  217,  217,  217,  217,  217,
      217,  217,  217,  220,  220,  220,   39,  220,  220,  220,
      220,  220,  220,  220,  220,  225,  225,  285,  225,  225,
      225,  225,  225,  225,  225,  225,  225,  227,  285,  285,
      285,  285,  285,  227,  227,  227,  227,  230,  230,  230,
      230,  285,  230,  230,  230,  230,  230,  230,  230,  231,
      231,  231,  231,  231,  231,  231,  231,  285,  231,  231,
      231,  238,  285,  285,  285,  285,  285,  238,  285,  238,
      238,  242,  242,  285,  242,  242,  242,  242,  242,  242,
      242,  242,  242,  244,  244,  285,  244,  244,  244,  244,

      244,  244,  244,  244,  244,  245,  245,  245,  245,  245,
      245,  245,  245,  245,  245,  245,  245,  250,  285,  285,
      285,  285,  285,  250,  285,  250,  250,  253,  253,  285,
      253,  253,  253,  253,  253,  253,  253,  253,  253,  258,
      285,  258,  270,  270,  285,  270,  270,  270,  270,  270,
      270,  270,  270,  270,  246,  246,  246,  246,  285,  246,
      246,  246,  246,  246,  246,  246,  281,  281,  283,  285,
      285,  285,  285,  285,  283,  283,  283,  283,   37,  285,
      285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
      285,  285,  285,  285,  285,  285,  285,  285,  285,  285,

      285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
      285,  285,  285,  285,  285,  285,  285,  285
    } ;

static yyconst short int yy_chk[1119] =
    {   0,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    4,
        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
        4,    4,    4,    4,    4,    4,    4,    4,    7,    8,
        7,    8,    7,    8,    9,   10,   10,    9,  269,   10,
       21,   21,   21,   41,   21,   58,   21,   41,  250,   58,

       86,   86,    7,    8,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   15,   15,   60,   15,   15,   15,   60,   22,
       22,   22,   15,   22,  249,   22,   23,   23,   62,   23,

       23,   23,   24,   24,   62,   24,   24,   24,   31,   32,
       31,   32,   31,   32,  241,   49,   47,   15,   16,   16,
       47,   16,   16,   16,  238,   33,   51,   33,   16,   33,
       49,  237,   31,   32,   34,   35,   34,   35,   34,   35,
       36,   51,   36,   74,   36,   47,   47,   74,   56,   33,
       56,  223,   56,   16,   17,   91,   91,   51,   34,   35,
      180,   79,   79,  180,   36,   79,  107,  107,  222,   17,
       17,   17,   17,   17,   17,   17,   17,  109,  107,  109,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,

       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
       19,   19,   19,   19,   19,   19,   19,   19,   19,   25,
       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
       25,   25,   25,   25,   25,   25,   25,   25,   29,   29,
       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,

       29,   29,   29,   29,   29,   29,   29,   50,   97,   97,
      124,  124,   97,  143,  110,  112,  110,  112,  128,  128,
      134,  133,   50,  133,  134,  133,  141,  153,  143,  153,
      141,  153,  110,  112,  144,  157,  220,  145,  147,  157,
       50,  106,  106,  106,  106,  110,  112,  148,  150,  144,
      106,  106,  145,  147,  106,  141,  141,  151,  184,  184,
      162,  159,  148,  150,  106,  159,  162,  144,  145,  169,
      176,  176,  151,  169,  176,  216,  150,  188,  188,  193,
      193,  213,  213,  193,  201,  201,  201,  202,  227,  151,
      202,  208,  228,  208,  218,  218,  229,  221,  232,  221,

      202,  221,  233,  227,  265,  258,  266,  228,  260,  260,
      267,  229,  268,  232,  262,  262,  211,  233,  258,  265,
      228,  266,  274,  275,  200,  267,  271,  268,  229,  271,
      271,  271,  198,  232,  256,  256,  256,  274,  275,  265,
      256,  279,  256,  197,  280,  267,  277,  277,  277,  281,
      278,  278,  278,  282,  256,  283,  279,  274,  278,  280,
      192,  191,  190,  187,  281,  186,  182,  178,  282,  175,
      283,  286,  286,  286,  286,  286,  286,  286,  286,  286,
      286,  286,  286,  287,  287,  287,  287,  287,  287,  287,
      287,  287,  287,  287,  287,  288,  288,  288,  288,  288,

      288,  288,  288,  288,  288,  288,  288,  289,  289,  289,
      289,  289,  289,  289,  289,  289,  289,  289,  289,  290,
      290,  290,  290,  290,  290,  290,  290,  290,  290,  290,
      290,  291,  291,  291,  291,  291,  291,  291,  291,  291,
      291,  291,  291,  292,  292,  292,  292,  292,  292,  292,
      292,  292,  292,  292,  292,  293,  293,  293,  293,  293,
      293,  293,  293,  293,  293,  293,  293,  294,  294,  294,
      294,  294,  294,  294,  294,  294,  294,  294,  294,  295,
      295,  295,  295,  295,  295,  295,  295,  295,  295,  295,
      295,  296,  296,  174,  296,  172,  296,  296,  296,  296,

      296,  296,  296,  297,  171,  297,  297,  298,  170,  165,
      298,  161,  160,  155,  154,  298,  298,  299,  152,  142,
      139,  137,  136,  299,  299,  299,  299,  300,  300,  300,
      132,  300,  300,  300,  300,  300,  300,  300,  300,  301,
      301,  131,  301,  130,  301,  301,  301,  301,  301,  301,
      301,  302,  129,  302,  302,  303,  303,  127,  303,  303,
      122,  303,  303,  303,  303,  303,  303,  304,  104,  304,
      304,  305,  102,  100,   96,   95,  305,   90,  305,  305,
      305,  305,  305,  306,   89,   82,  306,   80,   78,   77,
       75,  306,  306,  307,  307,   66,  307,  307,  307,  307,

      307,  307,  307,  307,  307,  308,  308,   61,  308,  308,
      308,  308,  308,  308,  308,  308,  308,  309,   55,  309,
      309,  310,   54,  310,  310,  311,   53,   52,   48,   45,
      311,  311,  311,  311,  311,  311,  311,  312,  312,  313,
      313,   43,  313,   42,  313,  313,  313,  313,  313,  313,
      313,  314,  314,   37,  314,  314,  314,  314,  314,  314,
      314,  314,  314,  315,   28,  315,  315,  316,  316,   27,
        6,  316,  316,  316,  316,  316,  316,  316,  317,  317,
      317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
      318,  318,    5,    2,  318,  318,  318,  318,  318,  318,

      318,  319,  319,  319,  319,  319,  319,  319,  319,  319,
      319,  319,  319,  320,  320,  320,    1,  320,  320,  320,
      320,  320,  320,  320,  320,  321,  321,    0,  321,  321,
      321,  321,  321,  321,  321,  321,  321,  322,    0,    0,
        0,    0,    0,  322,  322,  322,  322,  323,  323,  323,
      323,    0,  323,  323,  323,  323,  323,  323,  323,  324,
      324,  324,  324,  324,  324,  324,  324,    0,  324,  324,
      324,  325,    0,    0,    0,    0,    0,  325,    0,  325,
      325,  326,  326,    0,  326,  326,  326,  326,  326,  326,
      326,  326,  326,  327,  327,    0,  327,  327,  327,  327,

      327,  327,  327,  327,  327,  328,  328,  328,  328,  328,
      328,  328,  328,  328,  328,  328,  328,  329,    0,    0,
        0,    0,    0,  329,    0,  329,  329,  330,  330,    0,
      330,  330,  330,  330,  330,  330,  330,  330,  330,  331,
        0,  331,  332,  332,    0,  332,  332,  332,  332,  332,
      332,  332,  332,  332,  333,  333,  333,  333,    0,  333,
      333,  333,  333,  333,  333,  333,  334,  334,  335,    0,
        0,    0,    0,    0,  335,  335,  335,  335,  285,  285,
      285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
      285,  285,  285,  285,  285,  285,  285,  285,  285,  285,

      285,  285,  285,  285,  285,  285,  285,  285,  285,  285,
      285,  285,  285,  285,  285,  285,  285,  285
    } ;

static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
static char *yy_full_match;
static int yy_lp;
static int yy_looking_for_trail_begin = 0;
static int yy_full_lp;
static int *yy_full_state;
#define YY_TRAILING_MASK 0x2000
#define YY_TRAILING_HEAD_MASK 0x4000
#define REJECT \
{ \
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
yy_cp = yy_full_match; /* restore poss. backed-over text */ \
yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
yy_state_ptr = yy_full_state; /* restore orig. state */ \
yy_current_state = *yy_state_ptr; /* restore curr. state */ \
++yy_lp; \
goto find_rule; \
}
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "pyscanner.l"
#define INITIAL 0
/******************************************************************************
 *
 * $Id: pyscanner.l,v 1.9 2001/03/19 19:27:39 root Exp $
 *
 * Copyright (C) 1997-2005 by Dimitri van Heesch.
 *
 * Permission to use, copy, modify, and distribute this software and its
 * documentation under the terms of the GNU General Public License is hereby 
 * granted. No representations are made about the suitability of this software 
 * for any purpose. It is provided "as is" without express or implied warranty.
 * See the GNU General Public License for more details.
 *
 * Documents produced by Doxygen are derivative works derived from the
 * input used in their production; they are not affected by this license.
 *
 */
/*  This code is based on the work done by the MoxyPyDoxy team
 *  (Linda Leong, Mike Rivera, Kim Truong, and Gabriel Estrada), executed
 *  as part of CS179e (Compiler design project) at the UC Riverside,
 *  under supervision of Peter H. Fröhlic.
 */
#line 24 "pyscanner.l"

/*
 *	includes
 */
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>

#include "qtbc.h"
#include <qarray.h>
#include <qstack.h>
#include <qregexp.h>
#include <unistd.h>
#include <qfile.h>
#include <qfileinfo.h>
  
#include "pyscanner.h"
#include "entry.h"
#include "message.h"
#include "config.h"
#include "doxygen.h"
#include "util.h"
#include "defargs.h"
#include "language.h"
#include "commentscan.h"
#include "pycode.h"

#define YY_NEVER_INTERACTIVE 1

/* -----------------------------------------------------------------
 *
 *	statics
 */

  
static ParserInterface *g_thisParser;
static const char *     inputString;
static int		inputPosition;
static QFile            inputFile;

static Protection	protection;

static Entry*		current_root = 0 ;
static Entry*		current      = 0 ;
static Entry*		previous     = 0 ;
static int		yyLineNr     = 1 ;
static QCString		yyFileName;
static MethodTypes 	mtype;
static bool    		gstat;
static Specifier 	virt;

static int              docBlockContext;
static QCString         docBlock;
static QCString         docBlockName;
static bool             docBlockInBody;
static bool             docBlockJavaStyle;
static bool             docBrief;

static bool             g_doubleQuote;
static bool             g_specialBlock;
static bool             g_expectModuleDocs;
static int              g_stringContext;
static QCString *       g_copyString;
static int              g_indent = 0;

static QDict<QCString>  g_packageNameCache(257);
static QCString         g_packageScope;

static char             g_atomStart;
static char             g_atomEnd;
static int              g_atomCount;

static bool             g_insideConstructor;
static Entry *          g_constructorEntry = 0;

//-----------------------------------------------------------------------------


static void initParser()
{
  protection = Public;
  mtype = Method;
  gstat = FALSE;
  virt = Normal;
  previous = 0;
  g_packageNameCache.setAutoDelete(TRUE);
}

static void initEntry()
{
  //current->python = TRUE;
  current->protection = protection ;
  current->mtype      = mtype;
  current->virt       = virt;
  current->stat       = gstat;
  current->objc       = FALSE; //insideObjC;
  current->parent     = current_root;
  initGroupInfo(current);
}

static void newEntry()
{
  previous = current;
  current_root->addSubEntry(current);
  current = new Entry ;
  initEntry();
}

static void newVariable()
{
  if (!current->name.isEmpty() && current->name.at(0)=='_') // mark as private
  {
    current->protection=Private;
  }
  if (current_root->section&Entry::SCOPE_MASK) // mark as class variable
  {
    current->stat = TRUE;
  }
  newEntry();
}

static inline int computeIndent(const char *s)
{
  int col=0;
  static int tabSize=Config_getInt("TAB_SIZE");
  const char *p=s;
  char c;
  while ((c=*p++))
  {
    if (c==' ') col++;
    else if (c=='\t') col+=tabSize-(col%tabSize);
    else break;
  }
  return col;
}

static QCString findPackageScopeFromPath(const QCString &path)
{
  QCString *pScope = g_packageNameCache.find(path);
  if (pScope)
  {
    return *pScope;
  }
  QFileInfo pf(path+"/__init__.py"); // found package initialization file
  if (pf.exists())
  {
    int i=path.findRev('/');
    if (i!=-1)
    {
      QCString scope = findPackageScopeFromPath(path.left(i));
      if (!scope.isEmpty())
      {
	scope+="::";
      }
      scope+=path.mid(i+1);
      g_packageNameCache.insert(path,new QCString(scope));
      return scope;
    }
  }
  return "";
}
  
static QCString findPackageScope(const char *fileName)
{
  if (fileName==0) return "";
  QFileInfo fi(fileName);
  return findPackageScopeFromPath(fi.dirPath(TRUE).data());
}

//-----------------------------------------------------------------------------

static void lineCount()
{
  for( const char* c = yytext ; *c ; ++c )
    yyLineNr += (*c == '\n') ;
}

#if 0
// Appends the current-name to current-type;
// Destroys current-name.
// Destroys current->args and current->argList
static void addType( Entry* current )
{
    uint tl=current->type.length();
    if ( tl>0 && !current->name.isEmpty() && current->type.at(tl-1)!='.') 
    {
      current->type += ' ' ;
    }
    current->type += current->name ;
    current->name.resize(0) ;
    tl=current->type.length();
    if ( tl>0 && !current->args.isEmpty() && current->type.at(tl-1)!='.') 
    {
      current->type += ' ' ;
    }
    current->type += current->args ;
    current->args.resize(0) ;
    current->argList->clear();
}

static QCString stripQuotes(const char *s)
{
  QCString name;
  if (s==0 || *s==0) return name;
  name=s;
  if (name.at(0)=='"' && name.at(name.length()-1)=='"')
  {
    name=name.mid(1,name.length()-2);
  }
  return name;
}
#endif
//-----------------------------------------------------------------

//-----------------------------------------------------------------
static void startCommentBlock(bool brief)
{
  if (brief)
  {
    current->briefFile = yyFileName;
    current->briefLine = yyLineNr;
  }
  else
  {
    current->docFile = yyFileName;
    current->docLine = yyLineNr;
  }
}

/*
static void appendDocBlock() {
  previous = current;
  current_root->addSubEntry(current);
  current = new Entry;
  initEntry();
}
*/

static void handleCommentBlock(const QCString &doc,bool brief)
{
  //printf("handleCommentBlock(doc=[%s] brief=%d docBlockInBody=%d\n",
  //    doc.data(),brief,docBlockInBody);

  // TODO: Fix me
  docBlockInBody=FALSE;
  
  if (docBlockInBody && previous && !previous->doc.isEmpty())
  {
    previous->doc=previous->doc.stripWhiteSpace()+"\n\n";
  }

  int position = 0;
  bool needsEntry;
  while (parseCommentBlock(
	g_thisParser,
	(docBlockInBody && previous) ? previous : current,
	doc,     // text
	yyFileName, // file
	brief ? current->briefLine : current->docLine,   // line of block start
	docBlockInBody ? FALSE : brief, 
	docBlockJavaStyle, // javadoc style
	protection,
        position,
        needsEntry)
     ) // need to start a new entry
  {
    if (needsEntry)
    {
      newEntry();
    }
  }
  if (needsEntry)
  {
    newEntry();
  }

}

static void endOfDef()
{
  if (g_insideConstructor)
  {
    g_constructorEntry->endBodyLine = yyLineNr;
  }
  else
  {
    current->endBodyLine  = yyLineNr;
    newEntry();
  }
  g_insideConstructor = FALSE;
  g_constructorEntry = 0;
}

static inline void addToString(const char *s)
{
  if (g_copyString) (*g_copyString)+=s;
}

static void initTriDoubleQuoteBlock()
{
  docBlockContext   = YY_START;
  docBlockInBody    = FALSE;
  docBlockJavaStyle = TRUE;
  docBlock.resize(0);
  g_doubleQuote = TRUE;
  startCommentBlock(FALSE);
}

static void initTriSingleQuoteBlock()
{
  docBlockContext   = YY_START;
  docBlockInBody    = FALSE;
  docBlockJavaStyle = TRUE;
  docBlock.resize(0);
  g_doubleQuote = FALSE;
  startCommentBlock(FALSE);
}

static void initSpecialBlock()
{
  docBlockContext   = YY_START;
  docBlockInBody    = FALSE;
  docBlockJavaStyle = TRUE;
  docBrief = TRUE;
  docBlock.resize(0);
  startCommentBlock(TRUE);
}

//-----------------------------------------------------------------------------
/* ----------------------------------------------------------------- */
#undef	YY_INPUT
#define	YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);

static int yyread(char *buf,int max_size)
{
  int c=0;
  while ( c < max_size && inputString[inputPosition] )
  {
    *buf = inputString[inputPosition++] ;
    //printf("%d (%c)\n",*buf,*buf);
    c++; buf++;
  }
  return c;
}

/* start command character */
/* Main start state */
#define Search 1

/* Mid-comment states */
/* %x FuncDoubleComment */
/* %x ClassDoubleComment */
#define TryClassDocString 2

#define TripleComment 3

#define SpecialComment 4

/* Function states */
#define FunctionDec 5

#define FunctionParams 6

#define FunctionBody 7

/* Class states */
#define ClassDec 8

#define ClassInheritance 9

#define ClassCaptureIndent 10

#define ClassBody 11

/* Variable states */
#define VariableDec 12

#define VariableEnd 13

#define VariableAtom 14

/* String states */
#define SingleQuoteString 15

#define DoubleQuoteString 16

#define TripleString 17


/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif

#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif

#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif

#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif

#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif

#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif

#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines.  This will fail
 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
 * or sizeof(void*) != sizeof(int).
 */
#endif
#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif

/* Copy whatever the last rule matched to the standard output. */

#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( yy_current_buffer->yy_is_interactive ) \
		{ \
		int c = '*', n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
		  && ferror( yyin ) ) \
		YY_FATAL_ERROR( "input in flex scanner failed" );
#endif

/* No semi-colon after return; correct usage is to write "yyterminate();" -
 * we don't want an extra ';' after the "return" because that will cause
 * some compilers to complain about unreachable statements.
 */
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif

/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif

/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif

/* Code executed at the beginning of each rule, after yytext and yyleng
 * have been set up.
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif

#define YY_RULE_SETUP \
	if ( yyleng > 0 ) \
		yy_current_buffer->yy_at_bol = \
				(yytext[yyleng - 1] == '\n'); \
	YY_USER_ACTION

YY_DECL
	{
	register yy_state_type yy_current_state;
	register char *yy_cp, *yy_bp;
	register int yy_act;

#line 453 "pyscanner.l"


  /* ------------ Function recognition rules -------------- */


	if ( yy_init )
		{
		yy_init = 0;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

		if ( ! yy_start )
			yy_start = 1;	/* first start state */

		if ( ! yyin )
			yyin = stdin;

		if ( ! yyout )
			yyout = stdout;

		if ( ! yy_current_buffer )
			yy_current_buffer =
				yy_create_buffer( yyin, YY_BUF_SIZE );

		yy_load_buffer_state();
		}

	while ( 1 )		/* loops until end-of-file is reached */
		{
		yy_cp = yy_c_buf_p;

		/* Support of yytext. */
		*yy_cp = yy_hold_char;

		/* yy_bp points to the position in yy_ch_buf of the start of
		 * the current run.
		 */
		yy_bp = yy_cp;

		yy_current_state = yy_start;
		yy_current_state += YY_AT_BOL();
		yy_state_ptr = yy_state_buf;
		*yy_state_ptr++ = yy_current_state;
yy_match:
		do
			{
			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 286 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
			*yy_state_ptr++ = yy_current_state;
			++yy_cp;
			}
		while ( yy_base[yy_current_state] != 1079 );

yy_find_action:
		yy_current_state = *--yy_state_ptr;
		yy_lp = yy_accept[yy_current_state];
find_rule: /* we branch to this label when backing up */
		for ( ; ; ) /* until we find what rule we matched */
			{
			if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
				{
				yy_act = yy_acclist[yy_lp];
				if ( yy_act & YY_TRAILING_HEAD_MASK ||
				     yy_looking_for_trail_begin )
					{
					if ( yy_act == yy_looking_for_trail_begin )
						{
						yy_looking_for_trail_begin = 0;
						yy_act &= ~YY_TRAILING_HEAD_MASK;
						break;
						}
					}
				else if ( yy_act & YY_TRAILING_MASK )
					{
					yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
					yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
					}
				else
					{
					yy_full_match = yy_cp;
					yy_full_state = yy_state_ptr;
					yy_full_lp = yy_lp;
					break;
					}
				++yy_lp;
				goto find_rule;
				}
			--yy_cp;
			yy_current_state = *--yy_state_ptr;
			yy_lp = yy_accept[yy_current_state];
			}

		YY_DO_BEFORE_ACTION;


do_action:	/* This label is used only to access EOF actions. */


		switch ( yy_act )
	{ /* beginning of action switch */

case 1:
YY_RULE_SETUP
#line 459 "pyscanner.l"
{ // start of a function/method definition
      			  g_indent=computeIndent(yytext);
                          g_expectModuleDocs = FALSE;
			  current->fileName  = yyFileName;
			  current->startLine = yyLineNr;
			  current->bodyLine  = yyLineNr;
			  current->section = Entry::FUNCTION_SEC;
			  current->protection = protection = Public;
			  current->objc = FALSE;
			  current->virt = Normal;
			  current->stat = FALSE;
			  current->mtype = mtype = Method;
			  current->type.resize(0);
			  current->name.resize(0);
			  current->args.resize(0);
			  current->argList->clear();
			  BEGIN( FunctionDec );
                       }
	YY_BREAK
case 2:
YY_RULE_SETUP
#line 478 "pyscanner.l"
{  // start of a class definition
      			  g_indent=computeIndent(yytext);
                          g_expectModuleDocs = FALSE;
			  current->section = Entry::CLASS_SEC;
			  current->argList->clear();
			  current->type += "class" ;
			  current->fileName  = yyFileName;
			  current->bodyLine  = yyLineNr;

			  BEGIN( ClassDec ) ;
                       }
	YY_BREAK
case 3:
YY_RULE_SETUP
#line 490 "pyscanner.l"
{ // variable
      			g_indent=computeIndent(yytext);
      			current->section   = Entry::VARIABLE_SEC;
			current->name      = QCString(yytext).stripWhiteSpace();
			current->fileName  = yyFileName;
			current->startLine = yyLineNr;
			current->bodyLine  = yyLineNr;
			BEGIN(VariableDec);
      		      }
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 499 "pyscanner.l"
{ // start of a single quoted string
       			  g_stringContext=YY_START;
			  g_copyString=0;
                          BEGIN( SingleQuoteString );
                       }
	YY_BREAK
case 5:
YY_RULE_SETUP
#line 504 "pyscanner.l"
{ // start of a double quoted string
       			  g_stringContext=YY_START;
			  g_copyString=0;
                          BEGIN( DoubleQuoteString );
                       }
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 510 "pyscanner.l"
{ // normal comment 
      		      }
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 512 "pyscanner.l"
{ // some other identifier
		      }
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 515 "pyscanner.l"
{ // any other character...
                        // This is the major default
                        // that should catch everything
                        // else in Body.
                      }
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 521 "pyscanner.l"
{ // new line
                        lineCount();
                      }
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 525 "pyscanner.l"
{ // start of a comment block
			initTriDoubleQuoteBlock();
			BEGIN(TripleComment);
                      }
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 530 "pyscanner.l"
{ // start of a comment block
			initTriSingleQuoteBlock();
			BEGIN(TripleComment);
                      }
	YY_BREAK
case 12:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 535 "pyscanner.l"
{  // start of a special comment
			initSpecialBlock();
			BEGIN(SpecialComment);
                      }
	YY_BREAK


case 13:
YY_RULE_SETUP
#line 542 "pyscanner.l"
{
                        //fprintf(stderr,"indent %d<=%d\n",computeIndent(&yytext[1]),g_indent);
                        if (computeIndent(&yytext[1])<=g_indent) 
			{
			  int i;
			  for (i=yyleng-1;i>=0;i--)
			  {
			    unput(yytext[i]);
			  }
			  endOfDef();
                          BEGIN(Search);
			}
			else
			{
                          yyLineNr++;
			}
                      }
	YY_BREAK
case 14:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 559 "pyscanner.l"
{
			unput('\n');
			endOfDef();
                        BEGIN(Search);
      		      }
	YY_BREAK
case YY_STATE_EOF(FunctionBody):
#line 564 "pyscanner.l"
{
			endOfDef();
			yyterminate();
      		      }
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 568 "pyscanner.l"
{
                        if (g_insideConstructor)
			{
			  current->name=&yytext[5];
			  current->section=Entry::VARIABLE_SEC;
			  current->fileName  = yyFileName;
			  current->startLine = yyLineNr;
			  current->bodyLine  = yyLineNr;
			  current->type.resize(0);
			  if (!current->name.isEmpty() && current->name.at(0)=='_') // mark as private
			  {
			    current->protection=Private;
			  }
			  else
			  {
			    current->protection=Public;
			  }
			  newEntry();
			}
                      }
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 588 "pyscanner.l"
{ // skip empty line
                        yyLineNr++;
      	              }
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 591 "pyscanner.l"
{ // something at indent >0
                        if (computeIndent(yytext)<=g_indent) 
			  // jumped out of the function
			{
			  endOfDef();
                          BEGIN(Search);
			}
      		      }
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 599 "pyscanner.l"
{ // start of a single quoted string
       			g_stringContext=YY_START;
		        g_specialBlock = FALSE; 
			g_copyString=0;
                        BEGIN( SingleQuoteString );
                      }
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 605 "pyscanner.l"
{ // start of a double quoted string
       			g_stringContext=YY_START;
		        g_specialBlock = FALSE; 
			g_copyString=0;
                        BEGIN( DoubleQuoteString );
                      }
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 611 "pyscanner.l"
{ // non-special stuff
		        g_specialBlock = FALSE; 
                      }
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 614 "pyscanner.l"
{ // normal comment 
      		      }
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 616 "pyscanner.l"
{ // comment half way
                      }
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 618 "pyscanner.l"
{ yyLineNr++; }
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 619 "pyscanner.l"
{ // any character
		        g_specialBlock = FALSE; 
                      }
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 623 "pyscanner.l"
{ // start of a comment block
			initTriDoubleQuoteBlock();
			BEGIN(TripleComment);
                      }
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 628 "pyscanner.l"
{ // start of a comment block
			initTriSingleQuoteBlock();
			BEGIN(TripleComment);
                      }
	YY_BREAK
case 27:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 633 "pyscanner.l"
{  // start of a special comment
			initSpecialBlock();
			BEGIN(SpecialComment);
                      }
	YY_BREAK


case 28:
YY_RULE_SETUP
#line 642 "pyscanner.l"
{
			      //found function name
			      if (current->type.isEmpty()) 
			      {
				  current->type = "def";
			      }
			      current->name = yytext;
			      current->name = current->name.stripWhiteSpace();
			      if (!current->name.isEmpty() && current->name.at(0)=='_')
			      {
				current->protection = Private;
			      }
			      if ((current_root->section&Entry::SCOPE_MASK) && 
				  current->name=="__init__") // constructor
			      {
				g_insideConstructor = TRUE;
				g_constructorEntry = current;
				newEntry();
			      }
                            }
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 663 "pyscanner.l"
{
			       BEGIN( FunctionParams );
		            }
	YY_BREAK


case 30:
YY_RULE_SETUP
#line 669 "pyscanner.l"
{
                        }
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 672 "pyscanner.l"
{ // Name of parameter
			  lineCount();
			  Argument *a = new Argument;
			  current->argList->append(a);
			  current->argList->getLast()->name = QCString(yytext).stripWhiteSpace();
			  current->argList->getLast()->type = "";
                        }
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 679 "pyscanner.l"
{ // default value
                          // TODO: this rule is too simple, need to be able to
                          // match things like =")" as well!
      			  QCString defVal=&yytext[1];
			  if (current->argList->getLast())
			  {
			    current->argList->getLast()->defval=defVal.stripWhiteSpace();
			  }
      			}
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 689 "pyscanner.l"
{ // end of parameter list
                        }
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 692 "pyscanner.l"
{
	  		  lineCount();
			  g_specialBlock = TRUE; // expecting a docstring

                          BEGIN( FunctionBody );
                        }
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 699 "pyscanner.l"
{ // Default rule inside arguments.
                        }
	YY_BREAK


case 36:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 706 "pyscanner.l"
{ // new def at indent 0
                        yyLineNr++;
			endOfDef();
                        BEGIN(Search);
                      }
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 711 "pyscanner.l"
{ // skip empty line
      		        current->program+=yytext;
                        yyLineNr++;
      	              }
	YY_BREAK
case YY_STATE_EOF(ClassBody):
#line 715 "pyscanner.l"
{
			endOfDef();
			yyterminate();
      		      }
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 719 "pyscanner.l"
{ // something at indent >0
                        if (computeIndent(yytext)<=g_indent) 
			  // jumped out of the class
			{
			  endOfDef();
			  g_indent=computeIndent(yytext);
                          BEGIN(Search);
			}
			else
			{
      		          current->program+=yytext;
			}
      		      }
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 732 "pyscanner.l"
{ // start of a single quoted string
      		        current->program+=*yytext;
       			g_stringContext=YY_START;
		        g_specialBlock = FALSE; 
			g_copyString=&current->program;
                        BEGIN( SingleQuoteString );
                      }
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 739 "pyscanner.l"
{ // start of a double quoted string
      		        current->program+=*yytext;
       			g_stringContext=YY_START;
		        g_specialBlock = FALSE; 
			g_copyString=&current->program;
                        BEGIN( DoubleQuoteString );
                      }
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 746 "pyscanner.l"
{ // non-special stuff
      		        current->program+=yytext;
		        g_specialBlock = FALSE; 
                      }
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 750 "pyscanner.l"
{ // normal comment 
      		        current->program+=yytext;
      		      }
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 753 "pyscanner.l"
{ 
      		        current->program+=*yytext;
			yyLineNr++; 
		      }
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 757 "pyscanner.l"
{ // any character
		        g_specialBlock = FALSE; 
      		        current->program+=*yytext;
                      }
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 761 "pyscanner.l"
{ // start of a comment block
      		        current->program+=yytext;
			initTriDoubleQuoteBlock();
			BEGIN(TripleComment);
                      }
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 767 "pyscanner.l"
{ // start of a comment block
      		        current->program+=yytext;
			initTriSingleQuoteBlock();
			BEGIN(TripleComment);
                      }
	YY_BREAK

case 47:
YY_RULE_SETUP
#line 775 "pyscanner.l"
{
			  if (current->type.isEmpty()) 
			  {
			      current->type = "class";
			  }

			  current->section = Entry::CLASS_SEC;
			  current->name = yytext;

			  // prepend scope in case of nested classes
			  if (current_root->section&Entry::SCOPE_MASK)
			  {
			    current->name.prepend(current_root->name+"::");
			  }
			  
			  current->name = current->name.stripWhiteSpace();
			  current->fileName = yyFileName;        
			  docBlockContext   = YY_START;
			  docBlockInBody    = FALSE;
			  docBlockJavaStyle = FALSE;
			  docBlock.resize(0);

			  BEGIN(ClassInheritance);                 
                        }
	YY_BREAK

case 48:
YY_RULE_SETUP
#line 801 "pyscanner.l"
{ // syntactic sugar for the list
                       }
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 804 "pyscanner.l"
{ // begin of the class definition
			 g_specialBlock = TRUE; // expecting a docstring
      			 BEGIN(ClassCaptureIndent);
                       }
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 809 "pyscanner.l"
{
                         current->extends->append(
					      new BaseInfo(yytext,Public,Normal)
					    );
                         //Has base class-do stuff
                       }
	YY_BREAK


case 51:
YY_RULE_SETUP
#line 819 "pyscanner.l"
{
                                 // Blankline - ignore, keep looking for indentation.
				 lineCount();
                               }
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 824 "pyscanner.l"
{ // start of a comment block
				 initTriDoubleQuoteBlock();
			 	 BEGIN(TripleComment);
                      	       }
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 829 "pyscanner.l"
{ // start of a comment block
			         initTriSingleQuoteBlock();
			         BEGIN(TripleComment);
                               }
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 834 "pyscanner.l"
{
                                 // Remember indentation level for later funcs
      				 current->program=yytext;
			         current->startLine = yyLineNr;
				 //printf("current->program=[%s]\n",current->program.data());
				 BEGIN( ClassBody );
                               }
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 842 "pyscanner.l"
{
				 
				 // Just pushback an empty class, and
				 // resume parsing the body.
                                 newEntry();

				 // printf("Failed to find indent - skipping!");
				 BEGIN( Search );
                               }
	YY_BREAK


case 56:
YY_RULE_SETUP
#line 855 "pyscanner.l"
{ // the assignment operator
                      }
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 857 "pyscanner.l"
{ // spaces
	              }
	YY_BREAK
case 58:
YY_RULE_SETUP
#line 859 "pyscanner.l"
{ // integer value
			current->type = "int";
			current->initializer = yytext;
			BEGIN(VariableEnd);
		      }
	YY_BREAK
case 59:
YY_RULE_SETUP
#line 864 "pyscanner.l"
{ // floating point value
			current->type = "float";
			current->initializer = yytext;
			BEGIN(VariableEnd);
		      }
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 869 "pyscanner.l"
{ // string
			current->type = "string";
			current->initializer = yytext;
			g_copyString=&current->initializer;
       			g_stringContext=VariableEnd;
                        BEGIN( SingleQuoteString );
     		      }
	YY_BREAK
case 61:
YY_RULE_SETUP
#line 876 "pyscanner.l"
{ // string
			current->type = "string";
			current->initializer = yytext;
			g_copyString=&current->initializer;
       			g_stringContext=VariableEnd;
                        BEGIN( DoubleQuoteString );
     		      }
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 883 "pyscanner.l"
{ // start of a comment block
			current->type = "string";
			g_doubleQuote=TRUE;
			g_copyString=&current->initializer;
       			g_stringContext=VariableEnd;
			BEGIN(TripleString);
                      }
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 891 "pyscanner.l"
{ // start of a comment block
			current->type = "string";
			g_doubleQuote=FALSE;
			g_copyString=&current->initializer;
       			g_stringContext=VariableEnd;
			BEGIN(TripleString);
                      }
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 898 "pyscanner.l"
{ // typle
			current->type = "tuple";
      		        current->initializer+=*yytext;
                        g_atomStart='(';
			g_atomEnd=')';
			g_atomCount=1;
			BEGIN( VariableAtom );
                      }
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 906 "pyscanner.l"
{ // list
			current->type = "list";
      		        current->initializer+=*yytext;
                        g_atomStart='[';
			g_atomEnd=']';
			g_atomCount=1;
			BEGIN( VariableAtom );
                      }
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 914 "pyscanner.l"
{ // dictionary
			current->type = "dictionary";
      		        current->initializer+=*yytext;
                        g_atomStart='{';
			g_atomEnd='}';
			g_atomCount=1;
			BEGIN( VariableAtom );
                      }
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 922 "pyscanner.l"
{ // comment
                        BEGIN( VariableEnd ); 
                      }
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 925 "pyscanner.l"
{
      		        current->initializer+=*yytext;
                      }
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 928 "pyscanner.l"
{
     		        unput('\n');
     			BEGIN( VariableEnd );
     		      }
	YY_BREAK


case 70:
YY_RULE_SETUP
#line 935 "pyscanner.l"
{
      		        current->initializer+=*yytext;
                        if (g_atomStart==*yytext)
			{
			  g_atomCount++;
			}
                      }
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 942 "pyscanner.l"
{
      		        current->initializer+=*yytext;
                        if (g_atomEnd==*yytext)
			{
			  g_atomCount--;
			}
			if (g_atomCount==0)
			{
			  BEGIN(VariableEnd);
			}
                      }
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 953 "pyscanner.l"
{
      		        current->initializer+=yytext;
	              }
	YY_BREAK
case 73:
YY_RULE_SETUP
#line 956 "pyscanner.l"
{
      		        current->initializer+=*yytext;
                      }
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 959 "pyscanner.l"
{
      		        current->initializer+=*yytext;
     			yyLineNr++;
     		      }
	YY_BREAK


case 75:
YY_RULE_SETUP
#line 967 "pyscanner.l"
{
                        yyLineNr++;
			newVariable();
                        BEGIN(Search);
                      }
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 972 "pyscanner.l"
{ 
                        unput(*yytext);
			newVariable();
                        BEGIN(Search);
      		      }
	YY_BREAK
case YY_STATE_EOF(VariableEnd):
#line 977 "pyscanner.l"
{ yyterminate();
                        newEntry();
                      }
	YY_BREAK


case 77:
#line 984 "pyscanner.l"
case 78:
YY_RULE_SETUP
#line 984 "pyscanner.l"
{
			  //printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock);
			  if (g_doubleQuote==(yytext[0]=='"')) 
			  {
			    if (g_specialBlock || g_expectModuleDocs)
			    {
			      QCString actualDoc=docBlock;
			      actualDoc.prepend("\\verbatim ");
			      actualDoc.append("\\endverbatim ");
			      if (g_expectModuleDocs)
			      {
				actualDoc.prepend("\\file \\_linebr ");
			      }
			      handleCommentBlock(actualDoc, FALSE);
			    }
		    	    g_expectModuleDocs=FALSE;
			    if (docBlockContext==ClassBody)
			    {
			      current->program+=docBlock;
			      current->program+=yytext;
			    }
			    BEGIN(docBlockContext);
			  }
                          else 
			  {
                            docBlock += yytext;
                          }
                        }
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 1014 "pyscanner.l"
{
			  lineCount();
			  docBlock += yytext;
                        }
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 1018 "pyscanner.l"
{
      			  yyLineNr++;
			  docBlock += yytext;
      			}
	YY_BREAK
case 81:
YY_RULE_SETUP
#line 1022 "pyscanner.l"
{
			  docBlock += yytext;
      			}
	YY_BREAK


case 82:
YY_RULE_SETUP
#line 1028 "pyscanner.l"
{ // skip leading hashes
      			}
	YY_BREAK
case 83:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 1030 "pyscanner.l"
{ // continuation of the comment on the next line
      			  docBlock+='\n';
			  docBrief = FALSE;
                          startCommentBlock(FALSE);
			  yyLineNr++;
      			}
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 1036 "pyscanner.l"
{ // any other stuff
      			  docBlock+=yytext;
      			}
	YY_BREAK
case 85:
YY_RULE_SETUP
#line 1039 "pyscanner.l"
{ // new line that ends the comment
			  handleCommentBlock(docBlock, docBrief);
      			  yyLineNr++;
			  BEGIN(docBlockContext);
      			}
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 1044 "pyscanner.l"
{ // anything we missed
      			  docBlock+=*yytext;
      			}
	YY_BREAK


case 87:
YY_RULE_SETUP
#line 1050 "pyscanner.l"
{ // line continuation
      			         addToString(yytext);
      				 yyLineNr++;
                               }
	YY_BREAK
case 88:
YY_RULE_SETUP
#line 1054 "pyscanner.l"
{ // espaced char
      			         addToString(yytext);
                               }
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 1057 "pyscanner.l"
{ // tripple double quotes
      			         addToString(yytext);
      			       }
	YY_BREAK
case 90:
YY_RULE_SETUP
#line 1060 "pyscanner.l"
{ // end of the string
      			         addToString(yytext);
      		                 BEGIN(g_stringContext);
                               }
	YY_BREAK
case 91:
YY_RULE_SETUP
#line 1064 "pyscanner.l"
{ // normal chars
      			         addToString(yytext);
                               }
	YY_BREAK
case 92:
YY_RULE_SETUP
#line 1067 "pyscanner.l"
{ // normal char
      			         addToString(yytext);
                               }
	YY_BREAK


case 93:
YY_RULE_SETUP
#line 1073 "pyscanner.l"
{ // line continuation
      			         addToString(yytext);
      				 yyLineNr++;
                               }
	YY_BREAK
case 94:
YY_RULE_SETUP
#line 1077 "pyscanner.l"
{ // espaced char
      			         addToString(yytext);
                               }
	YY_BREAK
case 95:
YY_RULE_SETUP
#line 1080 "pyscanner.l"
{ // tripple single quotes
      			         addToString(yytext);
      			       }
	YY_BREAK
case 96:
YY_RULE_SETUP
#line 1083 "pyscanner.l"
{ // end of the string
      			         addToString(yytext);
      		                 BEGIN(g_stringContext);
                               }
	YY_BREAK
case 97:
YY_RULE_SETUP
#line 1087 "pyscanner.l"
{ // normal chars
      			         addToString(yytext);
                               }
	YY_BREAK
case 98:
YY_RULE_SETUP
#line 1090 "pyscanner.l"
{ // normal char
      			         addToString(yytext);
                               }
	YY_BREAK


case 99:
#line 1097 "pyscanner.l"
case 100:
YY_RULE_SETUP
#line 1097 "pyscanner.l"
{
                          *g_copyString += yytext;
			  //printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock);
			  if (g_doubleQuote==(yytext[0]=='"')) 
			  {
			    BEGIN(docBlockContext);
			  }
                        }
	YY_BREAK
case 101:
YY_RULE_SETUP
#line 1107 "pyscanner.l"
{
			  lineCount();
                          *g_copyString += yytext;
                        }
	YY_BREAK
case 102:
YY_RULE_SETUP
#line 1111 "pyscanner.l"
{
      			  yyLineNr++;
                          *g_copyString += yytext;
      			}
	YY_BREAK
case 103:
YY_RULE_SETUP
#line 1115 "pyscanner.l"
{
                          *g_copyString += *yytext;
      			}
	YY_BREAK

/* ------------ End rules -------------- */
/*
<*>({NONEMPTY}|{EXPCHAR}|{BB})           { // This should go one character at a time.
				 // printf("[pyscanner] '%s' [ state %d ]  [line %d] no match\n",
				 //       yytext, YY_START, yyLineNr);

                               }
  */
case 104:
YY_RULE_SETUP
#line 1130 "pyscanner.l"
{
				 //printf("[pyscanner] %d NEWLINE [line %d] no match\n",
				 //       YY_START, yyLineNr);

                                 lineCount();
                               }
	YY_BREAK
case 105:
YY_RULE_SETUP
#line 1137 "pyscanner.l"
{
				 //printf("[pyscanner] '%s' [ state %d ]  [line %d] no match\n",
				 //       yytext, YY_START, yyLineNr);

                               }
	YY_BREAK
case 106:
YY_RULE_SETUP
#line 1144 "pyscanner.l"
ECHO;
	YY_BREAK
			case YY_STATE_EOF(INITIAL):
			case YY_STATE_EOF(Search):
			case YY_STATE_EOF(TryClassDocString):
			case YY_STATE_EOF(TripleComment):
			case YY_STATE_EOF(SpecialComment):
			case YY_STATE_EOF(FunctionDec):
			case YY_STATE_EOF(FunctionParams):
			case YY_STATE_EOF(ClassDec):
			case YY_STATE_EOF(ClassInheritance):
			case YY_STATE_EOF(ClassCaptureIndent):
			case YY_STATE_EOF(VariableDec):
			case YY_STATE_EOF(VariableAtom):
			case YY_STATE_EOF(SingleQuoteString):
			case YY_STATE_EOF(DoubleQuoteString):
			case YY_STATE_EOF(TripleString):
				yyterminate();

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */
		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*yy_cp = yy_hold_char;
		YY_RESTORE_YY_MORE_OFFSET

		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
			{
			/* We're scanning a new file or input source.  It's
			 * possible that this happened because the user
			 * just pointed yyin at a new source and called
			 * yylex().  If so, then we have to assure
			 * consistency between yy_current_buffer and our
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */
			yy_n_chars = yy_current_buffer->yy_n_chars;
			yy_current_buffer->yy_input_file = yyin;
			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
			}

		/* Note that here we test for yy_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since yy_c_buf_p will
		 * already have been incremented past the NUL character
		 * (since all states make transitions on EOB to the
		 * end-of-buffer state).  Contrast this with the test
		 * in input().
		 */
		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;

			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state();

			/* Okay, we're now positioned to make the NUL
			 * transition.  We couldn't have
			 * yy_get_previous_state() go ahead and do it
			 * for us because it doesn't know how to deal
			 * with the possibility of jamming (and we don't
			 * want to build jamming into it because then it
			 * will run more slowly).
			 */

			yy_next_state = yy_try_NUL_trans( yy_current_state );

			yy_bp = yytext_ptr + YY_MORE_ADJ;

			if ( yy_next_state )
				{
				/* Consume the NUL. */
				yy_cp = ++yy_c_buf_p;
				yy_current_state = yy_next_state;
				goto yy_match;
				}

			else
				{
				yy_cp = yy_c_buf_p;
				goto yy_find_action;
				}
			}

		else switch ( yy_get_next_buffer() )
			{
			case EOB_ACT_END_OF_FILE:
				{
				yy_did_buffer_switch_on_eof = 0;

				if ( yywrap() )
					{
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

				else
					{
					if ( ! yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
					}
				break;
				}

			case EOB_ACT_CONTINUE_SCAN:
				yy_c_buf_p =
					yytext_ptr + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state();

				yy_cp = yy_c_buf_p;
				yy_bp = yytext_ptr + YY_MORE_ADJ;
				goto yy_match;

			case EOB_ACT_LAST_MATCH:
				yy_c_buf_p =
				&yy_current_buffer->yy_ch_buf[yy_n_chars];

				yy_current_state = yy_get_previous_state();

				yy_cp = yy_c_buf_p;
				yy_bp = yytext_ptr + YY_MORE_ADJ;
				goto yy_find_action;
			}
		break;
		}

	default:
		YY_FATAL_ERROR(
			"fatal flex scanner internal error--no action found" );
	} /* end of action switch */
		} /* end of scanning one token */
	} /* end of yylex */


/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */

static int yy_get_next_buffer()
	{
	register char *dest = yy_current_buffer->yy_ch_buf;
	register char *source = yytext_ptr;
	register int number_to_move, i;
	int ret_val;

	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( yy_current_buffer->yy_fill_buffer == 0 )
		{ /* Don't try to fill the buffer, so this is an EOF. */
		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
			{
			/* We matched a single character, the EOB, so
			 * treat this as a final EOF.
			 */
			return EOB_ACT_END_OF_FILE;
			}

		else
			{
			/* We matched some text prior to the EOB, first
			 * process it.
			 */
			return EOB_ACT_LAST_MATCH;
			}
		}

	/* Try to read more data. */

	/* First move last chars to start of buffer. */
	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;

	for ( i = 0; i < number_to_move; ++i )
		*(dest++) = *(source++);

	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
		/* don't do the read, it's not guaranteed to return an EOF,
		 * just force an EOF
		 */
		yy_current_buffer->yy_n_chars = yy_n_chars = 0;

	else
		{
		int num_to_read =
			yy_current_buffer->yy_buf_size - number_to_move - 1;

		while ( num_to_read <= 0 )
			{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
			YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else

			/* just a shorter name for the current buffer */
			YY_BUFFER_STATE b = yy_current_buffer;

			int yy_c_buf_p_offset =
				(int) (yy_c_buf_p - b->yy_ch_buf);

			if ( b->yy_is_our_buffer )
				{
				int new_size = b->yy_buf_size * 2;

				if ( new_size <= 0 )
					b->yy_buf_size += b->yy_buf_size / 8;
				else
					b->yy_buf_size *= 2;

				b->yy_ch_buf = (char *)
					/* Include room in for 2 EOB chars. */
					yy_flex_realloc( (void *) b->yy_ch_buf,
							 b->yy_buf_size + 2 );
				}
			else
				/* Can't grow it, we don't own it. */
				b->yy_ch_buf = 0;

			if ( ! b->yy_ch_buf )
				YY_FATAL_ERROR(
				"fatal error - scanner input buffer overflow" );

			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];

			num_to_read = yy_current_buffer->yy_buf_size -
						number_to_move - 1;
#endif
			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

		/* Read in more data. */
		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
			yy_n_chars, num_to_read );

		yy_current_buffer->yy_n_chars = yy_n_chars;
		}

	if ( yy_n_chars == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			yyrestart( yyin );
			}

		else
			{
			ret_val = EOB_ACT_LAST_MATCH;
			yy_current_buffer->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	yy_n_chars += number_to_move;
	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;

	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];

	return ret_val;
	}


/* yy_get_previous_state - get the state just before the EOB char was reached */

static yy_state_type yy_get_previous_state()
	{
	register yy_state_type yy_current_state;
	register char *yy_cp;

	yy_current_state = yy_start;
	yy_current_state += YY_AT_BOL();
	yy_state_ptr = yy_state_buf;
	*yy_state_ptr++ = yy_current_state;

	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
		{
		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 286 )
				yy_c = yy_meta[(unsigned int) yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
		*yy_state_ptr++ = yy_current_state;
		}

	return yy_current_state;
	}


/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */

#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
	{
	register int yy_is_jam;

	register YY_CHAR yy_c = 1;
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 286 )
			yy_c = yy_meta[(unsigned int) yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
	yy_is_jam = (yy_current_state == 285);
	if ( ! yy_is_jam )
		*yy_state_ptr++ = yy_current_state;

	return yy_is_jam ? 0 : yy_current_state;
	}


#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
	{
	register char *yy_cp = yy_c_buf_p;

	/* undo effects of setting up yytext */
	*yy_cp = yy_hold_char;

	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
		{ /* need to shift things up to make room */
		/* +2 for EOB chars. */
		register int number_to_move = yy_n_chars + 2;
		register char *dest = &yy_current_buffer->yy_ch_buf[
					yy_current_buffer->yy_buf_size + 2];
		register char *source =
				&yy_current_buffer->yy_ch_buf[number_to_move];

		while ( source > yy_current_buffer->yy_ch_buf )
			*--dest = *--source;

		yy_cp += (int) (dest - source);
		yy_bp += (int) (dest - source);
		yy_current_buffer->yy_n_chars =
			yy_n_chars = yy_current_buffer->yy_buf_size;

		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
			YY_FATAL_ERROR( "flex scanner push-back overflow" );
		}

	*--yy_cp = (char) c;


	yytext_ptr = yy_bp;
	yy_hold_char = *yy_cp;
	yy_c_buf_p = yy_cp;
	}
#endif	/* ifndef YY_NO_UNPUT */


#ifdef __cplusplus
static int yyinput()
#else
static int input()
#endif
	{
	int c;

	*yy_c_buf_p = yy_hold_char;

	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
		{
		/* yy_c_buf_p now points to the character we want to return.
		 * If this occurs *before* the EOB characters, then it's a
		 * valid NUL; if not, then we've hit the end of the buffer.
		 */
		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
			/* This was really a NUL. */
			*yy_c_buf_p = '\0';

		else
			{ /* need more input */
			int offset = yy_c_buf_p - yytext_ptr;
			++yy_c_buf_p;

			switch ( yy_get_next_buffer() )
				{
				case EOB_ACT_LAST_MATCH:
					/* This happens because yy_g_n_b()
					 * sees that we've accumulated a
					 * token and flags that we need to
					 * try matching the token before
					 * proceeding.  But for input(),
					 * there's no matching to consider.
					 * So convert the EOB_ACT_LAST_MATCH
					 * to EOB_ACT_END_OF_FILE.
					 */

					/* Reset buffer status. */
					yyrestart( yyin );

					/* fall through */

				case EOB_ACT_END_OF_FILE:
					{
					if ( yywrap() )
						return EOF;

					if ( ! yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
#ifdef __cplusplus
					return yyinput();
#else
					return input();
#endif
					}

				case EOB_ACT_CONTINUE_SCAN:
					yy_c_buf_p = yytext_ptr + offset;
					break;
				}
			}
		}

	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
	*yy_c_buf_p = '\0';	/* preserve yytext */
	yy_hold_char = *++yy_c_buf_p;

	yy_current_buffer->yy_at_bol = (c == '\n');

	return c;
	}


#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
	{
	if ( ! yy_current_buffer )
		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );

	yy_init_buffer( yy_current_buffer, input_file );
	yy_load_buffer_state();
	}


#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
	{
	if ( yy_current_buffer == new_buffer )
		return;

	if ( yy_current_buffer )
		{
		/* Flush out information for old buffer. */
		*yy_c_buf_p = yy_hold_char;
		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
		yy_current_buffer->yy_n_chars = yy_n_chars;
		}

	yy_current_buffer = new_buffer;
	yy_load_buffer_state();

	/* We don't actually know whether we did this switch during
	 * EOF (yywrap()) processing, but the only time this flag
	 * is looked at is after yywrap() is called, so it's safe
	 * to go ahead and always set it.
	 */
	yy_did_buffer_switch_on_eof = 1;
	}


#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
	{
	yy_n_chars = yy_current_buffer->yy_n_chars;
	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
	yyin = yy_current_buffer->yy_input_file;
	yy_hold_char = *yy_c_buf_p;
	}


#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
	{
	YY_BUFFER_STATE b;

	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

	b->yy_buf_size = size;

	/* yy_ch_buf has to be 2 characters longer than the size given because
	 * we need to put in 2 end-of-buffer characters.
	 */
	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

	b->yy_is_our_buffer = 1;

	yy_init_buffer( b, file );

	return b;
	}


#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
	{
	if ( ! b )
		return;

	if ( b == yy_current_buffer )
		yy_current_buffer = (YY_BUFFER_STATE) 0;

	if ( b->yy_is_our_buffer )
		yy_flex_free( (void *) b->yy_ch_buf );

	yy_flex_free( (void *) b );
	}


#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
extern int isatty YY_PROTO(( int ));
#endif
#endif

#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif


	{
	yy_flush_buffer( b );

	b->yy_input_file = file;
	b->yy_fill_buffer = 1;

#if YY_ALWAYS_INTERACTIVE
	b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
	b->yy_is_interactive = 0;
#else
	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
	}


#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif

	{
	if ( ! b )
		return;

	b->yy_n_chars = 0;

	/* We always need two end-of-buffer characters.  The first causes
	 * a transition to the end-of-buffer state.  The second causes
	 * a jam in that state.
	 */
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->yy_buf_pos = &b->yy_ch_buf[0];

	b->yy_at_bol = 1;
	b->yy_buffer_status = YY_BUFFER_NEW;

	if ( b == yy_current_buffer )
		yy_load_buffer_state();
	}


#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
	{
	YY_BUFFER_STATE b;

	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return 0;

	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );

	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
	b->yy_buf_pos = b->yy_ch_buf = base;
	b->yy_is_our_buffer = 0;
	b->yy_input_file = 0;
	b->yy_n_chars = b->yy_buf_size;
	b->yy_is_interactive = 0;
	b->yy_at_bol = 1;
	b->yy_fill_buffer = 0;
	b->yy_buffer_status = YY_BUFFER_NEW;

	yy_switch_to_buffer( b );

	return b;
	}
#endif


#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
	{
	int len;
	for ( len = 0; yy_str[len]; ++len )
		;

	return yy_scan_bytes( yy_str, len );
	}
#endif


#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
	{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	int i;

	/* Get memory for full buffer, including space for trailing EOB's. */
	n = len + 2;
	buf = (char *) yy_flex_alloc( n );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );

	for ( i = 0; i < len; ++i )
		buf[i] = bytes[i];

	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;

	b = yy_scan_buffer( buf, n );
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );

	/* It's okay to grow etc. this buffer, and we should throw it
	 * away when we're done.
	 */
	b->yy_is_our_buffer = 1;

	return b;
	}
#endif


#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
	{
	if ( yy_start_stack_ptr >= yy_start_stack_depth )
		{
		yy_size_t new_size;

		yy_start_stack_depth += YY_START_STACK_INCR;
		new_size = yy_start_stack_depth * sizeof( int );

		if ( ! yy_start_stack )
			yy_start_stack = (int *) yy_flex_alloc( new_size );

		else
			yy_start_stack = (int *) yy_flex_realloc(
					(void *) yy_start_stack, new_size );

		if ( ! yy_start_stack )
			YY_FATAL_ERROR(
			"out of memory expanding start-condition stack" );
		}

	yy_start_stack[yy_start_stack_ptr++] = YY_START;

	BEGIN(new_state);
	}
#endif


#ifndef YY_NO_POP_STATE
static void yy_pop_state()
	{
	if ( --yy_start_stack_ptr < 0 )
		YY_FATAL_ERROR( "start-condition stack underflow" );

	BEGIN(yy_start_stack[yy_start_stack_ptr]);
	}
#endif


#ifndef YY_NO_TOP_STATE
static int yy_top_state()
	{
	return yy_start_stack[yy_start_stack_ptr - 1];
	}
#endif

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
	{
	(void) fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
	}



/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
		yytext[yyleng] = yy_hold_char; \
		yy_c_buf_p = yytext + n; \
		yy_hold_char = *yy_c_buf_p; \
		*yy_c_buf_p = '\0'; \
		yyleng = n; \
		} \
	while ( 0 )


/* Internal utility routines. */

#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
#else
static void yy_flex_strncpy( s1, s2, n )
char *s1;
yyconst char *s2;
int n;
#endif
	{
	register int i;
	for ( i = 0; i < n; ++i )
		s1[i] = s2[i];
	}
#endif

#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
static int yy_flex_strlen( yyconst char *s )
#else
static int yy_flex_strlen( s )
yyconst char *s;
#endif
	{
	register int n;
	for ( n = 0; s[n]; ++n )
		;

	return n;
	}
#endif


#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
	{
	return (void *) malloc( size );
	}

#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
	{
	/* The cast to (char *) in the following accommodates both
	 * implementations that use char* generic pointers, and those
	 * that use void* generic pointers.  It works with the latter
	 * because both ANSI C and C++ allow castless assignment from
	 * any pointer type to void*, and deal with argument conversions
	 * as though doing an assignment.
	 */
	return (void *) realloc( (char *) ptr, size );
	}

#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
	{
	free( ptr );
	}

#if YY_MAIN
int main()
	{
	yylex();
	return 0;
	}
#endif
#line 1144 "pyscanner.l"


//----------------------------------------------------------------------------

static void parseCompounds(Entry *rt)
{
  //printf("parseCompounds(%s)\n",rt->name.data());
  EntryListIterator eli(*rt->sublist);
  Entry *ce;
  for (;(ce=eli.current());++eli)
  {
    if (!ce->program.isEmpty())
    {
      //printf("-- %s ---------\n%s\n---------------\n",
      //  ce->name.data(),ce->program.data());
      // init scanner state
      inputString = ce->program;
      inputPosition = 0;
      pyscanYYrestart( pyscanYYin ) ;
      BEGIN( Search ) ;
      current_root = ce ;
      yyFileName = ce->fileName;
      yyLineNr = ce->startLine ;
      if (current) delete current;
      current = new Entry;

      groupEnterCompound(yyFileName,yyLineNr,ce->name);
      
      pyscanYYlex() ;
      delete current; current=0;
      ce->program.resize(0);

      groupLeaveCompound(yyFileName,yyLineNr,ce->name);

    }
    parseCompounds(ce);
  }
}

//----------------------------------------------------------------------------


static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
{
  initParser();

  inputString = fileBuf;
  inputPosition = 0;

  protection    = Public;
  mtype         = Method;
  gstat         = FALSE;
  virt          = Normal;
  current_root  = rt;
  g_expectModuleDocs = TRUE;
  g_specialBlock = FALSE;
  g_insideConstructor = FALSE;


  inputFile.setName(fileName);
  if (inputFile.open(IO_ReadOnly))
  {
    yyLineNr= 1 ; 
    yyFileName = fileName;
    //setContext();
    msg("Parsing file %s...\n",yyFileName.data());

    QFileInfo fi(fileName);
    QCString moduleScope = findPackageScope(fileName);
    if (!moduleScope.isEmpty())
    {
      moduleScope+="::";
    }
    moduleScope+=fi.baseName();

    current            = new Entry;
    current->name      = moduleScope;
    current->section   = Entry::NAMESPACE_SEC;
    current->type      = "namespace";
    current->fileName  = yyFileName;
    current->startLine = yyLineNr;
    current->bodyLine  = yyLineNr;

    rt->addSubEntry(current);

    current_root  = current ;
    initParser();
    current       = new Entry;

    // Set the python flags
    //current_root->python = TRUE;
    //current->python = TRUE;

    groupEnterFile(yyFileName,yyLineNr);
    
    current->reset();
    pyscanYYrestart( pyscanYYin );
    BEGIN( Search );
    pyscanYYlex();

    groupLeaveFile(yyFileName,yyLineNr);

    current_root->program.resize(0);
    delete current; current=0;

    parseCompounds(current_root);

    inputFile.close();
  }
  
}

//----------------------------------------------------------------------------

static void parsePrototype(const QCString &text)
{
  //printf("**** parsePrototype(%s) begin\n",text.data());

  g_expectModuleDocs = FALSE;
  g_specialBlock = FALSE;
  g_insideConstructor = FALSE;

  const char *orgInputString;
  int orgInputPosition;
  YY_BUFFER_STATE orgState;
  
  // save scanner state
  orgState = YY_CURRENT_BUFFER;
  yy_switch_to_buffer(yy_create_buffer(pyscanYYin, YY_BUF_SIZE));
  orgInputString = inputString; 
  orgInputPosition = inputPosition;

  // set new string
  inputString = text;
  inputPosition = 0;
  pyscanYYrestart( pyscanYYin );

  BEGIN( Search );

  pyscanYYlex();

  current->name = current->name.stripWhiteSpace();
  if (current->section == Entry::MEMBERDOC_SEC && current->args.isEmpty())
    current->section = Entry::VARIABLEDOC_SEC;

  // restore original scanner state
  yy_switch_to_buffer(orgState);
  inputString = orgInputString; 
  inputPosition = orgInputPosition;

  //printf("**** parsePrototype end\n");
}

//----------------------------------------------------------------------------

void PythonLanguageScanner::parseInput(const char *fileName,const char *fileBuf,Entry *root)
{
  g_thisParser = this;
  ::parseMain(fileName,fileBuf,root);

  // May print the AST for debugging purposes
  // printAST(global_root);
}

bool PythonLanguageScanner::needsPreprocessing(const QCString &)
{
  return FALSE;
}

void PythonLanguageScanner::parseCode(CodeOutputInterface &codeOutIntf,
    const char *scopeName,
    const QCString &input,
    bool isExampleBlock,
    const char *exampleName,
    FileDef *fileDef,
    int startLine,
    int endLine,
    bool inlineFragment,
    MemberDef *memberDef
    )
{
  ::parsePythonCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
                    fileDef,startLine,endLine,inlineFragment,memberDef);
}

void PythonLanguageScanner::parsePrototype(const char *text)
{
  ::parsePrototype(text);

}

void PythonLanguageScanner::resetCodeParserState()
{
  ::resetPythonCodeParserState();
}

//----------------------------------------------------------------------------

#if !defined(YY_FLEX_SUBMINOR_VERSION) 
//----------------------------------------------------------------------------
extern "C" { // some bogus code to keep the compiler happy
  void pyscannerYYdummy() { yy_flex_realloc(0,0); } 
}
#endif

