Blame bc/scan.c

Packit 70b277
Packit 70b277
#line 3 "scan.c"
Packit 70b277
Packit 70b277
#define  YY_INT_ALIGNED short int
Packit 70b277
Packit 70b277
/* A lexical scanner generated by flex */
Packit 70b277
Packit 70b277
#define FLEX_SCANNER
Packit 70b277
#define YY_FLEX_MAJOR_VERSION 2
Packit 70b277
#define YY_FLEX_MINOR_VERSION 5
Packit 70b277
#define YY_FLEX_SUBMINOR_VERSION 35
Packit 70b277
#if YY_FLEX_SUBMINOR_VERSION > 0
Packit 70b277
#define FLEX_BETA
Packit 70b277
#endif
Packit 70b277
Packit 70b277
/* First, we deal with  platform-specific or compiler-specific issues. */
Packit 70b277
Packit 70b277
/* begin standard C headers. */
Packit 70b277
#ifdef _LIBC
Packit 70b277
#include "namespace.h"
Packit 70b277
#endif
Packit 70b277
#include <stdio.h>
Packit 70b277
#include <string.h>
Packit 70b277
#include <errno.h>
Packit 70b277
#include <stdlib.h>
Packit 70b277
Packit 70b277
/* end standard C headers. */
Packit 70b277
Packit 70b277
/*	$NetBSD: flexint.h,v 1.1.1.1 2009/10/26 00:26:19 christos Exp $	*/
Packit 70b277
Packit 70b277
/* flex integer type definitions */
Packit 70b277
Packit 70b277
#ifndef FLEXINT_H
Packit 70b277
#define FLEXINT_H
Packit 70b277
Packit 70b277
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
Packit 70b277
Packit 70b277
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
Packit 70b277
Packit 70b277
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
Packit 70b277
 * if you want the limit (max/min) macros for int types. 
Packit 70b277
 */
Packit 70b277
#ifndef __STDC_LIMIT_MACROS
Packit 70b277
#define __STDC_LIMIT_MACROS 1
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#include <inttypes.h>
Packit 70b277
typedef int8_t flex_int8_t;
Packit 70b277
typedef uint8_t flex_uint8_t;
Packit 70b277
typedef int16_t flex_int16_t;
Packit 70b277
typedef uint16_t flex_uint16_t;
Packit 70b277
typedef int32_t flex_int32_t;
Packit 70b277
typedef uint32_t flex_uint32_t;
Packit 70b277
#else
Packit 70b277
typedef signed char flex_int8_t;
Packit 70b277
typedef short int flex_int16_t;
Packit 70b277
typedef int flex_int32_t;
Packit 70b277
typedef unsigned char flex_uint8_t; 
Packit 70b277
typedef unsigned short int flex_uint16_t;
Packit 70b277
typedef unsigned int flex_uint32_t;
Packit 70b277
#endif /* ! C99 */
Packit 70b277
Packit 70b277
/* Limits of integral types. */
Packit 70b277
#ifndef INT8_MIN
Packit 70b277
#define INT8_MIN               (-128)
Packit 70b277
#endif
Packit 70b277
#ifndef INT16_MIN
Packit 70b277
#define INT16_MIN              (-32767-1)
Packit 70b277
#endif
Packit 70b277
#ifndef INT32_MIN
Packit 70b277
#define INT32_MIN              (-2147483647-1)
Packit 70b277
#endif
Packit 70b277
#ifndef INT8_MAX
Packit 70b277
#define INT8_MAX               (127)
Packit 70b277
#endif
Packit 70b277
#ifndef INT16_MAX
Packit 70b277
#define INT16_MAX              (32767)
Packit 70b277
#endif
Packit 70b277
#ifndef INT32_MAX
Packit 70b277
#define INT32_MAX              (2147483647)
Packit 70b277
#endif
Packit 70b277
#ifndef UINT8_MAX
Packit 70b277
#define UINT8_MAX              (255U)
Packit 70b277
#endif
Packit 70b277
#ifndef UINT16_MAX
Packit 70b277
#define UINT16_MAX             (65535U)
Packit 70b277
#endif
Packit 70b277
#ifndef UINT32_MAX
Packit 70b277
#define UINT32_MAX             (4294967295U)
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#endif /* ! FLEXINT_H */
Packit 70b277
Packit 70b277
#ifdef __cplusplus
Packit 70b277
Packit 70b277
/* The "const" storage-class-modifier is valid. */
Packit 70b277
#define YY_USE_CONST
Packit 70b277
Packit 70b277
#else	/* ! __cplusplus */
Packit 70b277
Packit 70b277
/* C99 requires __STDC__ to be defined as 1. */
Packit 70b277
#if defined (__STDC__)
Packit 70b277
Packit 70b277
#define YY_USE_CONST
Packit 70b277
Packit 70b277
#endif	/* defined (__STDC__) */
Packit 70b277
#endif	/* ! __cplusplus */
Packit 70b277
Packit 70b277
#ifdef YY_USE_CONST
Packit 70b277
#define yyconst const
Packit 70b277
#else
Packit 70b277
#define yyconst
Packit 70b277
#endif
Packit 70b277
Packit 70b277
/* Returned upon end-of-file. */
Packit 70b277
#define YY_NULL 0
Packit 70b277
Packit 70b277
/* Promotes a possibly negative, possibly signed char to an unsigned
Packit 70b277
 * integer for use as an array index.  If the signed char is negative,
Packit 70b277
 * we want to instead treat it as an 8-bit unsigned char, hence the
Packit 70b277
 * double cast.
Packit 70b277
 */
Packit 70b277
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
Packit 70b277
Packit 70b277
/* Enter a start condition.  This macro really ought to take a parameter,
Packit 70b277
 * but we do it the disgusting crufty way forced on us by the ()-less
Packit 70b277
 * definition of BEGIN.
Packit 70b277
 */
Packit 70b277
#define BEGIN (yy_start) = 1 + 2 *
Packit 70b277
Packit 70b277
/* Translate the current start state into a value that can be later handed
Packit 70b277
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
Packit 70b277
 * compatibility.
Packit 70b277
 */
Packit 70b277
#define YY_START (((yy_start) - 1) / 2)
Packit 70b277
#define YYSTATE YY_START
Packit 70b277
Packit 70b277
/* Action number for EOF rule of a given start state. */
Packit 70b277
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
Packit 70b277
Packit 70b277
/* Special action meaning "start processing a new file". */
Packit 70b277
#define YY_NEW_FILE yyrestart(yyin  )
Packit 70b277
Packit 70b277
#define YY_END_OF_BUFFER_CHAR 0
Packit 70b277
Packit 70b277
/* Size of default input buffer. */
Packit 70b277
#ifndef YY_BUF_SIZE
Packit 70b277
#define YY_BUF_SIZE 16384
Packit 70b277
#endif
Packit 70b277
Packit 70b277
/* The state buf must be large enough to hold one state per character in the main buffer.
Packit 70b277
 */
Packit 70b277
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
Packit 70b277
Packit 70b277
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
Packit 70b277
#define YY_TYPEDEF_YY_BUFFER_STATE
Packit 70b277
typedef struct yy_buffer_state *YY_BUFFER_STATE;
Packit 70b277
#endif
Packit 70b277
Packit 70b277
extern int yyleng;
Packit 70b277
Packit 70b277
extern FILE *yyin, *yyout;
Packit 70b277
Packit 70b277
#define EOB_ACT_CONTINUE_SCAN 0
Packit 70b277
#define EOB_ACT_END_OF_FILE 1
Packit 70b277
#define EOB_ACT_LAST_MATCH 2
Packit 70b277
Packit 70b277
    #define YY_LESS_LINENO(n)
Packit 70b277
    
Packit 70b277
/* Return all but the first "n" matched characters back to the input stream. */
Packit 70b277
#define yyless(n) \
Packit 70b277
	do \
Packit 70b277
		{ \
Packit 70b277
		/* Undo effects of setting up yytext. */ \
Packit 70b277
        int yyless_macro_arg = (n); \
Packit 70b277
        YY_LESS_LINENO(yyless_macro_arg);\
Packit 70b277
		*yy_cp = (yy_hold_char); \
Packit 70b277
		YY_RESTORE_YY_MORE_OFFSET \
Packit 70b277
		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
Packit 70b277
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
Packit 70b277
		} \
Packit 70b277
	while ( 0 )
Packit 70b277
Packit 70b277
#define unput(c) yyunput( c, (yytext_ptr)  )
Packit 70b277
Packit 70b277
#ifndef YY_TYPEDEF_YY_SIZE_T
Packit 70b277
#define YY_TYPEDEF_YY_SIZE_T
Packit 70b277
typedef size_t yy_size_t;
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#ifndef YY_STRUCT_YY_BUFFER_STATE
Packit 70b277
#define YY_STRUCT_YY_BUFFER_STATE
Packit 70b277
struct yy_buffer_state
Packit 70b277
	{
Packit 70b277
	FILE *yy_input_file;
Packit 70b277
Packit 70b277
	char *yy_ch_buf;		/* input buffer */
Packit 70b277
	char *yy_buf_pos;		/* current position in input buffer */
Packit 70b277
Packit 70b277
	/* Size of input buffer in bytes, not including room for EOB
Packit 70b277
	 * characters.
Packit 70b277
	 */
Packit 70b277
	yy_size_t yy_buf_size;
Packit 70b277
Packit 70b277
	/* Number of characters read into yy_ch_buf, not including EOB
Packit 70b277
	 * characters.
Packit 70b277
	 */
Packit 70b277
	int yy_n_chars;
Packit 70b277
Packit 70b277
	/* Whether we "own" the buffer - i.e., we know we created it,
Packit 70b277
	 * and can realloc() it to grow it, and should free() it to
Packit 70b277
	 * delete it.
Packit 70b277
	 */
Packit 70b277
	int yy_is_our_buffer;
Packit 70b277
Packit 70b277
	/* Whether this is an "interactive" input source; if so, and
Packit 70b277
	 * if we're using stdio for input, then we want to use getc()
Packit 70b277
	 * instead of fread(), to make sure we stop fetching input after
Packit 70b277
	 * each newline.
Packit 70b277
	 */
Packit 70b277
	int yy_is_interactive;
Packit 70b277
Packit 70b277
	/* Whether we're considered to be at the beginning of a line.
Packit 70b277
	 * If so, '^' rules will be active on the next match, otherwise
Packit 70b277
	 * not.
Packit 70b277
	 */
Packit 70b277
	int yy_at_bol;
Packit 70b277
Packit 70b277
    int yy_bs_lineno; /**< The line count. */
Packit 70b277
    int yy_bs_column; /**< The column count. */
Packit 70b277
    
Packit 70b277
	/* Whether to try to fill the input buffer when we reach the
Packit 70b277
	 * end of it.
Packit 70b277
	 */
Packit 70b277
	int yy_fill_buffer;
Packit 70b277
Packit 70b277
	int yy_buffer_status;
Packit 70b277
Packit 70b277
#define YY_BUFFER_NEW 0
Packit 70b277
#define YY_BUFFER_NORMAL 1
Packit 70b277
	/* When an EOF's been seen but there's still some text to process
Packit 70b277
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
Packit 70b277
	 * shouldn't try reading from the input source any more.  We might
Packit 70b277
	 * still have a bunch of tokens to match, though, because of
Packit 70b277
	 * possible backing-up.
Packit 70b277
	 *
Packit 70b277
	 * When we actually see the EOF, we change the status to "new"
Packit 70b277
	 * (via yyrestart()), so that the user can continue scanning by
Packit 70b277
	 * just pointing yyin at a new input file.
Packit 70b277
	 */
Packit 70b277
#define YY_BUFFER_EOF_PENDING 2
Packit 70b277
Packit 70b277
	};
Packit 70b277
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
Packit 70b277
Packit 70b277
/* Stack of input buffers. */
Packit 70b277
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
Packit 70b277
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
Packit 70b277
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
Packit 70b277
Packit 70b277
/* We provide macros for accessing buffer states in case in the
Packit 70b277
 * future we want to put the buffer states in a more general
Packit 70b277
 * "scanner state".
Packit 70b277
 *
Packit 70b277
 * Returns the top of the stack, or NULL.
Packit 70b277
 */
Packit 70b277
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
Packit 70b277
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
Packit 70b277
                          : NULL)
Packit 70b277
Packit 70b277
/* Same as previous macro, but useful when we know that the buffer stack is not
Packit 70b277
 * NULL or when we need an lvalue. For internal use only.
Packit 70b277
 */
Packit 70b277
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
Packit 70b277
Packit 70b277
/* yy_hold_char holds the character lost when yytext is formed. */
Packit 70b277
static char yy_hold_char;
Packit 70b277
static int yy_n_chars;		/* number of characters read into yy_ch_buf */
Packit 70b277
int yyleng;
Packit 70b277
Packit 70b277
/* Points to current character in buffer. */
Packit 70b277
static char *yy_c_buf_p = (char *) 0;
Packit 70b277
static int yy_init = 0;		/* whether we need to initialize */
Packit 70b277
static int yy_start = 0;	/* start state number */
Packit 70b277
Packit 70b277
/* Flag which is used to allow yywrap()'s to do buffer switches
Packit 70b277
 * instead of setting up a fresh yyin.  A bit of a hack ...
Packit 70b277
 */
Packit 70b277
static int yy_did_buffer_switch_on_eof;
Packit 70b277
Packit 70b277
void yyrestart (FILE *input_file  );
Packit 70b277
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
Packit 70b277
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
Packit 70b277
void yy_delete_buffer (YY_BUFFER_STATE b  );
Packit 70b277
void yy_flush_buffer (YY_BUFFER_STATE b  );
Packit 70b277
void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
Packit 70b277
void yypop_buffer_state (void );
Packit 70b277
Packit 70b277
static void yyensure_buffer_stack (void );
Packit 70b277
static void yy_load_buffer_state (void );
Packit 70b277
static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
Packit 70b277
Packit 70b277
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
Packit 70b277
Packit 70b277
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
Packit 70b277
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
Packit 70b277
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
Packit 70b277
Packit 70b277
void *yyalloc (yy_size_t  );
Packit 70b277
void *yyrealloc (void *,yy_size_t  );
Packit 70b277
void yyfree (void *  );
Packit 70b277
Packit 70b277
#define yy_new_buffer yy_create_buffer
Packit 70b277
Packit 70b277
#define yy_set_interactive(is_interactive) \
Packit 70b277
	{ \
Packit 70b277
	if ( ! YY_CURRENT_BUFFER ){ \
Packit 70b277
        yyensure_buffer_stack (); \
Packit 70b277
		YY_CURRENT_BUFFER_LVALUE =    \
Packit 70b277
            yy_create_buffer(yyin,YY_BUF_SIZE ); \
Packit 70b277
	} \
Packit 70b277
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
Packit 70b277
	}
