/* A lexical scanner generated by flex */

/* Scanner skeleton version:
 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.85 95/04/24 10:48:47 vern Exp $
 */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5

#include <stdio.h>


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


#ifdef __cplusplus

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

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

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

#else	/* ! __cplusplus */

#if __STDC__

#define YY_USE_PROTOS
#define YY_USE_CONST

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

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

#ifdef YY_USE_CONST
#define ResYYconst const
#else
#define ResYYconst
#endif


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

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

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

/* Enter a start condition.  This macro really ought to take a parameter,
 * but we do it the disgusting crufty way forced on us by the ()-less
 * definition of BEGIN.
 */
#define BEGIN ResYY_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 ((ResYY_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 ResYYrestart( ResYYin )

#define YY_END_OF_BUFFER_CHAR 0

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

typedef struct ResYY_buffer_state *YY_BUFFER_STATE;

extern int ResYYleng;
extern FILE *ResYYin, *ResYYout;

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

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

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

#define ResYYless(n) \
	do \
		{ \
		/* Undo effects of setting up ResYYtext. */ \
		*ResYY_cp = ResYY_hold_char; \
		ResYY_c_buf_p = ResYY_cp = ResYY_bp + n - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up ResYYtext again */ \
		} \
	while ( 0 )

#define unput(c) ResYYunput( c, ResYYtext_ptr )

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


struct ResYY_buffer_state
	{
	FILE *ResYY_input_file;

	char *ResYY_ch_buf;		/* input buffer */
	char *ResYY_buf_pos;		/* current position in input buffer */

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

	/* Number of characters read into ResYY_ch_buf, not including EOB
	 * characters.
	 */
	int ResYY_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 ResYY_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 ResYY_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 ResYY_at_bol;

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

	int ResYY_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 ResYYrestart()), so that the user can continue scanning by
	 * just pointing ResYYin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2
	};

static YY_BUFFER_STATE ResYY_current_buffer = 0;

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


/* ResYY_hold_char holds the character lost when ResYYtext is formed. */
static char ResYY_hold_char;

static int ResYY_n_chars;		/* number of characters read into ResYY_ch_buf */


int ResYYleng;

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

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

void ResYYrestart YY_PROTO(( FILE *input_file ));

void ResYY_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void ResYY_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE ResYY_create_buffer YY_PROTO(( FILE *file, int size ));
void ResYY_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void ResYY_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void ResYY_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER ResYY_flush_buffer( ResYY_current_buffer )

YY_BUFFER_STATE ResYY_scan_buffer YY_PROTO(( char *base, ResYY_size_t size ));
YY_BUFFER_STATE ResYY_scan_string YY_PROTO(( ResYYconst char *str ));
YY_BUFFER_STATE ResYY_scan_bytes YY_PROTO(( ResYYconst char *bytes, int len ));

static void *ResYY_flex_alloc YY_PROTO(( ResYY_size_t ));
static void *ResYY_flex_realloc YY_PROTO(( void *, ResYY_size_t ));
static void ResYY_flex_free YY_PROTO(( void * ));

#define ResYY_new_buffer ResYY_create_buffer

#define ResYY_set_interactive(is_interactive) \
	{ \
	if ( ! ResYY_current_buffer ) \
		ResYY_current_buffer = ResYY_create_buffer( ResYYin, YY_BUF_SIZE ); \
	ResYY_current_buffer->ResYY_is_interactive = is_interactive; \
	}

#define ResYY_set_bol(at_bol) \
	{ \
	if ( ! ResYY_current_buffer ) \
		ResYY_current_buffer = ResYY_create_buffer( ResYYin, YY_BUF_SIZE ); \
	ResYY_current_buffer->ResYY_at_bol = at_bol; \
	}

#define YY_AT_BOL() (ResYY_current_buffer->ResYY_at_bol)

typedef unsigned char YY_CHAR;
FILE *ResYYin = (FILE *) 0, *ResYYout = (FILE *) 0;
typedef int ResYY_state_type;
extern char *ResYYtext;
#define ResYYtext_ptr ResYYtext

