
#line 3 "lex.yy.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>

/* end standard C headers. */

/* flex integer type definitions */

#ifndef FLEXINT_H
#define FLEXINT_H

/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */

#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L

/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
 * if you want the limit (max/min) macros for int types. 
 */
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif

#include <inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t; 
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */

/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN              (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX               (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX              (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX              (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX              (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! FLEXINT_H */

#ifdef __cplusplus

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

#else	/* ! __cplusplus */

/* C99 requires __STDC__ to be defined as 1. */
#if defined (__STDC__)

#define YY_USE_CONST

#endif	/* defined (__STDC__) */
#endif	/* ! __cplusplus */

#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#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. */
#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE 16384
#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif

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

    #define YY_LESS_LINENO(n)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = (yy_hold_char); \
		YY_RESTORE_YY_MORE_OFFSET \
		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

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

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
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;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */
    
	/* 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

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */

/* 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".
 *
 * Returns the top of the stack, or NULL.
 */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]

/* 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 = 0;		/* 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 (FILE *input_file  );
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
void yy_delete_buffer (YY_BUFFER_STATE b  );
void yy_flush_buffer (YY_BUFFER_STATE b  );
void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
void yypop_buffer_state (void );

static void yyensure_buffer_stack (void );
static void yy_load_buffer_state (void );
static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );

#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )

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

void *yyalloc (yy_size_t  );
void *yyrealloc (void *,yy_size_t  );
void yyfree (void *  );

#define yy_new_buffer yy_create_buffer

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

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

#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

/* Begin user sect3 */

typedef unsigned char YY_CHAR;

FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;

typedef int yy_state_type;

extern int yylineno;

int yylineno = 1;

extern char *yytext;
#define yytext_ptr yytext

static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
static int yy_get_next_buffer (void );
static void yy_fatal_error (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 = (size_t) (yy_cp - yy_bp); \
	(yy_hold_char) = *yy_cp; \
	*yy_cp = '\0'; \
	(yy_c_buf_p) = yy_cp;

#define YY_NUM_RULES 223
#define YY_END_OF_BUFFER 224
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
static yyconst flex_int16_t yy_accept[655] =
    {   0,
        0,    0,    0,    0,    0,    0,  193,  193,    0,    0,
        0,    0,  164,  164,   56,   56,    0,    0,  224,  222,
      220,  221,  221,  121,    4,  168,  115,  125,    2,  144,
      145,  113,  111,  155,  112,  150,  114,  170,  170,  153,
      154,  136,  141,  138,  152,  158,  168,  146,  147,  127,
      168,  157,  168,  168,  168,  168,  168,  168,  168,  168,
      168,  168,  168,  168,  168,  168,  168,  168,  168,  148,
      126,  149,  124,  220,  163,  223,  167,  166,  223,  193,
      194,  193,  200,  223,  223,  223,  206,  218,  223,  192,
      178,  177,  223,  164,   56,   55,   57,   69,   70,  223,

      223,  223,  223,  223,  223,  223,  220,  140,  168,  120,
      122,  128,  118,  142,  116,  143,  117,  151,    0,  174,
        1,    0,  119,  173,  169,  170,    0,  170,  170,    0,
      131,  137,  135,  139,  132,    5,    3,  130,  168,  168,
      168,  168,  168,  168,  168,  168,  168,   42,  168,  168,
      168,  168,  168,  168,  168,   46,  168,  168,  168,  168,
      168,  168,  168,  168,  168,  168,  168,  168,  168,  168,
      129,  123,  220,  163,  163,  159,  162,    0,    0,  167,
        0,  165,  193,  194,  200,  201,  200,  202,  195,  198,
      199,  197,  196,    0,  217,    0,    0,  217,    0,    0,

        0,    0,    0,    0,    0,    0,    0,    0,    0,  192,
        0,  176,  191,  190,  179,  181,  188,  185,  189,  186,
      182,  184,  183,  187,  191,  164,   56,   55,   69,    0,
        0,    0,    0,    0,    0,    0,    0,  156,    0,  174,
        0,    6,  172,    0,  173,  169,  169,    0,  175,  170,
      170,  171,  133,  134,  168,  168,  168,  168,  168,  168,
      168,  168,  168,  168,  168,   52,  168,  168,  168,  168,
      168,  168,  168,  168,  168,  168,  168,  168,   44,  168,
      168,  168,   23,  168,  168,  168,   15,  168,  168,  168,
      168,  168,  168,  168,  168,  168,  168,  168,  168,  168,

      168,  168,  168,    0,    0,  219,  216,  215,  203,    0,
        0,  205,  213,  210,  214,  211,  207,  209,  208,  212,
        0,  179,  181,  180,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,  174,    0,
        7,    0,  172,    0,  173,  169,  169,  175,  171,  171,
      168,  168,  168,  168,  168,  168,  168,  168,  168,  168,
      168,  168,  168,  168,  168,  168,  168,    8,  168,   39,
       21,  168,  168,  168,  168,   43,   35,  168,  168,  168,
       45,  168,  168,   18,  168,   24,  168,  168,  168,  168,
      168,  168,  168,  168,  168,  168,  168,  168,   20,  168,

       16,  168,    0,    0,  203,    0,  205,  204,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,   74,
        0,    0,    0,  172,  171,  171,  168,   53,  168,  168,
      168,  168,  168,  168,  168,  168,  168,  168,  168,  168,
      168,  168,  168,  168,   38,   13,  168,  168,  168,  168,
       27,   25,  168,  168,  168,  168,  168,  168,   22,  168,
      168,  168,  168,  168,  168,  168,   37,  168,  168,   51,
      161,  160,    0,    0,    0,    0,    0,    0,    0,    0,
       66,   77,    0,    0,    0,  168,  168,  168,  168,  168,
      168,  168,  168,   99,  168,  168,  168,  101,  168,  168,

      168,  168,  168,  168,  168,   31,    9,   28,   26,  168,
       92,   19,   17,  168,   47,  168,   33,   48,   11,   36,
       50,  168,   89,  168,  168,  161,  160,    0,    0,    0,
        0,   75,    0,    0,    0,   71,    0,   63,  168,   54,
      168,  108,  168,   83,  168,  168,  168,  168,  168,  168,
      168,  168,  168,  168,  168,   96,  168,   41,   32,   49,
      168,  168,   12,  168,  168,    0,   67,   78,    0,    0,
        0,    0,   60,    0,  168,  168,  168,  168,  168,  168,
      100,   93,  168,  168,  102,   85,  168,   90,  168,   40,
       10,  168,   34,   14,    0,    0,    0,   72,   76,    0,

       64,   80,   97,  168,  103,   84,  168,  168,  168,  168,
      107,  168,  109,  168,  168,  168,   61,   68,   79,    0,
        0,    0,  168,  168,  168,  168,  110,   94,  105,   86,
       91,   87,   29,    0,   73,   81,   65,   98,   58,  104,
      168,  168,  168,   30,   62,    0,  168,  168,  106,   88,
       82,   59,   95,    0
    } ;

static yyconst flex_int32_t yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    2,    3,    4,
        3,    3,    5,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    3,    6,    7,    8,    9,   10,   11,   12,   13,
       14,   15,   16,   17,   18,   19,   20,   21,   22,   23,
       24,   24,   22,   22,   22,   25,   25,   26,   27,   28,
       29,   30,   31,   32,   33,   33,   33,   33,   34,   35,
        9,    9,    9,    9,    9,   36,    9,    9,    9,    9,
        9,    9,    9,    9,   37,    9,    9,   38,    9,    9,
       39,   40,   41,   42,   43,   44,   45,   46,   47,   48,

       49,   50,   51,   52,   53,    9,   54,   55,   56,   57,
       58,   59,    9,   60,   61,   62,   63,   64,   65,   66,
       67,   68,   69,   70,   71,   72,    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 flex_int32_t yy_meta[73] =
    {   0,
        1,    1,    1,    2,    1,    1,    3,    1,    4,    1,
        1,    5,    6,    6,    7,    1,    1,    1,    1,    7,
        8,    8,    8,    8,    8,    1,    1,    1,    1,    1,
        1,    1,    8,    8,    8,    4,    4,    4,    1,    9,
        1,    1,    4,    1,    8,    8,    8,    8,    8,    8,
        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
        4,    4,    4,    4,    4,    4,    4,    4,    1,    1,
        1,    1
    } ;

static yyconst flex_int16_t yy_base[680] =
    {   0,
        0,   70,    0,    0,   70,   71,   72,   75,   77,   79,
       78,   89, 1067, 1066,   84,   86,   81,  100, 1069, 1072,
     1065, 1072, 1072, 1038, 1072,    0, 1037,   75, 1072, 1072,
     1072, 1036,   72, 1072,   91,  111,   87,  141,  131, 1072,
     1072,   77, 1035,   93, 1072, 1072,  132, 1072, 1072, 1034,
     1019, 1072,  113, 1001,  128,   93,  115,  129, 1002,  138,
     1010, 1000,  994, 1007,   96,  988,  997,  995, 1000, 1072,
      138, 1072, 1072,  138,  188, 1072, 1011, 1072,  189, 1046,
     1072, 1045,  199,  110, 1044, 1035, 1034, 1033,  240,    0,
     1072,  213,  303,    0,    0,    0, 1072, 1041, 1072, 1000,

      987,  141,  983,  982,  981,  993, 1034, 1072,    0, 1072,
     1072, 1072, 1072, 1072, 1072, 1072, 1072, 1072, 1017,  349,
     1072, 1020, 1072,  384,  185,    0,  208,  164,   72,    0,
     1005, 1072, 1072, 1072, 1004, 1072, 1072, 1072,  376,  979,
      975,  968,  980,  967,  982,  969,  975,  961,  962,  959,
      959,  954,  961,  958,  955,    0,  180,  967,  955,  957,
      951,  188,  954,  134,  138,  958,  951,  184,  194,  956,
     1072, 1072,  238,  255,  290, 1072, 1072,  955,  954,  966,
     1000, 1072, 1000, 1072,  251, 1072,  252, 1072, 1072, 1072,
     1072, 1072, 1072,  991, 1072,  990,  989,  988,  296,  310,

      987,  986,  985,  984,  983,  982,  981,  980,  979,    0,
      334, 1072, 1072, 1072,  333,  354, 1072, 1072, 1072, 1072,
     1072, 1072, 1072, 1072,    0,    0,    0,    0,  987,  344,
      936,  939,  930,  926,  937,  924,  936, 1072,  425, 1072,
      978, 1072,  430,  451, 1072,  197,  170,  389,  465, 1072,
     1072,  232, 1072, 1072,  220,  225,  915,  935,  324,  934,
      929,  239,  910,  918,  924,    0,  916,  928,  923,  911,
      192,  925,  923,  919,  911,  917,  916,  919,    0,  905,
      913,  908,    0,  900,  902,  907,    0,  894,  903,  892,
      894,  896,  903,  889,  887,  887,  899,  889,  893,  897,

      899,  881,  887,  886,  883, 1072, 1072, 1072, 1072,  470,
      484, 1072, 1072, 1072, 1072, 1072, 1072, 1072, 1072, 1072,
      927,  435,  489,    0,  883,  226,  879,  878,  877,  889,
      882,  885,  870,  874,  880,  879,  873,  500,  505,  922,
     1072,  521, 1072,  510,  526, 1072, 1072, 1072,  233,  287,
      872,  868,  861,  873,  242,  859,  859,  874,  863,  868,
      870,  870,  863,  865,  853,  856,  853,    0,  855,    0,
        0,  846,  854,  843,  850,    0,    0,  844,  855,  840,
        0,  835,  843,    0,  850,    0,  851,  836,  836,  833,
      845,  835,  839,  844,  843,  303,  832,  837,    0,  825,

        0,  837,  836,  835, 1072,  542, 1072, 1072,  830,  833,
      824,  820,  831,  818,  830,  819,  820,  812,  828, 1072,
      810,  822,  547,  561, 1072, 1072,  819,  826,  808,  820,
      807,  804,  815,  801,  811,  808,  800,  810,  803,  800,
      809,  806,  809,  795,    0,    0,  795,  796,  801,  792,
      306,  320,  790,  798,  791,  796,  782,  786,  792,  793,
      790,  792,  776,  785,  787,  785,    0,  777,  780,    0,
      829,  828,  779,  782,  767,  771,  777,  776,  770,  774,
     1072, 1072,  760,  758,  772,  762,  775,  764,  761,  760,
      752,  756,  765,  758,  743,  741,  722,  721,  699,  702,

      642,  624,  633,  619,  619,  592,    0,    0,    0,  564,
        0,    0,    0,  564,    0,  559,    0,    0,    0,    0,
        0,  560,    0,  560,  553,  604,  603,  548,  549,  541,
      557,  558,  538,  550,  550, 1072,  535, 1072,  536,    0,
      547,    0,  543,  548,  529,  544,  545,  538,  518,  536,
      535,  529,  520,  524,  520,    0,  510,    0,    0,    0,
      498,  491,    0,  508,  504,  503,  495,  493,  457,  475,
      454,  468, 1072,  447,  453,  439,  433,  455,  444,  429,
        0,  440,  423,  435,    0,  434,  416,  427,  413,    0,
        0,  414,    0,    0,  414,  418,  402,  401, 1072,  382,

      392, 1072,  389,  368,  385,    0,  369,  369,  379,  357,
        0,  373,    0,  372,  353,  349,  353, 1072, 1072,  352,
      336,  349,  347,  339,  344,  325,    0,    0,  325,    0,
        0,  323,  323,  321, 1072,  319, 1072,    0,  316,    0,
      307,  273,  266,    0, 1072,  260,  248,  245,    0,    0,
     1072,    0,    0, 1072,  616,  625,  634,  643,  652,  661,
      670,  676,  684,  693,  701,  709,  718,  727,  736,  745,
      753,  762,  771,  780,  789,  197,  794,  163,  802
    } ;

static yyconst flex_int16_t yy_def[680] =
    {   0,
      654,    1,  655,  655,  656,  656,  657,  657,  658,  658,
      659,  659,  660,  660,  661,  661,  655,  655,  654,  654,
      654,  654,  654,  654,  654,  662,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,   38,  654,
      654,  654,  654,  654,  654,  654,  662,  654,  654,  654,
      662,  654,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  654,
      654,  654,  654,  654,  654,  654,  663,  654,  663,  664,
      654,  664,  665,  666,  667,  668,  654,  668,  669,  670,
      654,  654,  671,  672,  673,  674,  654,  654,  654,  654,

      654,  654,  654,  654,  654,  654,  654,  654,  662,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  675,  654,  654,   38,   39,  654,  654,  654,  676,
      654,  654,  654,  654,  654,  654,  654,  654,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  663,
      663,  654,  664,  654,  665,  654,  665,  654,  654,  654,
      654,  654,  654,  668,  654,  654,  654,  654,  654,  654,

      654,  654,  654,  654,  654,  654,  654,  654,  677,  670,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  678,  672,  673,  674,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      679,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  676,  654,  654,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,

      662,  662,  662,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      677,  654,  654,  678,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  679,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,

      662,  662,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,

      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  654,  654,  654,  654,  654,  654,

      654,  654,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  662,  662,  662,  654,  654,  654,  654,
      654,  654,  662,  662,  662,  662,  662,  662,  662,  662,
      662,  662,  662,  654,  654,  654,  654,  662,  662,  662,
      662,  662,  662,  662,  654,  654,  662,  662,  662,  662,
      654,  662,  662,    0,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654
    } ;

static yyconst flex_int16_t yy_nxt[1145] =
    {   0,
       20,   20,   21,   22,   23,   24,   25,   20,   26,   27,
       28,   29,   30,   31,   32,   33,   34,   35,   36,   37,
       38,   39,   39,   39,   39,   40,   41,   42,   43,   44,
       45,   46,   26,   26,   26,   47,   26,   26,   48,   20,
       49,   50,   51,   52,   53,   54,   55,   56,   57,   58,
       59,   26,   60,   61,   62,   26,   26,   63,   26,   64,
       65,   66,   67,   68,   69,   26,   26,   26,   70,   71,
       72,   73,   74,   78,   78,   81,   82,   75,   81,   82,
       87,   91,   87,   98,   92,  111,   83,  114,   88,   83,
       88,   84,   91,   99,   84,   92,   96,   97,   96,   97,

      115,  121,   98,  112,  131,  132,  122,  251,  116,   79,
       79,   85,   99,  190,   85,  123,   89,   93,   89,  117,
      118,  134,  135,  100,  191,  101,  251,  102,   93,  119,
      103,  120,  120,  120,  120,  120,  104,  105,  136,  106,
      173,  147,  100,  137,  101,  174,  102,  163,  164,  103,
      148,  126,  126,  126,  126,  104,  105,  165,  106,  124,
      166,  125,  125,  125,  125,  126,  171,  140,  654,  149,
      324,  150,  144,  141,  127,  142,  128,  129,  130,  145,
      151,  152,  294,  153,  292,  146,  154,  156,  232,  127,
      175,  176,  182,  654,  157,  128,  654,  295,  233,  158,

      250,  293,  186,  129,  252,  347,  130,  172,  177,  177,
      177,  177,  177,  187,  211,  211,  211,  211,  188,  212,
      246,  247,  654,  248,  347,  248,  250,  281,  249,  249,
      249,  249,  249,  346,  282,  288,  298,  178,  289,  246,
      173,  283,  179,  197,  299,  174,  300,  247,  301,  290,
      654,  198,  372,  373,  186,  186,  302,  175,  176,  346,
      199,  199,  199,  199,  200,  654,  187,  349,  350,  425,
      654,  188,  354,  410,  351,  177,  177,  177,  177,  177,
      352,  353,  355,  411,  201,  202,  349,  653,  203,  204,
      652,  363,  175,  176,  350,  425,  205,  431,  432,  206,

      364,  207,  651,  208,  178,  209,  214,  309,  650,  179,
      177,  177,  177,  177,  177,  649,  310,  310,  310,  310,
      311,  312,  426,  215,  215,  215,  215,  216,  508,  508,
      311,  311,  311,  311,  311,  211,  211,  211,  211,  178,
      212,  426,  509,  509,  179,  644,  644,  217,  218,  648,
      465,  219,  220,  322,  322,  322,  322,  323,  647,  221,
      466,  646,  222,  645,  223,  643,  224,  642,  225,  120,
      120,  120,  120,  120,  323,  323,  323,  323,  323,  358,
      359,  641,  239,  240,  240,  360,  640,  639,  325,  638,
      326,  637,  636,  327,  635,  634,  633,  239,  240,  328,

      329,  632,  330,  240,  243,  243,  243,  243,  243,  249,
      249,  249,  249,  249,  631,  630,  629,  244,  245,  245,
      255,  628,  256,  627,  257,  258,  626,  625,  259,  624,
      260,  623,  244,  245,  622,  261,  262,  263,  245,  264,
      338,  621,  338,  620,  619,  339,  339,  339,  339,  339,
      243,  243,  243,  243,  243,  322,  322,  322,  322,  323,
      618,  617,  616,  342,  343,  343,  344,  615,  344,  614,
      613,  345,  345,  345,  345,  345,  612,  611,  342,  343,
      610,  405,  609,  608,  343,  249,  249,  249,  249,  249,
      406,  406,  406,  406,  311,  407,  607,  606,  605,  348,

      348,  604,  603,  602,  311,  311,  311,  311,  311,  323,
      323,  323,  323,  323,  348,  601,  600,  599,  598,  348,
      339,  339,  339,  339,  339,  339,  339,  339,  339,  339,
      345,  345,  345,  345,  345,  597,  423,  596,  423,  240,
      240,  424,  424,  424,  424,  424,  345,  345,  345,  345,
      345,  595,  594,  405,  240,  593,  592,  591,  590,  240,
      245,  245,  311,  311,  311,  311,  311,  424,  424,  424,
      424,  424,  589,  588,  587,  245,  586,  585,  584,  583,
      245,  424,  424,  424,  424,  424,  582,  581,  580,  579,
      578,  577,  576,  575,  574,  343,  343,  573,  572,  571,

      570,  569,  568,  567,  566,  527,  526,  565,  564,  563,
      343,  562,  561,  560,  559,  343,   76,   76,   76,   76,
       76,   76,   76,   76,   76,   77,   77,   77,   77,   77,
       77,   77,   77,   77,   80,   80,   80,   80,   80,   80,
       80,   80,   80,   86,   86,   86,   86,   86,   86,   86,
       86,   86,   90,   90,   90,   90,   90,   90,   90,   90,
       90,   94,   94,   94,   94,   94,   94,   94,   94,   94,
       95,   95,   95,   95,   95,   95,   95,   95,   95,  109,
      558,  557,  556,  109,  180,  555,  180,  180,  180,  180,
      180,  180,  180,  183,  183,  183,  183,  183,  183,  554,

      183,  185,  185,  185,  185,  185,  185,  185,  185,  189,
      189,  189,  189,  189,  189,  189,  189,  189,  192,  192,
      192,  192,  192,  192,  192,  192,  192,  194,  194,  194,
      194,  194,  194,  194,  194,  194,  196,  196,  196,  196,
      196,  196,  196,  196,  196,  210,  553,  552,  210,  210,
      210,  210,  210,  213,  213,  213,  213,  213,  213,  213,
      213,  213,  226,  551,  226,  226,  226,  226,  226,  226,
      226,  227,  227,  227,  227,  227,  550,  227,  227,  227,
      228,  228,  228,  228,  228,  549,  228,  228,  228,  241,
      241,  241,  241,  241,  241,  241,  241,  241,  321,  548,

      547,  321,  340,  340,  340,  340,  340,  340,  340,  340,
      340,  546,  545,  544,  543,  542,  541,  540,  539,  538,
      537,  536,  535,  534,  533,  532,  531,  530,  529,  528,
      527,  526,  525,  524,  523,  522,  521,  520,  519,  518,
      517,  516,  515,  514,  513,  512,  511,  510,  507,  506,
      505,  504,  503,  502,  501,  500,  499,  498,  497,  496,
      495,  494,  493,  492,  491,  490,  489,  488,  487,  486,
      485,  484,  483,  482,  481,  480,  479,  478,  477,  476,
      475,  474,  473,  472,  471,  470,  469,  468,  467,  464,
      463,  462,  461,  460,  459,  458,  457,  456,  455,  454,

      453,  452,  451,  450,  449,  448,  447,  446,  445,  444,
      443,  442,  441,  440,  439,  438,  437,  436,  435,  434,
      433,  430,  429,  428,  427,  341,  422,  421,  420,  419,
      418,  417,  416,  415,  414,  413,  412,  409,  408,  404,
      403,  402,  401,  400,  399,  398,  397,  396,  395,  394,
      393,  392,  391,  390,  389,  388,  387,  386,  385,  384,
      383,  382,  381,  380,  379,  378,  377,  376,  375,  374,
      371,  370,  369,  368,  367,  366,  365,  362,  361,  357,
      356,  341,  337,  336,  335,  334,  333,  332,  331,  229,
      307,  320,  319,  318,  317,  316,  315,  314,  313,  307,

      308,  307,  306,  184,  654,  181,  305,  304,  303,  297,
      296,  291,  287,  286,  285,  284,  280,  279,  278,  277,
      276,  275,  274,  273,  272,  271,  270,  269,  268,  267,
      266,  265,  254,  253,  242,  238,  107,  237,  236,  235,
      234,  231,  230,  229,  654,  195,  195,  193,  184,  184,
      181,  170,  169,  168,  167,  162,  161,  160,  159,  155,
      143,  139,  138,  133,  113,  110,  108,  107,  654,   76,
       76,   19,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,

      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654
    } ;

static yyconst flex_int16_t yy_chk[1145] =
    {   0,
        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,    2,    5,    6,    7,    7,    2,    8,    8,
        9,   11,   10,   17,   11,   28,    7,   33,    9,    8,
       10,    7,   12,   17,    8,   12,   15,   15,   16,   16,

       33,   37,   18,   28,   42,   42,   37,  129,   35,    5,
        6,    7,   18,   84,    8,   37,    9,   11,   10,   35,
       35,   44,   44,   17,   84,   17,  129,   17,   12,   36,
       17,   36,   36,   36,   36,   36,   17,   17,   47,   17,
       74,   56,   18,   47,   18,   74,   18,   65,   65,   18,
       56,   39,   39,   39,   39,   18,   18,   65,   18,   38,
       65,   38,   38,   38,   38,   38,   71,   53,   39,   57,
      678,   57,   55,   53,   38,   53,   38,   38,   38,   55,
       57,   58,  165,   58,  164,   55,   58,   60,  102,   38,
       75,   75,   79,   79,   60,   38,   39,  165,  102,   60,

      128,  164,   83,   38,  676,  247,   38,   71,   75,   75,
       75,   75,   75,   83,   92,   92,   92,   92,   83,   92,
      125,  125,  125,  127,  247,  127,  128,  157,  127,  127,
      127,  127,  127,  246,  157,  162,  168,   75,  162,  125,
      173,  157,   75,   89,  168,  173,  169,  125,  169,  162,
      125,   89,  271,  271,  185,  187,  169,  174,  174,  246,
       89,   89,   89,   89,   89,  185,  187,  252,  252,  349,
      185,  187,  256,  326,  255,  174,  174,  174,  174,  174,
      255,  255,  256,  326,   89,   89,  252,  648,   89,   89,
      647,  262,  175,  175,  252,  349,   89,  355,  355,   89,

      262,   89,  646,   89,  174,   89,   93,  199,  643,  174,
      175,  175,  175,  175,  175,  642,  199,  199,  199,  199,
      199,  200,  350,   93,   93,   93,   93,   93,  451,  451,
      200,  200,  200,  200,  200,  211,  211,  211,  211,  175,
      211,  350,  452,  452,  175,  633,  633,   93,   93,  641,
      396,   93,   93,  215,  215,  215,  215,  215,  639,   93,
      396,  636,   93,  634,   93,  632,   93,  629,   93,  120,
      120,  120,  120,  120,  216,  216,  216,  216,  216,  259,
      259,  626,  120,  120,  120,  259,  625,  624,  230,  623,
      230,  622,  621,  230,  620,  617,  616,  120,  120,  230,

      230,  615,  230,  120,  124,  124,  124,  124,  124,  248,
      248,  248,  248,  248,  614,  612,  610,  124,  124,  124,
      139,  609,  139,  608,  139,  139,  607,  605,  139,  604,
      139,  603,  124,  124,  601,  139,  139,  139,  124,  139,
      239,  600,  239,  598,  597,  239,  239,  239,  239,  239,
      243,  243,  243,  243,  243,  322,  322,  322,  322,  322,
      596,  595,  592,  243,  243,  243,  244,  589,  244,  588,
      587,  244,  244,  244,  244,  244,  586,  584,  243,  243,
      583,  310,  582,  580,  243,  249,  249,  249,  249,  249,
      310,  310,  310,  310,  310,  311,  579,  578,  577,  249,

      249,  576,  575,  574,  311,  311,  311,  311,  311,  323,
      323,  323,  323,  323,  249,  572,  571,  570,  569,  249,
      338,  338,  338,  338,  338,  339,  339,  339,  339,  339,
      344,  344,  344,  344,  344,  568,  342,  567,  342,  339,
      339,  342,  342,  342,  342,  342,  345,  345,  345,  345,
      345,  566,  565,  406,  339,  564,  562,  561,  557,  339,
      345,  345,  406,  406,  406,  406,  406,  423,  423,  423,
      423,  423,  555,  554,  553,  345,  552,  551,  550,  549,
      345,  424,  424,  424,  424,  424,  548,  547,  546,  545,
      544,  543,  541,  539,  537,  424,  424,  535,  534,  533,

      532,  531,  530,  529,  528,  527,  526,  525,  524,  522,
      424,  516,  514,  510,  506,  424,  655,  655,  655,  655,
      655,  655,  655,  655,  655,  656,  656,  656,  656,  656,
      656,  656,  656,  656,  657,  657,  657,  657,  657,  657,
      657,  657,  657,  658,  658,  658,  658,  658,  658,  658,
      658,  658,  659,  659,  659,  659,  659,  659,  659,  659,
      659,  660,  660,  660,  660,  660,  660,  660,  660,  660,
      661,  661,  661,  661,  661,  661,  661,  661,  661,  662,
      505,  504,  503,  662,  663,  502,  663,  663,  663,  663,
      663,  663,  663,  664,  664,  664,  664,  664,  664,  501,

      664,  665,  665,  665,  665,  665,  665,  665,  665,  666,
      666,  666,  666,  666,  666,  666,  666,  666,  667,  667,
      667,  667,  667,  667,  667,  667,  667,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  669,  669,  669,  669,
      669,  669,  669,  669,  669,  670,  500,  499,  670,  670,
      670,  670,  670,  671,  671,  671,  671,  671,  671,  671,
      671,  671,  672,  498,  672,  672,  672,  672,  672,  672,
      672,  673,  673,  673,  673,  673,  497,  673,  673,  673,
      674,  674,  674,  674,  674,  496,  674,  674,  674,  675,
      675,  675,  675,  675,  675,  675,  675,  675,  677,  495,

      494,  677,  679,  679,  679,  679,  679,  679,  679,  679,
      679,  493,  492,  491,  490,  489,  488,  487,  486,  485,
      484,  483,  480,  479,  478,  477,  476,  475,  474,  473,
      472,  471,  469,  468,  466,  465,  464,  463,  462,  461,
      460,  459,  458,  457,  456,  455,  454,  453,  450,  449,
      448,  447,  444,  443,  442,  441,  440,  439,  438,  437,
      436,  435,  434,  433,  432,  431,  430,  429,  428,  427,
      422,  421,  419,  418,  417,  416,  415,  414,  413,  412,
      411,  410,  409,  404,  403,  402,  400,  398,  397,  395,
      394,  393,  392,  391,  390,  389,  388,  387,  385,  383,

      382,  380,  379,  378,  375,  374,  373,  372,  369,  367,
      366,  365,  364,  363,  362,  361,  360,  359,  358,  357,
      356,  354,  353,  352,  351,  340,  337,  336,  335,  334,
      333,  332,  331,  330,  329,  328,  327,  325,  321,  305,
      304,  303,  302,  301,  300,  299,  298,  297,  296,  295,
      294,  293,  292,  291,  290,  289,  288,  286,  285,  284,
      282,  281,  280,  278,  277,  276,  275,  274,  273,  272,
      270,  269,  268,  267,  265,  264,  263,  261,  260,  258,
      257,  241,  237,  236,  235,  234,  233,  232,  231,  229,
      209,  208,  207,  206,  205,  204,  203,  202,  201,  198,

      197,  196,  194,  183,  181,  180,  179,  178,  170,  167,
      166,  163,  161,  160,  159,  158,  155,  154,  153,  152,
      151,  150,  149,  148,  147,  146,  145,  144,  143,  142,
      141,  140,  135,  131,  122,  119,  107,  106,  105,  104,
      103,  101,  100,   98,   88,   87,   86,   85,   82,   80,
       77,   69,   68,   67,   66,   64,   63,   62,   61,   59,
       54,   51,   50,   43,   32,   27,   24,   21,   19,   14,
       13,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,

      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654,  654,  654,  654,  654,  654,  654,
      654,  654,  654,  654
    } ;

static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;

extern int yy_flex_debug;
int yy_flex_debug = 0;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "lexer.l"
#line 3 "lexer.l"
/*  o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o

    CTool Library
    Copyright (C) 1998-2001	Shaun Flisakowski

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 1, or (at your option)
    any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

    o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o+o  */

#undef yywrap
extern "C" int yywrap(void);

#define  YY_BUFFER_STATE_DEFD

#include <cstdio>
#include <cstdlib>
#include <string>
#include <cerrno>

#include "config.h"
#include "gram.h"
#include "lexer.h"
#include "token.h"
#include "symbol.h"
#include "express.h"
#include "stemnt.h"
#include "project.h"

#ifdef   WINDOWS
#    ifndef  __STDC__
#    define  __STDC__    1
#    endif

int isatty(int) { return 1; }

#endif  /* WINDOWS */

int   err_top_level =0;
int   err_cnt = 0;
int   err_tok = 0;
bool  possibleType = true;
bool  possibleTag = false;
bool  possibleLabel = false;

bool file_ppln=false;
int  in_preprocess = 0;
int  in_charconst = 0;

int  gcc2_paren_cnt = 0;

char  tokn_buff[MAX_TOKN_LEN];
char *tokn_end = &tokn_buff[MAX_TOKN_LEN-1];
char *tokn_ptr=tokn_buff;

int cnt_nl(char *txt, int len);

bool  isWide;

#undef YY_INPUT

/* Scan input from a file pointer (default) */

std::string line, last_line;
std::istream *yyinstream;

#define YY_INPUT(buf,result,max_size) \
    do { \
        last_line=line; \
        for(result=0; result<max_size; result++) \
         { \
          char ch; \
          if(!yyinstream->read(&ch, 1)) \
           { \
            if(result==0) result=YY_NULL; \
            break; \
           } \
          if(result==0) line=""; \
          line+=ch; \
          buf[result]=ch; \
          if(ch=='\n') { result++; break; } \
         } \
    } while(0)

#define YY_USER_ACTION \
    { \
        gProject->Parse_TOS->yycolno = gProject->Parse_TOS->yynxtcol; \
        gProject->Parse_TOS->yynxtcol += yyleng; \
    }


#undef HERE
#define HERE Location(gProject->Parse_TOS->yylineno, \
       gProject->Parse_TOS->yycolno, gProject->Parse_TOS->transUnit->filename )

#undef SETPOS_TOKEN
#define SETPOS_TOKEN(TOKEN) \
	do { \
          lvalp->loc = new Location( \
                gProject->Parse_TOS->yylineno, \
                gProject->Parse_TOS->yycolno,  \
                gProject->Parse_TOS->transUnit->filename ); \
	} while(0)

#undef  LAST_STATE
#define LAST_STATE() \
        do { \
          if (in_preprocess) \
            BEGIN(PP); \
          else \
            BEGIN(INITIAL); \
        } while (0)  

#undef  BEGIN_PP
#define BEGIN_PP() \
        do { \
          BEGIN(PP); \
          in_preprocess = 1; \
        } while(0)

YYSTYPE my_var;

EXTERN int yylex ARGS((YYSTYPE *lvalp));

/*  To give some args to yylex */
#undef YY_DECL
#ifdef  __STDC__
/*  #define YY_DECL int yylex YY_PROTO((YYSTYPE *lvalp))  */
#define YY_DECL int yylex (YYSTYPE *lvalp)
#else
#define YY_DECL int yylex(lvalp) YYSTYPE *lvalp;
#endif


/* %option nounput */
#line 1070 "lex.yy.c"

#define INITIAL 0
#define Start 1
#define PP 2
#define CMMT 3
#define CC 4
#define STR 5
#define PPLN 6
#define GCC_ELIM 7
#define GCC_ATTRIB 8

#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif

static int yy_init_globals (void );

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int yylex_destroy (void );

int yyget_debug (void );

void yyset_debug (int debug_flag  );

YY_EXTRA_TYPE yyget_extra (void );

void yyset_extra (YY_EXTRA_TYPE user_defined  );

FILE *yyget_in (void );

void yyset_in  (FILE * in_str  );

FILE *yyget_out (void );

void yyset_out  (FILE * out_str  );

int yyget_leng (void );

char *yyget_text (void );

int yyget_lineno (void );

void yyset_lineno (int line_number  );

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

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

    static void yyunput (int c,char *buf_ptr  );
    
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif

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

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (void );
#else
static int input (void );
#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 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_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		int 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 \
		{ \
		errno=0; \
		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
			clearerr(yyin); \
			} \
		}\
\

#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

/* end tables serialization structures and prototypes */

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1

extern int yylex (void);

#define YY_DECL int yylex (void)
#endif /* !YY_DECL */

/* 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_LVALUE->yy_at_bol = \
				(yytext[yyleng - 1] == '\n'); \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
	register yy_state_type yy_current_state;
	register char *yy_cp, *yy_bp;
	register int yy_act;
    
#line 176 "lexer.l"


#line 1258 "lex.yy.c"

	if ( !(yy_init) )
		{
		(yy_init) = 1;

#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 ) {
			yyensure_buffer_stack ();
			YY_CURRENT_BUFFER_LVALUE =
				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_match:
		do
			{
			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
			if ( yy_accept[yy_current_state] )
				{
				(yy_last_accepting_state) = yy_current_state;
				(yy_last_accepting_cpos) = 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 >= 655 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
			++yy_cp;
			}
		while ( yy_base[yy_current_state] != 1072 );

yy_find_action:
		yy_act = yy_accept[yy_current_state];
		if ( yy_act == 0 )
			{ /* have to back up */
			yy_cp = (yy_last_accepting_cpos);
			yy_current_state = (yy_last_accepting_state);
			yy_act = 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 0: /* must back up */
			/* undo the effects of YY_DO_BEFORE_ACTION */
			*yy_cp = (yy_hold_char);
			yy_cp = (yy_last_accepting_cpos);
			yy_current_state = (yy_last_accepting_state);
			goto yy_find_action;

case 1:
YY_RULE_SETUP
#line 178 "lexer.l"
{ BEGIN(CMMT); }
	YY_BREAK
case 2:
YY_RULE_SETUP
#line 179 "lexer.l"
{ BEGIN(CC); isWide = false; }
	YY_BREAK
case 3:
YY_RULE_SETUP
#line 180 "lexer.l"
{ BEGIN(CC); isWide = true; }
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 181 "lexer.l"
{ BEGIN(STR);   tokn_ptr = tokn_buff; isWide = false; }
	YY_BREAK
case 5:
YY_RULE_SETUP
#line 182 "lexer.l"
{ BEGIN(STR);   tokn_ptr = tokn_buff; isWide = true; }
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 184 "lexer.l"
{ // Ambiguous C++ style comment, must parse as
                      //    '/' '/*' to be Ansi compliant 
                         yywarn(
                            "Ambiguous C++ comment, use '/ /*' -or- '// *'");
                         yyless(2);
                         SETPOS_TOKEN(DIV);
                         return(DIV);
                    }
	YY_BREAK
case 7:
/* rule 7 can match eol */
*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 193 "lexer.l"
{ /* C++ style comment */
#if 0
			 /* Brook supports C++ comments.  --Jeremy. */
                         if (cpp_comment_warn){
                             cpp_comment_warn = 0;
                             yywarn("C++ style comment encountered");
                         }
#endif
                     }
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 203 "lexer.l"
{
                      lvalp->storage = ST_Auto;
                      return(err_tok = AUTO);
                    }
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 207 "lexer.l"
{
                      lvalp->storage = ST_Extern;
                      return(err_tok = EXTRN);
                    }
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 211 "lexer.l"
{
                      lvalp->storage = ST_Register;
                      return(err_tok = REGISTR);
                    }
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 215 "lexer.l"
{
                      lvalp->storage = ST_Static;
                      return(err_tok = STATIC);
                    }
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 219 "lexer.l"
{
                      lvalp->storage = ST_Typedef;
                      return(err_tok = TYPEDEF);
                    }
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 224 "lexer.l"
{
                      lvalp->typeQual = TQ_Const;
                      return(err_tok = CONST);
                    }
	YY_BREAK
case 14:
YY_RULE_SETUP
#line 228 "lexer.l"
{
                      lvalp->typeQual = TQ_Volatile;
                      return(err_tok = VOLATILE);
                    }
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 232 "lexer.l"
{
                      lvalp->typeQual = TQ_Out;
                      return(err_tok = OUT);
                    }
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 236 "lexer.l"
{
                      lvalp->typeQual = TQ_Vout;
                      return(err_tok = VOUT);
                    }
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 240 "lexer.l"
{
                      lvalp->typeQual = TQ_Reduce;
                      return(err_tok = REDUCE);
                    }
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 244 "lexer.l"
{
                      lvalp->typeQual = TQ_Iter;
                      return(err_tok = ITER);
                    }
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 248 "lexer.l"
{
                      lvalp->typeQual = TQ_Kernel;
                      return(err_tok = KERNEL);
                    }
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 253 "lexer.l"
{
                      lvalp->base = new BaseType(BT_Void);
                      return(err_tok = VOID);
                    }
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 257 "lexer.l"
{
                      lvalp->base = new BaseType(BT_Char);
                      return(err_tok = CHAR);
                    }
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 261 "lexer.l"
{
                      lvalp->base = new BaseType(BT_Short);
                      return(err_tok = SHORT);
                    }
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 265 "lexer.l"
{
                      lvalp->base = new BaseType(BT_Int);
                      return(err_tok = INT);
                    }
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 269 "lexer.l"
{
                      lvalp->base = new BaseType(BT_Long);
                      return(err_tok = LONG);
                    }
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 273 "lexer.l"
{
                      lvalp->base = new BaseType(BT_Float);
                      return(err_tok = FLOAT);
                    }
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 277 "lexer.l"
{
		      int n = yytext[yyleng -1] - '1'; /* There is no float1 */

                      lvalp->base = new BaseType(BT_Float * (1<<n));
                      return(err_tok = FLOAT + n);
                    }
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 283 "lexer.l"
{
                      lvalp->base = new BaseType(BT_Fixed);
                      return(err_tok = FIXED);
                    }
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 287 "lexer.l"
{
		      int n = yytext[yyleng -1] - '1'; /* There is no float1 */
                      lvalp->base = new BaseType(BT_Fixed * (1<<n));
                      return(err_tok = FIXED + n);
                    }
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 292 "lexer.l"
{
                      lvalp->base = new BaseType(BT_ShortFixed);
                      return(err_tok = SHORTFIXED);
                    }
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 296 "lexer.l"
{
		      int n = yytext[yyleng -1] - '1'; /* There is no float1 */

                      lvalp->base = new BaseType(BT_ShortFixed * (1<<n));
                      return(err_tok = SHORTFIXED + n);
                    }
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 302 "lexer.l"
{
                      lvalp->base = new BaseType(BT_Double);
                      return(err_tok = DOUBLE);
                    }
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 306 "lexer.l"
{
                      lvalp->base = new BaseType(BT_Double2);
                      return(err_tok = DOUBLE2);
                    }
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 310 "lexer.l"
{
                      lvalp->base = new BaseType(BT_Signed);
                      return(err_tok = SGNED);
                    }
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 314 "lexer.l"
{
                      lvalp->base = new BaseType(BT_UnSigned);
                      return(err_tok = UNSGNED);
                    }                   
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 318 "lexer.l"
{
                      lvalp->typeSpec = BT_Enum;
                      possibleTag = true;
                      return(err_tok = ENUM);
                    }
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 323 "lexer.l"
{ 
                      lvalp->typeSpec = BT_Struct;
                      possibleTag = true;
                      return(err_tok = STRUCT);
                    }
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 328 "lexer.l"
{ 
                      lvalp->typeSpec = BT_Union;
                      possibleTag = true;
                      return(err_tok = UNION);
                    }
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 333 "lexer.l"
{ SETPOS_TOKEN(BREAK); return(BREAK); }
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 334 "lexer.l"
{ SETPOS_TOKEN(CASE); return(CASE); }
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 335 "lexer.l"
{ SETPOS_TOKEN(CONT); return(CONT); }
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 336 "lexer.l"
{ SETPOS_TOKEN(DEFLT); return(DEFLT); }
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 337 "lexer.l"
{ SETPOS_TOKEN(DO); return(DO); }
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 338 "lexer.l"
{ SETPOS_TOKEN(ELSE); return(ELSE); }
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 339 "lexer.l"
{ SETPOS_TOKEN(FOR); return(FOR); }
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 340 "lexer.l"
{ SETPOS_TOKEN(GOTO); 
                      possibleLabel = true;
                      return(GOTO); }
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 343 "lexer.l"
{ SETPOS_TOKEN(IF); return(IF); }
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 344 "lexer.l"
{ SETPOS_TOKEN(RETURN); return(RETURN); }
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 345 "lexer.l"
{ SETPOS_TOKEN(SIZEOF); return(SIZEOF); }
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 346 "lexer.l"
{ SETPOS_TOKEN(INDEXOF); return(INDEXOF); }
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 347 "lexer.l"
{ SETPOS_TOKEN(SWITCH); return(SWITCH); }
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 348 "lexer.l"
{ SETPOS_TOKEN(WHILE); return(WHILE); }
	YY_BREAK
/* GCC2 Extensions */
case 52:
YY_RULE_SETUP
#line 351 "lexer.l"
{ BEGIN(GCC_ELIM); }
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 352 "lexer.l"
{ BEGIN(GCC_ELIM); }
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 353 "lexer.l"
{ BEGIN(GCC_ELIM); }
	YY_BREAK
case 55:
/* rule 55 can match eol */
YY_RULE_SETUP
#line 355 "lexer.l"
{ gcc2_paren_cnt++; }
	YY_BREAK
case 56:
/* rule 56 can match eol */
YY_RULE_SETUP
#line 356 "lexer.l"
{ /* Throw away */ }
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 357 "lexer.l"
{ if (--gcc2_paren_cnt == 0)
                          BEGIN(INITIAL);
                      }
	YY_BREAK
case 58:
YY_RULE_SETUP
#line 361 "lexer.l"
{ BEGIN(GCC_ATTRIB); return(err_tok = ATTRIBUTE); }
	YY_BREAK
case 59:
YY_RULE_SETUP
#line 362 "lexer.l"
{ BEGIN(GCC_ATTRIB); return(err_tok = ATTRIBUTE); }
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 364 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = ALIGNED); }
	YY_BREAK
case 61:
YY_RULE_SETUP
#line 365 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = ALIGNED); }
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 366 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = ALIGNED); }
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 367 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = PACKED); }
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 368 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = PACKED); }
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 369 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = PACKED); }
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 370 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = CDECL); }
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 371 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = CDECL); }
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 372 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = CDECL); }
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 374 "lexer.l"
{  /* space/tab/formfeed/vertical tab (ignore) */ }
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 375 "lexer.l"
{ SETPOS_TOKEN(LPAREN); return(LPAREN); }
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 377 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = FORMAT); }
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 378 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = FORMAT); }
	YY_BREAK