Packit 70b277
Packit 70b277
#define yy_set_bol(at_bol) \
Packit 70b277
	{ \
Packit 70b277
	if ( ! YY_CURRENT_BUFFER ){\
Packit 70b277
        yyensure_buffer_stack (); \
Packit 70b277
		YY_CURRENT_BUFFER_LVALUE =    \
Packit 70b277
            yy_create_buffer(yyin,YY_BUF_SIZE ); \
Packit 70b277
	} \
Packit 70b277
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
Packit 70b277
	}
Packit 70b277
Packit 70b277
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
Packit 70b277
Packit 70b277
/* Begin user sect3 */
Packit 70b277
Packit 70b277
typedef unsigned char YY_CHAR;
Packit 70b277
Packit 70b277
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
Packit 70b277
Packit 70b277
typedef int yy_state_type;
Packit 70b277
Packit 70b277
extern int yylineno;
Packit 70b277
Packit 70b277
int yylineno = 1;
Packit 70b277
Packit 70b277
extern char *yytext;
Packit 70b277
#define yytext_ptr yytext
Packit 70b277
Packit 70b277
static yy_state_type yy_get_previous_state (void );
Packit 70b277
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
Packit 70b277
static int yy_get_next_buffer (void );
Packit 70b277
#if defined(__GNUC__) && __GNUC__ >= 3
Packit 70b277
__attribute__((__noreturn__))
Packit 70b277
#endif
Packit 70b277
static void yy_fatal_error (yyconst char msg[]  );
Packit 70b277
Packit 70b277
/* Done after the current pattern has been matched and before the
Packit 70b277
 * corresponding action - sets up yytext.
Packit 70b277
 */
Packit 70b277
#define YY_DO_BEFORE_ACTION \
Packit 70b277
	(yytext_ptr) = yy_bp; \
Packit 70b277
	yyleng = (size_t) (yy_cp - yy_bp); \
Packit 70b277
	(yy_hold_char) = *yy_cp; \
Packit 70b277
	*yy_cp = '\0'; \
Packit 70b277
	(yy_c_buf_p) = yy_cp;
Packit 70b277
Packit 70b277
#define YY_NUM_RULES 46
Packit 70b277
#define YY_END_OF_BUFFER 47
Packit 70b277
/* This struct is not used in this scanner,
Packit 70b277
   but its presence is necessary. */
Packit 70b277
struct yy_trans_info
Packit 70b277
	{
Packit 70b277
	flex_int32_t yy_verify;
Packit 70b277
	flex_int32_t yy_nxt;
Packit 70b277
	};
Packit 70b277
static yyconst flex_int16_t yy_accept[316] =
Packit 70b277
    {   0,
Packit 70b277
        0,    0,    2,    2,   47,   45,   40,   38,   32,   45,
Packit 70b277
        1,   33,   33,   29,   33,   29,   29,   28,   33,   44,
Packit 70b277
       36,   34,   36,   45,   29,   42,   42,   42,   42,   42,
Packit 70b277
       42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
Packit 70b277
       42,   42,   45,    2,    2,    3,    2,    2,    1,    2,
Packit 70b277
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
Packit 70b277
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
Packit 70b277
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
Packit 70b277
        2,   40,   36,    0,   43,   34,   30,   37,   44,    0,
Packit 70b277
       41,   44,   44,    0,   35,   39,   42,   42,   42,   42,
Packit 70b277
Packit 70b277
       42,   42,   42,   42,   42,   42,   10,   42,   42,   42,
Packit 70b277
       42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
Packit 70b277
       31,    2,    2,    2,    2,    2,    2,    2,    2,    2,
Packit 70b277
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
Packit 70b277
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
Packit 70b277
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
Packit 70b277
        2,   44,    0,    0,   44,    0,   42,   42,   42,   42,
Packit 70b277
       42,    9,   42,   42,   42,   42,   42,   42,   42,   42,
Packit 70b277
       42,   42,   42,   42,   42,   42,   42,   42,   42,    2,
Packit 70b277
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
Packit 70b277
Packit 70b277
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
Packit 70b277
        2,    2,    2,    2,    2,    2,   16,   42,   42,   42,
Packit 70b277
       17,   20,   42,   42,   21,   42,   42,   42,   42,    6,
Packit 70b277
       42,   18,   42,   42,   12,   22,   42,   42,    2,    2,
Packit 70b277
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
Packit 70b277
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
Packit 70b277
        5,   42,   42,   42,   14,   42,   42,   15,   26,   42,
Packit 70b277
       42,   13,   42,   11,    2,    2,    2,    2,    2,    2,
Packit 70b277
        2,    2,    2,    2,    2,    2,    2,    2,   42,    4,
Packit 70b277
       42,    7,   27,   19,    8,   42,    2,    2,    2,    2,
Packit 70b277
Packit 70b277
        2,    2,    2,    2,   42,   23,   42,    2,    2,    2,
Packit 70b277
       25,   24,    2,    2,    0
Packit 70b277
    } ;
Packit 70b277
Packit 70b277
static yyconst flex_int32_t yy_ec[256] =
Packit 70b277
    {   0,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    2,    4,    5,    6,    1,    7,    8,    1,    9,
Packit 70b277
       10,   11,   12,   13,   14,   15,   16,   17,   17,   17,
Packit 70b277
       17,   17,   17,   17,   17,   17,   17,    1,   18,   19,
Packit 70b277
       20,   21,    1,    1,   22,   22,   22,   22,   22,   22,
Packit 70b277
       22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
Packit 70b277
       22,   22,   22,   22,   22,   22,   22,   22,   22,   22,
Packit 70b277
       23,   24,   25,   26,   27,    1,   28,   29,   30,   31,
Packit 70b277
Packit 70b277
       32,   33,   34,   35,   36,   37,   38,   39,   40,   41,
Packit 70b277
       42,   43,   44,   45,   46,   47,   48,   49,   50,   37,
Packit 70b277
       51,   37,   52,   53,   54,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1
Packit 70b277
    } ;
Packit 70b277
Packit 70b277
static yyconst flex_int32_t yy_meta[55] =
Packit 70b277
    {   0,
Packit 70b277
        1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    3,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    3,    3,    3,    3,
Packit 70b277
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
Packit 70b277
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
Packit 70b277
        3,    1,    1,    1
Packit 70b277
    } ;
Packit 70b277
Packit 70b277
static yyconst flex_int16_t yy_base[320] =
Packit 70b277
    {   0,
Packit 70b277
        0,    0,   54,    0,  553,  554,  550,  554,  531,  545,
Packit 70b277
      554,  529,  540,  554,  527,   97,   96,   96,  101,  107,
Packit 70b277
      526,  116,  525,  541,  523,  494,  496,  498,  507,  499,
Packit 70b277
      495,    0,   83,  104,  107,  507,  490,  486,  106,   96,
Packit 70b277
      491,  113,  479,    0,  529,  554,  510,  141,    0,  509,
Packit 70b277
      520,    0,  507,  133,  135,  130,  139,  141,  506,  150,
Packit 70b277
      505,  521,  503,  160,  123,  125,  137,  112,  130,  474,
Packit 70b277
      184,  185,  187,  188,  134,  473,  193,  183,  132,  194,
Packit 70b277
      467,  517,  554,  513,  554,  554,  554,  554,  221,  514,
Packit 70b277
      554,  222,  232,  513,  554,  554,    0,  468,  482,  472,
Packit 70b277
Packit 70b277
      479,  465,  465,  470,  462,  479,    0,  460,  464,  464,
Packit 70b277
      475,  466,  465,  459,  206,  471,  453,  461,  451,  459,
Packit 70b277
      554,    0,  492,    0,  178,    0,    0,    0,    0,  233,
Packit 70b277
      490,    0,  241,  244,  489,    0,  443,   67,  192,  189,
Packit 70b277
      219,  138,  203,  221,  180,  234,  442,  224,  223,  233,
Packit 70b277
      246,  239,  240,  236,  250,  251,  235,  253,  245,  255,
Packit 70b277
        0,  278,  486,  287,  288,  485,  445,  458,  438,  448,
Packit 70b277
      451,    0,  435,  434,  434,  432,  444,  441,  430,  434,
Packit 70b277
      427,  442,  441,  423,  431,  422,  437,  422,  427,  291,
Packit 70b277
      462,  297,  461,  244,  268,  259,  281,  286,  415,  275,
Packit 70b277
Packit 70b277
      277,  280,  283,  293,  284,  287,  295,  290,  308,  309,
Packit 70b277
      414,  303,  297,  315,  302,  310,    0,  423,  424,  418,
Packit 70b277
        0,    0,  416,  425,    0,  409,  408,  422,  406,    0,
Packit 70b277
      410,    0,  406,  418,    0,    0,  421,  416,  399,  314,
Packit 70b277
      312,  313,  398,  397,  311,  323,  396,  317,  319,  336,
Packit 70b277
      322,  395,  330,  394,  328,  342,  393,  392,  347,  345,
Packit 70b277
        0,  398,  406,  392,    0,  401,  389,    0,    0,  394,
Packit 70b277
      392,    0,  391,    0,  383,  338,  348,  337,  382,  346,
Packit 70b277
      341,  381,  380,  343,  351,  379,  356,  378,  373,    0,
Packit 70b277
      364,    0,    0,    0,    0,  367,  365,  364,  350,  363,
Packit 70b277
Packit 70b277
      362,  361,  359,  355,  374,    0,  337,  368,  237,  357,
Packit 70b277
        0,    0,  168,  127,  554,  416,  122,  419,  422
Packit 70b277
    } ;
Packit 70b277
Packit 70b277
static yyconst flex_int16_t yy_def[320] =
Packit 70b277
    {   0,
Packit 70b277
      315,    1,  315,    3,  315,  315,  315,  315,  315,  316,
Packit 70b277
      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
Packit 70b277
      315,  315,  315,  315,  315,  317,  317,  317,  317,  317,
Packit 70b277
      317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
Packit 70b277
      317,  317,  315,  318,  318,  315,  318,  319,  318,  318,
Packit 70b277
      318,  318,  318,  318,  318,  318,  318,  318,  318,  318,
Packit 70b277
      318,  318,  318,  318,   64,   64,   64,   64,   64,   64,
Packit 70b277
       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
Packit 70b277
      318,  315,  315,  316,  315,  315,  315,  315,  315,  315,
Packit 70b277
      315,  315,  315,  315,  315,  315,  317,  317,  317,  317,
Packit 70b277
Packit 70b277
      317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
Packit 70b277
      317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
Packit 70b277
      315,  318,  318,  318,  319,  318,  318,  318,  318,  318,
Packit 70b277
      318,  318,  318,  318,  318,  318,   64,   64,   64,   64,
Packit 70b277
       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
Packit 70b277
       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
Packit 70b277
      318,  315,  315,  315,  315,  315,  317,  317,  317,  317,
Packit 70b277
      317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
Packit 70b277
      317,  317,  317,  317,  317,  317,  317,  317,  317,  318,
Packit 70b277
      318,  318,  318,   64,   64,   64,   64,   64,   64,   64,
Packit 70b277
Packit 70b277
       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
Packit 70b277
       64,   64,   64,   64,   64,   64,  317,  317,  317,  317,
Packit 70b277
      317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
Packit 70b277
      317,  317,  317,  317,  317,  317,  317,  317,   64,   64,
Packit 70b277
       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
Packit 70b277
       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
Packit 70b277
      317,  317,  317,  317,  317,  317,  317,  317,  317,  317,
Packit 70b277
      317,  317,  317,  317,   64,   64,   64,   64,   64,   64,
Packit 70b277
       64,   64,   64,   64,   64,   64,   64,   64,  317,  317,
Packit 70b277
      317,  317,  317,  317,  317,  317,   64,   64,   64,   64,
Packit 70b277
Packit 70b277
       64,   64,   64,   64,  317,  317,  317,   64,   64,   64,
Packit 70b277
      317,  317,   64,   64,    0,  315,  315,  315,  315
Packit 70b277
    } ;
