
#line 3 "scan.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;

/* 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 /* ! C99 */

#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
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 * Ditto for the __ia64__ case accordingly.
 */
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#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 */

#define yywrap(n) 1
#define YY_SKIP_YYWRAP

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 74
#define YY_END_OF_BUFFER 75
/* 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[465] =
    {   0,
       69,   69,   69,   69,   69,   69,    0,    0,   69,   69,
       69,   69,   69,   69,   75,   73,   69,   71,   73,   39,
       27,   73,   73,   73,   73,   73,   73,   73,   73,   38,
       38,   72,   73,   73,   73,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   73,
       73,   69,   26,   73,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       43,   73,   45,   45,   13,   73,   11,   12,   73,   70,
       69,   70,   69,   51,   39,   39,   39,   27,   27,   27,
       27,   58,   52,   61,    0,    0,   66,   67,   56,   68,

       64,   54,   65,   55,   27,   35,   27,   57,   38,   29,
       33,   36,   31,   38,   72,   46,   49,   50,   48,   47,
        0,   27,   27,   27,   27,   27,    0,   27,    0,   27,
       27,   27,   27,    0,   27,   19,   27,   27,    0,   27,
       27,   63,   62,   53,   69,    0,    0,    0,    0,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   19,   26,
       26,   26,   26,   26,   26,   26,   26,   43,    0,   42,
        0,   45,    0,   45,    0,   44,    0,   45,   13,   10,
       13,   11,   11,   39,   39,   39,   39,   27,   27,   19,

       27,   40,   40,    0,    0,   27,   28,   28,   28,   28,
       28,   59,   60,    0,    0,    0,    0,   27,    0,    0,
       27,   27,   27,   27,    0,    0,   27,   27,   27,   27,
       16,    0,    0,   27,   27,    0,    0,    0,    0,    0,
       26,   26,   26,   19,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   16,   26,   26,
       26,   26,   26,    0,    0,    0,    0,   45,   45,   44,
       45,   44,    0,   44,   45,   45,   45,   45,   39,   39,
       27,   27,   27,   27,   27,    0,    0,   27,   41,   41,
        0,    0,   30,   27,   34,   20,    6,   27,   27,   27,

       37,   15,   27,   27,   17,   32,   27,   27,    0,    0,
        0,    0,    0,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   20,    6,   26,   26,   26,   15,   26,   26,
       26,   17,   26,   26,   26,   26,   26,    0,    0,   44,
       45,   45,   45,   45,   44,    0,    0,    0,    0,   45,
       45,   20,   27,   27,   27,   27,   25,    0,    0,   27,
       21,   27,    0,    7,   22,   27,   27,   14,    0,    0,
        0,    0,    0,   26,   20,   26,   26,   26,   26,   26,
       25,   26,   21,   26,   22,   26,   26,   26,   26,   26,
       26,   14,   45,   45,    0,    0,   21,   22,   27,   27,

        4,   27,   23,   27,    0,    0,    0,    0,    0,   26,
       21,   22,   26,   26,   26,    4,   26,   23,   26,   26,
       26,   26,    2,   23,   27,   27,   27,    0,    0,    0,
        0,   26,   23,   26,   26,   26,   26,   26,    3,   26,
       27,   27,   27,    0,    0,    0,    9,    8,   26,   26,
       26,    1,   26,   26,   24,   27,   18,    0,   24,   26,
       18,    5,    5,    0
    } ;

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

       57,   58,   59,   60,   61,   37,   62,   63,   37,   64,
       65,   66,   43,   67,   68,   69,   70,   71,   72,   73,
       37,   37,    1,   74,    1,    1,    1,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,

       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
       27,   27,   27,   27,   27
    } ;

static yyconst flex_int32_t yy_meta[75] =
    {   0,
        1,    2,    3,    4,    1,    5,    6,    1,    1,    7,
        8,    1,    1,    1,    9,   10,    1,   11,   12,   12,
       13,   14,    2,    1,    2,   15,    6,   16,   16,   17,
       17,   17,   16,   18,   18,   18,   18,   18,   18,   19,
       18,   18,   18,   19,   18,   19,   18,   19,   18,   19,
       20,    1,   16,   16,   17,   17,   17,   16,   18,   18,
       18,   18,   18,   19,   18,   18,   19,   18,   19,   18,
       19,   18,   19,    1
    } ;

static yyconst flex_int16_t yy_base[502] =
    {   0,
        0,   74,  147,  152,  157,  162,  184,  258,  208,  211,
      332,  406,  215,  218, 1613, 2239,  169, 2239, 1588,  172,
      195, 1587,  143, 1558,  167,  215,  201,  266, 1582,  258,
      259,    0,  220, 1580,  221,    0,  474,  533,  310, 1593,
      403,  424, 1585,  425,  429,  427, 1583,  315,  320, 1554,
      152,  487,  510,  430, 1547,  592,  651,  348, 1555,  435,
      436, 1553,  446,  486,  517, 1544,  388,  466,  468,  528,
        0,  132, 1551,  559, 1541,    0,    0, 2239,    0, 2239,
      230,    0,  245, 2239,  244, 2239,  707,    0,  258,  258,
      184, 2239, 2239, 2239, 1539,  386, 2239, 2239, 2239, 2239,

     2239, 2239, 2239, 2239,    0,  235,  256, 2239,  566,  599,
      625,  658,  721,  753,    0, 1511, 2239, 2239, 2239, 1509,
     1475, 1489, 1484, 1473, 1470, 1469, 1422,  506,  348,  569,
      544,  562,  553, 1415,  461,  607,  594,  316, 1401,  633,
      631, 2239, 2239, 2239,  765,  338,  263,  657,  324, 1393,
     2239,  340,  681,  611,  644, 1348,  516, 1358, 1356, 1354,
     1350, 1348,  573,  686,  593,  699,  685,  700,  739,  595,
      753,  434,  635,  732,  423,  395,  673,    0,  350, 2239,
      829, 1328, 1314,  798,  800, 1287,  245,  901, 1264, 2239,
     1242,    0,    0,  322,  809,  969,    0,  325,  347,  682,

      409, 2239, 1238,  288,    0,  331,  788,  877,  949,  950,
      999, 2239, 2239, 1179,  822, 1170,  366,  773,  371,  846,
      780,  831,  840,  858, 1164,  377,  849,  814,  860,  660,
     1127, 1120,  575,  775,  842,  490,  556,  755,  834,  527,
      857,  868,  883,  955,  855,  901,  903,  953,  916, 1002,
      972,  997,  936,  951, 1019, 1006, 1021, 1109, 1011, 1025,
     1033, 1007, 1029,  500, 1029, 1085,    0, 1095, 1050, 1083,
     1142, 2239, 1210, 1056, 1071, 1106, 1282,    0, 1070, 1323,
      893,  892,  903,  913, 1017,  361,    0, 1049, 2239, 1055,
      435,    0, 2239, 1090, 2239, 1041, 1034, 1101, 1082, 1085,

     2239, 1023, 1120, 1099,  967, 2239, 1119, 1088, 1100,  552,
      848, 1022,  734, 1126, 1140, 1133, 1142, 1146, 1144, 1180,
     1187, 1136,  930,  891, 1140, 1174, 1212,  835, 1171, 1195,
     1170,  833, 1200, 1223, 1211, 1214, 1215, 1248, 1364, 1229,
     1243, 1383, 1433,    0,  467, 1076, 1272, 1486,    0, 1385,
     1527,    0, 1197, 1237, 1260, 1260,    0,  492,    0, 1259,
      826, 1266,  717, 2239,  815, 1286, 1277,  798, 1267, 1156,
      899, 1270, 1275, 1306,  778, 1328, 1341, 1277, 1303, 1342,
      771, 1310,  779, 1349,  777, 1357, 1398, 1388, 1400, 1399,
      954,  731, 1422, 1568, 1407, 1609,    0,    0, 1373, 1387,

      727, 1417,  722, 1401, 1059, 1411, 1415, 1239,  728, 1438,
      670,  667, 1417, 1472, 1460,  578, 1450,  574, 1466, 1433,
      956, 1461,  522,    0, 1307, 1500, 1467, 1465, 1470,  519,
     1446, 1509,  493, 1504, 1510, 1519, 1232, 1510,  506, 1560,
     1481, 1559, 1563, 1081,  449, 1532, 1323, 2239,  236, 1545,
     1562,  436, 1566, 1355,    0, 1569,  390,  309,  283, 1595,
      231,  170,  152, 2239, 1667, 1687, 1707, 1727, 1747, 1767,
     1782, 1801, 1816, 1825, 1844, 1859, 1873, 1887, 1901, 1920,
     1940, 1960, 1980, 1995, 2009, 2023, 2037, 2052, 2062, 2081,
     2093, 2104, 2115, 2134, 2154, 2174, 2184, 2197, 2207, 2214,

     2221
    } ;

static yyconst flex_int16_t yy_def[502] =
    {   0,
      464,  464,  465,  465,  466,  466,  467,  467,  466,  466,
      468,  468,  469,  469,  464,  464,  464,  464,  464,  470,
      471,  464,  464,  472,  464,  464,  464,  473,  464,  474,
      474,  475,  464,  464,  464,  471,  476,  476,   38,   38,
       38,   38,   38,   38,   38,   38,   38,   38,   38,  464,
      464,  464,  477,  478,  477,  479,  479,   57,   57,   57,
       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
      480,  481,  482,  483,  484,  485,  486,  464,  487,  464,
      464,  475,  464,  464,  470,  464,  470,  471,  471,  471,
      471,  464,  464,  464,  464,  488,  464,  464,  464,  464,

      464,  464,  464,  464,  471,  464,  471,  464,  474,  474,
      474,  474,  474,  489,  475,  464,  464,  464,  464,  464,
      490,   38,   38,   38,   38,   38,  491,   38,  464,   38,
       38,   38,   38,  492,   38,   38,   38,   38,  493,   38,
       38,  464,  464,  464,  464,  464,  464,  464,  464,  477,
      464,  477,  477,  477,  477,  477,  477,   57,   57,   57,
       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
       57,   57,   57,   57,   57,   57,   57,  480,  481,  464,
      481,  482,  494,  483,  495,  482,  496,  483,  484,  464,
      484,  486,  486,  470,  470,  470,   87,  471,  471,  471,

      471,  464,  464,  464,  497,  471,  489,  489,  489,  489,
      489,  464,  464,  464,  498,  491,  491,   38,  464,  464,
       38,   38,   38,   38,  492,  492,   38,   38,   38,   38,
       38,  493,  493,   38,   38,  464,  464,  464,  464,  464,
      477,  477,  477,  477,  477,  477,  477,   57,   57,   57,
       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
       57,   57,   57,  481,  481,  481,  181,  494,  495,  494,
      495,  464,  496,  483,  483,  483,  483,  188,  470,  196,
      471,  471,  471,  471,  471,  464,  499,  471,  464,  464,
      464,  500,  464,   38,  464,   38,   38,   38,   38,   38,

      464,   38,   38,   38,   38,  464,   38,   38,  464,  464,
      464,  464,  464,  477,  477,  477,  477,  477,  477,  477,
      477,   57,   57,   57,   57,   57,   57,   57,   57,   57,
       57,   57,   57,   57,   57,   57,   57,  481,  266,  495,
      495,  495,  495,  271,  496,  496,  496,  496,  273,  483,
      277,  471,  471,  471,  471,  471,  471,  464,  501,   38,
       38,   38,  464,  464,   38,   38,   38,   38,  464,  464,
      464,  464,  464,  477,  477,  477,  477,  477,  477,  477,
      477,   57,   57,   57,   57,   57,   57,   57,   57,   57,
       57,   57,  495,  343,  496,  348,  471,  471,  471,  471,

       38,   38,   38,   38,  464,  464,  464,  464,  464,  477,
      477,  477,  477,  477,  477,   57,   57,   57,   57,   57,
       57,   57,  464,  471,  471,   38,   38,  464,  464,  464,
      464,  477,  477,  477,  477,   57,   57,   57,  464,   57,
      471,   38,   38,  464,  464,  464,  464,  464,  477,  477,
       57,  464,   57,   57,  471,   38,   38,  464,  477,   57,
       57,   38,   57,    0,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,

      464
    } ;

static yyconst flex_int16_t yy_nxt[2314] =
    {   0,
       16,   17,   18,   17,   19,   20,   21,   22,   23,   24,
       16,   16,   25,   26,   27,   28,   29,   30,   31,   31,
       16,   32,   33,   34,   35,   36,   36,   37,   38,   39,
       40,   41,   42,   43,   44,   45,   43,   43,   46,   43,
       47,   48,   47,   43,   43,   43,   49,   43,   43,   43,
       16,   50,   37,   38,   39,   40,   41,   42,   43,   44,
       45,   43,   46,   43,   47,   48,   43,   43,   43,   49,
       43,   43,   43,   51,   16,   52,   18,   17,   19,   20,
       53,   22,   23,   24,   16,   16,   25,   26,   27,   54,
       29,   30,   31,   31,   16,   32,   33,   34,   35,   55,

       55,   56,   57,   58,   59,   60,   61,   62,   63,   64,
       62,   62,   65,   62,   66,   67,   66,   62,   68,   69,
       70,   62,   62,   62,   16,   50,   56,   57,   58,   59,
       60,   61,   62,   63,   64,   62,   65,   62,   66,   67,
       62,   68,   69,   70,   62,   62,   62,   51,   17,   18,
       17,   93,   20,   17,   18,   17,  180,   20,   17,   18,
       17,  464,   74,   17,   18,   17,   94,   74,   32,   72,
       83,   16,   83,   32,   72,  143,   16,   86,   32,  464,
       97,   98,  181,   32,   16,   16,   18,   16,   16,   16,
       99,   16,   16,   16,   16,   16,   16,   16,   16,   76,

       16,   16,   16,   16,   16,   32,   16,   16,   16,   17,
       18,   17,   17,   18,   17,  103,   81,   18,   81,   81,
       18,   81,   87,  201,  104,  144,   89,  100,  101,   32,
       90,   83,   32,   83,   16,   16,   82,  452,  102,   82,
      464,   91,  116,  117,  119,  120,   83,  201,   83,   86,
      272,   89,  106,  106,  106,   90,  151,   16,   16,   16,
       18,   16,   16,   16,   91,   16,   16,   16,   16,   16,
       16,   16,   16,   76,   16,   16,   16,   16,   16,   32,
       16,   16,   16,  106,  106,  106,  110,  110,  111,  111,
      200,  206,  112,  112,   87,  273,  198,  199,  113,  113,

      113,  113,  237,  151,  107,  286,  286,  114,   16,   16,
      439,  110,  110,  111,  111,  200,  206,  112,  112,  464,
      198,  199,  113,  113,  464,  464,  237,   86,  107,  464,
      114,   16,   16,   17,   18,   17,   16,   16,  128,   16,
       16,   16,   16,   78,   16,   16,   16,   79,   16,   16,
       16,   16,   16,   32,   16,   16,   16,  464,  140,  240,
      151,  141,  219,  128,  231,  220,  220,  220,  236,  281,
      288,  241,   87,  147,  180,  293,  163,  282,   95,   95,
      464,  140,   16,   16,  240,  141,  301,  231,  220,  220,
      220,  464,  281,  236,  288,  203,  241,  464,  147,  464,

      181,  163,  282,  204,  464,   16,   16,   17,   18,   17,
       16,   16,  464,   16,   16,   16,   16,   78,   16,   16,
       16,   79,   16,   16,   16,   16,   16,   32,   16,   16,
       16,  173,  464,  464,  134,  205,  464,  452,  464,  285,
      262,  130,  131,  464,  464,  464,  132,  106,  106,  106,
      452,  261,  358,  358,  173,  134,   16,   16,  205,  133,
      135,  136,  137,  262,  285,  130,  131,  138,  157,  132,
      464,  167,  272,  164,  165,  464,  261,  464,  166,   16,
       88,  168,  258,  121,  133,  135,  136,  137,  145,   88,
       83,  138,  157,  146,  227,  464,  167,  164,  165,   88,

       88,  166,  123,  176,  124,  258,  168,  439,  125,  214,
      214,  174,  175,  151,  126,  464,  126,  273,  169,  227,
      439,  309,  147,  423,  180,  170,  464,  123,  176,  124,
      151,  148,  149,  125,  174,  175,  151,  464,  126,   88,
      152,  153,  127,  169,  218,  154,  309,  147,   88,  170,
      181,  247,  171,  464,  148,  149,  155,  172,   88,   88,
      185,  123,  464,  124,  186,  152,  153,  125,  218,  177,
      154,  464,  313,  126,  222,  126,  247,  171,  464,  155,
      187,  172,  464,  464,  306,  310,  123,  464,  124,  464,
      370,  224,  125,  177,  110,  313,  111,  126,  150,  222,

      112,  121,  464,  464,  464,  223,  113,  150,  113,  188,
      310,  248,  151,  221,  370,  224,  464,  150,  150,  110,
      159,  111,  160,  250,  256,  112,  161,  110,  223,  111,
      113,  151,  162,  112,  162,  248,  221,  228,  230,  113,
      464,  113,  464,  244,  464,  159,  229,  160,  250,  256,
      245,  161,  110,  110,  111,  111,  162,  150,  112,  112,
      127,  230,  228,  113,  151,  113,  150,  113,  244,  464,
      229,  151,  235,  234,  245,  259,  150,  150,  110,  159,
      111,  160,  464,  246,  112,  161,  110,  151,  111,  113,
      151,  162,  112,  162,  464,  464,  235,  234,  113,  259,

      113,  151,  238,  239,  159,  305,  160,  246,  464,  464,
      161,  110,  283,  111,  263,  162,  194,  112,  363,  242,
      243,  284,  113,  252,  195,  238,  239,  364,  305,  423,
      249,  464,  194,  253,  194,  194,  464,  283,  263,  194,
      464,  464,  251,  242,  243,  284,  194,  252,  464,  110,
      194,  111,  194,  249,  194,  112,  196,  197,  253,  194,
      194,  113,  464,  113,  194,  251,  145,  260,   83,  254,
      194,  146,  373,  194,  110,  194,  111,  194,  255,  196,
      112,  208,  464,  209,  464,  113,  464,  210,  464,  464,
      311,  151,  260,  211,  254,  211,  373,  257,  151,  185,

      147,  185,  255,  186,  307,  270,  208,  464,  209,  148,
      149,  296,  210,  294,   86,  311,  208,  211,  209,  187,
      257,  187,  210,  464,  464,  147,  279,  279,  211,  307,
      211,  290,  148,  149,  264,  464,  296,  294,  264,  291,
      464,  208,  464,  209,  464,  303,  265,  210,  188,  464,
      271,  464,  211,  180,  264,  295,  264,  264,  464,   87,
      297,  264,  312,  220,  220,  220,  298,  464,  264,  464,
      303,  292,  264,  308,  264,  151,  264,  151,  266,  267,
      299,  264,  264,  302,  319,  297,  264,  312,  151,  314,
      304,  298,  264,  371,  292,  264,  300,  264,  308,  264,

      464,  266,  185,  151,  299,  208,  274,  209,  302,  319,
      275,  210,  315,  316,  314,  304,  371,  211,  276,  211,
      300,  151,  187,  151,  352,  464,  275,  353,  275,  275,
      208,  320,  209,  275,  354,  315,  210,  407,  316,  464,
      275,  211,  321,  355,  275,  464,  275,  323,  275,  352,
      277,  278,  353,  275,  275,  423,  320,  439,  275,  354,
      464,  407,  464,  464,  275,  464,  321,  275,  355,  275,
      328,  275,  323,  277,   86,  151,  464,  208,  208,  209,
      209,  464,  329,  210,  210,  317,  280,  280,  280,  211,
      211,  211,  211,  322,  318,  328,  280,  280,  280,  280,

      280,  280,  208,  208,  209,  209,  464,  329,  210,  210,
      317,  464,  326,  211,  211,  464,  464,  322,  318,   87,
      464,  280,  280,  280,  280,  280,  280,  208,  464,  209,
      464,  324,  464,  210,  464,  327,  326,  325,  464,  211,
      333,  211,  464,  464,  331,  336,  338,  338,  356,  330,
      464,  185,  208,  180,  209,  270,  324,  185,  210,  327,
      337,  186,  325,  211,  289,  333,  332,  372,  331,  336,
      334,  187,  185,  356,  330,   86,  186,  187,  335,  181,
      357,  272,  447,  448,  183,  337,  363,  194,  194,  332,
      372,  464,  187,  334,  464,  364,  183,  464,  428,  464,

      271,  335,  339,  339,  339,  357,  188,  185,  464,  180,
      464,  186,  339,  339,  339,  339,  339,  339,  464,  360,
       87,  188,  428,  350,  350,  362,  273,  187,  464,  464,
      366,  368,  369,  361,  464,  181,  464,  339,  339,  339,
      339,  339,  339,  185,  360,  464,  151,  340,  362,  464,
      367,  341,  365,  151,  368,  366,  188,  369,  361,  342,
      151,  374,  151,  187,  151,  382,  151,  341,  376,  341,
      341,  375,  383,  377,  341,  367,  378,  365,  464,  464,
      464,  341,  379,  464,  464,  341,  374,  341,  289,  341,
      382,  343,  344,  376,  341,  341,  375,  383,  377,  341,

      151,  378,  406,  385,  464,  341,  379,  151,  341,  464,
      341,  380,  341,  363,  343,  345,  387,  384,  381,  346,
      464,  464,  364,  464,  464,  406,  386,  347,  385,  397,
      185,  388,  464,  452,  270,  346,  380,  346,  346,  387,
      384,  464,  346,  381,  185,  391,  390,  202,  270,  346,
      187,  386,  190,  346,  397,  346,  388,  346,  392,  348,
      349,  389,  346,  346,  187,  264,  264,  346,  464,  398,
      391,  390,  180,  346,  190,  464,  346,  272,  346,  271,
      346,  392,  348,  185,  431,  389,  464,  186,  183,  395,
      395,  399,  400,  271,  398,  464,  401,  151,  181,  351,

      351,  351,  405,  187,  402,  408,  409,  431,  413,  351,
      351,  351,  351,  351,  351,  183,  399,  400,  403,  464,
      401,  404,  273,  151,  447,  448,  151,  405,  402,  183,
      408,  409,  188,  413,  351,  351,  351,  351,  351,  351,
      194,  194,  194,  403,  404,  410,  441,  416,  151,  414,
      194,  194,  194,  194,  194,  194,  439,  464,  464,  464,
      411,  151,  151,  464,  464,  464,  464,  464,  151,  410,
      441,  416,  414,  412,  415,  194,  194,  194,  194,  194,
      194,  264,  264,  264,  185,  411,  185,  417,  270,  418,
      186,  264,  264,  264,  264,  264,  264,  464,  412,  415,

      393,  393,  275,  275,  187,  424,  187,  464,  464,  464,
      464,  417,  272,  151,  418,  232,  264,  264,  264,  264,
      264,  264,  425,  185,  346,  346,  464,  270,  419,  225,
      424,  421,  420,  271,  185,  188,  216,  151,  270,  341,
      341,  429,  464,  187,  422,  427,  430,  425,  426,  433,
      394,  394,  394,  419,  187,  420,  421,  273,  151,  464,
      394,  394,  394,  394,  394,  394,  429,  422,  427,  432,
      464,  430,  271,  426,  433,  464,  464,  438,  464,  464,
      151,  436,  464,  271,  446,  394,  394,  394,  394,  394,
      394,  272,  151,  464,  432,  435,  444,  437,  464,  440,

      438,  445,  434,  396,  396,  396,  436,  443,  446,  464,
      447,  448,  455,  396,  396,  396,  396,  396,  396,  464,
      435,  444,  437,  440,  151,  215,  445,  434,  464,  151,
      151,  443,  213,  439,  212,  449,  273,  455,  396,  396,
      396,  396,  396,  396,  275,  275,  275,  442,  202,  450,
      453,  190,  183,  139,  275,  275,  275,  275,  275,  275,
      449,  439,  464,  458,  129,  151,  451,  151,  464,  464,
      442,  464,  464,  450,  453,  464,  459,  142,  464,  275,
      275,  275,  275,  275,  275,  341,  341,  341,  458,  451,
      456,  454,  139,  460,  464,  341,  341,  341,  341,  341,

      341,  459,  129,  118,  464,  108,  457,  462,   96,  461,
       92,   84,  464,  464,  464,  456,  454,  464,  460,  464,
      341,  341,  341,  341,  341,  341,  346,  346,  346,  457,
      464,  462,  461,  463,  464,  464,  346,  346,  346,  346,
      346,  346,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  463,  464,  464,
      464,  346,  346,  346,  346,  346,  346,   71,   71,   71,
       71,   71,   71,   71,   71,   71,   71,   71,   71,   71,
       71,   71,   71,   71,   71,   71,   71,   73,   73,   73,
       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,

       73,   73,   73,   73,   73,   73,   73,   75,   75,   75,
       75,   75,   75,   75,   75,   75,   75,   75,   75,   75,
       75,   75,   75,   75,   75,   75,   75,   77,   77,   77,
       77,   77,   77,   77,   77,   77,   77,   77,   77,   77,
       77,   77,   77,   77,   77,   77,   77,   80,   80,   80,
       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
       80,   80,   80,   80,   80,   80,   80,   85,   85,  464,
      464,   85,   85,   85,   85,   85,   85,   85,   85,   85,
       85,   85,   85,   85,   85,   85,   85,   88,  464,  464,
      464,   88,   88,   88,  464,  464,   88,   88,   88,   88,

       88,   95,   95,  464,  464,  464,   95,   95,   95,   95,
       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
       95,  105,  464,  464,  464,  464,  105,  105,  464,  464,
      105,  105,  105,  105,  105,  109,  109,  464,  464,  464,
      109,  109,  109,  109,  115,  115,  464,  115,  115,  115,
      115,  115,  115,  115,  115,  115,  115,  115,  115,  115,
      115,  115,  115,  115,  122,  122,  464,  464,  122,  122,
      122,  464,  464,  122,  122,  122,  122,  122,  150,  464,
      464,  464,  150,  150,  150,  150,  464,  150,  150,  150,
      150,  150,  156,  464,  464,  464,  464,  156,  156,  464,

      464,  156,  156,  156,  156,  156,  158,  158,  464,  464,
      158,  158,  158,  158,  464,  158,  158,  158,  158,  158,
      178,  464,  464,  464,  464,  178,  178,  178,  178,  178,
      178,  178,  178,  464,  178,  178,  178,  178,  178,  178,
      179,  179,  464,  464,  179,  179,  179,  179,  179,  179,
      179,  179,  179,  179,  179,  179,  179,  179,  179,  179,
      182,  182,  464,  464,  182,  182,  182,  182,  182,  182,
      182,  182,  182,  464,  182,  182,  182,  182,  182,  182,
      184,  184,  464,  464,  184,  184,  184,  184,  184,  184,
      184,  184,  184,  184,  184,  184,  184,  184,  184,  184,

      189,  464,  189,  464,  189,  189,  189,  464,  464,  189,
      189,  189,  189,  189,  191,  464,  464,  464,  464,  464,
      464,  464,  464,  191,  191,  191,  191,  191,  192,  464,
      464,  464,  192,  192,  192,  464,  464,  192,  192,  192,
      192,  192,  193,  464,  464,  464,  464,  464,  464,  464,
      464,  193,  193,  193,  193,  193,   95,  464,   95,  464,
      464,  464,   95,  464,  464,  464,   95,   95,  464,  464,
       95,   95,  207,  207,  464,  464,  464,  207,  207,  207,
      207,  214,  214,  464,  464,  464,  214,  214,  214,  214,
      214,  214,  214,  214,  214,  214,  214,  214,  214,  214,

      214,  217,  464,  217,  217,  464,  464,  464,  217,  217,
      217,  217,  226,  464,  226,  226,  464,  464,  464,  226,
      226,  226,  226,  233,  464,  233,  233,  464,  464,  464,
      233,  233,  233,  233,  268,  268,  464,  464,  268,  268,
      268,  268,  268,  268,  268,  268,  268,  464,  268,  268,
      268,  268,  268,  268,  269,  269,  464,  464,  269,  269,
      269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
      269,  269,  269,  269,  187,  187,  464,  464,  187,  187,
      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
      187,  187,  187,  187,  287,  287,  464,  464,  464,  287,

      287,  214,  464,  214,  464,  464,  464,  214,  464,  464,
      464,  214,  214,  464,  464,  214,  214,   95,   95,  464,
      464,  464,   95,   95,  359,  359,  464,  464,  464,  359,
      359,  214,  214,  464,  464,  464,  214,  214,   15,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,

      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464
    } ;

static yyconst flex_int16_t yy_chk[2314] =
    {   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,    1,    1,    2,    2,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,

        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    3,    3,
        3,   23,    3,    4,    4,    4,   72,    4,    5,    5,
        5,  463,    5,    6,    6,    6,   23,    6,    3,    3,
       17,    3,   17,    4,    4,   51,    4,   20,    5,  462,
       25,   25,   72,    6,    7,    7,    7,    7,    7,    7,
       25,    7,    7,    7,    7,    7,    7,    7,    7,    7,

        7,    7,    7,    7,    7,    7,    7,    7,    7,    9,
        9,    9,   10,   10,   10,   27,   13,   13,   13,   14,
       14,   14,   20,   91,   27,   51,   21,   26,   26,    9,
       21,   81,   10,   81,    7,    7,   13,  449,   26,   14,
      461,   21,   33,   33,   35,   35,   83,   91,   83,   85,
      187,   21,  106,  106,  106,   21,  449,    7,    8,    8,
        8,    8,    8,    8,   21,    8,    8,    8,    8,    8,
        8,    8,    8,    8,    8,    8,    8,    8,    8,    8,
        8,    8,    8,   28,   28,   28,   30,   31,   30,   31,
       90,  107,   30,   31,   85,  187,   89,   89,   30,   31,

       30,   31,  147,  459,   28,  204,  204,   30,    8,    8,
      458,   30,   31,   30,   31,   90,  107,   30,   31,   39,
       89,   89,   30,   31,   48,  138,  147,  194,   28,   49,
       30,    8,   11,   11,   11,   11,   11,   11,   39,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   58,   48,  149,
      152,   49,  129,   39,  138,  129,  129,  129,  146,  198,
      206,  152,  194,  146,  179,  217,   58,  199,  286,  286,
      217,   48,   11,   11,  149,   49,  226,  138,  219,  219,
      219,  226,  198,  146,  206,   96,  152,   67,  146,  457,

      179,   58,  199,   96,  176,   11,   12,   12,   12,   12,
       12,   12,   41,   12,   12,   12,   12,   12,   12,   12,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
       12,   67,  175,   42,   44,   96,   46,  452,   45,  201,
      176,   41,   41,  172,   60,   61,   41,   54,   54,   54,
      445,  175,  291,  291,   67,   63,   12,   12,   96,   42,
       44,   45,   46,  176,  201,   41,   41,   46,   54,   41,
      135,   61,  345,   60,   60,   68,  175,   69,   60,   12,
       37,   63,  172,   37,   42,   44,   45,   46,   52,   37,
       52,   46,   54,   52,  135,   64,   61,   60,   60,   37,

       37,   60,   37,   69,   37,  172,   63,  439,   37,  358,
      358,   68,   68,  433,   37,  128,   37,  345,   64,  135,
      430,  236,   52,  423,  264,   64,   65,   37,   69,   37,
       53,   52,   52,   37,   68,   68,  157,   70,   37,   38,
       53,   53,   38,   64,  128,   53,  236,   52,   38,   64,
      264,  157,   65,  131,   52,   52,   53,   65,   38,   38,
       74,   38,  133,   38,   74,   53,   53,   38,  128,   70,
       53,  132,  240,   38,  131,   38,  157,   65,  130,   53,
       74,   65,  163,  418,  233,  237,   38,  416,   38,  233,
      310,  133,   38,   70,  109,  240,  109,   38,   56,  131,

      109,   56,  165,  137,  170,  132,  109,   56,  109,   74,
      237,  163,   56,  130,  310,  133,  136,   56,   56,  109,
       56,  109,   56,  165,  170,  109,   56,  110,  132,  110,
      109,  154,   56,  110,   56,  163,  130,  136,  137,  110,
      141,  110,  140,  154,  173,   56,  136,   56,  165,  170,
      154,   56,  110,  111,  110,  111,   56,   57,  110,  111,
       57,  137,  136,  110,  155,  111,   57,  111,  154,  230,
      136,   57,  141,  140,  154,  173,   57,   57,  111,   57,
      111,   57,  177,  155,  111,   57,  112,  412,  112,  111,
      411,   57,  112,   57,  167,  164,  141,  140,  112,  173,

      112,  153,  148,  148,   57,  230,   57,  155,  166,  168,
       57,  112,  200,  112,  177,   57,   87,  112,  363,  153,
      153,  200,  112,  167,   87,  148,  148,  363,  230,  409,
      164,  403,   87,  168,   87,   87,  401,  200,  177,   87,
      392,  174,  166,  153,  153,  200,   87,  167,  169,  113,
       87,  113,   87,  164,   87,  113,   87,   87,  168,   87,
       87,  113,  171,  113,   87,  166,  145,  174,  145,  169,
       87,  145,  313,   87,  113,   87,  113,   87,  169,   87,
      113,  114,  218,  114,  234,  113,  385,  114,  383,  221,
      238,  381,  174,  114,  169,  114,  313,  171,  375,  184,

      145,  185,  169,  184,  234,  185,  114,  368,  114,  145,
      145,  221,  114,  218,  195,  238,  207,  114,  207,  184,
      171,  185,  207,  228,  365,  145,  195,  195,  207,  234,
      207,  215,  145,  145,  181,  361,  221,  218,  181,  215,
      222,  207,  332,  207,  328,  228,  181,  207,  184,  223,
      185,  235,  207,  181,  181,  220,  181,  181,  227,  195,
      222,  181,  239,  220,  220,  220,  222,  224,  181,  229,
      228,  215,  181,  235,  181,  245,  181,  241,  181,  181,
      223,  181,  181,  227,  245,  222,  181,  239,  242,  241,
      229,  222,  181,  311,  215,  181,  224,  181,  235,  181,

      324,  181,  188,  243,  223,  208,  188,  208,  227,  245,
      188,  208,  242,  243,  241,  229,  311,  208,  188,  208,
      224,  246,  188,  247,  281,  249,  188,  282,  188,  188,
      208,  246,  208,  188,  283,  242,  208,  371,  243,  323,
      188,  208,  247,  284,  188,  253,  188,  249,  188,  281,
      188,  188,  282,  188,  188,  391,  246,  421,  188,  283,
      254,  371,  248,  391,  188,  421,  247,  188,  284,  188,
      253,  188,  249,  188,  196,  244,  305,  209,  210,  209,
      210,  251,  254,  209,  210,  244,  196,  196,  196,  209,
      210,  209,  210,  248,  244,  253,  196,  196,  196,  196,

      196,  196,  209,  210,  209,  210,  252,  254,  209,  210,
      244,  250,  251,  209,  210,  256,  262,  248,  244,  196,
      259,  196,  196,  196,  196,  196,  196,  211,  255,  211,
      257,  250,  302,  211,  260,  252,  251,  250,  263,  211,
      259,  211,  261,  297,  256,  262,  265,  265,  285,  255,
      296,  269,  211,  265,  211,  269,  250,  274,  211,  252,
      263,  274,  250,  211,  290,  259,  257,  312,  256,  262,
      260,  269,  275,  285,  255,  279,  275,  274,  261,  265,
      288,  346,  444,  444,  270,  263,  300,  279,  279,  257,
      312,  299,  275,  260,  300,  300,  268,  308,  405,  294,

      269,  261,  266,  266,  266,  288,  274,  276,  304,  266,
      298,  276,  266,  266,  266,  266,  266,  266,  258,  294,
      279,  275,  405,  276,  276,  299,  346,  276,  307,  303,
      304,  308,  309,  298,  232,  266,  231,  266,  266,  266,
      266,  266,  266,  271,  294,  322,  314,  271,  299,  325,
      307,  271,  303,  316,  308,  304,  276,  309,  298,  271,
      315,  314,  317,  271,  319,  322,  318,  271,  316,  271,
      271,  315,  325,  317,  271,  307,  318,  303,  225,  331,
      329,  271,  319,  326,  216,  271,  314,  271,  214,  271,
      322,  271,  271,  316,  271,  271,  315,  325,  317,  271,

      320,  318,  370,  329,  330,  271,  319,  321,  271,  333,
      271,  320,  271,  327,  271,  273,  331,  326,  321,  273,
      335,  327,  327,  336,  337,  370,  330,  273,  329,  353,
      340,  333,  334,  437,  340,  273,  320,  273,  273,  331,
      326,  437,  273,  321,  341,  336,  335,  203,  341,  273,
      340,  330,  191,  273,  353,  273,  333,  273,  337,  273,
      273,  334,  273,  273,  341,  338,  338,  273,  360,  354,
      336,  335,  338,  273,  189,  362,  273,  347,  273,  340,
      273,  337,  273,  277,  408,  334,  367,  277,  186,  347,
      347,  355,  356,  341,  354,  366,  360,  378,  338,  277,

      277,  277,  369,  277,  362,  372,  373,  408,  378,  277,
      277,  277,  277,  277,  277,  183,  355,  356,  366,  382,
      360,  367,  347,  379,  447,  447,  374,  369,  362,  182,
      372,  373,  277,  378,  277,  277,  277,  277,  277,  277,
      280,  280,  280,  366,  367,  374,  425,  382,  376,  379,
      280,  280,  280,  280,  280,  280,  454,  162,  384,  161,
      376,  377,  380,  160,  454,  159,  386,  158,  156,  374,
      425,  382,  379,  377,  380,  280,  280,  280,  280,  280,
      280,  339,  339,  339,  342,  376,  350,  384,  342,  386,
      350,  339,  339,  339,  339,  339,  339,  388,  377,  380,

      342,  342,  350,  350,  342,  399,  350,  387,  390,  389,
      404,  384,  395,  150,  386,  139,  339,  339,  339,  339,
      339,  339,  400,  393,  395,  395,  402,  393,  387,  134,
      399,  389,  388,  342,  343,  350,  127,  413,  343,  393,
      393,  406,  420,  393,  390,  404,  407,  400,  402,  413,
      343,  343,  343,  387,  343,  388,  389,  395,  410,  417,
      343,  343,  343,  343,  343,  343,  406,  390,  404,  410,
      422,  407,  393,  402,  413,  419,  427,  420,  126,  125,
      415,  417,  124,  343,  431,  343,  343,  343,  343,  343,
      343,  348,  414,  123,  410,  415,  428,  419,  122,  422,

      420,  429,  414,  348,  348,  348,  417,  427,  431,  426,
      432,  432,  441,  348,  348,  348,  348,  348,  348,  438,
      415,  428,  419,  422,  434,  121,  429,  414,  436,  432,
      435,  427,  120,  446,  116,  434,  348,  441,  348,  348,
      348,  348,  348,  348,  351,  351,  351,  426,   95,  435,
      438,   75,   73,   66,  351,  351,  351,  351,  351,  351,
      434,  440,   62,  446,   59,  450,  436,   55,  442,  440,
      426,  451,  443,  435,  438,  453,  450,   50,  456,  351,
      351,  351,  351,  351,  351,  394,  394,  394,  446,  436,
      442,  440,   47,  451,   43,  394,  394,  394,  394,  394,

      394,  450,   40,   34,  460,   29,  443,  456,   24,  453,
       22,   19,   15,    0,    0,  442,  440,    0,  451,    0,
      394,  394,  394,  394,  394,  394,  396,  396,  396,  443,
        0,  456,  453,  460,    0,    0,  396,  396,  396,  396,
      396,  396,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,  460,    0,    0,
        0,  396,  396,  396,  396,  396,  396,  465,  465,  465,
      465,  465,  465,  465,  465,  465,  465,  465,  465,  465,
      465,  465,  465,  465,  465,  465,  465,  466,  466,  466,
      466,  466,  466,  466,  466,  466,  466,  466,  466,  466,

      466,  466,  466,  466,  466,  466,  466,  467,  467,  467,
      467,  467,  467,  467,  467,  467,  467,  467,  467,  467,
      467,  467,  467,  467,  467,  467,  467,  468,  468,  468,
      468,  468,  468,  468,  468,  468,  468,  468,  468,  468,
      468,  468,  468,  468,  468,  468,  468,  469,  469,  469,
      469,  469,  469,  469,  469,  469,  469,  469,  469,  469,
      469,  469,  469,  469,  469,  469,  469,  470,  470,    0,
        0,  470,  470,  470,  470,  470,  470,  470,  470,  470,
      470,  470,  470,  470,  470,  470,  470,  471,    0,    0,
        0,  471,  471,  471,    0,    0,  471,  471,  471,  471,

      471,  472,  472,    0,    0,    0,  472,  472,  472,  472,
      472,  472,  472,  472,  472,  472,  472,  472,  472,  472,
      472,  473,    0,    0,    0,    0,  473,  473,    0,    0,
      473,  473,  473,  473,  473,  474,  474,    0,    0,    0,
      474,  474,  474,  474,  475,  475,    0,  475,  475,  475,
      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
      475,  475,  475,  475,  476,  476,    0,    0,  476,  476,
      476,    0,    0,  476,  476,  476,  476,  476,  477,    0,
        0,    0,  477,  477,  477,  477,    0,  477,  477,  477,
      477,  477,  478,    0,    0,    0,    0,  478,  478,    0,

        0,  478,  478,  478,  478,  478,  479,  479,    0,    0,
      479,  479,  479,  479,    0,  479,  479,  479,  479,  479,
      480,    0,    0,    0,    0,  480,  480,  480,  480,  480,
      480,  480,  480,    0,  480,  480,  480,  480,  480,  480,
      481,  481,    0,    0,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      482,  482,    0,    0,  482,  482,  482,  482,  482,  482,
      482,  482,  482,    0,  482,  482,  482,  482,  482,  482,
      483,  483,    0,    0,  483,  483,  483,  483,  483,  483,
      483,  483,  483,  483,  483,  483,  483,  483,  483,  483,

      484,    0,  484,    0,  484,  484,  484,    0,    0,  484,
      484,  484,  484,  484,  485,    0,    0,    0,    0,    0,
        0,    0,    0,  485,  485,  485,  485,  485,  486,    0,
        0,    0,  486,  486,  486,    0,    0,  486,  486,  486,
      486,  486,  487,    0,    0,    0,    0,    0,    0,    0,
        0,  487,  487,  487,  487,  487,  488,    0,  488,    0,
        0,    0,  488,    0,    0,    0,  488,  488,    0,    0,
      488,  488,  489,  489,    0,    0,    0,  489,  489,  489,
      489,  490,  490,    0,    0,    0,  490,  490,  490,  490,
      490,  490,  490,  490,  490,  490,  490,  490,  490,  490,

      490,  491,    0,  491,  491,    0,    0,    0,  491,  491,
      491,  491,  492,    0,  492,  492,    0,    0,    0,  492,
      492,  492,  492,  493,    0,  493,  493,    0,    0,    0,
      493,  493,  493,  493,  494,  494,    0,    0,  494,  494,
      494,  494,  494,  494,  494,  494,  494,    0,  494,  494,
      494,  494,  494,  494,  495,  495,    0,    0,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  496,  496,    0,    0,  496,  496,
      496,  496,  496,  496,  496,  496,  496,  496,  496,  496,
      496,  496,  496,  496,  497,  497,    0,    0,    0,  497,

      497,  498,    0,  498,    0,    0,    0,  498,    0,    0,
        0,  498,  498,    0,    0,  498,  498,  499,  499,    0,
        0,    0,  499,  499,  500,  500,    0,    0,    0,  500,
      500,  501,  501,    0,    0,    0,  501,  501,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,

      464,  464,  464,  464,  464,  464,  464,  464,  464,  464,
      464,  464,  464
    } ;

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 "scan.l"






#line 11 "scan.l"
/* lexical analyser for gpasm
   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
   James Bowman, Craig Franklin

This file is part of gputils.

gputils 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 2, or (at your option)
any later version.

gputils 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 gputils; see the file COPYING.  If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */

#if !defined(YY_FLEX_MAJOR_VERSION) || \
  !defined(YY_FLEX_MINOR_VERSION) || \
  !defined(YY_FLEX_SUBMINOR_VERSION) || \
  YY_FLEX_MAJOR_VERSION < 2 || \
  (YY_FLEX_MAJOR_VERSION == 2 && YY_FLEX_MINOR_VERSION < 5) || \
  (YY_FLEX_MAJOR_VERSION == 2 && YY_FLEX_MINOR_VERSION == 5 && YY_FLEX_SUBMINOR_VERSION < 35)
# error "flex 2.5.35 or newer required!"
#endif

#include "stdhdr.h"

#include "libgputils.h"
#include "gpasm.h"
#include "parse.h"
#include "scan.h"
#include "deps.h"
#include "gperror.h"
#include "directive.h"
#include "evaluate.h"
#include "macro.h"
#include "coff.h"
#include "preprocess.h"
#include "lst.h"

#define OPERATOR(x)  return (yylval.i = (x))
/* YY_UNPUT not used, suppress the warning */
#define YY_NO_UNPUT

enum identtype { unknown_type, macro_params, defines, directives, globals, macros, opcodes };
enum identtype identify(char *);

static int found_eof(void);

int force_decimal; /* Used to force radix to decimal for some directives */
int force_ident;   /* Used to force numbers to identifiers for processor names */

