#define yy_create_buffer preYY_create_buffer
#define yy_delete_buffer preYY_delete_buffer
#define yy_scan_buffer preYY_scan_buffer
#define yy_scan_string preYY_scan_string
#define yy_scan_bytes preYY_scan_bytes
#define yy_flex_debug preYY_flex_debug
#define yy_init_buffer preYY_init_buffer
#define yy_flush_buffer preYY_flush_buffer
#define yy_load_buffer_state preYY_load_buffer_state
#define yy_switch_to_buffer preYY_switch_to_buffer
#define yyin preYYin
#define yyleng preYYleng
#define yylex preYYlex
#define yyout preYYout
#define yyrestart preYYrestart
#define yytext preYYtext

/* A lexical scanner generated by flex */

/* Scanner skeleton version:
 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern 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 16384

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 118
#define YY_END_OF_BUFFER 119
static yyconst short int yy_acclist[771] =
    {   0,
      101,  101,  119,  117,  118,    1,  117,  118,  116,  118,
        3,  117,  118,  117,  118,    2,  117,  118,    5,  117,
      118,    1,    5,  117,  118,    5,  117,  118,    5,  116,
      118,    3,    5,  117,  118,    4,  117,  118,    5,  117,
      118,    2,    5,  117,  118,   36,  117,  118,    1,   36,
      117,  118,   33,  116,  118,    3,   36,  117,  118,   36,
      117,  118,   34,   36,  117,  118,   34,   36,  117,  118,
       34,   36,  117,  118,   34,   36,  117,  118,   34,   36,
      117,  118,    2,   36,  117,  118,   58,  117,  118,    1,
       58,  117,  118,   56,  116,  118,    3,   58,  117,  118,

       58,  117,  118,   57,   58,  117,  118,   57,   58,  117,
      118,   57,   58,  117,  118,    2,   58,  117,  118,   59,
       60,  117,  118,    1,   59,   60,  117,  118,   63,  116,
      118,    3,   59,   60,  117,  118,   60,  117,  118,    2,
       59,   60,  117,  118,    8,  117,  118,    1,    8,  117,
      118,    9,  116,  118,    3,    8,  117,  118,    8,  117,
      118,    7,    8,  117,  118,16390,    2,    8,  117,  118,
      117,  118,    1,  117,  118,    3,  117,  118,  117,  118,
        2,  117,  118,   65,  117,  118, 8260,  117,  118,16452,
    16453,  117,  118,   71,  117,  118,   72,  117,  118,   70,

      117,  118,   73,  117,  118,  113,  117,  118,    1,  113,
      117,  118,  101,  113,  117,  118,  100,  116,  118,    3,
      113,  117,  118,  104,  113,  117,  118,   97,  113,  117,
      118,  105,  113,  117,  118,  113,  117,  118,  103,  113,
      117,  118,   98,  113,  117,  118,  113,  117,  118,    2,
      113,  117,  118,   51,  117,  118,    1,   51,  117,  118,
        3,   51,  117,  118,   51,  117,  118,    2,   51,  117,
      118,   50,   51,  117,  118,    1,   50,   51,  117,  118,
       50,   51,  117,  118,   50,  116,  118,    3,   50,   51,
      117,  118,   49,   51,  117,  118,   50,   51,  117,  118,

        2,   50,   51,  117,  118,   79,   81,  117,  118,    1,
       79,   81,  117,  118,   80,  116,  118,    3,   79,   81,
      117,  118,   81,  117,  118,   79,   81,  117,  118,    2,
       79,   81,  117,  118,   91,   92,  117,  118,    1,   91,
       92,  117,  118,   88,  116,  118,    3,   91,   92,  117,
      118,   91,   92,  117,  118,    2,   91,   92,  117,  118,
       85,   87,  117,  118,    1,   85,   87,  117,  118,   86,
      116,  118,    3,   85,   87,  117,  118,   87,  117,  118,
       85,   87,  117,  118,    2,   85,   87,  117,  118,   95,
       96,  117,  118,    1,   95,   96,  117,  118,    3,   95,

       96,  117,  118,   95,   96,  117,  118,    2,   95,   96,
      117,  118,   41,  117,  118,    1,   41,  117,  118,   42,
      116,  118,    3,   41,  117,  118,   41,  117,  118,   41,
      117,  118,   41,  117,  118,    2,   41,  117,  118,   48,
      117,  118,    1,   48,  117,  118,   46,  116,  118,    3,
       48,  117,  118,   48,  117,  118,   44,   48,  117,  118,
       48,  117,  118,    2,   48,  117,  118,   47,   48,  117,
      118,   45,   48,  117,  118,  111,  117,  118,    1,  111,
      117,  118,    3,  111,  117,  118,  108,  111,  117,  118,
      111,  117,  118,  111,  117,  118,    2,  111,  117,  118,

      112,  117,  118,    1,  112,  117,  118,    3,  112,  117,
      118,  110,  112,  117,  118,  112,  117,  118,  112,  117,
      118,    2,  112,  117,  118,   37,  117,  118,   35,  117,
      118,    1,   35,  117,  118,    3,   35,  117,  118,   35,
      117,  118,    2,   35,  117,  118,   15,  117,  118,    1,
       15,  117,  118,   13,  116,  118,    3,   15,  117,  118,
       12,   15,  117,  118,   10,   15,  117,  118,   11,   15,
      117,  118,   15,  117,  118,   14,   15,  117,  118,    2,
       15,  117,  118,   19,  117,  118,    1,   19,  117,  118,
        3,   19,  117,  118,   17,   19,  117,  118,   19,  117,

      118,   19,  117,  118,    2,   19,  117,  118,  114,  115,
        5,    5,    4,   34,   34,   34,   34,   34,   34,   34,
       62,  114,   61,  115,   57,   57,   57,   57,   59, 8198,
        7,16390,   66,  114,  115,   64,   65, 8260, 8261,   67,
     8260,16452,16453,   72,   71,   72,   70,   73,  101,  102,
       74,  114,   75,  115,   98,   99,   50,   50,   49,   79,
       76,   78,  114,   77,   79,  115,   91,   89,   91,  114,
       90,   91,  115,   85,   82,   84,  114,   83,   85,  115,
       95,   93,   95,  114,   94,   95,  115,   38,   44,   43,
       45,  107,  114,  106,  115,  109,   37,   18,  114,   18,

      115,   16,   34,   34,   34,   34,   27,   34,   34,   34,
       34,   57,   57,   57,   52,   57,   57,  102,   34,   34,
       34,   34,   34,   34,   34,   34,   57,   53,   57,   57,
       57,   73,   34,   28,   31,   29,   29,   34,   34,   34,
       34,   34,   34,   54,   57,   55,   57,   57,   34,   32,
       24,   23,   34,   34,   30,   22,   26,   25,   34,16404,
    16404,   21, 8212,   34,   40,   39, 8212, 8212,   34, 8212
    } ;

static yyconst short int yy_accept[375] =
    {   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,    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,    6,    9,   11,   14,
       16,   19,   22,   26,   29,   32,   36,   39,   42,   46,
       49,   53,   56,   60,   63,   67,   71,   75,   79,   83,
       87,   90,   94,   97,  101,  104,  108,  112,  116,  120,
      124,  129,  132,  137,  140,  145,  148,  152,  155,  159,

      162,  167,  171,  173,  176,  179,  181,  184,  187,  192,
      194,  197,  200,  203,  206,  209,  213,  217,  220,  224,
      228,  232,  236,  239,  243,  247,  250,  254,  257,  261,
      265,  268,  272,  276,  281,  285,  288,  293,  297,  301,
      306,  310,  315,  318,  323,  326,  330,  335,  339,  344,
      347,  352,  356,  361,  365,  370,  373,  378,  381,  385,
      390,  394,  399,  404,  408,  413,  416,  420,  423,  427,
      430,  433,  436,  440,  443,  447,  450,  454,  457,  461,
      464,  468,  472,  476,  479,  483,  487,  491,  494,  497,
      501,  504,  508,  512,  516,  519,  522,  526,  529,  532,

      536,  540,  543,  547,  550,  554,  557,  561,  565,  569,
      573,  576,  580,  584,  587,  591,  595,  599,  602,  605,
      609,  610,  611,  612,  613,  614,  615,  616,  617,  618,
      619,  620,  621,  623,  625,  626,  627,  628,  629,  630,
      630,  631,  633,  633,  634,  635,  636,  636,  637,  638,
      639,  640,  641,  644,  644,  645,  646,  647,  648,  648,
      649,  650,  650,  651,  653,  655,  656,  657,  657,  658,
      659,  660,  661,  662,  664,  667,  668,  671,  674,  675,
      676,  678,  681,  682,  685,  688,  689,  689,  689,  690,
      691,  692,  694,  696,  697,  698,  700,  702,  703,  704,

      705,  706,  707,  708,  709,  710,  711,  712,  713,  714,
      715,  716,  717,  718,  718,  719,  719,  720,  721,  722,
      723,  724,  725,  726,  727,  728,  730,  731,  732,  733,
      733,  734,  736,  737,  738,  739,  740,  741,  742,  743,
      744,  745,  745,  746,  748,  749,  749,  750,  750,  750,
      751,  752,  753,  754,  755,  756,  756,  756,  757,  757,
      758,  759,  761,  761,  761,  762,  763,  765,  766,  767,
      768,  770,  771,  771
    } ;

static yyconst int yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    2,    1,    1,    3,    4,
        1,    1,    5,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    3,    1,    6,    7,    1,    1,    1,    8,    9,
       10,   11,    1,   12,    1,   13,   14,   15,   15,   15,
       15,   15,   15,   15,   15,   15,   15,    1,    1,   16,
        1,   17,    1,   18,   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,
        1,   20,    1,    1,   19,    1,   19,   19,   21,   22,

       23,   24,   19,   19,   25,   19,   19,   26,   19,   27,
       19,   19,   19,   19,   28,   19,   29,   19,   19,   19,
       19,   19,    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,    1,    1,    1,    1
    } ;

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

static yyconst short int yy_base[415] =
    {   0,
        0,   29,   58,   87,  117,    0,  147,    0,  176,  205,
      235,    0,  264,  293,  322,    0,  334,    0,  361,    0,
      390,    0,  419,  448,  477,  506,  535,  564,  593,  622,
      651,  680,  709,  738,  767,  796,  825,  854,  884,    0,
      905,    0,  933,  962,  991, 1020, 1032,    0, 1060, 1089,
     1118, 1147, 1176, 1205,  438, 1645, 1645, 1645, 1645,    1,
     1645, 1645, 1645,    0, 1645, 1645, 1645,    2, 1645, 1645,
     1645, 1645, 1645,    6,    0,  414,    0,    1,  409, 1645,
     1645, 1645, 1645, 1645,    7,    0,    9,  411, 1645,    0,
        0, 1645,    0,    8,    0, 1645, 1645, 1645, 1645,   18,

       35, 1645,   31,   35,   36,   40,   39,   46,   61,   58,
      431,  429,  428,  417, 1645, 1645,    3, 1645, 1645, 1645,
      422, 1645,   36, 1645,    0,    4, 1645, 1645, 1645, 1645,
       55, 1645, 1645, 1645,   64, 1645, 1645, 1645,   62, 1645,
        0,    0, 1645,    0,  414,   63,    0,    0,    0, 1645,
        0,   64,    0,    0,    0, 1645,    0,  413,   68,    0,
        0,    0,    0,   69,    0, 1645, 1645, 1645, 1645,   70,
       19,  403, 1645, 1645, 1645, 1645, 1645,   82,    0,  421,
     1645, 1645,    0, 1645, 1645, 1645, 1645,   84,    0, 1645,
     1645, 1645, 1645, 1645,   86,    0, 1645,    0, 1645, 1645,

     1645,   88, 1645, 1645, 1645, 1645, 1645, 1645, 1645, 1645,
       92, 1645, 1645, 1645, 1645, 1645, 1645,   93,  416, 1645,
     1645, 1645, 1645,  102, 1645,    0,  357,   83,  357,  176,
      357,  355, 1645, 1645,    0,   85,  354,  186,    0,  179,
     1645,  188,  188, 1645,  194,  195,  193, 1645,  211,   82,
     1645, 1645,  212,  214,  372,  371,  369,  366,  355,  354,
      109,  359,  362, 1645, 1645,    0, 1645,  350, 1645,  215,
     1645,    0, 1645, 1645,    0,    0,    0,    0,    0, 1645,
     1645,    0,    0,    0,    0, 1645,  338,  316,    0, 1645,
        0, 1645, 1645, 1645,    0, 1645, 1645, 1645,  314,  314,

      314,  310, 1645,  311,  311,  306,  308,  306,  306,  303,
     1645,  302,  300,  308,  317,  294,  291,  220, 1233,  293,
      292,  292,  285,  289,  222,  201,  288,  287, 1645,  278,
      281, 1645, 1645,  264,  268, 1248,  224,  266,  265,  229,
     1645,  268,  206,    0,  225,  176,  184,  271,  162, 1645,
      270, 1645,  273,   92,  111,   63,   36,    8,  274,  277,
     1645,  269,  297,  299,  285, 1645,    0,  300, 1645,    0,
        0,    0, 1645, 1277, 1288, 1299, 1310, 1321, 1332, 1343,
     1354, 1365, 1376, 1387, 1398, 1409, 1420, 1431, 1442, 1453,
     1455, 1457, 1468, 1478, 1489, 1499, 1509, 1513, 1515, 1526,

     1537, 1548, 1559, 1570, 1572, 1574, 1585, 1587, 1598, 1609,
     1619, 1629, 1631, 1633
    } ;

static yyconst short int yy_def[415] =
    {   0,
      374,  374,  374,  375,  373,    5,  373,    7,  376,  376,
      373,   11,  377,  377,  374,   15,   15,   17,   17,   19,
      373,   21,  378,  379,  374,  374,  374,  374,  380,  380,
      381,  381,  382,  382,  383,  383,  384,  384,  373,   39,
       39,   41,  385,  385,  386,  386,   17,   47,  387,  387,
      388,  388,  389,  389,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  390,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  391,  391,  391,  391,  391,  373,
      373,  373,  373,  373,  373,  392,  392,  392,  373,  393,
      393,  373,  393,  373,  393,  373,  373,  373,  373,  373,

      394,  373,  395,  395,  395,  395,  395,  396,  397,  373,
      373,  373,  373,  398,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  399,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  400,  373,  373,  373,  373,  373,
      401,  401,  373,  401,  373,  401,  401,  402,  402,  373,
      402,  402,  402,  403,  403,  373,  403,  373,  403,  403,
      404,  404,  404,  404,  404,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  405,  373,
      373,  373,  406,  373,  373,  373,  373,  373,  407,  373,
      373,  373,  373,  373,  373,  407,  373,  408,  373,  373,

      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  390,  373,  391,  391,  391,  391,  391,
      391,  391,  373,  373,  392,  392,  392,  392,  393,  373,
      373,  394,  395,  373,  395,  395,  373,  373,  396,  373,
      373,  373,  397,  373,  373,  373,  373,  373,  373,  398,
      373,  373,  373,  373,  373,  399,  373,  373,  373,  400,
      373,  401,  373,  373,  401,  402,  402,  402,  403,  373,
      373,  403,  404,  404,  404,  373,  373,  373,  405,  373,
      406,  373,  373,  373,  408,  373,  373,  373,  391,  391,

      391,  391,  373,  391,  391,  391,  391,  392,  392,  392,
      373,  392,  392,  373,  373,  373,  391,  391,  409,  391,
      391,  391,  391,  391,  392,  392,  392,  392,  373,  373,
      391,  373,  373,  373,  391,  410,  391,  391,  391,  391,
      373,  373,  392,  392,  392,  373,  391,  373,  373,  373,
      373,  373,  391,  391,  373,  373,  373,  373,  373,  373,
      373,  411,  373,  373,  412,  373,  413,  373,  373,  414,
      413,  414,    0,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,

      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373
    } ;

static yyconst short int yy_nxt[1676] =
    {   0,
      373,   57,  224,   58,   59,  261,  225,  267,  268,  262,
      358,  221,  221,   60,  222,  222,  221,  233,  233,  222,
      234,  234,  286,  287,  230,  228,  229,  231,  221,   61,
       57,  222,   58,   59,  236,  237,  244,  240,  240,  240,
      244,  244,   60,  241,  244,  244,  264,  244,  247,  265,
      245,  244,  244,  246,  248,  244,  244,  364,   61,   57,
      254,   58,   59,  250,  251,  233,  270,  255,  234,  252,
      271,   60,  233,  274,  277,  234,  275,  278,  281,  284,
      221,  282,  285,  222,  250,  251,  363,   61,   63,   64,
       65,   66,  221,   67,  292,  222,  221,  293,  221,  222,

       68,  222,  221,  296,  224,  222,  297,  300,  225,  308,
      301,  261,  309,  355,  362,  262,   69,   70,   71,   70,
       72,   73,   70,   70,   70,   70,   70,   70,   70,   70,
       74,   70,   70,   70,   70,   75,   70,   75,   76,   77,
       75,   78,   75,   75,   75,   79,   80,   81,   82,   81,
       83,   84,   81,   81,   81,   81,   81,   81,   81,   81,
       85,   81,   81,   81,   81,   86,   81,   86,   86,   87,
       86,   88,   86,   86,   86,   86,   89,   91,  303,   92,
       93,  240,  240,  240,  303,  359,  358,  241,  311,   94,
      240,  240,  240,  244,  311,  247,  241,  304,  357,  244,

      244,  248,  305,  342,  244,   95,   91,  312,   92,   93,
      244,  244,  313,  247,  250,  251,  254,  270,   94,  248,
      252,  271,  332,  255,  341,  343,  351,  311,  332,  325,
      341,  355,  352,  311,   95,   96,   97,   96,   98,   99,
       96,   96,   96,   96,   96,   96,   96,   96,  100,   96,
       96,   96,   96,  101,   96,  101,  101,  101,  101,  101,
      101,  101,  101,  101,  102,  104,  348,   58,  105,   56,
      342,  365,  351,  348,  366,  360,  332,  106,  352,  360,
       56,  361,  332,  226,  366,  361,  354,  365,  349,  353,
      366,  318,  356,  107,  104,  349,   58,  105,   56,  341,

      366,  368,  368,  347,  346,  341,  106,  369,  369,   56,
      345,  344,  340,  339,  338,  337,  336,  331,  330,  315,
      329,  312,  107,   57,  328,   58,   59,  327,  326,  325,
      324,  323,  322,  321,  320,   60,  319,  318,  317,  316,
      108,  286,  108,  108,  108,  108,  108,  108,  108,  108,
      108,   61,  109,  267,  109,  109,  109,  109,  109,  109,
      109,  109,  109,  110,  315,  263,  259,  314,  258,  111,
      112,  257,  113,  256,  257,  310,  307,  306,  302,  114,
      299,  114,  114,  114,  114,  114,  114,  114,  114,  114,
      115,  116,  117,  118,  119,  120,  121,  122,  115,  115,

      115,  115,  115,  123,  115,  115,  115,  124,  125,  126,
      125,  125,  125,  125,  125,  125,  125,  125,  125,  127,
      129,  298,   58,  130,  290,  288,  280,  273,  263,  259,
      258,  257,  131,  256,  238,  232,  227,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  132,  134,
      135,  136,  137,  373,  138,  373,  373,  373,  373,  373,
      373,  139,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  140,   57,  373,
       58,   59,  373,  373,  373,  373,  373,  373,  373,  373,
       60,  373,  373,  373,  373,  373,  373,  373,  373,  373,

      373,  373,  373,  373,  373,  373,   61,   57,  373,   58,
       59,  373,  373,  373,  373,  373,  373,  373,  373,   60,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,   61,   57,  373,   58,   59,
      373,  373,  373,  373,  373,  373,  373,  373,   60,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,   61,   57,  373,   58,   59,  373,
      373,  373,  373,  373,  373,  373,  373,   60,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,   61,  142,  373,  143,  144,  373,  373,

      373,  373,  373,  145,  373,  373,  146,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  147,  142,  373,  143,  144,  373,  373,  373,
      373,  373,  145,  373,  373,  146,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  147,  149,  373,  150,  151,  373,  373,  373,  373,
      373,  373,  373,  373,  152,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      153,  149,  373,  150,  151,  373,  373,  373,  373,  373,
      373,  373,  373,  152,  373,  373,  373,  373,  373,  373,

      373,  373,  373,  373,  373,  373,  373,  373,  373,  153,
      155,  373,  156,  157,  373,  373,  373,  373,  373,  158,
      373,  373,  159,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  160,  155,
      373,  156,  157,  373,  373,  373,  373,  373,  158,  373,
      373,  159,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  160,  162,  373,
      150,  163,  373,  373,  373,  373,  373,  373,  373,  373,
      164,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  165,  162,  373,  150,

      163,  373,  373,  373,  373,  373,  373,  373,  373,  164,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  165,  167,  373,  168,  169,
      373,  373,  373,  373,  373,  373,  373,  373,  170,  373,
      373,  373,  373,  373,  171,  373,  172,  373,  373,  373,
      373,  373,  373,  373,  173,  167,  373,  168,  169,  373,
      373,  373,  373,  373,  373,  373,  373,  170,  373,  373,
      373,  373,  373,  171,  373,  172,  373,  373,  373,  373,
      373,  373,  373,  173,  174,  175,  174,  176,  177,  174,
      174,  174,  174,  174,  174,  174,  174,  178,  174,  174,

      174,  174,  179,  180,  179,  179,  179,  179,  179,  179,
      179,  179,  179,  181,  182,  373,  373,  373,  373,  373,
      373,  373,  373,  183,  373,  183,  183,  183,  183,  183,
      183,  183,  183,  183,  185,  373,   58,  186,  187,  373,
      373,  373,  373,  373,  373,  373,  188,  373,  373,  373,
      373,  373,  189,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  190,  185,  373,   58,  186,  187,  373,  373,
      373,  373,  373,  373,  373,  188,  373,  373,  373,  373,
      373,  189,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  190,  192,  373,   58,  193,  373,  373,  194,  373,

      373,  373,  373,  373,  195,  373,  373,  373,  373,  373,
      196,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      197,  192,  373,   58,  193,  373,  373,  194,  373,  373,
      373,  373,  373,  195,  373,  373,  373,  373,  373,  196,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  197,
      198,  373,  198,  198,  198,  198,  198,  198,  198,  198,
      198,  200,  373,   72,  201,  373,  373,  373,  373,  373,
      373,  373,  373,  202,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  203,
      200,  373,   72,  201,  373,  373,  373,  373,  373,  373,

      373,  373,  202,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  203,  205,
      373,  206,  207,  208,  373,  373,  209,  210,  373,  373,
      373,  211,  373,  373,  373,  212,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  213,  205,  373,
      206,  207,  208,  373,  373,  209,  210,  373,  373,  373,
      211,  373,  373,  373,  212,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  213,  215,  373,   58,
      216,  217,  373,  373,  373,  373,  373,  373,  373,  218,
      373,  373,  373,  373,  373,  219,  373,  373,  373,  373,

      373,  373,  373,  373,  373,  220,  215,  373,   58,  216,
      217,  373,  373,  373,  373,  373,  373,  373,  218,  373,
      373,  373,  373,  373,  219,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  220,  334,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  226,  373,  373,
      373,  226,  373,  226,  226,  226,  226,  335,  226,  226,
      226,  226,  226,  373,  373,  373,  226,  373,  226,  226,
      226,  226,  226,  226,  226,  226,  226,   56,   56,   56,
       56,   56,   56,   56,   56,   56,   56,   56,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   62,   62,   90,

       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
      103,  103,  103,  103,  103,  103,  103,  103,  103,  103,
      103,  128,  128,  128,  128,  128,  128,  128,  128,  128,
      128,  128,  133,  133,  133,  133,  133,  133,  133,  133,
      133,  133,  133,  141,  141,  141,  141,  141,  141,  141,
      141,  141,  141,  141,  148,  148,  148,  148,  148,  148,
      148,  148,  148,  148,  148,  154,  154,  154,  154,  154,
      154,  154,  154,  154,  154,  154,  161,  161,  161,  161,
      161,  161,  161,  161,  161,  161,  161,  166,  166,  166,
      166,  166,  166,  166,  166,  166,  166,  166,  184,  184,

      184,  184,  184,  184,  184,  184,  184,  184,  184,  191,
      191,  191,  191,  191,  191,  191,  191,  191,  191,  191,
      199,  199,  199,  199,  199,  199,  199,  199,  199,  199,
      199,  204,  204,  204,  204,  204,  204,  204,  204,  204,
      204,  204,  214,  214,  214,  214,  214,  214,  214,  214,
      214,  214,  214,  223,  223,  223,  223,  223,  223,  223,
      223,  223,  223,  223,  226,  226,  235,  235,  239,  239,
      373,  239,  239,  239,  239,  239,  373,  239,  239,  242,
      242,  242,  373,  242,  373,  373,  373,  242,  242,  243,
      243,  373,  243,  243,  243,  243,  243,  243,  243,  243,

      249,  373,  373,  373,  249,  373,  373,  373,  249,  249,
      253,  253,  373,  373,  253,  373,  373,  373,  253,  253,
      260,  373,  260,  260,  266,  266,  269,  269,  269,  269,
      269,  269,  269,  269,  269,  269,  269,  272,  272,  373,
      272,  272,  272,  373,  272,  272,  272,  272,  276,  276,
      373,  276,  276,  276,  276,  276,  276,  276,  276,  279,
      279,  373,  279,  279,  279,  373,  279,  279,  279,  279,
      283,  283,  373,  283,  283,  283,  283,  283,  283,  283,
      283,  289,  289,  291,  291,  294,  294,  373,  294,  294,
      294,  294,  294,  294,  294,  294,  295,  295,  333,  333,

      333,  333,  333,  333,  333,  333,  333,  333,  333,  350,
      350,  350,  350,  350,  350,  350,  350,  350,  350,  350,
      367,  373,  373,  367,  373,  373,  373,  373,  367,  367,
      370,  373,  373,  370,  373,  373,  373,  373,  373,  370,
      371,  371,  372,  372,   55,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373
    } ;

static yyconst short int yy_chk[1676] =
    {   0,
        0,    1,   64,    1,    1,  117,   64,  126,  126,  117,
      358,   60,   68,    1,   60,   68,   74,   85,   94,   74,
       85,   94,  171,  171,   78,   77,   77,   78,  100,    1,
        2,  100,    2,    2,   87,   87,  103,  101,  101,  101,
      104,  105,    2,  101,  107,  106,  123,  103,  108,  123,
      106,  104,  105,  106,  108,  107,  106,  357,    2,    3,
      110,    3,    3,  109,  109,  131,  135,  110,  131,  109,
      135,    3,  139,  146,  152,  139,  146,  152,  159,  164,
      170,  159,  164,  170,  250,  250,  356,    3,    4,    4,
        4,    4,  178,    4,  188,  178,  195,  188,  202,  195,

        4,  202,  211,  218,  224,  211,  218,  228,  224,  236,
      228,  261,  236,  355,  354,  261,    4,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    9,  230,    9,
        9,  240,  240,  240,  230,  349,  347,  240,  238,    9,
      242,  242,  242,  243,  238,  247,  242,  230,  346,  245,

      246,  247,  230,  326,  243,    9,   10,  238,   10,   10,
      245,  246,  238,  249,  253,  253,  254,  270,   10,  249,
      253,  270,  318,  254,  325,  326,  337,  345,  318,  343,
      325,  340,  337,  345,   10,   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,  334,   13,   13,   13,
      342,  362,  351,  348,  362,  353,  359,   13,  351,  360,
       13,  353,  359,  362,  362,  360,  339,  365,  334,  338,
      365,  335,  342,   13,   14,  348,   14,   14,   14,  363,

      365,  364,  368,  331,  330,  363,   14,  364,  368,   14,
      328,  327,  324,  323,  322,  321,  320,  317,  316,  315,
      314,  313,   14,   15,  312,   15,   15,  310,  309,  308,
      307,  306,  305,  304,  302,   15,  301,  300,  299,  288,
       15,  287,   15,   15,   15,   15,   15,   15,   15,   15,
       15,   15,   17,  268,   17,   17,   17,   17,   17,   17,
       17,   17,   17,   19,  263,  262,  260,  259,  258,   19,
       19,  257,   19,  256,  255,  237,  232,  231,  229,   19,
      227,   19,   19,   19,   19,   19,   19,   19,   19,   19,
       21,   21,   21,   21,   21,   21,   21,   21,   21,   21,

       21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
       21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
       23,  219,   23,   23,  180,  172,  158,  145,  121,  114,
      113,  112,   23,  111,   88,   79,   76,   55,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,   23,   24,
       24,   24,   24,    0,   24,    0,    0,    0,    0,    0,
        0,   24,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,   24,   25,    0,
       25,   25,    0,    0,    0,    0,    0,    0,    0,    0,
       25,    0,    0,    0,    0,    0,    0,    0,    0,    0,

        0,    0,    0,    0,    0,    0,   25,   26,    0,   26,
       26,    0,    0,    0,    0,    0,    0,    0,    0,   26,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,   26,   27,    0,   27,   27,
        0,    0,    0,    0,    0,    0,    0,    0,   27,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,   27,   28,    0,   28,   28,    0,
        0,    0,    0,    0,    0,    0,    0,   28,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,   28,   29,    0,   29,   29,    0,    0,

        0,    0,    0,   29,    0,    0,   29,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,   29,   30,    0,   30,   30,    0,    0,    0,
        0,    0,   30,    0,    0,   30,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,   30,   31,    0,   31,   31,    0,    0,    0,    0,
        0,    0,    0,    0,   31,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
       31,   32,    0,   32,   32,    0,    0,    0,    0,    0,
        0,    0,    0,   32,    0,    0,    0,    0,    0,    0,

        0,    0,    0,    0,    0,    0,    0,    0,    0,   32,
       33,    0,   33,   33,    0,    0,    0,    0,    0,   33,
        0,    0,   33,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,   33,   34,
        0,   34,   34,    0,    0,    0,    0,    0,   34,    0,
        0,   34,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,   34,   35,    0,
       35,   35,    0,    0,    0,    0,    0,    0,    0,    0,
       35,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,   35,   36,    0,   36,

       36,    0,    0,    0,    0,    0,    0,    0,    0,   36,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,   36,   37,    0,   37,   37,
        0,    0,    0,    0,    0,    0,    0,    0,   37,    0,
        0,    0,    0,    0,   37,    0,   37,    0,    0,    0,
        0,    0,    0,    0,   37,   38,    0,   38,   38,    0,
        0,    0,    0,    0,    0,    0,    0,   38,    0,    0,
        0,    0,    0,   38,    0,   38,    0,    0,    0,    0,
        0,    0,    0,   38,   39,   39,   39,   39,   39,   39,
       39,   39,   39,   39,   39,   39,   39,   39,   39,   39,

       39,   39,   39,   39,   39,   39,   39,   39,   39,   39,
       39,   39,   39,   39,   41,    0,    0,    0,    0,    0,
        0,    0,    0,   41,    0,   41,   41,   41,   41,   41,
       41,   41,   41,   41,   43,    0,   43,   43,   43,    0,
        0,    0,    0,    0,    0,    0,   43,    0,    0,    0,
        0,    0,   43,    0,    0,    0,    0,    0,    0,    0,
        0,    0,   43,   44,    0,   44,   44,   44,    0,    0,
        0,    0,    0,    0,    0,   44,    0,    0,    0,    0,
        0,   44,    0,    0,    0,    0,    0,    0,    0,    0,
        0,   44,   45,    0,   45,   45,    0,    0,   45,    0,

        0,    0,    0,    0,   45,    0,    0,    0,    0,    0,
       45,    0,    0,    0,    0,    0,    0,    0,    0,    0,
       45,   46,    0,   46,   46,    0,    0,   46,    0,    0,
        0,    0,    0,   46,    0,    0,    0,    0,    0,   46,
        0,    0,    0,    0,    0,    0,    0,    0,    0,   46,
       47,    0,   47,   47,   47,   47,   47,   47,   47,   47,
       47,   49,    0,   49,   49,    0,    0,    0,    0,    0,
        0,    0,    0,   49,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,   49,
       50,    0,   50,   50,    0,    0,    0,    0,    0,    0,

        0,    0,   50,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,   50,   51,
        0,   51,   51,   51,    0,    0,   51,   51,    0,    0,
        0,   51,    0,    0,    0,   51,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,   51,   52,    0,
       52,   52,   52,    0,    0,   52,   52,    0,    0,    0,
       52,    0,    0,    0,   52,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,   52,   53,    0,   53,
       53,   53,    0,    0,    0,    0,    0,    0,    0,   53,
        0,    0,    0,    0,    0,   53,    0,    0,    0,    0,

        0,    0,    0,    0,    0,   53,   54,    0,   54,   54,
       54,    0,    0,    0,    0,    0,    0,    0,   54,    0,
        0,    0,    0,    0,   54,    0,    0,    0,    0,    0,
        0,    0,    0,    0,   54,  319,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,  319,    0,    0,
        0,  319,    0,  319,  319,  319,  319,  319,  319,  319,
      319,  319,  336,    0,    0,    0,  336,    0,  336,  336,
      336,  336,  336,  336,  336,  336,  336,  374,  374,  374,
      374,  374,  374,  374,  374,  374,  374,  374,  375,  375,
      375,  375,  375,  375,  375,  375,  375,  375,  375,  376,

      376,  376,  376,  376,  376,  376,  376,  376,  376,  376,
      377,  377,  377,  377,  377,  377,  377,  377,  377,  377,
      377,  378,  378,  378,  378,  378,  378,  378,  378,  378,
      378,  378,  379,  379,  379,  379,  379,  379,  379,  379,
      379,  379,  379,  380,  380,  380,  380,  380,  380,  380,
      380,  380,  380,  380,  381,  381,  381,  381,  381,  381,
      381,  381,  381,  381,  381,  382,  382,  382,  382,  382,
      382,  382,  382,  382,  382,  382,  383,  383,  383,  383,
      383,  383,  383,  383,  383,  383,  383,  384,  384,  384,
      384,  384,  384,  384,  384,  384,  384,  384,  385,  385,

      385,  385,  385,  385,  385,  385,  385,  385,  385,  386,
      386,  386,  386,  386,  386,  386,  386,  386,  386,  386,
      387,  387,  387,  387,  387,  387,  387,  387,  387,  387,
      387,  388,  388,  388,  388,  388,  388,  388,  388,  388,
      388,  388,  389,  389,  389,  389,  389,  389,  389,  389,
      389,  389,  389,  390,  390,  390,  390,  390,  390,  390,
      390,  390,  390,  390,  391,  391,  392,  392,  393,  393,
        0,  393,  393,  393,  393,  393,    0,  393,  393,  394,
      394,  394,    0,  394,    0,    0,    0,  394,  394,  395,
      395,    0,  395,  395,  395,  395,  395,  395,  395,  395,

      396,    0,    0,    0,  396,    0,    0,    0,  396,  396,
      397,  397,    0,    0,  397,    0,    0,    0,  397,  397,
      398,    0,  398,  398,  399,  399,  400,  400,  400,  400,
      400,  400,  400,  400,  400,  400,  400,  401,  401,    0,
      401,  401,  401,    0,  401,  401,  401,  401,  402,  402,
        0,  402,  402,  402,  402,  402,  402,  402,  402,  403,
      403,    0,  403,  403,  403,    0,  403,  403,  403,  403,
      404,  404,    0,  404,  404,  404,  404,  404,  404,  404,
      404,  405,  405,  406,  406,  407,  407,    0,  407,  407,
      407,  407,  407,  407,  407,  407,  408,  408,  409,  409,

      409,  409,  409,  409,  409,  409,  409,  409,  409,  410,
      410,  410,  410,  410,  410,  410,  410,  410,  410,  410,
      411,    0,    0,  411,    0,    0,    0,    0,  411,  411,
      412,    0,    0,  412,    0,    0,    0,    0,    0,  412,
      413,  413,  414,  414,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373,  373,  373,  373,  373,  373,
      373,  373,  373,  373,  373
    } ;

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 "pre.l"
#define INITIAL 0
/******************************************************************************
 *
 * $Id: pre.l,v 1.49 2000/07/22 16:59:08 root Exp $
 *
 * Copyright (C) 1997-2000 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.
 *
 */