Packit 70b277
Packit 70b277
static yyconst flex_int16_t yy_nxt[609] =
Packit 70b277
    {   0,
Packit 70b277
        6,    7,    8,    9,   10,   11,   12,   13,   14,   14,
Packit 70b277
       15,   16,   14,   17,   18,   19,   20,   14,   21,   22,
Packit 70b277
       23,   20,   14,   24,   14,   25,    6,   26,   27,   28,
Packit 70b277
       29,   30,   31,   32,   33,   34,   32,   32,   35,   32,
Packit 70b277
       32,   36,   37,   38,   39,   40,   32,   32,   41,   42,
Packit 70b277
       32,   14,   43,   14,   44,   45,   46,   47,   48,   49,
Packit 70b277
       50,   51,   52,   52,   53,   54,   52,   55,   56,   57,
Packit 70b277
       58,   52,   59,   60,   61,   58,   52,   62,   52,   63,
Packit 70b277
       44,   64,   65,   66,   67,   68,   69,   70,   71,   72,
Packit 70b277
       70,   70,   73,   70,   70,   74,   75,   76,   77,   78,
Packit 70b277
Packit 70b277
       70,   70,   79,   80,   70,   52,   81,   52,   88,   88,
Packit 70b277
      104,   91,   89,  194,  137,   86,   86,   89,  105,   90,
Packit 70b277
       86,   92,   95,   93,   97,  116,   95,   95,   93,   95,
Packit 70b277
       94,   95,  106,  114,  108,   83,  107,  115,  109,  117,
Packit 70b277
      119,   95,  110,   84,  129,  126,  130,  120,  129,  132,
Packit 70b277
      142,  130,  127,  131,  127,  133,  136,  134,  127,  137,
Packit 70b277
      136,  136,  134,  136,  135,  136,  140,  139,  141,  124,
Packit 70b277
      137,  143,  137,  158,  137,  136,  137,  137,  152,  137,
Packit 70b277
       84,  137,  126,  198,  137,  137,  137,  137,  137,  137,
Packit 70b277
      137,  137,  137,  137,  137,  137,  137,  137,  137,  137,
Packit 70b277
Packit 70b277
      137,  137,  137,  137,  137,  137,  137,  138,  137,  137,
Packit 70b277
      137,  144,  156,  146,  148,  137,  151,  147,  149,  145,
Packit 70b277
      154,  159,  150,  195,  155,  201,  157,  137,  160,  196,
Packit 70b277
      137,  137,  137,  183,  137,  137,  137,  162,  165,  137,
Packit 70b277
      137,  137,  162,  165,  163,  166,   92,  199,   93,  190,
Packit 70b277
      137,  197,  184,   93,  190,   94,  191,  192,  133,  200,
Packit 70b277
      134,  202,  192,  204,  193,  134,  137,  135,  137,  203,
Packit 70b277
      137,  137,  205,  206,  207,  208,  209,  210,  212,  213,
Packit 70b277
      137,  137,  137,  137,  137,  239,  137,  137,  214,  215,
Packit 70b277
      216,  137,  137,  137,  162,  240,  211,  137,  137,  162,
Packit 70b277
Packit 70b277
      137,  163,  137,   89,  165,  241,  137,  190,   89,  165,
Packit 70b277
       90,  166,  190,  192,  191,  137,  242,  243,  192,  249,
Packit 70b277
      193,  244,  137,  245,  137,  246,  248,  137,  137,  247,
Packit 70b277
      137,  137,  250,  137,  137,  251,  252,  137,  253,  254,
Packit 70b277
      137,  256,  137,  257,  137,  258,  259,  276,  260,  137,
Packit 70b277
      137,  275,  278,  277,  279,  137,  137,  137,  137,  137,
Packit 70b277
      137,  137,  137,  280,  137,  281,  137,  282,  283,  137,
Packit 70b277
      137,  284,  285,  286,  287,  137,  288,  137,  297,  298,
Packit 70b277
      300,  299,  302,  137,  137,  137,  301,  312,  137,  137,
Packit 70b277
      137,  303,  137,  137,  137,  137,  304,  137,  137,  313,
Packit 70b277
Packit 70b277
      309,  310,  137,  137,  137,  311,  137,  314,  137,  137,
Packit 70b277
      137,  137,  308,  307,  306,  137,   84,   84,   84,  122,
Packit 70b277
      305,  122,  125,  125,  125,  137,  137,  137,  137,  137,
Packit 70b277
      137,  296,  295,  294,  293,  292,  291,  290,  289,  137,
Packit 70b277
      137,  137,  137,  137,  137,  137,  137,  274,  273,  272,
Packit 70b277
      271,  270,  269,  268,  267,  266,  265,  264,  263,  262,
Packit 70b277
      261,  255,  137,  165,  162,  238,  237,  236,  235,  234,
Packit 70b277
      233,  232,  231,  230,  229,  228,  227,  226,  225,  224,
Packit 70b277
      223,  222,  221,  220,  219,  218,  217,  165,  162,  137,
Packit 70b277
      137,   93,  164,  123,  189,  188,  187,  186,  185,  182,
Packit 70b277
Packit 70b277
      181,  180,  179,  178,  177,  176,  175,  174,  173,  172,
Packit 70b277
      171,  170,  169,  168,  167,   93,  164,   85,   82,  161,
Packit 70b277
      153,  137,  127,   96,  124,  124,  127,  128,  127,  124,
Packit 70b277
      123,  121,  118,  113,  112,  111,  103,  102,  101,  100,
Packit 70b277
       99,   98,   86,   96,   83,   83,   86,   87,   86,   85,
Packit 70b277
       83,   82,  315,    5,  315,  315,  315,  315,  315,  315,
Packit 70b277
      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
Packit 70b277
      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
Packit 70b277
      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
Packit 70b277
      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
Packit 70b277
Packit 70b277
      315,  315,  315,  315,  315,  315,  315,  315
Packit 70b277
    } ;
Packit 70b277
Packit 70b277
static yyconst flex_int16_t yy_chk[609] =
Packit 70b277
    {   0,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
Packit 70b277
        1,    1,    1,    1,    3,    3,    3,    3,    3,    3,
Packit 70b277
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
Packit 70b277
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
Packit 70b277
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
Packit 70b277
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
Packit 70b277
Packit 70b277
        3,    3,    3,    3,    3,    3,    3,    3,   16,   17,
Packit 70b277
       33,   19,   18,  138,  138,   17,   16,   18,   33,   18,
Packit 70b277
       19,   20,   22,   20,  317,   40,   22,   22,   20,   22,
Packit 70b277
       20,   22,   34,   39,   35,   22,   34,   39,   35,   40,
Packit 70b277
       42,   22,   35,   48,   54,   48,   56,   42,   55,   57,
Packit 70b277
       68,   56,   54,   56,   55,   58,   60,   58,   57,   68,
Packit 70b277
       60,   60,   58,   60,   58,   60,   66,   65,   67,   60,
Packit 70b277
       65,   69,   66,   79,  314,   60,   64,   69,   75,   79,
Packit 70b277
      125,   75,  125,  142,   67,  142,   64,   64,   64,   64,
Packit 70b277
       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
Packit 70b277
Packit 70b277
       64,   64,   64,   64,   64,   64,   64,   64,   64,   64,
Packit 70b277
       64,   71,   78,   72,   73,  313,   74,   72,   73,   71,
Packit 70b277
       77,   80,   73,  139,   77,  145,   78,  145,   80,  140,
Packit 70b277
       78,   71,   72,  115,   73,   74,  140,   89,   92,  139,
Packit 70b277
       77,   80,   89,   92,   89,   92,   93,  143,   93,  130,
Packit 70b277
      143,  141,  115,   93,  130,   93,  130,  133,  134,  144,
Packit 70b277
      134,  146,  133,  149,  133,  134,  141,  134,  144,  148,
Packit 70b277
      149,  148,  150,  151,  152,  153,  154,  155,  156,  157,
Packit 70b277
      150,  146,  157,  154,  309,  194,  152,  153,  158,  159,
Packit 70b277
      160,  194,  159,  151,  162,  195,  155,  155,  156,  162,
Packit 70b277
Packit 70b277
      158,  162,  160,  164,  165,  196,  196,  190,  164,  165,
Packit 70b277
      164,  165,  190,  192,  190,  195,  197,  198,  192,  205,
Packit 70b277
      192,  200,  200,  201,  201,  202,  204,  202,  197,  203,
Packit 70b277
      203,  205,  206,  198,  206,  207,  208,  208,  209,  210,
Packit 70b277
      204,  212,  207,  213,  213,  214,  215,  241,  216,  215,
Packit 70b277
      212,  240,  245,  242,  246,  209,  210,  216,  245,  241,
Packit 70b277
      242,  240,  214,  248,  248,  249,  249,  250,  251,  251,
Packit 70b277
      246,  253,  255,  256,  259,  255,  260,  253,  276,  277,
Packit 70b277
      280,  278,  284,  250,  278,  276,  281,  307,  281,  256,
Packit 70b277
      284,  285,  260,  280,  259,  277,  287,  299,  285,  308,
Packit 70b277
Packit 70b277
      299,  304,  304,  287,  310,  305,  303,  310,  302,  301,
Packit 70b277
      300,  298,  297,  296,  291,  308,  316,  316,  316,  318,
Packit 70b277
      289,  318,  319,  319,  319,  288,  286,  283,  282,  279,
Packit 70b277
      275,  273,  271,  270,  267,  266,  264,  263,  262,  258,
Packit 70b277
      257,  254,  252,  247,  244,  243,  239,  238,  237,  234,
Packit 70b277
      233,  231,  229,  228,  227,  226,  224,  223,  220,  219,
Packit 70b277
      218,  211,  199,  193,  191,  189,  188,  187,  186,  185,
Packit 70b277
      184,  183,  182,  181,  180,  179,  178,  177,  176,  175,
Packit 70b277
      174,  173,  171,  170,  169,  168,  167,  166,  163,  147,
Packit 70b277
      137,  135,  131,  123,  120,  119,  118,  117,  116,  114,
Packit 70b277
Packit 70b277
      113,  112,  111,  110,  109,  108,  106,  105,  104,  103,
Packit 70b277
      102,  101,  100,   99,   98,   94,   90,   84,   82,   81,
Packit 70b277
       76,   70,   63,   62,   61,   59,   53,   51,   50,   47,
Packit 70b277
       45,   43,   41,   38,   37,   36,   31,   30,   29,   28,
Packit 70b277
       27,   26,   25,   24,   23,   21,   15,   13,   12,   10,
Packit 70b277
        9,    7,    5,  315,  315,  315,  315,  315,  315,  315,
Packit 70b277
      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
Packit 70b277
      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
Packit 70b277
      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
Packit 70b277
      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
Packit 70b277
Packit 70b277
      315,  315,  315,  315,  315,  315,  315,  315
Packit 70b277
    } ;
Packit 70b277
Packit 70b277
static yy_state_type yy_last_accepting_state;
Packit 70b277
static char *yy_last_accepting_cpos;
Packit 70b277
Packit 70b277
extern int yy_flex_debug;
Packit 70b277
int yy_flex_debug = 0;
Packit 70b277
Packit 70b277
/* The intent behind this definition is that it'll catch
Packit 70b277
 * any uses of REJECT which flex missed.
Packit 70b277
 */
Packit 70b277
#define REJECT reject_used_but_not_detected
Packit 70b277
#define yymore() yymore_used_but_not_detected
Packit 70b277
#define YY_MORE_ADJ 0
Packit 70b277
#define YY_RESTORE_YY_MORE_OFFSET
Packit 70b277
char *yytext;
Packit 70b277
#line 1 "../../bc/scan.l"
Packit 70b277
/*  This file is part of GNU bc.
Packit 70b277
Packit 70b277
    Copyright (C) 1991-1994, 1997, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
Packit 70b277
Packit 70b277
    This program is free software; you can redistribute it and/or modify
Packit 70b277
    it under the terms of the GNU General Public License as published by
Packit 70b277
    the Free Software Foundation; either version 3 of the License , or
Packit 70b277
    (at your option) any later version.
Packit 70b277
Packit 70b277
    This program is distributed in the hope that it will be useful,
Packit 70b277
    but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 70b277
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 70b277
    GNU General Public License for more details.
Packit 70b277
Packit 70b277
    You should have received a copy of the GNU General Public License
Packit 70b277
    along with this program; see the file COPYING.  If not, see
Packit 70b277
    <http://www.gnu.org/licenses>.
Packit 70b277
Packit 70b277
    You may contact the author by:
Packit 70b277
       e-mail:  philnelson@acm.org
Packit 70b277
      us-mail:  Philip A. Nelson
Packit 70b277
                Computer Science Department, 9062
Packit 70b277
                Western Washington University
Packit 70b277
                Bellingham, WA 98226-9062
Packit 70b277
       
Packit 70b277
*************************************************************************/
Packit 70b277
/* scan.l: the (f)lex description file for the scanner. */
Packit 70b277
#line 31 "../../bc/scan.l"
Packit 70b277
Packit 70b277
#include "bcdefs.h"
Packit 70b277
#include "bc.h"
Packit 70b277
#include "global.h"
Packit 70b277
#include "proto.h"
Packit 70b277
#include <errno.h>
Packit 70b277
Packit 70b277
/* Using flex, we can ask for a smaller input buffer.  With lex, this
Packit 70b277
   does nothing! */
Packit 70b277
Packit 70b277
#ifdef SMALL_BUF
Packit 70b277
#undef YY_READ_BUF_SIZE
Packit 70b277
#define YY_READ_BUF_SIZE 512
Packit 70b277
#endif
Packit 70b277
Packit 70b277
/* Force . as last for now. */
Packit 70b277
#define DOT_IS_LAST
Packit 70b277
Packit 70b277
/* We want to define our own yywrap. */
Packit 70b277
#undef yywrap
Packit 70b277
int yywrap (void);
Packit 70b277
Packit 70b277
#if defined(LIBEDIT)
Packit 70b277
/* Support for the BSD libedit with history for
Packit 70b277
   nicer input on the interactive part of input. */
Packit 70b277
Packit 70b277
#include <histedit.h>
Packit 70b277
Packit 70b277
/* Have input call the following function. */
Packit 70b277
#undef  YY_INPUT
Packit 70b277
#define YY_INPUT(buf,result,max_size) \
Packit 70b277
		bcel_input((char *)buf, (yy_size_t *)&result, max_size)
Packit 70b277
Packit 70b277
/* Variables to help interface editline with bc. */
Packit 70b277
static const char *bcel_line = (char *)NULL;
Packit 70b277
static int   bcel_len = 0;
Packit 70b277
Packit 70b277
/* bcel_input puts upto MAX characters into BUF with the number put in
Packit 70b277
   BUF placed in *RESULT.  If the yy input file is the same as
Packit 70b277
   stdin, use editline.  Otherwise, just read it.
Packit 70b277
*/
Packit 70b277
Packit 70b277
static void
Packit 70b277
bcel_input (char *buf, yy_size_t  *result, int max)
Packit 70b277
{
Packit 70b277
  ssize_t rdsize;
Packit 70b277
  if (!edit || yyin != stdin)
Packit 70b277
    {
Packit 70b277
      while ( (rdsize = read( fileno(yyin), buf, max )) < 0 )
Packit 70b277
        if (errno != EINTR)
Packit 70b277
	  {
Packit 70b277
	    yyerror( "read() in flex scanner failed" );
Packit 70b277
	    bc_exit (1);
Packit 70b277
	  }
Packit 70b277
      *result = (yy_size_t) rdsize;
Packit 70b277
      return;
Packit 70b277
    }
Packit 70b277
Packit 70b277
  /* Do we need a new string? */
Packit 70b277
  if (bcel_len == 0)
Packit 70b277
    {
Packit 70b277
      bcel_line = el_gets(edit, &bcel_len);
Packit 70b277
      if (bcel_line == NULL) {
Packit 70b277
	/* end of file */
Packit 70b277
	*result = 0;
Packit 70b277
	bcel_len = 0;
Packit 70b277
	return;
Packit 70b277
      }
Packit 70b277
      if (bcel_len != 0)
Packit 70b277
	history (hist, &histev, H_ENTER, bcel_line); 
Packit 70b277
      fflush (stdout);
Packit 70b277
    }
Packit 70b277
Packit 70b277
  if (bcel_len <= max)
Packit 70b277
    {
Packit 70b277
      strncpy (buf, bcel_line, bcel_len);
Packit 70b277
      *result = bcel_len;
Packit 70b277
      bcel_len = 0;
Packit 70b277
    }
Packit 70b277
  else
Packit 70b277
    {
Packit 70b277
      strncpy (buf, bcel_line, max);
Packit 70b277
      *result = max;
Packit 70b277
      bcel_line += max;
Packit 70b277
      bcel_len -= max;
Packit 70b277
    }
Packit 70b277
}
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#ifdef READLINE
Packit 70b277
/* Support for the readline and history libraries.  This allows
Packit 70b277
   nicer input on the interactive part of input. */