static ResYY_state_type ResYY_get_previous_state YY_PROTO(( void ));
static ResYY_state_type ResYY_try_NUL_trans YY_PROTO(( ResYY_state_type current_state ));
static int ResYY_get_next_buffer YY_PROTO(( void ));
static void ResYY_fatal_error YY_PROTO(( ResYYconst char msg[] ));

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up ResYYtext.
 */
#define YY_DO_BEFORE_ACTION \
	ResYYtext_ptr = ResYY_bp; \
	ResYYtext_ptr -= ResYY_more_len; \
	ResYYleng = (int) (ResYY_cp - ResYYtext_ptr); \
	ResYY_hold_char = *ResYY_cp; \
	*ResYY_cp = '\0'; \
	ResYY_c_buf_p = ResYY_cp;

#define YY_NUM_RULES 5
#define YY_END_OF_BUFFER 6
static ResYYconst short int ResYY_accept[52] =
    {   0,
        0,    0,    4,    4,    6,    1,    2,    2,    3,    4,
        1,    4,    4,    4,    4,    4,    4,    4,    4,    4,
        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
        0
    } ;

static ResYYconst int ResYY_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        2,    2,    2,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    2,    1,    1,    1,    1,    1,    1,    1,    4,
        4,    1,    1,    4,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        4,    1,    4,    1,    1,    1,    1,    1,    1,    1,

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    4,    1,    4,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,

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

static ResYYconst int ResYY_meta[5] =
    {   0,
        1,    2,    2,    2
    } ;

static ResYYconst short int ResYY_base[93] =
    {   0,
        0,    0,    0,    0,   86,    0,   87,   87,   87,    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,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,   87,
       87,    4,   84,    6,    8,   10,   12,   14,   16,   18,
       20,   22,   24,   26,   28,   30,   32,   34,   36,   38,
       40,   42,   44,   46,   48,   50,   52,   54,   56,   58,
       60,   62,   64,   66,   68,   70,   72,   74,   76,   78,
       80,   82

    } ;

static ResYYconst short int ResYY_def[93] =
    {   0,
       51,    1,   52,   52,   51,   53,   51,   51,   51,   54,
       53,   55,   56,   57,   58,   59,   60,   61,   62,   63,
       64,   65,   66,   67,   68,   69,   70,   71,   72,   73,
       74,   75,   76,   77,   78,   79,   80,   81,   82,   83,
       84,   85,   86,   87,   88,   89,   90,   91,   92,   51,
        0,   51,   51,   51,   51,   51,   51,   51,   51,   51,
       51,   51,   51,   51,   51,   51,   51,   51,   51,   51,
       51,   51,   51,   51,   51,   51,   51,   51,   51,   51,
       51,   51,   51,   51,   51,   51,   51,   51,   51,   51,
       51,   51

    } ;

static ResYYconst short int ResYY_nxt[92] =
    {   0,
        6,    7,    8,    9,   10,   10,   12,   12,   13,   13,
       14,   14,   15,   15,   16,   16,   17,   17,   18,   18,
       19,   19,   20,   20,   21,   21,   22,   22,   23,   23,
       24,   24,   25,   25,   26,   26,   27,   27,   28,   28,
       29,   29,   30,   30,   31,   31,   32,   32,   33,   33,
       34,   34,   35,   35,   36,   36,   37,   37,   38,   38,
       39,   39,   40,   40,   41,   41,   42,   42,   43,   43,
       44,   44,   45,   45,   46,   46,   47,   47,   48,   48,
       49,   49,   50,   50,   11,   51,    5,   51,   51,   51,
       51

    } ;

static ResYYconst short int ResYY_chk[92] =
    {   0,
        1,    1,    1,    1,   52,   52,   54,   54,   55,   55,
       56,   56,   57,   57,   58,   58,   59,   59,   60,   60,
       61,   61,   62,   62,   63,   63,   64,   64,   65,   65,
       66,   66,   67,   67,   68,   68,   69,   69,   70,   70,
       71,   71,   72,   72,   73,   73,   74,   74,   75,   75,
       76,   76,   77,   77,   78,   78,   79,   79,   80,   80,
       81,   81,   82,   82,   83,   83,   84,   84,   85,   85,
       86,   86,   87,   87,   88,   88,   89,   89,   90,   90,
       91,   91,   92,   92,   53,    5,   51,   51,   51,   51,
       51

    } ;