case 73:
YY_RULE_SETUP
#line 379 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = FORMAT); }
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 380 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = MODE); }
	YY_BREAK
case 75:
YY_RULE_SETUP
#line 381 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = MODE); }
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 382 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = MODE); }
	YY_BREAK
case 77:
YY_RULE_SETUP
#line 383 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = CONST); }
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 384 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = CONST); }
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 385 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = CONST); }
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 386 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = NORETURN); }
	YY_BREAK
case 81:
YY_RULE_SETUP
#line 387 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = NORETURN); }
	YY_BREAK
case 82:
YY_RULE_SETUP
#line 388 "lexer.l"
{ BEGIN(INITIAL); return(err_tok = NORETURN); }
	YY_BREAK
case 83:
YY_RULE_SETUP
#line 390 "lexer.l"
{
                      lvalp->typeQual = TQ_Const;
                      return(err_tok = CONST);
                    }
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 395 "lexer.l"
{
                        lvalp->typeQual = TQ_Const;
                        return(err_tok = CONST);
                      }
	YY_BREAK
case 85:
YY_RULE_SETUP
#line 399 "lexer.l"
{
                      lvalp->type = new BaseType(BT_Signed);
                      return(err_tok = SGNED);
                    }
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 403 "lexer.l"
{
                        lvalp->type = new BaseType(BT_Signed);
                        return(err_tok = SGNED);
                      }
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 407 "lexer.l"
{
                        lvalp->typeQual = TQ_Volatile;
                        return(err_tok = VOLATILE);
                      }
	YY_BREAK