static inline size_t
gp_input(char *buf, size_t max_size)
{
  if (IN_FILE_EXPANSION)
    {
      /* not in macro expansion */
      if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive)
        {
          int c = '*';
          size_t n;
          for (n = 0; n < max_size &&
            (c = getc(yyin)) != EOF && c != '\n'; ++n)
            buf[n] = (char) c;
          if (c == '\n')
            {
              /* skip CR followed by LF */
              if (n > 0 && '\r' == buf[n - 1])
                --n;
              buf[n++] = (char) c;
            }
          if (c == EOF && ferror(yyin))
            gpverror(GPE_SCANNER, "Input in flex scanner failed");
          return n;
        }
      else
        {
          gpverror(GPE_SCANNER, "Interactive scanner should be used");
          return 0;
        }
    }
  else
    {
      /* in macro expansion */
      if (state.src->m)
        {
          size_t n = strlen(state.src->m->src_line);
          if (n > max_size - 1)
            n = max_size - 2;
          strncpy(buf, state.src->m->src_line, n);
          buf[n++] = '\n'; /* add newline */
          return n;
        }
      else
        {
          buf[0] = buf[1] = YY_END_OF_BUFFER_CHAR;
          return 0;
        }
    }
}

static inline size_t
gp_yyinput(char *buf, size_t max_size)
{
  int result = gp_input(buf, max_size);
  if (result)
    {
      /* preprocess line */
      preprocess_line(buf, &result, max_size);

      state.src->last_char_is_nl = (buf[result - 1] == '\n');
    }
  else if (!state.src->last_char_is_nl)
    {
      *buf = '\n';
      result = 1;
      state.src->last_char_is_nl = true;
    }
  return result;
}