static ResYY_state_type ResYY_last_accepting_state;
static char *ResYY_last_accepting_cpos;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
static int ResYY_more_flag = 0;
static int ResYY_more_len = 0;
#define ResYYmore() (ResYY_more_flag = 1)
#define YY_MORE_ADJ ResYY_more_len
char *ResYYtext;
#line 1 "./lreslang.l"
#define INITIAL 0
#define ERROR 1

#line 4 "./lreslang.l"
#include <stdlib.h>
#include <string.h>
#include "mymalloc.h"
#define YYTEXT   ((char *) ResYYtext)
#define YYLENG   ((size_t) ResYYleng)
#define ECHO     (void) fwrite(YYTEXT, YYLENG, 1, ResYYout)

extern int   isatty(int fd);
extern int   ResYYlex(void);

static const char *Ptr;
static int         Length;

#undef YY_INPUT
#define YY_INPUT(buf, result, max_size)                                 \
        if (max_size > Length) result = Length;                         \
        else                   result = max_size;                       \
        memcpy(buf, Ptr, (size_t) result);                              \
        Ptr += result;                                                  \
        Length -= result;
#define YY_BREAK

#include "reslang.h"
#include "yreslang.tab.h"

ResParse *ResResult;
extern int ResYYparse(void);
#line 439 "lex.ResYY.c"

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

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

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

#ifndef ResYYtext_ptr
static void ResYY_flex_strncpy YY_PROTO(( char *, ResYYconst char *, int ));
#endif

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

#if YY_STACK_USED
static int ResYY_start_stack_ptr = 0;
static int ResYY_start_stack_depth = 0;
static int *ResYY_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void ResYY_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void ResYY_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int ResYY_top_state YY_PROTO(( void ));
#endif

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

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

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

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