case 88:
YY_RULE_SETUP
#line 411 "lexer.l"
{
                          lvalp->typeQual = TQ_Volatile;
                          return(err_tok = VOLATILE);
                        }
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 416 "lexer.l"
{ }
	YY_BREAK
case 90:
YY_RULE_SETUP
#line 417 "lexer.l"
{ }
	YY_BREAK
case 91:
YY_RULE_SETUP
#line 418 "lexer.l"
{ }
	YY_BREAK
case 92:
YY_RULE_SETUP
#line 420 "lexer.l"
{ }
	YY_BREAK
case 93:
YY_RULE_SETUP
#line 421 "lexer.l"
{ }
	YY_BREAK
case 94:
YY_RULE_SETUP
#line 422 "lexer.l"
{ }
	YY_BREAK
case 95:
YY_RULE_SETUP
#line 424 "lexer.l"
{ }
	YY_BREAK
case 96:
YY_RULE_SETUP
#line 426 "lexer.l"
{ }
	YY_BREAK
case 97:
YY_RULE_SETUP
#line 427 "lexer.l"
{ }
	YY_BREAK
case 98:
YY_RULE_SETUP
#line 428 "lexer.l"
{ }
	YY_BREAK
case 99:
YY_RULE_SETUP
#line 430 "lexer.l"
{ }
	YY_BREAK