#line 19 "pre.l"

/*
 *	includes
 */

#include <stdio.h>
#include <iostream.h>
#include <assert.h>
#include <ctype.h>

#include "qtbc.h"
#include <qarray.h>
#include <qstack.h>
#include <qfile.h>
#include <qstrlist.h>
#include <qdict.h>
#include <qregexp.h>
#include <qfileinfo.h>
  
#include "pre.h"
#include "constexp.h"
#include "define.h"
#include "doxygen.h"
#include "message.h"
#include "util.h"
#include "defargs.h"
#include "debug.h"

#if defined(_MSC_VER) || defined(__BORLANDC__)
#define popen _popen
#define pclose _pclose
#endif

#define YY_NEVER_INTERACTIVE 1
  
#define SHOW_INCLUDES 0 // set this to one to list all parsed include files

struct FileState
{
  int lineNr;
  FILE *filePtr;
  YY_BUFFER_STATE bufState;
  QCString fileName;
};  

/* -----------------------------------------------------------------
 *
 *	scanner's state
 */

static int                g_yyLineNr   = 1;
static QCString           g_yyFileName;
static FileDef           *g_yyFileDef;
static int                g_ifcount    = 0;
static QStrList          *g_pathList = 0;  
static QStack<FileState>  g_includeStack;
static QDict<int>        *g_argDict;
static int                g_defArgs = -1;
static QCString           g_defName;
static QCString           g_defText;
static QCString           g_defLitText;
static QCString           g_defArgsStr;
static bool               g_defVarArgs;
static int                g_level;
static int                g_lastCContext;
static int                g_lastCPPContext;
static QArray<int>        g_levelGuard;
static BufStr            *g_outputBuf;
static int                g_roundCount;
static bool               g_quoteArg;
static DefineDict        *g_fileDefineDict;
static DefineDict        *g_expandedDict;
static int                g_findDefArgContext;
static QCString           g_lastGuardName;
static QCString           g_incName;
static QCString           g_guardExpr;

