
#line 3 "lex.yy.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 37
#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
#define YY_BUF_SIZE 16384
#endif

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

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

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

extern yy_size_t 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_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.
	 */
	yy_size_t 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 yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
yy_size_t 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,yy_size_t len  );

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

#define yy_new_buffer yy_create_buffer

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

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

#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

/* Begin user sect3 */

typedef unsigned char YY_CHAR;

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

typedef int yy_state_type;

extern int yylineno;

int yylineno = 1;

extern char *yytext;
#define yytext_ptr yytext

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

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

#define YY_NUM_RULES 100
#define YY_END_OF_BUFFER 101
/* 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[673] =
    {   0,
        0,    0,   50,   50,    0,    0,   40,   40,    0,    0,
        2,    2,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,  101,   98,   98,   99,   96,   97,   97,   97,
       98,   93,   50,   70,   85,   98,   67,   98,   98,   71,
       72,   63,   61,   73,   62,   49,   66,   48,   75,   74,
       77,   52,   78,   76,   51,   51,   51,   86,   87,   68,
       93,   98,   90,   64,   98,   98,   96,   97,   97,   97,
       98,   93,   43,   43,   44,   40,   43,   40,   40,   40,
       40,   43,   43,   98,    3,    3,    4,    2,    3,    2,
        2,    2,    2,    3,    3,   98,   98,   33,   96,   97,

       97,   97,   98,   93,   98,   98,   96,   98,   98,   97,
       97,   97,   98,   93,   98,   98,   18,   96,   97,   97,
       97,   98,   93,   98,   98,   21,   96,   97,   97,   97,
       98,   93,   98,   98,   25,   96,   97,   97,   97,   98,
       93,    0,    0,   97,   97,   97,   91,   92,    0,    0,
        0,    0,    0,    0,    0,    0,    0,   50,    0,   82,
        0,   88,   83,    0,   89,   69,   55,   59,   53,   60,
       54,   49,    0,   65,   56,   49,   48,    0,   79,   81,
       80,   51,   51,   51,   57,    0,   84,    0,    0,    0,
        0,   97,   97,   97,   91,   92,    0,    0,    0,   40,

       40,   40,   40,   40,   41,   42,    0,    0,    0,    0,
        0,    2,    2,    2,    2,    2,    0,    0,   33,    0,
        0,   97,   97,   97,   91,   92,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
       97,   97,   97,   91,   92,    0,    0,   18,    0,    0,
       97,   97,   97,   91,   92,    0,    0,    0,   21,    0,
        0,   97,   97,   97,   91,   92,    0,    0,    0,   25,
        0,    0,   97,   97,   97,   91,   92,    0,    0,    0,
        0,   97,   97,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,   58,    0,   49,    0,   48,

       51,   51,    0,   47,   97,   97,    0,    0,   40,   40,
        0,    0,    0,    0,    2,    2,    0,   97,   97,    0,
        0,    0,    0,    0,    0,   13,    0,    0,    0,    0,
        0,    0,    0,   97,   97,    0,    0,   97,   97,    0,
        0,    0,   97,   97,    0,    0,    0,   97,   97,    0,
        0,    0,    0,    0,   94,   95,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,   51,
       51,   47,   94,   95,    0,    0,   40,   40,    0,    0,
        0,    0,    0,   35,    2,    2,    0,   94,   95,    0,
        0,    0,    0,    0,    0,    0,   15,    0,    0,   13,

        0,    0,   14,    0,   94,   95,    0,    0,   94,   95,
        0,    0,    0,   94,   95,    0,    0,    0,   94,   95,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
       31,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    6,    0,    0,    0,    0,    0,    0,    0,   12,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,

        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
       22,    0,    0,    0,    0,    0,   37,    0,    0,    0,
       27,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,   34,    0,    0,    0,    0,   33,    0,    0,    0,
        0,    0,    0,    0,    0,   18,    0,    0,    0,   17,
        0,   21,    0,    0,    0,   20,    0,   25,    0,    0,
        0,    0,    0,    0,    0,   39,    0,    0,   28,    0,
        8,    0,    0,    0,    0,   47,    0,    0,    0,   36,
        0,   38,    0,    0,   29,    0,   30,    0,    0,    0,
        0,    0,    0,    0,   18,    0,    0,   21,    0,   25,

        0,    0,    0,    0,    0,    0,    0,   45,    0,    0,
        0,   37,    0,   47,    0,    0,   32,    0,   15,    0,
        0,    0,   16,    0,   19,    0,    0,    0,   46,    0,
        7,    0,    0,    0,   23,    0,   39,    0,    0,    0,
       15,    0,    0,   23,    0,    9,    0,    0,    0,    0,
        0,    0,    0,    0,    0,   26,    0,    0,   24,    0,
        0,    0,    0,    0,    0,    5,    0,    0,   10,    1,
       11,    0
    } ;

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

       51,   52,   29,   53,   54,   29,   29,   55,   29,   56,
       57,   58,   38,   29,   59,   60,   61,   29,   62,   43,
       29,   29,   63,   64,   65,   66,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,

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

static yyconst flex_int32_t yy_meta[67] =
    {   0,
        1,    2,    3,    4,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    5,    6,
        1,    1,    1,    1,    1,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    1,    1,    1,    1,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    2,    1,    1,    1
    } ;

static yyconst flex_int16_t yy_base[720] =
    {   0,
        0,    0,   66,    0,  132,    0,  198,    0,  263,  264,
      327,    0,  393,    0,  459,    0,  525,    0,  591,    0,
      657,    0, 2367, 2368,  722, 2368, 2368,    0, 2323,  228,
      207,  758,  726, 2368, 2342,  268, 2368, 2355, 2353, 2368,
     2368,  260,  261, 2368,  262,  257,  259,  262, 2368, 2368,
     2339, 2338, 2337, 2368,    0, 2316,  239, 2368, 2368, 2335,
      256, 2293, 2368, 2368, 2344,  727, 2343,  813, 2311,  249,
      713,  715, 2368,  730, 2368,  733, 2368,  734,  284,  729,
      734,  228,  751,  738, 2368,  748, 2368,  878, 2368,  741,
     2349,  737,  742,  231,  267, 2349,  881, 2368, 2348,  944,

     2307,  254, 1008,  878, 2337, 1011, 2336,  874,  875, 1074,
     2304,  258,  877,  747, 2343, 1014, 2368, 2342, 1140, 2301,
      260, 1204,  888, 2340, 1207, 2368, 2339, 1270, 2298,  261,
     1334, 1009, 2337, 1337, 2368, 2336, 1400, 2295,  262, 1464,
      885, 1467,  991,    0,  711,  714, 2368, 2368, 2283,  868,
      860, 2279, 2298, 2304, 2282,  250,  260, 1468,  718, 2368,
      308, 2368, 2368, 2322, 2368, 2308, 2368, 2368, 2368, 2368,
     2368,  879,  742, 2368, 2368,  880, 1003,  748, 2368, 2368,
     2368,    0,  867,  873, 2368,  269, 2368, 2318, 1471, 1472,
     1002,    0,  874,  884, 2317, 2316, 1014, 1475, 1210, 1476,

     1479,  753, 1204, 1209, 2368, 2368, 1214, 2275,  715, 2274,
     1483, 1484, 1480, 2321, 1334, 1338, 2294, 2320, 2368, 1487,
     1340,    0,  995,  996, 2319, 2318, 1465, 1214, 1216, 2308,
      751, 1490, 1203, 1492, 1208, 1022, 1333, 1209, 1332, 1043,
        0,  997,  998, 2307, 2306, 1334, 2314, 2368, 1495, 1510,
        0, 1002, 1004, 2313, 2312, 1493, 1497, 2311, 2368, 1503,
     1521,    0, 1011, 1014, 2310, 2309, 1507, 1511, 2308, 2368,
     1514, 1344,    0, 1190, 1192, 2307, 2306, 1519, 1345,  748,
     1523,  873, 1190, 2252, 2275, 2247, 2255, 2269,  847, 2254,
     2245, 2271, 2261, 2247, 2248, 2368, 2278, 2277, 2276, 2275,

     1191, 1192, 1499, 1060, 1195, 1196,  878, 1346, 1563, 1565,
     2238,  864, 2233, 1530, 1533, 1541, 2252, 1312, 1315, 1512,
     1506, 1556, 1585, 1245, 1250, 2368, 1579, 1347, 1222, 1341,
     1351, 1345, 1349, 1316, 1325, 1511, 1540, 1326, 1468, 1557,
     1581, 1589, 1554, 1555, 1594, 1595, 1597, 1559, 1562, 1601,
     1605, 1604, 1606, 1607,    0,    0, 2241, 2252, 2237, 2233,
     2245, 2234, 2234, 2228, 2224, 2253, 2253, 2231,  720,    0,
        0, 2275,    0,    0, 1599, 1605, 1609, 1614, 2218, 2225,
     2225, 2223, 1376, 2368, 2269, 2268, 2244,    0,    0, 1617,
     1618, 1623, 1621, 1636, 2267, 1624, 2368, 1625, 1630, 2368,

     1640, 1653, 2368, 1658,    0,    0, 1618, 1637,    0,    0,
     1629, 1645, 1648,    0,    0, 1659, 1661, 1663,    0,    0,
     1673, 1664, 1674, 1672, 1675, 2214, 1662, 2203, 2215, 2226,
     2213, 2213, 2202, 1681, 2230, 2235, 2199, 2197, 1670, 1481,
     2207, 2205, 2205, 1632, 2229, 1678, 1681, 1684, 1686, 2251,
     2368, 1690, 1691, 1695, 1676, 1692, 1693, 1698, 1705, 1728,
     1706, 1708, 1709, 1743, 1710, 1711, 2250, 1716, 1714, 2191,
     2214, 2368, 2247, 2184, 2222, 1738, 2195, 2196, 1748, 2368,
     2208, 2204, 2188, 2188, 1748, 1714, 2187, 1762, 2188, 2187,
     1979, 2001, 1719, 1778, 1735, 1750, 1736, 1994, 1753, 1725,

     1789, 1989, 1969, 1764, 1765, 1792, 1968, 1967, 1766, 1966,
     2368, 1767, 1769, 1918,  751, 1964, 2368, 1963, 1938, 1795,
     2368, 1800, 1913, 1898, 1929, 1901, 1900, 1771, 1805, 1802,
     1814, 2368, 1822, 1955, 1924, 1953, 2368, 1952, 1825, 1951,
     1835, 1829, 1831, 1832, 1950, 2368, 1782, 1948, 1947, 2368,
     1946, 2368, 1795, 1945, 1944, 2368, 1943, 2368, 1942, 1785,
     1809, 1893, 1912, 1930, 1938, 2368, 1905, 1845, 2368, 1846,
     2368, 1903, 1872, 1887, 1856, 1839, 1849, 1860, 1863, 2368,
     1932, 2368, 1899, 1930, 2368, 1929, 2368, 1873, 1928, 1868,
     1870, 1875, 1927, 1926, 2368, 1924, 1923, 2368, 1921, 2368,

     1816,  757, 1881, 1911, 1854, 1888, 1884, 2368, 1905, 1912,
     1859, 1898, 1887, 1890, 1868, 1852, 2368, 1891, 2368, 1894,
     1895, 1817, 2368, 1812, 2368, 1810, 1851, 1906, 2368, 1721,
     2368, 1767, 1488, 1516, 2368, 1447, 1381, 1345, 1897, 1902,
     2368, 1908, 1378, 2368, 1863, 2368, 1342, 1341, 1366, 1218,
     1910, 1244, 1030, 1233, 1223, 2368, 1191, 1064, 2368, 1017,
      907,  837,  889,  798,  255, 2368,  252,  233, 2368, 2368,
     2368, 2368, 1969, 1975, 1981, 1983, 1989, 1994, 1996, 2001,
     2004, 2010, 2016, 2022, 2028, 2034, 2040, 2046, 2052, 2058,
     2064, 2070, 2076, 2082, 2088, 2094, 2100, 2106, 2112, 2118,

     2124, 2130, 2136, 2142, 2148, 2154, 2160, 2166, 2172, 2178,
     2184, 2190, 2196, 2202, 2208, 2214, 2220, 2226, 2232
    } ;

static yyconst flex_int16_t yy_def[720] =
    {   0,
      672,    1,  672,    3,  672,    5,  672,    7,    1,    1,
      672,   11,  672,   13,  672,   15,  672,   17,  672,   19,
      672,   21,  672,  672,  672,  672,  672,  673,  673,  673,
      672,  672,  672,  672,  672,  674,  672,  672,  675,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  676,  676,  676,  672,  672,  672,
      672,  672,  672,  672,  677,  677,  677,  672,   68,   68,
      677,  677,  672,  672,  672,  678,  672,  678,  679,  679,
      679,  672,  672,  672,  672,  672,  672,  680,  672,  680,
      681,  681,  681,  672,  672,  682,  682,  672,  682,  672,

      100,  100,  682,  682,  683,  683,  683,  683,  683,  672,
      110,  110,  683,  683,  684,  684,  672,  684,  672,  119,
      119,  684,  684,  685,  685,  672,  685,  672,  128,  128,
      685,  685,  686,  686,  672,  686,  672,  137,  137,  686,
      686,  672,  672,  673,  673,  673,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      674,  672,  672,  675,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  676,  676,  676,  672,  672,  672,  677,  677,  677,
      677,   68,   68,   68,  677,  677,  677,  672,  672,  678,

      678,  679,  679,  679,  672,  672,  672,  672,  672,  672,
      672,  680,  680,  681,  681,  681,  672,  682,  672,  682,
      682,  100,  100,  100,  682,  682,  682,  682,  682,  683,
      683,  683,  683,  687,  683,  683,  683,  683,  683,  683,
      110,  110,  110,  683,  683,  683,  684,  672,  684,  684,
      119,  119,  119,  684,  684,  684,  684,  685,  672,  685,
      685,  128,  128,  128,  685,  685,  685,  685,  686,  672,
      686,  686,  137,  137,  137,  686,  686,  686,  686,  686,
      686,  673,  673,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,

      676,  676,  677,  677,   68,   68,  677,  677,  679,  679,
      672,  672,  672,  672,  681,  681,  672,  100,  100,  682,
      682,  682,  682,  688,  687,  672,  687,  689,  683,  683,
      690,  683,  683,  110,  110,  683,  683,  119,  119,  684,
      684,  684,  128,  128,  685,  685,  685,  137,  137,  686,
      686,  686,  686,  686,  673,  673,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  676,
      676,  672,   68,   68,  677,  677,  679,  679,  672,  672,
      672,  672,  672,  672,  681,  681,  672,  100,  100,  682,
      682,  682,  682,  682,  691,  688,  672,  688,  689,  672,

      689,  690,  672,  690,  110,  110,  683,  683,  119,  119,
      684,  684,  684,  128,  128,  685,  685,  685,  137,  137,
      686,  686,  686,  686,  686,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  677,  677,
      672,  672,  672,  672,  672,  682,  682,  682,  682,  691,
      672,  688,  689,  690,  683,  683,  684,  684,  684,  684,
      685,  685,  685,  685,  686,  686,  692,  686,  686,  672,
      672,  672,  693,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  694,  677,  672,  672,  672,  672,
      672,  695,  682,  682,  682,  696,  683,  697,  684,  684,

      684,  698,  699,  685,  685,  685,  700,  701,  686,  692,
      672,  686,  686,  672,  672,  693,  672,  702,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  694,  694,  703,
      672,  672,  672,  704,  672,  695,  672,  705,  682,  706,
      682,  696,  696,  707,  697,  672,  684,  708,  698,  672,
      699,  672,  685,  709,  700,  672,  701,  672,  710,  686,
      686,  672,  672,  672,  702,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  694,  694,  703,  703,  672,  672,
      704,  672,  672,  705,  672,  706,  672,  682,  711,  712,
      707,  707,  713,  708,  672,  714,  709,  672,  710,  672,

      686,  686,  672,  672,  672,  672,  672,  672,  672,  715,
      672,  672,  703,  703,  672,  711,  672,  712,  672,  712,
      716,  713,  672,  714,  672,  717,  686,  672,  672,  672,
      672,  672,  672,  715,  672,  672,  672,  672,  712,  716,
      672,  716,  717,  672,  686,  672,  672,  672,  718,  672,
      716,  719,  672,  672,  718,  672,  672,  719,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,    0,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,

      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672
    } ;

static yyconst flex_int16_t yy_nxt[2435] =
    {   0,
       24,   25,   26,   25,   24,   24,   27,   24,   24,   24,
       24,   24,   24,   24,   24,   24,   24,   24,   24,   24,
       24,   24,   24,   24,   24,   28,   28,   28,   28,   29,
       28,   28,   28,   28,   28,   28,   28,   30,   28,   28,
       28,   28,   28,   24,   31,   24,   24,   28,   28,   28,
       29,   28,   28,   28,   28,   28,   28,   28,   28,   28,
       28,   28,   32,   24,   24,   24,   24,   33,   34,   33,
       35,   36,   27,   37,   38,   39,   40,   41,   42,   43,
       44,   45,   46,   47,   48,   49,   50,   51,   52,   53,
       54,   55,   55,   55,   55,   56,   55,   55,   55,   55,

       55,   55,   55,   57,   55,   55,   55,   55,   55,   58,
       31,   59,   60,   55,   55,   55,   56,   55,   55,   55,
       55,   55,   55,   55,   55,   55,   55,   55,   61,   62,
       63,   64,   65,   66,   26,   66,   65,   65,   67,   65,
       65,   65,   65,   65,   65,   65,   65,   65,   65,   65,
       65,   65,   65,   65,   65,   65,   65,   68,   68,   68,
       68,   69,   68,   68,   68,   68,   68,   68,   68,   70,
       68,   68,   68,   68,   68,   65,   71,   65,   65,   68,
       68,   68,   69,   68,   68,   68,   68,   68,   68,   68,
       68,   68,   68,   68,   72,   65,   65,   65,   73,   74,

       75,   76,   73,   73,   77,   73,   73,   73,   73,   73,
       73,   73,   73,   73,   73,   73,   78,   73,   73,   73,
       73,   73,   73,   79,   79,   79,   79,   80,   79,   79,
       79,   79,   79,   79,   79,   81,   79,   79,   79,   79,
       79,   73,   82,   73,   73,   79,   79,   79,   80,   79,
       79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
       83,   73,   73,   73,   84,   84,   84,   84,  146,  147,
      162,  148,  166,  162,  168,  172,  174,  170,  176,  184,
      177,  175,  167,  169,  171,  186,  173,  201,  146,  194,
      205,  178,  206,  147,  224,  148,  186,  671,  243,  184,

      253,  264,  275,  144,  286,  295,  186,  173,  217,  194,
      162,  289,  178,  162,  224,  290,  670,  186,  243,  669,
      253,  264,  275,  286,  287,   61,   61,   85,   86,   87,
       88,   85,   85,   89,   85,   85,   85,   85,   85,   85,
       85,   85,   85,   85,   85,   90,   90,   85,   85,   85,
       85,   85,   91,   91,   91,   91,   92,   91,   91,   91,
       91,   91,   91,   91,   93,   91,   91,   91,   91,   91,
       85,   94,   85,   85,   91,   91,   91,   92,   91,   91,
       91,   91,   91,   91,   91,   91,   91,   91,   91,   95,
       85,   85,   85,   96,   97,   98,   97,   96,   96,   99,

       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
       96,   96,   96,   96,   96,   96,   96,   96,  100,  100,
      100,  100,  101,  100,  100,  100,  100,  100,  100,  100,
      102,  100,  100,  100,  100,  100,   96,  103,   96,   96,
      100,  100,  100,  101,  100,  100,  100,  100,  100,  100,
      100,  100,  100,  100,  100,  104,   96,   96,   96,  105,
      106,   26,  106,  105,  105,  107,  105,  105,  105,  105,
      105,  105,  105,  105,  105,  108,  105,  109,  105,  105,
      105,  105,  105,  105,  110,  110,  110,  110,  111,  110,
      110,  110,  110,  110,  110,  110,  112,  110,  110,  110,

      110,  110,  105,  113,  105,  105,  110,  110,  110,  111,
      110,  110,  110,  110,  110,  110,  110,  110,  110,  110,
      110,  114,  105,  105,  105,  115,  116,  117,  116,  115,
      115,  118,  115,  115,  115,  115,  115,  115,  115,  115,
      115,  115,  115,  115,  115,  115,  115,  115,  115,  115,
      119,  119,  119,  119,  120,  119,  119,  119,  119,  119,
      119,  119,  121,  119,  119,  119,  119,  119,  115,  122,
      115,  115,  119,  119,  119,  120,  119,  119,  119,  119,
      119,  119,  119,  119,  119,  119,  119,  123,  115,  115,
      115,  124,  125,  126,  125,  124,  124,  127,  124,  124,

      124,  124,  124,  124,  124,  124,  124,  124,  124,  124,
      124,  124,  124,  124,  124,  124,  128,  128,  128,  128,
      129,  128,  128,  128,  128,  128,  128,  128,  130,  128,
      128,  128,  128,  128,  124,  131,  124,  124,  128,  128,
      128,  129,  128,  128,  128,  128,  128,  128,  128,  128,
      128,  128,  128,  132,  124,  124,  124,  133,  134,  135,
      134,  133,  133,  136,  133,  133,  133,  133,  133,  133,
      133,  133,  133,  133,  133,  133,  133,  133,  133,  133,
      133,  133,  137,  137,  137,  137,  138,  137,  137,  137,
      137,  137,  137,  137,  139,  137,  137,  137,  137,  137,

      133,  140,  133,  133,  137,  137,  137,  138,  137,  137,
      137,  137,  137,  137,  137,  137,  137,  137,  137,  141,
      133,  133,  133,  142,  189,  142,  189,  158,  190,  158,
      190,  198,  201,  198,  198,  672,  200,  201,  189,  211,
      213,  211,  672,  282,  197,  213,  283,  186,  144,  211,
      270,  211,  207,  144,  207,  297,  201,  297,  231,  270,
      298,  299,  231,  299,  282,  197,  300,  283,  186,  313,
      287,  203,  144,  429,  204,  195,  246,  196,  438,  215,
      186,  563,  216,  208,  143,  149,  564,  150,  159,  191,
      151,  152,  199,  153,  204,  199,  672,  246,  353,  154,

      159,  209,  216,  672,  210,  627,  149,  155,  156,  668,
      159,  157,  152,  188,  188,  324,  188,  188,  188,  188,
      188,  188,  188,  188,  189,  188,  188,  188,  188,  188,
      188,  192,  192,  188,  188,  188,  188,  188,  192,  192,
      192,  192,  192,  192,  192,  192,  192,  192,  192,  192,
      192,  192,  192,  192,  192,  192,  188,  188,  188,  188,
      192,  192,  192,  192,  192,  192,  192,  192,  192,  192,
      192,  192,  192,  192,  192,  188,  188,  188,  188,  211,
      219,  212,  220,  219,  220,  234,  237,  270,  231,  189,
      248,  238,  235,  239,  288,  285,  362,  172,  172,  301,

      667,  666,  363,  236,  240,  302,  305,  227,  173,  173,
      228,  289,  355,  380,  278,  290,  306,  256,  665,  381,
      301,  257,  286,  287,  236,  240,  302,  305,  227,  173,
      173,  229,  355,  279,  280,  281,  375,  306,  256,  244,
      159,  245,  257,  221,  218,  218,  219,  218,  218,  218,
      218,  218,  218,  218,  218,  218,  218,  218,  218,  218,
      218,  218,  222,  222,  218,  218,  218,  218,  218,  222,
      222,  222,  222,  222,  222,  222,  222,  222,  222,  222,
      222,  222,  222,  222,  222,  222,  222,  218,  218,  218,
      218,  222,  222,  222,  222,  222,  222,  222,  222,  222,

      222,  222,  222,  222,  222,  222,  218,  218,  218,  218,
      219,  259,  232,  189,  232,  249,  248,  249,  149,  176,
      150,  177,  231,  151,  152,  189,  153,  318,  319,  334,
      335,  197,  178,  231,  338,  329,  339,  329,  267,  149,
      330,  156,  268,  343,  157,  152,  344,  664,  318,  319,
      334,  335,  197,  178,  231,  338,  332,  339,  332,  267,
      660,  333,  372,  268,  343,  661,  659,  344,  307,  308,
      225,  189,  226,  233,  230,  230,  250,  230,  230,  230,
      230,  230,  230,  230,  230,  231,  230,  230,  230,  230,
      230,  230,  241,  241,  230,  230,  230,  230,  230,  241,

      241,  241,  241,  241,  241,  241,  241,  241,  241,  241,
      241,  241,  241,  241,  241,  241,  241,  230,  230,  230,
      230,  241,  241,  241,  241,  241,  241,  241,  241,  241,
      241,  241,  241,  241,  241,  241,  230,  230,  230,  230,
      247,  247,  248,  247,  247,  247,  247,  247,  247,  247,
      247,  247,  247,  247,  247,  247,  247,  247,  251,  251,
      247,  247,  247,  247,  247,  251,  251,  251,  251,  251,
      251,  251,  251,  251,  251,  251,  251,  251,  251,  251,
      251,  251,  251,  247,  247,  247,  247,  251,  251,  251,
      251,  251,  251,  251,  251,  251,  251,  251,  251,  251,

      251,  251,  247,  247,  247,  247,  248,  201,  260,  259,
      260,  207,  201,  207,  231,  207,  219,  207,  219,  234,
      234,  663,  348,  144,  349,  656,  235,  235,  144,  356,
      370,  371,  246,  231,  373,  374,  309,  236,  236,  186,
      330,  310,  208,  348,  662,  349,  659,  397,  657,  356,
      370,  371,  326,  246,  373,  374,  398,  309,  236,  236,
      209,  327,  310,  210,  311,  322,  254,  323,  255,  261,
      258,  258,  259,  258,  258,  258,  258,  258,  258,  258,
      258,  258,  258,  258,  258,  258,  258,  258,  262,  262,
      258,  258,  258,  258,  258,  262,  262,  262,  262,  262,

      262,  262,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  258,  258,  258,  258,  262,  262,  262,
      262,  262,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  258,  258,  258,  258,  259,  213,  271,  270,
      271,  213,  219,  237,  231,  231,  270,  270,  238,  400,
      239,  388,  234,  403,  389,  405,  231,  189,  401,  330,
      237,  240,  404,  333,  406,  409,  315,  333,  656,  227,
      316,  388,  228,  278,  389,  405,  654,  383,  653,  383,
      644,  650,  240,  372,  406,  409,  384,  315,  336,  337,
      227,  316,  352,  229,  278,  376,  265,  331,  266,  272,

      269,  269,  270,  269,  269,  269,  269,  269,  269,  269,
      269,  269,  269,  269,  269,  269,  269,  269,  273,  273,
      269,  269,  269,  269,  269,  273,  273,  273,  273,  273,
      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
      273,  273,  273,  269,  269,  269,  269,  273,  273,  273,
      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
      273,  273,  269,  269,  269,  269,  270,  219,  142,  158,
      142,  158,  303,  190,  303,  190,  198,  198,  198,  200,
      672,  672,  189,  189,  211,  211,  211,  212,  220,  219,
      220,  232,  189,  232,  326,  248,  249,  248,  249,  248,

      303,  231,  303,  327,  260,  259,  260,  410,  219,  259,
      189,  649,  248,  259,  219,  271,  270,  271,  635,  320,
      321,  270,  231,  259,  648,  270,  276,  410,  277,  143,
      159,  383,  486,  383,  191,  304,  213,  199,  199,  256,
      384,  672,  672,  257,  213,  159,  159,  340,  341,  221,
      267,  231,  233,  342,  268,  391,  328,  250,  219,  248,
      256,  345,  346,  304,  257,  261,  201,  347,  201,  407,
      390,  267,  385,  350,  351,  268,  272,  350,  354,  380,
      386,  326,  144,  248,  144,  381,  394,  219,  394,  408,
      327,  248,  385,  414,  415,  395,  259,  259,  419,  259,

      386,  420,  377,  270,  378,  392,  270,  270,  270,  270,
      189,  393,  201,  414,  415,  411,  189,  201,  419,  219,
      219,  420,  377,  219,  378,  219,  397,  397,  144,  231,
      412,  248,  400,  144,  392,  398,  398,  394,  219,  394,
      393,  401,  400,  328,  417,  413,  395,  248,  231,  439,
      248,  401,  416,  418,  422,  403,  425,  424,  440,  421,
      403,  259,  423,  259,  404,  259,  270,  446,  455,  404,
      449,  447,  471,  448,  270,  270,  270,  270,  458,  457,
      219,  189,  479,  219,  479,  490,  219,  231,  219,  452,
      456,  480,  397,  400,  462,  248,  473,  403,  459,  458,

      248,  398,  401,  231,  453,  460,  404,  248,  259,  461,
      259,  259,  270,  270,  463,  462,  270,  466,  270,  468,
      464,  219,  454,  465,  467,  189,  472,  248,  466,  501,
      248,  501,  493,  469,  485,  494,  495,  219,  502,  520,
      496,  520,  492,  497,  506,  259,  506,  231,  521,  479,
      517,  479,  517,  507,  499,  248,  500,  498,  480,  529,
      505,  543,  509,  531,  504,  531,  259,  259,  270,  270,
      503,  270,  532,  517,  508,  513,  512,  647,  530,  539,
      219,  539,  529,  538,  248,  646,  541,  270,  540,  548,
      501,  248,  501,  506,  259,  506,  520,  259,  520,  502,

      544,  568,  507,  568,  566,  521,  575,  517,  575,  547,
      569,  270,  644,  578,  625,  531,  529,  531,  270,  623,
      553,  560,  561,  579,  532,  579,  539,  219,  539,  554,
      559,  517,  580,  517,  566,  540,  588,  219,  588,  593,
      543,  612,  543,  592,  601,  589,  568,  607,  568,  607,
      529,  566,  596,  270,  617,  569,  608,  575,  517,  575,
      578,  613,  566,  613,  579,  270,  579,  529,  602,  576,
      619,  578,  566,  580,  588,  219,  588,  566,  638,  620,
      626,  592,  628,  589,  628,  607,  592,  607,  613,  566,
      613,  629,  637,  619,  608,  590,  619,  641,  578,  619,

      372,  578,  620,  645,  641,  620,  642,  628,  620,  628,
      641,  636,  641,  642,  635,  633,  629,  632,  631,  642,
      576,  642,  630,  600,  614,  598,  625,  652,  595,  623,
      617,  587,  585,  615,  582,  611,  610,  609,  606,  621,
      566,  605,  604,  603,  600,  558,  556,  598,  552,  550,
      595,  614,  546,  587,  585,  537,  583,  582,  639,  574,
      573,  572,  571,  570,  567,  566,  517,  562,  511,  558,
      556,  552,  651,  144,  144,  161,  161,  161,  161,  161,
      161,  164,  164,  164,  164,  164,  164,  182,  182,  188,
      188,  550,  188,  188,  188,  201,  546,  201,  201,  202,

      202,  202,  213,  537,  213,  213,  213,  214,  214,  214,
      218,  218,  218,  218,  218,  218,  230,  230,  535,  230,
      230,  230,  247,  247,  247,  247,  247,  247,  258,  258,
      258,  258,  258,  258,  269,  269,  269,  269,  269,  269,
      325,  325,  325,  325,  325,  325,  396,  396,  396,  396,
      396,  396,  399,  399,  399,  399,  399,  399,  402,  402,
      402,  402,  402,  402,  450,  450,  450,  450,  450,  450,
      510,  510,  510,  510,  510,  510,  516,  516,  516,  516,
      516,  516,  528,  528,  528,  528,  528,  528,  536,  536,
      536,  536,  536,  536,  542,  542,  542,  542,  542,  542,

      545,  545,  545,  545,  545,  545,  549,  549,  549,  549,
      549,  549,  551,  551,  551,  551,  551,  551,  555,  555,
      555,  555,  555,  555,  557,  557,  557,  557,  557,  557,
      565,  565,  565,  565,  565,  565,  577,  577,  577,  577,
      577,  577,  581,  581,  581,  581,  581,  581,  584,  584,
      584,  584,  584,  584,  586,  586,  586,  586,  586,  586,
      591,  591,  591,  591,  591,  591,  594,  594,  594,  594,
      594,  594,  597,  597,  597,  597,  597,  597,  599,  599,
      599,  599,  599,  599,  616,  616,  616,  616,  616,  616,
      618,  618,  618,  618,  618,  618,  622,  622,  622,  622,

      622,  622,  624,  624,  624,  624,  624,  624,  634,  634,
      634,  634,  634,  634,  640,  640,  640,  640,  640,  640,
      643,  643,  643,  643,  643,  643,  655,  655,  655,  655,
      655,  655,  658,  658,  658,  658,  658,  658,  534,  533,
      490,  527,  526,  525,  524,  523,  522,  519,  518,  517,
      515,  514,  511,  451,  491,  489,  488,  487,  484,  483,
      482,  481,  478,  477,  476,  475,  474,  473,  470,  451,
      445,  213,  213,  444,  443,  442,  441,  372,  437,  436,
      435,  434,  433,  432,  431,  430,  429,  428,  427,  426,
      387,  382,  379,  300,  300,  298,  298,  369,  368,  367,

      366,  365,  364,  361,  360,  359,  358,  357,  270,  270,
      270,  259,  259,  259,  248,  248,  248,  231,  231,  231,
      219,  219,  219,  317,  213,  314,  312,  189,  189,  189,
      296,  165,  294,  293,  292,  291,  284,  274,  270,  270,
      263,  259,  259,  252,  248,  248,  242,  231,  231,  223,
      219,  219,  213,  193,  189,  189,  187,  185,  183,  181,
      180,  179,  165,  163,  160,  145,  672,   23,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,

      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672
    } ;

static yyconst flex_int16_t yy_chk[2435] =
    {   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,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,

        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    5,    5,    5,    7,    7,

        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    9,   10,    9,   10,   30,   31,
       36,   31,   42,   36,   43,   46,   47,   45,   48,   57,
       48,   47,   42,   43,   45,   61,   46,   79,   30,   70,
       82,   48,   82,   94,  102,   94,   95,  668,  112,   57,

      121,  130,  139,   79,  156,  156,   61,   46,   95,   70,
      161,  157,   48,  161,  102,  157,  667,   95,  112,  665,
      121,  130,  139,  186,  186,    9,   10,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   13,   13,   13,   13,   13,   13,   13,

       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   15,
       15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
       15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
       15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
       15,   15,   15,   15,   15,   15,   15,   15,   15,   15,

       15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
       15,   15,   15,   15,   15,   15,   15,   15,   15,   15,
       15,   15,   15,   15,   15,   17,   17,   17,   17,   17,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,
       17,   19,   19,   19,   19,   19,   19,   19,   19,   19,

       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
       19,   19,   19,   19,   19,   19,   19,   19,   19,   19,
       19,   19,   19,   19,   19,   19,   19,   21,   21,   21,
       21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
       21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
       21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
       21,   21,   21,   21,   21,   21,   21,   21,   21,   21,

       21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
       21,   21,   21,   21,   21,   21,   21,   21,   21,   21,
       21,   21,   21,   25,   71,   25,   72,   33,   66,   33,
       66,   74,   80,   74,   76,   78,   76,   81,   66,   84,
       92,   84,   90,  145,   72,   93,  146,  159,   80,   86,
      280,   86,   83,   81,   83,  173,  202,  173,  114,  602,
      173,  178,  231,  178,  145,   72,  178,  146,  159,  209,
      209,   80,  202,  369,   81,   71,  114,   71,  369,   92,
       83,  515,   93,   83,   25,   32,  515,   32,   33,   66,
       32,   32,   74,   32,   81,   76,   78,  114,  280,   32,

       84,   83,   93,   90,   83,  602,   32,   32,   32,  664,
       86,   32,   32,   68,   68,  231,   68,   68,   68,   68,
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
       68,   68,   68,   68,   68,   68,   68,   68,   68,   68,
       68,   68,   68,   68,   68,   68,   68,   68,   68,   88,
      104,   88,   97,   97,   97,  108,  109,  141,  113,  307,
      123,  109,  108,  109,  151,  150,  289,  172,  176,  183,

      663,  662,  289,  108,  109,  184,  193,  104,  172,  176,
      104,  151,  282,  312,  141,  151,  194,  123,  661,  312,
      183,  123,  150,  150,  108,  109,  184,  193,  104,  172,
      176,  104,  282,  141,  141,  141,  307,  194,  123,  113,
       88,  113,  123,   97,  100,  100,  100,  100,  100,  100,
      100,  100,  100,  100,  100,  100,  100,  100,  100,  100,
      100,  100,  100,  100,  100,  100,  100,  100,  100,  100,
      100,  100,  100,  100,  100,  100,  100,  100,  100,  100,
      100,  100,  100,  100,  100,  100,  100,  100,  100,  100,
      100,  100,  100,  100,  100,  100,  100,  100,  100,  100,

      100,  100,  100,  100,  100,  100,  100,  100,  100,  100,
      103,  132,  106,  191,  106,  116,  116,  116,  143,  177,
      143,  177,  106,  143,  143,  197,  143,  223,  224,  242,
      243,  191,  177,  236,  252,  236,  253,  236,  132,  143,
      236,  143,  132,  263,  143,  143,  264,  660,  223,  224,
      242,  243,  191,  177,  240,  252,  240,  253,  240,  132,
      653,  240,  304,  132,  263,  653,  658,  264,  197,  197,
      103,  304,  103,  106,  110,  110,  116,  110,  110,  110,
      110,  110,  110,  110,  110,  110,  110,  110,  110,  110,
      110,  110,  110,  110,  110,  110,  110,  110,  110,  110,

      110,  110,  110,  110,  110,  110,  110,  110,  110,  110,
      110,  110,  110,  110,  110,  110,  110,  110,  110,  110,
      110,  110,  110,  110,  110,  110,  110,  110,  110,  110,
      110,  110,  110,  110,  110,  110,  110,  110,  110,  110,
      119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
      119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
      119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
      119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
      119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
      119,  119,  119,  119,  119,  119,  119,  119,  119,  119,

      119,  119,  119,  119,  119,  119,  122,  203,  125,  125,
      125,  199,  204,  199,  233,  207,  228,  207,  229,  235,
      238,  657,  274,  203,  275,  655,  235,  238,  204,  283,
      301,  302,  233,  329,  305,  306,  203,  235,  238,  199,
      329,  204,  199,  274,  654,  275,  652,  324,  650,  283,
      301,  302,  325,  233,  305,  306,  324,  203,  235,  238,
      199,  325,  204,  199,  207,  228,  122,  229,  122,  125,
      128,  128,  128,  128,  128,  128,  128,  128,  128,  128,
      128,  128,  128,  128,  128,  128,  128,  128,  128,  128,
      128,  128,  128,  128,  128,  128,  128,  128,  128,  128,

      128,  128,  128,  128,  128,  128,  128,  128,  128,  128,
      128,  128,  128,  128,  128,  128,  128,  128,  128,  128,
      128,  128,  128,  128,  128,  128,  128,  128,  128,  128,
      128,  128,  128,  128,  128,  128,  131,  215,  134,  134,
      134,  216,  221,  239,  237,  246,  272,  279,  239,  328,
      239,  318,  330,  331,  319,  334,  332,  308,  328,  330,
      333,  239,  331,  332,  335,  338,  215,  333,  649,  221,
      216,  318,  221,  272,  319,  334,  648,  383,  647,  383,
      643,  638,  239,  637,  335,  338,  383,  215,  246,  246,
      221,  216,  279,  221,  272,  308,  131,  237,  131,  134,

      137,  137,  137,  137,  137,  137,  137,  137,  137,  137,
      137,  137,  137,  137,  137,  137,  137,  137,  137,  137,
      137,  137,  137,  137,  137,  137,  137,  137,  137,  137,
      137,  137,  137,  137,  137,  137,  137,  137,  137,  137,
      137,  137,  137,  137,  137,  137,  137,  137,  137,  137,
      137,  137,  137,  137,  137,  137,  137,  137,  137,  137,
      137,  137,  137,  137,  137,  137,  140,  227,  142,  158,
      142,  158,  189,  190,  189,  190,  198,  200,  198,  200,
      201,  213,  189,  190,  211,  212,  211,  212,  220,  220,
      220,  232,  440,  232,  234,  256,  249,  249,  249,  257,

      303,  232,  303,  234,  260,  260,  260,  339,  321,  267,
      303,  636,  250,  268,  320,  271,  271,  271,  634,  227,
      227,  278,  336,  261,  633,  281,  140,  339,  140,  142,
      158,  314,  440,  314,  190,  189,  315,  198,  200,  250,
      314,  201,  213,  250,  316,  211,  212,  256,  256,  220,
      261,  337,  232,  257,  261,  321,  234,  249,  322,  340,
      250,  267,  267,  303,  250,  260,  309,  268,  310,  336,
      320,  261,  315,  278,  278,  261,  271,  281,  281,  314,
      316,  327,  309,  341,  310,  314,  323,  323,  323,  337,
      327,  342,  315,  343,  344,  323,  345,  346,  348,  347,

      316,  349,  309,  350,  310,  322,  352,  351,  353,  354,
      375,  322,  377,  343,  344,  340,  376,  378,  348,  390,
      391,  349,  309,  393,  310,  392,  396,  398,  377,  407,
      341,  411,  399,  378,  323,  396,  398,  394,  394,  394,
      323,  399,  401,  327,  346,  342,  394,  412,  408,  375,
      413,  401,  345,  347,  351,  402,  354,  353,  376,  350,
      404,  416,  352,  417,  402,  418,  422,  390,  407,  404,
      393,  391,  427,  392,  424,  421,  423,  425,  412,  411,
      446,  439,  434,  447,  434,  444,  448,  455,  449,  398,
      408,  434,  452,  453,  417,  457,  444,  454,  412,  412,

      458,  452,  453,  456,  401,  413,  454,  459,  461,  416,
      462,  463,  465,  466,  417,  417,  469,  422,  468,  424,
      418,  493,  404,  421,  423,  486,  427,  500,  425,  460,
      460,  460,  447,  425,  439,  448,  449,  495,  460,  476,
      455,  476,  446,  456,  464,  464,  464,  497,  476,  479,
      485,  479,  496,  464,  458,  499,  459,  457,  479,  485,
      463,  496,  466,  488,  462,  488,  504,  505,  509,  512,
      461,  513,  488,  528,  465,  469,  468,  632,  486,  494,
      494,  494,  528,  493,  547,  630,  495,  560,  494,  500,
      501,  501,  501,  506,  506,  506,  520,  553,  520,  501,

      497,  522,  506,  522,  530,  520,  529,  529,  529,  499,
      522,  561,  626,  530,  624,  531,  529,  531,  601,  622,
      504,  512,  513,  533,  531,  533,  539,  539,  539,  505,
      509,  542,  533,  543,  544,  539,  541,  541,  541,  547,
      542,  576,  543,  544,  560,  541,  568,  570,  568,  570,
      576,  577,  553,  627,  616,  568,  570,  575,  575,  575,
      577,  578,  578,  578,  579,  645,  579,  575,  561,  529,
      590,  578,  591,  579,  588,  588,  588,  592,  615,  590,
      601,  591,  603,  588,  603,  607,  592,  607,  613,  613,
      613,  603,  614,  618,  607,  543,  620,  621,  613,  639,

      612,  614,  618,  627,  640,  620,  621,  628,  639,  628,
      642,  611,  651,  640,  610,  609,  628,  606,  605,  642,
      575,  651,  604,  599,  578,  597,  596,  645,  594,  593,
      589,  586,  584,  583,  581,  574,  573,  572,  567,  592,
      565,  564,  563,  562,  559,  557,  555,  554,  551,  549,
      548,  613,  545,  540,  538,  536,  535,  534,  620,  527,
      526,  525,  524,  523,  519,  518,  516,  514,  510,  508,
      507,  503,  642,  673,  673,  674,  674,  674,  674,  674,
      674,  675,  675,  675,  675,  675,  675,  676,  676,  677,
      677,  502,  677,  677,  677,  678,  498,  678,  678,  679,

      679,  679,  680,  492,  680,  680,  680,  681,  681,  681,
      682,  682,  682,  682,  682,  682,  683,  683,  491,  683,
      683,  683,  684,  684,  684,  684,  684,  684,  685,  685,
      685,  685,  685,  685,  686,  686,  686,  686,  686,  686,
      687,  687,  687,  687,  687,  687,  688,  688,  688,  688,
      688,  688,  689,  689,  689,  689,  689,  689,  690,  690,
      690,  690,  690,  690,  691,  691,  691,  691,  691,  691,
      692,  692,  692,  692,  692,  692,  693,  693,  693,  693,
      693,  693,  694,  694,  694,  694,  694,  694,  695,  695,
      695,  695,  695,  695,  696,  696,  696,  696,  696,  696,

      697,  697,  697,  697,  697,  697,  698,  698,  698,  698,
      698,  698,  699,  699,  699,  699,  699,  699,  700,  700,
      700,  700,  700,  700,  701,  701,  701,  701,  701,  701,
      702,  702,  702,  702,  702,  702,  703,  703,  703,  703,
      703,  703,  704,  704,  704,  704,  704,  704,  705,  705,
      705,  705,  705,  705,  706,  706,  706,  706,  706,  706,
      707,  707,  707,  707,  707,  707,  708,  708,  708,  708,
      708,  708,  709,  709,  709,  709,  709,  709,  710,  710,
      710,  710,  710,  710,  711,  711,  711,  711,  711,  711,
      712,  712,  712,  712,  712,  712,  713,  713,  713,  713,

      713,  713,  714,  714,  714,  714,  714,  714,  715,  715,
      715,  715,  715,  715,  716,  716,  716,  716,  716,  716,
      717,  717,  717,  717,  717,  717,  718,  718,  718,  718,
      718,  718,  719,  719,  719,  719,  719,  719,  490,  489,
      487,  484,  483,  482,  481,  478,  477,  475,  474,  473,
      471,  470,  467,  450,  445,  443,  442,  441,  438,  437,
      436,  435,  433,  432,  431,  430,  429,  428,  426,  395,
      387,  386,  385,  382,  381,  380,  379,  372,  368,  367,
      366,  365,  364,  363,  362,  361,  360,  359,  358,  357,
      317,  313,  311,  300,  299,  298,  297,  295,  294,  293,

      292,  291,  290,  288,  287,  286,  285,  284,  277,  276,
      269,  266,  265,  258,  255,  254,  247,  245,  244,  230,
      226,  225,  218,  217,  214,  210,  208,  196,  195,  188,
      166,  164,  155,  154,  153,  152,  149,  138,  136,  133,
      129,  127,  124,  120,  118,  115,  111,  107,  105,  101,
       99,   96,   91,   69,   67,   65,   62,   60,   56,   53,
       52,   51,   39,   38,   35,   29,   23,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,

      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,
      672,  672,  672,  672
    } ;

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 "aprepro.l"
/* -*- Mode: c++ -*- */
/* 
 * Copyright 2006 Sandia Corporation. Under the terms of Contract
 * DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government
 * retains certain rights in this software.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *
 *     * Redistributions in binary form must reproduce the above
 *       copyright notice, this list of conditions and the following
 *       disclaimer in the documentation and/or other materials provided
 *       with the distribution.
 *
 *     * Neither the name of Sandia Corporation nor the names of its
 *       contributors may be used to endorse or promote products derived
 *       from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
#line 38 "aprepro.l"

#include <stdio.h>
#include <string.h>
#include <fcntl.h> 
#include "ap_getline_int.h"

#define show(x)   printf("<%s>", x);
#undef yywrap
int yywrap(void);
#define MAX_INCLUDE_DEPTH 128
YY_BUFFER_STATE file_pointer[MAX_INCLUDE_DEPTH];
file_rec ap_file_list[MAX_INCLUDE_DEPTH];
extern int nfile;

int in_ifdef_getvar = False;
int file_must_exist = 0; /* Global used by include/conditional include */
#define LINENUM_INC	ap_file_list[nfile].lineno++