case 100:
YY_RULE_SETUP
#line 431 "lexer.l"
{ }
	YY_BREAK
case 101:
YY_RULE_SETUP
#line 432 "lexer.l"
{ }
	YY_BREAK
case 102:
YY_RULE_SETUP
#line 433 "lexer.l"
{ }
	YY_BREAK
case 103:
YY_RULE_SETUP
#line 434 "lexer.l"
{ }
	YY_BREAK
case 104:
YY_RULE_SETUP
#line 435 "lexer.l"
{ }
	YY_BREAK
case 105:
YY_RULE_SETUP
#line 436 "lexer.l"
{ }
	YY_BREAK
case 106:
YY_RULE_SETUP
#line 437 "lexer.l"
{ }
	YY_BREAK
case 107:
YY_RULE_SETUP
#line 438 "lexer.l"
{ }
	YY_BREAK
case 108:
YY_RULE_SETUP
#line 440 "lexer.l"
{ /* Windows only non-standard C crud */ }
	YY_BREAK
case 109:
YY_RULE_SETUP
#line 441 "lexer.l"
{ /* Windows only non-standard C crud */ }
	YY_BREAK
case 110:
YY_RULE_SETUP
#line 442 "lexer.l"
{ /* Windows only non-standard C crud */ }
	YY_BREAK