static void setFileName(const char *name)
{
  bool ambig;
  g_yyFileName=name;
  g_yyFileDef=findFileDef(inputNameDict,g_yyFileName,ambig);
}

static void incrLevel()
{
  g_level++;
  g_levelGuard.resize(g_level);
  g_levelGuard[g_level-1]=FALSE;
  //printf("%s line %d: incrLevel %d\n",g_yyFileName.data(),g_yyLineNr,g_level);
}

static void decrLevel()
{
  //printf("%s line %d: decrLevel %d\n",g_yyFileName.data(),g_yyLineNr,g_level);
  if (g_level > 0)
  {
    g_level--;
    g_levelGuard.resize(g_level);
  }
  else
  {
    err("%s:%d: Error: More #endif's than #if's found.\n",
	g_yyFileName.data(),g_yyLineNr);
  }
}

static bool otherCaseDone()
{
  if (g_level==0)
  {
    err("%s:%d: Error: Found an #else without a preceding #if.\n",
	g_yyFileName.data(),g_yyLineNr);
    return TRUE;
  }
  else
  {
    return g_levelGuard[g_level-1];
  }
}

static void setCaseDone(bool value)
{
  g_levelGuard[g_level-1]=value;
}

static Define *isDefined(const char *name)
{
  if (name)
  {
    Define *def;
    //if ((def=fileDefineCache->findDefine(g_yyFileName,name)) && !def->undef) 
    //	return def;
    if ((def=g_fileDefineDict->find(name)) && !def->undef) return def; 
  }
  return 0;
}