static int get_input(char *buf, int size);
#define YY_INPUT(buf,result,max_size) \
  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) {	\
    result = get_input(buf, max_size); \
  } 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);							\
      }									\
  }
 
extern aprepro_options ap_options;

/* Global variables used by the looping mechanism */
int loop_lvl = 0;
FILE *tmp_file = NULL;
char  *temp_f, *tmpstr;

/* Routines used by material database routines */
extern char *get_temp_filename(void);
extern FILE *open_file(char *file, char *mode);
extern FILE *check_open_file(char *file, char *mode);
extern int   check_valid_var(char *var);
void bad_variable_syntax(char *string);
 
#define MAX_IF_NESTING 64

int if_state[MAX_IF_NESTING] = {0}; /* INITIAL */
int if_case_run[MAX_IF_NESTING] = {False}; /* Has any if or elseif condition executed */
int if_lvl = 0;
int if_skip_level = 0;
int suppress_nl = 0; /* Used by some constructs to temporarily suppress a newline */

int switch_active = 0; /* Are we in a switch */
int switch_case_run = 0; /* has there been a case which matched condition run? */
int switch_skip_to_endcase = 0;
double switch_condition = 0.0; /* Value specified in "switch(condition)" */


#line 1320 "lex.yy.c"

#define INITIAL 0
#define PARSING 1
#define GET_FILENAME 2
#define IF_SKIP 3
#define GET_VAR 4
#define VERBATIM 5
#define IF_WHILE_SKIP 6
#define GET_LOOP_VAR 7
#define LOOP 8
#define LOOP_SKIP 9
#define END_CASE_SKIP 10

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