Packit 70b277
Packit 70b277
/* Have input call the following function. */
Packit 70b277
#undef  YY_INPUT
Packit 70b277
#define YY_INPUT(buf,result,max_size) \
Packit 70b277
		rl_input((char *)buf, &result, max_size)
Packit 70b277
Packit 70b277
/* Variables to help interface readline with bc. */
Packit 70b277
static char *rl_line = (char *)NULL;
Packit 70b277
static char *rl_start = (char *)NULL;
Packit 70b277
static int   rl_len = 0;
Packit 70b277
Packit 70b277
/* Definitions for readline access. */
Packit 70b277
extern FILE *rl_instream;
Packit 70b277
Packit 70b277
/* rl_input puts upto MAX characters into BUF with the number put in
Packit 70b277
   BUF placed in *RESULT.  If the yy input file is the same as
Packit 70b277
   rl_instream (stdin), use readline.  Otherwise, just read it.
Packit 70b277
*/
Packit 70b277
Packit 70b277
static void
Packit 70b277
rl_input (char *buf, int *result, int max)
Packit 70b277
{
Packit 70b277
  if (yyin != rl_instream)
Packit 70b277
    {
Packit 70b277
      while ( (*result = read( fileno(yyin), buf, max )) < 0 )
Packit 70b277
        if (errno != EINTR)
Packit 70b277
	  {
Packit 70b277
	    yyerror( "read() in flex scanner failed" );
Packit 70b277
	    bc_exit (1);
Packit 70b277
	  }
Packit 70b277
      return;
Packit 70b277
    }
Packit 70b277
Packit 70b277
  /* Do we need a new string? */
Packit 70b277
  if (rl_len == 0)
Packit 70b277
    {
Packit 70b277
      if (rl_start)
Packit 70b277
	free(rl_start);
Packit 70b277
      rl_start = readline ("");
Packit 70b277
      if (rl_start == NULL) {
Packit 70b277
	/* end of file */
Packit 70b277
	*result = 0;
Packit 70b277
	rl_len = 0;
Packit 70b277
	return;
Packit 70b277
      }
Packit 70b277
      rl_line = rl_start;
Packit 70b277
      rl_len = strlen (rl_line)+1;
Packit 70b277
      if (rl_len != 1)
Packit 70b277
	add_history (rl_line); 
Packit 70b277
      rl_line[rl_len-1] = '\n';
Packit 70b277
      fflush (stdout);
Packit 70b277
    }
Packit 70b277
Packit 70b277
  if (rl_len <= max)
Packit 70b277
    {
Packit 70b277
      strncpy (buf, rl_line, rl_len);
Packit 70b277
      *result = rl_len;
Packit 70b277
      rl_len = 0;
Packit 70b277
    }
Packit 70b277
  else
Packit 70b277
    {
Packit 70b277
      strncpy (buf, rl_line, max);
Packit 70b277
      *result = max;
Packit 70b277
      rl_line += max;
Packit 70b277
      rl_len -= max;
Packit 70b277
    }
Packit 70b277
}
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#if !defined(READLINE) && !defined(LIBEDIT)
Packit 70b277
Packit 70b277
/* MINIX returns from read with < 0 if SIGINT is  encountered.
Packit 70b277
   In flex, we can redefine YY_INPUT to the following.  In lex, this
Packit 70b277
   does nothing! */
Packit 70b277
#undef  YY_INPUT
Packit 70b277
#define YY_INPUT(buf,result,max_size) \
Packit 70b277
	while ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
Packit 70b277
	    if (errno != EINTR) \
Packit 70b277
		YY_FATAL_ERROR( "read() in flex scanner failed" );
Packit 70b277
#endif
Packit 70b277
Packit 70b277
Packit 70b277
#line 898 "scan.c"
Packit 70b277
Packit 70b277
#define INITIAL 0
Packit 70b277
#define slcomment 1
Packit 70b277
Packit 70b277
#ifndef YY_NO_UNISTD_H
Packit 70b277
/* Special case for "unistd.h", since it is non-ANSI. We include it way
Packit 70b277
 * down here because we want the user's section 1 to have been scanned first.
Packit 70b277
 * The user has a chance to override it with an option.
Packit 70b277
 */
Packit 70b277
#include <unistd.h>
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#ifndef YY_EXTRA_TYPE
Packit 70b277
#define YY_EXTRA_TYPE void *
Packit 70b277
#endif
Packit 70b277
Packit 70b277
static int yy_init_globals (void );
Packit 70b277
Packit 70b277
/* Accessor methods to globals.
Packit 70b277
   These are made visible to non-reentrant scanners for convenience. */
Packit 70b277
Packit 70b277
int yylex_destroy (void );
Packit 70b277
Packit 70b277
int yyget_debug (void );
Packit 70b277
Packit 70b277
void yyset_debug (int debug_flag  );
Packit 70b277
Packit 70b277
YY_EXTRA_TYPE yyget_extra (void );
Packit 70b277
Packit 70b277
void yyset_extra (YY_EXTRA_TYPE user_defined  );
Packit 70b277
Packit 70b277
FILE *yyget_in (void );
Packit 70b277
Packit 70b277
void yyset_in  (FILE * _in_str  );
Packit 70b277
Packit 70b277
FILE *yyget_out (void );
Packit 70b277
Packit 70b277
void yyset_out  (FILE * _out_str  );
Packit 70b277
Packit 70b277
int yyget_leng (void );
Packit 70b277
Packit 70b277
char *yyget_text (void );
Packit 70b277
Packit 70b277
int yyget_lineno (void );
Packit 70b277
Packit 70b277
void yyset_lineno (int _line_number  );
Packit 70b277
Packit 70b277
/* Macros after this point can all be overridden by user definitions in
Packit 70b277
 * section 1.
Packit 70b277
 */
Packit 70b277
Packit 70b277
#ifndef YY_SKIP_YYWRAP
Packit 70b277
#ifdef __cplusplus
Packit 70b277
extern "C" int yywrap (void );
Packit 70b277
#else
Packit 70b277
extern int yywrap (void );
Packit 70b277
#endif
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#ifndef YY_NO_UNPUT
Packit 70b277
    
Packit 70b277
    static void yyunput (int c,char *buf_ptr  );
Packit 70b277
    
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#ifndef yytext_ptr
Packit 70b277
static void yy_flex_strncpy (char *,yyconst char *,int );
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#ifdef YY_NEED_STRLEN
Packit 70b277
static int yy_flex_strlen (yyconst char * );
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#ifndef YY_NO_INPUT
Packit 70b277
Packit 70b277
#ifdef __cplusplus
Packit 70b277
static int yyinput (void );
Packit 70b277
#else
Packit 70b277
static int input (void );
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#endif
Packit 70b277
Packit 70b277
/* Amount of stuff to slurp up with each read. */
Packit 70b277
#ifndef YY_READ_BUF_SIZE
Packit 70b277
#define YY_READ_BUF_SIZE 8192
Packit 70b277
#endif
Packit 70b277
Packit 70b277
/* Copy whatever the last rule matched to the standard output. */
Packit 70b277
#ifndef ECHO
Packit 70b277
/* This used to be an fputs(), but since the string might contain NUL's,
Packit 70b277
 * we now use fwrite().
Packit 70b277
 */
Packit 70b277
#define ECHO fwrite( yytext, yyleng, 1, yyout )
Packit 70b277
#endif
Packit 70b277
Packit 70b277
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
Packit 70b277
 * is returned in "result".
Packit 70b277
 */