case 111:
YY_RULE_SETUP
#line 445 "lexer.l"
{ lvalp->binOp = BO_Plus; return(PLUS); }
	YY_BREAK
case 112:
YY_RULE_SETUP
#line 446 "lexer.l"
{ lvalp->binOp = BO_Minus; return(MINUS); }
	YY_BREAK
case 113:
YY_RULE_SETUP
#line 447 "lexer.l"
{ lvalp->binOp = BO_Mult; return(STAR); }
	YY_BREAK
case 114:
YY_RULE_SETUP
#line 448 "lexer.l"
{ lvalp->binOp = BO_Div; return(DIV); }
	YY_BREAK
case 115:
YY_RULE_SETUP
#line 449 "lexer.l"
{ lvalp->binOp = BO_Mod; return(MOD); }
	YY_BREAK
case 116:
YY_RULE_SETUP
#line 451 "lexer.l"
{ lvalp->assignOp = AO_PlusEql; return(ASSIGN); }
	YY_BREAK
case 117:
YY_RULE_SETUP
#line 452 "lexer.l"
{ lvalp->assignOp = AO_MinusEql; return(ASSIGN); }
	YY_BREAK
case 118:
YY_RULE_SETUP
#line 453 "lexer.l"
{ lvalp->assignOp = AO_MultEql; return(ASSIGN); }
	YY_BREAK
case 119:
YY_RULE_SETUP
#line 454 "lexer.l"
{ lvalp->assignOp = AO_DivEql; return(ASSIGN); }
	YY_BREAK
case 120:
YY_RULE_SETUP
#line 455 "lexer.l"
{ lvalp->assignOp = AO_ModEql; return(ASSIGN); }
	YY_BREAK
case 121:
YY_RULE_SETUP
#line 457 "lexer.l"
{ SETPOS_TOKEN(NOT); return(NOT); }
	YY_BREAK
case 122:
YY_RULE_SETUP
#line 458 "lexer.l"
{ SETPOS_TOKEN(AND); return(AND); }
	YY_BREAK
case 123:
YY_RULE_SETUP
#line 459 "lexer.l"
{ SETPOS_TOKEN(OR); return(OR); }
	YY_BREAK
case 124:
YY_RULE_SETUP
#line 461 "lexer.l"
{ SETPOS_TOKEN(B_NOT); return(B_NOT); }
	YY_BREAK
case 125:
YY_RULE_SETUP
#line 462 "lexer.l"
{ SETPOS_TOKEN(B_AND); return(B_AND); }
	YY_BREAK
case 126:
YY_RULE_SETUP
#line 463 "lexer.l"
{ SETPOS_TOKEN(B_OR); return(B_OR); }
	YY_BREAK
case 127:
YY_RULE_SETUP
#line 464 "lexer.l"
{ SETPOS_TOKEN(B_XOR); return(B_XOR); }
	YY_BREAK
case 128:
YY_RULE_SETUP
#line 466 "lexer.l"
{ lvalp->assignOp = AO_BitAndEql; return(ASSIGN); }
	YY_BREAK
case 129:
YY_RULE_SETUP
#line 467 "lexer.l"
{ lvalp->assignOp = AO_BitOrEql; return(ASSIGN); }
	YY_BREAK
case 130:
YY_RULE_SETUP
#line 468 "lexer.l"
{ lvalp->assignOp = AO_BitXorEql; return(ASSIGN); }
	YY_BREAK
case 131:
YY_RULE_SETUP
#line 470 "lexer.l"
{ lvalp->binOp = BO_Shl; return(L_SHIFT); }
	YY_BREAK
case 132:
YY_RULE_SETUP
#line 471 "lexer.l"
{ lvalp->binOp = BO_Shr; return(R_SHIFT); }
	YY_BREAK
case 133:
YY_RULE_SETUP
#line 472 "lexer.l"
{ lvalp->assignOp = AO_ShlEql; return(ASSIGN); }
	YY_BREAK
case 134:
YY_RULE_SETUP
#line 473 "lexer.l"
{ lvalp->assignOp = AO_ShrEql; return(ASSIGN); }
	YY_BREAK
case 135:
YY_RULE_SETUP
#line 475 "lexer.l"
{ lvalp->relOp = RO_Equal; return(COMP_EQ); }
	YY_BREAK
case 136:
YY_RULE_SETUP
#line 476 "lexer.l"
{ lvalp->relOp = RO_Less; return(COMP_LESS); }
	YY_BREAK
case 137:
YY_RULE_SETUP
#line 477 "lexer.l"
{ lvalp->relOp = RO_LessEql; return(COMP_ARITH); }
	YY_BREAK
case 138:
YY_RULE_SETUP
#line 478 "lexer.l"
{ lvalp->relOp = RO_Grtr; return(COMP_GRTR); }
	YY_BREAK
case 139:
YY_RULE_SETUP
#line 479 "lexer.l"
{ lvalp->relOp = RO_GrtrEql; return(COMP_ARITH); }
	YY_BREAK
case 140:
YY_RULE_SETUP
#line 480 "lexer.l"
{ lvalp->relOp = RO_NotEqual; return(COMP_EQ); }
	YY_BREAK
case 141:
YY_RULE_SETUP
#line 482 "lexer.l"
{ lvalp->assignOp = AO_Equal; return(EQ); }
	YY_BREAK
case 142:
YY_RULE_SETUP
#line 483 "lexer.l"
{ SETPOS_TOKEN(INCR); return(INCR); }
	YY_BREAK
case 143:
YY_RULE_SETUP
#line 484 "lexer.l"
{ SETPOS_TOKEN(DECR); return(DECR); }
	YY_BREAK
case 144:
YY_RULE_SETUP
#line 486 "lexer.l"
{ SETPOS_TOKEN(LPAREN);
                      possibleType = true;
                      return(LPAREN);
                    }
	YY_BREAK
case 145:
YY_RULE_SETUP
#line 490 "lexer.l"
{ SETPOS_TOKEN(RPAREN); return(RPAREN); }
	YY_BREAK
case 146:
YY_RULE_SETUP
#line 491 "lexer.l"
{ SETPOS_TOKEN(LBRCKT); return(LBRCKT); }
	YY_BREAK
case 147:
YY_RULE_SETUP
#line 492 "lexer.l"
{ SETPOS_TOKEN(RBRCKT); return(RBRCKT); }
	YY_BREAK
case 148:
YY_RULE_SETUP
#line 493 "lexer.l"
{ SETPOS_TOKEN(LBRACE); 
                      possibleTag = false;
                      return(LBRACE); }
	YY_BREAK
case 149:
YY_RULE_SETUP
#line 496 "lexer.l"
{ SETPOS_TOKEN(RBRACE); return(RBRACE); }
	YY_BREAK
case 150:
YY_RULE_SETUP
#line 498 "lexer.l"
{ SETPOS_TOKEN(DOT); return(DOT); }
	YY_BREAK
case 151:
YY_RULE_SETUP
#line 499 "lexer.l"
{ SETPOS_TOKEN(ARROW); return(ARROW); }
	YY_BREAK
case 152:
YY_RULE_SETUP
#line 501 "lexer.l"
{ SETPOS_TOKEN(QUESTMARK); return(QUESTMARK); }
	YY_BREAK
case 153:
YY_RULE_SETUP
#line 502 "lexer.l"
{ SETPOS_TOKEN(COLON); return(COLON); }
	YY_BREAK