yy_size_t yyget_leng (void );

char *yyget_text (void );

int yyget_lineno (void );

void yyset_lineno (int line_number  );

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

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

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

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

#ifndef YY_NO_INPUT

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

#endif

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

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO 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 \
	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 117 "aprepro.l"

#line 1514 "lex.yy.c"

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

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

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

		if ( ! yyin )
			yyin = stdin;

		if ( ! yyout )
			yyout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {
			yyensure_buffer_stack ();
			YY_CURRENT_BUFFER_LVALUE =
				yy_create_buffer(yyin,YY_BUF_SIZE );
		}

		yy_load_buffer_state( );
		}

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

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

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

		yy_current_state = (yy_start);
yy_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 >= 673 )
					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] != 2368 );

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 119 "aprepro.l"
{ BEGIN(INITIAL);   }
	YY_BREAK
case 2:
#line 121 "aprepro.l"
case 3:
YY_RULE_SETUP
#line 121 "aprepro.l"
{ if (echo) ECHO; }
	YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
#line 122 "aprepro.l"
{ if (echo) ECHO; LINENUM_INC; }
	YY_BREAK


case 5:
YY_RULE_SETUP
#line 126 "aprepro.l"
{ BEGIN(VERBATIM);  }
	YY_BREAK
case 6:
#line 128 "aprepro.l"
case 7:
YY_RULE_SETUP
#line 128 "aprepro.l"
{ echo = True;	}
	YY_BREAK