Packit 70b277
#ifndef YY_INPUT
Packit 70b277
#define YY_INPUT(buf,result,max_size) \
Packit 70b277
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
Packit 70b277
		{ \
Packit 70b277
		int c = '*'; \
Packit 70b277
		size_t n; \
Packit 70b277
		for ( n = 0; n < max_size && \
Packit 70b277
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
Packit 70b277
			buf[n] = (char) c; \
Packit 70b277
		if ( c == '\n' ) \
Packit 70b277
			buf[n++] = (char) c; \
Packit 70b277
		if ( c == EOF && ferror( yyin ) ) \
Packit 70b277
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
Packit 70b277
		result = n; \
Packit 70b277
		} \
Packit 70b277
	else \
Packit 70b277
		{ \
Packit 70b277
		errno=0; \
Packit 70b277
		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
Packit 70b277
			{ \
Packit 70b277
			if( errno != EINTR) \
Packit 70b277
				{ \
Packit 70b277
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
Packit 70b277
				break; \
Packit 70b277
				} \
Packit 70b277
			errno=0; \
Packit 70b277
			clearerr(yyin); \
Packit 70b277
			} \
Packit 70b277
		}\
Packit 70b277
\
Packit 70b277
Packit 70b277
#endif
Packit 70b277
Packit 70b277
/* No semi-colon after return; correct usage is to write "yyterminate();" -
Packit 70b277
 * we don't want an extra ';' after the "return" because that will cause
Packit 70b277
 * some compilers to complain about unreachable statements.
Packit 70b277
 */
Packit 70b277
#ifndef yyterminate
Packit 70b277
#define yyterminate() return YY_NULL
Packit 70b277
#endif
Packit 70b277
Packit 70b277
/* Number of entries by which start-condition stack grows. */
Packit 70b277
#ifndef YY_START_STACK_INCR
Packit 70b277
#define YY_START_STACK_INCR 25
Packit 70b277
#endif
Packit 70b277
Packit 70b277
/* Report a fatal error. */
Packit 70b277
#ifndef YY_FATAL_ERROR
Packit 70b277
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
Packit 70b277
#endif
Packit 70b277
Packit 70b277
/* end tables serialization structures and prototypes */
Packit 70b277
Packit 70b277
/* Default declaration of generated scanner - a define so the user can
Packit 70b277
 * easily add parameters.
Packit 70b277
 */
Packit 70b277
#ifndef YY_DECL
Packit 70b277
#define YY_DECL_IS_OURS 1
Packit 70b277
Packit 70b277
extern int yylex (void);
Packit 70b277
Packit 70b277
#define YY_DECL int yylex (void)
Packit 70b277
#endif /* !YY_DECL */
Packit 70b277
Packit 70b277
/* Code executed at the beginning of each rule, after yytext and yyleng
Packit 70b277
 * have been set up.
Packit 70b277
 */
Packit 70b277
#ifndef YY_USER_ACTION
Packit 70b277
#define YY_USER_ACTION
Packit 70b277
#endif
Packit 70b277
Packit 70b277
/* Code executed at the end of each rule. */
Packit 70b277
#ifndef YY_BREAK
Packit 70b277
#define YY_BREAK /*LINTED*/break;
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#define YY_RULE_SETUP \
Packit 70b277
	YY_USER_ACTION
Packit 70b277
Packit 70b277
/** The main scanner function which does all the work.
Packit 70b277
 */
Packit 70b277
YY_DECL
Packit 70b277
{
Packit 70b277
	register yy_state_type yy_current_state;
Packit 70b277
	register char *yy_cp, *yy_bp;
Packit 70b277
	register int yy_act;
Packit 70b277
    
Packit 70b277
#line 208 "../../bc/scan.l"
Packit 70b277
Packit 70b277
#line 1087 "scan.c"
Packit 70b277
Packit 70b277
	if ( !(yy_init) )
Packit 70b277
		{
Packit 70b277
		(yy_init) = 1;
Packit 70b277
Packit 70b277
#ifdef YY_USER_INIT
Packit 70b277
		YY_USER_INIT;
Packit 70b277
#endif
Packit 70b277
Packit 70b277
		if ( ! (yy_start) )
Packit 70b277
			(yy_start) = 1;	/* first start state */
Packit 70b277
Packit 70b277
		if ( ! yyin )
Packit 70b277
			yyin = stdin;
Packit 70b277
Packit 70b277
		if ( ! yyout )
Packit 70b277
			yyout = stdout;
Packit 70b277
Packit 70b277
		if ( ! YY_CURRENT_BUFFER ) {
Packit 70b277
			yyensure_buffer_stack ();
Packit 70b277
			YY_CURRENT_BUFFER_LVALUE =
Packit 70b277
				yy_create_buffer(yyin,YY_BUF_SIZE );
Packit 70b277
		}
Packit 70b277
Packit 70b277
		yy_load_buffer_state( );
Packit 70b277
		}
Packit 70b277
Packit 70b277
	while (/*CONSTCOND*/ 1 )		/* loops until end-of-file is reached */
Packit 70b277
		{
Packit 70b277
		yy_cp = (yy_c_buf_p);
Packit 70b277
Packit 70b277
		/* Support of yytext. */
Packit 70b277
		*yy_cp = (yy_hold_char);
Packit 70b277
Packit 70b277
		/* yy_bp points to the position in yy_ch_buf of the start of
Packit 70b277
		 * the current run.
Packit 70b277
		 */
Packit 70b277
		yy_bp = yy_cp;
Packit 70b277
Packit 70b277
		yy_current_state = (yy_start);
Packit 70b277
yy_match:
Packit 70b277
		do
Packit 70b277
			{
Packit 70b277
			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
Packit 70b277
			if ( yy_accept[yy_current_state] )
Packit 70b277
				{
Packit 70b277
				(yy_last_accepting_state) = yy_current_state;
Packit 70b277
				(yy_last_accepting_cpos) = yy_cp;
Packit 70b277
				}
Packit 70b277
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
Packit 70b277
				{
Packit 70b277
				yy_current_state = (int) yy_def[yy_current_state];
Packit 70b277
				if ( yy_current_state >= 316 )
Packit 70b277
					yy_c = yy_meta[(unsigned int) yy_c];
Packit 70b277
				}
Packit 70b277
			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Packit 70b277
			++yy_cp;
Packit 70b277
			}
Packit 70b277
		while ( yy_base[yy_current_state] != 554 );
Packit 70b277
Packit 70b277
yy_find_action:
Packit 70b277
		yy_act = yy_accept[yy_current_state];
Packit 70b277
		if ( yy_act == 0 )
Packit 70b277
			{ /* have to back up */
Packit 70b277
			yy_cp = (yy_last_accepting_cpos);
Packit 70b277
			yy_current_state = (yy_last_accepting_state);
Packit 70b277
			yy_act = yy_accept[yy_current_state];
Packit 70b277
			}
Packit 70b277
Packit 70b277
		YY_DO_BEFORE_ACTION;
Packit 70b277
Packit 70b277
do_action:	/* This label is used only to access EOF actions. */
Packit 70b277
Packit 70b277
		switch ( yy_act )
Packit 70b277
	{ /* beginning of action switch */
Packit 70b277
			case 0: /* must back up */
Packit 70b277
			/* undo the effects of YY_DO_BEFORE_ACTION */
Packit 70b277
			*yy_cp = (yy_hold_char);
Packit 70b277
			yy_cp = (yy_last_accepting_cpos);
Packit 70b277
			yy_current_state = (yy_last_accepting_state);
Packit 70b277
			goto yy_find_action;
Packit 70b277
Packit 70b277
case 1:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 209 "../../bc/scan.l"
Packit 70b277
{
Packit 70b277
 		  if (!std_only)
Packit 70b277
		    BEGIN(slcomment);
Packit 70b277
 		  else
Packit 70b277
		    yyerror ("illegal character: #");
Packit 70b277
		}
Packit 70b277
	YY_BREAK
Packit 70b277
case 2:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 215 "../../bc/scan.l"
Packit 70b277
{ BEGIN(INITIAL); }
Packit 70b277
	YY_BREAK
Packit 70b277
case 3:
Packit 70b277
/* rule 3 can match eol */
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 216 "../../bc/scan.l"
Packit 70b277
{ line_no++; BEGIN(INITIAL); return(ENDOFLINE); }
Packit 70b277
	YY_BREAK
Packit 70b277
case 4:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 217 "../../bc/scan.l"
Packit 70b277
return(Define);
Packit 70b277
	YY_BREAK
Packit 70b277
case 5:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 218 "../../bc/scan.l"
Packit 70b277
return(Break);
Packit 70b277
	YY_BREAK
Packit 70b277
case 6:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 219 "../../bc/scan.l"
Packit 70b277
return(Quit);
Packit 70b277
	YY_BREAK
Packit 70b277
case 7:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 220 "../../bc/scan.l"
Packit 70b277
return(Length);
Packit 70b277
	YY_BREAK
Packit 70b277
case 8:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 221 "../../bc/scan.l"
Packit 70b277
return(Return);
Packit 70b277
	YY_BREAK
Packit 70b277
case 9:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 222 "../../bc/scan.l"
Packit 70b277
return(For);
Packit 70b277
	YY_BREAK
Packit 70b277
case 10:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 223 "../../bc/scan.l"
Packit 70b277
return(If);
Packit 70b277
	YY_BREAK
Packit 70b277
case 11:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 224 "../../bc/scan.l"
Packit 70b277
return(While);
Packit 70b277
	YY_BREAK
Packit 70b277
case 12:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 225 "../../bc/scan.l"
Packit 70b277
return(Sqrt);
Packit 70b277
	YY_BREAK
Packit 70b277
case 13:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 226 "../../bc/scan.l"
Packit 70b277
return(Scale);
Packit 70b277
	YY_BREAK
Packit 70b277
case 14:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 227 "../../bc/scan.l"
Packit 70b277
return(Ibase);
Packit 70b277
	YY_BREAK
Packit 70b277
case 15:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 228 "../../bc/scan.l"
Packit 70b277
return(Obase);
Packit 70b277
	YY_BREAK
Packit 70b277
case 16:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 229 "../../bc/scan.l"
Packit 70b277
return(Auto);
Packit 70b277
	YY_BREAK
Packit 70b277
case 17:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 230 "../../bc/scan.l"
Packit 70b277
return(Else);
Packit 70b277
	YY_BREAK
Packit 70b277
case 18:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 231 "../../bc/scan.l"
Packit 70b277
return(Read);
Packit 70b277
	YY_BREAK
Packit 70b277
case 19:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 232 "../../bc/scan.l"
Packit 70b277
return(Random);
Packit 70b277
	YY_BREAK
Packit 70b277
case 20:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 233 "../../bc/scan.l"
Packit 70b277
return(Halt);
Packit 70b277
	YY_BREAK
Packit 70b277
case 21:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 234 "../../bc/scan.l"
Packit 70b277
return(Last);
Packit 70b277
	YY_BREAK
Packit 70b277
case 22:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 235 "../../bc/scan.l"
Packit 70b277
return(Void); 
Packit 70b277
	YY_BREAK
Packit 70b277
case 23:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 236 "../../bc/scan.l"
Packit 70b277
{
Packit 70b277
#if defined(READLINE) || defined(LIBEDIT)
Packit 70b277
	  return(HistoryVar);
Packit 70b277
#else
Packit 70b277
	  yylval.s_value = strcopyof(yytext); return(NAME);
Packit 70b277
#endif
Packit 70b277
	}
Packit 70b277
	YY_BREAK
Packit 70b277
case 24:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 244 "../../bc/scan.l"
Packit 70b277
return(Warranty);
Packit 70b277
	YY_BREAK
Packit 70b277
case 25:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 245 "../../bc/scan.l"
Packit 70b277
return(Continue);
Packit 70b277
	YY_BREAK
Packit 70b277
case 26:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 246 "../../bc/scan.l"
Packit 70b277
return(Print);
Packit 70b277
	YY_BREAK
Packit 70b277
case 27:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 247 "../../bc/scan.l"
Packit 70b277
return(Limits);
Packit 70b277
	YY_BREAK
Packit 70b277
case 28:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 248 "../../bc/scan.l"
Packit 70b277
{
Packit 70b277
#ifdef DOT_IS_LAST
Packit 70b277
       return(Last);
Packit 70b277
#else
Packit 70b277
       yyerror ("illegal character: %s",yytext);
Packit 70b277
#endif
Packit 70b277
    }
Packit 70b277
	YY_BREAK
Packit 70b277
case 29:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 255 "../../bc/scan.l"
Packit 70b277
{ yylval.c_value = yytext[0]; 
Packit 70b277
					      return((int)yytext[0]); }
Packit 70b277
	YY_BREAK
Packit 70b277
case 30:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 257 "../../bc/scan.l"
Packit 70b277
{ return(AND); }
Packit 70b277
	YY_BREAK
Packit 70b277
case 31:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 258 "../../bc/scan.l"
Packit 70b277
{ return(OR); }
Packit 70b277
	YY_BREAK
Packit 70b277
case 32:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 259 "../../bc/scan.l"
Packit 70b277
{ return(NOT); }
Packit 70b277
	YY_BREAK
Packit 70b277
case 33:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 260 "../../bc/scan.l"
Packit 70b277
{ yylval.c_value = yytext[0]; return((int)yytext[0]); }
Packit 70b277
	YY_BREAK
Packit 70b277
case 34:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 261 "../../bc/scan.l"
Packit 70b277
{ yylval.c_value = yytext[0]; return(ASSIGN_OP); }
Packit 70b277
	YY_BREAK
Packit 70b277
case 35:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 262 "../../bc/scan.l"
Packit 70b277
{ 
Packit 70b277
#ifdef OLD_EQ_OP
Packit 70b277
			 char warn_save;
Packit 70b277
			 warn_save = warn_not_std;
Packit 70b277
			 warn_not_std = TRUE;
Packit 70b277
			 ct_warn ("Old fashioned =<op>");
Packit 70b277
			 warn_not_std = warn_save;
Packit 70b277
			 yylval.c_value = yytext[1];
Packit 70b277
#else
Packit 70b277
			 yylval.c_value = '=';
Packit 70b277
			 yyless (1);
Packit 70b277
#endif
Packit 70b277
			 return(ASSIGN_OP);
Packit 70b277
		       }
Packit 70b277
	YY_BREAK
Packit 70b277
case 36:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 276 "../../bc/scan.l"
Packit 70b277
{ yylval.s_value = strcopyof(yytext); return(REL_OP); }
Packit 70b277
	YY_BREAK
Packit 70b277
case 37:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 277 "../../bc/scan.l"
Packit 70b277
{ yylval.c_value = yytext[0]; return(INCR_DECR); }
Packit 70b277
	YY_BREAK
Packit 70b277
case 38:
Packit 70b277
/* rule 38 can match eol */
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 278 "../../bc/scan.l"
Packit 70b277
{ line_no++; return(ENDOFLINE); }
Packit 70b277
	YY_BREAK
Packit 70b277
case 39:
Packit 70b277
/* rule 39 can match eol */
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 279 "../../bc/scan.l"
Packit 70b277
{  line_no++;  /* ignore a "quoted" newline */ }
Packit 70b277
	YY_BREAK
Packit 70b277
case 40:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 280 "../../bc/scan.l"
Packit 70b277
{ /* ignore spaces and tabs */ }
Packit 70b277
	YY_BREAK
Packit 70b277
case 41:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 281 "../../bc/scan.l"
Packit 70b277
{
Packit 70b277
	int c;
Packit 70b277
Packit 70b277
	for (;;)
Packit 70b277
	  {
Packit 70b277
	    while ( ((c=input()) != '*') && (c != EOF)) 
Packit 70b277
	      /* eat it */
Packit 70b277
	      if (c == '\n') line_no++;
Packit 70b277
	    if (c == '*')
Packit 70b277
 	      {
Packit 70b277
		while ( (c=input()) == '*') /* eat it*/;
Packit 70b277
		if (c == '/') break; /* at end of comment */
Packit 70b277
		if (c == '\n') line_no++;
Packit 70b277
	      }
Packit 70b277
	    if (c == EOF)
Packit 70b277
	      {
Packit 70b277
		fprintf (stderr,"EOF encountered in a comment.\n");
Packit 70b277
		break;
Packit 70b277
	      }
Packit 70b277
	  }
Packit 70b277
      }
Packit 70b277
	YY_BREAK
Packit 70b277
case 42:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 302 "../../bc/scan.l"
Packit 70b277
{ yylval.s_value = strcopyof(yytext); return(NAME); }
Packit 70b277
	YY_BREAK
Packit 70b277
case 43:
Packit 70b277
/* rule 43 can match eol */
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 303 "../../bc/scan.l"
Packit 70b277
{
Packit 70b277
 	      const char *look;
Packit 70b277
	      int count = 0;
Packit 70b277
	      yylval.s_value = strcopyof(yytext);
Packit 70b277
	      for (look = yytext; *look != 0; look++)
Packit 70b277
		{
Packit 70b277
		  if (*look == '\n') line_no++;
Packit 70b277
		  if (*look == '"')  count++;
Packit 70b277
		}
Packit 70b277
	      if (count != 2) yyerror ("NUL character in string.");
Packit 70b277
	      return(STRING);
Packit 70b277
	    }
Packit 70b277
	YY_BREAK
Packit 70b277
case 44:
Packit 70b277
/* rule 44 can match eol */
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 315 "../../bc/scan.l"
Packit 70b277
{
Packit 70b277
	      char *src, *dst;
Packit 70b277
	      int len;
Packit 70b277
	      /* remove a trailing decimal point. */
Packit 70b277
	      len = strlen(yytext);
Packit 70b277
	      if (yytext[len-1] == '.')
Packit 70b277
	        yytext[len-1] = 0;
Packit 70b277
	      /* remove leading zeros. */
Packit 70b277
	      src = yytext;
Packit 70b277
	      dst = yytext;
Packit 70b277
	      while (*src == '0') src++;
Packit 70b277
	      if (*src == 0) src--;
Packit 70b277
	      /* Copy strings removing the newlines. */
Packit 70b277
	      while (*src != 0)
Packit 70b277
		{
Packit 70b277
	          if (*src == '\\')
Packit 70b277
		    {
Packit 70b277
		      src++; src++;
Packit 70b277
		      line_no++;
Packit 70b277
		    }
Packit 70b277
		  if (*src == ',')
Packit 70b277
		    {
Packit 70b277
		      src++;
Packit 70b277
		      ct_warn("Commas in numbers");
Packit 70b277
		    }		    
Packit 70b277
		  else
Packit 70b277
		    *dst++ = *src++;
Packit 70b277
	        }
Packit 70b277
	      *dst = 0;
Packit 70b277
	      yylval.s_value = strcopyof(yytext); 
Packit 70b277
	      return(NUMBER);
Packit 70b277
	    }
Packit 70b277
	YY_BREAK
Packit 70b277
case 45:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 347 "../../bc/scan.l"
Packit 70b277
{
Packit 70b277
	  if (yytext[0] < ' ')
Packit 70b277
	    yyerror ("illegal character: ^%c",yytext[0] + '@');
Packit 70b277
	  else
Packit 70b277
	    if (yytext[0] > '~')
Packit 70b277
	      yyerror ("illegal character: \\%03o", (int) yytext[0]);
Packit 70b277
	    else
Packit 70b277
	      yyerror ("illegal character: %s",yytext);
Packit 70b277
	}
Packit 70b277
	YY_BREAK
Packit 70b277
case 46:
Packit 70b277
YY_RULE_SETUP
Packit 70b277
#line 356 "../../bc/scan.l"
Packit 70b277
ECHO;
Packit 70b277
	YY_BREAK
Packit 70b277
#line 1506 "scan.c"
Packit 70b277
case YY_STATE_EOF(INITIAL):
Packit 70b277
case YY_STATE_EOF(slcomment):
Packit 70b277
	yyterminate();
Packit 70b277
Packit 70b277
	case YY_END_OF_BUFFER:
Packit 70b277
		{
Packit 70b277
		/* Amount of text matched not including the EOB char. */
Packit 70b277
		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
Packit 70b277
Packit 70b277
		/* Undo the effects of YY_DO_BEFORE_ACTION. */
Packit 70b277
		*yy_cp = (yy_hold_char);
Packit 70b277
		YY_RESTORE_YY_MORE_OFFSET
Packit 70b277
Packit 70b277
		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
Packit 70b277
			{
Packit 70b277
			/* We're scanning a new file or input source.  It's
Packit 70b277
			 * possible that this happened because the user
Packit 70b277
			 * just pointed yyin at a new source and called
Packit 70b277
			 * yylex().  If so, then we have to assure
Packit 70b277
			 * consistency between YY_CURRENT_BUFFER and our
Packit 70b277
			 * globals.  Here is the right place to do so, because
Packit 70b277
			 * this is the first action (other than possibly a
Packit 70b277
			 * back-up) that will match for the new input source.
Packit 70b277
			 */
Packit 70b277
			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
Packit 70b277
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
Packit 70b277
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
Packit 70b277
			}
Packit 70b277
Packit 70b277
		/* Note that here we test for yy_c_buf_p "<=" to the position
Packit 70b277
		 * of the first EOB in the buffer, since yy_c_buf_p will
Packit 70b277
		 * already have been incremented past the NUL character
Packit 70b277
		 * (since all states make transitions on EOB to the
Packit 70b277
		 * end-of-buffer state).  Contrast this with the test
Packit 70b277
		 * in input().
Packit 70b277
		 */
Packit 70b277
		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Packit 70b277
			{ /* This was really a NUL. */
Packit 70b277
			yy_state_type yy_next_state;
Packit 70b277
Packit 70b277
			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
Packit 70b277
Packit 70b277
			yy_current_state = yy_get_previous_state(  );
Packit 70b277
Packit 70b277
			/* Okay, we're now positioned to make the NUL
Packit 70b277
			 * transition.  We couldn't have
Packit 70b277
			 * yy_get_previous_state() go ahead and do it
Packit 70b277
			 * for us because it doesn't know how to deal
Packit 70b277
			 * with the possibility of jamming (and we don't
Packit 70b277
			 * want to build jamming into it because then it
Packit 70b277
			 * will run more slowly).
Packit 70b277
			 */
Packit 70b277
Packit 70b277
			yy_next_state = yy_try_NUL_trans( yy_current_state );
Packit 70b277
Packit 70b277
			yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Packit 70b277
Packit 70b277
			if ( yy_next_state )
Packit 70b277
				{
Packit 70b277
				/* Consume the NUL. */
Packit 70b277
				yy_cp = ++(yy_c_buf_p);
Packit 70b277
				yy_current_state = yy_next_state;
Packit 70b277
				goto yy_match;
Packit 70b277
				}
Packit 70b277
Packit 70b277
			else
Packit 70b277
				{
Packit 70b277
				yy_cp = (yy_c_buf_p);
Packit 70b277
				goto yy_find_action;
Packit 70b277
				}
Packit 70b277
			}
Packit 70b277
Packit 70b277
		else switch ( yy_get_next_buffer(  ) )
Packit 70b277
			{
Packit 70b277
			case EOB_ACT_END_OF_FILE:
Packit 70b277
				{
Packit 70b277
				(yy_did_buffer_switch_on_eof) = 0;
Packit 70b277
Packit 70b277
				if ( yywrap( ) )
Packit 70b277
					{
Packit 70b277
					/* Note: because we've taken care in
Packit 70b277
					 * yy_get_next_buffer() to have set up
Packit 70b277
					 * yytext, we can now set up
Packit 70b277
					 * yy_c_buf_p so that if some total
Packit 70b277
					 * hoser (like flex itself) wants to
Packit 70b277
					 * call the scanner after we return the
Packit 70b277
					 * YY_NULL, it'll still work - another
Packit 70b277
					 * YY_NULL will get returned.
Packit 70b277
					 */
Packit 70b277
					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
Packit 70b277
Packit 70b277
					yy_act = YY_STATE_EOF(YY_START);
Packit 70b277
					goto do_action;
Packit 70b277
					}
Packit 70b277
Packit 70b277
				else
Packit 70b277
					{
Packit 70b277
					if ( ! (yy_did_buffer_switch_on_eof) )
Packit 70b277
						YY_NEW_FILE;
Packit 70b277
					}
Packit 70b277
				break;
Packit 70b277
				}
Packit 70b277
Packit 70b277
			case EOB_ACT_CONTINUE_SCAN:
Packit 70b277
				(yy_c_buf_p) =
Packit 70b277
					(yytext_ptr) + yy_amount_of_matched_text;
Packit 70b277
Packit 70b277
				yy_current_state = yy_get_previous_state(  );
Packit 70b277
Packit 70b277
				yy_cp = (yy_c_buf_p);
Packit 70b277
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Packit 70b277
				goto yy_match;
Packit 70b277
Packit 70b277
			case EOB_ACT_LAST_MATCH:
Packit 70b277
				(yy_c_buf_p) =
Packit 70b277
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
Packit 70b277
Packit 70b277
				yy_current_state = yy_get_previous_state(  );
Packit 70b277
Packit 70b277
				yy_cp = (yy_c_buf_p);
Packit 70b277
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
Packit 70b277
				goto yy_find_action;
Packit 70b277
			}
Packit 70b277
		break;
Packit 70b277
		}
Packit 70b277
Packit 70b277
	default:
Packit 70b277
		YY_FATAL_ERROR(
Packit 70b277
			"fatal flex scanner internal error--no action found" );
Packit 70b277
	} /* end of action switch */
Packit 70b277
		} /* end of scanning one token */
Packit 70b277
} /* end of yylex */
Packit 70b277
Packit 70b277
/* yy_get_next_buffer - try to read in a new buffer
Packit 70b277
 *
Packit 70b277
 * Returns a code representing an action:
Packit 70b277
 *	EOB_ACT_LAST_MATCH -
Packit 70b277
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
Packit 70b277
 *	EOB_ACT_END_OF_FILE - end of file
Packit 70b277
 */
Packit 70b277
static int yy_get_next_buffer (void)
Packit 70b277
{
Packit 70b277
    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
Packit 70b277
	register char *source = (yytext_ptr);
Packit 70b277
	register int number_to_move, i;
Packit 70b277
	int ret_val;
Packit 70b277
Packit 70b277
	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
Packit 70b277
		YY_FATAL_ERROR(
Packit 70b277
		"fatal flex scanner internal error--end of buffer missed" );
Packit 70b277
Packit 70b277
	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
Packit 70b277
		{ /* Don't try to fill the buffer, so this is an EOF. */
Packit 70b277
		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
Packit 70b277
			{
Packit 70b277
			/* We matched a single character, the EOB, so
Packit 70b277
			 * treat this as a final EOF.
Packit 70b277
			 */
Packit 70b277
			return EOB_ACT_END_OF_FILE;
Packit 70b277
			}
Packit 70b277
Packit 70b277
		else
Packit 70b277
			{
Packit 70b277
			/* We matched some text prior to the EOB, first
Packit 70b277
			 * process it.
Packit 70b277
			 */
Packit 70b277
			return EOB_ACT_LAST_MATCH;
Packit 70b277
			}
Packit 70b277
		}
Packit 70b277
Packit 70b277
	/* Try to read more data. */
Packit 70b277
Packit 70b277
	/* First move last chars to start of buffer. */
Packit 70b277
	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
Packit 70b277
Packit 70b277
	for ( i = 0; i < number_to_move; ++i )
Packit 70b277
		*(dest++) = *(source++);
Packit 70b277
Packit 70b277
	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
Packit 70b277
		/* don't do the read, it's not guaranteed to return an EOF,
Packit 70b277
		 * just force an EOF
Packit 70b277
		 */
Packit 70b277
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
Packit 70b277
Packit 70b277
	else
Packit 70b277
		{
Packit 70b277
			int num_to_read =
Packit 70b277
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
Packit 70b277
Packit 70b277
		while ( num_to_read <= 0 )
Packit 70b277
			{ /* Not enough room in the buffer - grow it. */
Packit 70b277
Packit 70b277
			/* just a shorter name for the current buffer */
Packit 70b277
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
Packit 70b277
Packit 70b277
			int yy_c_buf_p_offset =
Packit 70b277
				(int) ((yy_c_buf_p) - b->yy_ch_buf);
Packit 70b277
Packit 70b277
			if ( b->yy_is_our_buffer )
Packit 70b277
				{
Packit 70b277
				int new_size = b->yy_buf_size * 2;
Packit 70b277
Packit 70b277
				if ( new_size <= 0 )
Packit 70b277
					b->yy_buf_size += b->yy_buf_size / 8;
Packit 70b277
				else
Packit 70b277
					b->yy_buf_size *= 2;
Packit 70b277
Packit 70b277
				b->yy_ch_buf = (char *)
Packit 70b277
					/* Include room in for 2 EOB chars. */
Packit 70b277
					yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
Packit 70b277
				}
Packit 70b277
			else
Packit 70b277
				/* Can't grow it, we don't own it. */
Packit 70b277
				b->yy_ch_buf = 0;
Packit 70b277
Packit 70b277
			if ( ! b->yy_ch_buf )
Packit 70b277
				YY_FATAL_ERROR(
Packit 70b277
				"fatal error - scanner input buffer overflow" );
Packit 70b277
Packit 70b277
			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
Packit 70b277
Packit 70b277
			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
Packit 70b277
						number_to_move - 1;
Packit 70b277
Packit 70b277
			}
Packit 70b277
Packit 70b277
		if ( num_to_read > YY_READ_BUF_SIZE )
Packit 70b277
			num_to_read = YY_READ_BUF_SIZE;
Packit 70b277
Packit 70b277
		/* Read in more data. */
Packit 70b277
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
Packit 70b277
			(yy_n_chars), (size_t) num_to_read );
Packit 70b277
Packit 70b277
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Packit 70b277
		}
Packit 70b277
Packit 70b277
	if ( (yy_n_chars) == 0 )
Packit 70b277
		{
Packit 70b277
		if ( number_to_move == YY_MORE_ADJ )
Packit 70b277
			{
Packit 70b277
			ret_val = EOB_ACT_END_OF_FILE;
Packit 70b277
			yyrestart(yyin  );
Packit 70b277
			}
Packit 70b277
Packit 70b277
		else
Packit 70b277
			{
Packit 70b277
			ret_val = EOB_ACT_LAST_MATCH;
Packit 70b277
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
Packit 70b277
				YY_BUFFER_EOF_PENDING;
Packit 70b277
			}
Packit 70b277
		}
Packit 70b277
Packit 70b277
	else
Packit 70b277
		ret_val = EOB_ACT_CONTINUE_SCAN;
Packit 70b277
Packit 70b277
	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
Packit 70b277
		/* Extend the array by 50%, plus the number we really need. */
Packit 70b277
		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
Packit 70b277
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
Packit 70b277
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
Packit 70b277
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
Packit 70b277
	}