case 154:
YY_RULE_SETUP
#line 503 "lexer.l"
{ SETPOS_TOKEN(SEMICOLON); return(SEMICOLON); }
	YY_BREAK
case 155:
YY_RULE_SETUP
#line 504 "lexer.l"
{ SETPOS_TOKEN(COMMA); return(COMMA); }
	YY_BREAK
case 156:
YY_RULE_SETUP
#line 505 "lexer.l"
{ SETPOS_TOKEN(ELLIPSIS); return(ELLIPSIS); }
	YY_BREAK
/* Unused (invalid) characters */
case 157:
YY_RULE_SETUP
#line 508 "lexer.l"
{ SETPOS_TOKEN(BACKQUOTE); return(BACKQUOTE); }
	YY_BREAK
case 158:
YY_RULE_SETUP
#line 509 "lexer.l"
{ SETPOS_TOKEN(AT); return(AT); }
	YY_BREAK
/* Preprocessor Stuff */
case 159:
/* rule 159 can match eol */
YY_RULE_SETUP
#line 512 "lexer.l"
{ gProject->Parse_TOS->yylineno++;
                             gProject->Parse_TOS->yynxtcol = 0; }
	YY_BREAK
case 160:
YY_RULE_SETUP
#line 515 "lexer.l"
{ BEGIN(PPLN); }
	YY_BREAK
case 161:
YY_RULE_SETUP
#line 516 "lexer.l"
{ file_ppln=true; BEGIN(PPLN); }
	YY_BREAK
case 162:
YY_RULE_SETUP
#line 517 "lexer.l"
{ BEGIN(PPLN); yyless(1); }
	YY_BREAK
case 163:
YY_RULE_SETUP
#line 518 "lexer.l"
{ BEGIN_PP(); tokn_ptr = tokn_buff; *tokn_ptr++ = '#'; }
	YY_BREAK
case 164:
YY_RULE_SETUP
#line 520 "lexer.l"
{ 
                       BEGIN_PP();
                       if (get_lineno(file_ppln,yytext,&(lvalp->stemnt)))
							return (err_tok = PP_LINE);
                }
	YY_BREAK
case 165:
/* rule 165 can match eol */
YY_RULE_SETUP
#line 526 "lexer.l"
{  /* Preprocessor continuation line */
                         gProject->Parse_TOS->yylineno++;
                         gProject->Parse_TOS->yynxtcol = 0;
			 if (tokn_ptr + 2 < tokn_end) {
			    *tokn_ptr++ = '\\';
			    *tokn_ptr++ = '\n';
			 } else {
                            yywarn("Preprocessor directive too long");
			 }
                       }
	YY_BREAK
case 166:
/* rule 166 can match eol */
YY_RULE_SETUP
#line 537 "lexer.l"
{  /* End of this preprocessor logical line */
                         *tokn_ptr = '\0';
                         file_ppln=false;
                         in_preprocess = 0;
                         yyless(0);        /* Hack! */
			 LAST_STATE();
                         lvalp->stemnt =
                           new PPDirective(std::string(tokn_buff,tokn_ptr-tokn_buff),HERE);
                         return(err_tok = PP_DIR);
                       }
	YY_BREAK
case 167:
YY_RULE_SETUP
#line 548 "lexer.l"
{
			    int n = yyleng;
			    if (tokn_ptr + n < tokn_end) {
				memcpy(tokn_ptr,yytext,n);
				tokn_ptr += n;
			    } else {
			       yywarn("Preprocessor directive too long");
			    }
                         }
	YY_BREAK
case 168:
YY_RULE_SETUP
#line 558 "lexer.l"
{    /* Identifier */

                         lvalp->symbol = new Symbol();
                       
                         lvalp->symbol->name = yytext;

                         if (possibleTag)
                         {
                           /* Check the tag table and insert a  */
                           /* ptr back to the definition.  */
                           SymEntry *se
                              = gProject->Parse_TOS->transUnit->contxt.tags->Lookup(
                                    lvalp->symbol->name);
                           lvalp->symbol->entry = se;
                           possibleTag = false;
                           return(err_tok = TAG_NAME);
                         }
                         else if (possibleLabel)
                         {
                           /* Check the tag table and insert a  */
                           /* ptr back to the definition.  */
                           SymEntry *se
                              = gProject->Parse_TOS->transUnit->contxt.labels->LookupAt(
                                    lvalp->symbol->name,FUNCTION_SCOPE);
                           lvalp->symbol->entry = se;
                           if (!se)
                               gProject->Parse_TOS->transUnit->contxt.labels
                                   ->InsertAt(lvalp->symbol->entry = mk_label(lvalp->symbol->name, NULL), 
                                       FUNCTION_SCOPE);

                           possibleLabel = false;
                           return(err_tok = LABEL_NAME);
                         }
                         else {
                           /* Check the symbol table and insert a  */
                           /* ptr back to the definition.  */
                           SymEntry *se
                              = gProject->Parse_TOS->transUnit->contxt.syms->Lookup(
                                    lvalp->symbol->name);
                           lvalp->symbol->entry = se;
 
                            if (possibleType)
                            {
                              if (se && se->IsTypeDef())
                              {
                                  return(err_tok = TYPEDEF_NAME);
                              }
                            }
                         }

                         return(err_tok = IDENT);
                       }
	YY_BREAK
case 169:
#line 612 "lexer.l"
case 170:
#line 613 "lexer.l"
case 171:
YY_RULE_SETUP
#line 613 "lexer.l"
{  /* An integer */
                         long i = strtol(yytext, (char**) NULL, 0);

                         if (errno == ERANGE)
                         {
                            unsigned long ui;
                            ui = strtoul(yytext, (char**) NULL, 0);
                            lvalp->consValue = new UIntConstant(ui,HERE);
                         }
                         else
                         { 
                             lvalp->consValue = new IntConstant(i,HERE);
                         } 

                         return(err_tok = INUM);
                    }
	YY_BREAK
case 172:
#line 631 "lexer.l"
case 173:
#line 632 "lexer.l"
case 174:
#line 633 "lexer.l"
case 175:
YY_RULE_SETUP
#line 633 "lexer.l"
{
                         /*
                         ** Note: The floatsuffix, if any, will be
                         ** ignored by atof().
                         */
                         lvalp->consValue = new FloatConstant(atof(yytext),HERE);
                         return(err_tok = RNUM);
                       }
	YY_BREAK
case 176:
/* rule 176 can match eol */
YY_RULE_SETUP
#line 642 "lexer.l"
{   /* String Pasting */
                         cnt_nl(yytext,yyleng);
                       }
	YY_BREAK
case 177:
YY_RULE_SETUP
#line 646 "lexer.l"
{   /* Closing quote */
                         LAST_STATE();
                         *tokn_ptr = '\0';
                         lvalp->consValue =
                           new StringConstant(std::string(tokn_buff,tokn_ptr-tokn_buff),HERE,isWide);
                         return(err_tok = STRING);
                       }
	YY_BREAK
case 178:
/* rule 178 can match eol */
YY_RULE_SETUP
#line 654 "lexer.l"
{ /* Error - unterminated string constant */
                         yyerr("Unterminated string constant starting");
                         LAST_STATE();
                         return(INVALID);
                       }
	YY_BREAK
case 179:
YY_RULE_SETUP
#line 660 "lexer.l"
{ /* octal escape sequence */
                         uint result;
                         char tmpOct[20];

                         strncpy(tmpOct,yytext,yyleng);
                         tmpOct[yyleng] = '\0';
                         tmpOct[4] = '\0';

                         if (yyleng > 4)
                             yyless(4);

                         if (sscanf(tmpOct+1, "%o", &result ) < 1)
                         {
                             yyerr("Invalid octal escape sequence");
                             LAST_STATE();
                             return(INVALID);
                         }

                             /* error, constant is out-of-bounds */
                         if ( result > 0xff ){
                            yyerr("Escape sequence out-of-bounds");
                         }

                         if (tokn_ptr < tokn_end)
                            *tokn_ptr++ = result;
                         else
                            yywarn("String constant too long");
                       }
	YY_BREAK
case 180:
YY_RULE_SETUP
#line 689 "lexer.l"
{   /* hex escape sequence - ISO C */
                         uint result;

                         if (sscanf(yytext+2, "%x", &result ) < 1)
                         {
                             yyerr("Invalid hex escape sequence");
                             LAST_STATE();
                             return(INVALID);
                         }

                             /* error, constant is out-of-bounds */
                         if ( result > 0xff ){
                            yyerr("Escape sequence out-of-bounds");
                         } else if (yyleng > 4){
                            yywarn("Hexadecimal escape exceeds two chars");
                         }

                         if (tokn_ptr < tokn_end)
                            *tokn_ptr++ = result;
                         else
                            yywarn("String constant too long");
                       }
	YY_BREAK
case 181:
YY_RULE_SETUP
#line 712 "lexer.l"
{  /* Bad escape sequence */
                         yywarn("Bad escape sequence in string");
                        *tokn_ptr++ = '?';
                       }
	YY_BREAK
case 182:
YY_RULE_SETUP
#line 717 "lexer.l"
{
                         if (tokn_ptr < tokn_end)
                           *tokn_ptr++ = '\n';
                         else
                            yywarn("String constant too long");
                       }
	YY_BREAK
case 183:
YY_RULE_SETUP
#line 724 "lexer.l"
{
                         if (tokn_ptr < tokn_end)
                           *tokn_ptr++ = '\t';
                         else
                            yywarn("String constant too long");
                       }
	YY_BREAK
case 184:
YY_RULE_SETUP
#line 731 "lexer.l"
{
                         if (tokn_ptr < tokn_end)
                           *tokn_ptr++ = '\r';
                         else
                            yywarn("String constant too long");
                       }
	YY_BREAK
case 185:
YY_RULE_SETUP
#line 738 "lexer.l"
{
                         if (tokn_ptr < tokn_end)
                           *tokn_ptr++ = '\b';
                         else
                            yywarn("String constant too long");
                       }
	YY_BREAK
case 186:
YY_RULE_SETUP
#line 745 "lexer.l"
{
                         if (tokn_ptr < tokn_end)
                           *tokn_ptr++ = '\f';
                         else
                            yywarn("String constant too long");
                       }
	YY_BREAK
case 187:
YY_RULE_SETUP
#line 752 "lexer.l"
{
                         if (tokn_ptr < tokn_end)
                           *tokn_ptr++ = '\v';
                         else
                            yywarn("String constant too long");
                       }
	YY_BREAK
case 188:
YY_RULE_SETUP
#line 759 "lexer.l"
{
                         if (tokn_ptr < tokn_end)
                           *tokn_ptr++ = '\a';
                         else
                            yywarn("String constant too long");
                       }
	YY_BREAK
case 189:
YY_RULE_SETUP
#line 766 "lexer.l"
{
                         if (tokn_ptr < tokn_end)
                           *tokn_ptr++ = ESC_VAL;
                         else
                            yywarn("String constant too long");
                       }
	YY_BREAK
case 190:
/* rule 190 can match eol */
YY_RULE_SETUP
#line 773 "lexer.l"
{  /* String continuation */
                         gProject->Parse_TOS->yylineno++;
                         gProject->Parse_TOS->yynxtcol = 0;
                       }
	YY_BREAK
case 191:
YY_RULE_SETUP
#line 778 "lexer.l"
{
                         if (tokn_ptr < tokn_end)
                           *tokn_ptr++ = yytext[1];
                         else
                            yywarn("String constant too long");
                       }
	YY_BREAK