case 8:
#line 130 "aprepro.l"
case 9:
YY_RULE_SETUP
#line 130 "aprepro.l"
{ echo = False;	}
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 132 "aprepro.l"
{ state_immutable = True;	}
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 133 "aprepro.l"
{ state_immutable = ap_options.immutable; }
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 135 "aprepro.l"
{ BEGIN(GET_LOOP_VAR); }
	YY_BREAK


case 13:
/* rule 13 can match eol */
#line 140 "aprepro.l"
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
#line 140 "aprepro.l"
{
    /* Loop control defined by integer */
    char *pt = strchr(yytext, ')');
    *pt = '\0';
    sscanf (yytext, "%lf", &yylval.val);
    ap_file_list[nfile+1].loop_count = (int)yylval.val;
    if (ap_file_list[nfile+1].loop_count <= 0)
      {
	BEGIN(LOOP_SKIP);
      }
    else /* Value defined and != 0. */
      {
	temp_f = get_temp_filename();
	if (tmp_file) fclose(tmp_file);
	tmp_file = open_file(temp_f, "w");
	loop_lvl++;
	BEGIN(LOOP);
      }
    LINENUM_INC;
  }
	YY_BREAK
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
#line 161 "aprepro.l"
{
    /* Loop control defined by variable */
    symrec *s;
    char *pt = strchr(yytext, ')');
    *pt = '\0';
    if (!check_valid_var(yytext)) {
      bad_variable_syntax(yytext);
      BEGIN(LOOP_SKIP);
    } else {
      s = getsym(yytext);
    
      if (s == 0 || (s->type != SVAR && s->type != IMMSVAR && s->value.var == 0.))
	{
	  BEGIN(LOOP_SKIP);
	}
      else /* Value defined and != 0. */
	{
	  ap_file_list[nfile+1].loop_count = s->value.var;
	  temp_f = get_temp_filename();
	  if (tmp_file) fclose(tmp_file);
	  tmp_file = open_file(temp_f, "w");
	  loop_lvl++;
	  BEGIN(LOOP);
	}
    }
    LINENUM_INC;
  }
	YY_BREAK