Packit 70b277
Packit 70b277
	(yy_n_chars) += number_to_move;
Packit 70b277
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
Packit 70b277
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
Packit 70b277
Packit 70b277
	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
Packit 70b277
Packit 70b277
	return ret_val;
Packit 70b277
}
Packit 70b277
Packit 70b277
/* yy_get_previous_state - get the state just before the EOB char was reached */
Packit 70b277
Packit 70b277
    static yy_state_type yy_get_previous_state (void)
Packit 70b277
{
Packit 70b277
	register yy_state_type yy_current_state;
Packit 70b277
	register char *yy_cp;
Packit 70b277
    
Packit 70b277
	yy_current_state = (yy_start);
Packit 70b277
Packit 70b277
	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
Packit 70b277
		{
Packit 70b277
		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
Packit 70b277
		if ( yy_accept[yy_current_state] )
Packit 70b277
			{
Packit 70b277
			(yy_last_accepting_state) = yy_current_state;
Packit 70b277
			(yy_last_accepting_cpos) = yy_cp;
Packit 70b277
			}
Packit 70b277
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
Packit 70b277
			{
Packit 70b277
			yy_current_state = (int) yy_def[yy_current_state];
Packit 70b277
			if ( yy_current_state >= 316 )
Packit 70b277
				yy_c = yy_meta[(unsigned int) yy_c];
Packit 70b277
			}
Packit 70b277
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Packit 70b277
		}
Packit 70b277
Packit 70b277
	return yy_current_state;
Packit 70b277
}
Packit 70b277
Packit 70b277
/* yy_try_NUL_trans - try to make a transition on the NUL character
Packit 70b277
 *
Packit 70b277
 * synopsis
Packit 70b277
 *	next_state = yy_try_NUL_trans( current_state );
Packit 70b277
 */
Packit 70b277
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
Packit 70b277
{
Packit 70b277
	register int yy_is_jam;
Packit 70b277
    	register char *yy_cp = (yy_c_buf_p);
Packit 70b277
Packit 70b277
	register YY_CHAR yy_c = 1;
Packit 70b277
	if ( yy_accept[yy_current_state] )
Packit 70b277
		{
Packit 70b277
		(yy_last_accepting_state) = yy_current_state;
Packit 70b277
		(yy_last_accepting_cpos) = yy_cp;
Packit 70b277
		}
Packit 70b277
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
Packit 70b277
		{
Packit 70b277
		yy_current_state = (int) yy_def[yy_current_state];
Packit 70b277
		if ( yy_current_state >= 316 )
Packit 70b277
			yy_c = yy_meta[(unsigned int) yy_c];
Packit 70b277
		}
Packit 70b277
	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
Packit 70b277
	yy_is_jam = (yy_current_state == 315);
Packit 70b277
Packit 70b277
	return yy_is_jam ? 0 : yy_current_state;
Packit 70b277
}
Packit 70b277
Packit 70b277
#ifndef YY_NO_UNPUT
Packit 70b277
Packit 70b277
    static void yyunput (int c, register char * yy_bp )