#define YY_INPUT(buf, result, max_size) result = gp_yyinput(buf, max_size)
#line 1271 "scan.c"

#define INITIAL 0
#define bquote 1
#define lnquote 2
#define define 3
#define definition 4
#define defargs 5
#define macpar 6

#ifndef YY_NO_UNISTD_H
/* Special case for "unistd.h", since it is non-ANSI. We include it way
 * down here because we want the user's section 1 to have been scanned first.
 * The user has a chance to override it with an option.
 */
#include <unistd.h>
#endif

#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
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#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 do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#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 = '*'; \
		size_t 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 147 "scan.l"

#line 1469 "scan.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 >= 465 )
					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] != 2239 );

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 148 "scan.l"
{
                           yylval.s = "include";
                           BEGIN(bquote);
                           return IDENTIFIER;
                         }
	YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(bquote):
case YY_STATE_EOF(lnquote):
case YY_STATE_EOF(define):
case YY_STATE_EOF(definition):
case YY_STATE_EOF(defargs):
case YY_STATE_EOF(macpar):
#line 153 "scan.l"
{
                           if (found_eof())
                             yyterminate();
                         }
	YY_BREAK
case 2:
YY_RULE_SETUP
#line 157 "scan.l"
{
                           BEGIN(lnquote);
                           yylval.s = "title";
                           return IDENTIFIER;
                         }
	YY_BREAK