/* End of <GET_LOOP_VAR> start condition block */

case 16:
/* rule 16 can match eol */
YY_RULE_SETUP
#line 191 "aprepro.l"
{
    LINENUM_INC;
    if (--loop_lvl == 0)
      {
	BEGIN(INITIAL);
	if (tmp_file) { fclose(tmp_file); tmp_file = NULL; }
	file_pointer[nfile++] = YY_CURRENT_BUFFER;
	NEWSTR(temp_f, ap_file_list[nfile].name);
	SET_FILE_LIST(nfile, 0, True, -1);
	yyin = open_file(temp_f, "r");
	yy_switch_to_buffer (
			     yy_create_buffer(yyin,YY_BUF_SIZE));
      }
    else
      fprintf(tmp_file, "%s", yytext);
  }
	YY_BREAK
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
#line 208 "aprepro.l"
{ 
    loop_lvl++; /* Nested Loop */
    fprintf(tmp_file, "%s", yytext);
    LINENUM_INC;
  }
	YY_BREAK
case 18:
/* rule 18 can match eol */
YY_RULE_SETUP
#line 214 "aprepro.l"
{ 
    fprintf(tmp_file, "%s", yytext);
    LINENUM_INC;
  }
	YY_BREAK
/* End of <LOOP> start condition block */