case 192:
YY_RULE_SETUP
#line 785 "lexer.l"
{
                         int n = yyleng;
                         if (tokn_ptr + n < tokn_end) {
                             memcpy(tokn_ptr,yytext,n);
                             tokn_ptr += n;
                         } else 
                            yywarn("String constant too long");
                       }
	YY_BREAK
case 193:
YY_RULE_SETUP
#line 794 "lexer.l"
{   /* Inside C-style comment */ }
	YY_BREAK
case 194:
/* rule 194 can match eol */
YY_RULE_SETUP
#line 796 "lexer.l"
{
                         gProject->Parse_TOS->yylineno++;
                         gProject->Parse_TOS->yynxtcol = 0;
                         in_preprocess = 0;
                       }
	YY_BREAK
case 195:
YY_RULE_SETUP
#line 801 "lexer.l"
{ }
	YY_BREAK
case 196:
/* rule 196 can match eol */
YY_RULE_SETUP
#line 802 "lexer.l"
{
                         gProject->Parse_TOS->yylineno++;
                         gProject->Parse_TOS->yynxtcol = 0;
                       }
	YY_BREAK
case 197:
YY_RULE_SETUP
#line 806 "lexer.l"
{
                       }
	YY_BREAK
case 198:
/* rule 198 can match eol */
YY_RULE_SETUP
#line 808 "lexer.l"
{
                         gProject->Parse_TOS->yylineno++;
                         gProject->Parse_TOS->yynxtcol = 0;
                         in_preprocess = 0;
                       }
	YY_BREAK
case 199:
YY_RULE_SETUP
#line 813 "lexer.l"
{ yywarn("/* inside comment"); }
	YY_BREAK
case 200:
YY_RULE_SETUP
#line 814 "lexer.l"
{   /* Stars */ }
	YY_BREAK
case 201:
/* rule 201 can match eol */
YY_RULE_SETUP
#line 815 "lexer.l"
{
                         gProject->Parse_TOS->yylineno++;
                         gProject->Parse_TOS->yynxtcol = 0;
                         in_preprocess = 0;
                       }
	YY_BREAK
case 202:
YY_RULE_SETUP
#line 820 "lexer.l"
{
                         LAST_STATE();
                       }
	YY_BREAK