case 3:
YY_RULE_SETUP
#line 162 "scan.l"
{
                           BEGIN(lnquote);
                           yylval.s = "subtitle";
                           return IDENTIFIER;
                         }
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 167 "scan.l"
{
                           return CBLOCK;
                         }
	YY_BREAK
case 5:
YY_RULE_SETUP
#line 170 "scan.l"
{
                           yylval.s = strdup(yytext);
                           return ERRORLEVEL;
                         }
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 174 "scan.l"
{
                           return ENDC;
                         }
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 177 "scan.l"
{
                           /* fill with ( ) as first argument */
                           yylval.i = FILL;
                           return FILL;
                         }
	YY_BREAK
case 8:
*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 182 "scan.l"
{
                           yylval.s = "#define";
                           return DEFINE;
                         }
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 186 "scan.l"
{
                           BEGIN(define);
                           yylval.s = "#define";
                           return DEFINE;
                         }
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 191 "scan.l"
{
                           BEGIN(defargs);
                           yylval.s = strndup(yytext, yyleng - 1);
                           return IDENT_BRACKET;
                         }
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 196 "scan.l"
{
                           yylval.s = strdup(yytext);
                           return IDENTIFIER;
                         }
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 200 "scan.l"
{
                           BEGIN(definition);
                           yylval.i = yytext[0];
                           return ')';
                         }
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 205 "scan.l"
{
                           BEGIN(definition);
                           yylval.s = strdup(yytext);
                           return IDENTIFIER;
                         }
	YY_BREAK