static FILE *findFile(const char *fileName)
{
  if (g_pathList==0) 
  {
    return 0;
  }
  char *s=g_pathList->first();
  while (s)
  {
    QCString absName=(QCString)s+"/"+fileName;
    QFileInfo fi(absName);
    if (fi.exists() && fi.isFile())
    {
      FILE *f;
      if (!Config::inputFilter.isEmpty())
      {
	QCString cmd = Config::inputFilter+" "+absName;
	f=popen(cmd,"r");
	if (!f) err("Error: could not execute filter %s\n",cmd.data());
      }
      else
      {
	f=fopen(absName,"r");
	if (!f) err("Error: could not open file %s for reading\n",absName.data());
      }
      if (f)
      {
	setFileName(absName);
	g_yyLineNr=1;
	return f;
      }
    }
    s=g_pathList->next();
  } 
  return 0;
}


static int getNextChar(const QCString &expr,QCString *rest,uint &pos);
static int getCurrentChar(const QCString &expr,QCString *rest,uint pos);
static void unputChar(const QCString &expr,QCString *rest,uint &pos,char c);
static void expandExpression(QCString &expr,QCString *rest,int pos);

static QCString stringize(const QCString &s)
{
  QCString result;
  uint i=0;
  bool inString=FALSE;
  bool inChar=FALSE;
  char c,pc;
  while (i<s.length())
  {
    if (!inString && !inChar)
    {
      while (i<s.length() && !inString && !inChar)
      {
	c=s.at(i++);
	if (c=='"')
	{
	  result+="\\\"";
	  inString=TRUE;
	}
	else if (c=='\'')
	{
	  result+=c;
	  inChar=TRUE;
	}
	else
	{
	  result+=c;
	}
      }
    }
    else if (inChar)
    {
      while (i<s.length() && inChar)
      {
	c=s.at(i++);
	if (c=='\'')
	{
	  result+='\'';
	  inChar=FALSE;
	}
	else if (c=='\\')
	{
	  result+="\\\\";
	}
	else
	{
	  result+=c;
	}
      }
    }
    else
    {
      pc=0;
      while (i<s.length() && inString)
      {
	char c=s.at(i++);
	if (c=='"') 
	{
	  result+="\\\"";
	  inString= pc=='\\';
	}
	else if (c=='\\')
	  result+="\\\\";
	else
	  result+=c;
	pc=c;
      }
    }
  }
  //printf("stringize `%s'->`%s'\n",s.data(),result.data());
  return result;
}

/*! Execute all ## operators in expr. 
 * If the macro name before or after the operator contains a no-rescan 
 * marker (@-) then this is removed (before the concatenated macro name
 * may be expanded again.
 */
static void processConcatOperators(QCString &expr)
{
  QRegExp r("[ \\t\\n]*##[ \\t\\n]*"); 
  int l,n,i=0;
  if (expr.isEmpty()) return;
  while ((n=r.match(expr,i,&l))!=-1)
  {
    if (n+l+1<(int)expr.length() && expr.at(n+l)=='@' && expr.at(n+l+1)=='-')
    {
      // remove no-rescan marker after ID
      l+=2;
    }
    // remove the ## operator and the surrounding whitespace
    expr=expr.left(n)+expr.right(expr.length()-n-l);
    int k=n-1;
    while (k>=0 && isId(expr.at(k))) k--; 
    if (k>0 && expr.at(k)=='-' && expr.at(k-1)=='@')
    {
      // remove no-rescan marker before ID
      expr=expr.left(k-1)+expr.right(expr.length()-k-1);
      n-=2;
    }
    i=n+l;
  }
}

/*! replaces the function macro \a def whose argument list starts at
 * \a pos in expression \a expr. 
 * Notice that this routine may scan beyond the \a expr string if needed.
 * The characters from the input file will be read.
 * The replacement string will be returned in \a result and the 
 * length of the (unexpanded) argument list is stored in \a len.
 */ 
static bool replaceFunctionMacro(const QCString &expr,QCString *rest,int pos,int &len,const Define *def,QCString &result)
{
  //printf("replaceFunctionMacro(expr=%s,rest=%s,pos=%d,def=%s) level=%d\n",expr.data(),rest ? rest->data() : 0,pos,def->name.data(),g_level);
  //bool replaced=FALSE;
  uint j=pos;
  len=0;
  result.resize(0);
  int cc;
  while ((cc=getCurrentChar(expr,rest,j))!=EOF && cc==' ') 
  { 
    len++; 
    getNextChar(expr,rest,j); 
  }
  if (cc!='(') 
  { 
    unputChar(expr,rest,j,' '); 
    return FALSE; 
  }
  getNextChar(expr,rest,j); // eat the `(' character

  //while (j<expr.length() && expr.at(j)!='(') j++; 
  //j++; // skip opening paren

  QDict<QCString> argTable;  // list of arguments
  argTable.setAutoDelete(TRUE);
  QCString arg;
  int argCount=0;
  bool done=FALSE;
  
  // FASE 1: read the macro arguments
  if (def->nargs==0)
  {
    while ((cc=getNextChar(expr,rest,j))!=EOF)
    {
      char c = (char)cc;
      if (c==')') break;
    }
  }
  else
  {
    while (!done && (argCount<def->nargs || def->varArgs) && 
	((cc=getNextChar(expr,rest,j))!=EOF)
	  )
    {
      char c=(char)cc;
      if (c=='(') // argument is a function => search for matching )
      {
	int level=1;
	arg+=c;
	char term='\0';
	while ((cc=getNextChar(expr,rest,j))!=EOF)
	{
	  char c=(char)cc;
	  if (c=='\'' || c=='\"') // skip ('s and )'s inside strings
	  {
	    if (term!='\0') 
	    { 
	      if (c==term && expr.at(j-2)!='\\') term='\0'; 
	    } 
	    else 
	    { 
	      term=c; 
	    }
	  }
	  if (term=='\0' && c==')')
	  {
	    level--;
	    arg+=c;
	    if (level==0) break;
	  }
	  else if (term=='\0' && c=='(')
	  {
	    level++;
	    arg+=c;
	  }
	  else
	    arg+=c;
	}
      }
      else if (c==')' || c==',') // last or next argument found
      {
	if (c==',' && argCount==def->nargs-1 && def->varArgs)
	{
	  arg=arg.stripWhiteSpace();
	  arg+=',';
	}
	else
	{
	  QCString argKey;
	  argKey.sprintf("@%d",argCount++); // key name
	  arg=arg.stripWhiteSpace();
	  // add argument to the lookup table
	  argTable.insert(argKey, new QCString(arg));
	  arg.resize(0);
	  if (c==')') // end of the argument list
	  {
	    done=TRUE;
	  }
	}
      } 
      else if (c=='\"') // append literal strings
      {
	arg+=c; 
	char pc=c;
	bool found=FALSE;
	while (!found && (cc=getNextChar(expr,rest,j))!=EOF)
	{
	  found = pc!='\\' && cc=='"';
	  c=(char)cc;	  
	  pc=c;
	  arg+=c;
	}
      }
      else if (c=='\'') // append literal characters
      {
	arg+=c;
	char pc=c;
	bool found=FALSE;
	while (!found && (cc=getNextChar(expr,rest,j))!=EOF)
	{
	  found = pc!='\\' && cc=='\'';
	  c=(char)cc;
	  pc=c;
	  arg+=c;
	}
      }	    
      else // append other characters
      {
	arg+=c;
      }
    }
  }

  // FASE 2: apply the macro function
  if (argCount==def->nargs || 
      (argCount>def->nargs && def->varArgs)) // matching parameters lists
  {
    uint k=0;
    // substitution of all formal arguments
    QCString resExpr;
    const QCString d=def->definition.stripWhiteSpace();
    bool inString=FALSE;
    while (k<d.length())
    {
      if (d.at(k)=='@') // maybe a marker, otherwise an escaped @
      {
	if (d.at(k+1)=='@') // escaped @ => copy it (is unescaped later)
	{
	  k+=2;
	  resExpr+="@@"; // we unescape these later
	}
	else if (d.at(k+1)=='-') // no-rescan marker
	{
	  k+=2;
	  resExpr+="@-";
	}
	else // argument marker => read the argument number
	{
	  QCString key="@";
	  QCString *subst=0;
	  bool hash=FALSE;
	  int l=k-1;
	  // search for ## backward
	  if (l>=0 && d.at(l)=='"') l--;
	  while (l>=0 && d.at(l)==' ') l--;
	  if (l>0 && d.at(l)=='#' && d.at(l-1)=='#') hash=TRUE;
	  k++;
	  // scan the number
	  while (k<d.length() && d.at(k)>='0' && d.at(k)<='9') key+=d.at(k++);
	  if (!hash) 
	  {
	    // search for ## forward
	    l=k;
	    if (l<(int)d.length() && d.at(l)=='"') l++;
	    while (l<(int)d.length() && d.at(l)==' ') l++;
	    if (l<(int)d.length()-1 && d.at(l)=='#' && d.at(l+1)=='#') hash=TRUE;
	  }
	  //printf("request key %s result %s\n",key.data(),args[key]->data());
	  if (key.length()>1 && (subst=argTable[key])) 
	  {
	    QCString substArg=*subst;
	    // only if no ## operator is before or after the argument
	    // marker we do macro expansion.
	    if (!hash) expandExpression(substArg,0,0);
	    if (inString)
	    {
	      //printf("`%s'=stringize(`%s')\n",stringize(*subst).data(),subst->data());

	      // if the marker is inside a string (because a # was put 
	      // before the macro name) we must escape " and \ characters
	      resExpr+=stringize(substArg);
	    }
	    else
	    {
	      resExpr+=" "+substArg+" ";
	    }
	  }
	}
      }
      else // no marker, just copy
      {
	if (!inString && d.at(k)=='\"') 
	{
	  inString=TRUE; // entering a literal string
	}
	else if (inString && d.at(k)=='\"' && d.at(k-1)!='\\')
	{
	  inString=FALSE; // leaving a literal string
	}
	resExpr+=d.at(k++);
      }
    }
    len=j-pos;
    result=resExpr;
    //printf("result after substitution `%s' expr=`%s'\n",
    //       result.data(),expr.mid(pos,len).data());
    return TRUE;
  }
  else
  {
    return FALSE;
  }
}