Packit 70b277
{
Packit 70b277
	register char *yy_cp;
Packit 70b277
    
Packit 70b277
    yy_cp = (yy_c_buf_p);
Packit 70b277
Packit 70b277
	/* undo effects of setting up yytext */
Packit 70b277
	*yy_cp = (yy_hold_char);
Packit 70b277
Packit 70b277
	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Packit 70b277
		{ /* need to shift things up to make room */
Packit 70b277
		/* +2 for EOB chars. */
Packit 70b277
		register int number_to_move = (yy_n_chars) + 2;
Packit 70b277
		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
Packit 70b277
					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Packit 70b277
		register char *source =
Packit 70b277
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
Packit 70b277
Packit 70b277
		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
Packit 70b277
			*--dest = *--source;
Packit 70b277
Packit 70b277
		yy_cp += (int) (dest - source);
Packit 70b277
		yy_bp += (int) (dest - source);
Packit 70b277
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
Packit 70b277
			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
Packit 70b277
Packit 70b277
		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Packit 70b277
			YY_FATAL_ERROR( "flex scanner push-back overflow" );
Packit 70b277
		}
Packit 70b277
Packit 70b277
	*--yy_cp = (char) c;
Packit 70b277
Packit 70b277
	(yytext_ptr) = yy_bp;
Packit 70b277
	(yy_hold_char) = *yy_cp;
Packit 70b277
	(yy_c_buf_p) = yy_cp;
Packit 70b277
}
Packit 70b277
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#ifndef YY_NO_INPUT
Packit 70b277
#ifdef __cplusplus
Packit 70b277
    static int yyinput (void)
Packit 70b277
#else
Packit 70b277
    static int input  (void)
Packit 70b277
#endif
Packit 70b277
Packit 70b277
{
Packit 70b277
	int c;
Packit 70b277
    
Packit 70b277
	*(yy_c_buf_p) = (yy_hold_char);
Packit 70b277
Packit 70b277
	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
Packit 70b277
		{
Packit 70b277
		/* yy_c_buf_p now points to the character we want to return.
Packit 70b277
		 * If this occurs *before* the EOB characters, then it's a
Packit 70b277
		 * valid NUL; if not, then we've hit the end of the buffer.
Packit 70b277
		 */
Packit 70b277
		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
Packit 70b277
			/* This was really a NUL. */
Packit 70b277
			*(yy_c_buf_p) = '\0';
Packit 70b277
Packit 70b277
		else
Packit 70b277
			{ /* need more input */
Packit 70b277
			int offset = (yy_c_buf_p) - (yytext_ptr);
Packit 70b277
			++(yy_c_buf_p);
Packit 70b277
Packit 70b277
			switch ( yy_get_next_buffer(  ) )
Packit 70b277
				{
Packit 70b277
				case EOB_ACT_LAST_MATCH:
Packit 70b277
					/* This happens because yy_g_n_b()
Packit 70b277
					 * sees that we've accumulated a
Packit 70b277
					 * token and flags that we need to
Packit 70b277
					 * try matching the token before
Packit 70b277
					 * proceeding.  But for input(),
Packit 70b277
					 * there's no matching to consider.
Packit 70b277
					 * So convert the EOB_ACT_LAST_MATCH
Packit 70b277
					 * to EOB_ACT_END_OF_FILE.
Packit 70b277
					 */
Packit 70b277
Packit 70b277
					/* Reset buffer status. */
Packit 70b277
					yyrestart(yyin );
Packit 70b277
Packit 70b277
					/*FALLTHROUGH*/
Packit 70b277
Packit 70b277
				case EOB_ACT_END_OF_FILE:
Packit 70b277
					{
Packit 70b277
					if ( yywrap( ) )
Packit 70b277
						return EOF;
Packit 70b277
Packit 70b277
					if ( ! (yy_did_buffer_switch_on_eof) )
Packit 70b277
						YY_NEW_FILE;
Packit 70b277
#ifdef __cplusplus
Packit 70b277
					return yyinput();
Packit 70b277
#else
Packit 70b277
					return input();
Packit 70b277
#endif
Packit 70b277
					}
Packit 70b277
Packit 70b277
				case EOB_ACT_CONTINUE_SCAN:
Packit 70b277
					(yy_c_buf_p) = (yytext_ptr) + offset;
Packit 70b277
					break;
Packit 70b277
				}
Packit 70b277
			}
Packit 70b277
		}
Packit 70b277
Packit 70b277
	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
Packit 70b277
	*(yy_c_buf_p) = '\0';	/* preserve yytext */
Packit 70b277
	(yy_hold_char) = *++(yy_c_buf_p);
Packit 70b277
Packit 70b277
	return c;
Packit 70b277
}
Packit 70b277
#endif	/* ifndef YY_NO_INPUT */
Packit 70b277
Packit 70b277
/** Immediately switch to a different input stream.
Packit 70b277
 * @param input_file A readable stream.
Packit 70b277
 * 
Packit 70b277
 * @note This function does not reset the start condition to @c INITIAL .
Packit 70b277
 */
Packit 70b277
    void yyrestart  (FILE * input_file )
