3398 lines
99 KiB
C
3398 lines
99 KiB
C
#line 2 "debug.c"
|
|
|
|
#line 4 "debug.c"
|
|
|
|
#define YY_INT_ALIGNED short int
|
|
|
|
/* A lexical scanner generated by flex */
|
|
|
|
#define yy_create_buffer debug_create_buffer
|
|
#define yy_delete_buffer debug_delete_buffer
|
|
#define yy_flex_debug debug_flex_debug
|
|
#define yy_init_buffer debug_init_buffer
|
|
#define yy_flush_buffer debug_flush_buffer
|
|
#define yy_load_buffer_state debug_load_buffer_state
|
|
#define yy_switch_to_buffer debug_switch_to_buffer
|
|
#define yyin debugin
|
|
#define yyleng debugleng
|
|
#define yylex debuglex
|
|
#define yylineno debuglineno
|
|
#define yyout debugout
|
|
#define yyrestart debugrestart
|
|
#define yytext debugtext
|
|
#define yywrap debugwrap
|
|
#define yyalloc debugalloc
|
|
#define yyrealloc debugrealloc
|
|
#define yyfree debugfree
|
|
|
|
#define FLEX_SCANNER
|
|
#define YY_FLEX_MAJOR_VERSION 2
|
|
#define YY_FLEX_MINOR_VERSION 5
|
|
#define YY_FLEX_SUBMINOR_VERSION 35
|
|
#if YY_FLEX_SUBMINOR_VERSION > 0
|
|
#define FLEX_BETA
|
|
#endif
|
|
|
|
/* First, we deal with platform-specific or compiler-specific issues. */
|
|
|
|
/* begin standard C headers. */
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <errno.h>
|
|
#include <stdlib.h>
|
|
|
|
/* end standard C headers. */
|
|
|
|
/* flex integer type definitions */
|
|
|
|
#ifndef FLEXINT_H
|
|
#define FLEXINT_H
|
|
|
|
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
|
|
|
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
|
|
|
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
|
* if you want the limit (max/min) macros for int types.
|
|
*/
|
|
#ifndef __STDC_LIMIT_MACROS
|
|
#define __STDC_LIMIT_MACROS 1
|
|
#endif
|
|
|
|
#include <inttypes.h>
|
|
typedef int8_t flex_int8_t;
|
|
typedef uint8_t flex_uint8_t;
|
|
typedef int16_t flex_int16_t;
|
|
typedef uint16_t flex_uint16_t;
|
|
typedef int32_t flex_int32_t;
|
|
typedef uint32_t flex_uint32_t;
|
|
#else
|
|
typedef signed char flex_int8_t;
|
|
typedef short int flex_int16_t;
|
|
typedef int flex_int32_t;
|
|
typedef unsigned char flex_uint8_t;
|
|
typedef unsigned short int flex_uint16_t;
|
|
typedef unsigned int flex_uint32_t;
|
|
|
|
/* Limits of integral types. */
|
|
#ifndef INT8_MIN
|
|
#define INT8_MIN (-128)
|
|
#endif
|
|
#ifndef INT16_MIN
|
|
#define INT16_MIN (-32767-1)
|
|
#endif
|
|
#ifndef INT32_MIN
|
|
#define INT32_MIN (-2147483647-1)
|
|
#endif
|
|
#ifndef INT8_MAX
|
|
#define INT8_MAX (127)
|
|
#endif
|
|
#ifndef INT16_MAX
|
|
#define INT16_MAX (32767)
|
|
#endif
|
|
#ifndef INT32_MAX
|
|
#define INT32_MAX (2147483647)
|
|
#endif
|
|
#ifndef UINT8_MAX
|
|
#define UINT8_MAX (255U)
|
|
#endif
|
|
#ifndef UINT16_MAX
|
|
#define UINT16_MAX (65535U)
|
|
#endif
|
|
#ifndef UINT32_MAX
|
|
#define UINT32_MAX (4294967295U)
|
|
#endif
|
|
|
|
#endif /* ! C99 */
|
|
|
|
#endif /* ! FLEXINT_H */
|
|
|
|
#ifdef __cplusplus
|
|
|
|
/* The "const" storage-class-modifier is valid. */
|
|
#define YY_USE_CONST
|
|
|
|
#else /* ! __cplusplus */
|
|
|
|
/* C99 requires __STDC__ to be defined as 1. */
|
|
#if defined (__STDC__)
|
|
|
|
#define YY_USE_CONST
|
|
|
|
#endif /* defined (__STDC__) */
|
|
#endif /* ! __cplusplus */
|
|
|
|
#ifdef YY_USE_CONST
|
|
#define yyconst const
|
|
#else
|
|
#define yyconst
|
|
#endif
|
|
|
|
/* Returned upon end-of-file. */
|
|
#define YY_NULL 0
|
|
|
|
/* Promotes a possibly negative, possibly signed char to an unsigned
|
|
* integer for use as an array index. If the signed char is negative,
|
|
* we want to instead treat it as an 8-bit unsigned char, hence the
|
|
* double cast.
|
|
*/
|
|
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
|
|
|
|
/* Enter a start condition. This macro really ought to take a parameter,
|
|
* but we do it the disgusting crufty way forced on us by the ()-less
|
|
* definition of BEGIN.
|
|
*/
|
|
#define BEGIN (yy_start) = 1 + 2 *
|
|
|
|
/* Translate the current start state into a value that can be later handed
|
|
* to BEGIN to return to the state. The YYSTATE alias is for lex
|
|
* compatibility.
|
|
*/
|
|
#define YY_START (((yy_start) - 1) / 2)
|
|
#define YYSTATE YY_START
|
|
|
|
/* Action number for EOF rule of a given start state. */
|
|
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
|
|
|
/* Special action meaning "start processing a new file". */
|
|
#define YY_NEW_FILE debugrestart(debugin )
|
|
|
|
#define YY_END_OF_BUFFER_CHAR 0
|
|
|
|
/* Size of default input buffer. */
|
|
#ifndef YY_BUF_SIZE
|
|
#ifdef __ia64__
|
|
/* On IA-64, the buffer size is 16k, not 8k.
|
|
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
|
|
* Ditto for the __ia64__ case accordingly.
|
|
*/
|
|
#define YY_BUF_SIZE 32768
|
|
#else
|
|
#define YY_BUF_SIZE 16384
|
|
#endif /* __ia64__ */
|
|
#endif
|
|
|
|
/* The state buf must be large enough to hold one state per character in the main buffer.
|
|
*/
|
|
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
|
|
|
|
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
|
|
#define YY_TYPEDEF_YY_BUFFER_STATE
|
|
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
|
#endif
|
|
|
|
extern int debugleng;
|
|
|
|
extern FILE *debugin, *debugout;
|
|
|
|
#define EOB_ACT_CONTINUE_SCAN 0
|
|
#define EOB_ACT_END_OF_FILE 1
|
|
#define EOB_ACT_LAST_MATCH 2
|
|
|
|
#define YY_LESS_LINENO(n)
|
|
|
|
/* Return all but the first "n" matched characters back to the input stream. */
|
|
#define yyless(n) \
|
|
do \
|
|
{ \
|
|
/* Undo effects of setting up debugtext. */ \
|
|
int yyless_macro_arg = (n); \
|
|
YY_LESS_LINENO(yyless_macro_arg);\
|
|
*yy_cp = (yy_hold_char); \
|
|
YY_RESTORE_YY_MORE_OFFSET \
|
|
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
|
|
YY_DO_BEFORE_ACTION; /* set up debugtext again */ \
|
|
} \
|
|
while ( 0 )
|
|
|
|
//#define unput(c) yyunput( c, (yytext_ptr) )
|
|
|
|
#ifndef YY_TYPEDEF_YY_SIZE_T
|
|
#define YY_TYPEDEF_YY_SIZE_T
|
|
typedef size_t yy_size_t;
|
|
#endif
|
|
|
|
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
|
#define YY_STRUCT_YY_BUFFER_STATE
|
|
struct yy_buffer_state
|
|
{
|
|
FILE *yy_input_file;
|
|
|
|
char *yy_ch_buf; /* input buffer */
|
|
char *yy_buf_pos; /* current position in input buffer */
|
|
|
|
/* Size of input buffer in bytes, not including room for EOB
|
|
* characters.
|
|
*/
|
|
yy_size_t yy_buf_size;
|
|
|
|
/* Number of characters read into yy_ch_buf, not including EOB
|
|
* characters.
|
|
*/
|
|
int yy_n_chars;
|
|
|
|
/* Whether we "own" the buffer - i.e., we know we created it,
|
|
* and can realloc() it to grow it, and should free() it to
|
|
* delete it.
|
|
*/
|
|
int yy_is_our_buffer;
|
|
|
|
/* Whether this is an "interactive" input source; if so, and
|
|
* if we're using stdio for input, then we want to use getc()
|
|
* instead of fread(), to make sure we stop fetching input after
|
|
* each newline.
|
|
*/
|
|
int yy_is_interactive;
|
|
|
|
/* Whether we're considered to be at the beginning of a line.
|
|
* If so, '^' rules will be active on the next match, otherwise
|
|
* not.
|
|
*/
|
|
int yy_at_bol;
|
|
|
|
int yy_bs_lineno; /**< The line count. */
|
|
int yy_bs_column; /**< The column count. */
|
|
|
|
/* Whether to try to fill the input buffer when we reach the
|
|
* end of it.
|
|
*/
|
|
int yy_fill_buffer;
|
|
|
|
int yy_buffer_status;
|
|
|
|
#define YY_BUFFER_NEW 0
|
|
#define YY_BUFFER_NORMAL 1
|
|
/* When an EOF's been seen but there's still some text to process
|
|
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
|
|
* shouldn't try reading from the input source any more. We might
|
|
* still have a bunch of tokens to match, though, because of
|
|
* possible backing-up.
|
|
*
|
|
* When we actually see the EOF, we change the status to "new"
|
|
* (via debugrestart()), so that the user can continue scanning by
|
|
* just pointing debugin at a new input file.
|
|
*/
|
|
#define YY_BUFFER_EOF_PENDING 2
|
|
|
|
};
|
|
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
|
|
|
|
/* Stack of input buffers. */
|
|
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
|
|
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
|
|
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
|
|
|
|
/* We provide macros for accessing buffer states in case in the
|
|
* future we want to put the buffer states in a more general
|
|
* "scanner state".
|
|
*
|
|
* Returns the top of the stack, or NULL.
|
|
*/
|
|
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
|
|
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
|
|
: NULL)
|
|
|
|
/* Same as previous macro, but useful when we know that the buffer stack is not
|
|
* NULL or when we need an lvalue. For internal use only.
|
|
*/
|
|
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
|
|
|
|
/* yy_hold_char holds the character lost when debugtext is formed. */
|
|
static char yy_hold_char;
|
|
static int yy_n_chars; /* number of characters read into yy_ch_buf */
|
|
int debugleng;
|
|
|
|
/* Points to current character in buffer. */
|
|
static char *yy_c_buf_p = (char *) 0;
|
|
static int yy_init = 0; /* whether we need to initialize */
|
|
static int yy_start = 0; /* start state number */
|
|
|
|
/* Flag which is used to allow debugwrap()'s to do buffer switches
|
|
* instead of setting up a fresh debugin. A bit of a hack ...
|
|
*/
|
|
static int yy_did_buffer_switch_on_eof;
|
|
|
|
void debugrestart (FILE *input_file );
|
|
void debug_switch_to_buffer (YY_BUFFER_STATE new_buffer );
|
|
YY_BUFFER_STATE debug_create_buffer (FILE *file,int size );
|
|
void debug_delete_buffer (YY_BUFFER_STATE b );
|
|
void debug_flush_buffer (YY_BUFFER_STATE b );
|
|
void debugpush_buffer_state (YY_BUFFER_STATE new_buffer );
|
|
void debugpop_buffer_state (void );
|
|
|
|
static void debugensure_buffer_stack (void );
|
|
static void debug_load_buffer_state (void );
|
|
static void debug_init_buffer (YY_BUFFER_STATE b,FILE *file );
|
|
|
|
#define YY_FLUSH_BUFFER debug_flush_buffer(YY_CURRENT_BUFFER )
|
|
|
|
YY_BUFFER_STATE debug_scan_buffer (char *base,yy_size_t size );
|
|
YY_BUFFER_STATE debug_scan_string (yyconst char *yy_str );
|
|
YY_BUFFER_STATE debug_scan_bytes (yyconst char *bytes,int len );
|
|
|
|
void *debugalloc (yy_size_t );
|
|
void *debugrealloc (void *,yy_size_t );
|
|
void debugfree (void * );
|
|
|
|
#define yy_new_buffer debug_create_buffer
|
|
|
|
#define yy_set_interactive(is_interactive) \
|
|
{ \
|
|
if ( ! YY_CURRENT_BUFFER ){ \
|
|
debugensure_buffer_stack (); \
|
|
YY_CURRENT_BUFFER_LVALUE = \
|
|
debug_create_buffer(debugin,YY_BUF_SIZE ); \
|
|
} \
|
|
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
|
|
}
|
|
|
|
#define yy_set_bol(at_bol) \
|
|
{ \
|
|
if ( ! YY_CURRENT_BUFFER ){\
|
|
debugensure_buffer_stack (); \
|
|
YY_CURRENT_BUFFER_LVALUE = \
|
|
debug_create_buffer(debugin,YY_BUF_SIZE ); \
|
|
} \
|
|
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
|
|
}
|
|
|
|
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
|
|
|
|
/* Begin user sect3 */
|
|
|
|
typedef unsigned char YY_CHAR;
|
|
|
|
FILE *debugin = (FILE *) 0, *debugout = (FILE *) 0;
|
|
|
|
typedef int yy_state_type;
|
|
|
|
extern int debuglineno;
|
|
|
|
int debuglineno = 1;
|
|
|
|
extern char *debugtext;
|
|
#define yytext_ptr debugtext
|
|
|
|
static yy_state_type yy_get_previous_state (void );
|
|
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
|
|
static int yy_get_next_buffer (void );
|
|
static void yy_fatal_error (yyconst char msg[] );
|
|
|
|
/* Done after the current pattern has been matched and before the
|
|
* corresponding action - sets up debugtext.
|
|
*/
|
|
#define YY_DO_BEFORE_ACTION \
|
|
(yytext_ptr) = yy_bp; \
|
|
debugleng = (size_t) (yy_cp - yy_bp); \
|
|
(yy_hold_char) = *yy_cp; \
|
|
*yy_cp = '\0'; \
|
|
(yy_c_buf_p) = yy_cp;
|
|
|
|
#define YY_NUM_RULES 60
|
|
#define YY_END_OF_BUFFER 61
|
|
/* This struct is not used in this scanner,
|
|
but its presence is necessary. */
|
|
struct yy_trans_info
|
|
{
|
|
flex_int32_t yy_verify;
|
|
flex_int32_t yy_nxt;
|
|
};
|
|
static yyconst flex_int16_t yy_accept[373] =
|
|
{ 0,
|
|
0, 0, 61, 59, 58, 59, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 0, 0, 0, 0, 0,
|
|
54, 0, 0, 0, 0, 0, 6, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 33, 0, 0, 0, 0,
|
|
0, 0, 39, 0, 0, 0, 0, 0, 16, 0,
|
|
0, 0, 0, 0, 0, 27, 0, 0, 30, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 37, 0,
|
|
0, 0, 0, 0, 0, 50, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 25, 0, 0, 0, 0, 0,
|
|
|
|
21, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
28, 0, 0, 52, 0, 0, 0, 0, 0, 31,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 51, 0, 0, 0, 0,
|
|
0, 0, 53, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 44, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 22, 0, 0,
|
|
0, 0, 0, 3, 0, 0, 0, 34, 0, 0,
|
|
|
|
0, 0, 0, 40, 0, 0, 0, 0, 0, 0,
|
|
13, 0, 0, 0, 0, 29, 0, 38, 0, 0,
|
|
56, 0, 26, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 43, 0, 32, 0, 0, 5, 0,
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 15, 0, 0, 0, 0, 0, 0, 0,
|
|
57, 0, 0, 0, 26, 0, 0, 0, 0, 0,
|
|
0, 1, 0, 0, 0, 9, 0, 0, 35, 0,
|
|
0, 0, 0, 41, 0, 0, 11, 0, 0, 0,
|
|
19, 0, 49, 0, 0, 45, 0, 0, 0, 23,
|
|
|
|
0, 4, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
14, 0, 0, 0, 0, 0, 0, 0, 47, 0,
|
|
0, 0, 0, 7, 0, 0, 36, 0, 0, 42,
|
|
0, 0, 0, 0, 17, 0, 0, 0, 2, 0,
|
|
10, 0, 0, 0, 12, 0, 20, 0, 46, 0,
|
|
0, 0, 0, 24, 0, 0, 0, 0, 0, 0,
|
|
8, 0, 0, 18, 0, 48, 0, 0, 0, 0,
|
|
55, 0
|
|
} ;
|
|
|
|
static yyconst flex_int32_t yy_ec[256] =
|
|
{ 0,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
|
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 2, 1, 2, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 4, 1, 1, 1, 5, 6, 7, 8,
|
|
9, 9, 10, 11, 9, 9, 9, 12, 1, 1,
|
|
1, 1, 13, 1, 14, 15, 16, 17, 18, 19,
|
|
20, 21, 22, 1, 23, 24, 25, 26, 27, 28,
|
|
1, 29, 30, 31, 32, 33, 34, 35, 36, 1,
|
|
1, 1, 1, 1, 1, 1, 37, 38, 39, 40,
|
|
|
|
41, 42, 43, 44, 45, 1, 46, 47, 48, 49,
|
|
50, 51, 1, 52, 53, 54, 55, 56, 57, 58,
|
|
59, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1
|
|
} ;
|
|
|
|
static yyconst flex_int32_t yy_meta[61] =
|
|
{ 0,
|
|
1, 2, 2, 3, 4, 5, 5, 5, 5, 5,
|
|
5, 6, 1, 7, 7, 7, 7, 7, 7, 1,
|
|
1, 1, 1, 8, 1, 1, 9, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 7, 7, 7, 7,
|
|
7, 7, 1, 1, 1, 1, 8, 1, 1, 9,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 10
|
|
} ;
|
|
|
|
static yyconst flex_int16_t yy_base[414] =
|
|
{ 0,
|
|
265, 0, 254, 1812, 1812, 59, 61, 120, 179, 238,
|
|
297, 356, 64, 66, 415, 47, 474, 71, 98, 42,
|
|
231, 533, 592, 77, 651, 73, 145, 75, 65, 106,
|
|
1812, 233, 124, 292, 168, 301, 1812, 329, 274, 68,
|
|
221, 114, 59, 710, 78, 1812, 769, 131, 97, 828,
|
|
100, 333, 1812, 360, 366, 239, 412, 327, 1812, 419,
|
|
168, 887, 112, 452, 209, 1812, 198, 310, 1812, 459,
|
|
409, 364, 389, 392, 140, 240, 489, 496, 1812, 163,
|
|
425, 519, 437, 500, 184, 1812, 573, 564, 299, 526,
|
|
444, 578, 448, 478, 1812, 946, 523, 597, 589, 550,
|
|
|
|
1812, 226, 1005, 555, 642, 569, 601, 599, 237, 672,
|
|
1812, 603, 632, 1812, 666, 250, 678, 674, 704, 1812,
|
|
96, 682, 206, 0, 236, 750, 684, 308, 347, 743,
|
|
811, 713, 259, 395, 234, 799, 388, 272, 698, 806,
|
|
205, 825, 870, 487, 0, 509, 890, 921, 702, 552,
|
|
600, 701, 727, 901, 780, 1812, 747, 949, 783, 995,
|
|
802, 861, 1812, 884, 898, 619, 909, 623, 951, 953,
|
|
306, 964, 998, 409, 972, 1812, 363, 1035, 1094, 1043,
|
|
936, 964, 1059, 1082, 1051, 975, 987, 1812, 198, 1012,
|
|
922, 200, 1066, 1812, 789, 822, 1028, 1812, 446, 695,
|
|
|
|
524, 524, 1071, 1812, 530, 733, 1074, 1086, 174, 1097,
|
|
1812, 761, 815, 848, 1102, 1812, 0, 1812, 797, 1105,
|
|
1812, 1114, 1812, 1117, 805, 1119, 1125, 834, 840, 1137,
|
|
1142, 1148, 1145, 1812, 1150, 1812, 913, 1152, 1812, 0,
|
|
1156, 1165, 1179, 985, 1158, 1020, 1168, 168, 1182, 156,
|
|
1184, 1186, 1812, 0, 1188, 1191, 1189, 1204, 1197, 1211,
|
|
1812, 1214, 141, 1220, 1812, 1228, 1224, 1232, 1234, 1238,
|
|
1240, 1812, 1248, 138, 1256, 1812, 1247, 1259, 1812, 127,
|
|
1263, 119, 1265, 1812, 1267, 1270, 1812, 1271, 98, 1279,
|
|
1812, 1282, 1812, 1284, 1287, 1812, 1285, 1294, 1299, 1812,
|
|
|
|
1301, 1812, 0, 1304, 1307, 1309, 1311, 1315, 1318, 1320,
|
|
1812, 0, 1329, 1326, 1332, 1331, 81, 1338, 1812, 1341,
|
|
1346, 1348, 1350, 1812, 1353, 1355, 1812, 1360, 1366, 1812,
|
|
1370, 1373, 1379, 1381, 1812, 1385, 1388, 1390, 1812, 1392,
|
|
1812, 1397, 1396, 1402, 1812, 1409, 1812, 1414, 1812, 1416,
|
|
1418, 1421, 1425, 1812, 1429, 67, 1440, 1429, 1435, 1444,
|
|
1812, 0, 1446, 1812, 1451, 1812, 1453, 1456, 1458, 1461,
|
|
1812, 1812, 1521, 1530, 1537, 1543, 1552, 1561, 1570, 1579,
|
|
1588, 1597, 1603, 1609, 1615, 1621, 1630, 1639, 1645, 1651,
|
|
1657, 1666, 1672, 1678, 1685, 1688, 1691, 1697, 1703, 1713,
|
|
|
|
1723, 1732, 1741, 1747, 1753, 1759, 1765, 1771, 1777, 1786,
|
|
1795, 1798, 1804
|
|
} ;
|
|
|
|
static yyconst flex_int16_t yy_def[414] =
|
|
{ 0,
|
|
373, 372, 372, 372, 372, 374, 372, 374, 372, 374,
|
|
374, 11, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 374, 375, 372, 372,
|
|
372, 376, 8, 372, 372, 372, 372, 377, 27, 39,
|
|
372, 372, 372, 372, 372, 372, 372, 10, 48, 372,
|
|
372, 372, 372, 378, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 62, 372, 372, 372, 379, 372, 372, 372,
|
|
372, 372, 380, 372, 15, 15, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 376, 372, 372, 372,
|
|
381, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
|
|
372, 372, 372, 372, 372, 372, 372, 372, 23, 372,
|
|
372, 372, 372, 372, 382, 25, 372, 372, 372, 372,
|
|
375, 375, 372, 383, 372, 87, 372, 372, 372, 372,
|
|
377, 131, 372, 372, 372, 372, 44, 372, 384, 384,
|
|
372, 372, 372, 372, 385, 372, 378, 147, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 379, 380, 372, 372, 372, 381, 372,
|
|
96, 372, 372, 96, 372, 372, 372, 386, 372, 372,
|
|
372, 372, 372, 372, 372, 382, 372, 372, 372, 383,
|
|
372, 372, 387, 372, 388, 372, 372, 372, 372, 389,
|
|
|
|
372, 372, 384, 372, 372, 390, 385, 372, 372, 391,
|
|
372, 372, 392, 372, 372, 372, 165, 372, 393, 372,
|
|
372, 372, 372, 372, 372, 386, 394, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 395, 372, 372, 396,
|
|
372, 387, 387, 372, 388, 372, 389, 372, 372, 372,
|
|
390, 372, 372, 397, 391, 255, 372, 392, 393, 372,
|
|
372, 372, 372, 372, 372, 394, 398, 395, 395, 396,
|
|
372, 372, 372, 372, 399, 372, 400, 372, 372, 372,
|
|
401, 372, 390, 372, 397, 372, 372, 372, 372, 402,
|
|
372, 372, 372, 372, 372, 372, 372, 398, 372, 372,
|
|
|
|
403, 372, 404, 399, 304, 400, 372, 401, 372, 405,
|
|
372, 406, 402, 313, 407, 372, 372, 372, 372, 403,
|
|
320, 404, 372, 372, 408, 372, 372, 372, 372, 372,
|
|
405, 331, 406, 372, 372, 407, 372, 372, 372, 409,
|
|
372, 408, 372, 372, 372, 410, 372, 372, 372, 411,
|
|
409, 351, 372, 372, 372, 372, 410, 357, 411, 372,
|
|
372, 412, 372, 372, 372, 372, 412, 413, 413, 372,
|
|
372, 0, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372
|
|
} ;
|
|
|
|
static yyconst flex_int16_t yy_nxt[1873] =
|
|
{ 0,
|
|
4, 4, 5, 4, 4, 6, 6, 6, 6, 6,
|
|
6, 4, 7, 8, 9, 10, 11, 6, 12, 13,
|
|
14, 15, 16, 17, 18, 19, 20, 4, 21, 22,
|
|
4, 23, 24, 25, 4, 4, 8, 9, 10, 11,
|
|
6, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
|
4, 21, 22, 4, 23, 24, 25, 4, 4, 4,
|
|
26, 26, 30, 30, 80, 67, 67, 30, 30, 96,
|
|
28, 362, 87, 87, 26, 26, 121, 121, 112, 112,
|
|
123, 39, 29, 70, 28, 337, 134, 80, 88, 71,
|
|
68, 138, 96, 72, 89, 90, 29, 121, 121, 91,
|
|
|
|
91, 113, 312, 123, 39, 29, 70, 30, 30, 134,
|
|
48, 88, 71, 68, 138, 92, 72, 89, 90, 29,
|
|
31, 32, 32, 69, 113, 31, 309, 144, 93, 123,
|
|
37, 28, 94, 48, 307, 33, 114, 372, 92, 27,
|
|
133, 34, 303, 35, 27, 294, 26, 26, 27, 36,
|
|
144, 93, 123, 372, 29, 94, 28, 95, 33, 372,
|
|
372, 282, 27, 133, 34, 31, 35, 27, 29, 157,
|
|
157, 27, 36, 280, 128, 128, 372, 29, 254, 37,
|
|
38, 38, 372, 129, 27, 27, 27, 27, 27, 27,
|
|
28, 29, 39, 27, 27, 27, 40, 27, 166, 67,
|
|
|
|
67, 41, 42, 167, 240, 43, 129, 44, 45, 237,
|
|
157, 157, 189, 189, 205, 39, 27, 27, 27, 40,
|
|
27, 166, 132, 132, 41, 42, 167, 66, 43, 61,
|
|
44, 45, 97, 97, 32, 32, 124, 125, 46, 47,
|
|
47, 191, 192, 201, 28, 150, 150, 43, 98, 28,
|
|
99, 48, 61, 372, 151, 49, 35, 69, 177, 372,
|
|
100, 50, 372, 372, 51, 372, 52, 5, 66, 372,
|
|
43, 98, 199, 99, 48, 38, 38, 151, 49, 35,
|
|
46, 177, 372, 100, 50, 372, 372, 51, 372, 52,
|
|
101, 372, 37, 87, 87, 199, 41, 53, 54, 54,
|
|
|
|
43, 372, 87, 87, 202, 128, 128, 372, 28, 195,
|
|
195, 67, 67, 127, 168, 89, 130, 372, 55, 41,
|
|
56, 372, 34, 43, 89, 57, 58, 202, 148, 148,
|
|
38, 38, 372, 46, 140, 140, 127, 168, 89, 130,
|
|
28, 55, 372, 56, 372, 34, 372, 89, 57, 58,
|
|
149, 37, 29, 196, 196, 43, 59, 60, 60, 51,
|
|
37, 54, 54, 145, 146, 30, 30, 148, 148, 69,
|
|
372, 28, 372, 149, 372, 29, 61, 62, 43, 29,
|
|
224, 63, 51, 56, 64, 65, 59, 372, 46, 149,
|
|
73, 73, 53, 73, 73, 58, 200, 200, 372, 61,
|
|
|
|
62, 372, 29, 224, 63, 372, 56, 64, 65, 372,
|
|
30, 30, 149, 152, 152, 66, 73, 73, 58, 59,
|
|
60, 60, 372, 31, 372, 59, 81, 81, 372, 153,
|
|
28, 372, 74, 154, 75, 372, 72, 372, 81, 81,
|
|
76, 77, 29, 78, 155, 91, 91, 372, 79, 91,
|
|
91, 79, 153, 159, 159, 74, 154, 75, 372, 72,
|
|
30, 30, 246, 76, 77, 29, 78, 155, 31, 160,
|
|
372, 156, 161, 372, 79, 81, 81, 372, 66, 91,
|
|
91, 162, 71, 372, 86, 246, 72, 82, 206, 206,
|
|
73, 73, 160, 83, 372, 161, 86, 73, 73, 84,
|
|
|
|
85, 81, 81, 95, 162, 71, 74, 95, 93, 72,
|
|
82, 163, 372, 74, 208, 209, 83, 78, 31, 83,
|
|
81, 81, 84, 85, 97, 97, 372, 87, 87, 74,
|
|
372, 93, 372, 86, 91, 91, 74, 95, 83, 248,
|
|
78, 249, 83, 372, 84, 250, 102, 372, 79, 89,
|
|
103, 97, 97, 213, 213, 79, 91, 91, 372, 86,
|
|
104, 83, 248, 105, 249, 87, 87, 84, 250, 102,
|
|
106, 106, 89, 103, 87, 87, 124, 125, 86, 91,
|
|
91, 372, 101, 104, 372, 37, 105, 89, 90, 372,
|
|
97, 97, 95, 106, 106, 372, 89, 372, 97, 97,
|
|
|
|
106, 106, 106, 106, 112, 112, 214, 214, 93, 101,
|
|
89, 90, 94, 107, 95, 108, 99, 109, 100, 89,
|
|
219, 219, 110, 37, 108, 372, 100, 372, 111, 128,
|
|
128, 93, 37, 112, 112, 94, 107, 95, 108, 99,
|
|
109, 100, 372, 91, 91, 110, 372, 108, 101, 100,
|
|
372, 111, 115, 115, 372, 184, 101, 372, 111, 185,
|
|
111, 372, 114, 372, 116, 372, 117, 115, 115, 104,
|
|
372, 118, 372, 106, 106, 115, 115, 372, 184, 115,
|
|
115, 119, 185, 187, 187, 87, 87, 116, 372, 117,
|
|
372, 114, 104, 107, 118, 108, 200, 200, 118, 203,
|
|
|
|
203, 95, 152, 152, 119, 115, 115, 89, 150, 150,
|
|
120, 132, 132, 372, 132, 132, 107, 212, 108, 117,
|
|
135, 118, 372, 136, 118, 120, 372, 137, 152, 152,
|
|
89, 111, 41, 120, 206, 206, 43, 120, 372, 43,
|
|
212, 188, 117, 37, 87, 87, 136, 118, 157, 157,
|
|
137, 193, 193, 372, 372, 41, 372, 204, 372, 43,
|
|
156, 372, 43, 120, 34, 372, 89, 150, 150, 46,
|
|
47, 47, 46, 372, 139, 139, 139, 139, 139, 139,
|
|
28, 152, 152, 372, 159, 159, 156, 34, 372, 89,
|
|
195, 195, 29, 244, 372, 51, 372, 153, 219, 219,
|
|
|
|
132, 132, 37, 159, 159, 372, 66, 140, 140, 194,
|
|
262, 263, 197, 197, 372, 29, 213, 213, 51, 257,
|
|
153, 41, 372, 195, 195, 43, 140, 140, 53, 140,
|
|
140, 372, 51, 237, 372, 267, 267, 372, 141, 156,
|
|
372, 142, 163, 123, 41, 143, 228, 228, 43, 213,
|
|
213, 51, 372, 52, 51, 51, 52, 372, 46, 237,
|
|
372, 163, 159, 159, 142, 53, 123, 372, 143, 372,
|
|
198, 140, 140, 372, 51, 372, 52, 51, 372, 52,
|
|
372, 161, 372, 142, 53, 215, 215, 53, 157, 157,
|
|
372, 210, 210, 372, 372, 372, 51, 372, 52, 217,
|
|
|
|
217, 372, 152, 152, 161, 372, 142, 61, 158, 372,
|
|
220, 220, 63, 372, 268, 268, 65, 372, 153, 51,
|
|
163, 52, 148, 148, 145, 146, 240, 192, 192, 53,
|
|
61, 158, 372, 155, 372, 63, 372, 227, 227, 65,
|
|
372, 153, 372, 216, 149, 372, 66, 170, 170, 211,
|
|
157, 157, 222, 222, 170, 170, 155, 218, 372, 182,
|
|
156, 171, 172, 173, 372, 170, 170, 149, 221, 61,
|
|
228, 228, 174, 170, 170, 175, 235, 235, 65, 229,
|
|
59, 173, 182, 372, 171, 172, 173, 372, 187, 187,
|
|
273, 274, 61, 175, 372, 174, 159, 159, 175, 170,
|
|
|
|
170, 65, 229, 372, 173, 176, 178, 178, 66, 372,
|
|
223, 372, 176, 238, 238, 161, 175, 372, 179, 372,
|
|
180, 277, 277, 176, 162, 181, 372, 175, 182, 197,
|
|
197, 176, 104, 183, 236, 372, 178, 178, 161, 225,
|
|
372, 179, 372, 180, 227, 227, 188, 162, 181, 372,
|
|
175, 182, 91, 91, 163, 104, 183, 176, 182, 372,
|
|
227, 227, 372, 181, 95, 372, 182, 241, 241, 242,
|
|
372, 239, 203, 203, 180, 252, 252, 372, 104, 181,
|
|
372, 182, 182, 230, 230, 372, 181, 198, 372, 182,
|
|
254, 209, 209, 372, 95, 227, 227, 180, 210, 210,
|
|
|
|
255, 104, 181, 215, 215, 182, 220, 220, 372, 180,
|
|
95, 231, 232, 233, 181, 222, 222, 182, 260, 260,
|
|
264, 264, 183, 372, 372, 194, 227, 227, 372, 225,
|
|
204, 372, 180, 253, 231, 232, 233, 181, 230, 230,
|
|
182, 234, 372, 230, 230, 183, 230, 230, 182, 230,
|
|
230, 235, 235, 238, 238, 372, 211, 241, 241, 275,
|
|
275, 216, 372, 372, 221, 372, 372, 372, 242, 278,
|
|
278, 182, 372, 223, 231, 372, 261, 231, 265, 233,
|
|
271, 271, 372, 281, 281, 283, 283, 252, 252, 372,
|
|
372, 372, 286, 286, 288, 289, 234, 231, 292, 292,
|
|
|
|
231, 234, 233, 372, 234, 290, 290, 234, 372, 236,
|
|
372, 239, 260, 260, 372, 194, 372, 276, 294, 263,
|
|
263, 264, 264, 372, 372, 267, 267, 279, 297, 295,
|
|
295, 372, 372, 268, 268, 299, 299, 372, 272, 301,
|
|
301, 271, 271, 284, 372, 253, 372, 372, 277, 277,
|
|
287, 372, 303, 274, 274, 372, 293, 275, 275, 304,
|
|
278, 278, 372, 291, 281, 281, 283, 283, 310, 310,
|
|
261, 286, 286, 372, 372, 312, 289, 289, 372, 265,
|
|
290, 290, 313, 292, 292, 315, 315, 296, 295, 295,
|
|
316, 317, 372, 300, 372, 318, 318, 302, 372, 272,
|
|
|
|
299, 299, 301, 301, 320, 372, 372, 372, 323, 323,
|
|
325, 325, 326, 326, 372, 276, 328, 328, 279, 329,
|
|
329, 310, 310, 331, 284, 372, 311, 334, 334, 287,
|
|
372, 372, 372, 315, 315, 337, 317, 317, 291, 318,
|
|
318, 293, 372, 372, 372, 372, 296, 338, 338, 340,
|
|
340, 323, 323, 319, 325, 325, 326, 326, 300, 372,
|
|
302, 328, 328, 372, 343, 372, 324, 329, 329, 372,
|
|
327, 372, 372, 372, 344, 344, 372, 330, 372, 311,
|
|
346, 346, 334, 334, 372, 335, 348, 348, 372, 350,
|
|
350, 338, 338, 340, 340, 351, 372, 319, 353, 353,
|
|
|
|
372, 355, 356, 344, 344, 339, 372, 341, 372, 324,
|
|
346, 346, 357, 372, 327, 348, 348, 350, 350, 372,
|
|
372, 372, 360, 360, 372, 330, 353, 353, 372, 372,
|
|
363, 363, 345, 362, 356, 356, 365, 365, 347, 372,
|
|
335, 372, 372, 372, 349, 360, 360, 363, 363, 339,
|
|
372, 341, 365, 365, 368, 368, 354, 368, 368, 370,
|
|
370, 345, 370, 370, 372, 372, 372, 372, 347, 372,
|
|
372, 372, 372, 349, 372, 372, 372, 372, 372, 372,
|
|
361, 372, 372, 372, 354, 372, 372, 372, 364, 372,
|
|
372, 372, 372, 372, 366, 372, 372, 372, 372, 372,
|
|
|
|
372, 372, 372, 361, 372, 364, 372, 372, 372, 372,
|
|
366, 372, 372, 372, 372, 372, 372, 371, 372, 372,
|
|
371, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
|
4, 27, 372, 372, 27, 27, 27, 27, 122, 372,
|
|
372, 122, 372, 122, 126, 126, 126, 126, 126, 126,
|
|
126, 372, 126, 131, 372, 372, 131, 131, 131, 131,
|
|
131, 131, 147, 147, 147, 147, 147, 147, 147, 372,
|
|
147, 164, 372, 372, 164, 372, 164, 372, 372, 164,
|
|
165, 372, 372, 165, 372, 372, 372, 372, 165, 169,
|
|
372, 372, 169, 372, 169, 372, 372, 169, 186, 372,
|
|
|
|
372, 186, 372, 186, 372, 372, 186, 190, 372, 190,
|
|
139, 372, 372, 139, 372, 372, 372, 372, 139, 207,
|
|
372, 207, 226, 372, 226, 226, 372, 226, 226, 372,
|
|
226, 243, 243, 372, 243, 372, 243, 372, 372, 243,
|
|
245, 372, 245, 245, 372, 245, 247, 372, 372, 247,
|
|
372, 247, 251, 372, 372, 251, 372, 251, 256, 256,
|
|
372, 256, 372, 256, 372, 372, 256, 258, 372, 258,
|
|
258, 372, 258, 259, 372, 372, 259, 372, 259, 266,
|
|
372, 266, 266, 372, 266, 266, 269, 372, 372, 269,
|
|
372, 269, 270, 372, 270, 285, 372, 285, 298, 372,
|
|
|
|
298, 298, 372, 298, 305, 305, 372, 305, 372, 305,
|
|
372, 372, 305, 306, 306, 306, 306, 306, 306, 306,
|
|
306, 306, 306, 308, 308, 308, 308, 308, 308, 308,
|
|
308, 308, 308, 314, 314, 372, 314, 372, 314, 372,
|
|
372, 314, 321, 321, 372, 321, 372, 321, 372, 372,
|
|
321, 322, 372, 322, 332, 332, 372, 332, 372, 332,
|
|
372, 372, 332, 333, 372, 333, 336, 372, 372, 336,
|
|
372, 336, 342, 372, 372, 342, 372, 342, 352, 352,
|
|
372, 352, 372, 352, 372, 372, 352, 358, 358, 372,
|
|
358, 372, 358, 372, 372, 358, 359, 372, 372, 359,
|
|
|
|
372, 359, 367, 372, 367, 369, 372, 372, 369, 372,
|
|
369, 3, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372
|
|
} ;
|
|
|
|
static yyconst flex_int16_t yy_chk[1873] =
|
|
{ 0,
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
6, 6, 7, 7, 16, 13, 13, 14, 14, 20,
|
|
6, 356, 18, 18, 26, 26, 28, 28, 24, 24,
|
|
29, 40, 6, 14, 26, 317, 43, 16, 18, 14,
|
|
13, 45, 20, 14, 18, 18, 26, 121, 121, 19,
|
|
|
|
19, 24, 289, 29, 40, 6, 14, 30, 30, 43,
|
|
49, 18, 14, 13, 45, 19, 14, 18, 18, 26,
|
|
7, 8, 8, 13, 24, 14, 282, 51, 19, 42,
|
|
18, 8, 19, 49, 280, 8, 24, 63, 19, 33,
|
|
42, 8, 274, 8, 48, 263, 27, 27, 48, 8,
|
|
51, 19, 42, 33, 48, 19, 27, 19, 8, 75,
|
|
63, 250, 33, 42, 8, 30, 8, 48, 27, 61,
|
|
61, 48, 8, 248, 35, 35, 33, 48, 209, 8,
|
|
9, 9, 75, 35, 9, 9, 9, 9, 9, 9,
|
|
9, 27, 9, 9, 9, 9, 9, 9, 80, 67,
|
|
|
|
67, 9, 9, 85, 192, 9, 35, 9, 9, 189,
|
|
65, 65, 123, 123, 141, 9, 9, 9, 9, 9,
|
|
9, 80, 41, 41, 9, 9, 85, 61, 9, 65,
|
|
9, 9, 21, 21, 32, 32, 32, 32, 9, 10,
|
|
10, 125, 125, 135, 32, 56, 56, 41, 21, 10,
|
|
21, 10, 65, 3, 56, 10, 32, 67, 102, 76,
|
|
21, 10, 109, 116, 10, 76, 10, 1, 65, 0,
|
|
41, 21, 133, 21, 10, 39, 39, 56, 10, 32,
|
|
41, 102, 76, 21, 10, 109, 116, 10, 76, 10,
|
|
21, 0, 32, 34, 34, 133, 39, 10, 11, 11,
|
|
|
|
39, 0, 36, 36, 138, 89, 89, 0, 11, 128,
|
|
128, 68, 68, 34, 89, 34, 36, 0, 11, 39,
|
|
11, 171, 36, 39, 36, 11, 11, 138, 58, 58,
|
|
38, 38, 0, 39, 52, 52, 34, 89, 34, 36,
|
|
38, 11, 0, 11, 171, 36, 0, 36, 11, 11,
|
|
58, 34, 38, 129, 129, 38, 11, 12, 12, 52,
|
|
36, 54, 54, 54, 54, 72, 72, 55, 55, 68,
|
|
0, 54, 0, 58, 0, 38, 12, 12, 38, 12,
|
|
177, 12, 52, 54, 12, 12, 58, 0, 38, 55,
|
|
73, 73, 52, 74, 74, 55, 134, 134, 137, 12,
|
|
|
|
12, 0, 12, 177, 12, 137, 54, 12, 12, 0,
|
|
71, 71, 55, 57, 57, 12, 15, 15, 55, 54,
|
|
60, 60, 0, 72, 174, 55, 81, 81, 137, 57,
|
|
60, 0, 15, 57, 15, 174, 71, 0, 83, 83,
|
|
15, 15, 60, 15, 57, 91, 91, 174, 73, 93,
|
|
93, 74, 57, 64, 64, 15, 57, 15, 174, 71,
|
|
70, 70, 199, 15, 15, 60, 15, 57, 71, 64,
|
|
0, 57, 64, 0, 15, 17, 17, 0, 60, 94,
|
|
94, 64, 70, 0, 81, 199, 70, 17, 144, 144,
|
|
77, 77, 64, 17, 0, 64, 83, 78, 78, 17,
|
|
|
|
17, 84, 84, 91, 64, 70, 77, 93, 94, 70,
|
|
17, 64, 0, 78, 146, 146, 17, 77, 70, 84,
|
|
82, 82, 17, 17, 97, 97, 0, 90, 90, 77,
|
|
0, 94, 0, 17, 22, 22, 78, 94, 82, 201,
|
|
77, 202, 84, 0, 82, 205, 22, 0, 77, 90,
|
|
22, 100, 100, 150, 150, 78, 104, 104, 0, 84,
|
|
22, 82, 201, 22, 202, 88, 88, 82, 205, 22,
|
|
106, 106, 90, 22, 87, 87, 87, 87, 82, 92,
|
|
92, 0, 97, 22, 87, 90, 22, 88, 88, 0,
|
|
99, 99, 22, 23, 23, 0, 87, 0, 98, 98,
|
|
|
|
108, 108, 107, 107, 112, 112, 151, 151, 92, 100,
|
|
88, 88, 92, 23, 104, 23, 98, 23, 99, 87,
|
|
166, 166, 23, 88, 107, 0, 98, 0, 106, 168,
|
|
168, 92, 87, 113, 113, 92, 23, 92, 23, 98,
|
|
23, 99, 0, 105, 105, 23, 0, 107, 99, 98,
|
|
0, 23, 25, 25, 0, 105, 98, 0, 108, 105,
|
|
107, 0, 112, 0, 25, 0, 25, 115, 115, 105,
|
|
0, 25, 0, 110, 110, 118, 118, 0, 105, 117,
|
|
117, 25, 105, 122, 122, 127, 127, 25, 0, 25,
|
|
0, 113, 105, 110, 25, 110, 200, 200, 117, 139,
|
|
|
|
139, 105, 152, 152, 25, 119, 119, 127, 149, 149,
|
|
25, 44, 44, 0, 132, 132, 110, 149, 110, 119,
|
|
44, 117, 0, 44, 119, 115, 0, 44, 153, 153,
|
|
127, 110, 44, 118, 206, 206, 44, 117, 0, 132,
|
|
149, 122, 119, 127, 130, 130, 44, 119, 157, 157,
|
|
44, 126, 126, 126, 126, 44, 0, 139, 0, 44,
|
|
152, 0, 132, 119, 130, 0, 130, 212, 212, 44,
|
|
47, 47, 132, 126, 47, 47, 47, 47, 47, 47,
|
|
47, 155, 155, 0, 159, 159, 153, 130, 0, 130,
|
|
195, 195, 47, 195, 0, 47, 126, 155, 219, 219,
|
|
|
|
136, 136, 130, 161, 161, 0, 157, 140, 140, 126,
|
|
225, 225, 131, 131, 0, 47, 213, 213, 47, 213,
|
|
155, 136, 131, 196, 196, 136, 142, 142, 47, 50,
|
|
50, 0, 140, 196, 131, 228, 228, 131, 50, 155,
|
|
0, 50, 159, 50, 136, 50, 229, 229, 136, 214,
|
|
214, 142, 0, 142, 50, 140, 50, 131, 136, 214,
|
|
131, 161, 162, 162, 50, 140, 50, 0, 50, 0,
|
|
131, 143, 143, 0, 142, 0, 142, 50, 0, 50,
|
|
0, 162, 0, 143, 142, 164, 164, 50, 62, 62,
|
|
0, 147, 147, 147, 147, 0, 143, 0, 143, 165,
|
|
|
|
165, 147, 154, 154, 162, 0, 143, 62, 62, 0,
|
|
167, 167, 62, 147, 237, 237, 62, 0, 154, 143,
|
|
162, 143, 148, 148, 148, 148, 191, 191, 191, 143,
|
|
62, 62, 0, 154, 0, 62, 147, 181, 181, 62,
|
|
0, 154, 0, 164, 148, 0, 62, 96, 96, 147,
|
|
158, 158, 169, 169, 170, 170, 154, 165, 0, 181,
|
|
154, 96, 96, 96, 0, 172, 172, 148, 167, 158,
|
|
182, 182, 96, 175, 175, 96, 186, 186, 158, 182,
|
|
148, 172, 181, 0, 96, 96, 96, 0, 187, 187,
|
|
244, 244, 158, 172, 0, 96, 160, 160, 96, 173,
|
|
|
|
173, 158, 182, 0, 172, 96, 103, 103, 158, 0,
|
|
169, 0, 170, 190, 190, 160, 172, 0, 103, 0,
|
|
103, 246, 246, 172, 160, 103, 0, 173, 103, 197,
|
|
197, 175, 103, 103, 186, 0, 178, 178, 160, 178,
|
|
0, 103, 0, 103, 180, 180, 187, 160, 103, 0,
|
|
173, 103, 185, 185, 160, 103, 103, 173, 178, 0,
|
|
183, 183, 0, 180, 103, 0, 180, 193, 193, 193,
|
|
0, 190, 203, 203, 183, 207, 207, 0, 185, 183,
|
|
0, 178, 183, 184, 184, 0, 180, 197, 0, 180,
|
|
208, 208, 208, 0, 178, 179, 179, 183, 210, 210,
|
|
|
|
210, 185, 183, 215, 215, 183, 220, 220, 0, 179,
|
|
185, 184, 184, 184, 179, 222, 222, 179, 224, 224,
|
|
226, 226, 179, 226, 0, 193, 227, 227, 0, 227,
|
|
203, 0, 179, 207, 184, 184, 184, 179, 230, 230,
|
|
179, 184, 226, 231, 231, 179, 233, 233, 227, 232,
|
|
232, 235, 235, 238, 238, 0, 210, 241, 241, 245,
|
|
245, 215, 245, 0, 220, 226, 242, 242, 242, 247,
|
|
247, 227, 0, 222, 233, 0, 224, 232, 226, 232,
|
|
243, 243, 243, 249, 249, 251, 251, 252, 252, 255,
|
|
255, 255, 256, 256, 257, 257, 230, 233, 259, 259,
|
|
|
|
232, 231, 232, 0, 233, 258, 258, 232, 258, 235,
|
|
0, 238, 260, 260, 0, 241, 0, 245, 262, 262,
|
|
262, 264, 264, 0, 242, 267, 267, 247, 267, 266,
|
|
266, 0, 266, 268, 268, 269, 269, 0, 243, 270,
|
|
270, 271, 271, 251, 0, 252, 0, 255, 277, 277,
|
|
256, 266, 273, 273, 273, 0, 259, 275, 275, 275,
|
|
278, 278, 0, 258, 281, 281, 283, 283, 285, 285,
|
|
260, 286, 286, 0, 266, 288, 288, 288, 0, 264,
|
|
290, 290, 290, 292, 292, 294, 294, 266, 295, 295,
|
|
297, 297, 0, 269, 0, 298, 298, 270, 298, 271,
|
|
|
|
299, 299, 301, 301, 301, 304, 304, 304, 305, 305,
|
|
306, 306, 307, 307, 0, 275, 308, 308, 278, 309,
|
|
309, 310, 310, 310, 283, 0, 285, 314, 314, 286,
|
|
313, 313, 313, 315, 315, 316, 316, 316, 290, 318,
|
|
318, 292, 320, 320, 320, 0, 295, 321, 321, 322,
|
|
322, 323, 323, 298, 325, 325, 326, 326, 299, 0,
|
|
301, 328, 328, 304, 328, 0, 305, 329, 329, 0,
|
|
307, 331, 331, 331, 332, 332, 0, 309, 0, 310,
|
|
333, 333, 334, 334, 0, 314, 336, 336, 313, 337,
|
|
337, 338, 338, 340, 340, 340, 0, 318, 342, 342,
|
|
|
|
320, 343, 343, 344, 344, 321, 0, 322, 0, 323,
|
|
346, 346, 346, 0, 326, 348, 348, 350, 350, 351,
|
|
351, 351, 352, 352, 0, 329, 353, 353, 0, 331,
|
|
358, 358, 332, 355, 355, 355, 359, 359, 333, 0,
|
|
334, 357, 357, 357, 336, 360, 360, 363, 363, 338,
|
|
0, 340, 365, 365, 367, 367, 342, 368, 368, 369,
|
|
369, 344, 370, 370, 0, 0, 0, 0, 346, 0,
|
|
0, 0, 0, 348, 0, 0, 0, 351, 0, 0,
|
|
352, 0, 0, 0, 353, 0, 0, 0, 358, 0,
|
|
0, 0, 0, 0, 359, 0, 0, 0, 0, 357,
|
|
|
|
0, 0, 0, 360, 0, 363, 0, 0, 0, 0,
|
|
365, 0, 0, 0, 0, 0, 0, 369, 0, 0,
|
|
370, 373, 373, 373, 373, 373, 373, 373, 373, 373,
|
|
373, 374, 0, 0, 374, 374, 374, 374, 375, 0,
|
|
0, 375, 0, 375, 376, 376, 376, 376, 376, 376,
|
|
376, 0, 376, 377, 0, 0, 377, 377, 377, 377,
|
|
377, 377, 378, 378, 378, 378, 378, 378, 378, 0,
|
|
378, 379, 0, 0, 379, 0, 379, 0, 0, 379,
|
|
380, 0, 0, 380, 0, 0, 0, 0, 380, 381,
|
|
0, 0, 381, 0, 381, 0, 0, 381, 382, 0,
|
|
|
|
0, 382, 0, 382, 0, 0, 382, 383, 0, 383,
|
|
384, 0, 0, 384, 0, 0, 0, 0, 384, 385,
|
|
0, 385, 386, 0, 386, 386, 0, 386, 386, 0,
|
|
386, 387, 387, 0, 387, 0, 387, 0, 0, 387,
|
|
388, 0, 388, 388, 0, 388, 389, 0, 0, 389,
|
|
0, 389, 390, 0, 0, 390, 0, 390, 391, 391,
|
|
0, 391, 0, 391, 0, 0, 391, 392, 0, 392,
|
|
392, 0, 392, 393, 0, 0, 393, 0, 393, 394,
|
|
0, 394, 394, 0, 394, 394, 395, 0, 0, 395,
|
|
0, 395, 396, 0, 396, 397, 0, 397, 398, 0,
|
|
|
|
398, 398, 0, 398, 399, 399, 0, 399, 0, 399,
|
|
0, 0, 399, 400, 400, 400, 400, 400, 400, 400,
|
|
400, 400, 400, 401, 401, 401, 401, 401, 401, 401,
|
|
401, 401, 401, 402, 402, 0, 402, 0, 402, 0,
|
|
0, 402, 403, 403, 0, 403, 0, 403, 0, 0,
|
|
403, 404, 0, 404, 405, 405, 0, 405, 0, 405,
|
|
0, 0, 405, 406, 0, 406, 407, 0, 0, 407,
|
|
0, 407, 408, 0, 0, 408, 0, 408, 409, 409,
|
|
0, 409, 0, 409, 0, 0, 409, 410, 410, 0,
|
|
410, 0, 410, 0, 0, 410, 411, 0, 0, 411,
|
|
|
|
0, 411, 412, 0, 412, 413, 0, 0, 413, 0,
|
|
413, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372, 372, 372, 372, 372, 372, 372, 372, 372,
|
|
372, 372
|
|
} ;
|
|
|
|
static yy_state_type yy_last_accepting_state;
|
|
static char *yy_last_accepting_cpos;
|
|
|
|
extern int debug_flex_debug;
|
|
int debug_flex_debug = 0;
|
|
|
|
/* The intent behind this definition is that it'll catch
|
|
* any uses of REJECT which flex missed.
|
|
*/
|
|
#define REJECT reject_used_but_not_detected
|
|
#define yymore() yymore_used_but_not_detected
|
|
#define YY_MORE_ADJ 0
|
|
#define YY_RESTORE_YY_MORE_OFFSET
|
|
char *debugtext;
|
|
#line 1 "debug.l"
|
|
/*
|
|
* Apple // emulator for Linux: Lexer for debugger
|
|
*
|
|
* Copyright 1994 Alexander Jean-Claude Bottema
|
|
* Copyright 1995 Stephen Lee
|
|
* Copyright 1997, 1998 Aaron Culliney
|
|
* Copyright 1998, 1999, 2000 Michael Deutschmann
|
|
*
|
|
* This software package is subject to the GNU General Public License
|
|
* version 2 or later (your choice) as published by the Free Software
|
|
* Foundation.
|
|
*
|
|
* THERE ARE NO WARRANTIES WHATSOEVER.
|
|
*
|
|
*/
|
|
/* ASSUMPTIONS:
|
|
* flex version 2.5.2 or later
|
|
*
|
|
*/
|
|
#line 24 "debug.l"
|
|
|
|
/* process includes only the second time we parse this file. */
|
|
#include "misc.h"
|
|
#include "interface.h"
|
|
#include "debug.h"
|
|
#include "disk.h"
|
|
#include "video.h"
|
|
#include "keys.h"
|
|
#include <unistd.h>
|
|
#include <strings.h>
|
|
#include <ctype.h>
|
|
#include "cpu.h"
|
|
|
|
|
|
YY_BUFFER_STATE buffer = 0;
|
|
|
|
/*
|
|
d{is} {lc1|lc2} {/bank/}{addr} {+}{len}
|
|
m{em} {lc1|lc2} {/bank/}{addr} {+}{len}
|
|
a{scii} {lc1|lc2} {/bank/}{addr} {+}{len}
|
|
r{egs}
|
|
<addr> {lc1|lc2} : <byteseq>
|
|
bload <file> <addrs>
|
|
bsave <file> /<bank>/<addrs> <len>
|
|
(s{tep} | n{ext}) {len}
|
|
f{inish}
|
|
u{ntil}
|
|
g{o} {addr}
|
|
sea{rch} {lc1|lc2} <bytes>
|
|
(b{reak} | w{atch}) {addr}
|
|
(b{reak} | w{atch}) {addr}
|
|
b{reak} op <byte>
|
|
(c{lear} | i{gnore}) {num}
|
|
c{lear} op <byte>
|
|
key <byte>
|
|
sta{tus}
|
|
l{ang}
|
|
dr{ive}
|
|
vm
|
|
fr{esh}
|
|
(? | h{elp})
|
|
*/
|
|
|
|
#line 1086 "debug.c"
|
|
|
|
#define INITIAL 0
|
|
|
|
#ifndef YY_NO_UNISTD_H
|
|
/* Special case for "unistd.h", since it is non-ANSI. We include it way
|
|
* down here because we want the user's section 1 to have been scanned first.
|
|
* The user has a chance to override it with an option.
|
|
*/
|
|
#include <unistd.h>
|
|
#endif
|
|
|
|
#ifndef YY_EXTRA_TYPE
|
|
#define YY_EXTRA_TYPE void *
|
|
#endif
|
|
|
|
static int yy_init_globals (void );
|
|
|
|
/* Accessor methods to globals.
|
|
These are made visible to non-reentrant scanners for convenience. */
|
|
|
|
int debuglex_destroy (void );
|
|
|
|
int debugget_debug (void );
|
|
|
|
void debugset_debug (int debug_flag );
|
|
|
|
YY_EXTRA_TYPE debugget_extra (void );
|
|
|
|
void debugset_extra (YY_EXTRA_TYPE user_defined );
|
|
|
|
FILE *debugget_in (void );
|
|
|
|
void debugset_in (FILE * in_str );
|
|
|
|
FILE *debugget_out (void );
|
|
|
|
void debugset_out (FILE * out_str );
|
|
|
|
int debugget_leng (void );
|
|
|
|
char *debugget_text (void );
|
|
|
|
int debugget_lineno (void );
|
|
|
|
void debugset_lineno (int line_number );
|
|
|
|
/* Macros after this point can all be overridden by user definitions in
|
|
* section 1.
|
|
*/
|
|
|
|
#ifndef YY_SKIP_YYWRAP
|
|
#ifdef __cplusplus
|
|
extern "C" int debugwrap (void );
|
|
#else
|
|
extern int debugwrap (void );
|
|
#endif
|
|
#endif
|
|
|
|
// static void yyunput (int c,char *buf_ptr );
|
|
|
|
#ifndef yytext_ptr
|
|
static void yy_flex_strncpy (char *,yyconst char *,int );
|
|
#endif
|
|
|
|
#ifdef YY_NEED_STRLEN
|
|
static int yy_flex_strlen (yyconst char * );
|
|
#endif
|
|
|
|
#ifndef YY_NO_INPUT
|
|
|
|
#if 0
|
|
#ifdef __cplusplus
|
|
static int yyinput (void );
|
|
#else
|
|
static int input (void );
|
|
#endif
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/* Amount of stuff to slurp up with each read. */
|
|
#ifndef YY_READ_BUF_SIZE
|
|
#ifdef __ia64__
|
|
/* On IA-64, the buffer size is 16k, not 8k */
|
|
#define YY_READ_BUF_SIZE 16384
|
|
#else
|
|
#define YY_READ_BUF_SIZE 8192
|
|
#endif /* __ia64__ */
|
|
#endif
|
|
|
|
/* Copy whatever the last rule matched to the standard output. */
|
|
#ifndef ECHO
|
|
/* This used to be an fputs(), but since the string might contain NUL's,
|
|
* we now use fwrite().
|
|
*/
|
|
#define ECHO do { if (fwrite( debugtext, debugleng, 1, debugout )) {} } while (0)
|
|
#endif
|
|
|
|
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
|
* is returned in "result".
|
|
*/
|
|
#ifndef YY_INPUT
|
|
#define YY_INPUT(buf,result,max_size) \
|
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
|
{ \
|
|
int c = '*'; \
|
|
size_t n; \
|
|
for ( n = 0; n < max_size && \
|
|
(c = getc( debugin )) != EOF && c != '\n'; ++n ) \
|
|
buf[n] = (char) c; \
|
|
if ( c == '\n' ) \
|
|
buf[n++] = (char) c; \
|
|
if ( c == EOF && ferror( debugin ) ) \
|
|
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
|
result = n; \
|
|
} \
|
|
else \
|
|
{ \
|
|
errno=0; \
|
|
while ( (result = fread(buf, 1, max_size, debugin))==0 && ferror(debugin)) \
|
|
{ \
|
|
if( errno != EINTR) \
|
|
{ \
|
|
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
|
break; \
|
|
} \
|
|
errno=0; \
|
|
clearerr(debugin); \
|
|
} \
|
|
}\
|
|
\
|
|
|
|
#endif
|
|
|
|
/* No semi-colon after return; correct usage is to write "yyterminate();" -
|
|
* we don't want an extra ';' after the "return" because that will cause
|
|
* some compilers to complain about unreachable statements.
|
|
*/
|
|
#ifndef yyterminate
|
|
#define yyterminate() return YY_NULL
|
|
#endif
|
|
|
|
/* Number of entries by which start-condition stack grows. */
|
|
#ifndef YY_START_STACK_INCR
|
|
#define YY_START_STACK_INCR 25
|
|
#endif
|
|
|
|
/* Report a fatal error. */
|
|
#ifndef YY_FATAL_ERROR
|
|
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
|
|
#endif
|
|
|
|
/* end tables serialization structures and prototypes */
|
|
|
|
/* Default declaration of generated scanner - a define so the user can
|
|
* easily add parameters.
|
|
*/
|
|
#ifndef YY_DECL
|
|
#define YY_DECL_IS_OURS 1
|
|
|
|
extern int debuglex (void);
|
|
|
|
#define YY_DECL int debuglex (void)
|
|
#endif /* !YY_DECL */
|
|
|
|
/* Code executed at the beginning of each rule, after debugtext and debugleng
|
|
* have been set up.
|
|
*/
|
|
#ifndef YY_USER_ACTION
|
|
#define YY_USER_ACTION
|
|
#endif
|
|
|
|
/* Code executed at the end of each rule. */
|
|
#ifndef YY_BREAK
|
|
#define YY_BREAK break;
|
|
#endif
|
|
|
|
#define YY_RULE_SETUP \
|
|
if ( debugleng > 0 ) \
|
|
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
|
|
(debugtext[debugleng - 1] == '\n'); \
|
|
YY_USER_ACTION
|
|
|
|
/** The main scanner function which does all the work.
|
|
*/
|
|
YY_DECL
|
|
{
|
|
register yy_state_type yy_current_state;
|
|
register char *yy_cp, *yy_bp;
|
|
register int yy_act;
|
|
|
|
#line 80 "debug.l"
|
|
|
|
|
|
|
|
|
|
#line 1281 "debug.c"
|
|
|
|
if ( !(yy_init) )
|
|
{
|
|
(yy_init) = 1;
|
|
|
|
#ifdef YY_USER_INIT
|
|
YY_USER_INIT;
|
|
#endif
|
|
|
|
if ( ! (yy_start) )
|
|
(yy_start) = 1; /* first start state */
|
|
|
|
if ( ! debugin )
|
|
debugin = stdin;
|
|
|
|
if ( ! debugout )
|
|
debugout = stdout;
|
|
|
|
if ( ! YY_CURRENT_BUFFER ) {
|
|
debugensure_buffer_stack ();
|
|
YY_CURRENT_BUFFER_LVALUE =
|
|
debug_create_buffer(debugin,YY_BUF_SIZE );
|
|
}
|
|
|
|
debug_load_buffer_state( );
|
|
}
|
|
|
|
while ( 1 ) /* loops until end-of-file is reached */
|
|
{
|
|
yy_cp = (yy_c_buf_p);
|
|
|
|
/* Support of debugtext. */
|
|
*yy_cp = (yy_hold_char);
|
|
|
|
/* yy_bp points to the position in yy_ch_buf of the start of
|
|
* the current run.
|
|
*/
|
|
yy_bp = yy_cp;
|
|
|
|
yy_current_state = (yy_start);
|
|
yy_current_state += YY_AT_BOL();
|
|
yy_match:
|
|
do
|
|
{
|
|
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
|
|
if ( yy_accept[yy_current_state] )
|
|
{
|
|
(yy_last_accepting_state) = yy_current_state;
|
|
(yy_last_accepting_cpos) = yy_cp;
|
|
}
|
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
{
|
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
if ( yy_current_state >= 373 )
|
|
yy_c = yy_meta[(unsigned int) yy_c];
|
|
}
|
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
|
++yy_cp;
|
|
}
|
|
while ( yy_base[yy_current_state] != 1812 );
|
|
|
|
yy_find_action:
|
|
yy_act = yy_accept[yy_current_state];
|
|
if ( yy_act == 0 )
|
|
{ /* have to back up */
|
|
yy_cp = (yy_last_accepting_cpos);
|
|
yy_current_state = (yy_last_accepting_state);
|
|
yy_act = yy_accept[yy_current_state];
|
|
}
|
|
|
|
YY_DO_BEFORE_ACTION;
|
|
|
|
do_action: /* This label is used only to access EOF actions. */
|
|
|
|
switch ( yy_act )
|
|
{ /* beginning of action switch */
|
|
case 0: /* must back up */
|
|
/* undo the effects of YY_DO_BEFORE_ACTION */
|
|
*yy_cp = (yy_hold_char);
|
|
yy_cp = (yy_last_accepting_cpos);
|
|
yy_current_state = (yy_last_accepting_state);
|
|
goto yy_find_action;
|
|
|
|
case 1:
|
|
/* rule 1 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 84 "debug.l"
|
|
{
|
|
/* mem <addrs> <len> */
|
|
int do_ascii = 0;
|
|
|
|
if (tolower(debugtext[0]) == 'a')
|
|
do_ascii = 1;
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
arg2 = strtol(debugtext, &debugtext, 16);
|
|
dump_mem(arg1, arg2, 0, do_ascii, -1);
|
|
return MEM;
|
|
}
|
|
YY_BREAK
|
|
case 2:
|
|
/* rule 2 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 98 "debug.l"
|
|
{
|
|
/* mem /<bank>/<addrs> <len> */
|
|
int do_ascii = 0;
|
|
|
|
if (tolower(debugtext[0]) == 'a')
|
|
do_ascii = 1;
|
|
while (*debugtext != '/') ++debugtext;
|
|
++debugtext; /* after / */
|
|
arg3 = strtol(debugtext, &debugtext, 10);
|
|
++debugtext; /* after / */
|
|
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
arg2 = strtol(debugtext, &debugtext, 16);
|
|
dump_mem(arg1, arg2, 0, do_ascii, arg3);
|
|
return MEM;
|
|
}
|
|
YY_BREAK
|
|
case 3:
|
|
/* rule 3 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 115 "debug.l"
|
|
{
|
|
/* mem <addrs> */
|
|
int do_ascii = 0;
|
|
|
|
if (tolower(debugtext[0]) == 'a')
|
|
do_ascii = 1;
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
dump_mem(arg1, 256, 0, do_ascii, -1);
|
|
return MEM;
|
|
}
|
|
YY_BREAK
|
|
case 4:
|
|
/* rule 4 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 128 "debug.l"
|
|
{
|
|
/* mem /<bank>/<addrs> */
|
|
int do_ascii = 0;
|
|
|
|
if (tolower(debugtext[0]) == 'a')
|
|
do_ascii = 1;
|
|
while (*debugtext != '/') ++debugtext;
|
|
++debugtext; /* after / */
|
|
arg3 = strtol(debugtext, &debugtext, 10);
|
|
++debugtext; /* after / */
|
|
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
dump_mem(arg1, 256, 0, do_ascii, arg3);
|
|
return MEM;
|
|
}
|
|
YY_BREAK
|
|
case 5:
|
|
/* rule 5 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 144 "debug.l"
|
|
{
|
|
/* mem +<len> */
|
|
int do_ascii = 0;
|
|
|
|
if (tolower(debugtext[0]) == 'a')
|
|
do_ascii = 1;
|
|
while (*debugtext != '+') ++debugtext;
|
|
++debugtext;
|
|
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
dump_mem(cpu65_current.pc, arg1, 0, do_ascii, -1);
|
|
return MEM;
|
|
}
|
|
YY_BREAK
|
|
case 6:
|
|
/* rule 6 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 158 "debug.l"
|
|
{
|
|
/* dump mem from current location */
|
|
int do_ascii = 0;
|
|
|
|
if (tolower(debugtext[0]) == 'a')
|
|
do_ascii = 1;
|
|
dump_mem(cpu65_current.pc, 256, 0, do_ascii, -1);
|
|
return MEM;
|
|
}
|
|
YY_BREAK
|
|
case 7:
|
|
/* rule 7 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 168 "debug.l"
|
|
{
|
|
/* dump mem from lc<bank> <addrs> <len> */
|
|
int do_ascii = 0;
|
|
int lc;
|
|
|
|
if (tolower(debugtext[0]) == 'a')
|
|
do_ascii = 1;
|
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
|
|
|
lc = strtol(debugtext, &debugtext, 10);
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
arg2 = strtol(debugtext, &debugtext, 16);
|
|
|
|
dump_mem(arg1, arg2, lc, do_ascii, -1);
|
|
return MEM;
|
|
}
|
|
YY_BREAK
|
|
case 8:
|
|
/* rule 8 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 186 "debug.l"
|
|
{
|
|
/* dump mem from lc<bank> /<bank>/<addrs> <len> */
|
|
int do_ascii = 0;
|
|
int lc;
|
|
|
|
if (tolower(debugtext[0]) == 'a')
|
|
do_ascii = 1;
|
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
|
lc = strtol(debugtext, &debugtext, 10);
|
|
|
|
while (*debugtext != '/') ++debugtext;
|
|
++debugtext; /* after / */
|
|
arg3 = strtol(debugtext, &debugtext, 10);
|
|
++debugtext; /* after / */
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
arg2 = strtol(debugtext, &debugtext, 16);
|
|
|
|
dump_mem(arg1, arg2, lc, do_ascii, arg3);
|
|
return MEM;
|
|
}
|
|
YY_BREAK
|
|
case 9:
|
|
/* rule 9 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 208 "debug.l"
|
|
{
|
|
/* dump mem from lc<bank> <addrs> */
|
|
int do_ascii = 0;
|
|
int lc;
|
|
|
|
if (tolower(debugtext[0]) == 'a')
|
|
do_ascii = 1;
|
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
|
|
|
lc = strtol(debugtext, &debugtext, 10);
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
|
|
dump_mem(arg1, 256, lc, do_ascii, -1);
|
|
return MEM;
|
|
}
|
|
YY_BREAK
|
|
case 10:
|
|
/* rule 10 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 225 "debug.l"
|
|
{
|
|
/* dump mem from lc<bank> /<bank>/<addrs> */
|
|
int do_ascii = 0;
|
|
int lc;
|
|
|
|
if (tolower(debugtext[0]) == 'a')
|
|
do_ascii = 1;
|
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
|
lc = strtol(debugtext, &debugtext, 10);
|
|
|
|
while (*debugtext != '/') ++debugtext;
|
|
++debugtext; /* after / */
|
|
arg3 = strtol(debugtext, &debugtext, 10);
|
|
++debugtext; /* after / */
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
|
|
dump_mem(arg1, 256, lc, do_ascii, arg3);
|
|
return MEM;
|
|
}
|
|
YY_BREAK
|
|
case 11:
|
|
/* rule 11 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 246 "debug.l"
|
|
{
|
|
/* disassemble at <addrs> <len> */
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
arg2 = strtol(debugtext, &debugtext, 16);
|
|
|
|
disasm(arg1, arg2, 0, -1);
|
|
return DIS;
|
|
}
|
|
YY_BREAK
|
|
case 12:
|
|
/* rule 12 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 257 "debug.l"
|
|
{
|
|
/* disassemble at /<bank>/<addrs> <len> */
|
|
while (*debugtext != '/') ++debugtext;
|
|
++debugtext; /* after / */
|
|
arg3 = strtol(debugtext, &debugtext, 10);
|
|
++debugtext; /* after / */
|
|
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
arg2 = strtol(debugtext, &debugtext, 16);
|
|
|
|
disasm(arg1, arg2, 0, arg3);
|
|
return DIS;
|
|
}
|
|
YY_BREAK
|
|
case 13:
|
|
/* rule 13 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 271 "debug.l"
|
|
{
|
|
/* disassemble at <addrs> */
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
arg2 = 256;
|
|
if ((arg1 < 0) || (arg1 > 65535)) arg1 = cpu65_current.pc;
|
|
|
|
disasm(arg1, arg2, 0, -1);
|
|
return DIS;
|
|
}
|
|
YY_BREAK
|
|
case 14:
|
|
/* rule 14 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 283 "debug.l"
|
|
{
|
|
/* disassemble at /<bank>/<addrs> */
|
|
while (*debugtext != '/') ++debugtext;
|
|
++debugtext; /* after / */
|
|
arg3 = strtol(debugtext, &debugtext, 10);
|
|
++debugtext; /* after / */
|
|
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
arg2 = 256;
|
|
if ((arg1 < 0) || (arg1 > 65535)) arg1 = cpu65_current.pc;
|
|
|
|
disasm(arg1, arg2, 0, arg3);
|
|
return DIS;
|
|
}
|
|
YY_BREAK
|
|
case 15:
|
|
/* rule 15 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 298 "debug.l"
|
|
{
|
|
/* disassemble current location +<len> */
|
|
while (*debugtext != '+') ++debugtext;
|
|
++debugtext;
|
|
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
disasm(cpu65_current.pc, arg1, 0, -1);
|
|
return DIS;
|
|
}
|
|
YY_BREAK
|
|
case 16:
|
|
/* rule 16 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 308 "debug.l"
|
|
{
|
|
/* disassemble current location */
|
|
disasm(cpu65_current.pc, 256, 0, -1);
|
|
return DIS;
|
|
}
|
|
YY_BREAK
|
|
case 17:
|
|
/* rule 17 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 314 "debug.l"
|
|
{
|
|
/* disassemble language<bank> <addr> <len> */
|
|
int lc;
|
|
|
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
|
|
|
lc = strtol(debugtext, &debugtext, 10);
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
arg2 = strtol(debugtext, &debugtext, 16);
|
|
|
|
disasm(arg1, arg2, lc, -1);
|
|
return DIS;
|
|
}
|
|
YY_BREAK
|
|
case 18:
|
|
/* rule 18 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 329 "debug.l"
|
|
{
|
|
/* disassemble language<bank> /<bank>/<addr> <len> */
|
|
int lc;
|
|
|
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
|
lc = strtol(debugtext, &debugtext, 10);
|
|
|
|
while (*debugtext != '/') ++debugtext;
|
|
++debugtext; /* after / */
|
|
arg3 = strtol(debugtext, &debugtext, 10);
|
|
++debugtext; /* after / */
|
|
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
arg2 = strtol(debugtext, &debugtext, 16);
|
|
|
|
disasm(arg1, arg2, lc, arg3);
|
|
return DIS;
|
|
}
|
|
YY_BREAK
|
|
case 19:
|
|
/* rule 19 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 349 "debug.l"
|
|
{
|
|
/* disassemble language<bank> <addr> */
|
|
int lc;
|
|
|
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
|
|
|
lc = strtol(debugtext, &debugtext, 10);
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
|
|
disasm(arg1, 256, lc, -1);
|
|
return DIS;
|
|
}
|
|
YY_BREAK
|
|
case 20:
|
|
/* rule 20 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 363 "debug.l"
|
|
{
|
|
/* disassemble language<bank> /<bank>/<addr> */
|
|
int lc;
|
|
|
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
|
lc = strtol(debugtext, &debugtext, 10);
|
|
|
|
while (*debugtext != '/') ++debugtext;
|
|
++debugtext; /* after / */
|
|
arg3 = strtol(debugtext, &debugtext, 10);
|
|
++debugtext; /* after / */
|
|
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
|
|
disasm(arg1, 256, lc, arg3);
|
|
return DIS;
|
|
}
|
|
YY_BREAK
|
|
case 21:
|
|
/* rule 21 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 382 "debug.l"
|
|
{
|
|
/* show cpu state */
|
|
show_regs();
|
|
return REGS;
|
|
}
|
|
YY_BREAK
|
|
case 22:
|
|
/* rule 22 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 388 "debug.l"
|
|
{
|
|
/* set memory <addr> : <hex string> */
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
|
|
while (*debugtext != ':') ++debugtext; ++debugtext;
|
|
while (isspace(*debugtext)) ++debugtext;
|
|
|
|
set_mem(arg1, debugtext);
|
|
return SETMEM;
|
|
}
|
|
YY_BREAK
|
|
case 23:
|
|
/* rule 23 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 399 "debug.l"
|
|
{
|
|
/* set LC memory <addr> lc1|lc2 : <hex string> */
|
|
int lc;
|
|
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
|
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
|
lc = strtol(debugtext, &debugtext, 10);
|
|
++debugtext; while (isspace(*debugtext)) ++debugtext;
|
|
|
|
set_lc_mem(arg1, lc, debugtext);
|
|
return SETMEM;
|
|
}
|
|
YY_BREAK
|
|
case 24:
|
|
/* rule 24 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 414 "debug.l"
|
|
{
|
|
/* bload <file> <addr> */
|
|
FILE *fp = NULL;
|
|
char *ptr = NULL;
|
|
char name[128];
|
|
int len = -1;
|
|
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
while (isspace(*debugtext)) ++debugtext;
|
|
ptr = debugtext;
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
len = debugtext-ptr;
|
|
|
|
/* filename */
|
|
strncpy(name, ptr, len);
|
|
name[len] = '\0';
|
|
|
|
/* bload addr */
|
|
while (isspace(*debugtext)) ++debugtext;
|
|
arg1 = strtol(debugtext, (char**)NULL, 16);
|
|
|
|
fp = fopen(name, "r");
|
|
if (fp == NULL) {
|
|
sprintf(second_buf[num_buffer_lines++], "problem: %s", name);
|
|
perror(name);
|
|
return BLOAD;
|
|
}
|
|
|
|
bload(fp, name, arg1);
|
|
fclose(fp);
|
|
return BLOAD;
|
|
}
|
|
YY_BREAK
|
|
case 25:
|
|
/* rule 25 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 447 "debug.l"
|
|
{
|
|
/* step / step next instruction */
|
|
if (*debugtext == 'n') step_next = 1;
|
|
|
|
do_step_or_next(1);
|
|
return STEP;
|
|
}
|
|
YY_BREAK
|
|
case 26:
|
|
/* rule 26 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 455 "debug.l"
|
|
{
|
|
/* step / step next <n> instructions */
|
|
if (*debugtext == 'n') step_next = 1;
|
|
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
|
|
arg1 = strtol(debugtext, (char**)NULL, 16);
|
|
if ((arg1 < 1) || (arg1 > 255)) arg1 = 255;
|
|
|
|
do_step_or_next(arg1);
|
|
return STEP;
|
|
}
|
|
YY_BREAK
|
|
case 27:
|
|
/* rule 27 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 468 "debug.l"
|
|
{
|
|
int step_frame = 1;
|
|
unsigned char op;
|
|
|
|
/* step until finished with curent stack frame */
|
|
while ((c_mygetch(0) == -1) && !at_haltpt()) {
|
|
op = get_current_opcode();
|
|
|
|
if (op == 0x20) ++step_frame; /* JSR */
|
|
if (op == 0x60) --step_frame; /* RTS */
|
|
|
|
if (!step_frame) break; /* finished */
|
|
begin_cpu_step();
|
|
}
|
|
end_cpu_step(); /* print location */
|
|
return FINISH;
|
|
}
|
|
YY_BREAK
|
|
case 28:
|
|
/* rule 28 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 486 "debug.l"
|
|
{
|
|
/* step until PC == next instruction. good for finishing backward
|
|
loops */
|
|
unsigned char op;
|
|
int delta=0;
|
|
op = get_current_opcode();
|
|
|
|
switch (opcodes[op].mode)
|
|
{
|
|
case addr_implied:
|
|
case addr_accumulator:
|
|
delta = 1;
|
|
break;
|
|
case addr_immediate:
|
|
case addr_zeropage:
|
|
case addr_zeropage_x:
|
|
case addr_zeropage_y:
|
|
case addr_indirect:
|
|
case addr_indirect_x:
|
|
case addr_indirect_y:
|
|
case addr_relative:
|
|
delta = 2;
|
|
break;
|
|
case addr_absolute:
|
|
case addr_absolute_x:
|
|
case addr_absolute_y:
|
|
case addr_j_indirect:
|
|
case addr_j_indirect_x:
|
|
delta = 3;
|
|
break;
|
|
}
|
|
|
|
arg1 = cpu65_current.pc + delta;
|
|
|
|
while ((cpu65_current.pc != arg1) && !at_haltpt() && (c_mygetch(0) == -1))
|
|
begin_cpu_step();
|
|
end_cpu_step(); /* print location */
|
|
return UNTIL;
|
|
}
|
|
YY_BREAK
|
|
case 29:
|
|
/* rule 29 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 526 "debug.l"
|
|
{
|
|
/* jump to addrs and run while remaining in debugger console */
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
|
|
/* DANGEROUS! */
|
|
cpu65_current.pc = strtol(debugtext, (char**)NULL, 16);
|
|
while (!at_haltpt() && (c_mygetch(0) == -1))
|
|
begin_cpu_step();
|
|
end_cpu_step(); /* print location */
|
|
return GO;
|
|
}
|
|
YY_BREAK
|
|
case 30:
|
|
/* rule 30 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 538 "debug.l"
|
|
{
|
|
/* run while remaining in debugger console */
|
|
while (!at_haltpt() && (c_mygetch(0) == -1))
|
|
begin_cpu_step();
|
|
end_cpu_step(); /* print location */
|
|
return GO;
|
|
}
|
|
YY_BREAK
|
|
case 31:
|
|
/* rule 31 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 546 "debug.l"
|
|
{
|
|
/* set watchpoint */
|
|
set_halt(watchpoints, cpu65_current.pc);
|
|
return WATCH;
|
|
}
|
|
YY_BREAK
|
|
case 32:
|
|
/* rule 32 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 552 "debug.l"
|
|
{
|
|
/* set watchpoint */
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
|
|
arg1 = strtol(debugtext, (char**)NULL, 16);
|
|
if ((arg1 < 0) || (arg1 > 65535)) {
|
|
sprintf(second_buf[num_buffer_lines++], "invalid address");
|
|
return WATCH;
|
|
}
|
|
|
|
set_halt(watchpoints, arg1);
|
|
return WATCH;
|
|
}
|
|
YY_BREAK
|
|
case 33:
|
|
/* rule 33 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 567 "debug.l"
|
|
{
|
|
/* set breakpoint */
|
|
set_halt(breakpoints, cpu65_current.pc);
|
|
return BREAK;
|
|
}
|
|
YY_BREAK
|
|
case 34:
|
|
/* rule 34 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 573 "debug.l"
|
|
{
|
|
/* set breakpoint */
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
|
|
arg1 = strtol(debugtext, (char**)NULL, 16);
|
|
if ((arg1 < 0) || (arg1 > 65535)) {
|
|
sprintf(second_buf[num_buffer_lines++], "invalid address");
|
|
return BREAK;
|
|
}
|
|
|
|
set_halt(breakpoints, arg1);
|
|
return BREAK;
|
|
}
|
|
YY_BREAK
|
|
case 35:
|
|
/* rule 35 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 587 "debug.l"
|
|
{
|
|
/* set breakpoint */
|
|
while (!(*debugtext == 'p')) ++debugtext;
|
|
++debugtext;
|
|
|
|
arg1 = strtol(debugtext, (char**)NULL, 16);
|
|
if ((arg1 < 0) || (arg1 > 0xFF)) {
|
|
sprintf(second_buf[num_buffer_lines++], "invalid opcode");
|
|
return BREAK;
|
|
}
|
|
|
|
set_halt_opcode((unsigned char)arg1);
|
|
return BREAK;
|
|
}
|
|
YY_BREAK
|
|
case 36:
|
|
/* rule 36 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 602 "debug.l"
|
|
{
|
|
/* set opcode breakpoints on 65c02 instructions */
|
|
set_halt_65c02();
|
|
return BREAK;
|
|
}
|
|
YY_BREAK
|
|
case 37:
|
|
/* rule 37 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 608 "debug.l"
|
|
{
|
|
/* ignore everything */
|
|
clear_halt(watchpoints, 0);
|
|
sprintf(second_buf[num_buffer_lines++], "ignored all");
|
|
return IGNORE;
|
|
}
|
|
YY_BREAK
|
|
case 38:
|
|
/* rule 38 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 615 "debug.l"
|
|
{
|
|
/* ignore <watchpt> ... */
|
|
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
|
|
while (*debugtext) {
|
|
arg1 = strtol(debugtext, &debugtext, 10);
|
|
if ((arg1 < 1) || (arg1 > MAX_BRKPTS)) {
|
|
sprintf(second_buf[num_buffer_lines++], "invalid watchpoint");
|
|
return IGNORE;
|
|
}
|
|
clear_halt(watchpoints, arg1);
|
|
sprintf(second_buf[num_buffer_lines++], "ignored %d", arg1);
|
|
}
|
|
return IGNORE;
|
|
}
|
|
YY_BREAK
|
|
case 39:
|
|
/* rule 39 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 633 "debug.l"
|
|
{
|
|
/* clear everything */
|
|
clear_halt(breakpoints, 0);
|
|
sprintf(second_buf[num_buffer_lines++], "cleared all");
|
|
return CLEAR;
|
|
}
|
|
YY_BREAK
|
|
case 40:
|
|
/* rule 40 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 640 "debug.l"
|
|
{
|
|
/* clear <breakpt> ... */
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
|
|
while (*debugtext) {
|
|
arg1 = strtol(debugtext, &debugtext, 10);
|
|
if ((arg1 < 1) || (arg1 > MAX_BRKPTS)) {
|
|
sprintf(second_buf[num_buffer_lines++], "invalid breakpoint");
|
|
return CLEAR;
|
|
}
|
|
clear_halt(breakpoints, arg1);
|
|
sprintf(second_buf[num_buffer_lines++], "cleared %d", arg1);
|
|
}
|
|
return CLEAR;
|
|
}
|
|
YY_BREAK
|
|
case 41:
|
|
/* rule 41 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 656 "debug.l"
|
|
{
|
|
/* clear <opcode breakpt> ... */
|
|
while (!(*debugtext == 'p')) ++debugtext;
|
|
++debugtext;
|
|
|
|
while (*debugtext) {
|
|
arg1 = strtol(debugtext, &debugtext, 16);
|
|
if ((arg1 < 0) || (arg1 > 255)) {
|
|
sprintf(second_buf[num_buffer_lines++], "invalid opcode");
|
|
return CLEAR;
|
|
}
|
|
clear_halt_opcode((unsigned char)arg1);
|
|
sprintf(second_buf[num_buffer_lines++], "cleared opcode %02X",
|
|
(unsigned char)arg1);
|
|
}
|
|
return CLEAR;
|
|
}
|
|
YY_BREAK
|
|
case 42:
|
|
/* rule 42 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 674 "debug.l"
|
|
{
|
|
/* clear 65c02 ... */
|
|
clear_halt_65c02();
|
|
return CLEAR;
|
|
}
|
|
YY_BREAK
|
|
case 43:
|
|
/* rule 43 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 680 "debug.l"
|
|
{
|
|
/* show breakpoints and watchpoints */
|
|
show_breakpts();
|
|
return STATUS;
|
|
}
|
|
YY_BREAK
|
|
case 44:
|
|
/* rule 44 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 686 "debug.l"
|
|
{
|
|
/* show opcode breakpoints */
|
|
show_opcode_breakpts();
|
|
return OPCODES;
|
|
}
|
|
YY_BREAK
|
|
case 45:
|
|
/* rule 45 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 692 "debug.l"
|
|
{
|
|
/* search main memory for <bytes> */
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
while (isspace(*debugtext)) ++debugtext;
|
|
|
|
search_mem(debugtext, 0, -1);
|
|
|
|
return SEARCH;
|
|
}
|
|
YY_BREAK
|
|
case 46:
|
|
/* rule 46 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 702 "debug.l"
|
|
{
|
|
/* search memory<bank> for <bytes> */
|
|
while (*debugtext != '/') ++debugtext;
|
|
++debugtext; /* after / */
|
|
arg3 = strtol(debugtext, &debugtext, 10);
|
|
++debugtext; /* after / */
|
|
while (isspace(*debugtext)) ++debugtext;
|
|
|
|
search_mem(debugtext, 0, arg3);
|
|
|
|
return SEARCH;
|
|
}
|
|
YY_BREAK
|
|
case 47:
|
|
/* rule 47 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 715 "debug.l"
|
|
{
|
|
/* search LC<bank> for <bytes> */
|
|
int lc;
|
|
|
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
|
lc = strtol(debugtext, &debugtext, 10);
|
|
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
while (isspace(*debugtext)) ++debugtext;
|
|
|
|
search_mem(debugtext, lc, -1);
|
|
|
|
return SEARCH;
|
|
}
|
|
YY_BREAK
|
|
case 48:
|
|
/* rule 48 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 731 "debug.l"
|
|
{
|
|
/* search LC<bank> memory<bank> for <bytes> */
|
|
int lc;
|
|
|
|
while (tolower(*debugtext) != 'l') ++debugtext; ++debugtext;
|
|
if (tolower(*debugtext) == 'c') ++debugtext;
|
|
lc = strtol(debugtext, &debugtext, 10);
|
|
|
|
while (*debugtext != '/') ++debugtext;
|
|
++debugtext; /* after / */
|
|
arg3 = strtol(debugtext, &debugtext, 10);
|
|
++debugtext; /* after / */
|
|
while (isspace(*debugtext)) ++debugtext;
|
|
|
|
search_mem(debugtext, lc, arg3);
|
|
|
|
return SEARCH;
|
|
}
|
|
YY_BREAK
|
|
case 49:
|
|
/* rule 49 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 750 "debug.l"
|
|
{
|
|
/* send key code to emulator */
|
|
unsigned char key;
|
|
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
while (isspace(*debugtext)) ++debugtext;
|
|
key = (unsigned char) strtol(debugtext, &debugtext, 16);
|
|
|
|
apple_ii_64k[0][0xC000] = key;
|
|
apple_ii_64k[1][0xC000] = key;
|
|
}
|
|
YY_BREAK
|
|
case 50:
|
|
/* rule 50 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 762 "debug.l"
|
|
{
|
|
/* display language card settings */
|
|
show_lc_info();
|
|
return LC;
|
|
}
|
|
YY_BREAK
|
|
case 51:
|
|
/* rule 51 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 768 "debug.l"
|
|
{
|
|
/* show disk settings */
|
|
show_disk_info();
|
|
return DRIVE;
|
|
}
|
|
YY_BREAK
|
|
case 52:
|
|
/* rule 52 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 774 "debug.l"
|
|
{
|
|
/* show other VM softswitch settings */
|
|
show_misc_info();
|
|
return VM;
|
|
}
|
|
YY_BREAK
|
|
case 53:
|
|
/* rule 53 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 780 "debug.l"
|
|
{
|
|
/* refresh the screen */
|
|
clear_debugger_screen();
|
|
}
|
|
YY_BREAK
|
|
case 54:
|
|
/* rule 54 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 785 "debug.l"
|
|
{
|
|
display_help();
|
|
return HELP;
|
|
}
|
|
YY_BREAK
|
|
case 55:
|
|
/* rule 55 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 790 "debug.l"
|
|
{
|
|
/* bsave <file> /<bank>/<addr> <len> */
|
|
/* save memory dump to file */
|
|
FILE *fp = NULL;
|
|
char *ptr = NULL;
|
|
int len, start, len2, bank;
|
|
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
while (isspace(*debugtext)) ++debugtext;
|
|
|
|
/* copy file name */
|
|
ptr = debugtext;
|
|
while (!isspace(*debugtext)) ++debugtext;
|
|
len = debugtext - ptr;
|
|
strncpy(temp, ptr, len);
|
|
temp[len] = '\0';
|
|
|
|
/* get bank info */
|
|
while (*debugtext != '/') ++debugtext;
|
|
++debugtext;
|
|
bank = strtol(debugtext, &debugtext, 10);
|
|
++debugtext;
|
|
|
|
/* extract start and len */
|
|
start = strtol(debugtext, &debugtext, 16);
|
|
len2 = strtol(debugtext, &debugtext, 16);
|
|
|
|
fp = fopen(temp, "w"); /* try to open file for writing */
|
|
if (fp == NULL) {
|
|
sprintf(second_buf[num_buffer_lines++], "problem: %s", temp);
|
|
perror(temp);
|
|
return BSAVE;
|
|
}
|
|
len = fwrite(apple_ii_64k[bank]+start, 1, len2, fp);
|
|
if (len < len2) {
|
|
sprintf(second_buf[num_buffer_lines++], "problem: %s", temp);
|
|
perror(temp);
|
|
fclose(fp);
|
|
return BSAVE;
|
|
}
|
|
|
|
sprintf(second_buf[num_buffer_lines++], "bsaved: %s", temp);
|
|
fclose(fp);
|
|
return BSAVE;
|
|
}
|
|
YY_BREAK
|
|
case 56:
|
|
/* rule 56 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 836 "debug.l"
|
|
{
|
|
/* log debugger output to file - not implemented */
|
|
return LOG;
|
|
}
|
|
YY_BREAK
|
|
case 57:
|
|
/* rule 57 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 841 "debug.l"
|
|
{
|
|
/* save apple2 state to a .img file - not implemented I'd like to
|
|
* be compatible with the applePC emulator's .img format. anyone
|
|
* have documentation on this? -ASC
|
|
**/
|
|
return SAVE;
|
|
}
|
|
YY_BREAK
|
|
case 58:
|
|
/* rule 58 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 850 "debug.l"
|
|
/* ignore newlines */
|
|
YY_BREAK
|
|
case 59:
|
|
YY_RULE_SETUP
|
|
#line 852 "debug.l"
|
|
/* ignore extraneous characters */
|
|
YY_BREAK
|
|
case 60:
|
|
YY_RULE_SETUP
|
|
#line 855 "debug.l"
|
|
ECHO;
|
|
YY_BREAK
|
|
#line 2372 "debug.c"
|
|
case YY_STATE_EOF(INITIAL):
|
|
yyterminate();
|
|
|
|
case YY_END_OF_BUFFER:
|
|
{
|
|
/* Amount of text matched not including the EOB char. */
|
|
int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
|
|
|
|
/* Undo the effects of YY_DO_BEFORE_ACTION. */
|
|
*yy_cp = (yy_hold_char);
|
|
YY_RESTORE_YY_MORE_OFFSET
|
|
|
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
|
|
{
|
|
/* We're scanning a new file or input source. It's
|
|
* possible that this happened because the user
|
|
* just pointed debugin at a new source and called
|
|
* debuglex(). If so, then we have to assure
|
|
* consistency between YY_CURRENT_BUFFER and our
|
|
* globals. Here is the right place to do so, because
|
|
* this is the first action (other than possibly a
|
|
* back-up) that will match for the new input source.
|
|
*/
|
|
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
|
|
YY_CURRENT_BUFFER_LVALUE->yy_input_file = debugin;
|
|
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
|
|
}
|
|
|
|
/* Note that here we test for yy_c_buf_p "<=" to the position
|
|
* of the first EOB in the buffer, since yy_c_buf_p will
|
|
* already have been incremented past the NUL character
|
|
* (since all states make transitions on EOB to the
|
|
* end-of-buffer state). Contrast this with the test
|
|
* in input().
|
|
*/
|
|
if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
|
|
{ /* This was really a NUL. */
|
|
yy_state_type yy_next_state;
|
|
|
|
(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
|
|
|
|
yy_current_state = yy_get_previous_state( );
|
|
|
|
/* Okay, we're now positioned to make the NUL
|
|
* transition. We couldn't have
|
|
* yy_get_previous_state() go ahead and do it
|
|
* for us because it doesn't know how to deal
|
|
* with the possibility of jamming (and we don't
|
|
* want to build jamming into it because then it
|
|
* will run more slowly).
|
|
*/
|
|
|
|
yy_next_state = yy_try_NUL_trans( yy_current_state );
|
|
|
|
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
|
|
|
if ( yy_next_state )
|
|
{
|
|
/* Consume the NUL. */
|
|
yy_cp = ++(yy_c_buf_p);
|
|
yy_current_state = yy_next_state;
|
|
goto yy_match;
|
|
}
|
|
|
|
else
|
|
{
|
|
yy_cp = (yy_c_buf_p);
|
|
goto yy_find_action;
|
|
}
|
|
}
|
|
|
|
else switch ( yy_get_next_buffer( ) )
|
|
{
|
|
case EOB_ACT_END_OF_FILE:
|
|
{
|
|
(yy_did_buffer_switch_on_eof) = 0;
|
|
|
|
if ( debugwrap( ) )
|
|
{
|
|
/* Note: because we've taken care in
|
|
* yy_get_next_buffer() to have set up
|
|
* debugtext, we can now set up
|
|
* yy_c_buf_p so that if some total
|
|
* hoser (like flex itself) wants to
|
|
* call the scanner after we return the
|
|
* YY_NULL, it'll still work - another
|
|
* YY_NULL will get returned.
|
|
*/
|
|
(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
|
|
|
|
yy_act = YY_STATE_EOF(YY_START);
|
|
goto do_action;
|
|
}
|
|
|
|
else
|
|
{
|
|
if ( ! (yy_did_buffer_switch_on_eof) )
|
|
YY_NEW_FILE;
|
|
}
|
|
break;
|
|
}
|
|
|
|
case EOB_ACT_CONTINUE_SCAN:
|
|
(yy_c_buf_p) =
|
|
(yytext_ptr) + yy_amount_of_matched_text;
|
|
|
|
yy_current_state = yy_get_previous_state( );
|
|
|
|
yy_cp = (yy_c_buf_p);
|
|
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
|
goto yy_match;
|
|
|
|
case EOB_ACT_LAST_MATCH:
|
|
(yy_c_buf_p) =
|
|
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
|
|
|
|
yy_current_state = yy_get_previous_state( );
|
|
|
|
yy_cp = (yy_c_buf_p);
|
|
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
|
goto yy_find_action;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default:
|
|
YY_FATAL_ERROR(
|
|
"fatal flex scanner internal error--no action found" );
|
|
} /* end of action switch */
|
|
} /* end of scanning one token */
|
|
} /* end of debuglex */
|
|
|
|
/* yy_get_next_buffer - try to read in a new buffer
|
|
*
|
|
* Returns a code representing an action:
|
|
* EOB_ACT_LAST_MATCH -
|
|
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
|
|
* EOB_ACT_END_OF_FILE - end of file
|
|
*/
|
|
static int yy_get_next_buffer (void)
|
|
{
|
|
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
|
|
register char *source = (yytext_ptr);
|
|
register int number_to_move, i;
|
|
int ret_val;
|
|
|
|
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
|
|
YY_FATAL_ERROR(
|
|
"fatal flex scanner internal error--end of buffer missed" );
|
|
|
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
|
|
{ /* Don't try to fill the buffer, so this is an EOF. */
|
|
if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
|
|
{
|
|
/* We matched a single character, the EOB, so
|
|
* treat this as a final EOF.
|
|
*/
|
|
return EOB_ACT_END_OF_FILE;
|
|
}
|
|
|
|
else
|
|
{
|
|
/* We matched some text prior to the EOB, first
|
|
* process it.
|
|
*/
|
|
return EOB_ACT_LAST_MATCH;
|
|
}
|
|
}
|
|
|
|
/* Try to read more data. */
|
|
|
|
/* First move last chars to start of buffer. */
|
|
number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
|
|
|
|
for ( i = 0; i < number_to_move; ++i )
|
|
*(dest++) = *(source++);
|
|
|
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
|
|
/* don't do the read, it's not guaranteed to return an EOF,
|
|
* just force an EOF
|
|
*/
|
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
|
|
|
|
else
|
|
{
|
|
int num_to_read =
|
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
|
|
|
|
while ( num_to_read <= 0 )
|
|
{ /* Not enough room in the buffer - grow it. */
|
|
|
|
/* just a shorter name for the current buffer */
|
|
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
|
|
|
|
int yy_c_buf_p_offset =
|
|
(int) ((yy_c_buf_p) - b->yy_ch_buf);
|
|
|
|
if ( b->yy_is_our_buffer )
|
|
{
|
|
int new_size = b->yy_buf_size * 2;
|
|
|
|
if ( new_size <= 0 )
|
|
b->yy_buf_size += b->yy_buf_size / 8;
|
|
else
|
|
b->yy_buf_size *= 2;
|
|
|
|
b->yy_ch_buf = (char *)
|
|
/* Include room in for 2 EOB chars. */
|
|
debugrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
|
|
}
|
|
else
|
|
/* Can't grow it, we don't own it. */
|
|
b->yy_ch_buf = 0;
|
|
|
|
if ( ! b->yy_ch_buf )
|
|
YY_FATAL_ERROR(
|
|
"fatal error - scanner input buffer overflow" );
|
|
|
|
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
|
|
|
|
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
|
|
number_to_move - 1;
|
|
|
|
}
|
|
|
|
if ( num_to_read > YY_READ_BUF_SIZE )
|
|
num_to_read = YY_READ_BUF_SIZE;
|
|
|
|
/* Read in more data. */
|
|
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
|
|
(yy_n_chars), (size_t) num_to_read );
|
|
|
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
|
}
|
|
|
|
if ( (yy_n_chars) == 0 )
|
|
{
|
|
if ( number_to_move == YY_MORE_ADJ )
|
|
{
|
|
ret_val = EOB_ACT_END_OF_FILE;
|
|
debugrestart(debugin );
|
|
}
|
|
|
|
else
|
|
{
|
|
ret_val = EOB_ACT_LAST_MATCH;
|
|
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
|
|
YY_BUFFER_EOF_PENDING;
|
|
}
|
|
}
|
|
|
|
else
|
|
ret_val = EOB_ACT_CONTINUE_SCAN;
|
|
|
|
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
|
/* Extend the array by 50%, plus the number we really need. */
|
|
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
|
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) debugrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
|
|
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
|
|
}
|
|
|
|
(yy_n_chars) += number_to_move;
|
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
|
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
|
|
|
|
(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
|
|
|
|
return ret_val;
|
|
}
|
|
|
|
/* yy_get_previous_state - get the state just before the EOB char was reached */
|
|
|
|
static yy_state_type yy_get_previous_state (void)
|
|
{
|
|
register yy_state_type yy_current_state;
|
|
register char *yy_cp;
|
|
|
|
yy_current_state = (yy_start);
|
|
yy_current_state += YY_AT_BOL();
|
|
|
|
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
|
|
{
|
|
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 60);
|
|
if ( yy_accept[yy_current_state] )
|
|
{
|
|
(yy_last_accepting_state) = yy_current_state;
|
|
(yy_last_accepting_cpos) = yy_cp;
|
|
}
|
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
{
|
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
if ( yy_current_state >= 373 )
|
|
yy_c = yy_meta[(unsigned int) yy_c];
|
|
}
|
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
|
}
|
|
|
|
return yy_current_state;
|
|
}
|
|
|
|
/* yy_try_NUL_trans - try to make a transition on the NUL character
|
|
*
|
|
* synopsis
|
|
* next_state = yy_try_NUL_trans( current_state );
|
|
*/
|
|
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
|
|
{
|
|
register int yy_is_jam;
|
|
register char *yy_cp = (yy_c_buf_p);
|
|
|
|
register YY_CHAR yy_c = 60;
|
|
if ( yy_accept[yy_current_state] )
|
|
{
|
|
(yy_last_accepting_state) = yy_current_state;
|
|
(yy_last_accepting_cpos) = yy_cp;
|
|
}
|
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
{
|
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
if ( yy_current_state >= 373 )
|
|
yy_c = yy_meta[(unsigned int) yy_c];
|
|
}
|
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
|
yy_is_jam = (yy_current_state == 372);
|
|
|
|
return yy_is_jam ? 0 : yy_current_state;
|
|
}
|
|
|
|
#if 0
|
|
static void yyunput (int c, register char * yy_bp )
|
|
{
|
|
register char *yy_cp;
|
|
|
|
yy_cp = (yy_c_buf_p);
|
|
|
|
/* undo effects of setting up debugtext */
|
|
*yy_cp = (yy_hold_char);
|
|
|
|
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
|
|
{ /* need to shift things up to make room */
|
|
/* +2 for EOB chars. */
|
|
register int number_to_move = (yy_n_chars) + 2;
|
|
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
|
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
|
|
register char *source =
|
|
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
|
|
|
|
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
|
*--dest = *--source;
|
|
|
|
yy_cp += (int) (dest - source);
|
|
yy_bp += (int) (dest - source);
|
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
|
|
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
|
|
|
|
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
|
|
YY_FATAL_ERROR( "flex scanner push-back overflow" );
|
|
}
|
|
|
|
*--yy_cp = (char) c;
|
|
|
|
(yytext_ptr) = yy_bp;
|
|
(yy_hold_char) = *yy_cp;
|
|
(yy_c_buf_p) = yy_cp;
|
|
}
|
|
|
|
#ifndef YY_NO_INPUT
|
|
#ifdef __cplusplus
|
|
static int yyinput (void)
|
|
#else
|
|
static int input (void)
|
|
#endif
|
|
|
|
{
|
|
int c;
|
|
|
|
*(yy_c_buf_p) = (yy_hold_char);
|
|
|
|
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
|
|
{
|
|
/* yy_c_buf_p now points to the character we want to return.
|
|
* If this occurs *before* the EOB characters, then it's a
|
|
* valid NUL; if not, then we've hit the end of the buffer.
|
|
*/
|
|
if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
|
|
/* This was really a NUL. */
|
|
*(yy_c_buf_p) = '\0';
|
|
|
|
else
|
|
{ /* need more input */
|
|
int offset = (yy_c_buf_p) - (yytext_ptr);
|
|
++(yy_c_buf_p);
|
|
|
|
switch ( yy_get_next_buffer( ) )
|
|
{
|
|
case EOB_ACT_LAST_MATCH:
|
|
/* This happens because yy_g_n_b()
|
|
* sees that we've accumulated a
|
|
* token and flags that we need to
|
|
* try matching the token before
|
|
* proceeding. But for input(),
|
|
* there's no matching to consider.
|
|
* So convert the EOB_ACT_LAST_MATCH
|
|
* to EOB_ACT_END_OF_FILE.
|
|
*/
|
|
|
|
/* Reset buffer status. */
|
|
debugrestart(debugin );
|
|
|
|
/*FALLTHROUGH*/
|
|
|
|
case EOB_ACT_END_OF_FILE:
|
|
{
|
|
if ( debugwrap( ) )
|
|
return EOF;
|
|
|
|
if ( ! (yy_did_buffer_switch_on_eof) )
|
|
YY_NEW_FILE;
|
|
#ifdef __cplusplus
|
|
return yyinput();
|
|
#else
|
|
return input();
|
|
#endif
|
|
}
|
|
|
|
case EOB_ACT_CONTINUE_SCAN:
|
|
(yy_c_buf_p) = (yytext_ptr) + offset;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
|
|
*(yy_c_buf_p) = '\0'; /* preserve debugtext */
|
|
(yy_hold_char) = *++(yy_c_buf_p);
|
|
|
|
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
|
|
|
|
return c;
|
|
}
|
|
#endif /* ifndef YY_NO_INPUT */
|
|
#endif
|
|
|
|
/** Immediately switch to a different input stream.
|
|
* @param input_file A readable stream.
|
|
*
|
|
* @note This function does not reset the start condition to @c INITIAL .
|
|
*/
|
|
void debugrestart (FILE * input_file )
|
|
{
|
|
|
|
if ( ! YY_CURRENT_BUFFER ){
|
|
debugensure_buffer_stack ();
|
|
YY_CURRENT_BUFFER_LVALUE =
|
|
debug_create_buffer(debugin,YY_BUF_SIZE );
|
|
}
|
|
|
|
debug_init_buffer(YY_CURRENT_BUFFER,input_file );
|
|
debug_load_buffer_state( );
|
|
}
|
|
|
|
/** Switch to a different input buffer.
|
|
* @param new_buffer The new input buffer.
|
|
*
|
|
*/
|
|
void debug_switch_to_buffer (YY_BUFFER_STATE new_buffer )
|
|
{
|
|
|
|
/* TODO. We should be able to replace this entire function body
|
|
* with
|
|
* debugpop_buffer_state();
|
|
* debugpush_buffer_state(new_buffer);
|
|
*/
|
|
debugensure_buffer_stack ();
|
|
if ( YY_CURRENT_BUFFER == new_buffer )
|
|
return;
|
|
|
|
if ( YY_CURRENT_BUFFER )
|
|
{
|
|
/* Flush out information for old buffer. */
|
|
*(yy_c_buf_p) = (yy_hold_char);
|
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
|
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
|
}
|
|
|
|
YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
|
debug_load_buffer_state( );
|
|
|
|
/* We don't actually know whether we did this switch during
|
|
* EOF (debugwrap()) processing, but the only time this flag
|
|
* is looked at is after debugwrap() is called, so it's safe
|
|
* to go ahead and always set it.
|
|
*/
|
|
(yy_did_buffer_switch_on_eof) = 1;
|
|
}
|
|
|
|
static void debug_load_buffer_state (void)
|
|
{
|
|
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
|
|
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
|
|
debugin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
|
|
(yy_hold_char) = *(yy_c_buf_p);
|
|
}
|
|
|
|
/** Allocate and initialize an input buffer state.
|
|
* @param file A readable stream.
|
|
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
|
|
*
|
|
* @return the allocated buffer state.
|
|
*/
|
|
YY_BUFFER_STATE debug_create_buffer (FILE * file, int size )
|
|
{
|
|
YY_BUFFER_STATE b;
|
|
|
|
b = (YY_BUFFER_STATE) debugalloc(sizeof( struct yy_buffer_state ) );
|
|
if ( ! b )
|
|
YY_FATAL_ERROR( "out of dynamic memory in debug_create_buffer()" );
|
|
|
|
b->yy_buf_size = size;
|
|
|
|
/* yy_ch_buf has to be 2 characters longer than the size given because
|
|
* we need to put in 2 end-of-buffer characters.
|
|
*/
|
|
b->yy_ch_buf = (char *) debugalloc(b->yy_buf_size + 2 );
|
|
if ( ! b->yy_ch_buf )
|
|
YY_FATAL_ERROR( "out of dynamic memory in debug_create_buffer()" );
|
|
|
|
b->yy_is_our_buffer = 1;
|
|
|
|
debug_init_buffer(b,file );
|
|
|
|
return b;
|
|
}
|
|
|
|
/** Destroy the buffer.
|
|
* @param b a buffer created with debug_create_buffer()
|
|
*
|
|
*/
|
|
void debug_delete_buffer (YY_BUFFER_STATE b )
|
|
{
|
|
|
|
if ( ! b )
|
|
return;
|
|
|
|
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
|
|
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
|
|
|
if ( b->yy_is_our_buffer )
|
|
debugfree((void *) b->yy_ch_buf );
|
|
|
|
debugfree((void *) b );
|
|
}
|
|
|
|
#ifndef __cplusplus
|
|
extern int isatty (int );
|
|
#endif /* __cplusplus */
|
|
|
|
/* Initializes or reinitializes a buffer.
|
|
* This function is sometimes called more than once on the same buffer,
|
|
* such as during a debugrestart() or at EOF.
|
|
*/
|
|
static void debug_init_buffer (YY_BUFFER_STATE b, FILE * file )
|
|
|
|
{
|
|
int oerrno = errno;
|
|
|
|
debug_flush_buffer(b );
|
|
|
|
b->yy_input_file = file;
|
|
b->yy_fill_buffer = 1;
|
|
|
|
/* If b is the current buffer, then debug_init_buffer was _probably_
|
|
* called from debugrestart() or through yy_get_next_buffer.
|
|
* In that case, we don't want to reset the lineno or column.
|
|
*/
|
|
if (b != YY_CURRENT_BUFFER){
|
|
b->yy_bs_lineno = 1;
|
|
b->yy_bs_column = 0;
|
|
}
|
|
|
|
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
|
|
|
errno = oerrno;
|
|
}
|
|
|
|
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
|
|
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
|
|
*
|
|
*/
|
|
void debug_flush_buffer (YY_BUFFER_STATE b )
|
|
{
|
|
if ( ! b )
|
|
return;
|
|
|
|
b->yy_n_chars = 0;
|
|
|
|
/* We always need two end-of-buffer characters. The first causes
|
|
* a transition to the end-of-buffer state. The second causes
|
|
* a jam in that state.
|
|
*/
|
|
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
|
|
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
|
|
|
|
b->yy_buf_pos = &b->yy_ch_buf[0];
|
|
|
|
b->yy_at_bol = 1;
|
|
b->yy_buffer_status = YY_BUFFER_NEW;
|
|
|
|
if ( b == YY_CURRENT_BUFFER )
|
|
debug_load_buffer_state( );
|
|
}
|
|
|
|
/** Pushes the new state onto the stack. The new state becomes
|
|
* the current state. This function will allocate the stack
|
|
* if necessary.
|
|
* @param new_buffer The new state.
|
|
*
|
|
*/
|
|
void debugpush_buffer_state (YY_BUFFER_STATE new_buffer )
|
|
{
|
|
if (new_buffer == NULL)
|
|
return;
|
|
|
|
debugensure_buffer_stack();
|
|
|
|
/* This block is copied from debug_switch_to_buffer. */
|
|
if ( YY_CURRENT_BUFFER )
|
|
{
|
|
/* Flush out information for old buffer. */
|
|
*(yy_c_buf_p) = (yy_hold_char);
|
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
|
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
|
}
|
|
|
|
/* Only push if top exists. Otherwise, replace top. */
|
|
if (YY_CURRENT_BUFFER)
|
|
(yy_buffer_stack_top)++;
|
|
YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
|
|
|
/* copied from debug_switch_to_buffer. */
|
|
debug_load_buffer_state( );
|
|
(yy_did_buffer_switch_on_eof) = 1;
|
|
}
|
|
|
|
/** Removes and deletes the top of the stack, if present.
|
|
* The next element becomes the new top.
|
|
*
|
|
*/
|
|
void debugpop_buffer_state (void)
|
|
{
|
|
if (!YY_CURRENT_BUFFER)
|
|
return;
|
|
|
|
debug_delete_buffer(YY_CURRENT_BUFFER );
|
|
YY_CURRENT_BUFFER_LVALUE = NULL;
|
|
if ((yy_buffer_stack_top) > 0)
|
|
--(yy_buffer_stack_top);
|
|
|
|
if (YY_CURRENT_BUFFER) {
|
|
debug_load_buffer_state( );
|
|
(yy_did_buffer_switch_on_eof) = 1;
|
|
}
|
|
}
|
|
|
|
/* Allocates the stack if it does not exist.
|
|
* Guarantees space for at least one push.
|
|
*/
|
|
static void debugensure_buffer_stack (void)
|
|
{
|
|
int num_to_alloc;
|
|
|
|
if (!(yy_buffer_stack)) {
|
|
|
|
/* First allocation is just for 2 elements, since we don't know if this
|
|
* scanner will even need a stack. We use 2 instead of 1 to avoid an
|
|
* immediate realloc on the next call.
|
|
*/
|
|
num_to_alloc = 1;
|
|
(yy_buffer_stack) = (struct yy_buffer_state**)debugalloc
|
|
(num_to_alloc * sizeof(struct yy_buffer_state*)
|
|
);
|
|
if ( ! (yy_buffer_stack) )
|
|
YY_FATAL_ERROR( "out of dynamic memory in debugensure_buffer_stack()" );
|
|
|
|
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
|
|
|
|
(yy_buffer_stack_max) = num_to_alloc;
|
|
(yy_buffer_stack_top) = 0;
|
|
return;
|
|
}
|
|
|
|
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
|
|
|
|
/* Increase the buffer to prepare for a possible push. */
|
|
int grow_size = 8 /* arbitrary grow size */;
|
|
|
|
num_to_alloc = (yy_buffer_stack_max) + grow_size;
|
|
(yy_buffer_stack) = (struct yy_buffer_state**)debugrealloc
|
|
((yy_buffer_stack),
|
|
num_to_alloc * sizeof(struct yy_buffer_state*)
|
|
);
|
|
if ( ! (yy_buffer_stack) )
|
|
YY_FATAL_ERROR( "out of dynamic memory in debugensure_buffer_stack()" );
|
|
|
|
/* zero only the new slots.*/
|
|
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
|
|
(yy_buffer_stack_max) = num_to_alloc;
|
|
}
|
|
}
|
|
|
|
/** Setup the input buffer state to scan directly from a user-specified character buffer.
|
|
* @param base the character buffer
|
|
* @param size the size in bytes of the character buffer
|
|
*
|
|
* @return the newly allocated buffer state object.
|
|
*/
|
|
YY_BUFFER_STATE debug_scan_buffer (char * base, yy_size_t size )
|
|
{
|
|
YY_BUFFER_STATE b;
|
|
|
|
if ( size < 2 ||
|
|
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
|
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
|
/* They forgot to leave room for the EOB's. */
|
|
return 0;
|
|
|
|
b = (YY_BUFFER_STATE) debugalloc(sizeof( struct yy_buffer_state ) );
|
|
if ( ! b )
|
|
YY_FATAL_ERROR( "out of dynamic memory in debug_scan_buffer()" );
|
|
|
|
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
|
|
b->yy_buf_pos = b->yy_ch_buf = base;
|
|
b->yy_is_our_buffer = 0;
|
|
b->yy_input_file = 0;
|
|
b->yy_n_chars = b->yy_buf_size;
|
|
b->yy_is_interactive = 0;
|
|
b->yy_at_bol = 1;
|
|
b->yy_fill_buffer = 0;
|
|
b->yy_buffer_status = YY_BUFFER_NEW;
|
|
|
|
debug_switch_to_buffer(b );
|
|
|
|
return b;
|
|
}
|
|
|
|
/** Setup the input buffer state to scan a string. The next call to debuglex() will
|
|
* scan from a @e copy of @a str.
|
|
* @param yystr a NUL-terminated string to scan
|
|
*
|
|
* @return the newly allocated buffer state object.
|
|
* @note If you want to scan bytes that may contain NUL values, then use
|
|
* debug_scan_bytes() instead.
|
|
*/
|
|
YY_BUFFER_STATE debug_scan_string (yyconst char * yystr )
|
|
{
|
|
|
|
return debug_scan_bytes(yystr,strlen(yystr) );
|
|
}
|
|
|
|
/** Setup the input buffer state to scan the given bytes. The next call to debuglex() will
|
|
* scan from a @e copy of @a bytes.
|
|
* @param yybytes the byte buffer to scan
|
|
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
|
*
|
|
* @return the newly allocated buffer state object.
|
|
*/
|
|
YY_BUFFER_STATE debug_scan_bytes (yyconst char * yybytes, int _yybytes_len )
|
|
{
|
|
YY_BUFFER_STATE b;
|
|
char *buf;
|
|
yy_size_t n;
|
|
int i;
|
|
|
|
/* Get memory for full buffer, including space for trailing EOB's. */
|
|
n = _yybytes_len + 2;
|
|
buf = (char *) debugalloc(n );
|
|
if ( ! buf )
|
|
YY_FATAL_ERROR( "out of dynamic memory in debug_scan_bytes()" );
|
|
|
|
for ( i = 0; i < _yybytes_len; ++i )
|
|
buf[i] = yybytes[i];
|
|
|
|
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
|
|
|
|
b = debug_scan_buffer(buf,n );
|
|
if ( ! b )
|
|
YY_FATAL_ERROR( "bad buffer in debug_scan_bytes()" );
|
|
|
|
/* It's okay to grow etc. this buffer, and we should throw it
|
|
* away when we're done.
|
|
*/
|
|
b->yy_is_our_buffer = 1;
|
|
|
|
return b;
|
|
}
|
|
|
|
#ifndef YY_EXIT_FAILURE
|
|
#define YY_EXIT_FAILURE 2
|
|
#endif
|
|
|
|
static void yy_fatal_error (yyconst char* msg )
|
|
{
|
|
(void) fprintf( stderr, "%s\n", msg );
|
|
exit( YY_EXIT_FAILURE );
|
|
}
|
|
|
|
/* Redefine yyless() so it works in section 3 code. */
|
|
|
|
#undef yyless
|
|
#define yyless(n) \
|
|
do \
|
|
{ \
|
|
/* Undo effects of setting up debugtext. */ \
|
|
int yyless_macro_arg = (n); \
|
|
YY_LESS_LINENO(yyless_macro_arg);\
|
|
debugtext[debugleng] = (yy_hold_char); \
|
|
(yy_c_buf_p) = debugtext + yyless_macro_arg; \
|
|
(yy_hold_char) = *(yy_c_buf_p); \
|
|
*(yy_c_buf_p) = '\0'; \
|
|
debugleng = yyless_macro_arg; \
|
|
} \
|
|
while ( 0 )
|
|
|
|
/* Accessor methods (get/set functions) to struct members. */
|
|
|
|
/** Get the current line number.
|
|
*
|
|
*/
|
|
int debugget_lineno (void)
|
|
{
|
|
|
|
return debuglineno;
|
|
}
|
|
|
|
/** Get the input stream.
|
|
*
|
|
*/
|
|
FILE *debugget_in (void)
|
|
{
|
|
return debugin;
|
|
}
|
|
|
|
/** Get the output stream.
|
|
*
|
|
*/
|
|
FILE *debugget_out (void)
|
|
{
|
|
return debugout;
|
|
}
|
|
|
|
/** Get the length of the current token.
|
|
*
|
|
*/
|
|
int debugget_leng (void)
|
|
{
|
|
return debugleng;
|
|
}
|
|
|
|
/** Get the current token.
|
|
*
|
|
*/
|
|
|
|
char *debugget_text (void)
|
|
{
|
|
return debugtext;
|
|
}
|
|
|
|
/** Set the current line number.
|
|
* @param line_number
|
|
*
|
|
*/
|
|
void debugset_lineno (int line_number )
|
|
{
|
|
|
|
debuglineno = line_number;
|
|
}
|
|
|
|
/** Set the input stream. This does not discard the current
|
|
* input buffer.
|
|
* @param in_str A readable stream.
|
|
*
|
|
* @see debug_switch_to_buffer
|
|
*/
|
|
void debugset_in (FILE * in_str )
|
|
{
|
|
debugin = in_str ;
|
|
}
|
|
|
|
void debugset_out (FILE * out_str )
|
|
{
|
|
debugout = out_str ;
|
|
}
|
|
|
|
int debugget_debug (void)
|
|
{
|
|
return debug_flex_debug;
|
|
}
|
|
|
|
void debugset_debug (int bdebug )
|
|
{
|
|
debug_flex_debug = bdebug ;
|
|
}
|
|
|
|
static int yy_init_globals (void)
|
|
{
|
|
/* Initialization is the same as for the non-reentrant scanner.
|
|
* This function is called from debuglex_destroy(), so don't allocate here.
|
|
*/
|
|
|
|
(yy_buffer_stack) = 0;
|
|
(yy_buffer_stack_top) = 0;
|
|
(yy_buffer_stack_max) = 0;
|
|
(yy_c_buf_p) = (char *) 0;
|
|
(yy_init) = 0;
|
|
(yy_start) = 0;
|
|
|
|
/* Defined in main.c */
|
|
#ifdef YY_STDINIT
|
|
debugin = stdin;
|
|
debugout = stdout;
|
|
#else
|
|
debugin = (FILE *) 0;
|
|
debugout = (FILE *) 0;
|
|
#endif
|
|
|
|
/* For future reference: Set errno on error, since we are called by
|
|
* debuglex_init()
|
|
*/
|
|
return 0;
|
|
}
|
|
|
|
/* debuglex_destroy is for both reentrant and non-reentrant scanners. */
|
|
int debuglex_destroy (void)
|
|
{
|
|
|
|
/* Pop the buffer stack, destroying each element. */
|
|
while(YY_CURRENT_BUFFER){
|
|
debug_delete_buffer(YY_CURRENT_BUFFER );
|
|
YY_CURRENT_BUFFER_LVALUE = NULL;
|
|
debugpop_buffer_state();
|
|
}
|
|
|
|
/* Destroy the stack itself. */
|
|
debugfree((yy_buffer_stack) );
|
|
(yy_buffer_stack) = NULL;
|
|
|
|
/* Reset the globals. This is important in a non-reentrant scanner so the next time
|
|
* debuglex() is called, initialization will occur. */
|
|
yy_init_globals( );
|
|
|
|
return 0;
|
|
}
|
|
|
|
/*
|
|
* Internal utility routines.
|
|
*/
|
|
|
|
#ifndef yytext_ptr
|
|
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
|
|
{
|
|
register int i;
|
|
for ( i = 0; i < n; ++i )
|
|
s1[i] = s2[i];
|
|
}
|
|
#endif
|
|
|
|
#ifdef YY_NEED_STRLEN
|
|
static int yy_flex_strlen (yyconst char * s )
|
|
{
|
|
register int n;
|
|
for ( n = 0; s[n]; ++n )
|
|
;
|
|
|
|
return n;
|
|
}
|
|
#endif
|
|
|
|
void *debugalloc (yy_size_t size )
|
|
{
|
|
return (void *) malloc( size );
|
|
}
|
|
|
|
void *debugrealloc (void * ptr, yy_size_t size )
|
|
{
|
|
/* The cast to (char *) in the following accommodates both
|
|
* implementations that use char* generic pointers, and those
|
|
* that use void* generic pointers. It works with the latter
|
|
* because both ANSI C and C++ allow castless assignment from
|
|
* any pointer type to void*, and deal with argument conversions
|
|
* as though doing an assignment.
|
|
*/
|
|
return (void *) realloc( (char *) ptr, size );
|
|
}
|
|
|
|
void debugfree (void * ptr )
|
|
{
|
|
free( (char *) ptr ); /* see debugrealloc() for (char *) cast */
|
|
}
|
|
|
|
#define YYTABLES_NAME "yytables"
|
|
|
|
#line 855 "debug.l"
|
|
|
|
|
|
|
|
|
|
int debugwrap () {
|
|
return 1;
|
|
}
|
|
|
|
/* initialize the buffer - needed each time through */
|
|
void init_lex (char *str, int size) {
|
|
if (buffer) debug_delete_buffer(buffer);
|
|
buffer = debug_scan_buffer(str,size);
|
|
|
|
if (!buffer) { /* oops */
|
|
video_shutdown();
|
|
printf("lex buffer not big enough\n");
|
|
exit(1);
|
|
}
|
|
}
|
|
|
|
|