/*! returns the next identifier in string \a expr by starting at position \a p.
 * The position of the identifier is returned (or -1 if nothing is found)
 * and \a l is its length. Any quoted strings are skipping during the search.
 */
static int getNextId(const QCString &expr,int p,int *l)
{
  int n;
  while (p<(int)expr.length())
  {
    char c=expr.at(p++);
    if (isalpha(c) || c=='_') // read id
    {
      n=p-1;
      while (p<(int)expr.length() && isId(expr.at(p))
	    ) p++;
      *l=p-n;
      return n; 
    }
    else if (c=='"') // skip string
    {
      char pc=c;
      if (p<(int)expr.length()) c=expr.at(p);
      while (p<(int)expr.length() && (c!='"' || pc=='\\')) 
      {
	pc=c;
	c=expr.at(p);
	p++;
      }
    }
  }
  return -1;
}

/*! preforms recursive macro expansion on the string \a expr
 *  starting at position \a pos.
 *  May read additional characters from the input while re-scanning!
 *  If \a expandAll is \c TRUE then all macros in the expression are
 *  expanded, otherwise only the first is expanded.
 */
static void expandExpression(QCString &expr,QCString *rest,int pos)
{
  //printf("expandExpression(%s,%s)\n",expr.data(),rest ? rest->data() : 0);
  QCString macroName;
  QCString expMacro;
  int i=pos,l,p,len;
  while ((p=getNextId(expr,i,&l))!=-1) // search for an macro name
  {
    bool replaced=FALSE;
    macroName=expr.mid(p,l);
    //printf("macroName %s found\n",macroName.data());
    if (p<2 || !(expr.at(p-2)=='@' && expr.at(p-1)=='-')) // no-rescan marker?
    {
      if (g_expandedDict->find(macroName)==0) // expand macro
      {
	Define *def=isDefined(macroName);
	if (def && def->nargs==-1) // simple macro
	{
	  // substitute the definition of the macro
	  //printf("macro `%s'->`%s'\n",macroName.data(),def->definition.data());
	  expMacro=" "+def->definition.stripWhiteSpace()+" ";
	  replaced=TRUE;
	  len=l;
	  //printf("simple macro expansion=`%s'->`%s'\n",macroName.data(),expMacro.data());
	}
	else if (def && def->nargs>=0) // function macro
	{
	  replaced=replaceFunctionMacro(expr,rest,p+l,len,def,expMacro);
	  len+=l;
	}

	if (replaced) // expand the macro and rescan the expression
	{
	    
	  //printf("replacing `%s'->`%s'\n",expr.mid(p,len).data(),expMacro.data());
	  QCString resultExpr=expMacro;
	  QCString restExpr=expr.right(expr.length()-len-p);
	  processConcatOperators(resultExpr);
	  if (!def->nonRecursive)
	  {
	    g_expandedDict->insert(macroName,def);
	    expandExpression(resultExpr,&restExpr,0);
	    g_expandedDict->remove(macroName);
	  }
	  expr=expr.left(p)+resultExpr+restExpr;
	  i=p;
	  //printf("new expression: %s\n",expr.data());
	}
	else // move to the next macro name
	{
	  //printf("moving to the next macro old=%d new=%d\n",i,p+l);
	  i=p+l;
	}
      }
      else // move to the next macro name
      {
	expr=expr.left(p)+"@-"+expr.right(expr.length()-p);
	//printf("macro already expanded, moving to the next macro expr=%s\n",expr.data());
	i=p+l+2;
	//i=p+l;
      }
    }
    else // no re-scan marker found, skip the macro name
    {
      //printf("skipping marked macro\n");
      i=p+l;
    }
  }
}

/*! replaces all occurrences of @@ in \a s by @
 *  All identifiers found are replaced by 0L
 *  \par assumption: 
 *   \a s only contains pairs of @@'s.
 */
QCString removeIdsAndMarkers(const char *s)
{
  //printf("removeIdsAndMarkers(%s)\n",s);
  const char *p=s;
  char c;
  bool inNum=FALSE;
  QCString result;
  if (p)
  {
    while ((c=*p))
    {
      if (c=='@') // replace @@ with @
      {
	if (*(p+1)=='@')
	{
	  result+=c; 
	}
	p+=2;
      }
      else if (isdigit(c)) // number
      {
	result+=c;
	p++;
        inNum=TRUE;	
      }
      else if (c=='d') // identifier starting with a `d'
      {
	if (strncmp(p,"defined ",8)==0 || strncmp(p,"defined(",8)==0) 
	           // defined keyword
	{
	  p+=7; // skip defined
	}
	else
	{
	  result+="0L";
	  p++;
	  while ((c=*p) && isId(c)) p++;
	}
      }
      else if ((isalpha(c) || c=='_') && !inNum) // replace identifier with 0L
      {
	result+="0L";
	p++;
	while ((c=*p) && isId(c)) p++;
      }
      else 
      {
	result+=c;
	char lc=tolower(c);
	if (lc!='l' && lc!='u') inNum=FALSE;
	p++;
      }
    }
  }
  return result;
}

/*! replaces all occurrences of @@ in \a s by @
 *  \par assumption: 
 *   \a s only contains pairs of @@'s
 */
QCString removeMarkers(const char *s)
{
  const char *p=s;
  char c;
  QCString result;
  if (p)
  {
    while ((c=*p))
    {
      if (c=='@') // replace @@ with @
      {
	if (*(p+1)=='@')
	{
	  result+=c; 
	}
	p+=2;
      }
      else
      {
	result+=c;
	p++;
      }
    }
  }
  return result;
}

/*! compute the value of the expression in string \a expr.
 *  If needed the function may read additional characters from the input.
 */

bool computeExpression(const QCString &expr)
{
  QCString e=expr;
  expandExpression(e,0,0);
  //printf("after expansion `%s'\n",e.data());
  e = removeIdsAndMarkers(e);
  if (e.isEmpty()) return FALSE;
  //printf("parsing `%s'\n",e.data());
  return parseCppExpression(e);
}

/*! expands the macro definition in \a name
 *  If needed the function may read additional characters from the input
 */

QCString expandMacro(const QCString &name)
{
  QCString n=name;
  expandExpression(n,0,0);
  n=removeMarkers(n);
  //printf("expandMacro `%s'->`%s'\n",name.data(),n.data());
  return n;
}

Define *newDefine()
{
  Define *def=new Define;
  def->name = g_defName;
  def->definition = g_defText.stripWhiteSpace();
  def->nargs = g_defArgs;
  def->fileName = g_yyFileName; 
  def->lineNr = g_yyLineNr;
  def->varArgs = g_defVarArgs;
  //printf("newDefine: `%s'->`%s'\n",def->name.data(),def->definition.data());
  if (!def->name.isEmpty() && expandAsDefinedDict[def->name])
  {
    def->isPredefined=TRUE;
  }
  return def;
}

void addDefine()
{
  //printf("addDefine %s %s\n",g_defName.data(),g_defArgsStr.data());
  MemberDef *md=new MemberDef(
      g_yyFileName,g_yyLineNr,
      "#define",g_defName,g_defArgsStr,0,
      Public,Normal,FALSE,FALSE,MemberDef::Define,0,0);
  if (!g_defArgsStr.isEmpty())
  {
    ArgumentList *argList = new ArgumentList;
    //printf("addDefine() g_defName=`%s' g_defArgsStr=`%s'\n",g_defName.data(),g_defArgsStr.data());
    stringToArgumentList(g_defArgsStr,argList);
    md->setArgumentList(argList);
  }
  //printf("Setting initializer for `%s' to `%s'\n",g_defName.data(),g_defText.data());
  md->setInitializer(g_defLitText);
  
  //md->setDefFile(g_yyFileName);
  //md->setDefLine(g_yyLineNr);
  md->setFileDef(g_yyFileDef);
  md->setDefinition("#define "+g_defName);

  MemberName *mn=functionNameDict[g_defName];
  if (mn==0)
  {
    mn = new MemberName(g_defName);
    functionNameList.inSort(mn);
    functionNameDict.insert(g_defName,mn);
  }
  mn->append(md);
  if (g_yyFileDef) g_yyFileDef->insertMember(md);
  
  //Define *d;
  //if ((d=defineDict[g_defName])==0) defineDict.insert(g_defName,newDefine()); 
}

static void outputChar(char c)
{
  if (g_includeStack.isEmpty()) g_outputBuf->addChar(c);
} 

static void outputArray(const char *a,int len)
{
  if (g_includeStack.isEmpty()) g_outputBuf->addArray(a,len);
}

static void readIncludeFile(const QCString &inc)
{
  if (!Config::searchIncludeFlag) return; // do not read include files
  uint i=0;
  
  // find the start of the include file name
  while (i<inc.length() && 
         (inc.at(i)==' ' || inc.at(i)=='"' || inc.at(i)=='<')
	) i++;
  uint s=i;
  
  // was it a local include?
  bool localInclude = s>0 && inc.at(s-1)=='"';
  
  // find the end of the include file name
  while (i<inc.length() && inc.at(i)!='"' && inc.at(i)!='>') i++; 

  if (s<inc.length() && i>s) // valid include file name found
  {
    // extract include path+name
    QCString incFileName=inc.mid(s,i-s).stripWhiteSpace(); 

    FILE *f;
    QCString oldFileName = g_yyFileName.copy();
    FileDef *oldFileDef  = g_yyFileDef;
    //printf("Searching for `%s'\n",incFileName.data());
    if ((f=findFile(incFileName))) // see if the include file can be found
    {
#if SHOW_INCLUDES
      for (i=0;i<g_includeStack.count();i++) msg("  ");
      msg("#include %s: parsing...\n",incFileName.data());
#endif
      if (oldFileDef) 
      {
	// add include dependency to the file in which the #include was found
	oldFileDef->addIncludeDependency(g_yyFileDef,incFileName,localInclude);
	// add included by dependency
        if (g_yyFileDef)
        {
  	  g_yyFileDef->addIncludedByDependency(oldFileDef,oldFileDef->name(),localInclude);
        }
      }
      // store the state of the old file 
      FileState *fs=new FileState;
      fs->bufState=YY_CURRENT_BUFFER;
      fs->lineNr=g_yyLineNr;
      fs->fileName=oldFileName;
      fs->filePtr=f;
      // push the state on the stack
      g_includeStack.push(fs);
      // set the scanner to the include file
      preYYin=f;
      yy_switch_to_buffer(yy_create_buffer(preYYin, YY_BUF_SIZE));
    } 
    else
    {
      if (oldFileDef) 
      {
	bool ambig;
	FileDef *fd = findFileDef(inputNameDict,incFileName,ambig);
	// add include dependency to the file in which the #include was found
	oldFileDef->addIncludeDependency(fd,incFileName,localInclude);
	// add included by dependency
        if (fd)
        {
  	  fd->addIncludedByDependency(oldFileDef,oldFileDef->name(),localInclude);
        }
      }
#if SHOW_INCLUDES
      msg("#include %s: not found! skipping...\n",incFileName.data());
      //printf("Error: include file %s not found\n",yytext);
#endif
    }
  }
}