case 14:
YY_RULE_SETUP
#line 210 "scan.l"
{
                           yylval.i = UPPER;
                           return UPPER;
                         }
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 214 "scan.l"
{
                           yylval.i = HIGH;
                           return HIGH;
                         }
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 218 "scan.l"
{
                           yylval.i = LOW;
                           return LOW;
                         }
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 222 "scan.l"
{
                           yylval.s = strdup(yytext);
                           return LIST;
                         }
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 226 "scan.l"
{
                           yylval.s = strdup(yytext);
                           return PROCESSOR;
                         }
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 230 "scan.l"
{
                           /* #if and if can appear in column 1 */
                           yylval.s = strdup(yytext);
                           return IDENTIFIER;
                         }
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 235 "scan.l"
{
                           /* #else and else can appear in column 1 */
                           yylval.s = strdup(yytext);
                           return IDENTIFIER;
                         }
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 240 "scan.l"
{
                           /* #endif and endif can appear in column 1 */
                           yylval.s = strdup(yytext);
                           return IDENTIFIER;
                         }
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 245 "scan.l"
{
                           /* #ifdef and ifdef can appear in column 1 */
                           yylval.s = strdup(yytext);
                           return IDENTIFIER;
                         }
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 250 "scan.l"
{
                           /* #ifndef and ifndef can appear in column 1 */
                           yylval.s = strdup(yytext);
                           return IDENTIFIER;
                         }
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 255 "scan.l"
{
                           /* #undefine can appear in column 1 */
                           yylval.s = strdup(yytext);
                           return IDENTIFIER;
                         }
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 260 "scan.l"
{
                           yylval.s = strdup(yytext);
                           return DEBUG_LINE;
                         }
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 264 "scan.l"
{
                           int has_collon = 0;
                           struct symbol *sym;
                           struct macro_head *h;

                           if (yytext[strlen(yytext) - 1] == ':') {
                             yytext[strlen(yytext) - 1] = '\0';
                             has_collon = 1;
                           }
                           yylval.s = strdup(yytext);
                           switch (identify(yytext)) {
                             case directives:
                               gpvwarning(GPW_DIR_COLUMN_ONE, yytext);
                               if (has_collon)
                                 gpverror(GPE_BADCHAR, ':');
                               return IDENTIFIER;
                               break;

                             case macros:
                               /* Macro invocation */
                               BEGIN(macpar);
                               sym = get_symbol(state.stMacros, yytext);
                               h = get_symbol_annotation(sym);
                               /* TODO: this condition shoul be probably removed
                                * since the symbol table is reinitialized before
                                * the second pass */
                               if (h->line_number == state.src->line_number) {
                                 return LABEL;
                               }
                               else {
                                 gpvwarning(GPW_MACRO_COLUMN_ONE, yytext);
                                 if (has_collon)
                                  gpverror(GPE_BADCHAR, ':');
                                 return IDENTIFIER;
                               }
                               break;

                             case opcodes:
                               gpvwarning(GPW_OP_COLUMN_ONE, yytext);
                               if (has_collon)
                                 gpverror(GPE_BADCHAR, ':');
                               return IDENTIFIER;
                               break;

                             case unknown_type:
                               return LABEL;

                             default:
                               return LABEL;
                           }
                         }
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 315 "scan.l"
{
                           if (NULL != get_symbol(state.stMacros, yytext)) {
                             /* Macro invocation */
                             BEGIN(macpar);
                           }
                           yylval.s = strdup(yytext);
                           return IDENTIFIER;
                         }
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 323 "scan.l"
{
                           yylval.i = stringtolong(yytext + 2, 16);
                           return NUMBER;
                         }
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 327 "scan.l"
{
                           if (force_ident) {
                             yylval.s = strdup(yytext);
                             return IDENTIFIER;
                           }
                           else if (state.radix == 16) {
                             yylval.i = stringtolong(yytext, 16);
                             return NUMBER;
                           }
                           else {
                             yytext[yyleng - 1] = '\0';
                             yylval.i = stringtolong(yytext, 2);
                             return NUMBER;
                           }
                         }
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 342 "scan.l"
{
                           yytext[yyleng - 1] = '\0';
                           yylval.i = stringtolong(yytext + 2, 2);
                           return NUMBER;
                         }
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 347 "scan.l"
{
                           if (force_ident) {
                             yylval.s = strdup(yytext);
                             return IDENTIFIER;
                           }
                           else {
                             yytext[yyleng - 1] = '\0';
                             yylval.i = stringtolong(yytext, 8);
                             return NUMBER;
                           }
                         }
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 358 "scan.l"
{
                           yytext[yyleng - 1] = '\0';
                           yylval.i = stringtolong(yytext + 2, 8);
                           return NUMBER;
                         }
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 363 "scan.l"
{
                           if (force_ident) {
                             yylval.s = strdup(yytext);
                             return IDENTIFIER;
                           }
                           else if (state.radix == 16) {
                             yylval.i = stringtolong(yytext, 16);
                             return NUMBER;
                           }
                           else {
                             yytext[yyleng - 1] = '\0';
                             yylval.i = stringtolong(yytext, 10);
                             return NUMBER;
                           }
                         }
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 378 "scan.l"
{
                           yytext[yyleng - 1] = '\0';
                           yylval.i = stringtolong(yytext + 2, 10);
                           return NUMBER;
                         }
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 383 "scan.l"
{
                           yylval.i = stringtolong(yytext + 1, 10);
                           return NUMBER;
                         }
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 387 "scan.l"
{
                           if (force_ident) {
                             yylval.s = strdup(yytext);
                             return IDENTIFIER;
                           }
                           else {
                             yytext[yyleng - 1] = '\0';
                             yylval.i = stringtolong(yytext, 16);
                             return NUMBER;
                           }
                         }
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 398 "scan.l"
{
                           yytext[yyleng - 1] = '\0';
                           yylval.i = stringtolong(yytext + 2, 16);
                           return NUMBER;
                         }
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 403 "scan.l"
{
                           if (force_ident) {
                             yylval.s = strdup(yytext);
                             return IDENTIFIER;
                           } 
                           else if (force_decimal) {
                             yylval.i = stringtolong(yytext, 10);
                             return NUMBER;
                           }
                           else {
                             yylval.i = stringtolong(yytext, state.radix);
                             return NUMBER;
                           }
                         }
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 417 "scan.l"
{
                           if ((yyleng > 1) && (yytext[yyleng - 1] == '"'))
                             --yyleng;
                           else
                             gpwarning(GPW_MISSING_QUOTE, NULL);
                           yylval.s = strndup(yytext + 1, yyleng - 1);
                           BEGIN(INITIAL);
                           return STRING;
                         }
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 426 "scan.l"
{
                           const char *pc = convert_escape_chars(yytext + 1, &yylval.i);
                           if (pc != &yytext[yyleng - 1])
                             gpverror(GPE_ILLEGAL_ARGU, "expected single character");
                           return NUMBER;
                         }
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 432 "scan.l"
{
                           yylval.i = yytext[2];
                           return NUMBER;
                         }
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 436 "scan.l"
{
                           yylval.s = strndup(yytext + 1, yyleng - 2);
                           BEGIN(INITIAL);
                           return STRING;
                         }
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 441 "scan.l"
{
                           /* unquoted (special-case) string */
                           yylval.s = strdup(yytext);
                           BEGIN(INITIAL);
                           return STRING;
                         }
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 447 "scan.l"
{
                           /* if valid, must match with length >= unquoted token below */
                           yylval.s = strndup(yytext + 1, yyleng - 2);
                           BEGIN(INITIAL);
                           return STRING;
                         }
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 453 "scan.l"
{
                           /* full-line (special-case) string */
                           /* must begin and end with non-whitespace */
                           yylval.s = strdup(yytext);
                           BEGIN(INITIAL);
                           return STRING;
                         }
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 460 "scan.l"
OPERATOR(LSH);
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 461 "scan.l"
OPERATOR(RSH);
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 462 "scan.l"
OPERATOR(GREATER_EQUAL);
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 463 "scan.l"
OPERATOR(LESS_EQUAL);
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 464 "scan.l"
OPERATOR(EQUAL);
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 465 "scan.l"
OPERATOR(NOT_EQUAL);
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 466 "scan.l"
OPERATOR(LOGICAL_AND);
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 467 "scan.l"
OPERATOR(LOGICAL_OR);
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 469 "scan.l"
OPERATOR(ASSIGN_PLUS);
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 470 "scan.l"
OPERATOR(ASSIGN_MINUS);
	YY_BREAK