/* IF in a loop that has 0 or negative iteration count, then
   * just need to skip until the end of that loop.  If 
   * there is a nested loop in the skipped loop body,
   * detect that so the correct "endloop" is recognized
   * to turn off the loop skipping
   */
case 19:
/* rule 19 can match eol */
YY_RULE_SETUP
#line 228 "aprepro.l"
{
    LINENUM_INC;
    if (--loop_lvl == 0)
      BEGIN(INITIAL);
  }
	YY_BREAK
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
#line 234 "aprepro.l"
{
    loop_lvl++; /* Nested Loop */
    LINENUM_INC;
  }
	YY_BREAK
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
#line 239 "aprepro.l"
{
    LINENUM_INC; 
  }
	YY_BREAK
/* End of <LOOP_SKIP> start condition block */
case 22:
/* rule 22 can match eol */
YY_RULE_SETUP
#line 245 "aprepro.l"
{
  yyless(0);
  BEGIN(INITIAL);
  switch_skip_to_endcase = 0;
}
	YY_BREAK
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
#line 251 "aprepro.l"
{
  LINENUM_INC;
  if (!switch_active) {
    yyerror("default statement found outside switch statement.");
  }

  if (!switch_case_run) {
    switch_case_run = 1;
    BEGIN(INITIAL);
    switch_skip_to_endcase = 0;
    if (ap_options.debugging) 
      fprintf (stderr, "DEBUG SWITCH: 'default' code executing at line %d\n",
	       ap_file_list[nfile].lineno);
  } 
  else {
    if (ap_options.debugging) 
      fprintf (stderr, "DEBUG SWITCH: 'default' not executing since a previous case already ran at line %d\n",
	       ap_file_list[nfile].lineno);
    
    /* Need to skip all code until end of case */
    BEGIN(END_CASE_SKIP);
  }
}
	YY_BREAK
case 24:
/* rule 24 can match eol */
YY_RULE_SETUP
#line 275 "aprepro.l"
{
  LINENUM_INC;
  BEGIN(INITIAL);
  switch_active = 0;
  switch_skip_to_endcase = 0;
}
	YY_BREAK
case 25:
/* rule 25 can match eol */
YY_RULE_SETUP
#line 282 "aprepro.l"
{ LINENUM_INC; }
	YY_BREAK
case 26:
/* rule 26 can match eol */
YY_RULE_SETUP
#line 284 "aprepro.l"
{
  LINENUM_INC;
  if (!switch_active) {
    yyerror("endswitch statement found without matching switch.");
  }
  switch_active = 0;
}
	YY_BREAK

/* This restores the old behavior of ifdef and ifndef
   * where they would eat up any leading whitespace on
   * a line.
   */
case 27:
YY_RULE_SETUP
#line 297 "aprepro.l"
{ 
    /* Used to avoid undefined variable warnings in old ifdef/ifndef construct */
    in_ifdef_getvar = True; 
    unput('(');
    unput('f');
    unput('e');
    unput('d');
    unput('f');
    unput('i');
    unput('_');
    unput('{');
  }
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 310 "aprepro.l"
{
    /* Used to avoid undefined variable warnings in old ifdef/ifndef construct */
    in_ifdef_getvar = True; 
    unput('(');
    unput('f');
    unput('e');
    unput('d');
    unput('n');
    unput('f');
    unput('i');
    unput('_');
    unput('{');
  }
	YY_BREAK


/* If an if was found while skipping, then eat
   * that entire if block until endif
   * found since there is no way that
   * any of the code in that if block could be executed.
   * Make sure to handle multiple levels of skipped ifs...
   *
   * NOTE: if_lvl was not incremented, so don't need to decrement when
   *       endif found.
   */
case 29:
/* rule 29 can match eol */
YY_RULE_SETUP
#line 335 "aprepro.l"
{ 
    LINENUM_INC;  
    if (--if_skip_level == 0)
      BEGIN(IF_SKIP);
  }
	YY_BREAK
case 30:
/* rule 30 can match eol */
YY_RULE_SETUP
#line 341 "aprepro.l"
{ 
    LINENUM_INC;  
    if_skip_level++;
  }
	YY_BREAK
case 31:
/* rule 31 can match eol */
YY_RULE_SETUP
#line 346 "aprepro.l"
{ 
    LINENUM_INC;  
    if_skip_level++;
  }
	YY_BREAK
case 32:
/* rule 32 can match eol */
YY_RULE_SETUP
#line 351 "aprepro.l"
{
    LINENUM_INC;  
    if_skip_level++;
  }
	YY_BREAK
case 33:
/* rule 33 can match eol */
YY_RULE_SETUP
#line 356 "aprepro.l"
{
    LINENUM_INC;
  }
	YY_BREAK


/* IF an if, ifdef, or ifndef found while skipping, then
   * skip the entire block up and including the endif.
   * The (IF_WHILE_SKIP) start condition handles this skipping.
   */
case 34:
YY_RULE_SETUP
#line 366 "aprepro.l"
{ 
    if (ap_options.debugging) 
      fprintf (stderr, "DEBUG IF: 'ifdef'  found while skipping at line %d\n",
	       ap_file_list[nfile].lineno);
    if_skip_level = 1;
    BEGIN(IF_WHILE_SKIP);
  }
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 374 "aprepro.l"
{ 
    if (ap_options.debugging) 
      fprintf (stderr, "DEBUG IF: 'ifdef'  found while skipping at line %d\n",
	       ap_file_list[nfile].lineno);
    if_skip_level = 1;
    BEGIN(IF_WHILE_SKIP);
  }
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 382 "aprepro.l"
{
    if (ap_options.debugging) 
      fprintf (stderr, "DEBUG IF: 'ifndef'  found while skipping at line %d\n",
	       ap_file_list[nfile].lineno);
    if_skip_level = 1;
    BEGIN(IF_WHILE_SKIP);
  }
	YY_BREAK

case 37:
/* rule 37 can match eol */
YY_RULE_SETUP
#line 391 "aprepro.l"
{ 
  LINENUM_INC; 
  if (ap_options.debugging) 
    fprintf (stderr, "DEBUG IF: 'else'   at level = %d at line %d\n",
	     if_lvl, ap_file_list[nfile].lineno);
  if (if_state[if_lvl] == IF_SKIP) {
    if (!if_case_run[if_lvl]) {
      BEGIN(INITIAL);
      if_state[if_lvl] = INITIAL;
      if_case_run[if_lvl] = True;
    } else {
      BEGIN(IF_SKIP);
      if_state[if_lvl] = IF_SKIP;
    }
  }
  else if (if_state[if_lvl] == INITIAL) {
    BEGIN(IF_SKIP);
    if_state[if_lvl] = IF_SKIP;
  }
  
  /* If neither is true, this is a nested 
     if that should be skipped */
}
	YY_BREAK
case 38:
/* rule 38 can match eol */
YY_RULE_SETUP
#line 415 "aprepro.l"
{ 
  /* If any previous 'block' of this if has executed, then
   * just skip this block; otherwise see if condition is
   * true and execute this block
   */
  if (ap_options.debugging) 
    fprintf (stderr, "DEBUG IF: 'elseif'   at level = %d at line %d\n",
	     if_lvl, ap_file_list[nfile].lineno);

  if (if_case_run[if_lvl]) { /* A previous else/elseif has run */
    LINENUM_INC; 
    /* Already in IF_SKIP, so don't need to change state */
  } else {
    /* Need to check the elseif condition; push back and parse */
    yyless(0);
    BEGIN(INITIAL);
    if_state[if_lvl] = INITIAL;
  }
}
	YY_BREAK