/* ----------------------------------------------------------------- */

#define Start 1

#define Command 2

#define SkipCommand 3

#define SkipLine 4

#define CopyLine 5

#define Include 6

#define IncludeID 7

#define DefName 8

#define DefineArg 9

#define DefineText 10

#define SkipCPPBlock 11

#define Ifdef 12

#define Ifndef 13

#define SkipCComment 14

#define SkipCPPComment 15

#define RemoveCComment 16

#define RemoveCPPComment 17

#define Guard 18

#define DefinedExpr1 19

#define DefinedExpr2 20

#define SkipDoubleQuote 21

#define SkipSingleQuote 22

#define Ung_defName 23

#define IgnoreLine 24

#define FindDefineArgs 25

#define ReadString 26


/* 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 942 "pre.l"



	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 >= 374 )
					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] != 1645 );

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 944 "pre.l"

	YY_BREAK
case 2:
YY_RULE_SETUP
#line 945 "pre.l"

	YY_BREAK
case 3:
YY_RULE_SETUP
#line 946 "pre.l"

	YY_BREAK
/*
<Start>^{B}*([^ \t#\n\/][^\n]*)?"\n"	{ 
  					  //printf("%s line %d: %s",g_yyFileName.data(),g_yyLineNr,yytext); 
					  if (g_includeStack.isEmpty())
					  {
					    //preprocessedFile+=yytext;
					    //char *s=yytext,c;
					    //if (s) while ((c=*s++)) *dataPtr++=c;
					    g_outputBuf->addArray(yytext,yyleng);
					  }
  					  g_yyLineNr++;
					}
  */
case 4:
YY_RULE_SETUP
#line 960 "pre.l"
{ BEGIN(Command); }
	YY_BREAK
case 5:
*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 961 "pre.l"
{
 					  outputArray(yytext,yyleng); 
  					  BEGIN(CopyLine); 
					}
	YY_BREAK
/*
<CopyLine>[^\n/]+			{
  					  outputArray(yytext,yyleng);
  					}
  */
case 6:
YY_RULE_SETUP
#line 970 "pre.l"
{
  					  Define *def=0;
					  //printf("Search for define %s\n",yytext);
					  if (g_includeStack.isEmpty() &&
					      Config::macroExpansionFlag &&
					      /* (expandDefine=fileDefineCache->findDefine(g_yyFileName,yytext)) */
					      (def=g_fileDefineDict->find(yytext)) &&
					      (!Config::onlyPredefinedFlag || def->isPredefined)
					     )
					  {
					    //printf("Found it!\n");
					    g_roundCount=0;
					    g_defArgsStr=yytext;
					    if (def->nargs==-1) // no function macro
					    {
					      QCString result = expandMacro(g_defArgsStr);
					      //printf("result=`%s'\n",result.data());
					      outputArray(result,result.length());
					    }
					    else // zero or more arguments
					    {
					      g_findDefArgContext = CopyLine;
					      BEGIN(FindDefineArgs);
					    }
					  }
					  else
					  {
					    outputArray(yytext,yyleng);
					  }
  					}
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 1000 "pre.l"
{
                                          Define *def=0;
					  //printf("Search for define %s\n",yytext);
  					  if (g_includeStack.isEmpty() && 
					      Config::macroExpansionFlag &&
					      (def=g_fileDefineDict->find(yytext)) &&
					      def->nargs==-1 &&
					      (!Config::onlyPredefinedFlag || def->isPredefined)
					     )
					  {
					    //printf("Found it!\n");
                                            QCString name=yytext;
					    QCString result=expandMacro(name); 
					    //printf("result=`%s'\n",result.data());
					    outputArray(result,result.length());
					  }
					  else
					  {
					    outputArray(yytext,yyleng);
					  }
  					}
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 1021 "pre.l"
{
  					  outputChar(*yytext);
  					}
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 1024 "pre.l"
{
  					  outputChar('\n');
					  BEGIN(Start);
					  g_yyLineNr++;
  					}
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 1029 "pre.l"
{
  					  g_defArgsStr+='(';
  					  g_roundCount++;
  					}
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 1033 "pre.l"
{
  					  g_defArgsStr+=')';
					  g_roundCount--;
					  if (g_roundCount==0)
					  {
					    //printf("g_defArgsStr=`%s'\n",g_defArgsStr.data());
					    QCString result=expandMacro(g_defArgsStr);
					    if (g_findDefArgContext==CopyLine)
					    {
					      outputArray(result,result.length());
					      BEGIN(g_findDefArgContext);
					    }
					    else // g_findDefArgContext==IncludeID
					    {
					      readIncludeFile(result);
					      BEGIN(Start);
					    }
					  }
  					}
	YY_BREAK
/*
<FindDefineArgs>")"{B}*"("		{
  					  g_defArgsStr+=yytext;
  					}
  */
case 12:
YY_RULE_SETUP
#line 1057 "pre.l"
{
  					  g_defArgsStr+=*yytext;
  					  BEGIN(ReadString);
  					}
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 1061 "pre.l"
{
  					  g_yyLineNr++;
					  outputChar('\n');
  					}
	YY_BREAK
case 14:
YY_RULE_SETUP
#line 1065 "pre.l"
{
  					  g_defArgsStr+="@@";
  					}
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 1068 "pre.l"
{
  					  g_defArgsStr+=*yytext;
  					}
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 1071 "pre.l"
{
  					  g_defArgsStr+=yytext;
  					}
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 1074 "pre.l"
{
  					  g_defArgsStr+=*yytext;
					  BEGIN(FindDefineArgs);
  					}
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 1078 "pre.l"
{
  					  g_defArgsStr+=yytext;
  					}
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 1081 "pre.l"
{
  					  g_defArgsStr+=*yytext;
  					}
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 1084 "pre.l"
{
  					  if (Config::macroExpansionFlag) 
					    BEGIN(IncludeID);
  					}
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 1088 "pre.l"
{ 
					  char c[2];
					  c[0]=yytext[yyleng-1];c[1]='\0';
					  g_incName=c;
  					  BEGIN(Include); 
					}
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 1094 "pre.l"
{ 
  			                  //printf("!!!DefName\n"); 
  					  BEGIN(DefName); 
					}
	YY_BREAK
case 23:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 5;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 1098 "pre.l"
{
  					  incrLevel();
					  g_guardExpr.resize(0);
  					  BEGIN(DefinedExpr2);
  					}
	YY_BREAK
case 24:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 5;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 1103 "pre.l"
{
  					  //printf("Pre.l: ifdef\n");
  					  incrLevel();
					  g_guardExpr.resize(0);
  					  BEGIN(DefinedExpr1);
  					}
	YY_BREAK
case 25:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 6;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 1109 "pre.l"
{
  					  incrLevel();
					  g_guardExpr="! ";
  					  BEGIN(DefinedExpr2);
					}
	YY_BREAK
case 26:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 6;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 1114 "pre.l"
{
  					  incrLevel();
					  g_guardExpr="! ";
  					  BEGIN(DefinedExpr1);
  					}
	YY_BREAK
case 27:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 2;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 1119 "pre.l"
{
  					  incrLevel();
					  g_guardExpr.resize(0);
					  BEGIN(Guard);
					}
	YY_BREAK
case 28:
*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 1124 "pre.l"
{
  					  if (!otherCaseDone())
					  {
					    g_guardExpr.resize(0);
					    BEGIN(Guard);  
					  }
					  else
					  {
					    g_ifcount=0;
					    BEGIN(SkipCPPBlock);
					  }
  					}
	YY_BREAK
case 29:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 4;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 1136 "pre.l"
{
					  //printf("else g_levelGuard[%d]=%d\n",g_level-1,g_levelGuard[g_level-1]);
  					  if (otherCaseDone())
					  {
					    g_ifcount=0;
					    BEGIN(SkipCPPBlock);
					  }
					  else
					  {
					    setCaseDone(TRUE);
					    //g_levelGuard[g_level-1]=TRUE;
					  } 
  					}
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 1149 "pre.l"
{
  					  BEGIN(Ung_defName);
  					}
	YY_BREAK
case 31:
*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 1152 "pre.l"
{
  					  if (!otherCaseDone())
					  {
					    g_guardExpr.resize(0);
  					    BEGIN(Guard);
					  }
  					}
	YY_BREAK
case 32:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 5;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 1159 "pre.l"
{
  					  //printf("Pre.l: #endif\n");
  					  decrLevel();
  					}
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 1163 "pre.l"
{
  					  outputChar('\n');
  					  BEGIN(Start);
					  g_yyLineNr++;
  					}
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 1168 "pre.l"
{ // unknown directive
					  BEGIN(IgnoreLine);
					}
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 1171 "pre.l"

	YY_BREAK
case 36:
YY_RULE_SETUP
#line 1172 "pre.l"

	YY_BREAK
case 37:
YY_RULE_SETUP
#line 1173 "pre.l"
{
  					  Define *def;
  					  if ((def=isDefined(yytext)))
					  {
					    //printf("undefining %s\n",yytext);
					    def->undef=TRUE;
					  }
					  BEGIN(Start);
  					}
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 1182 "pre.l"
{
  					  outputChar('\n');
  					  g_guardExpr+=' ';
					  g_yyLineNr++;
  					}
	YY_BREAK
case 39:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 7;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 1187 "pre.l"
{
    					  BEGIN(DefinedExpr2);
    					}
	YY_BREAK
case 40:
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
yy_c_buf_p = yy_cp = yy_bp + 7;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 1190 "pre.l"
{
    					  BEGIN(DefinedExpr1);
    					}
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 1193 "pre.l"
{ g_guardExpr+=*yytext; }
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 1194 "pre.l"
{
  					  outputChar('\n');
					  g_yyLineNr++;
  					  //printf("Guard: `%s'\n",
					  //    g_guardExpr.data());
					  bool guard=computeExpression(g_guardExpr);
					  setCaseDone(guard);
					  //printf("if g_levelGuard[%d]=%d\n",g_level-1,g_levelGuard[g_level-1]);
					  if (guard)
					  {
					    BEGIN(Start);
					  } 
					  else
					  {
					    g_ifcount=0;
					    BEGIN(SkipCPPBlock);
					  }
  					}
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 1212 "pre.l"
{ g_yyLineNr++; outputChar('\n'); }
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 1213 "pre.l"
{
  					  if (isDefined(yytext))
					    g_guardExpr+=" 1L ";
					  else
					    g_guardExpr+=" 0L ";
					  g_lastGuardName=yytext;
					  BEGIN(Guard);
  					}
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 1221 "pre.l"
{
  					  if (isDefined(yytext))
					    g_guardExpr+=" 1L ";
					  else
					    g_guardExpr+=" 0L ";
					  g_lastGuardName.resize(0);
  					}
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 1228 "pre.l"
{ // should not happen, handle anyway
  					  g_ifcount=0;
 					  BEGIN(SkipCPPBlock); 
					}
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 1232 "pre.l"
{
  					  BEGIN(Guard);
  					}
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 1235 "pre.l"

	YY_BREAK
case 49:
YY_RULE_SETUP
#line 1236 "pre.l"
{ BEGIN(SkipCommand); }
	YY_BREAK
case 50:
*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 1237 "pre.l"
{ BEGIN(SkipLine); }
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 1238 "pre.l"

	YY_BREAK
case 52:
*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 1239 "pre.l"
{ 
  					  incrLevel();
                                          g_ifcount++; 
  					  //printf("#if... depth=%d\n",g_ifcount);
					}
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 1244 "pre.l"
{
					  //printf("Else! g_ifcount=%d otherCaseDone=%d\n",g_ifcount,otherCaseDone());
  					  if (g_ifcount==0 && !otherCaseDone())
					  {
					    setCaseDone(TRUE);
  					    //outputChar('\n');
					    BEGIN(Start);
					  }
  					}
	YY_BREAK
case 54:
*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 1253 "pre.l"
{
  					  if (g_ifcount==0) 
					  {
  					    if (!otherCaseDone())
					    {
					      g_guardExpr.resize(0);
					      g_lastGuardName.resize(0);
  					      BEGIN(Guard);
					    }
					    else
					    {
					      BEGIN(SkipCPPBlock);
					    }
					  }
					}
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 1268 "pre.l"
{ 
  					  decrLevel();
  				          if (--g_ifcount<0)
  					  {
  					    //outputChar('\n');
					    BEGIN(Start);
					  }
					}
	YY_BREAK