#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO (void) fwrite( ResYYtext, ResYYleng, 1, ResYYout )
#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 ( ResYY_current_buffer->ResYY_is_interactive ) \
		{ \
		int c = '*', n; \
		for ( n = 0; n < max_size && \
			     (c = getc( ResYYin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( ResYYin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else if ( ((result = fread( buf, 1, max_size, ResYYin )) == 0) \
		  && ferror( ResYYin ) ) \
		YY_FATAL_ERROR( "input in flex scanner failed" );
#endif

/* No semi-colon after return; correct usage is to write "ResYYterminate();" -
 * we don't want an extra ';' after the "return" because that will cause
 * some compilers to complain about unreachable statements.
 */
#ifndef ResYYterminate
#define ResYYterminate() 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) ResYY_fatal_error( msg )
#endif

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

/* Code executed at the beginning of each rule, after ResYYtext and ResYYleng
 * 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

YY_DECL
	{
	register ResYY_state_type ResYY_current_state;
	register char *ResYY_cp, *ResYY_bp;
	register int ResYY_act;

#line 36 "./lreslang.l"

#line 588 "lex.ResYY.c"

	if ( ResYY_init )
		{
		ResYY_init = 0;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

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

		if ( ! ResYYin )
			ResYYin = stdin;

		if ( ! ResYYout )
			ResYYout = stdout;

		if ( ! ResYY_current_buffer )
			ResYY_current_buffer =
				ResYY_create_buffer( ResYYin, YY_BUF_SIZE );

		ResYY_load_buffer_state();
		}

	while ( 1 )		/* loops until end-of-file is reached */
		{
		ResYY_more_len = 0;
		if ( ResYY_more_flag )
			{
			ResYY_more_len = ResYYleng;
			ResYY_more_flag = 0;
			}
		ResYY_cp = ResYY_c_buf_p;

		/* Support of ResYYtext. */
		*ResYY_cp = ResYY_hold_char;

		/* ResYY_bp points to the position in ResYY_ch_buf of the start of
		 * the current run.
		 */
		ResYY_bp = ResYY_cp;

		ResYY_current_state = ResYY_start;
ResYY_match:
		do
			{
			register YY_CHAR ResYY_c = ResYY_ec[YY_SC_TO_UI(*ResYY_cp)];
			if ( ResYY_accept[ResYY_current_state] )
				{
				ResYY_last_accepting_state = ResYY_current_state;
				ResYY_last_accepting_cpos = ResYY_cp;
				}
			while ( ResYY_chk[ResYY_base[ResYY_current_state] + ResYY_c] != ResYY_current_state )
				{
				ResYY_current_state = (int) ResYY_def[ResYY_current_state];
				if ( ResYY_current_state >= 52 )
					ResYY_c = ResYY_meta[(unsigned int) ResYY_c];
				}
			ResYY_current_state = ResYY_nxt[ResYY_base[ResYY_current_state] + (unsigned int) ResYY_c];
			++ResYY_cp;
			}
		while ( ResYY_base[ResYY_current_state] != 87 );

ResYY_find_action:
		ResYY_act = ResYY_accept[ResYY_current_state];
		if ( ResYY_act == 0 )
			{ /* have to back up */
			ResYY_cp = ResYY_last_accepting_cpos;
			ResYY_current_state = ResYY_last_accepting_state;
			ResYY_act = ResYY_accept[ResYY_current_state];
			}

		YY_DO_BEFORE_ACTION;


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


		switch ( ResYY_act )
	{ /* beginning of action switch */
			case 0: /* must back up */
			/* undo the effects of YY_DO_BEFORE_ACTION */
			*ResYY_cp = ResYY_hold_char;
			ResYY_cp = ResYY_last_accepting_cpos;
			ResYY_current_state = ResYY_last_accepting_state;
			goto ResYY_find_action;

case 1:
YY_RULE_SETUP
#line 37 "./lreslang.l"
{ ResYYlval.Name = mystrndup(YYTEXT, YYLENG);
                                return NAME; }
	YY_BREAK
case 2:
YY_RULE_SETUP
#line 39 "./lreslang.l"
{ break; }
	YY_BREAK
case 3:
YY_RULE_SETUP
#line 40 "./lreslang.l"
{ return YYTEXT[0]; }
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 42 "./lreslang.l"
{ ResYYlval.Name = mystrndup(YYTEXT, YYLENG);
                                ResYYmore();
                                return NAME; }
	YY_BREAK
case 5:
YY_RULE_SETUP
#line 45 "./lreslang.l"
ECHO;
	YY_BREAK
#line 705 "lex.ResYY.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(ERROR):
	ResYYterminate();

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */
		int ResYY_amount_of_matched_text = (int) (ResYY_cp - ResYYtext_ptr) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*ResYY_cp = ResYY_hold_char;

		if ( ResYY_current_buffer->ResYY_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 ResYYin at a new source and called
			 * ResYYlex().  If so, then we have to assure
			 * consistency between ResYY_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.
			 */
			ResYY_n_chars = ResYY_current_buffer->ResYY_n_chars;
			ResYY_current_buffer->ResYY_input_file = ResYYin;
			ResYY_current_buffer->ResYY_buffer_status = YY_BUFFER_NORMAL;
			}

		/* Note that here we test for ResYY_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since ResYY_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 ( ResYY_c_buf_p <= &ResYY_current_buffer->ResYY_ch_buf[ResYY_n_chars] )
			{ /* This was really a NUL. */
			ResYY_state_type ResYY_next_state;

			ResYY_c_buf_p = ResYYtext_ptr + ResYY_amount_of_matched_text;

			ResYY_current_state = ResYY_get_previous_state();

			/* Okay, we're now positioned to make the NUL
			 * transition.  We couldn't have
			 * ResYY_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).
			 */

			ResYY_next_state = ResYY_try_NUL_trans( ResYY_current_state );

			ResYY_bp = ResYYtext_ptr + YY_MORE_ADJ;

			if ( ResYY_next_state )
				{
				/* Consume the NUL. */
				ResYY_cp = ++ResYY_c_buf_p;
				ResYY_current_state = ResYY_next_state;
				goto ResYY_match;
				}

			else
				{
				ResYY_cp = ResYY_c_buf_p;
				goto ResYY_find_action;
				}
			}

		else switch ( ResYY_get_next_buffer() )
			{
			case EOB_ACT_END_OF_FILE:
				{
				ResYY_did_buffer_switch_on_eof = 0;

				if ( ResYYwrap() )
					{
					/* Note: because we've taken care in
					 * ResYY_get_next_buffer() to have set up
					 * ResYYtext, we can now set up
					 * ResYY_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.
					 */
					ResYY_c_buf_p = ResYYtext_ptr + YY_MORE_ADJ;

					ResYY_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

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

			case EOB_ACT_CONTINUE_SCAN:
				ResYY_c_buf_p =
					ResYYtext_ptr + ResYY_amount_of_matched_text;

				ResYY_current_state = ResYY_get_previous_state();

				ResYY_cp = ResYY_c_buf_p;
				ResYY_bp = ResYYtext_ptr + YY_MORE_ADJ;
				goto ResYY_match;

			case EOB_ACT_LAST_MATCH:
				ResYY_c_buf_p =
				&ResYY_current_buffer->ResYY_ch_buf[ResYY_n_chars];

				ResYY_current_state = ResYY_get_previous_state();

				ResYY_cp = ResYY_c_buf_p;
				ResYY_bp = ResYYtext_ptr + YY_MORE_ADJ;
				goto ResYY_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 ResYYlex */


/* ResYY_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 ResYY_get_next_buffer()
	{
	register char *dest = ResYY_current_buffer->ResYY_ch_buf;
	register char *source = ResYYtext_ptr;
	register int number_to_move, i;
	int ret_val;

	if ( ResYY_c_buf_p > &ResYY_current_buffer->ResYY_ch_buf[ResYY_n_chars + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( ResYY_current_buffer->ResYY_fill_buffer == 0 )
		{ /* Don't try to fill the buffer, so this is an EOF. */
		if ( ResYY_c_buf_p - ResYYtext_ptr - YY_MORE_ADJ == 1 )
			{
			/* We matched a singled characater, 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) (ResYY_c_buf_p - ResYYtext_ptr) - 1;

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

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

	else
		{
		int num_to_read =
			ResYY_current_buffer->ResYY_buf_size - number_to_move - 1;

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

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

			int ResYY_c_buf_p_offset =
				(int) (ResYY_c_buf_p - b->ResYY_ch_buf);

			if ( b->ResYY_is_our_buffer )
				{
				int new_size = b->ResYY_buf_size * 2;

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

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

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

			ResYY_c_buf_p = &b->ResYY_ch_buf[ResYY_c_buf_p_offset];

			num_to_read = ResYY_current_buffer->ResYY_buf_size -
						number_to_move - 1;
#endif
			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

		/* Read in more data. */
		YY_INPUT( (&ResYY_current_buffer->ResYY_ch_buf[number_to_move]),
			ResYY_n_chars, num_to_read );
		}

	if ( ResYY_n_chars == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			ResYYrestart( ResYYin );
			}

		else
			{
			ret_val = EOB_ACT_LAST_MATCH;
			ResYY_current_buffer->ResYY_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	ResYY_n_chars += number_to_move;
	ResYY_current_buffer->ResYY_ch_buf[ResYY_n_chars] = YY_END_OF_BUFFER_CHAR;
	ResYY_current_buffer->ResYY_ch_buf[ResYY_n_chars + 1] = YY_END_OF_BUFFER_CHAR;

	ResYYtext_ptr = &ResYY_current_buffer->ResYY_ch_buf[0];

	return ret_val;
	}


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

static ResYY_state_type ResYY_get_previous_state()
	{
	register ResYY_state_type ResYY_current_state;
	register char *ResYY_cp;

	ResYY_current_state = ResYY_start;

	for ( ResYY_cp = ResYYtext_ptr + YY_MORE_ADJ; ResYY_cp < ResYY_c_buf_p; ++ResYY_cp )
		{
		register YY_CHAR ResYY_c = (*ResYY_cp ? ResYY_ec[YY_SC_TO_UI(*ResYY_cp)] : 1);
		if ( ResYY_accept[ResYY_current_state] )
			{
			ResYY_last_accepting_state = ResYY_current_state;
			ResYY_last_accepting_cpos = ResYY_cp;
			}
		while ( ResYY_chk[ResYY_base[ResYY_current_state] + ResYY_c] != ResYY_current_state )
			{
			ResYY_current_state = (int) ResYY_def[ResYY_current_state];
			if ( ResYY_current_state >= 52 )
				ResYY_c = ResYY_meta[(unsigned int) ResYY_c];
			}
		ResYY_current_state = ResYY_nxt[ResYY_base[ResYY_current_state] + (unsigned int) ResYY_c];
		}

	return ResYY_current_state;
	}


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

#ifdef YY_USE_PROTOS
static ResYY_state_type ResYY_try_NUL_trans( ResYY_state_type ResYY_current_state )
#else
static ResYY_state_type ResYY_try_NUL_trans( ResYY_current_state )
ResYY_state_type ResYY_current_state;
#endif
	{
	register int ResYY_is_jam;
	register char *ResYY_cp = ResYY_c_buf_p;

	register YY_CHAR ResYY_c = 1;
	if ( ResYY_accept[ResYY_current_state] )
		{
		ResYY_last_accepting_state = ResYY_current_state;
		ResYY_last_accepting_cpos = ResYY_cp;
		}
	while ( ResYY_chk[ResYY_base[ResYY_current_state] + ResYY_c] != ResYY_current_state )
		{
		ResYY_current_state = (int) ResYY_def[ResYY_current_state];
		if ( ResYY_current_state >= 52 )
			ResYY_c = ResYY_meta[(unsigned int) ResYY_c];
		}
	ResYY_current_state = ResYY_nxt[ResYY_base[ResYY_current_state] + (unsigned int) ResYY_c];
	ResYY_is_jam = (ResYY_current_state == 51);

	return ResYY_is_jam ? 0 : ResYY_current_state;
	}


#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void ResYYunput( int c, register char *ResYY_bp )
#else
static void ResYYunput( c, ResYY_bp )
int c;
register char *ResYY_bp;
#endif
	{
	register char *ResYY_cp = ResYY_c_buf_p;

	/* undo effects of setting up ResYYtext */
	*ResYY_cp = ResYY_hold_char;

	if ( ResYY_cp < ResYY_current_buffer->ResYY_ch_buf + 2 )
		{ /* need to shift things up to make room */
		/* +2 for EOB chars. */
		register int number_to_move = ResYY_n_chars + 2;
		register char *dest = &ResYY_current_buffer->ResYY_ch_buf[
					ResYY_current_buffer->ResYY_buf_size + 2];
		register char *source =
				&ResYY_current_buffer->ResYY_ch_buf[number_to_move];

		while ( source > ResYY_current_buffer->ResYY_ch_buf )
			*--dest = *--source;

		ResYY_cp += (int) (dest - source);
		ResYY_bp += (int) (dest - source);
		ResYY_n_chars = ResYY_current_buffer->ResYY_buf_size;

		if ( ResYY_cp < ResYY_current_buffer->ResYY_ch_buf + 2 )
			YY_FATAL_ERROR( "flex scanner push-back overflow" );
		}

	*--ResYY_cp = (char) c;


	ResYYtext_ptr = ResYY_bp;
	ResYY_hold_char = *ResYY_cp;
	ResYY_c_buf_p = ResYY_cp;
	}
#endif	/* ifndef YY_NO_UNPUT */


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

	*ResYY_c_buf_p = ResYY_hold_char;

	if ( *ResYY_c_buf_p == YY_END_OF_BUFFER_CHAR )
		{
		/* ResYY_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 ( ResYY_c_buf_p < &ResYY_current_buffer->ResYY_ch_buf[ResYY_n_chars] )
			/* This was really a NUL. */
			*ResYY_c_buf_p = '\0';

		else
			{ /* need more input */
			ResYYtext_ptr = ResYY_c_buf_p;
			++ResYY_c_buf_p;

			switch ( ResYY_get_next_buffer() )
				{
				case EOB_ACT_END_OF_FILE:
					{
					if ( ResYYwrap() )
						{
						ResYY_c_buf_p =
						ResYYtext_ptr + YY_MORE_ADJ;
						return EOF;
						}

					if ( ! ResYY_did_buffer_switch_on_eof )
						YY_NEW_FILE;
#ifdef __cplusplus
					return ResYYinput();
#else
					return input();
#endif
					}

				case EOB_ACT_CONTINUE_SCAN:
					ResYY_c_buf_p = ResYYtext_ptr + YY_MORE_ADJ;
					break;

				case EOB_ACT_LAST_MATCH:
#ifdef __cplusplus
					YY_FATAL_ERROR(
					"unexpected last match in ResYYinput()" );
#else
					YY_FATAL_ERROR(
					"unexpected last match in input()" );
#endif
				}
			}
		}

	c = *(unsigned char *) ResYY_c_buf_p;	/* cast for 8-bit char's */
	*ResYY_c_buf_p = '\0';	/* preserve ResYYtext */
	ResYY_hold_char = *++ResYY_c_buf_p;


	return c;
	}


#ifdef YY_USE_PROTOS
void ResYYrestart( FILE *input_file )
#else
void ResYYrestart( input_file )
FILE *input_file;
#endif
	{
	if ( ! ResYY_current_buffer )
		ResYY_current_buffer = ResYY_create_buffer( ResYYin, YY_BUF_SIZE );

	ResYY_init_buffer( ResYY_current_buffer, input_file );
	ResYY_load_buffer_state();
	}


#ifdef YY_USE_PROTOS
void ResYY_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void ResYY_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
	{
	if ( ResYY_current_buffer == new_buffer )
		return;

	if ( ResYY_current_buffer )
		{
		/* Flush out information for old buffer. */
		*ResYY_c_buf_p = ResYY_hold_char;
		ResYY_current_buffer->ResYY_buf_pos = ResYY_c_buf_p;
		ResYY_current_buffer->ResYY_n_chars = ResYY_n_chars;
		}

	ResYY_current_buffer = new_buffer;
	ResYY_load_buffer_state();

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


#ifdef YY_USE_PROTOS
void ResYY_load_buffer_state( void )
#else
void ResYY_load_buffer_state()
#endif
	{
	ResYY_n_chars = ResYY_current_buffer->ResYY_n_chars;
	ResYYtext_ptr = ResYY_c_buf_p = ResYY_current_buffer->ResYY_buf_pos;
	ResYYin = ResYY_current_buffer->ResYY_input_file;
	ResYY_hold_char = *ResYY_c_buf_p;
	}


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

	b = (YY_BUFFER_STATE) ResYY_flex_alloc( sizeof( struct ResYY_buffer_state ) );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in ResYY_create_buffer()" );

	b->ResYY_buf_size = size;

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

	b->ResYY_is_our_buffer = 1;

	ResYY_init_buffer( b, file );

	return b;
	}


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

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

	if ( b->ResYY_is_our_buffer )
		ResYY_flex_free( (void *) b->ResYY_ch_buf );

	ResYY_flex_free( (void *) b );
	}


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

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


	{
	ResYY_flush_buffer( b );

	b->ResYY_input_file = file;
	b->ResYY_fill_buffer = 1;

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


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

	{
	b->ResYY_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->ResYY_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->ResYY_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->ResYY_buf_pos = &b->ResYY_ch_buf[0];

	b->ResYY_at_bol = 1;
	b->ResYY_buffer_status = YY_BUFFER_NEW;

	if ( b == ResYY_current_buffer )
		ResYY_load_buffer_state();
	}


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

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

	b = (YY_BUFFER_STATE) ResYY_flex_alloc( sizeof( struct ResYY_buffer_state ) );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in ResYY_scan_buffer()" );

	b->ResYY_buf_size = size - 2;	/* "- 2" to take care of EOB's */
	b->ResYY_buf_pos = b->ResYY_ch_buf = base;
	b->ResYY_is_our_buffer = 0;
	b->ResYY_input_file = 0;
	b->ResYY_n_chars = b->ResYY_buf_size;
	b->ResYY_is_interactive = 0;
	b->ResYY_at_bol = 1;
	b->ResYY_fill_buffer = 0;
	b->ResYY_buffer_status = YY_BUFFER_NEW;

	ResYY_switch_to_buffer( b );

	return b;
	}
#endif


#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE ResYY_scan_string( ResYYconst char *str )
#else
YY_BUFFER_STATE ResYY_scan_string( str )
ResYYconst char *str;
#endif
	{
	int len;
	for ( len = 0; str[len]; ++len )
		;

	return ResYY_scan_bytes( str, len );
	}
#endif


#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE ResYY_scan_bytes( ResYYconst char *bytes, int len )
#else
YY_BUFFER_STATE ResYY_scan_bytes( bytes, len )
ResYYconst char *bytes;
int len;
#endif
	{
	YY_BUFFER_STATE b;
	char *buf;
	ResYY_size_t n;
	int i;

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

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

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

	b = ResYY_scan_buffer( buf, n );
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in ResYY_scan_bytes()" );

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

	return b;
	}
#endif


#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void ResYY_push_state( int new_state )
#else
static void ResYY_push_state( new_state )
int new_state;
#endif
	{
	if ( ResYY_start_stack_ptr >= ResYY_start_stack_depth )
		{
		ResYY_size_t new_size;

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

		if ( ! ResYY_start_stack )
			ResYY_start_stack = (int *) ResYY_flex_alloc( new_size );

		else
			ResYY_start_stack = (int *) ResYY_flex_realloc(
					(void *) ResYY_start_stack, new_size );

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

	ResYY_start_stack[ResYY_start_stack_ptr++] = YY_START;

	BEGIN(new_state);
	}
#endif


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

	BEGIN(ResYY_start_stack[ResYY_start_stack_ptr]);
	}
#endif


#ifndef YY_NO_TOP_STATE
static int ResYY_top_state()
	{
	return ResYY_start_stack[ResYY_start_stack_ptr - 1];
	}
#endif

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

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



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

#undef ResYYless
#define ResYYless(n) \
	do \
		{ \
		/* Undo effects of setting up ResYYtext. */ \
		ResYYtext[ResYYleng] = ResYY_hold_char; \
		ResYY_c_buf_p = ResYYtext + n - YY_MORE_ADJ; \
		ResYY_hold_char = *ResYY_c_buf_p; \
		*ResYY_c_buf_p = '\0'; \
		ResYYleng = n; \
		} \
	while ( 0 )


/* Internal utility routines. */

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


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

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

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

#if YY_MAIN
int main()
	{
	ResYYlex();
	return 0;
	}
#endif
#line 45 "./lreslang.l"

ResParse *resParse(const char *Str, size_t Len)
{
    Ptr = Str;
    Length = Len;
    ResYY_init = 1;
    ResYYparse();
    return ResResult;
}

extern const char *_ResText(void);
const char *_ResText(void)
{
    static char Error[42];

    BEGIN(ERROR);
    ResYYmore();
    ResYYlex();
    if (YYLENG < sizeof(Error)) strcpy(Error, ResYYlval.Name);
    else {
        memcpy(Error, ResYYlval.Name, sizeof(Error)-1);
        Error[sizeof(Error)-1] = 0;
    }
    myfree(ResYYlval.Name);
    return Error;
}

/****************************************** flex fun **********************/
/*
void ResYY_flex_free(void *Data)
{
    myfree(Data);
}

void *ResYY_flex_alloc(int size)
{
    return mymalloc(size);
}

void *ResYY_flex_realloc(void *ptr, int size)
{
    return myrealloc(ptr, size);
}
*/

int ResYYwrap(void)
{
    return 1;
}

/* Kludge to shut up some compiler warnings for some versions of flex */
#include "except.h"
static void ResYY_flex_strcpy(char *s1, const char *s2);

static void loopy(void)
{
    ResYY_flex_strcpy(NULL, NULL);
}

static void ResYY_flex_strcpy(char *s1, const char *s2)
{
    Raise1(AssertException, "flex kludge function called");
#ifndef YY_NO_PUSH_STATE
    ResYY_push_state(s1 == s2);
#endif
#ifndef YY_NO_POP_STATE
    ResYY_pop_state();
#endif
#ifndef YY_NO_TOP_STATE
    ResYY_top_state();
#endif
    unput(' ');
    loopy();
}