case 56:
YY_RULE_SETUP
#line 471 "scan.l"
OPERATOR(ASSIGN_MULTIPLY);
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 472 "scan.l"
OPERATOR(ASSIGN_DIVIDE);
	YY_BREAK
case 58:
YY_RULE_SETUP
#line 473 "scan.l"
OPERATOR(ASSIGN_MODULUS);
	YY_BREAK
case 59:
YY_RULE_SETUP
#line 474 "scan.l"
OPERATOR(ASSIGN_LSH);
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 475 "scan.l"
OPERATOR(ASSIGN_RSH);
	YY_BREAK
case 61:
YY_RULE_SETUP
#line 476 "scan.l"
OPERATOR(ASSIGN_AND);
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 477 "scan.l"
OPERATOR(ASSIGN_OR);
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 478 "scan.l"
OPERATOR(ASSIGN_XOR);
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 480 "scan.l"
OPERATOR(INCREMENT);
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 481 "scan.l"
OPERATOR(DECREMENT);
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 483 "scan.l"
OPERATOR(TBL_POST_INC);
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 484 "scan.l"
OPERATOR(TBL_POST_DEC);
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 485 "scan.l"
OPERATOR(TBL_PRE_INC);
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 487 "scan.l"

	YY_BREAK
case 70:
YY_RULE_SETUP
#line 488 "scan.l"
{
#define CHUNCK  64
                           int len = CHUNCK;
                           char *buf = malloc(len);
                           int i = 0;
                           int c = yytext[0];
                           static int emit_comma = 0;
                           int prev_esc = 0, state = 0;

                           if (emit_comma) {
                             unput(c);
                             emit_comma = 0;
                             yylval.i = ',';
                             return ',';
                           }

                           /* skip leading spaces */
                           while (isspace(c))
                             c = input();

                           for (; ; ) {
                             switch (c) {
                             case ',':
                               if (0 != state)
                                 goto no_esc;

                               emit_comma = 1;
                               goto skip_trailing;

                             case ';':
                               if (0 != state)
                                 goto no_esc;

                               /* eat the rest of line */
                               while (EOF != (c = input()) && '\n' != c)
                                 ;
                               /* fall through */
                             case '\n':
                               unput('\n');
                               /* fall through */
                             skip_trailing:
                               /* skip trailing spaces */
                               while (i > 0 && isspace(buf[i - 1]))
                                 --i;
                               /* fall through */
                             case EOF:
                               yylval.s = strndup(buf, i);
                               free(buf);
                               return IDENTIFIER;

                             case '\\':
                               prev_esc = !prev_esc;
                               break;

                             case '"':
                             case '\'':
                               /* escaping out of string doesn't have any special meaning */
                               if (0 == state || (0 != state && !prev_esc))
                                 state = (0 == state) ? c : ((state == c) ? 0 : state);
                               /* fall through */
                             default:
                             no_esc:
                               prev_esc = 0;
                               break;
                             }

                             buf[i++] = c;
                             if (len <= i) {
                               len += CHUNCK;
                               buf = realloc(buf, len);
                             }
                             c = input();
                           }
                         }
	YY_BREAK