case 56:
YY_RULE_SETUP
#line 1276 "pre.l"
{ 
  					  outputChar('\n');
  					  g_yyLineNr++; 
					  BEGIN(SkipCPPBlock);
					}
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 1281 "pre.l"
{ // unknown directive 
  					  BEGIN(SkipLine); 
					}
	YY_BREAK
case 58:
YY_RULE_SETUP
#line 1284 "pre.l"

	YY_BREAK
case 59:
YY_RULE_SETUP
#line 1285 "pre.l"

	YY_BREAK
case 60:
YY_RULE_SETUP
#line 1286 "pre.l"

	YY_BREAK
case 61:
YY_RULE_SETUP
#line 1287 "pre.l"
{
  					  g_lastCPPContext=YY_START;
  					  BEGIN(RemoveCPPComment);
					}
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 1291 "pre.l"
{
					  g_lastCContext=YY_START;
  					  BEGIN(RemoveCComment);
  					}
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 1295 "pre.l"
{
  					  outputChar('\n');
					  g_yyLineNr++;  
					  BEGIN(SkipCPPBlock);
					}
	YY_BREAK
case 64:
*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 1300 "pre.l"
{
				          g_roundCount=0;
					  g_defArgsStr=yytext;
					  g_findDefArgContext = IncludeID;
					  BEGIN(FindDefineArgs);
					}
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 1306 "pre.l"
{
                                          readIncludeFile(expandMacro(yytext));
					  BEGIN(Start);
  					}
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 1310 "pre.l"
{ 
					  g_incName+=yytext;
					  //int l=incName.length();
					  //QCString incFileName=incName.left(l-1);
					  //if (fileDefineCache->fileCached(incFileName))
					  //{
					  //  printf("file already cached!\n");
					  //  fileDefineCache->merge(incFileName,g_yyFileName);
					  //}
					  //else if ((f=findFile(incFileName)))
					  readIncludeFile(g_incName);
					  
					  BEGIN(Start);
  					}
	YY_BREAK
case 67:
*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 1324 "pre.l"
{
  					  //printf("Define() `%s'\n",yytext);
					  g_argDict = new QDict<int>(31);
					  g_argDict->setAutoDelete(TRUE);
					  g_defArgs = 0; 
                                          g_defArgsStr.resize(0);
					  g_defText.resize(0);
					  g_defLitText.resize(0);
					  g_defName = yytext;
					  g_defVarArgs = FALSE;
					  BEGIN(DefineArg);
  					}
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 1336 "pre.l"
{
  					  //printf("Define `%s'\n",yytext);
  					  g_argDict = 0;
					  g_defArgs = -1;
                                          g_defArgsStr.resize(0);
					  g_defText.resize(0);
					  g_defLitText.resize(0);
					  g_defName = yytext;
					  g_defVarArgs = FALSE;
					  QCString tmp=(QCString)"#define "+g_defName+g_defArgsStr;
					  outputArray(tmp.data(),tmp.length());
					  g_quoteArg=FALSE;
					  BEGIN(DefineText); 
  					}
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 1350 "pre.l"
{
  					  g_argDict = 0;
					  g_defArgs = -1;
					  g_defName = yytext;
                                          g_defArgsStr.resize(0);
					  g_defText.resize(0);
					  g_defLitText.resize(0);
					  g_defVarArgs = FALSE;
					  if ( g_defName!=g_lastGuardName )
					  { // define may appear in the output
					    QCString tmp=(QCString)"#define "+g_defName+g_defArgsStr;
					    outputArray(tmp.data(),tmp.length());
					    g_quoteArg=FALSE;
					    BEGIN(DefineText);
					  }
					  else // define is a guard => hide
					  {
					    //printf("Found a guard %s\n",yytext);
  					    Define *def=0;
					    //if (g_includeStack.isEmpty()) 
					    //{
					    //  addDefine();
					    //}
					    if (/*!Config::onlyPredefinedFlag &&*/ (def=g_fileDefineDict->find(g_defName))==0)
					    {
					      g_fileDefineDict->insert(g_defName,newDefine());
					    }
					    else if (def)// name already exists
					    {
					      if (def->undef) // undefined name
					      {
					        def->undef = FALSE;
					        def->name = g_defName;
					        def->definition = g_defText.stripWhiteSpace();
					        def->nargs = g_defArgs;
					        def->fileName = g_yyFileName.copy(); 
					        def->lineNr = g_yyLineNr;
					      }
					      else
					      {
					        //printf("Error: define %s is defined more than once!\n",g_defName.data());
					      }
					    }
  					    //outputChar('\n');
					    g_lastGuardName.resize(0);
					    BEGIN(Start);
					  }
  					}
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 1398 "pre.l"
{ g_defArgsStr+=yytext; }
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 1399 "pre.l"
{ g_defArgsStr+=yytext; }
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 1400 "pre.l"
{
                                          g_defArgsStr+=yytext; 
					  QCString tmp=(QCString)"#define "+g_defName+g_defArgsStr;
					  outputArray(tmp.data(),tmp.length());
					  g_quoteArg=FALSE;
  					  BEGIN(DefineText);
  					}
	YY_BREAK
case 73:
YY_RULE_SETUP
#line 1407 "pre.l"
{
  					  //printf("Define addArg(%s)\n",yytext);
  					  QCString argName=yytext;
  					  g_defVarArgs = yytext[yyleng-1]=='.';
					  if (g_defVarArgs) // strip ellipsis
					    argName=argName.left(argName.length()-3);
                                          g_defArgsStr+=yytext;
					  g_argDict->insert(argName,new int(g_defArgs)); 
					  g_defArgs++;
  					}
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 1417 "pre.l"
{
  					  outputChar('/');outputChar('*');
					  g_defText+=' ';
					  g_defLitText+=' ';
					  g_lastCContext=YY_START;
  					  BEGIN(SkipCComment);
  					}
	YY_BREAK
case 75:
YY_RULE_SETUP
#line 1424 "pre.l"
{
  				          outputChar('/');outputChar('/');
  					  g_lastCPPContext=YY_START;
					  g_defLitText+=' ';
  					  BEGIN(SkipCPPComment);
  					}
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 1430 "pre.l"
{
  					  outputChar('*');outputChar('/');
  					  BEGIN(g_lastCContext);  
  					}
	YY_BREAK
case 77:
YY_RULE_SETUP
#line 1434 "pre.l"
{
  					  outputChar('/');outputChar('/');
  					}
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 1437 "pre.l"
{
  					  outputChar('/');outputChar('*');
  					}
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 1440 "pre.l"
{
  					  outputArray(yytext,yyleng);
  					}
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 1443 "pre.l"
{ 
  					  g_yyLineNr++;
  					  outputChar('\n');
  					}
	YY_BREAK
case 81:
YY_RULE_SETUP
#line 1447 "pre.l"
{
  					  outputChar(*yytext);
  					}
	YY_BREAK
case 82:
YY_RULE_SETUP
#line 1450 "pre.l"
{ BEGIN(g_lastCContext); }
	YY_BREAK
case 83:
YY_RULE_SETUP
#line 1451 "pre.l"

	YY_BREAK
case 84:
YY_RULE_SETUP
#line 1452 "pre.l"

	YY_BREAK
case 85:
YY_RULE_SETUP
#line 1453 "pre.l"

	YY_BREAK
case 86:
YY_RULE_SETUP
#line 1454 "pre.l"
{ g_yyLineNr++; outputChar('\n'); }
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 1455 "pre.l"

	YY_BREAK
case 88:
YY_RULE_SETUP
#line 1456 "pre.l"
{
  					  unput(*yytext);
  					  BEGIN(g_lastCPPContext);
  					}
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 1460 "pre.l"
{
  					  outputChar('/');outputChar('*');
  					}
	YY_BREAK
case 90:
YY_RULE_SETUP
#line 1463 "pre.l"
{
  					  outputChar('/');outputChar('/');
  					}
	YY_BREAK
case 91:
YY_RULE_SETUP
#line 1466 "pre.l"
{
  					  outputArray(yytext,yyleng);
  					}
	YY_BREAK
case 92:
YY_RULE_SETUP
#line 1469 "pre.l"
{
  					  outputChar(*yytext);
  					}
	YY_BREAK
case 93:
YY_RULE_SETUP
#line 1472 "pre.l"

	YY_BREAK
case 94:
YY_RULE_SETUP
#line 1473 "pre.l"

	YY_BREAK
case 95:
YY_RULE_SETUP
#line 1474 "pre.l"

	YY_BREAK
case 96:
YY_RULE_SETUP
#line 1475 "pre.l"

	YY_BREAK
case 97:
YY_RULE_SETUP
#line 1476 "pre.l"
{
  					  g_quoteArg=TRUE;
					  g_defLitText+=yytext;
  					}
	YY_BREAK
case 98:
YY_RULE_SETUP
#line 1480 "pre.l"
{
					  g_defLitText+=yytext;
  					  if (g_quoteArg)
					  {
					    g_defText+="\"";
					  }
					  if (g_defArgs>0)
					  {
					    int *n;
					    if ((n=(*g_argDict)[yytext]))
					    {
					      if (!g_quoteArg) g_defText+=' ';
					      g_defText+='@';
					      QCString numStr;
					      numStr.sprintf("%d",*n);
					      g_defText+=numStr;
					      if (!g_quoteArg) g_defText+=' ';
					    }
					    else
					    {
					      g_defText+=yytext;
					    }
					  }
					  else
					  {
					    g_defText+=yytext;
					  }
					  if (g_quoteArg)
					  {
					    g_defText+="\"";
					  }
					  g_quoteArg=FALSE;
  					}
	YY_BREAK
case 99:
YY_RULE_SETUP
#line 1513 "pre.l"
{ 
					  g_defLitText+=yytext;
  					  outputChar('\n');
  					  g_defText += ' '; g_yyLineNr++; 
					}
	YY_BREAK
case 100:
YY_RULE_SETUP
#line 1518 "pre.l"
{
					  g_defLitText+=yytext;
  					  outputChar('\n');
  					  Define *def=0;
					  //printf("Define name=`%s' text=`%s' litTexti=`%s'\n",g_defName.data(),g_defText.data(),g_defLitText.data());
					  if (g_includeStack.isEmpty()) 
					  {
					    addDefine();
					  }
					  def=g_fileDefineDict->find(g_defName);
					  if (def==0) // new define
					  {
					    //printf("new define!\n");
					    g_fileDefineDict->insert(g_defName,newDefine());
					  }
					  else if (def)// name already exists
					  {
					    //printf("existing define!\n");
					    //printf("define found\n");
					    if (def->undef) // undefined name
					    {
					      def->undef = FALSE;
					      def->name = g_defName;
					      def->definition = g_defText.stripWhiteSpace();
					      def->nargs = g_defArgs;
					      def->fileName = g_yyFileName.copy(); 
					      def->lineNr = g_yyLineNr;
					    }
					    else
					    {
					      //printf("Error: define %s is defined more than once!\n",g_defName.data());
					    }
					  }
					  delete g_argDict; g_argDict=0;
					  g_yyLineNr++;
					  g_lastGuardName.resize(0);
					  BEGIN(Start);
  					}
	YY_BREAK
case 101:
YY_RULE_SETUP
#line 1556 "pre.l"
{ g_defText += ' '; g_defLitText+=yytext; }
	YY_BREAK
case 102:
YY_RULE_SETUP
#line 1557 "pre.l"
{ g_defText += "##"; g_defLitText+=yytext; }
	YY_BREAK
case 103:
YY_RULE_SETUP
#line 1558 "pre.l"
{ g_defText += "@@"; g_defLitText+=yytext; }
	YY_BREAK
case 104:
YY_RULE_SETUP
#line 1559 "pre.l"
{ g_defText += *yytext; 
  					  g_defLitText+=yytext; 
					  BEGIN(SkipDoubleQuote);
  					}
	YY_BREAK
case 105:
YY_RULE_SETUP
#line 1563 "pre.l"
{ g_defText += *yytext;
  					  g_defLitText+=yytext; 
  					  BEGIN(SkipSingleQuote);
					}
	YY_BREAK