case 39:
/* rule 39 can match eol */
YY_RULE_SETUP
#line 435 "aprepro.l"
{ 
  if (if_state[if_lvl] == IF_SKIP || if_state[if_lvl] == INITIAL)
    BEGIN(INITIAL);
  /* If neither is true, this is a nested if that should be skipped */
  if (ap_options.debugging) 
    printf ("DEBUG IF: 'endif'  at level = %d at line %d\n",
	    if_lvl, ap_file_list[nfile].lineno);
  if (--if_lvl < 0) {
    if_lvl = 0;
    yyerror("Improperly Nested ifdef/ifndef statements");
  }
  LINENUM_INC;  
  /* Ignore endif if not skipping */
}
	YY_BREAK
case 40:
#line 451 "aprepro.l"
case 41:
#line 452 "aprepro.l"
case 42:
#line 453 "aprepro.l"
case 43:
YY_RULE_SETUP
#line 453 "aprepro.l"
{ ; }
	YY_BREAK
case 44:
/* rule 44 can match eol */
YY_RULE_SETUP
#line 454 "aprepro.l"
{ LINENUM_INC; }
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 456 "aprepro.l"
{ BEGIN(GET_FILENAME); 
                             file_must_exist = True; }
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 458 "aprepro.l"
{ BEGIN(GET_FILENAME);
                             file_must_exist = !True; }
	YY_BREAK
case 47:
/* rule 47 can match eol */
YY_RULE_SETUP
#line 460 "aprepro.l"
{
  BEGIN(INITIAL); 
  {
    symrec *s;
    int quoted = False;
    FILE *yytmp;
    char *pt = strchr(yytext, ')');
    *pt = '\0';
    /* Check to see if surrounded by double quote */ 
    if ((pt = strchr(yytext, '"')) != NULL) {
      yytext++;
      quoted = True;
    }
    if ((pt = strrchr(yytext, '"')) != NULL) {
      *pt = '\0';
      quoted = True;
    }
    
    if (quoted == False) {
      /* See if this is an aprepro variable referring to a name */
      s = getsym(yytext);
      if (s == 0 || (s->type != SVAR && s->type != IMMSVAR)) {
	pt = yytext;
      } else {
	pt = s->value.svar;
      }
    } else {
      pt = yytext;
    }
    
    if (file_must_exist)
      yytmp = open_file(pt, "r");
    else
      yytmp = check_open_file(pt, "r");
    if (yytmp != NULL) {
      yyin = yytmp;
      if (ap_options.info_msg == True) {
	fprintf(stderr,
		"Aprepro: INFO: Included File: '%s' (%s, line %d)\n", pt,
		ap_file_list[nfile].name,
		ap_file_list[nfile].lineno);
      }
      if (nfile+1 >= MAX_INCLUDE_DEPTH) {
	yyerror("Too Many Includes");
	exit(EXIT_FAILURE);
      }
      file_pointer[nfile++] = YY_CURRENT_BUFFER;
      NEWSTR(pt, ap_file_list[nfile].name);
      SET_FILE_LIST(nfile, 0, False, 0);
      yy_switch_to_buffer (
			   yy_create_buffer(yyin,YY_BUF_SIZE));
    } else {
      if (ap_options.warning_msg == True) {
	fprintf(stderr,
		"Aprepro: WARN: Can't open '%s'\n",
		yytext);
      }
    }
    LINENUM_INC;
  }
}
	YY_BREAK

case 48:
#line 524 "aprepro.l"
case 49:
YY_RULE_SETUP
#line 524 "aprepro.l"
{
    sscanf (yytext, "%lf", &yylval.val);
    return(NUM); 
  }
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 529 "aprepro.l"
; /* Empty Rule */
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 531 "aprepro.l"
{
    symrec *s;
    s = getsym(yytext);
    if (s == 0) {
      s = putsym (yytext, UNDVAR, 0);
    }
    yylval.tptr = s;
    return(s->type);
  }
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 541 "aprepro.l"
return('=');
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 542 "aprepro.l"
return(EQ_PLUS);
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 543 "aprepro.l"
return(EQ_MINUS);
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 544 "aprepro.l"
return(EQ_TIME);
	YY_BREAK
case 56:
YY_RULE_SETUP
#line 545 "aprepro.l"
return(EQ_DIV);
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 546 "aprepro.l"
return(EQ_POW);
	YY_BREAK
case 58:
YY_RULE_SETUP
#line 547 "aprepro.l"
return(EQ_POW);
	YY_BREAK
case 59:
YY_RULE_SETUP
#line 548 "aprepro.l"
return(INC);
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 549 "aprepro.l"
return(DEC);
	YY_BREAK
case 61:
YY_RULE_SETUP
#line 550 "aprepro.l"
return('+');
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 551 "aprepro.l"
return('-');
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 552 "aprepro.l"
return('*');
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 553 "aprepro.l"
return('*');         /* ~ is same as multiply */
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 554 "aprepro.l"
return(CONCAT);      /* String concatenation */
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 555 "aprepro.l"
return('/');
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 556 "aprepro.l"
return('%');
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 557 "aprepro.l"
return(POW);
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 558 "aprepro.l"
return(POW);
	YY_BREAK
case 70:
/* rule 70 can match eol */
YY_RULE_SETUP
#line 559 "aprepro.l"
LINENUM_INC;
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 560 "aprepro.l"
return('(');
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 561 "aprepro.l"
return(')');
	YY_BREAK
case 73:
YY_RULE_SETUP
#line 562 "aprepro.l"
return(',');
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 563 "aprepro.l"
return(';');
	YY_BREAK
case 75:
YY_RULE_SETUP
#line 564 "aprepro.l"
return(':');
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 565 "aprepro.l"
return('?');
	YY_BREAK
case 77:
YY_RULE_SETUP
#line 566 "aprepro.l"
return('<');
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 567 "aprepro.l"
return('>');
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 568 "aprepro.l"
return(LE);
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 569 "aprepro.l"
return(GE);
	YY_BREAK
case 81:
YY_RULE_SETUP
#line 570 "aprepro.l"
return(EQ);
	YY_BREAK
case 82:
YY_RULE_SETUP
#line 571 "aprepro.l"
return(NE);
	YY_BREAK
case 83:
YY_RULE_SETUP
#line 572 "aprepro.l"
return(LAND);
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 573 "aprepro.l"
return(LOR);
	YY_BREAK
case 85:
YY_RULE_SETUP
#line 574 "aprepro.l"
return(NOT);
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 575 "aprepro.l"
return('[');
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 576 "aprepro.l"
return(']');
	YY_BREAK
case 88:
/* rule 88 can match eol */
YY_RULE_SETUP
#line 577 "aprepro.l"
{
    char *pt = strrchr(yytext, '"');
    *pt = '\0';
    NEWSTR(yytext+1, yylval.string);
    return QSTRING; 
  }
	YY_BREAK
case 89:
/* rule 89 can match eol */
YY_RULE_SETUP
#line 584 "aprepro.l"
{
    char *pt = strrchr(yytext, '\'');
    *pt = '\0';
    NEWSTR(yytext+1, yylval.string);
    return QSTRING; 
  }
	YY_BREAK
case 90:
YY_RULE_SETUP
#line 591 "aprepro.l"
{
    if (switch_skip_to_endcase)
      BEGIN(END_CASE_SKIP);
    else
      BEGIN(if_state[if_lvl]);
    return('}');
  }
	YY_BREAK
/* End of <PARSING> start condition block */
case 91:
YY_RULE_SETUP
#line 600 "aprepro.l"
{ if (echo) fwrite( "{", 1, 1, yyout ); }
	YY_BREAK
case 92:
YY_RULE_SETUP
#line 602 "aprepro.l"
{ if (echo) fwrite( "}", 1, 1, yyout ); }
	YY_BREAK
case 93:
YY_RULE_SETUP
#line 604 "aprepro.l"
{ BEGIN(PARSING); return('{'); }
	YY_BREAK
case 94:
#line 607 "aprepro.l"
case 95:
YY_RULE_SETUP
#line 607 "aprepro.l"
{ if (ap_options.end_on_exit)
			       {
				 if (echo) ECHO;
				 return(-1);  
			       }
                              else 
                               if (echo) ECHO;
			   }
	YY_BREAK
case 96:
YY_RULE_SETUP
#line 617 "aprepro.l"
{ if (echo) ECHO; }
	YY_BREAK
case 97:
#line 621 "aprepro.l"
case 98:
YY_RULE_SETUP
#line 621 "aprepro.l"
{ if (echo) ECHO; }
	YY_BREAK
case 99:
/* rule 99 can match eol */
YY_RULE_SETUP
#line 623 "aprepro.l"
{ if (echo && !suppress_nl) ECHO; suppress_nl = 0; LINENUM_INC; }
	YY_BREAK
case 100:
YY_RULE_SETUP
#line 625 "aprepro.l"
ECHO;
	YY_BREAK