case 71:
/* rule 71 can match eol */
YY_RULE_SETUP
#line 562 "scan.l"
{
                           force_decimal = 0;
                           force_ident = 0;
                           BEGIN(INITIAL);  /* switch to INITIAL state */
                           return yytext[0];
                         }
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 568 "scan.l"
{
                           BEGIN(INITIAL);  /* switch to INITIAL state */
                         }
	YY_BREAK
case 73:
YY_RULE_SETUP
#line 571 "scan.l"
{
                           yylval.i = yytext[0];
                           return yytext[0];
                         }
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 575 "scan.l"
ECHO;
	YY_BREAK
#line 2286 "scan.c"

	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 >= 465 )
				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 >= 465 )
			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 == 464);

	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  );
}

/* 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 = 1;

	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 yybytes the byte buffer to scan
 * @param _yybytes_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 575 "scan.l"



static void
search_paths(struct source_context *new, const char *name)
{
  char tryname[PATH_MAX + 1];
  int i;

  for(i = 0; i < state.path_num; i++) {
    snprintf(tryname, sizeof(tryname),
             "%s" COPY_CHAR "%s", state.paths[i], name);
    new->f = fopen(tryname, "rt");
    if (new->f) {
      new->name = strdup(tryname);
      break;
    }
  }
}

void
open_src(const char *name, int isinclude)
{
  extern FILE *yyin;
  struct source_context *new = malloc(sizeof (struct source_context));
  memset(new, 0, sizeof (struct source_context));

  if (state.src)
    state.src->yybuf = YY_CURRENT_BUFFER;

  new->f = fopen(name, "rt");
  if (new->f)
    new->name = strdup(name);
  else if (isinclude && (strchr(name, PATH_CHAR) == 0)) {
    /* If include file and no PATH_CHAR in name, try searching include
       path */
    search_paths(new, name);

    if (new->f == NULL) {
      /* We didn't find a match so check for lower case.  This is mainly for
         Microchip examples and some includes in which filenames were written
         without regard to case */
      char *lower_case_name = gp_lower_case(name);
      search_paths(new, lower_case_name);
      free(lower_case_name);

      if (new->f != NULL)
        gpwarning(GPW_UNKNOWN, "found lower case match for include filename");
    }
  }

  if (new->f == NULL) {
    if (state.src) {
      gpverror(GPE_NOENT, name);
    }
    else {
      perror(name);
      exit(1);
    }
  }
  else {
    yyin = new->f;

    if (state.src) {
      yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
    }

    if (state.use_absolute_path) {
      new->name = gp_absolute_path(new->name);
    }
    new->type = src_file;
    new->h = NULL;
    new->line_number = 1;
    new->loop_number = 1;
    if (state.debug_info) {
      new->file_symbol = NULL;
    }
    else {
      new->file_symbol = coff_add_filesym(new->name, isinclude);
    }
    new->prev = state.src;

    state.src = new;
    state.src->fc = add_file(ft_src, new->name);
    deps_add(new->name);

    if (!isinclude) {
      /* it is the top level file so initialize the lexer */
      force_decimal = 0;
      force_ident = 0;
    }
    state.src->last_char_is_nl = true;
    state.found_end = 0;
  }
}

void
execute_macro(struct macro_head *h, int is_while)
{
  struct source_context *new = malloc(sizeof (struct source_context));
  memset(new, 0, sizeof (struct source_context));

  assert(state.src != NULL);
  state.src->yybuf = YY_CURRENT_BUFFER;
  /* store the stack so it can be returned when the macro is complete */
  state.src->astack = state.astack;

  /* create new source_context */
  new->name = strdup(h->src_name);
  if (is_while) {
    new->type = src_while;
  }
  else {
    new->type = src_macro;
  }
  new->line_number = h->line_number + 1;
  new->loop_number = 1;
  new->file_symbol = h->file_symbol;
  new->f = NULL;
  new->h = h;
  new->m = h->body;

  new->prev = state.src;
  state.src = new;

  state.src->fc = add_file(ft_src, new->name); /* scan list for fc */
  yy_switch_to_buffer(yy_create_buffer(NULL,YY_BUF_SIZE));
}

void
repeat_while(void)
{
  struct macro_head *h;

  h = state.src->h;

  state.src->line_number = h->line_number + 1;
  state.src->loop_number++;
  state.src->m = h->body;

  yy_delete_buffer(YY_CURRENT_BUFFER);
  yy_switch_to_buffer(yy_create_buffer(NULL,YY_BUF_SIZE));
}

void
close_file(void)
{
  struct source_context *old = state.src;

  if (state.src->type == src_file) {
    if (state.src->f != NULL) {
      fclose(state.src->f);
    }
    free(state.src->name);

    if (NULL == state.src->prev)
      coff_cleanup_before_eof();

    if (!state.debug_info) {
      coff_add_eofsym();
    }
    state.src = state.src->prev;
  }
  else if (state.src->type == src_macro) {
    state.src = state.src->prev;

    state.stTop = pop_symbol_table(state.stTop);
    state.stMacroParams = pop_symbol_table(state.stMacroParams);
    if (state.src->astack != state.astack) {
      gpverror(GPE_ILLEGAL_NESTING);
    }
    assert(state.stTop != NULL);
    assert(state.stMacroParams != NULL);
    free(old->name);
  }
  else if (state.src->type == src_while) {
    free(state.src->name);
    state.src = state.src->prev;
  }
  free(old);
}

void
execute_exitm(void)
{
  struct amode *previous;
  struct amode *old;

  /* The macro is ended early, so return the stack to its previous state */
  previous = state.src->prev->astack;
  while ((state.astack != NULL) &&
         (state.astack != previous)) {
    old = state.astack;
    state.astack = state.astack->prev;
    free(old);
  }

  close_file();
  if (state.src) {
    yy_delete_buffer(YY_CURRENT_BUFFER);
    yy_switch_to_buffer(state.src->yybuf);
  }
}

/* found end directive, close all files and stop the parser */
int
found_end(void)
{
  /* close all open files */
  while(state.src) {
    close_file();
  }

  /* make sure the buffer is empty when pass 2 starts */
  if (YY_CURRENT_BUFFER)
    yy_flush_buffer(YY_CURRENT_BUFFER);

  return 1;
}

static int
found_eof(void)
{
  int terminate = 0;
  enum src_types prev_type;

  if (IN_WHILE_EXPANSION) {
    if (maybe_evaluate(state.src->h->parms)) {
      if (state.src->loop_number > 255) {
        gpverror(GPE_BAD_WHILE_LOOP);
      }
      else {
        /* repeat the while loop */
        repeat_while();
        return 0;
      }
    }
  }

  prev_type = state.src->type;
  close_file();
  if (state.src) {
    /* Just an include file */
    yy_delete_buffer(YY_CURRENT_BUFFER);
    yy_switch_to_buffer(state.src->yybuf);

    if (state.pass == 2 && src_while == prev_type) {
      /* Force ENDW listing */
      state.lst.line.linetype = dir;
      /* Line number was alreay incremented, so it has to be decremented,
       * source line listed and line number incremented again */
      --state.src->line_number;
      lst_format_line(state.src->curr_src_line.line, 0);
      ++state.src->line_number;
    }
  }
  else {
    if (!state.found_end)
      gperror(GPE_ILLEGAL_COND, "Illegal condition (EOF encountered before END)");
    terminate = found_end();
  }

  return terminate;
}

enum identtype
identify(char *text)
{
  enum identtype type;
  struct symbol *sym;

  if ((sym = get_symbol(state.stMacroParams, text)) != NULL) {
    type = macro_params;
  }
  else if ((sym = get_symbol(state.stDefines, text)) != NULL) {
    type = defines;
  }
  else if ((sym = get_symbol(state.stDirective, text)) != NULL) {
    type = directives;
  }
  else if ((sym = get_symbol(state.stBuiltin, text)) != NULL) {
    type = opcodes;
  }
  else if ((sym = get_symbol(state.stGlobal, text)) != NULL) {
    type = globals;
  }
  else if ((sym = get_symbol(state.stMacros, text)) != NULL) {
    type = macros;
  }
  else {
    type = unknown_type;
  }

  return type;
}