case 106:
YY_RULE_SETUP
#line 1567 "pre.l"
{ g_defText += yytext; g_defLitText+=yytext; }
	YY_BREAK
case 107:
YY_RULE_SETUP
#line 1568 "pre.l"
{ g_defText += yytext; g_defLitText+=yytext; }
	YY_BREAK
case 108:
YY_RULE_SETUP
#line 1569 "pre.l"
{
  					  g_defText += *yytext; g_defLitText+=yytext; 
					  BEGIN(DefineText);
  					}
	YY_BREAK
case 109:
YY_RULE_SETUP
#line 1573 "pre.l"
{
  					  g_defText += yytext; g_defLitText+=yytext;
					}
	YY_BREAK
case 110:
YY_RULE_SETUP
#line 1576 "pre.l"
{
  					  g_defText += *yytext; g_defLitText+=yytext;
					  BEGIN(DefineText);
  					}
	YY_BREAK
case 111:
YY_RULE_SETUP
#line 1580 "pre.l"
{ g_defText += *yytext; g_defLitText+=yytext; }
	YY_BREAK
case 112:
YY_RULE_SETUP
#line 1581 "pre.l"
{ g_defText += *yytext; g_defLitText+=yytext; }
	YY_BREAK
case 113:
YY_RULE_SETUP
#line 1582 "pre.l"
{ g_defText += *yytext; g_defLitText+=yytext; }
	YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(Start):
case YY_STATE_EOF(Command):
case YY_STATE_EOF(SkipCommand):
case YY_STATE_EOF(SkipLine):
case YY_STATE_EOF(CopyLine):
case YY_STATE_EOF(Include):
case YY_STATE_EOF(IncludeID):
case YY_STATE_EOF(DefName):
case YY_STATE_EOF(DefineArg):
case YY_STATE_EOF(DefineText):
case YY_STATE_EOF(SkipCPPBlock):
case YY_STATE_EOF(Ifdef):
case YY_STATE_EOF(Ifndef):
case YY_STATE_EOF(SkipCComment):
case YY_STATE_EOF(SkipCPPComment):
case YY_STATE_EOF(RemoveCComment):
case YY_STATE_EOF(RemoveCPPComment):
case YY_STATE_EOF(Guard):
case YY_STATE_EOF(DefinedExpr1):
case YY_STATE_EOF(DefinedExpr2):
case YY_STATE_EOF(SkipDoubleQuote):
case YY_STATE_EOF(SkipSingleQuote):
case YY_STATE_EOF(Ung_defName):
case YY_STATE_EOF(IgnoreLine):
case YY_STATE_EOF(FindDefineArgs):
case YY_STATE_EOF(ReadString):
#line 1583 "pre.l"
{
                                          //printf("End of include file\n");
					  //printf("Include stack depth=%d\n",g_includeStack.count());
  					  if (g_includeStack.isEmpty())
					  {
					    //printf("Terminating scanner!\n");
					    yyterminate();
					  }
					  else
					  {
					    FileState *fs=g_includeStack.pop();
					    //fileDefineCache->merge(g_yyFileName,fs->fileName);
					    if (Config::inputFilter.isEmpty())
					      fclose(fs->filePtr);
					    else
					      pclose(fs->filePtr);
					    YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
					    yy_switch_to_buffer( fs->bufState );
					    yy_delete_buffer( oldBuf );
					    g_yyLineNr=fs->lineNr;
					    setFileName(fs->fileName.copy());
					    //printf("######## FileName %s\n",g_yyFileName.data());
					    delete fs; fs=0;
					  }
  					}
	YY_BREAK
case 114:
YY_RULE_SETUP
#line 1608 "pre.l"
{
					  outputChar('/');outputChar('*');
  					  g_lastCContext=YY_START;
					  BEGIN(SkipCComment);
  					}
	YY_BREAK
case 115:
YY_RULE_SETUP
#line 1613 "pre.l"
{
					  outputChar('/');outputChar('/');
  					  g_lastCPPContext=YY_START;
					  BEGIN(SkipCPPComment);
					}
	YY_BREAK
case 116:
YY_RULE_SETUP
#line 1618 "pre.l"
{ 
  					  outputChar('\n');
  					  g_yyLineNr++; 
					}
	YY_BREAK
case 117:
YY_RULE_SETUP
#line 1622 "pre.l"
{
  					  outputChar(*yytext);
  					}
	YY_BREAK
case 118:
YY_RULE_SETUP
#line 1626 "pre.l"
ECHO;
	YY_BREAK

	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)] : 30);
		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 >= 374 )
				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 = 30;
	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 >= 374 )
			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 == 373);
	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 1626 "pre.l"


/*@ ----------------------------------------------------------------------------
 */

static int getNextChar(const QCString &expr,QCString *rest,uint &pos)
{
  //printf("getNextChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos);
  if (pos<expr.length())
  {
    //printf("%c=expr()\n",expr.at(pos));
    return expr.at(pos++);
  }
  else if (rest && !rest->isEmpty())
  {
    int cc=rest->at(0);
    *rest=rest->right(rest->length()-1);
    //printf("%c=rest\n",cc);
    return cc;
  }
  else
  {
    int cc=yyinput();
    //printf("%c=yyinput()\n",cc);
    return cc;
  }
}
 
static int getCurrentChar(const QCString &expr,QCString *rest,uint pos)
{
  //printf("getCurrentChar(%s,%s,%d)\n",expr.data(),rest ? rest->data() : 0,pos);
  if (pos<expr.length())
  {
    //printf("%c=expr()\n",expr.at(pos));
    return expr.at(pos);
  }
  else if (rest && !rest->isEmpty())
  {
    int cc=rest->at(0);
    //printf("%c=rest\n",cc);
    return cc;
  }
  else
  {
    int cc=yyinput();unput(cc);
    //printf("%c=yyinput()\n",cc);
    return cc;
  }
}

static void unputChar(const QCString &expr,QCString *rest,uint &pos,char c)
{
  //printf("unputChar(%s,%s,%d,%c)\n",expr.data(),rest ? rest->data() : 0,pos,c);
  if (pos<expr.length())
  {
    pos++;
  }
  else if (rest)
  {
    //printf("Prepending to rest!\n");
    char cs[2];cs[0]=c;cs[1]='\0';
    rest->prepend(cs);
  }
  else
  {
    unput(c);
  }
  //printf("result: unputChar(%s,%s,%d,%c)\n",expr.data(),rest ? rest->data() : 0,pos,c);
}

void addSearchDir(const char *dir)
{
  QFileInfo fi(dir);
  if (fi.isDir()) g_pathList->append(fi.absFilePath());
} 

void initPreprocessor()
{
  g_pathList = new QStrList;
  addSearchDir(".");
  //defineNameList.setAutoDelete(TRUE);
  //defineNameList.clear();
  //defineDict.clear();
  //fileDefineCache = new DefineCache(1009);
  g_expandedDict = new DefineDict(17);
  g_fileDefineDict = new DefineDict(1009);
}

void cleanupPreprocessor()
{
  //delete fileDefineCache;
  delete g_fileDefineDict; g_fileDefineDict=0;
  delete g_expandedDict; g_expandedDict=0;
  delete g_pathList; g_pathList=0;
}


void preprocessFile(const char *fileName,BufStr &output)
{
//#if DUMP_OUTPUT  
  uint orgOffset=output.curPos();
//#endif

  g_outputBuf=&output;
  g_includeStack.setAutoDelete(TRUE);
  g_includeStack.clear();
  g_fileDefineDict->setAutoDelete(TRUE);
  g_fileDefineDict->clear();
  g_expandedDict->setAutoDelete(FALSE);
  g_expandedDict->clear();
  
  // add predefined macros
  char *defStr = Config::predefined.first();
  while (defStr)
  {
    //printf("Predefined: `%s'\n",defStr);
    QCString ds = defStr;
    int i_equals=ds.find('=');
    int i_obrace=ds.find('(');
    int i_cbrace=ds.find(')');
    bool nonRecursive = i_equals>0 && ds.at(i_equals-1)==':';
    
    if (i_obrace==0) continue; // no define name
    
    if (i_obrace<i_equals && i_cbrace<i_equals && 
	i_obrace!=-1      && i_cbrace!=-1      && 
	i_obrace<i_cbrace
       ) // predefined function macro definition
    {
      QRegExp reId("[a-z_A-Z][a-z_A-Z0-9]*"); // regexp matching an id
      QDict<int> argDict(17);
      argDict.setAutoDelete(TRUE);
      int i=i_obrace+1,p,l,count=0;
      // gather the formal arguments in a dictionary 
      while (i<i_cbrace && (p=reId.match(ds,i,&l)))
      {
        argDict.insert(ds.mid(p,l),new int(count++));
	i=p+l;
      }
      // strip definition part
      QCString tmp=ds.right(ds.length()-i_equals-1);
      QCString definition;
      i=0;
      // substitute all occurrences of formal arguments by their 
      // corresponding markers
      while ((p=reId.match(tmp,i,&l))!=-1)
      {
        if (p>i) definition+=tmp.mid(i,p-i);
	int *argIndex;
	if ((argIndex=argDict[tmp.mid(p,l)])!=0)
	{
	  QCString marker;
	  marker.sprintf(" @%d ",*argIndex);
	  definition+=marker;
	}
	else
	{
	  definition+=tmp.mid(p,l);
	}
	i=p+l;
      }
      if (i<(int)tmp.length()) definition+=tmp.mid(i,tmp.length()-i);
      
      // add define definition to the dictionary of defines for this file
      Define *def = new Define;
      def->name = ds.left(i_obrace);
      def->definition = definition; 
      def->nargs = count;
      def->isPredefined = TRUE;
      def->nonRecursive = nonRecursive;
      g_fileDefineDict->insert(def->name,def);

      //printf("#define `%s' `%s' #nargs=%d\n",
      //  def->name.data(),def->definition.data(),def->nargs);
    }
    else if ((i_obrace==-1 || i_obrace>i_equals) &&
	     (i_cbrace==-1 || i_cbrace>i_equals) &&
	     !ds.isEmpty() && (int)ds.length()>i_equals
	    ) // predefined non-function macro definition
    {
      Define *def = new Define;
      if (i_equals==-1) // simple define without argument
      {
        def->name = ds;
        def->definition = "1"; // substitute occurrences by 1 (true)
      }
      else // simple define with argument
      {
	int ine=i_equals - (nonRecursive ? 1 : 0);
	def->name = ds.left(ine);
	def->definition = ds.right(ds.length()-i_equals-1);
      }
      def->nargs = -1;
      def->isPredefined = TRUE;
      def->nonRecursive = nonRecursive;
      g_fileDefineDict->insert(def->name,def);

      //printf("#define `%s' `%s' #nargs=%d\n",
      //  def->name.data(),def->definition.data(),def->nargs);
    }
    
    defStr=Config::predefined.next();
  }
 
  if (Config::inputFilter.isEmpty())
  {
    preYYin = fopen(fileName,"r");
    if (!preYYin)
    {
      err("Error: could not open file %s\n",fileName);
      return;
    }
  }
  else
  {
    QCString cmd = Config::inputFilter+" "+fileName;
    preYYin = popen(cmd,"r");
    if (!preYYin)
    {
      err("Error: could not execute filter %s\n",cmd.data());
      return;
    }
  }
  g_yyLineNr = 1;
  g_level    = 0;
  g_ifcount  = 0;
  setFileName(fileName);
  BEGIN( Start );
  
  g_lastGuardName.resize(0);
  g_guardExpr.resize(0);
  
  preYYlex();
  if (Config::inputFilter.isEmpty())
    fclose(preYYin);
  else
    pclose(preYYin);
  
  if (Debug::isFlagSet(Debug::Preprocessor))
  {
    char *orgPos=output.data()+orgOffset;
    char *newPos=output.data()+output.curPos();
    msg("Preprocessor output (size: %d bytes):\n",newPos-orgPos);
    int line=1;
    msg("---------\n00001 ");
    while (orgPos<newPos) 
    {
      putchar(*orgPos);
      if (*orgPos=='\n') printf("%05d ",++line);
      orgPos++;
    }
    msg("\n---------\n");
  }
}

extern "C" { // some bogus code to keep the compiler happy
//  int  preYYwrap() { return 1 ; }
  void preYYdummy() { yy_flex_realloc(0,0); } 
}