#line 2454 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(PARSING):
case YY_STATE_EOF(GET_FILENAME):
case YY_STATE_EOF(IF_SKIP):
case YY_STATE_EOF(GET_VAR):
case YY_STATE_EOF(VERBATIM):
case YY_STATE_EOF(IF_WHILE_SKIP):
case YY_STATE_EOF(GET_LOOP_VAR):
case YY_STATE_EOF(LOOP):
case YY_STATE_EOF(LOOP_SKIP):
case YY_STATE_EOF(END_CASE_SKIP):
	yyterminate();

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

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

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

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

			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state(  );

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

			yy_next_state = yy_try_NUL_trans( yy_current_state );

			yy_bp = (yytext_ptr) + YY_MORE_ADJ;

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

			else
				{
				yy_cp = (yy_c_buf_p);
				goto yy_find_action;
				}
			}

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

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

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

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

			case EOB_ACT_CONTINUE_SCAN:
				(yy_c_buf_p) =
					(yytext_ptr) + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state(  );

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

			case EOB_ACT_LAST_MATCH:
				(yy_c_buf_p) =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];

				yy_current_state = yy_get_previous_state(  );

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

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

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int yy_get_next_buffer (void)
{
    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	register char *source = (yytext_ptr);
	register int number_to_move, i;
	int ret_val;

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

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

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

	/* Try to read more data. */

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

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

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

	else
		{
			yy_size_t 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_LVALUE;

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

			if ( b->yy_is_our_buffer )
				{
				yy_size_t 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), 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);

	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 >= 673 )
				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 >= 673 )
			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 == 672);

		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 yy_size_t 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 */
			yy_size_t 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);

	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 = file ? (isatty( fileno(file) ) > 0) : 0;
    
	errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * 
 */
    void yy_flush_buffer (YY_BUFFER_STATE  b )
{
    	if ( ! b )
		return;

	b->yy_n_chars = 0;

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

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

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

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

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

	yyensure_buffer_stack();

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

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

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

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

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

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

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void yyensure_buffer_stack (void)
{
	yy_size_t 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, yy_size_t  _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.
 * 
 */
yy_size_t 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 625 "aprepro.l"


int yywrap(void)
{
  if (nfile == 0)		/* End of main file, not in nested include */
    {
      fclose (yyin);
      return (1);
    }
  else
    /* We are in an included or looping file */
    {
      yy_delete_buffer (YY_CURRENT_BUFFER);
      if (ap_file_list[nfile].tmp_file)
	{
          if (ap_options.debugging)
	      fprintf (stderr, "DEBUG LOOP: Loop count = %d\n",
		       ap_file_list[nfile].loop_count);
	  if (--ap_file_list[nfile].loop_count <= 0)
	    {
	      if (strcmp("_string_", ap_file_list[nfile].name) != 0) {
		
		fclose (yyin);
		if (!ap_options.debugging)
		  remove(ap_file_list[nfile].name);	/* Delete file if temporary */
	      } else {
		/* Free the string buffer */
		/* free(file_pointer[nfile]); */
	      }
	      free (ap_file_list[nfile].name);
	      yy_switch_to_buffer (file_pointer[--nfile]);
	    }
	  else
	    {
	      rewind (yyin);
	      yy_switch_to_buffer (yy_create_buffer (yyin, YY_BUF_SIZE));
	      ap_file_list[nfile].lineno = 0;
	    }
	}
      else
	{
	  fclose (yyin);
	  free (ap_file_list[nfile].name);
	  yy_switch_to_buffer (file_pointer[--nfile]);
	  /* Turn echoing back on at end of included files. */
	  echo = True;
	  /* Set immutability back to global immutable state */
	  state_immutable = ap_options.immutable;	  
	}
      return (0);
    }
}

void set_type(symrec *var, int type)
{
  if (var->name[0] == '_' || !state_immutable) {
    var->type = type;
  } else {
    if (type == VAR)
      var->type = IMMVAR;
    else if (type == SVAR)
      var->type = IMMSVAR;
    else
    var->type = type;
  }
}

/* Print error message to standard error and return.  Note: internally
 *   'lineno' starts at zero.  To avoid confusion, we add 1 to value
 *   when it is output.
 */

void yyerror (char *s)
{
  fprintf (stderr,
	   "Aprepro: ERROR:  %s (%s, line %d)\n",
	   s, ap_file_list[nfile].name, ap_file_list[nfile].lineno + 1);
}

void undefined_warning (char *var)
{
  if (in_ifdef_getvar == True) {
    in_ifdef_getvar = False;
    return;
  }

  if (ap_options.warning_msg == True)
    fprintf (stderr,
	     "Aprepro: WARN: Undefined variable '%s' (%s, line %d)\n",
	     var, ap_file_list[nfile].name, ap_file_list[nfile].lineno + 1);
}

void immutable_modify(symrec *var)
{
  fprintf (stderr,
	   "Aprepro: (IMMUTABLE) Variable '%s' is immutable and cannot be modified (%s, line %d)\n",
	   var->name, ap_file_list[nfile].name, ap_file_list[nfile].lineno + 1);
}

void redefined_warning (symrec *var)
{
  if (*var->name != '_' && ap_options.warning_msg == True)
    fprintf (stderr,
             "Aprepro: WARN: %s Variable '%s' redefined (%s, line %d)\n",
	     var->isInternal ? "Pre-defined" : "User-defined",
             var->name, ap_file_list[nfile].name, ap_file_list[nfile].lineno + 1);
}

void bad_variable_syntax(char *string)
{
  if (ap_options.warning_msg == True)
    fprintf (stderr,
	     "Aprepro: WARN: Invalid variable name syntax '%s' (%s, line %d)\n",
	     string, ap_file_list[nfile].name, ap_file_list[nfile].lineno + 1);
}

void warning (char *string)
{
  if (ap_options.warning_msg == True)
    fprintf (stderr,
	     "Aprepro: WARN: '%s' (%s, line %d)\n",
	     string, ap_file_list[nfile].name, ap_file_list[nfile].lineno + 1);
}


char *do_execute (char string[])
{
  /* Push the contents of 'string' onto the stack to be reread.
   * 'string' will be surrounded by {} so it must be a valid expression.
   */
  
  int i;
  char *new_string = NULL;

  /*
   * NOTE: The closing } has not yet been scanned in the call to execute();
   *       therefore, we read it ourselves using input(), then we push:
   *       '}{' + our string + '}' 
   */
  while ((i = input()) != '}' && i != EOF)
    ;				/* eat up values */
  if (i == EOF) {
    yyerror ("End-of-file in execute() command");
  }

  /* Allocate space for string + '}' + '{' + end_of_string */
  new_string = malloc(strlen(string)+4); 
  strcpy(new_string, "}{");
  strcat(new_string, string);
  strcat(new_string, "}");

  file_pointer[nfile++] = YY_CURRENT_BUFFER;
  NEWSTR("_string_", ap_file_list[nfile].name);
  SET_FILE_LIST(nfile, 0, True, -1);
  
  {
    YY_BUFFER_STATE bp = yy_scan_string(new_string);
    file_pointer[nfile] = bp;
    yy_switch_to_buffer(bp);
    free(new_string);
  }

  return (NULL);
}

/* Push the contents of 'string' onto the stack to be reread.
 * 'string' will not be surrounded by {}.
 */

char *do_rescan (char *string)
{
  int i;
/*
 * NOTE: The closing } has not yet been scanned in the call to rescan();
 *       therefore, we read it ourselves using input(), then we push our
 *       string and then put the closing } back on the stack last
 *       (to be read first),
 */
  while ((i = input ()) != '}' && i != EOF)
    ;				/* eat up values */
  if (i == EOF) {
    yyerror ("End-of-file in rescan() command");
  }
  
  {
    YY_BUFFER_STATE bp;
    char *new_string = malloc(strlen(string)+2);
    file_pointer[nfile++] = YY_CURRENT_BUFFER;
    NEWSTR("_string_", ap_file_list[nfile].name);
    SET_FILE_LIST(nfile, 0, True, -1);
    new_string[0] = '}';
    new_string[1] = '\0';
    strcat(new_string, string);
    bp = yy_scan_string(new_string);
    file_pointer[nfile] = bp;
    yy_switch_to_buffer(bp);
    free(new_string);
  }
  return (NULL);
}

char *do_switch(double x)
{
  /* save that we are in a switch statement */
  /* save the value of 'x' for use in deciding which case to execute */
  if (switch_active) {
    yyerror("switch statement found while switch already active. Nested switch not supported.");
  }

  switch_active = 1;
  switch_case_run = 0;
  switch_condition = x;
  switch_skip_to_endcase = 1; /* Skip everything until first case */
  suppress_nl = 1;

  if (ap_options.debugging) 
    fprintf (stderr, "DEBUG SWITCH: 'switch' with condition = %g at line %d\n",
	     switch_condition, ap_file_list[nfile].lineno);

  return(NULL);
}

char *do_case(double x)
{
  /* make sure we are in a switch statement */
  /* if 'x' matches the value saved in the switch statement 
   * and no other case has been executed, then
   * execute the code in the case and set a flag indicating
   * the switch has run;
   * if 'x' does not match the value saved, then skip to endcase
   */
  suppress_nl = 1;

  if (!switch_active) {
    yyerror("case statement found outside switch statement.");
  }

  if (!switch_case_run && x == switch_condition) {
    switch_case_run = 1;
    if (ap_options.debugging) 
      fprintf (stderr, "DEBUG SWITCH: 'case' condition = %g matches switch condition = %g at line %d\n",
	       x, switch_condition, ap_file_list[nfile].lineno);
  } 
  else {
    if (ap_options.debugging) 
      fprintf (stderr, "DEBUG SWITCH: 'case' condition = %g does not match switch condition = %g (or case already matched) at line %d\n",
	       x, switch_condition, ap_file_list[nfile].lineno);

    /* Need to skip all code until end of case */
    switch_skip_to_endcase = 1;
  }
  return(NULL);
}

char *do_if(double x)
{
  in_ifdef_getvar = False;
  if_lvl++;
  if (if_lvl >= MAX_IF_NESTING) {
    yyerror("Too many nested if statements");
  }
  else {
    if (x == 0) {
      if_state[if_lvl] = IF_SKIP;
      if_case_run[if_lvl] = False;
    } else {
      suppress_nl = 1;
      if_state[if_lvl] = INITIAL;
      if_case_run[if_lvl] = True;
    }
    if (ap_options.debugging) 
      fprintf(stderr, "DEBUG IF: If level %d %d\n", if_lvl, if_state[if_lvl]);
  }
  return(NULL);
}

char *do_elseif(double x)
{
  /* Check if in an if */
  /* See if any of the 'cases' in the if have executed */

  if (x == 0 || if_case_run[if_lvl]) {
    if_state[if_lvl] = IF_SKIP;
  } else {
    suppress_nl = 1;
    if_state[if_lvl] = INITIAL;
    if_case_run[if_lvl] = True;
  }
  if (ap_options.debugging) 
    fprintf(stderr, "DEBUG IF: elseif at level %d %d\n", if_lvl, if_state[if_lvl]); 
  return(NULL);
}

char *do_notif(double x)
{
  return do_if(x == 0);
}

char *do_error (char *error_string)
{
  /* Print error message (to stderr) and exit */
  yyerror(error_string);
  exit(EXIT_FAILURE);
  /* NOTREACHED */
  return(NULL);
}

void push_file(char *tmp_file, int is_tmp, int loop_count)
{
    file_pointer[nfile++] = YY_CURRENT_BUFFER;
    NEWSTR(tmp_file, ap_file_list[nfile].name);
    SET_FILE_LIST(nfile, 0, is_tmp, loop_count);
    yyin = open_file(tmp_file, "r");
    yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));        
}


void add_input_file(char *filename)
{
  yyin = open_file(filename, "r");
  file_pointer[nfile] = yy_create_buffer(yyin,YY_BUF_SIZE);        
  NEWSTR(filename, ap_file_list[nfile].name);
  SET_FILE_LIST(nfile, 0, False, 0);
}

static int get_input(char *buf, int size)
{
  char *line;
  if (feof(yyin))
    return YY_NULL;

  line = getline_int(NULL);

  if (strlen(line) == 0)
    return YY_NULL;

  gl_histadd(line);
  
  if (strlen(line) > size - 2) {
    yyerror("input line too long");
    return YY_NULL;
  }
  strcpy(buf, line);
  strcat(buf, "\n");
  
  return strlen(buf);
}