Packit 70b277
{
Packit 70b277
    
Packit 70b277
	if ( ! YY_CURRENT_BUFFER ){
Packit 70b277
        yyensure_buffer_stack ();
Packit 70b277
		YY_CURRENT_BUFFER_LVALUE =
Packit 70b277
            yy_create_buffer(yyin,YY_BUF_SIZE );
Packit 70b277
	}
Packit 70b277
Packit 70b277
	yy_init_buffer(YY_CURRENT_BUFFER,input_file );
Packit 70b277
	yy_load_buffer_state( );
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Switch to a different input buffer.
Packit 70b277
 * @param new_buffer The new input buffer.
Packit 70b277
 * 
Packit 70b277
 */
Packit 70b277
    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
Packit 70b277
{
Packit 70b277
    
Packit 70b277
	/* TODO. We should be able to replace this entire function body
Packit 70b277
	 * with
Packit 70b277
	 *		yypop_buffer_state();
Packit 70b277
	 *		yypush_buffer_state(new_buffer);
Packit 70b277
     */
Packit 70b277
	yyensure_buffer_stack ();
Packit 70b277
	if ( YY_CURRENT_BUFFER == new_buffer )
Packit 70b277
		return;
Packit 70b277
Packit 70b277
	if ( YY_CURRENT_BUFFER )
Packit 70b277
		{
Packit 70b277
		/* Flush out information for old buffer. */
Packit 70b277
		*(yy_c_buf_p) = (yy_hold_char);
Packit 70b277
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
Packit 70b277
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Packit 70b277
		}
Packit 70b277
Packit 70b277
	YY_CURRENT_BUFFER_LVALUE = new_buffer;
Packit 70b277
	yy_load_buffer_state( );
Packit 70b277
Packit 70b277
	/* We don't actually know whether we did this switch during
Packit 70b277
	 * EOF (yywrap()) processing, but the only time this flag
Packit 70b277
	 * is looked at is after yywrap() is called, so it's safe
Packit 70b277
	 * to go ahead and always set it.
Packit 70b277
	 */
Packit 70b277
	(yy_did_buffer_switch_on_eof) = 1;
Packit 70b277
}
Packit 70b277
Packit 70b277
static void yy_load_buffer_state  (void)
Packit 70b277
{
Packit 70b277
    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
Packit 70b277
	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
Packit 70b277
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
Packit 70b277
	(yy_hold_char) = *(yy_c_buf_p);
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Allocate and initialize an input buffer state.
Packit 70b277
 * @param file A readable stream.
Packit 70b277
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
Packit 70b277
 * 
Packit 70b277
 * @return the allocated buffer state.
Packit 70b277
 */
Packit 70b277
    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
Packit 70b277
{
Packit 70b277
	YY_BUFFER_STATE b;
Packit 70b277
    
Packit 70b277
	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
Packit 70b277
	if ( ! b )
Packit 70b277
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Packit 70b277
Packit 70b277
	b->yy_buf_size = size;
Packit 70b277
Packit 70b277
	/* yy_ch_buf has to be 2 characters longer than the size given because
Packit 70b277
	 * we need to put in 2 end-of-buffer characters.
Packit 70b277
	 */
Packit 70b277
	b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
Packit 70b277
	if ( ! b->yy_ch_buf )
Packit 70b277
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Packit 70b277
Packit 70b277
	b->yy_is_our_buffer = 1;
Packit 70b277
Packit 70b277
	yy_init_buffer(b,file );
Packit 70b277
Packit 70b277
	return b;
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Destroy the buffer.
Packit 70b277
 * @param b a buffer created with yy_create_buffer()
Packit 70b277
 * 
Packit 70b277
 */
Packit 70b277
    void yy_delete_buffer (YY_BUFFER_STATE  b )
Packit 70b277
{
Packit 70b277
    
Packit 70b277
	if ( ! b )
Packit 70b277
		return;
Packit 70b277
Packit 70b277
	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
Packit 70b277
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
Packit 70b277
Packit 70b277
	if ( b->yy_is_our_buffer )
Packit 70b277
		yyfree((void *) b->yy_ch_buf  );
Packit 70b277
Packit 70b277
	yyfree((void *) b  );
Packit 70b277
}
Packit 70b277
Packit 70b277
#ifndef __cplusplus
Packit 70b277
extern int isatty (int );
Packit 70b277
#endif /* __cplusplus */
Packit 70b277
    
Packit 70b277
/* Initializes or reinitializes a buffer.
Packit 70b277
 * This function is sometimes called more than once on the same buffer,
Packit 70b277
 * such as during a yyrestart() or at EOF.
Packit 70b277
 */
Packit 70b277
    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
Packit 70b277
Packit 70b277
{
Packit 70b277
	int oerrno = errno;
Packit 70b277
    
Packit 70b277
	yy_flush_buffer(b );
Packit 70b277
Packit 70b277
	b->yy_input_file = file;
Packit 70b277
	b->yy_fill_buffer = 1;
Packit 70b277
Packit 70b277
    /* If b is the current buffer, then yy_init_buffer was _probably_
Packit 70b277
     * called from yyrestart() or through yy_get_next_buffer.
Packit 70b277
     * In that case, we don't want to reset the lineno or column.
Packit 70b277
     */
Packit 70b277
    if (b != YY_CURRENT_BUFFER){
Packit 70b277
        b->yy_bs_lineno = 1;
Packit 70b277
        b->yy_bs_column = 0;
Packit 70b277
    }
Packit 70b277
Packit 70b277
        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
Packit 70b277
    
Packit 70b277
	errno = oerrno;
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
Packit 70b277
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
Packit 70b277
 * 
Packit 70b277
 */
Packit 70b277
    void yy_flush_buffer (YY_BUFFER_STATE  b )
Packit 70b277
{
Packit 70b277
    	if ( ! b )
Packit 70b277
		return;
Packit 70b277
Packit 70b277
	b->yy_n_chars = 0;
Packit 70b277
Packit 70b277
	/* We always need two end-of-buffer characters.  The first causes
Packit 70b277
	 * a transition to the end-of-buffer state.  The second causes
Packit 70b277
	 * a jam in that state.
Packit 70b277
	 */
Packit 70b277
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
Packit 70b277
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
Packit 70b277
Packit 70b277
	b->yy_buf_pos = &b->yy_ch_buf[0];
Packit 70b277
Packit 70b277
	b->yy_at_bol = 1;
Packit 70b277
	b->yy_buffer_status = YY_BUFFER_NEW;
Packit 70b277
Packit 70b277
	if ( b == YY_CURRENT_BUFFER )
Packit 70b277
		yy_load_buffer_state( );
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Pushes the new state onto the stack. The new state becomes
Packit 70b277
 *  the current state. This function will allocate the stack
Packit 70b277
 *  if necessary.
Packit 70b277
 *  @param new_buffer The new state.
Packit 70b277
 *  
Packit 70b277
 */
Packit 70b277
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
Packit 70b277
{
Packit 70b277
    	if (new_buffer == NULL)
Packit 70b277
		return;
Packit 70b277
Packit 70b277
	yyensure_buffer_stack();
Packit 70b277
Packit 70b277
	/* This block is copied from yy_switch_to_buffer. */
Packit 70b277
	if ( YY_CURRENT_BUFFER )
Packit 70b277
		{
Packit 70b277
		/* Flush out information for old buffer. */
Packit 70b277
		*(yy_c_buf_p) = (yy_hold_char);
Packit 70b277
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
Packit 70b277
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
Packit 70b277
		}
Packit 70b277
Packit 70b277
	/* Only push if top exists. Otherwise, replace top. */
Packit 70b277
	if (YY_CURRENT_BUFFER)
Packit 70b277
		(yy_buffer_stack_top)++;
Packit 70b277
	YY_CURRENT_BUFFER_LVALUE = new_buffer;
Packit 70b277
Packit 70b277
	/* copied from yy_switch_to_buffer. */
Packit 70b277
	yy_load_buffer_state( );
Packit 70b277
	(yy_did_buffer_switch_on_eof) = 1;
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Removes and deletes the top of the stack, if present.
Packit 70b277
 *  The next element becomes the new top.
Packit 70b277
 *  
Packit 70b277
 */
Packit 70b277
void yypop_buffer_state (void)
Packit 70b277
{
Packit 70b277
    	if (!YY_CURRENT_BUFFER)
Packit 70b277
		return;
Packit 70b277
Packit 70b277
	yy_delete_buffer(YY_CURRENT_BUFFER );
Packit 70b277
	YY_CURRENT_BUFFER_LVALUE = NULL;
Packit 70b277
	if ((yy_buffer_stack_top) > 0)
Packit 70b277
		--(yy_buffer_stack_top);
Packit 70b277
Packit 70b277
	if (YY_CURRENT_BUFFER) {
Packit 70b277
		yy_load_buffer_state( );
Packit 70b277
		(yy_did_buffer_switch_on_eof) = 1;
Packit 70b277
	}
Packit 70b277
}
Packit 70b277
Packit 70b277
/* Allocates the stack if it does not exist.
Packit 70b277
 *  Guarantees space for at least one push.
Packit 70b277
 */
Packit 70b277
static void yyensure_buffer_stack (void)
Packit 70b277
{
Packit 70b277
	int num_to_alloc;
Packit 70b277
    
Packit 70b277
	if (!(yy_buffer_stack)) {
Packit 70b277
Packit 70b277
		/* First allocation is just for 2 elements, since we don't know if this
Packit 70b277
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
Packit 70b277
		 * immediate realloc on the next call.
Packit 70b277
         */
Packit 70b277
		num_to_alloc = 1;
Packit 70b277
		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
Packit 70b277
								(num_to_alloc * sizeof(struct yy_buffer_state*)
Packit 70b277
								);
Packit 70b277
		if ( ! (yy_buffer_stack) )
Packit 70b277
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
Packit 70b277
								  
Packit 70b277
		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
Packit 70b277
				
Packit 70b277
		(yy_buffer_stack_max) = num_to_alloc;
Packit 70b277
		(yy_buffer_stack_top) = 0;
Packit 70b277
		return;
Packit 70b277
	}
Packit 70b277
Packit 70b277
	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
Packit 70b277
Packit 70b277
		/* Increase the buffer to prepare for a possible push. */
Packit 70b277
		int grow_size = 8 /* arbitrary grow size */;
Packit 70b277
Packit 70b277
		num_to_alloc = (yy_buffer_stack_max) + grow_size;
Packit 70b277
		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
Packit 70b277
								((yy_buffer_stack),
Packit 70b277
								num_to_alloc * sizeof(struct yy_buffer_state*)
Packit 70b277
								);
Packit 70b277
		if ( ! (yy_buffer_stack) )
Packit 70b277
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
Packit 70b277
Packit 70b277
		/* zero only the new slots.*/
Packit 70b277
		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
Packit 70b277
		(yy_buffer_stack_max) = num_to_alloc;
Packit 70b277
	}
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Setup the input buffer state to scan directly from a user-specified character buffer.
Packit 70b277
 * @param base the character buffer
Packit 70b277
 * @param size the size in bytes of the character buffer
Packit 70b277
 * 
Packit 70b277
 * @return the newly allocated buffer state object. 
Packit 70b277
 */
Packit 70b277
YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
Packit 70b277
{
Packit 70b277
	YY_BUFFER_STATE b;
Packit 70b277
    
Packit 70b277
	if ( size < 2 ||
Packit 70b277
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
Packit 70b277
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
Packit 70b277
		/* They forgot to leave room for the EOB's. */
Packit 70b277
		return 0;
Packit 70b277
Packit 70b277
	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
Packit 70b277
	if ( ! b )
Packit 70b277
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
Packit 70b277
Packit 70b277
	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
Packit 70b277
	b->yy_buf_pos = b->yy_ch_buf = base;
Packit 70b277
	b->yy_is_our_buffer = 0;
Packit 70b277
	b->yy_input_file = 0;
Packit 70b277
	b->yy_n_chars = b->yy_buf_size;
Packit 70b277
	b->yy_is_interactive = 0;
Packit 70b277
	b->yy_at_bol = 1;
Packit 70b277
	b->yy_fill_buffer = 0;
Packit 70b277
	b->yy_buffer_status = YY_BUFFER_NEW;
Packit 70b277
Packit 70b277
	yy_switch_to_buffer(b  );
Packit 70b277
Packit 70b277
	return b;
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Setup the input buffer state to scan a string. The next call to yylex() will
Packit 70b277
 * scan from a @e copy of @a str.
Packit 70b277
 * @param yystr a NUL-terminated string to scan
Packit 70b277
 * 
Packit 70b277
 * @return the newly allocated buffer state object.
Packit 70b277
 * @note If you want to scan bytes that may contain NUL values, then use
Packit 70b277
 *       yy_scan_bytes() instead.
Packit 70b277
 */
Packit 70b277
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
Packit 70b277
{
Packit 70b277
    
Packit 70b277
	return yy_scan_bytes(yystr,strlen(yystr) );
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
Packit 70b277
 * scan from a @e copy of @a bytes.
Packit 70b277
 * @param bytes the byte buffer to scan
Packit 70b277
 * @param len the number of bytes in the buffer pointed to by @a bytes.
Packit 70b277
 * 
Packit 70b277
 * @return the newly allocated buffer state object.
Packit 70b277
 */
Packit 70b277
YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
Packit 70b277
{
Packit 70b277
	YY_BUFFER_STATE b;
Packit 70b277
	char *buf;
Packit 70b277
	yy_size_t n;
Packit 70b277
	int i;
Packit 70b277
    
Packit 70b277
	/* Get memory for full buffer, including space for trailing EOB's. */
Packit 70b277
	n = _yybytes_len + 2;
Packit 70b277
	buf = (char *) yyalloc(n  );
Packit 70b277
	if ( ! buf )
Packit 70b277
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
Packit 70b277
Packit 70b277
	for ( i = 0; i < _yybytes_len; ++i )
Packit 70b277
		buf[i] = yybytes[i];
Packit 70b277
Packit 70b277
	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
Packit 70b277
Packit 70b277
	b = yy_scan_buffer(buf,n );
Packit 70b277
	if ( ! b )
Packit 70b277
		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
Packit 70b277
Packit 70b277
	/* It's okay to grow etc. this buffer, and we should throw it
Packit 70b277
	 * away when we're done.
Packit 70b277
	 */
Packit 70b277
	b->yy_is_our_buffer = 1;
Packit 70b277
Packit 70b277
	return b;
Packit 70b277
}
Packit 70b277
Packit 70b277
#ifndef YY_EXIT_FAILURE
Packit 70b277
#define YY_EXIT_FAILURE 2
Packit 70b277
#endif
Packit 70b277
Packit 70b277
static void yy_fatal_error (yyconst char* msg )
Packit 70b277
{
Packit 70b277
    	(void) fprintf( stderr, "%s\n", msg );
Packit 70b277
	exit( YY_EXIT_FAILURE );
Packit 70b277
}
Packit 70b277
Packit 70b277
/* Redefine yyless() so it works in section 3 code. */
Packit 70b277
Packit 70b277
#undef yyless
Packit 70b277
#define yyless(n) \
Packit 70b277
	do \
Packit 70b277
		{ \
Packit 70b277
		/* Undo effects of setting up yytext. */ \
Packit 70b277
        int yyless_macro_arg = (n); \
Packit 70b277
        YY_LESS_LINENO(yyless_macro_arg);\
Packit 70b277
		yytext[yyleng] = (yy_hold_char); \
Packit 70b277
		(yy_c_buf_p) = yytext + yyless_macro_arg; \
Packit 70b277
		(yy_hold_char) = *(yy_c_buf_p); \
Packit 70b277
		*(yy_c_buf_p) = '\0'; \
Packit 70b277
		yyleng = yyless_macro_arg; \
Packit 70b277
		} \
Packit 70b277
	while ( 0 )
Packit 70b277
Packit 70b277
/* Accessor  methods (get/set functions) to struct members. */
Packit 70b277
Packit 70b277
/** Get the current line number.
Packit 70b277
 * 
Packit 70b277
 */
Packit 70b277
int yyget_lineno  (void)
Packit 70b277
{
Packit 70b277
        
Packit 70b277
    return yylineno;
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Get the input stream.
Packit 70b277
 * 
Packit 70b277
 */
Packit 70b277
FILE *yyget_in  (void)
Packit 70b277
{
Packit 70b277
        return yyin;
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Get the output stream.
Packit 70b277
 * 
Packit 70b277
 */
Packit 70b277
FILE *yyget_out  (void)
Packit 70b277
{
Packit 70b277
        return yyout;
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Get the length of the current token.
Packit 70b277
 * 
Packit 70b277
 */
Packit 70b277
int yyget_leng  (void)
Packit 70b277
{
Packit 70b277
        return yyleng;
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Get the current token.
Packit 70b277
 * 
Packit 70b277
 */
Packit 70b277
Packit 70b277
char *yyget_text  (void)
Packit 70b277
{
Packit 70b277
        return yytext;
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Set the current line number.
Packit 70b277
 * @param _line_number
Packit 70b277
 * 
Packit 70b277
 */
Packit 70b277
void yyset_lineno (int  _line_number )
Packit 70b277
{
Packit 70b277
    
Packit 70b277
    yylineno = _line_number;
Packit 70b277
}
Packit 70b277
Packit 70b277
/** Set the input stream. This does not discard the current
Packit 70b277
 * input buffer.
Packit 70b277
 * @param _in_str A readable stream.
Packit 70b277
 * 
Packit 70b277
 * @see yy_switch_to_buffer
Packit 70b277
 */
Packit 70b277
void yyset_in (FILE *  _in_str )
Packit 70b277
{
Packit 70b277
        yyin = _in_str ;
Packit 70b277
}
Packit 70b277
Packit 70b277
void yyset_out (FILE *  _out_str )
Packit 70b277
{
Packit 70b277
        yyout = _out_str ;
Packit 70b277
}
Packit 70b277
Packit 70b277
int yyget_debug  (void)
Packit 70b277
{
Packit 70b277
        return yy_flex_debug;
Packit 70b277
}
Packit 70b277
Packit 70b277
void yyset_debug (int  _bdebug )
Packit 70b277
{
Packit 70b277
        yy_flex_debug = _bdebug ;
Packit 70b277
}
Packit 70b277
Packit 70b277
static int yy_init_globals (void)
Packit 70b277
{
Packit 70b277
        /* Initialization is the same as for the non-reentrant scanner.
Packit 70b277
     * This function is called from yylex_destroy(), so don't allocate here.
Packit 70b277
     */
Packit 70b277
Packit 70b277
    (yy_buffer_stack) = 0;
Packit 70b277
    (yy_buffer_stack_top) = 0;
Packit 70b277
    (yy_buffer_stack_max) = 0;
Packit 70b277
    (yy_c_buf_p) = (char *) 0;
Packit 70b277
    (yy_init) = 0;
Packit 70b277
    (yy_start) = 0;
Packit 70b277
Packit 70b277
/* Defined in main.c */
Packit 70b277
#ifdef YY_STDINIT
Packit 70b277
    yyin = stdin;
Packit 70b277
    yyout = stdout;
Packit 70b277
#else
Packit 70b277
    yyin = (FILE *) 0;
Packit 70b277
    yyout = (FILE *) 0;
Packit 70b277
#endif
Packit 70b277
Packit 70b277
    /* For future reference: Set errno on error, since we are called by
Packit 70b277
     * yylex_init()
Packit 70b277
     */
Packit 70b277
    return 0;
Packit 70b277
}
Packit 70b277
Packit 70b277
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
Packit 70b277
int yylex_destroy  (void)
Packit 70b277
{
Packit 70b277
    
Packit 70b277
    /* Pop the buffer stack, destroying each element. */
Packit 70b277
	while(YY_CURRENT_BUFFER){
Packit 70b277
		yy_delete_buffer(YY_CURRENT_BUFFER  );
Packit 70b277
		YY_CURRENT_BUFFER_LVALUE = NULL;
Packit 70b277
		yypop_buffer_state();
Packit 70b277
	}
Packit 70b277
Packit 70b277
	/* Destroy the stack itself. */
Packit 70b277
	yyfree((yy_buffer_stack) );
Packit 70b277
	(yy_buffer_stack) = NULL;
Packit 70b277
Packit 70b277
    /* Reset the globals. This is important in a non-reentrant scanner so the next time
Packit 70b277
     * yylex() is called, initialization will occur. */
Packit 70b277
    yy_init_globals( );
Packit 70b277
Packit 70b277
    return 0;
Packit 70b277
}
Packit 70b277
Packit 70b277
/*
Packit 70b277
 * Internal utility routines.
Packit 70b277
 */
Packit 70b277
Packit 70b277
#ifndef yytext_ptr
Packit 70b277
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
Packit 70b277
{
Packit 70b277
	register int i;
Packit 70b277
	for ( i = 0; i < n; ++i )
Packit 70b277
		s1[i] = s2[i];
Packit 70b277
}
Packit 70b277
#endif
Packit 70b277
Packit 70b277
#ifdef YY_NEED_STRLEN
Packit 70b277
static int yy_flex_strlen (yyconst char * s )
Packit 70b277
{
Packit 70b277
	register int n;
Packit 70b277
	for ( n = 0; s[n]; ++n )
Packit 70b277
		;
Packit 70b277
Packit 70b277
	return n;
Packit 70b277
}
Packit 70b277
#endif
Packit 70b277
Packit 70b277
void *yyalloc (yy_size_t  size )
Packit 70b277
{
Packit 70b277
	return (void *) malloc( size );
Packit 70b277
}
Packit 70b277
Packit 70b277
void *yyrealloc  (void * ptr, yy_size_t  size )
Packit 70b277
{
Packit 70b277
	/* The cast to (char *) in the following accommodates both
Packit 70b277
	 * implementations that use char* generic pointers, and those
Packit 70b277
	 * that use void* generic pointers.  It works with the latter
Packit 70b277
	 * because both ANSI C and C++ allow castless assignment from
Packit 70b277
	 * any pointer type to void*, and deal with argument conversions
Packit 70b277
	 * as though doing an assignment.
Packit 70b277
	 */
Packit 70b277
	return (void *) realloc( (char *) ptr, size );
Packit 70b277
}
Packit 70b277
Packit 70b277
void yyfree (void * ptr )
Packit 70b277
{
Packit 70b277
	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
Packit 70b277
}
Packit 70b277
Packit 70b277
#define YYTABLES_NAME "yytables"
Packit 70b277
Packit 70b277
#line 356 "../../bc/scan.l"
Packit 70b277
Packit 70b277
Packit 70b277
Packit 70b277
Packit 70b277
Packit 70b277
/* This is the way to get multiple files input into lex. */
Packit 70b277
Packit 70b277
int
Packit 70b277
yywrap(void)
Packit 70b277
{
Packit 70b277
  if (!open_new_file ()) return (1);	/* EOF on standard in. */
Packit 70b277
  return (0);          			/* We have more input. */
Packit 70b277
  yyunput(0,NULL);	/* Make sure the compiler think yyunput is used. */
Packit 70b277
}
Packit 70b277