case 203:
YY_RULE_SETUP
#line 824 "lexer.l"
{   /* octal escape sequence */
                         uint result;

                         if (sscanf(yytext+1, "%o", &result ) < 1)
                         {
                             yyerr("Invalid octal escape sequence");
                             LAST_STATE();
                             return(INVALID);
                         }
                         
                             /* error, constant is out-of-bounds */
                         if ( result > 0xff ){
                             yywarn("Escape sequence out-of-bounds");
                             result = 0;
                         }

                         lvalp->consValue = new CharConstant((char) result, HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 204:
YY_RULE_SETUP
#line 845 "lexer.l"
{   /* hex escape sequence - ISO C */
                         uint result;

                         if (sscanf(yytext+2, "%x", &result ) < 1)
                         {
                             yyerr("Invalid hex escape sequence");
                             LAST_STATE();
                             return(INVALID);
                         }

                             /* error, constant is out-of-bounds */
                         if ( result > 0xff ){
                             yywarn("Escape sequence out-of-bounds");
                             result = 0;
                         } else if (yyleng > 5){
                             yywarn("Hexadecimal escape exceeds two chars");
                             result = 0;
                         }

                         lvalp->consValue = new CharConstant((char) result, HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 205:
YY_RULE_SETUP
#line 869 "lexer.l"
{  /* Bad escape sequence */
                         yywarn("Bad escape sequence in char constant");
                         lvalp->consValue = new CharConstant('\0',HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 206:
/* rule 206 can match eol */
YY_RULE_SETUP
#line 876 "lexer.l"
{ /* Error unterminated char constant */
                         gProject->Parse_TOS->yylineno++;
                         gProject->Parse_TOS->yynxtcol = 0;
                         yywarn("Unterminated char constant");
                         lvalp->consValue = new CharConstant('\0',HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 207:
YY_RULE_SETUP
#line 885 "lexer.l"
{
                         lvalp->consValue = new CharConstant('\n',HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 208:
YY_RULE_SETUP
#line 891 "lexer.l"
{
                         lvalp->consValue = new CharConstant('\t',HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 209:
YY_RULE_SETUP
#line 897 "lexer.l"
{
                         lvalp->consValue = new CharConstant('\r',HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 210:
YY_RULE_SETUP
#line 903 "lexer.l"
{
                         lvalp->consValue = new CharConstant('\b',HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 211:
YY_RULE_SETUP
#line 909 "lexer.l"
{
                         lvalp->consValue = new CharConstant('\f',HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 212:
YY_RULE_SETUP
#line 915 "lexer.l"
{
                         lvalp->consValue = new CharConstant('\v',HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 213:
YY_RULE_SETUP
#line 921 "lexer.l"
{
                         lvalp->consValue = new CharConstant('\a',HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 214:
YY_RULE_SETUP
#line 927 "lexer.l"
{
                         lvalp->consValue = new CharConstant(ESC_VAL,HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 215:
/* rule 215 can match eol */
YY_RULE_SETUP
#line 933 "lexer.l"
{
                         gProject->Parse_TOS->yylineno++;
                         gProject->Parse_TOS->yynxtcol = 1;  /* Oddity */
                         lvalp->consValue = new CharConstant('\n',HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 216:
YY_RULE_SETUP
#line 941 "lexer.l"
{
                         lvalp->consValue = new CharConstant(yytext[1],HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 217:
/* rule 217 can match eol */
YY_RULE_SETUP
#line 947 "lexer.l"
{
                         lvalp->consValue = new CharConstant(*yytext,HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 218:
YY_RULE_SETUP
#line 953 "lexer.l"
{ /* Empty */
                         yywarn("Empty character constant");
                         lvalp->consValue = new CharConstant('\0',HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 219:
/* rule 219 can match eol */
YY_RULE_SETUP
#line 960 "lexer.l"
{ /* Multiple characters */
                         yywarn("Invalid character constant");
                         lvalp->consValue = new CharConstant('\0',HERE,isWide);
                         LAST_STATE();
                         return(err_tok = CHAR_CONST);
                       }
	YY_BREAK
case 220:
YY_RULE_SETUP
#line 967 "lexer.l"
{  /* space/tab/formfeed/vertical tab (ignore) */ }
	YY_BREAK
case 221:
/* rule 221 can match eol */
YY_RULE_SETUP
#line 969 "lexer.l"
{ gProject->Parse_TOS->yylineno++;
                         gProject->Parse_TOS->yynxtcol = 0;
                         in_preprocess = 0;
                       }
	YY_BREAK
case YY_STATE_EOF(CMMT):
#line 974 "lexer.l"
{ 
                         yyerr("EOF reached inside comment");
                         in_preprocess = 0;
                         return(0);
                       }
	YY_BREAK
case YY_STATE_EOF(CC):
#line 980 "lexer.l"
{ 
                         yyerr("EOF reached inside character constant");
                         return(0);
                       }
	YY_BREAK
case YY_STATE_EOF(STR):
#line 985 "lexer.l"
{ 
                         yyerr("EOF reached inside string constant");
                         return(0);
                       }
	YY_BREAK
case 222:
YY_RULE_SETUP
#line 990 "lexer.l"
{ /* Any unknown char is an error */
                        *gProject->Parse_TOS->yyerrstream
                           << "Error: Line " << gProject->Parse_TOS->yylineno
                           << ": Illegal Character";
                        if ((yytext[0] >= ' ') && (yytext[0] <= '~'))
                          *gProject->Parse_TOS->yyerrstream
                           << ": '" << yytext[0] << "'\n";
                        else
                          *gProject->Parse_TOS->yyerrstream
                           << ", ASCII: " << std::hex << (int)(yytext[0]) 
                                 << " (hex)\n" << std::dec;
                       }
	YY_BREAK
case 223:
YY_RULE_SETUP
#line 1003 "lexer.l"
ECHO;
	YY_BREAK
#line 2991 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(Start):
case YY_STATE_EOF(PP):
case YY_STATE_EOF(PPLN):
case YY_STATE_EOF(GCC_ELIM):
case YY_STATE_EOF(GCC_ATTRIB):
	yyterminate();

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

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

		if ( YY_CURRENT_BUFFER_LVALUE->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_LVALUE->yy_n_chars;
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			YY_CURRENT_BUFFER_LVALUE->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_LVALUE->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_LVALUE->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 (void)
{
    	register char *dest = YY_CURRENT_BUFFER_LVALUE->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_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( YY_CURRENT_BUFFER_LVALUE->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_LVALUE->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_LVALUE->yy_n_chars = (yy_n_chars) = 0;

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

		while ( num_to_read <= 0 )
			{ /* Not enough room in the buffer - grow it. */

			/* 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. */
					yyrealloc((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_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

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

		YY_CURRENT_BUFFER_LVALUE->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_LVALUE->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
		/* Extend the array by 50%, plus the number we really need. */
		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
	}

	(yy_n_chars) += number_to_move;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;

	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->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 (void)
{
	register yy_state_type yy_current_state;
	register char *yy_cp;
    
	yy_current_state = (yy_start);
	yy_current_state += YY_AT_BOL();

	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
		{
		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		if ( yy_accept[yy_current_state] )
			{
			(yy_last_accepting_state) = yy_current_state;
			(yy_last_accepting_cpos) = 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 >= 655 )
				yy_c = yy_meta[(unsigned int) yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
		}

	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 );
 */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
{
	register int yy_is_jam;
    	register char *yy_cp = (yy_c_buf_p);

	register YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		(yy_last_accepting_state) = yy_current_state;
		(yy_last_accepting_cpos) = 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 >= 655 )
			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 == 654);

	return yy_is_jam ? 0 : yy_current_state;
}

    static void yyunput (int c, register char * yy_bp )
{
	register char *yy_cp;
    
    yy_cp = (yy_c_buf_p);

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

	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->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_LVALUE->yy_ch_buf[
					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
		register char *source =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];

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

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

		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->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;
}

#ifndef YY_NO_INPUT
#ifdef __cplusplus
    static int yyinput (void)
#else
    static int input  (void)
#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_LVALUE->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 );

					/*FALLTHROUGH*/

				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_LVALUE->yy_at_bol = (c == '\n');

	return c;
}
#endif	/* ifndef YY_NO_INPUT */

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * 
 * @note This function does not reset the start condition to @c INITIAL .
 */
    void yyrestart  (FILE * input_file )
{
    
	if ( ! YY_CURRENT_BUFFER ){
        yyensure_buffer_stack ();
		YY_CURRENT_BUFFER_LVALUE =
            yy_create_buffer(yyin,YY_BUF_SIZE );
	}

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

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * 
 */
    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
{
    
	/* TODO. We should be able to replace this entire function body
	 * with
	 *		yypop_buffer_state();
	 *		yypush_buffer_state(new_buffer);
     */
	yyensure_buffer_stack ();
	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_LVALUE->yy_buf_pos = (yy_c_buf_p);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	YY_CURRENT_BUFFER_LVALUE = 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;
}

static void yy_load_buffer_state  (void)
{
    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
	(yy_hold_char) = *(yy_c_buf_p);
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * 
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) yyalloc(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 *) yyalloc(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;
}

/** Destroy the buffer.
 * @param b a buffer created with yy_create_buffer()
 * 
 */
    void yy_delete_buffer (YY_BUFFER_STATE  b )
{
    
	if ( ! b )
		return;

	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

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

	yyfree((void *) b  );
}

#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
    
/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a yyrestart() or at EOF.
 */
    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )

{
	int oerrno = errno;
    
	yy_flush_buffer(b );

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

    /* If b is the current buffer, then yy_init_buffer was _probably_
     * called from yyrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER){
        b->yy_bs_lineno = 1;
        b->yy_bs_column = 0;
    }

        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    
	errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * 
 */
    void yy_flush_buffer (YY_BUFFER_STATE  b )
{
    	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( );
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  
 */
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
    	if (new_buffer == NULL)
		return;

	yyensure_buffer_stack();

	/* This block is copied from yy_switch_to_buffer. */
	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*(yy_c_buf_p) = (yy_hold_char);
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	/* Only push if top exists. Otherwise, replace top. */
	if (YY_CURRENT_BUFFER)
		(yy_buffer_stack_top)++;
	YY_CURRENT_BUFFER_LVALUE = new_buffer;

	/* copied from yy_switch_to_buffer. */
	yy_load_buffer_state( );
	(yy_did_buffer_switch_on_eof) = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  
 */
void yypop_buffer_state (void)
{
    	if (!YY_CURRENT_BUFFER)
		return;

	yy_delete_buffer(YY_CURRENT_BUFFER );
	YY_CURRENT_BUFFER_LVALUE = NULL;
	if ((yy_buffer_stack_top) > 0)
		--(yy_buffer_stack_top);

	if (YY_CURRENT_BUFFER) {
		yy_load_buffer_state( );
		(yy_did_buffer_switch_on_eof) = 1;
	}
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void yyensure_buffer_stack (void)
{
	int num_to_alloc;
    
	if (!(yy_buffer_stack)) {

		/* First allocation is just for 2 elements, since we don't know if this
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
		 * immediate realloc on the next call.
         */
		num_to_alloc = 1;
		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
								  
		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
				
		(yy_buffer_stack_max) = num_to_alloc;
		(yy_buffer_stack_top) = 0;
		return;
	}

	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){

		/* Increase the buffer to prepare for a possible push. */
		int grow_size = 8 /* arbitrary grow size */;

		num_to_alloc = (yy_buffer_stack_max) + grow_size;
		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
								((yy_buffer_stack),
								num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );

		/* zero only the new slots.*/
		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
		(yy_buffer_stack_max) = num_to_alloc;
	}
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * 
 * @return the newly allocated buffer state object. 
 */
YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
{
	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) yyalloc(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;
}

/** Setup the input buffer state to scan a string. The next call to yylex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * 
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       yy_scan_bytes() instead.
 */
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
{
    
	return yy_scan_bytes(yystr,strlen(yystr) );
}

/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
 * scan from a @e copy of @a bytes.
 * @param bytes the byte buffer to scan
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 * 
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	int i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = _yybytes_len + 2;
	buf = (char *) yyalloc(n  );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );

	for ( i = 0; i < _yybytes_len; ++i )
		buf[i] = yybytes[i];

	buf[_yybytes_len] = buf[_yybytes_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;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

static void yy_fatal_error (yyconst char* msg )
{
    	(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. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = (yy_hold_char); \
		(yy_c_buf_p) = yytext + yyless_macro_arg; \
		(yy_hold_char) = *(yy_c_buf_p); \
		*(yy_c_buf_p) = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the current line number.
 * 
 */
int yyget_lineno  (void)
{
        
    return yylineno;
}

/** Get the input stream.
 * 
 */
FILE *yyget_in  (void)
{
        return yyin;
}

/** Get the output stream.
 * 
 */
FILE *yyget_out  (void)
{
        return yyout;
}

/** Get the length of the current token.
 * 
 */
int yyget_leng  (void)
{
        return yyleng;
}

/** Get the current token.
 * 
 */

char *yyget_text  (void)
{
        return yytext;
}

/** Set the current line number.
 * @param line_number
 * 
 */
void yyset_lineno (int  line_number )
{
    
    yylineno = line_number;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param in_str A readable stream.
 * 
 * @see yy_switch_to_buffer
 */
void yyset_in (FILE *  in_str )
{
        yyin = in_str ;
}

void yyset_out (FILE *  out_str )
{
        yyout = out_str ;
}

int yyget_debug  (void)
{
        return yy_flex_debug;
}

void yyset_debug (int  bdebug )
{
        yy_flex_debug = bdebug ;
}

static int yy_init_globals (void)
{
        /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from yylex_destroy(), so don't allocate here.
     */

    (yy_buffer_stack) = 0;
    (yy_buffer_stack_top) = 0;
    (yy_buffer_stack_max) = 0;
    (yy_c_buf_p) = (char *) 0;
    (yy_init) = 0;
    (yy_start) = 0;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = (FILE *) 0;
    yyout = (FILE *) 0;
#endif

    /* For future reference: Set errno on error, since we are called by
     * yylex_init()
     */
    return 0;
}

/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy  (void)
{
    
    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){
		yy_delete_buffer(YY_CURRENT_BUFFER  );
		YY_CURRENT_BUFFER_LVALUE = NULL;
		yypop_buffer_state();
	}

	/* Destroy the stack itself. */
	yyfree((yy_buffer_stack) );
	(yy_buffer_stack) = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * yylex() is called, initialization will occur. */
    yy_init_globals( );

    return 0;
}

/*
 * Internal utility routines.
 */

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

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

	return n;
}
#endif

void *yyalloc (yy_size_t  size )
{
	return (void *) malloc( size );
}

void *yyrealloc  (void * ptr, yy_size_t  size )
{
	/* 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 );
}

void yyfree (void * ptr )
{
	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"

#line 1003 "lexer.l"



/************************************************************************
//
// yywrap() - This function is called by the lexer [yylex() or sslex()] when
//            the end-of-file (or end-of-string for sslex()) is reached.
//            It gets the next file/string ready (if any) and returns 1
//            which indicates to the lexer that there are no more files
//            remaining.  The lexer returns 0 to the parser, indicating
//            no more tokens are remaining. The parser function, yyparse(),
//            then returns 0, indicating that the parse is done.  This
//            behaviour allows a single item to be parsed to be placed
//            on the stack and parsed without the entire stack being consumed.
//
// **********************************************************************/

int yywrap(void)
{
    in_preprocess = 0;
    return 1;
}

/***********************************************************************/
int cnt_nl(char *txt, int len)
{
  int ret = 0;

  do {
    switch (*txt++) {
      case '\n':
        ret++;
        gProject->Parse_TOS->yylineno++;
        gProject->Parse_TOS->yynxtcol = 0;
        break;

      default:
        break;
    }
  } while(--len > 0);

  return ret;
}

/***********************************************************************/
/*  Process a #line directive */
int
get_lineno(bool file_ppln, char *txt, Statement **stement)
{
    int   ln = 0;
    *stement = NULL ;
    int   oldyylineno = gProject->Parse_TOS->yylineno;
    do {
        if (txt)
        {
            if (file_ppln)
                ln = 0;
            else
            {
                if (sscanf(txt,"%d", &ln) < 1)
                    break;

                gProject->Parse_TOS->yylineno = ln - 1;
            }
           
            txt = strchr(txt,'"');

            if (txt)
            {
                char *pnt_end;
    
                txt++;

                pnt_end = strchr(txt,'"');
                if (pnt_end)
                    *pnt_end = '\0';
                else
                    break;
                        
                int entered_or_exited;
                if (sscanf(pnt_end+1,"%d", &entered_or_exited) < 1)
                    entered_or_exited = -1;
               
                switch (entered_or_exited)
				{
                  case 2:
                      // new line number into the previous included file
                      gProject->Parse_TOS->yylineno = oldyylineno;
                      *stement = new EndInclStemnt(HERE);
                      if (! file_ppln)
                          gProject->Parse_TOS->yylineno = ln - 1;
                      gProject->Parse_TOS->filename = txt;
                      return (*stement != NULL);
                      
                  case 1:
                      // new line number into a new include file
                      gProject->Parse_TOS->yylineno = oldyylineno;
                      if (! file_ppln)
                          gProject->Parse_TOS->yylineno = ln - 1;
                      gProject->Parse_TOS->filename = txt;
                      *stement = new InclStemnt(gProject->Parse_TOS->filename, HERE);
                      return (*stement != NULL);
                    
                  case 3:
                      // new line number introduced by the gcc preprocessor 
                      // into the same file
                      if (gProject->Parse_TOS->filename == txt && 
                          ln > oldyylineno)
                      {
                          gProject->Parse_TOS->filename = txt;
                          return 0;
                      }
                      /* No break */
                  default:
                      yywarn("Malformed #line directive");
                      /* No break */
                  case -1:
                      // new line number into the same file
                      gProject->Parse_TOS->yylineno = oldyylineno;
                      gProject->Parse_TOS->filename = txt;
                      *stement = new FileLineStemnt(gProject->Parse_TOS->filename, ln, HERE);
                      if (! file_ppln)
                          gProject->Parse_TOS->yylineno = ln - 1;
                      return (*stement != NULL);
                  }
              }
          }

        return 0;
      } while (0);

    yywarn("Malformed #line directive");
    return 0;
}

/***********************************************************************/

void print_caret(const std::string &s, int pos)
{
    const char *str;
    int i = 0;

    for (str=s.c_str(); *str && (i<pos); i++, str++)
        if (*str=='\t')
            *gProject->Parse_TOS->yyerrstream << "\t";
        else
            *gProject->Parse_TOS->yyerrstream << " ";

    *gProject->Parse_TOS->yyerrstream << "^\n";
}
 
/***********************************************************************/

void yywarn(char *s)
{
    *gProject->Parse_TOS->yyerrstream
         << gProject->Parse_TOS->transUnit->filename << ":" << gProject->Parse_TOS->yylineno
         << ": Warning - " << s << ":\n" << line;
    print_caret(line, gProject->Parse_TOS->yycolno);
}

/***********************************************************************/

int yyerr(char *s, std::string & str)
{
    *gProject->Parse_TOS->yyerrstream
      << gProject->Parse_TOS->filename << ":" << gProject->Parse_TOS->yylineno
      << ": " << s << str << ":\n" << line;
    print_caret(line, gProject->Parse_TOS->yycolno);

    ++err_top_level;
    if (++err_cnt >= 10){
        *gProject->Parse_TOS->yyerrstream
          << "Too many errors (" << err_cnt << " detected) - quitting.\n";
        return(1);
    }
    return(0); 
}

/***********************************************************************/

int yyerr(char *s)
{
    *gProject->Parse_TOS->yyerrstream
      << gProject->Parse_TOS->filename << ":" << gProject->Parse_TOS->yylineno
      << ": " << s << ":\n" << line;
    print_caret(line, gProject->Parse_TOS->yycolno);

    ++err_top_level;
    if (++err_cnt >= 10){
        *gProject->Parse_TOS->yyerrstream
          << "Too many errors (" << err_cnt << " detected) - quitting.\n";
        return(1);
    }
    return(0); 
}

/***********************************************************************/

int yyerror(char *s)
{
    *gProject->Parse_TOS->yyerrstream
      << gProject->Parse_TOS->transUnit->filename << ":" << gProject->Parse_TOS->yylineno
      << ": Error (" << s << ") before '"
      << toksym(err_tok,0) << "'\n" << line;
    print_caret(line, gProject->Parse_TOS->yycolno);

    /*
     * This does _NOTHING_.  Bison, at least, ignores the return value of
     * yyerror().  I don't know why cTool does this.  --Jeremy.
     */
    if (++err_cnt >= 10){
        *gProject->Parse_TOS->yyerrstream
          << "Too many errors (" << err_cnt << " detected) - quitting.\n";
        return(1);
    }
    return(0);
}

/***********************************************************************/
/* created 11/6/99 */
void function_to_eliminate_gcc_warning()
{
  yyunput(0,"");
}

/***********************************************************************/

