3109 lines
88 KiB
C
3109 lines
88 KiB
C
/* A lexical scanner generated by flex */
|
|
|
|
/* Scanner skeleton version:
|
|
* $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
|
|
*/
|
|
|
|
#define FLEX_SCANNER
|
|
#define YY_FLEX_MAJOR_VERSION 2
|
|
#define YY_FLEX_MINOR_VERSION 5
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
|
|
#ifdef c_plusplus
|
|
#ifndef __cplusplus
|
|
#define __cplusplus
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
|
|
/* Use prototypes in function declarations. */
|
|
#define YY_USE_PROTOS
|
|
|
|
/* The "const" storage-class-modifier is valid. */
|
|
#define YY_USE_CONST
|
|
|
|
#else /* ! __cplusplus */
|
|
|
|
#if __STDC__
|
|
|
|
#define YY_USE_PROTOS
|
|
#define YY_USE_CONST
|
|
|
|
#endif /* __STDC__ */
|
|
#endif /* ! __cplusplus */
|
|
|
|
#ifdef __TURBOC__
|
|
#pragma warn -rch
|
|
#pragma warn -use
|
|
#include <io.h>
|
|
#include <stdlib.h>
|
|
#define YY_USE_CONST
|
|
#define YY_USE_PROTOS
|
|
#endif
|
|
|
|
#ifdef YY_USE_CONST
|
|
#define yyconst const
|
|
#else
|
|
#define yyconst
|
|
#endif
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
#define YY_PROTO(proto) proto
|
|
#else
|
|
#define YY_PROTO(proto) ()
|
|
#endif
|
|
|
|
/* Returned upon end-of-file. */
|
|
#define YY_NULL 0
|
|
|
|
/* Promotes a possibly negative, possibly signed char to an unsigned
|
|
* integer for use as an array index. If the signed char is negative,
|
|
* we want to instead treat it as an 8-bit unsigned char, hence the
|
|
* double cast.
|
|
*/
|
|
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
|
|
|
|
/* Enter a start condition. This macro really ought to take a parameter,
|
|
* but we do it the disgusting crufty way forced on us by the ()-less
|
|
* definition of BEGIN.
|
|
*/
|
|
#define BEGIN yy_start = 1 + 2 *
|
|
|
|
/* Translate the current start state into a value that can be later handed
|
|
* to BEGIN to return to the state. The YYSTATE alias is for lex
|
|
* compatibility.
|
|
*/
|
|
#define YY_START ((yy_start - 1) / 2)
|
|
#define YYSTATE YY_START
|
|
|
|
/* Action number for EOF rule of a given start state. */
|
|
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
|
|
|
/* Special action meaning "start processing a new file". */
|
|
#define YY_NEW_FILE yyrestart( yyin )
|
|
|
|
#define YY_END_OF_BUFFER_CHAR 0
|
|
|
|
/* Size of default input buffer. */
|
|
#define YY_BUF_SIZE 16384
|
|
|
|
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
|
|
|
extern int yyleng;
|
|
extern FILE *yyin, *yyout;
|
|
|
|
#define EOB_ACT_CONTINUE_SCAN 0
|
|
#define EOB_ACT_END_OF_FILE 1
|
|
#define EOB_ACT_LAST_MATCH 2
|
|
|
|
/* The funky do-while in the following #define is used to turn the definition
|
|
* int a single C statement (which needs a semi-colon terminator). This
|
|
* avoids problems with code like:
|
|
*
|
|
* if ( condition_holds )
|
|
* yyless( 5 );
|
|
* else
|
|
* do_something_else();
|
|
*
|
|
* Prior to using the do-while the compiler would get upset at the
|
|
* "else" because it interpreted the "if" statement as being all
|
|
* done when it reached the ';' after the yyless() call.
|
|
*/
|
|
|
|
/* Return all but the first 'n' matched characters back to the input stream. */
|
|
|
|
#define yyless(n) \
|
|
do \
|
|
{ \
|
|
/* Undo effects of setting up yytext. */ \
|
|
*yy_cp = yy_hold_char; \
|
|
YY_RESTORE_YY_MORE_OFFSET \
|
|
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
|
|
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
|
|
} \
|
|
while ( 0 )
|
|
|
|
#define unput(c) yyunput( c, yytext_ptr )
|
|
|
|
/* The following is because we cannot portably get our hands on size_t
|
|
* (without autoconf's help, which isn't available because we want
|
|
* flex-generated scanners to compile on their own).
|
|
*/
|
|
typedef unsigned int yy_size_t;
|
|
|
|
|
|
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;
|
|
|
|
/* Whether to try to fill the input buffer when we reach the
|
|
* end of it.
|
|
*/
|
|
int yy_fill_buffer;
|
|
|
|
int yy_buffer_status;
|
|
#define YY_BUFFER_NEW 0
|
|
#define YY_BUFFER_NORMAL 1
|
|
/* When an EOF's been seen but there's still some text to process
|
|
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
|
|
* shouldn't try reading from the input source any more. We might
|
|
* still have a bunch of tokens to match, though, because of
|
|
* possible backing-up.
|
|
*
|
|
* When we actually see the EOF, we change the status to "new"
|
|
* (via yyrestart()), so that the user can continue scanning by
|
|
* just pointing yyin at a new input file.
|
|
*/
|
|
#define YY_BUFFER_EOF_PENDING 2
|
|
};
|
|
|
|
static YY_BUFFER_STATE yy_current_buffer = 0;
|
|
|
|
/* We provide macros for accessing buffer states in case in the
|
|
* future we want to put the buffer states in a more general
|
|
* "scanner state".
|
|
*/
|
|
#define YY_CURRENT_BUFFER yy_current_buffer
|
|
|
|
|
|
/* yy_hold_char holds the character lost when yytext is formed. */
|
|
static char yy_hold_char;
|
|
|
|
static int yy_n_chars; /* number of characters read into yy_ch_buf */
|
|
|
|
|
|
int yyleng;
|
|
|
|
/* Points to current character in buffer. */
|
|
static char *yy_c_buf_p = (char *) 0;
|
|
static int yy_init = 1; /* whether we need to initialize */
|
|
static int yy_start = 0; /* start state number */
|
|
|
|
/* Flag which is used to allow yywrap()'s to do buffer switches
|
|
* instead of setting up a fresh yyin. A bit of a hack ...
|
|
*/
|
|
static int yy_did_buffer_switch_on_eof;
|
|
|
|
void yyrestart YY_PROTO(( FILE *input_file ));
|
|
|
|
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
|
|
void yy_load_buffer_state YY_PROTO(( void ));
|
|
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
|
|
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
|
|
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
|
|
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
|
|
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
|
|
|
|
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
|
|
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
|
|
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
|
|
|
|
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
|
|
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
|
|
static void yy_flex_free YY_PROTO(( void * ));
|
|
|
|
#define yy_new_buffer yy_create_buffer
|
|
|
|
#define yy_set_interactive(is_interactive) \
|
|
{ \
|
|
if ( ! yy_current_buffer ) \
|
|
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
|
yy_current_buffer->yy_is_interactive = is_interactive; \
|
|
}
|
|
|
|
#define yy_set_bol(at_bol) \
|
|
{ \
|
|
if ( ! yy_current_buffer ) \
|
|
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
|
yy_current_buffer->yy_at_bol = at_bol; \
|
|
}
|
|
|
|
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
|
|
|
|
typedef unsigned char YY_CHAR;
|
|
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
|
|
typedef int yy_state_type;
|
|
extern char *yytext;
|
|
#define yytext_ptr yytext
|
|
|
|
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
|
|
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
|
|
static int yy_get_next_buffer YY_PROTO(( void ));
|
|
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
|
|
|
|
/* Done after the current pattern has been matched and before the
|
|
* corresponding action - sets up yytext.
|
|
*/
|
|
#define YY_DO_BEFORE_ACTION \
|
|
yytext_ptr = yy_bp; \
|
|
yyleng = (int) (yy_cp - yy_bp); \
|
|
yy_hold_char = *yy_cp; \
|
|
*yy_cp = '\0'; \
|
|
yy_c_buf_p = yy_cp;
|
|
|
|
#define YY_NUM_RULES 122
|
|
#define YY_END_OF_BUFFER 123
|
|
static yyconst short int yy_accept[757] =
|
|
{ 0,
|
|
0, 0, 0, 0, 123, 121, 119, 118, 121, 101,
|
|
67, 107, 100, 121, 95, 96, 105, 104, 92, 103,
|
|
99, 106, 62, 62, 93, 89, 108, 94, 109, 112,
|
|
59, 97, 120, 98, 110, 59, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 90, 111, 91, 102, 121, 119,
|
|
118, 121, 101, 67, 121, 107, 100, 121, 96, 105,
|
|
104, 92, 103, 99, 106, 62, 62, 93, 89, 108,
|
|
94, 109, 112, 59, 97, 120, 98, 110, 59, 59,
|
|
59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
|
|
|
|
59, 59, 59, 59, 59, 59, 59, 90, 111, 91,
|
|
102, 3, 4, 3, 117, 88, 74, 83, 75, 0,
|
|
0, 72, 80, 70, 81, 71, 82, 0, 65, 73,
|
|
66, 61, 0, 62, 0, 62, 79, 85, 87, 86,
|
|
78, 59, 76, 59, 59, 5, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 59, 17, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 59, 29, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 59, 77, 84, 0, 0,
|
|
117, 88, 0, 0, 74, 83, 75, 0, 0, 0,
|
|
|
|
72, 80, 70, 81, 71, 82, 0, 65, 73, 66,
|
|
61, 0, 62, 0, 62, 79, 85, 87, 86, 78,
|
|
59, 76, 59, 59, 5, 59, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 17, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 29, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 77, 84, 0, 63, 58,
|
|
0, 65, 65, 0, 66, 61, 0, 64, 60, 69,
|
|
68, 59, 59, 59, 59, 7, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 59, 59, 59, 59, 22,
|
|
|
|
59, 59, 26, 59, 59, 30, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 40, 59, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
|
|
0, 0, 0, 63, 0, 58, 0, 65, 65, 0,
|
|
66, 61, 0, 64, 60, 69, 68, 59, 59, 59,
|
|
59, 7, 59, 59, 59, 59, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 22, 59, 59, 26, 59,
|
|
59, 30, 59, 59, 59, 59, 59, 59, 59, 59,
|
|
40, 59, 59, 59, 59, 59, 59, 59, 59, 59,
|
|
59, 59, 59, 59, 59, 59, 0, 0, 65, 0,
|
|
|
|
65, 0, 66, 64, 60, 1, 59, 6, 59, 59,
|
|
9, 10, 11, 59, 59, 59, 15, 59, 59, 59,
|
|
19, 20, 59, 59, 59, 27, 59, 59, 34, 35,
|
|
59, 59, 59, 59, 59, 41, 59, 59, 59, 45,
|
|
59, 59, 59, 59, 59, 59, 59, 52, 59, 59,
|
|
59, 0, 0, 0, 0, 0, 65, 0, 65, 0,
|
|
66, 64, 60, 1, 59, 6, 59, 59, 9, 10,
|
|
11, 59, 59, 59, 15, 59, 59, 59, 19, 20,
|
|
59, 59, 59, 27, 59, 59, 34, 35, 59, 59,
|
|
59, 59, 59, 41, 59, 59, 59, 45, 59, 59,
|
|
|
|
59, 59, 59, 59, 59, 52, 59, 59, 59, 0,
|
|
0, 65, 59, 59, 8, 12, 59, 59, 59, 59,
|
|
59, 59, 25, 24, 28, 59, 59, 36, 59, 59,
|
|
59, 42, 59, 59, 59, 59, 59, 59, 50, 59,
|
|
54, 59, 56, 57, 0, 0, 0, 0, 0, 65,
|
|
59, 59, 8, 12, 59, 59, 59, 59, 59, 59,
|
|
25, 24, 28, 59, 59, 36, 59, 59, 59, 42,
|
|
59, 59, 59, 59, 59, 59, 50, 59, 54, 59,
|
|
56, 57, 0, 55, 33, 59, 59, 59, 18, 23,
|
|
21, 59, 59, 59, 59, 39, 43, 44, 46, 47,
|
|
|
|
48, 59, 59, 59, 0, 0, 113, 0, 0, 0,
|
|
55, 33, 59, 59, 59, 18, 23, 21, 59, 59,
|
|
59, 59, 39, 43, 44, 46, 47, 48, 59, 59,
|
|
59, 0, 59, 59, 16, 59, 59, 59, 59, 49,
|
|
59, 59, 0, 0, 113, 0, 0, 0, 59, 59,
|
|
16, 59, 59, 59, 59, 49, 59, 59, 2, 13,
|
|
14, 59, 59, 59, 38, 51, 53, 0, 0, 0,
|
|
0, 114, 0, 0, 0, 13, 14, 59, 59, 59,
|
|
38, 51, 53, 31, 32, 37, 0, 0, 0, 0,
|
|
114, 0, 0, 0, 31, 32, 37, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
0, 0, 0, 0, 0, 0, 115, 0, 0, 0,
|
|
0, 115, 63, 115, 0, 0, 0, 0, 0, 0,
|
|
0, 116, 0, 0, 0, 0, 116, 63, 116, 0,
|
|
0, 0, 0, 115, 0, 0, 0, 0, 0, 0,
|
|
116, 115, 0, 0, 116, 0
|
|
} ;
|
|
|
|
static yyconst int yy_ec[256] =
|
|
{ 0,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
|
2, 2, 4, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 5, 6, 7, 8, 1, 9, 10, 11, 12,
|
|
13, 14, 15, 16, 17, 18, 19, 20, 21, 21,
|
|
21, 21, 21, 21, 21, 21, 21, 22, 23, 24,
|
|
25, 26, 27, 1, 28, 28, 28, 28, 29, 30,
|
|
31, 31, 31, 31, 31, 32, 31, 31, 31, 31,
|
|
31, 31, 31, 31, 33, 31, 31, 34, 31, 31,
|
|
35, 36, 37, 38, 39, 1, 40, 41, 42, 43,
|
|
|
|
44, 45, 46, 47, 48, 31, 49, 50, 51, 52,
|
|
53, 54, 31, 55, 56, 57, 58, 59, 60, 61,
|
|
62, 63, 64, 65, 66, 67, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 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 int yy_meta[68] =
|
|
{ 0,
|
|
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
|
|
3, 1, 1, 1, 1, 1, 1, 1, 1, 4,
|
|
4, 1, 1, 1, 1, 1, 1, 4, 4, 4,
|
|
5, 5, 5, 5, 1, 1, 1, 1, 5, 4,
|
|
4, 4, 4, 4, 4, 5, 5, 5, 5, 5,
|
|
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
|
|
5, 5, 5, 1, 1, 1, 1
|
|
} ;
|
|
|
|
static yyconst short int yy_base[775] =
|
|
{ 0,
|
|
0, 67, 132, 133, 1335, 1336, 1336, 1336, 1331, 1308,
|
|
1336, 1307, 127, 1295, 1336, 1336, 1305, 123, 1336, 124,
|
|
122, 1304, 155, 133, 1336, 1336, 120, 1303, 121, 1336,
|
|
0, 1336, 1336, 1336, 1302, 115, 99, 130, 139, 153,
|
|
146, 161, 1273, 116, 1272, 116, 1281, 1279, 174, 1260,
|
|
148, 1268, 1273, 1276, 1336, 138, 1336, 1336, 1306, 1305,
|
|
1304, 205, 170, 1303, 190, 198, 208, 213, 1302, 214,
|
|
220, 1301, 225, 234, 216, 244, 251, 1300, 1299, 235,
|
|
218, 241, 1298, 309, 1297, 1296, 1295, 236, 218, 123,
|
|
234, 245, 246, 333, 253, 1253, 335, 1252, 183, 1261,
|
|
|
|
1259, 341, 1240, 223, 1248, 1253, 1256, 1286, 367, 1285,
|
|
1284, 1336, 1336, 1251, 1336, 1336, 1336, 1336, 1336, 128,
|
|
293, 1336, 1336, 1336, 1336, 1336, 1336, 1276, 370, 1336,
|
|
389, 408, 391, 372, 0, 424, 1268, 1336, 1336, 1336,
|
|
1267, 0, 1336, 1235, 1250, 0, 1232, 1236, 1230, 1242,
|
|
1229, 1244, 341, 1235, 1225, 1236, 1222, 1225, 1222, 1219,
|
|
1219, 1220, 228, 1219, 1216, 1232, 0, 1214, 1218, 1229,
|
|
1216, 1227, 379, 1218, 1210, 1211, 245, 1223, 376, 1214,
|
|
1207, 347, 1212, 398, 1211, 1218, 1336, 1336, 1245, 429,
|
|
1244, 1243, 369, 412, 1242, 1241, 1240, 443, 440, 435,
|
|
|
|
1239, 1238, 1237, 1236, 1235, 1234, 395, 451, 1233, 473,
|
|
492, 494, 458, 539, 508, 450, 1232, 1231, 1230, 452,
|
|
0, 1229, 1184, 1199, 0, 1181, 1185, 1179, 1191, 1178,
|
|
1193, 426, 1184, 1174, 1185, 1171, 1174, 1171, 1168, 1168,
|
|
1169, 433, 1168, 1165, 1181, 0, 1163, 1167, 1178, 1165,
|
|
1176, 443, 1167, 1159, 1160, 476, 1172, 444, 1163, 1156,
|
|
379, 1161, 482, 1160, 1167, 1194, 1193, 1152, 1336, 1336,
|
|
528, 1336, 541, 557, 1336, 543, 477, 567, 557, 1336,
|
|
1336, 1152, 1153, 1148, 1151, 0, 1159, 1154, 1142, 1152,
|
|
477, 1138, 1154, 1153, 1151, 1136, 1146, 1138, 1144, 0,
|
|
|
|
1131, 1146, 0, 1132, 1127, 1139, 1136, 1126, 1139, 1122,
|
|
1126, 1129, 1118, 1118, 0, 1119, 1121, 1128, 1120, 1113,
|
|
1111, 1111, 1123, 1113, 1117, 1112, 1120, 1122, 1111, 1103,
|
|
533, 245, 495, 1147, 583, 1146, 593, 1145, 604, 606,
|
|
1144, 597, 535, 620, 659, 1143, 1142, 1102, 1103, 1098,
|
|
1101, 0, 1109, 1104, 1092, 1102, 507, 1088, 1104, 1103,
|
|
1101, 1086, 1096, 1088, 1094, 0, 1081, 1096, 0, 1082,
|
|
1077, 1089, 1086, 1076, 1089, 1072, 1076, 1079, 1068, 1068,
|
|
0, 1069, 1071, 1078, 1070, 1063, 1061, 1061, 1073, 1063,
|
|
1067, 1062, 1070, 1072, 1061, 1053, 1066, 617, 636, 643,
|
|
|
|
1336, 622, 663, 1336, 640, 0, 1064, 0, 1063, 1057,
|
|
0, 0, 0, 1048, 1056, 1055, 0, 1044, 1051, 1047,
|
|
0, 0, 1044, 1051, 1040, 0, 1056, 1040, 0, 0,
|
|
1054, 1053, 1035, 1035, 1035, 0, 1032, 1044, 1034, 0,
|
|
1038, 1043, 1042, 1040, 1030, 1035, 1034, 0, 1022, 1034,
|
|
1037, 1071, 623, 519, 595, 641, 694, 708, 1063, 657,
|
|
710, 1062, 700, 0, 1029, 0, 1028, 1022, 0, 0,
|
|
0, 1013, 1021, 1020, 0, 1009, 1016, 1012, 0, 0,
|
|
1009, 1016, 1005, 0, 1021, 1005, 0, 0, 1019, 1018,
|
|
1000, 1000, 1000, 0, 997, 1009, 999, 0, 1003, 1008,
|
|
|
|
1007, 1005, 995, 1000, 999, 0, 987, 999, 1002, 1001,
|
|
624, 716, 997, 996, 0, 0, 986, 995, 986, 991,
|
|
983, 981, 0, 0, 0, 977, 979, 0, 975, 972,
|
|
976, 0, 984, 981, 983, 967, 976, 978, 0, 969,
|
|
0, 972, 0, 0, 997, 599, 476, 674, 731, 733,
|
|
975, 974, 0, 0, 964, 973, 964, 969, 961, 959,
|
|
0, 0, 0, 955, 957, 0, 953, 950, 954, 0,
|
|
962, 959, 961, 945, 954, 956, 0, 947, 0, 950,
|
|
0, 0, 941, 0, 0, 938, 955, 937, 0, 0,
|
|
0, 935, 943, 951, 946, 0, 0, 0, 0, 0,
|
|
|
|
0, 944, 944, 937, 981, 704, 973, 753, 580, 736,
|
|
0, 0, 926, 943, 925, 0, 0, 0, 923, 931,
|
|
911, 897, 0, 0, 0, 0, 0, 0, 860, 852,
|
|
845, 842, 846, 839, 0, 834, 843, 833, 827, 0,
|
|
835, 833, 114, 873, 1336, 756, 715, 746, 831, 824,
|
|
0, 819, 828, 819, 813, 0, 824, 821, 1336, 0,
|
|
0, 807, 820, 805, 0, 0, 0, 806, 820, 671,
|
|
759, 846, 764, 683, 753, 0, 0, 800, 813, 797,
|
|
0, 0, 0, 0, 0, 0, 798, 680, 516, 718,
|
|
1336, 767, 764, 768, 0, 0, 0, 658, 653, 789,
|
|
|
|
792, 775, 780, 620, 603, 765, 793, 788, 790, 0,
|
|
594, 489, 619, 800, 799, 797, 0, 593, 679, 694,
|
|
795, 809, 0, 625, 806, 0, 778, 235, 804, 810,
|
|
811, 0, 815, 818, 824, 826, 833, 0, 595, 592,
|
|
831, 827, 834, 554, 838, 837, 843, 462, 456, 845,
|
|
440, 394, 848, 304, 209, 1336, 897, 902, 904, 909,
|
|
914, 205, 919, 924, 929, 934, 939, 944, 949, 954,
|
|
959, 964, 969, 974
|
|
} ;
|
|
|
|
static yyconst short int yy_def[775] =
|
|
{ 0,
|
|
756, 756, 757, 757, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 758, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
759, 756, 756, 756, 756, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 756, 756, 756, 756, 760, 760,
|
|
760, 760, 760, 760, 760, 760, 760, 761, 760, 760,
|
|
760, 760, 760, 760, 760, 760, 760, 760, 760, 760,
|
|
760, 760, 760, 756, 760, 760, 760, 760, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
|
|
84, 84, 84, 84, 84, 84, 84, 760, 760, 760,
|
|
760, 756, 756, 756, 756, 756, 756, 756, 756, 758,
|
|
758, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 762, 756, 756, 756, 756, 756,
|
|
756, 759, 756, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 756, 756, 760, 756,
|
|
760, 760, 760, 760, 760, 760, 760, 761, 758, 761,
|
|
|
|
760, 760, 760, 760, 760, 760, 760, 760, 760, 760,
|
|
760, 760, 760, 760, 760, 760, 760, 760, 760, 760,
|
|
84, 760, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 760, 760, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 762, 756,
|
|
756, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
756, 760, 760, 760, 758, 760, 760, 760, 760, 760,
|
|
760, 760, 760, 760, 760, 760, 760, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 756, 756, 756, 756,
|
|
|
|
756, 756, 756, 756, 756, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 756, 760, 760, 758, 760, 760, 760, 760, 760,
|
|
760, 760, 760, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 756,
|
|
756, 756, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 756, 763, 760, 758, 760, 760,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 756, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
|
|
759, 759, 759, 759, 756, 763, 760, 764, 760, 758,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 756, 759, 759, 759, 759, 759, 759, 759, 759,
|
|
759, 759, 756, 764, 756, 764, 765, 758, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 756, 759,
|
|
759, 759, 759, 759, 759, 759, 759, 756, 756, 764,
|
|
765, 760, 766, 758, 758, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 759, 759, 759, 756, 756, 764, 766,
|
|
756, 766, 758, 758, 84, 84, 84, 756, 756, 764,
|
|
|
|
766, 758, 758, 756, 756, 764, 766, 758, 758, 767,
|
|
756, 764, 764, 766, 768, 758, 767, 756, 764, 764,
|
|
766, 768, 767, 768, 758, 769, 764, 764, 766, 766,
|
|
770, 769, 764, 764, 766, 766, 770, 769, 770, 771,
|
|
764, 766, 766, 771, 764, 766, 766, 772, 773, 766,
|
|
772, 773, 766, 774, 774, 0, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756
|
|
} ;
|
|
|
|
static yyconst short int yy_nxt[1404] =
|
|
{ 0,
|
|
6, 7, 8, 9, 7, 10, 11, 6, 12, 13,
|
|
14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
|
|
24, 25, 26, 27, 28, 29, 30, 31, 31, 31,
|
|
31, 31, 31, 31, 32, 33, 34, 35, 36, 37,
|
|
38, 39, 40, 41, 42, 43, 31, 44, 31, 45,
|
|
31, 46, 31, 47, 48, 49, 50, 51, 52, 53,
|
|
54, 31, 31, 55, 56, 57, 58, 59, 60, 61,
|
|
62, 60, 63, 64, 65, 66, 67, 68, 15, 69,
|
|
70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
|
|
80, 81, 82, 83, 84, 84, 84, 84, 84, 84,
|
|
|
|
84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
|
|
94, 95, 96, 84, 97, 84, 98, 84, 99, 84,
|
|
100, 101, 102, 103, 104, 105, 106, 107, 84, 84,
|
|
108, 109, 110, 111, 113, 113, 118, 123, 269, 128,
|
|
125, 129, 129, 137, 138, 140, 141, 124, 126, 127,
|
|
131, 119, 136, 136, 144, 146, 147, 668, 166, 170,
|
|
167, 133, 187, 121, 134, 134, 145, 168, 171, 148,
|
|
114, 114, 131, 669, 132, 132, 133, 149, 151, 225,
|
|
226, 190, 134, 133, 150, 152, 134, 134, 135, 158,
|
|
134, 153, 155, 154, 192, 159, 156, 160, 133, 182,
|
|
|
|
162, 190, 188, 183, 134, 157, 161, 191, 279, 190,
|
|
163, 691, 134, 164, 174, 135, 190, 196, 175, 190,
|
|
176, 177, 195, 189, 199, 190, 249, 190, 178, 190,
|
|
179, 190, 197, 180, 202, 250, 190, 645, 201, 193,
|
|
209, 204, 218, 194, 203, 190, 190, 190, 200, 205,
|
|
206, 207, 190, 208, 208, 190, 190, 223, 216, 217,
|
|
222, 210, 190, 211, 211, 219, 220, 301, 210, 224,
|
|
215, 215, 212, 227, 261, 213, 213, 214, 262, 212,
|
|
302, 228, 213, 213, 230, 234, 734, 212, 229, 235,
|
|
317, 231, 241, 213, 212, 756, 453, 232, 236, 233,
|
|
|
|
213, 213, 242, 120, 214, 243, 691, 318, 213, 189,
|
|
189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
|
|
190, 189, 189, 189, 189, 189, 189, 189, 221, 221,
|
|
189, 189, 189, 189, 189, 189, 221, 221, 221, 221,
|
|
221, 221, 221, 189, 189, 189, 189, 221, 221, 221,
|
|
221, 221, 221, 221, 221, 221, 221, 221, 221, 221,
|
|
221, 221, 221, 221, 221, 221, 221, 221, 221, 221,
|
|
221, 221, 189, 189, 189, 189, 237, 245, 190, 246,
|
|
190, 253, 238, 290, 239, 254, 247, 255, 256, 129,
|
|
129, 266, 291, 240, 324, 257, 691, 258, 271, 272,
|
|
|
|
259, 272, 325, 134, 134, 277, 190, 277, 273, 273,
|
|
278, 278, 336, 271, 272, 320, 332, 274, 275, 272,
|
|
275, 134, 311, 190, 312, 131, 390, 132, 132, 134,
|
|
321, 267, 274, 275, 391, 313, 133, 189, 275, 276,
|
|
276, 131, 645, 136, 136, 327, 199, 328, 331, 331,
|
|
269, 133, 133, 334, 199, 134, 134, 276, 691, 335,
|
|
335, 190, 190, 190, 645, 276, 333, 133, 356, 190,
|
|
208, 208, 367, 134, 346, 121, 347, 357, 200, 337,
|
|
338, 134, 338, 386, 190, 368, 377, 190, 378, 213,
|
|
213, 645, 339, 339, 337, 338, 278, 278, 387, 379,
|
|
|
|
338, 340, 341, 190, 341, 190, 190, 213, 343, 210,
|
|
343, 211, 211, 344, 344, 213, 340, 341, 645, 190,
|
|
212, 383, 341, 342, 342, 210, 609, 215, 215, 393,
|
|
190, 394, 414, 415, 454, 212, 212, 700, 384, 213,
|
|
213, 342, 398, 719, 398, 452, 190, 399, 399, 342,
|
|
190, 212, 331, 331, 344, 344, 645, 213, 345, 345,
|
|
273, 273, 472, 473, 547, 213, 345, 345, 345, 400,
|
|
401, 402, 401, 402, 276, 276, 403, 403, 345, 345,
|
|
345, 345, 345, 345, 400, 401, 278, 278, 405, 405,
|
|
401, 190, 276, 269, 645, 455, 404, 756, 404, 548,
|
|
|
|
276, 607, 335, 335, 190, 269, 405, 456, 190, 456,
|
|
608, 404, 457, 457, 405, 190, 404, 190, 121, 647,
|
|
460, 645, 460, 339, 339, 461, 461, 756, 342, 342,
|
|
121, 190, 458, 459, 190, 459, 399, 399, 726, 344,
|
|
344, 403, 403, 512, 512, 718, 342, 458, 459, 462,
|
|
711, 462, 190, 459, 342, 399, 399, 511, 720, 511,
|
|
457, 457, 512, 512, 462, 272, 546, 272, 190, 462,
|
|
190, 405, 405, 645, 710, 689, 461, 461, 345, 345,
|
|
272, 645, 403, 403, 269, 272, 345, 345, 345, 405,
|
|
463, 463, 275, 269, 275, 610, 645, 405, 345, 345,
|
|
|
|
345, 345, 345, 345, 705, 190, 607, 275, 463, 121,
|
|
704, 190, 275, 457, 457, 608, 463, 672, 121, 190,
|
|
691, 190, 549, 338, 549, 338, 673, 550, 550, 461,
|
|
461, 463, 463, 727, 699, 512, 512, 693, 338, 341,
|
|
648, 341, 190, 338, 190, 401, 269, 401, 728, 463,
|
|
550, 550, 550, 550, 341, 645, 269, 463, 645, 341,
|
|
401, 672, 459, 269, 459, 401, 691, 645, 670, 691,
|
|
673, 121, 646, 646, 269, 646, 646, 459, 269, 701,
|
|
645, 121, 459, 692, 692, 269, 692, 692, 121, 674,
|
|
269, 645, 694, 706, 691, 691, 707, 691, 269, 121,
|
|
|
|
269, 120, 691, 121, 721, 675, 691, 269, 712, 723,
|
|
121, 120, 691, 120, 714, 121, 269, 645, 702, 723,
|
|
645, 738, 703, 121, 713, 121, 691, 708, 691, 691,
|
|
733, 709, 121, 645, 724, 120, 691, 716, 729, 691,
|
|
645, 121, 715, 738, 724, 691, 739, 691, 725, 736,
|
|
691, 731, 698, 697, 730, 696, 695, 190, 735, 688,
|
|
687, 686, 685, 684, 683, 741, 682, 681, 739, 740,
|
|
680, 679, 678, 677, 676, 645, 667, 666, 742, 746,
|
|
743, 665, 745, 748, 664, 747, 663, 662, 661, 660,
|
|
750, 749, 659, 754, 658, 657, 753, 112, 112, 112,
|
|
|
|
112, 112, 120, 120, 656, 120, 120, 142, 142, 189,
|
|
189, 189, 189, 189, 198, 198, 198, 198, 198, 606,
|
|
606, 606, 606, 606, 644, 644, 644, 644, 644, 671,
|
|
671, 671, 671, 671, 690, 690, 690, 690, 690, 717,
|
|
655, 717, 717, 717, 722, 722, 722, 722, 722, 732,
|
|
654, 732, 732, 732, 737, 737, 737, 737, 737, 744,
|
|
744, 744, 744, 744, 751, 751, 751, 751, 751, 752,
|
|
752, 752, 752, 752, 755, 755, 755, 755, 755, 653,
|
|
652, 651, 650, 649, 190, 643, 642, 641, 640, 639,
|
|
638, 637, 636, 635, 634, 633, 632, 631, 630, 629,
|
|
|
|
628, 627, 626, 625, 624, 623, 622, 621, 620, 619,
|
|
618, 617, 616, 615, 614, 613, 612, 611, 605, 604,
|
|
603, 602, 601, 600, 599, 598, 597, 596, 595, 594,
|
|
593, 592, 591, 590, 589, 588, 587, 586, 585, 584,
|
|
583, 582, 581, 580, 579, 578, 577, 576, 575, 574,
|
|
573, 572, 571, 570, 569, 568, 567, 566, 565, 564,
|
|
563, 562, 561, 560, 559, 558, 557, 556, 555, 554,
|
|
553, 552, 551, 190, 190, 545, 544, 543, 542, 541,
|
|
540, 539, 538, 537, 536, 535, 534, 533, 532, 531,
|
|
530, 529, 528, 527, 526, 525, 524, 523, 522, 521,
|
|
|
|
520, 519, 518, 517, 516, 515, 514, 513, 510, 509,
|
|
508, 507, 506, 505, 504, 503, 502, 501, 500, 499,
|
|
498, 497, 496, 495, 494, 493, 492, 491, 490, 489,
|
|
488, 487, 486, 485, 484, 483, 482, 481, 480, 479,
|
|
478, 477, 476, 475, 474, 471, 470, 469, 468, 467,
|
|
466, 465, 464, 190, 190, 190, 190, 190, 190, 451,
|
|
450, 449, 448, 447, 446, 445, 444, 443, 442, 441,
|
|
440, 439, 438, 437, 436, 435, 434, 433, 432, 431,
|
|
430, 429, 428, 427, 426, 425, 424, 423, 422, 421,
|
|
420, 419, 418, 417, 416, 413, 412, 411, 410, 409,
|
|
|
|
408, 407, 406, 397, 190, 190, 396, 395, 392, 389,
|
|
388, 385, 382, 381, 380, 376, 375, 374, 373, 372,
|
|
371, 370, 369, 366, 365, 364, 363, 362, 361, 360,
|
|
359, 358, 355, 354, 353, 352, 351, 350, 349, 348,
|
|
190, 190, 190, 190, 190, 190, 190, 190, 190, 190,
|
|
190, 190, 190, 190, 190, 190, 190, 330, 329, 326,
|
|
323, 322, 319, 316, 315, 314, 310, 309, 308, 307,
|
|
306, 305, 304, 303, 300, 299, 298, 297, 296, 295,
|
|
294, 293, 292, 289, 288, 287, 286, 285, 284, 283,
|
|
282, 281, 280, 270, 268, 190, 190, 190, 265, 264,
|
|
|
|
263, 260, 252, 251, 248, 244, 190, 190, 190, 190,
|
|
190, 190, 190, 190, 190, 190, 190, 190, 186, 185,
|
|
184, 181, 173, 172, 169, 165, 143, 139, 130, 122,
|
|
121, 117, 116, 115, 756, 5, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
|
|
756, 756, 756
|
|
} ;
|
|
|
|
static yyconst short int yy_chk[1404] =
|
|
{ 0,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 2, 2, 2,
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
|
2, 2, 2, 2, 3, 4, 13, 18, 120, 21,
|
|
20, 21, 21, 27, 27, 29, 29, 18, 20, 20,
|
|
24, 13, 24, 24, 36, 37, 37, 643, 44, 46,
|
|
44, 24, 56, 120, 24, 24, 36, 44, 46, 38,
|
|
3, 4, 23, 643, 23, 23, 24, 38, 39, 90,
|
|
90, 63, 24, 23, 38, 39, 23, 23, 23, 41,
|
|
24, 39, 40, 39, 63, 41, 40, 41, 23, 51,
|
|
|
|
42, 65, 56, 51, 23, 40, 41, 62, 762, 66,
|
|
42, 755, 23, 42, 49, 23, 62, 67, 49, 67,
|
|
49, 49, 66, 68, 68, 70, 99, 75, 49, 81,
|
|
49, 71, 67, 49, 71, 99, 73, 728, 70, 65,
|
|
75, 73, 81, 65, 71, 74, 80, 88, 68, 73,
|
|
73, 74, 82, 74, 74, 76, 332, 89, 80, 80,
|
|
88, 76, 77, 76, 76, 82, 82, 163, 77, 89,
|
|
77, 77, 76, 91, 104, 76, 76, 76, 104, 77,
|
|
163, 91, 77, 77, 92, 93, 728, 76, 91, 93,
|
|
177, 92, 95, 76, 77, 121, 332, 92, 93, 92,
|
|
|
|
77, 76, 95, 121, 76, 95, 754, 177, 77, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
|
|
84, 84, 84, 84, 84, 84, 94, 97, 109, 97,
|
|
193, 102, 94, 153, 94, 102, 97, 102, 102, 129,
|
|
129, 109, 153, 94, 182, 102, 752, 102, 129, 129,
|
|
|
|
102, 129, 182, 134, 134, 133, 207, 133, 131, 131,
|
|
133, 133, 207, 129, 129, 179, 193, 131, 131, 129,
|
|
131, 134, 173, 194, 173, 132, 261, 132, 132, 134,
|
|
179, 109, 131, 131, 261, 173, 132, 200, 131, 132,
|
|
132, 136, 751, 136, 136, 184, 200, 184, 190, 190,
|
|
199, 132, 136, 198, 198, 136, 136, 132, 749, 199,
|
|
199, 216, 208, 220, 748, 132, 194, 136, 232, 213,
|
|
208, 208, 242, 136, 216, 199, 220, 232, 198, 208,
|
|
208, 136, 208, 258, 210, 242, 252, 547, 252, 213,
|
|
213, 712, 210, 210, 208, 208, 277, 277, 258, 252,
|
|
|
|
208, 210, 210, 211, 210, 212, 333, 213, 212, 211,
|
|
212, 211, 211, 212, 212, 213, 210, 210, 689, 215,
|
|
211, 256, 210, 211, 211, 215, 547, 215, 215, 263,
|
|
454, 263, 291, 291, 333, 211, 215, 689, 256, 215,
|
|
215, 211, 271, 712, 271, 331, 343, 271, 271, 211,
|
|
214, 215, 331, 331, 343, 343, 744, 215, 214, 214,
|
|
273, 273, 357, 357, 454, 215, 214, 214, 214, 273,
|
|
273, 274, 273, 274, 276, 276, 274, 274, 214, 214,
|
|
214, 214, 214, 214, 273, 273, 278, 278, 279, 279,
|
|
273, 609, 276, 335, 740, 335, 278, 739, 278, 455,
|
|
|
|
276, 546, 335, 335, 337, 455, 279, 337, 342, 337,
|
|
546, 278, 337, 337, 279, 339, 278, 340, 335, 609,
|
|
340, 713, 340, 339, 339, 340, 340, 724, 342, 342,
|
|
455, 344, 339, 339, 453, 339, 398, 398, 718, 344,
|
|
344, 402, 402, 511, 511, 711, 342, 339, 339, 344,
|
|
705, 344, 456, 339, 342, 399, 399, 400, 713, 400,
|
|
456, 456, 400, 400, 344, 399, 453, 399, 460, 344,
|
|
345, 405, 405, 670, 704, 670, 460, 460, 345, 345,
|
|
399, 719, 403, 403, 548, 399, 345, 345, 345, 405,
|
|
345, 345, 403, 674, 403, 548, 720, 405, 345, 345,
|
|
|
|
345, 345, 345, 345, 699, 457, 606, 403, 345, 548,
|
|
698, 463, 403, 457, 457, 606, 345, 647, 674, 458,
|
|
690, 461, 458, 457, 458, 457, 647, 458, 458, 461,
|
|
461, 463, 463, 719, 688, 512, 512, 674, 457, 461,
|
|
610, 461, 549, 457, 550, 512, 610, 512, 720, 463,
|
|
549, 549, 550, 550, 461, 608, 648, 463, 646, 461,
|
|
512, 671, 550, 675, 550, 512, 673, 706, 646, 692,
|
|
671, 610, 608, 608, 693, 646, 646, 550, 694, 692,
|
|
727, 648, 550, 673, 673, 702, 692, 692, 675, 648,
|
|
703, 700, 675, 700, 701, 707, 701, 721, 708, 693,
|
|
|
|
709, 715, 714, 694, 714, 648, 729, 716, 706, 715,
|
|
702, 722, 730, 731, 707, 703, 725, 733, 693, 722,
|
|
734, 731, 694, 708, 706, 709, 735, 702, 736, 742,
|
|
727, 703, 716, 741, 715, 737, 743, 709, 721, 746,
|
|
745, 725, 708, 737, 722, 747, 731, 750, 716, 730,
|
|
753, 725, 687, 680, 721, 679, 678, 672, 729, 669,
|
|
668, 664, 663, 662, 658, 734, 657, 655, 737, 733,
|
|
654, 653, 652, 650, 649, 644, 642, 641, 735, 742,
|
|
736, 639, 741, 745, 638, 743, 637, 636, 634, 633,
|
|
747, 746, 632, 753, 631, 630, 750, 757, 757, 757,
|
|
|
|
757, 757, 758, 758, 629, 758, 758, 759, 759, 760,
|
|
760, 760, 760, 760, 761, 761, 761, 761, 761, 763,
|
|
763, 763, 763, 763, 764, 764, 764, 764, 764, 765,
|
|
765, 765, 765, 765, 766, 766, 766, 766, 766, 767,
|
|
622, 767, 767, 767, 768, 768, 768, 768, 768, 769,
|
|
621, 769, 769, 769, 770, 770, 770, 770, 770, 771,
|
|
771, 771, 771, 771, 772, 772, 772, 772, 772, 773,
|
|
773, 773, 773, 773, 774, 774, 774, 774, 774, 620,
|
|
619, 615, 614, 613, 607, 605, 604, 603, 602, 595,
|
|
594, 593, 592, 588, 587, 586, 583, 580, 578, 576,
|
|
|
|
575, 574, 573, 572, 571, 569, 568, 567, 565, 564,
|
|
560, 559, 558, 557, 556, 555, 552, 551, 545, 542,
|
|
540, 538, 537, 536, 535, 534, 533, 531, 530, 529,
|
|
527, 526, 522, 521, 520, 519, 518, 517, 514, 513,
|
|
510, 509, 508, 507, 505, 504, 503, 502, 501, 500,
|
|
499, 497, 496, 495, 493, 492, 491, 490, 489, 486,
|
|
485, 483, 482, 481, 478, 477, 476, 474, 473, 472,
|
|
468, 467, 465, 462, 459, 452, 451, 450, 449, 447,
|
|
446, 445, 444, 443, 442, 441, 439, 438, 437, 435,
|
|
434, 433, 432, 431, 428, 427, 425, 424, 423, 420,
|
|
|
|
419, 418, 416, 415, 414, 410, 409, 407, 397, 396,
|
|
395, 394, 393, 392, 391, 390, 389, 388, 387, 386,
|
|
385, 384, 383, 382, 380, 379, 378, 377, 376, 375,
|
|
374, 373, 372, 371, 370, 368, 367, 365, 364, 363,
|
|
362, 361, 360, 359, 358, 356, 355, 354, 353, 351,
|
|
350, 349, 348, 347, 346, 341, 338, 336, 334, 330,
|
|
329, 328, 327, 326, 325, 324, 323, 322, 321, 320,
|
|
319, 318, 317, 316, 314, 313, 312, 311, 310, 309,
|
|
308, 307, 306, 305, 304, 302, 301, 299, 298, 297,
|
|
296, 295, 294, 293, 292, 290, 289, 288, 287, 285,
|
|
|
|
284, 283, 282, 268, 267, 266, 265, 264, 262, 260,
|
|
259, 257, 255, 254, 253, 251, 250, 249, 248, 247,
|
|
245, 244, 243, 241, 240, 239, 238, 237, 236, 235,
|
|
234, 233, 231, 230, 229, 228, 227, 226, 224, 223,
|
|
222, 219, 218, 217, 209, 206, 205, 204, 203, 202,
|
|
201, 197, 196, 195, 192, 191, 189, 186, 185, 183,
|
|
181, 180, 178, 176, 175, 174, 172, 171, 170, 169,
|
|
168, 166, 165, 164, 162, 161, 160, 159, 158, 157,
|
|
156, 155, 154, 152, 151, 150, 149, 148, 147, 145,
|
|
144, 141, 137, 128, 114, 111, 110, 108, 107, 106,
|
|
|
|
105, 103, 101, 100, 98, 96, 87, 86, 85, 83,
|
|
79, 78, 72, 69, 64, 61, 60, 59, 54, 53,
|
|
52, 50, 48, 47, 45, 43, 35, 28, 22, 17,
|
|
14, 12, 10, 9, 5, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
756, 756, 756, 756, 756, 756, 756, 756, 756, 756,
|
|
|
|
756, 756, 756
|
|
} ;
|
|
|
|
static yy_state_type yy_last_accepting_state;
|
|
static char *yy_last_accepting_cpos;
|
|
|
|
/* The intent behind this definition is that it'll catch
|
|
* any uses of REJECT which flex missed.
|
|
*/
|
|
#define REJECT reject_used_but_not_detected
|
|
#define yymore() yymore_used_but_not_detected
|
|
#define YY_MORE_ADJ 0
|
|
#define YY_RESTORE_YY_MORE_OFFSET
|
|
char *yytext;
|
|
#line 1 "SDCC.lex"
|
|
#define INITIAL 0
|
|
/*-----------------------------------------------------------------------
|
|
SDCC.lex - lexical analyser for use with sdcc ( a freeware compiler for
|
|
8/16 bit microcontrollers)
|
|
Written by : Sandeep Dutta . sandeep.dutta@usa.net (1997)
|
|
|
|
This program is free software; you can redistribute it and/or modify it
|
|
under the terms of the GNU General Public License as published by the
|
|
Free Software Foundation; either version 2, or (at your option) any
|
|
later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
In other words, you are welcome to use, share and improve this program.
|
|
You are forbidden to forbid anyone else to use, share and improve
|
|
what you give them. Help stamp out software-hoarding!
|
|
-------------------------------------------------------------------------*/
|
|
#line 32 "SDCC.lex"
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <ctype.h>
|
|
#include "common.h"
|
|
#include "newalloc.h"
|
|
|
|
char *stringLiteral();
|
|
char *currFname;
|
|
|
|
extern int lineno, column;
|
|
extern char *filename ;
|
|
extern char *fullSrcFileName ;
|
|
int yylineno = 1 ;
|
|
void count() ;
|
|
int process_pragma(char *);
|
|
#undef yywrap
|
|
|
|
int yywrap YY_PROTO((void))
|
|
{
|
|
return(1);
|
|
}
|
|
#define TKEYWORD(token) return (isTargetKeyword(yytext) ? token :\
|
|
check_type(yytext))
|
|
char *asmbuff=NULL;
|
|
int asmbuffSize=0;
|
|
char *asmp ;
|
|
extern int check_type ();
|
|
extern int isTargetKeyword ();
|
|
extern int checkCurrFile (char *);
|
|
extern int processPragma (char *);
|
|
extern int printListing (int );
|
|
struct optimize save_optimize ;
|
|
struct options save_options ;
|
|
|
|
enum {
|
|
P_SAVE = 1,
|
|
P_RESTORE ,
|
|
P_NOINDUCTION,
|
|
P_NOINVARIANT,
|
|
P_INDUCTION ,
|
|
P_STACKAUTO ,
|
|
P_NOJTBOUND ,
|
|
P_NOOVERLAY ,
|
|
P_NOGCSE ,
|
|
P_CALLEE_SAVES,
|
|
P_EXCLUDE ,
|
|
P_LOOPREV
|
|
};
|
|
|
|
#define asm 1
|
|
|
|
|
|
/* Macros after this point can all be overridden by user definitions in
|
|
* section 1.
|
|
*/
|
|
|
|
#ifndef YY_SKIP_YYWRAP
|
|
#ifdef __cplusplus
|
|
extern "C" int yywrap YY_PROTO(( void ));
|
|
#else
|
|
extern int yywrap YY_PROTO(( void ));
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef YY_NO_UNPUT
|
|
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
|
|
#endif
|
|
|
|
#ifndef yytext_ptr
|
|
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
|
|
#endif
|
|
|
|
#ifdef YY_NEED_STRLEN
|
|
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
|
|
#endif
|
|
|
|
#ifndef YY_NO_INPUT
|
|
#ifdef __cplusplus
|
|
static int yyinput YY_PROTO(( void ));
|
|
#else
|
|
static int input YY_PROTO(( void ));
|
|
#endif
|
|
#endif
|
|
|
|
#if YY_STACK_USED
|
|
static int yy_start_stack_ptr = 0;
|
|
static int yy_start_stack_depth = 0;
|
|
static int *yy_start_stack = 0;
|
|
#ifndef YY_NO_PUSH_STATE
|
|
static void yy_push_state YY_PROTO(( int new_state ));
|
|
#endif
|
|
#ifndef YY_NO_POP_STATE
|
|
static void yy_pop_state YY_PROTO(( void ));
|
|
#endif
|
|
#ifndef YY_NO_TOP_STATE
|
|
static int yy_top_state YY_PROTO(( void ));
|
|
#endif
|
|
|
|
#else
|
|
#define YY_NO_PUSH_STATE 1
|
|
#define YY_NO_POP_STATE 1
|
|
#define YY_NO_TOP_STATE 1
|
|
#endif
|
|
|
|
#ifdef YY_MALLOC_DECL
|
|
YY_MALLOC_DECL
|
|
#else
|
|
#if __STDC__
|
|
#ifndef __cplusplus
|
|
#include <stdlib.h>
|
|
#endif
|
|
#else
|
|
/* Just try to get by without declaring the routines. This will fail
|
|
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
|
|
* or sizeof(void*) != sizeof(int).
|
|
*/
|
|
#endif
|
|
#endif
|
|
|
|
/* Amount of stuff to slurp up with each read. */
|
|
#ifndef YY_READ_BUF_SIZE
|
|
#define YY_READ_BUF_SIZE 8192
|
|
#endif
|
|
|
|
/* Copy whatever the last rule matched to the standard output. */
|
|
|
|
#ifndef ECHO
|
|
/* This used to be an fputs(), but since the string might contain NUL's,
|
|
* we now use fwrite().
|
|
*/
|
|
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
|
|
#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->yy_is_interactive ) \
|
|
{ \
|
|
int c = '*', n; \
|
|
for ( n = 0; n < max_size && \
|
|
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
|
|
buf[n] = (char) c; \
|
|
if ( c == '\n' ) \
|
|
buf[n++] = (char) c; \
|
|
if ( c == EOF && ferror( yyin ) ) \
|
|
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
|
result = n; \
|
|
} \
|
|
else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
|
|
&& ferror( yyin ) ) \
|
|
YY_FATAL_ERROR( "input in flex scanner failed" );
|
|
#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
|
|
|
|
/* Default declaration of generated scanner - a define so the user can
|
|
* easily add parameters.
|
|
*/
|
|
#ifndef YY_DECL
|
|
#define YY_DECL int yylex YY_PROTO(( void ))
|
|
#endif
|
|
|
|
/* Code executed at the beginning of each rule, after yytext and yyleng
|
|
* have been set up.
|
|
*/
|
|
#ifndef YY_USER_ACTION
|
|
#define YY_USER_ACTION
|
|
#endif
|
|
|
|
/* Code executed at the end of each rule. */
|
|
#ifndef YY_BREAK
|
|
#define YY_BREAK break;
|
|
#endif
|
|
|
|
#define YY_RULE_SETUP \
|
|
if ( yyleng > 0 ) \
|
|
yy_current_buffer->yy_at_bol = \
|
|
(yytext[yyleng - 1] == '\n'); \
|
|
YY_USER_ACTION
|
|
|
|
YY_DECL
|
|
{
|
|
register yy_state_type yy_current_state;
|
|
register char *yy_cp, *yy_bp;
|
|
register int yy_act;
|
|
|
|
#line 84 "SDCC.lex"
|
|
|
|
|
|
if ( yy_init )
|
|
{
|
|
yy_init = 0;
|
|
|
|
#ifdef YY_USER_INIT
|
|
YY_USER_INIT;
|
|
#endif
|
|
|
|
if ( ! yy_start )
|
|
yy_start = 1; /* first start state */
|
|
|
|
if ( ! yyin )
|
|
yyin = stdin;
|
|
|
|
if ( ! yyout )
|
|
yyout = stdout;
|
|
|
|
if ( ! yy_current_buffer )
|
|
yy_current_buffer =
|
|
yy_create_buffer( yyin, YY_BUF_SIZE );
|
|
|
|
yy_load_buffer_state();
|
|
}
|
|
|
|
while ( 1 ) /* loops until end-of-file is reached */
|
|
{
|
|
yy_cp = yy_c_buf_p;
|
|
|
|
/* Support of yytext. */
|
|
*yy_cp = yy_hold_char;
|
|
|
|
/* yy_bp points to the position in yy_ch_buf of the start of
|
|
* the current run.
|
|
*/
|
|
yy_bp = yy_cp;
|
|
|
|
yy_current_state = yy_start;
|
|
yy_current_state += YY_AT_BOL();
|
|
yy_match:
|
|
do
|
|
{
|
|
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
|
|
if ( yy_accept[yy_current_state] )
|
|
{
|
|
yy_last_accepting_state = yy_current_state;
|
|
yy_last_accepting_cpos = yy_cp;
|
|
}
|
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
{
|
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
if ( yy_current_state >= 757 )
|
|
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] != 1336 );
|
|
|
|
yy_find_action:
|
|
yy_act = yy_accept[yy_current_state];
|
|
if ( yy_act == 0 )
|
|
{ /* have to back up */
|
|
yy_cp = yy_last_accepting_cpos;
|
|
yy_current_state = yy_last_accepting_state;
|
|
yy_act = yy_accept[yy_current_state];
|
|
}
|
|
|
|
YY_DO_BEFORE_ACTION;
|
|
|
|
|
|
do_action: /* This label is used only to access EOF actions. */
|
|
|
|
|
|
switch ( yy_act )
|
|
{ /* beginning of action switch */
|
|
case 0: /* must back up */
|
|
/* undo the effects of YY_DO_BEFORE_ACTION */
|
|
*yy_cp = yy_hold_char;
|
|
yy_cp = yy_last_accepting_cpos;
|
|
yy_current_state = yy_last_accepting_state;
|
|
goto yy_find_action;
|
|
|
|
case 1:
|
|
YY_RULE_SETUP
|
|
#line 85 "SDCC.lex"
|
|
{
|
|
count();
|
|
asmp = asmbuff = realloc (asmbuff, INITIAL_INLINEASM);
|
|
asmbuffSize=INITIAL_INLINEASM;
|
|
BEGIN(asm) ;
|
|
}
|
|
YY_BREAK
|
|
case 2:
|
|
YY_RULE_SETUP
|
|
#line 91 "SDCC.lex"
|
|
{
|
|
count();
|
|
*asmp = '\0';
|
|
yylval.yyinline = malloc (strlen(asmbuff)+1);
|
|
strcpy(yylval.yyinline,asmbuff);
|
|
BEGIN(INITIAL);
|
|
return (INLINEASM);
|
|
}
|
|
YY_BREAK
|
|
case 3:
|
|
YY_RULE_SETUP
|
|
#line 99 "SDCC.lex"
|
|
{
|
|
if (asmp-asmbuff >= asmbuffSize-2) {
|
|
// increase the buffersize with 50%
|
|
int size=asmp-asmbuff;
|
|
asmbuffSize=asmbuffSize*3/2;
|
|
asmbuff = realloc (asmbuff, asmbuffSize);
|
|
asmp=asmbuff+size;
|
|
}
|
|
*asmp++ = yytext[0];
|
|
}
|
|
YY_BREAK
|
|
case 4:
|
|
YY_RULE_SETUP
|
|
#line 109 "SDCC.lex"
|
|
{
|
|
count();
|
|
if (asmp-asmbuff >= asmbuffSize-3) {
|
|
// increase the buffersize with 50%
|
|
int size=asmp-asmbuff;
|
|
asmbuffSize=asmbuffSize*3/2;
|
|
asmbuff = realloc (asmbuff, asmbuffSize);
|
|
asmp=asmbuff+size;
|
|
}
|
|
*asmp++ = '\n' ;
|
|
}
|
|
YY_BREAK
|
|
case 5:
|
|
YY_RULE_SETUP
|
|
#line 120 "SDCC.lex"
|
|
{ count(); TKEYWORD(AT) ; }
|
|
YY_BREAK
|
|
case 6:
|
|
YY_RULE_SETUP
|
|
#line 121 "SDCC.lex"
|
|
{ count(); return(AUTO); }
|
|
YY_BREAK
|
|
case 7:
|
|
YY_RULE_SETUP
|
|
#line 122 "SDCC.lex"
|
|
{ count(); TKEYWORD(BIT) ; }
|
|
YY_BREAK
|
|
case 8:
|
|
YY_RULE_SETUP
|
|
#line 123 "SDCC.lex"
|
|
{ count(); return(BREAK); }
|
|
YY_BREAK
|
|
case 9:
|
|
YY_RULE_SETUP
|
|
#line 124 "SDCC.lex"
|
|
{ count(); return(CASE); }
|
|
YY_BREAK
|
|
case 10:
|
|
YY_RULE_SETUP
|
|
#line 125 "SDCC.lex"
|
|
{ count(); return(CHAR); }
|
|
YY_BREAK
|
|
case 11:
|
|
YY_RULE_SETUP
|
|
#line 126 "SDCC.lex"
|
|
{ count(); TKEYWORD(CODE); }
|
|
YY_BREAK
|
|
case 12:
|
|
YY_RULE_SETUP
|
|
#line 127 "SDCC.lex"
|
|
{ count(); return(CONST); }
|
|
YY_BREAK
|
|
case 13:
|
|
YY_RULE_SETUP
|
|
#line 128 "SDCC.lex"
|
|
{ count(); return(CONTINUE); }
|
|
YY_BREAK
|
|
case 14:
|
|
YY_RULE_SETUP
|
|
#line 129 "SDCC.lex"
|
|
{ count(); TKEYWORD(CRITICAL); }
|
|
YY_BREAK
|
|
case 15:
|
|
YY_RULE_SETUP
|
|
#line 130 "SDCC.lex"
|
|
{ count(); TKEYWORD(DATA); }
|
|
YY_BREAK
|
|
case 16:
|
|
YY_RULE_SETUP
|
|
#line 131 "SDCC.lex"
|
|
{ count(); return(DEFAULT); }
|
|
YY_BREAK
|
|
case 17:
|
|
YY_RULE_SETUP
|
|
#line 132 "SDCC.lex"
|
|
{ count(); return(DO); }
|
|
YY_BREAK
|
|
case 18:
|
|
YY_RULE_SETUP
|
|
#line 133 "SDCC.lex"
|
|
{ count(); werror(W_DOUBLE_UNSUPPORTED);return(FLOAT); }
|
|
YY_BREAK
|
|
case 19:
|
|
YY_RULE_SETUP
|
|
#line 134 "SDCC.lex"
|
|
{ count(); return(ELSE); }
|
|
YY_BREAK
|
|
case 20:
|
|
YY_RULE_SETUP
|
|
#line 135 "SDCC.lex"
|
|
{ count(); return(ENUM); }
|
|
YY_BREAK
|
|
case 21:
|
|
YY_RULE_SETUP
|
|
#line 136 "SDCC.lex"
|
|
{ count(); return(EXTERN); }
|
|
YY_BREAK
|
|
case 22:
|
|
YY_RULE_SETUP
|
|
#line 137 "SDCC.lex"
|
|
{ count(); TKEYWORD(XDATA); }
|
|
YY_BREAK
|
|
case 23:
|
|
YY_RULE_SETUP
|
|
#line 138 "SDCC.lex"
|
|
{ count(); TKEYWORD(EEPROM); }
|
|
YY_BREAK
|
|
case 24:
|
|
YY_RULE_SETUP
|
|
#line 139 "SDCC.lex"
|
|
{ count(); return(FLOAT); }
|
|
YY_BREAK
|
|
case 25:
|
|
YY_RULE_SETUP
|
|
#line 140 "SDCC.lex"
|
|
{ count(); TKEYWORD(CODE);}
|
|
YY_BREAK
|
|
case 26:
|
|
YY_RULE_SETUP
|
|
#line 141 "SDCC.lex"
|
|
{ count(); return(FOR); }
|
|
YY_BREAK
|
|
case 27:
|
|
YY_RULE_SETUP
|
|
#line 142 "SDCC.lex"
|
|
{ count(); return(GOTO); }
|
|
YY_BREAK
|
|
case 28:
|
|
YY_RULE_SETUP
|
|
#line 143 "SDCC.lex"
|
|
{ count(); TKEYWORD(IDATA);}
|
|
YY_BREAK
|
|
case 29:
|
|
YY_RULE_SETUP
|
|
#line 144 "SDCC.lex"
|
|
{ count(); return(IF); }
|
|
YY_BREAK
|
|
case 30:
|
|
YY_RULE_SETUP
|
|
#line 145 "SDCC.lex"
|
|
{ count(); return(INT); }
|
|
YY_BREAK
|
|
case 31:
|
|
YY_RULE_SETUP
|
|
#line 146 "SDCC.lex"
|
|
{ count(); return(INTERRUPT);}
|
|
YY_BREAK
|
|
case 32:
|
|
YY_RULE_SETUP
|
|
#line 147 "SDCC.lex"
|
|
{ count(); TKEYWORD(NONBANKED);}
|
|
YY_BREAK
|
|
case 33:
|
|
YY_RULE_SETUP
|
|
#line 148 "SDCC.lex"
|
|
{ count(); TKEYWORD(BANKED);}
|
|
YY_BREAK
|
|
case 34:
|
|
YY_RULE_SETUP
|
|
#line 149 "SDCC.lex"
|
|
{ count(); return(LONG); }
|
|
YY_BREAK
|
|
case 35:
|
|
YY_RULE_SETUP
|
|
#line 150 "SDCC.lex"
|
|
{ count(); TKEYWORD(DATA);}
|
|
YY_BREAK
|
|
case 36:
|
|
YY_RULE_SETUP
|
|
#line 151 "SDCC.lex"
|
|
{ count(); TKEYWORD(PDATA); }
|
|
YY_BREAK
|
|
case 37:
|
|
YY_RULE_SETUP
|
|
#line 152 "SDCC.lex"
|
|
{ count(); TKEYWORD(REENTRANT);}
|
|
YY_BREAK
|
|
case 38:
|
|
YY_RULE_SETUP
|
|
#line 153 "SDCC.lex"
|
|
{ count(); return(REGISTER); }
|
|
YY_BREAK
|
|
case 39:
|
|
YY_RULE_SETUP
|
|
#line 154 "SDCC.lex"
|
|
{ count(); return(RETURN); }
|
|
YY_BREAK
|
|
case 40:
|
|
YY_RULE_SETUP
|
|
#line 155 "SDCC.lex"
|
|
{ count(); TKEYWORD(SFR) ; }
|
|
YY_BREAK
|
|
case 41:
|
|
YY_RULE_SETUP
|
|
#line 156 "SDCC.lex"
|
|
{ count(); TKEYWORD(SBIT) ; }
|
|
YY_BREAK
|
|
case 42:
|
|
YY_RULE_SETUP
|
|
#line 157 "SDCC.lex"
|
|
{ count(); return(SHORT); }
|
|
YY_BREAK
|
|
case 43:
|
|
YY_RULE_SETUP
|
|
#line 158 "SDCC.lex"
|
|
{ count(); return(SIGNED); }
|
|
YY_BREAK
|
|
case 44:
|
|
YY_RULE_SETUP
|
|
#line 159 "SDCC.lex"
|
|
{ count(); return(SIZEOF); }
|
|
YY_BREAK
|
|
case 45:
|
|
YY_RULE_SETUP
|
|
#line 160 "SDCC.lex"
|
|
{ count(); TKEYWORD(XDATA);}
|
|
YY_BREAK
|
|
case 46:
|
|
YY_RULE_SETUP
|
|
#line 161 "SDCC.lex"
|
|
{ count(); return(STATIC); }
|
|
YY_BREAK
|
|
case 47:
|
|
YY_RULE_SETUP
|
|
#line 162 "SDCC.lex"
|
|
{ count(); return(STRUCT); }
|
|
YY_BREAK
|
|
case 48:
|
|
YY_RULE_SETUP
|
|
#line 163 "SDCC.lex"
|
|
{ count(); return(SWITCH); }
|
|
YY_BREAK
|
|
case 49:
|
|
YY_RULE_SETUP
|
|
#line 164 "SDCC.lex"
|
|
{ count(); return(TYPEDEF); }
|
|
YY_BREAK
|
|
case 50:
|
|
YY_RULE_SETUP
|
|
#line 165 "SDCC.lex"
|
|
{ count(); return(UNION); }
|
|
YY_BREAK
|
|
case 51:
|
|
YY_RULE_SETUP
|
|
#line 166 "SDCC.lex"
|
|
{ count(); return(UNSIGNED); }
|
|
YY_BREAK
|
|
case 52:
|
|
YY_RULE_SETUP
|
|
#line 167 "SDCC.lex"
|
|
{ count(); return(VOID); }
|
|
YY_BREAK
|
|
case 53:
|
|
YY_RULE_SETUP
|
|
#line 168 "SDCC.lex"
|
|
{ count(); return(VOLATILE); }
|
|
YY_BREAK
|
|
case 54:
|
|
YY_RULE_SETUP
|
|
#line 169 "SDCC.lex"
|
|
{ count(); TKEYWORD(USING); }
|
|
YY_BREAK
|
|
case 55:
|
|
YY_RULE_SETUP
|
|
#line 170 "SDCC.lex"
|
|
{ count(); TKEYWORD(NAKED); }
|
|
YY_BREAK
|
|
case 56:
|
|
YY_RULE_SETUP
|
|
#line 171 "SDCC.lex"
|
|
{ count(); return(WHILE); }
|
|
YY_BREAK
|
|
case 57:
|
|
YY_RULE_SETUP
|
|
#line 172 "SDCC.lex"
|
|
{ count(); TKEYWORD(XDATA); }
|
|
YY_BREAK
|
|
case 58:
|
|
YY_RULE_SETUP
|
|
#line 173 "SDCC.lex"
|
|
{ count(); return(VAR_ARGS);}
|
|
YY_BREAK
|
|
case 59:
|
|
YY_RULE_SETUP
|
|
#line 174 "SDCC.lex"
|
|
{ count(); return(check_type()); }
|
|
YY_BREAK
|
|
case 60:
|
|
YY_RULE_SETUP
|
|
#line 175 "SDCC.lex"
|
|
{ count(); yylval.val = constVal(yytext); return(CONSTANT); }
|
|
YY_BREAK
|
|
case 61:
|
|
YY_RULE_SETUP
|
|
#line 176 "SDCC.lex"
|
|
{ count(); yylval.val = constVal(yytext); return(CONSTANT); }
|
|
YY_BREAK
|
|
case 62:
|
|
YY_RULE_SETUP
|
|
#line 177 "SDCC.lex"
|
|
{ count(); yylval.val = constVal(yytext); return(CONSTANT); }
|
|
YY_BREAK
|
|
case 63:
|
|
YY_RULE_SETUP
|
|
#line 178 "SDCC.lex"
|
|
{ count();yylval.val = charVal (yytext); return(CONSTANT); /* ' make syntax highliter happy */}
|
|
YY_BREAK
|
|
case 64:
|
|
YY_RULE_SETUP
|
|
#line 179 "SDCC.lex"
|
|
{ count(); yylval.val = constFloatVal(yytext);return(CONSTANT); }
|
|
YY_BREAK
|
|
case 65:
|
|
YY_RULE_SETUP
|
|
#line 180 "SDCC.lex"
|
|
{ count(); yylval.val = constFloatVal(yytext);return(CONSTANT); }
|
|
YY_BREAK
|
|
case 66:
|
|
YY_RULE_SETUP
|
|
#line 181 "SDCC.lex"
|
|
{ count(); yylval.val = constFloatVal(yytext);return(CONSTANT); }
|
|
YY_BREAK
|
|
case 67:
|
|
YY_RULE_SETUP
|
|
#line 182 "SDCC.lex"
|
|
{ count(); yylval.val=strVal(stringLiteral()); return(STRING_LITERAL);}
|
|
YY_BREAK
|
|
case 68:
|
|
YY_RULE_SETUP
|
|
#line 183 "SDCC.lex"
|
|
{ count(); yylval.yyint = RIGHT_ASSIGN ; return(RIGHT_ASSIGN); }
|
|
YY_BREAK
|
|
case 69:
|
|
YY_RULE_SETUP
|
|
#line 184 "SDCC.lex"
|
|
{ count(); yylval.yyint = LEFT_ASSIGN ; return(LEFT_ASSIGN) ; }
|
|
YY_BREAK
|
|
case 70:
|
|
YY_RULE_SETUP
|
|
#line 185 "SDCC.lex"
|
|
{ count(); yylval.yyint = ADD_ASSIGN ; return(ADD_ASSIGN) ; }
|
|
YY_BREAK
|
|
case 71:
|
|
YY_RULE_SETUP
|
|
#line 186 "SDCC.lex"
|
|
{ count(); yylval.yyint = SUB_ASSIGN ; return(SUB_ASSIGN) ; }
|
|
YY_BREAK
|
|
case 72:
|
|
YY_RULE_SETUP
|
|
#line 187 "SDCC.lex"
|
|
{ count(); yylval.yyint = MUL_ASSIGN ; return(MUL_ASSIGN) ; }
|
|
YY_BREAK
|
|
case 73:
|
|
YY_RULE_SETUP
|
|
#line 188 "SDCC.lex"
|
|
{ count(); yylval.yyint = DIV_ASSIGN ; return(DIV_ASSIGN) ; }
|
|
YY_BREAK
|
|
case 74:
|
|
YY_RULE_SETUP
|
|
#line 189 "SDCC.lex"
|
|
{ count(); yylval.yyint = MOD_ASSIGN ; return(MOD_ASSIGN) ; }
|
|
YY_BREAK
|
|
case 75:
|
|
YY_RULE_SETUP
|
|
#line 190 "SDCC.lex"
|
|
{ count(); yylval.yyint = AND_ASSIGN ; return(AND_ASSIGN) ; }
|
|
YY_BREAK
|
|
case 76:
|
|
YY_RULE_SETUP
|
|
#line 191 "SDCC.lex"
|
|
{ count(); yylval.yyint = XOR_ASSIGN ; return(XOR_ASSIGN) ; }
|
|
YY_BREAK
|
|
case 77:
|
|
YY_RULE_SETUP
|
|
#line 192 "SDCC.lex"
|
|
{ count(); yylval.yyint = OR_ASSIGN ; return(OR_ASSIGN) ; }
|
|
YY_BREAK
|
|
case 78:
|
|
YY_RULE_SETUP
|
|
#line 193 "SDCC.lex"
|
|
{ count(); return(RIGHT_OP); }
|
|
YY_BREAK
|
|
case 79:
|
|
YY_RULE_SETUP
|
|
#line 194 "SDCC.lex"
|
|
{ count(); return(LEFT_OP); }
|
|
YY_BREAK
|
|
case 80:
|
|
YY_RULE_SETUP
|
|
#line 195 "SDCC.lex"
|
|
{ count(); return(INC_OP); }
|
|
YY_BREAK
|
|
case 81:
|
|
YY_RULE_SETUP
|
|
#line 196 "SDCC.lex"
|
|
{ count(); return(DEC_OP); }
|
|
YY_BREAK
|
|
case 82:
|
|
YY_RULE_SETUP
|
|
#line 197 "SDCC.lex"
|
|
{ count(); return(PTR_OP); }
|
|
YY_BREAK
|
|
case 83:
|
|
YY_RULE_SETUP
|
|
#line 198 "SDCC.lex"
|
|
{ count(); return(AND_OP); }
|
|
YY_BREAK
|
|
case 84:
|
|
YY_RULE_SETUP
|
|
#line 199 "SDCC.lex"
|
|
{ count(); return(OR_OP); }
|
|
YY_BREAK
|
|
case 85:
|
|
YY_RULE_SETUP
|
|
#line 200 "SDCC.lex"
|
|
{ count(); return(LE_OP); }
|
|
YY_BREAK
|
|
case 86:
|
|
YY_RULE_SETUP
|
|
#line 201 "SDCC.lex"
|
|
{ count(); return(GE_OP); }
|
|
YY_BREAK
|
|
case 87:
|
|
YY_RULE_SETUP
|
|
#line 202 "SDCC.lex"
|
|
{ count(); return(EQ_OP); }
|
|
YY_BREAK
|
|
case 88:
|
|
YY_RULE_SETUP
|
|
#line 203 "SDCC.lex"
|
|
{ count(); return(NE_OP); }
|
|
YY_BREAK
|
|
case 89:
|
|
YY_RULE_SETUP
|
|
#line 204 "SDCC.lex"
|
|
{ count(); return(';'); }
|
|
YY_BREAK
|
|
case 90:
|
|
YY_RULE_SETUP
|
|
#line 205 "SDCC.lex"
|
|
{ count(); NestLevel++ ; return('{'); }
|
|
YY_BREAK
|
|
case 91:
|
|
YY_RULE_SETUP
|
|
#line 206 "SDCC.lex"
|
|
{ count(); NestLevel--; return('}'); }
|
|
YY_BREAK
|
|
case 92:
|
|
YY_RULE_SETUP
|
|
#line 207 "SDCC.lex"
|
|
{ count(); return(','); }
|
|
YY_BREAK
|
|
case 93:
|
|
YY_RULE_SETUP
|
|
#line 208 "SDCC.lex"
|
|
{ count(); return(':'); }
|
|
YY_BREAK
|
|
case 94:
|
|
YY_RULE_SETUP
|
|
#line 209 "SDCC.lex"
|
|
{ count(); return('='); }
|
|
YY_BREAK
|
|
case 95:
|
|
YY_RULE_SETUP
|
|
#line 210 "SDCC.lex"
|
|
{ count(); return('('); }
|
|
YY_BREAK
|
|
case 96:
|
|
YY_RULE_SETUP
|
|
#line 211 "SDCC.lex"
|
|
{ count(); return(')'); }
|
|
YY_BREAK
|
|
case 97:
|
|
YY_RULE_SETUP
|
|
#line 212 "SDCC.lex"
|
|
{ count(); return('['); }
|
|
YY_BREAK
|
|
case 98:
|
|
YY_RULE_SETUP
|
|
#line 213 "SDCC.lex"
|
|
{ count(); return(']'); }
|
|
YY_BREAK
|
|
case 99:
|
|
YY_RULE_SETUP
|
|
#line 214 "SDCC.lex"
|
|
{ count(); return('.'); }
|
|
YY_BREAK
|
|
case 100:
|
|
YY_RULE_SETUP
|
|
#line 215 "SDCC.lex"
|
|
{ count(); return('&'); }
|
|
YY_BREAK
|
|
case 101:
|
|
YY_RULE_SETUP
|
|
#line 216 "SDCC.lex"
|
|
{ count(); return('!'); }
|
|
YY_BREAK
|
|
case 102:
|
|
YY_RULE_SETUP
|
|
#line 217 "SDCC.lex"
|
|
{ count(); return('~'); }
|
|
YY_BREAK
|
|
case 103:
|
|
YY_RULE_SETUP
|
|
#line 218 "SDCC.lex"
|
|
{ count(); return('-'); }
|
|
YY_BREAK
|
|
case 104:
|
|
YY_RULE_SETUP
|
|
#line 219 "SDCC.lex"
|
|
{ count(); return('+'); }
|
|
YY_BREAK
|
|
case 105:
|
|
YY_RULE_SETUP
|
|
#line 220 "SDCC.lex"
|
|
{ count(); return('*'); }
|
|
YY_BREAK
|
|
case 106:
|
|
YY_RULE_SETUP
|
|
#line 221 "SDCC.lex"
|
|
{ count(); return('/'); }
|
|
YY_BREAK
|
|
case 107:
|
|
YY_RULE_SETUP
|
|
#line 222 "SDCC.lex"
|
|
{ count(); return('%'); }
|
|
YY_BREAK
|
|
case 108:
|
|
YY_RULE_SETUP
|
|
#line 223 "SDCC.lex"
|
|
{ count(); return('<'); }
|
|
YY_BREAK
|
|
case 109:
|
|
YY_RULE_SETUP
|
|
#line 224 "SDCC.lex"
|
|
{ count(); return('>'); }
|
|
YY_BREAK
|
|
case 110:
|
|
YY_RULE_SETUP
|
|
#line 225 "SDCC.lex"
|
|
{ count(); return('^'); }
|
|
YY_BREAK
|
|
case 111:
|
|
YY_RULE_SETUP
|
|
#line 226 "SDCC.lex"
|
|
{ count(); return('|'); }
|
|
YY_BREAK
|
|
case 112:
|
|
YY_RULE_SETUP
|
|
#line 227 "SDCC.lex"
|
|
{ count(); return('?'); }
|
|
YY_BREAK
|
|
case 113:
|
|
YY_RULE_SETUP
|
|
#line 228 "SDCC.lex"
|
|
{ count(); checkCurrFile(yytext); }
|
|
YY_BREAK
|
|
case 114:
|
|
YY_RULE_SETUP
|
|
#line 229 "SDCC.lex"
|
|
{ count(); process_pragma(yytext); }
|
|
YY_BREAK
|
|
case 115:
|
|
YY_RULE_SETUP
|
|
#line 231 "SDCC.lex"
|
|
{ werror(E_PRE_PROC_FAILED,yytext);count(); }
|
|
YY_BREAK
|
|
case 116:
|
|
YY_RULE_SETUP
|
|
#line 232 "SDCC.lex"
|
|
{ werror(W_PRE_PROC_WARNING,yytext);count(); }
|
|
YY_BREAK
|
|
case 117:
|
|
YY_RULE_SETUP
|
|
#line 233 "SDCC.lex"
|
|
{ count(); }
|
|
YY_BREAK
|
|
case 118:
|
|
YY_RULE_SETUP
|
|
#line 234 "SDCC.lex"
|
|
{ count(); }
|
|
YY_BREAK
|
|
case 119:
|
|
YY_RULE_SETUP
|
|
#line 235 "SDCC.lex"
|
|
{ count(); }
|
|
YY_BREAK
|
|
case 120:
|
|
YY_RULE_SETUP
|
|
#line 236 "SDCC.lex"
|
|
{
|
|
char ch=input();
|
|
if (ch!='\n') {
|
|
// that could have been removed by the preprocessor anyway
|
|
werror (W_STRAY_BACKSLASH, column);
|
|
unput(ch);
|
|
}
|
|
}
|
|
YY_BREAK
|
|
case 121:
|
|
YY_RULE_SETUP
|
|
#line 244 "SDCC.lex"
|
|
{ count() ; }
|
|
YY_BREAK
|
|
case 122:
|
|
YY_RULE_SETUP
|
|
#line 245 "SDCC.lex"
|
|
ECHO;
|
|
YY_BREAK
|
|
case YY_STATE_EOF(INITIAL):
|
|
case YY_STATE_EOF(asm):
|
|
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->yy_buffer_status == YY_BUFFER_NEW )
|
|
{
|
|
/* We're scanning a new file or input source. It's
|
|
* possible that this happened because the user
|
|
* just pointed yyin at a new source and called
|
|
* yylex(). If so, then we have to assure
|
|
* consistency between yy_current_buffer and our
|
|
* globals. Here is the right place to do so, because
|
|
* this is the first action (other than possibly a
|
|
* back-up) that will match for the new input source.
|
|
*/
|
|
yy_n_chars = yy_current_buffer->yy_n_chars;
|
|
yy_current_buffer->yy_input_file = yyin;
|
|
yy_current_buffer->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->yy_ch_buf[yy_n_chars] )
|
|
{ /* This was really a NUL. */
|
|
yy_state_type yy_next_state;
|
|
|
|
yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
|
|
|
|
yy_current_state = yy_get_previous_state();
|
|
|
|
/* Okay, we're now positioned to make the NUL
|
|
* transition. We couldn't have
|
|
* yy_get_previous_state() go ahead and do it
|
|
* for us because it doesn't know how to deal
|
|
* with the possibility of jamming (and we don't
|
|
* want to build jamming into it because then it
|
|
* will run more slowly).
|
|
*/
|
|
|
|
yy_next_state = yy_try_NUL_trans( yy_current_state );
|
|
|
|
yy_bp = yytext_ptr + YY_MORE_ADJ;
|
|
|
|
if ( yy_next_state )
|
|
{
|
|
/* Consume the NUL. */
|
|
yy_cp = ++yy_c_buf_p;
|
|
yy_current_state = yy_next_state;
|
|
goto yy_match;
|
|
}
|
|
|
|
else
|
|
{
|
|
yy_cp = yy_c_buf_p;
|
|
goto yy_find_action;
|
|
}
|
|
}
|
|
|
|
else switch ( yy_get_next_buffer() )
|
|
{
|
|
case EOB_ACT_END_OF_FILE:
|
|
{
|
|
yy_did_buffer_switch_on_eof = 0;
|
|
|
|
if ( yywrap() )
|
|
{
|
|
/* Note: because we've taken care in
|
|
* yy_get_next_buffer() to have set up
|
|
* yytext, we can now set up
|
|
* yy_c_buf_p so that if some total
|
|
* hoser (like flex itself) wants to
|
|
* call the scanner after we return the
|
|
* YY_NULL, it'll still work - another
|
|
* YY_NULL will get returned.
|
|
*/
|
|
yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
|
|
|
|
yy_act = YY_STATE_EOF(YY_START);
|
|
goto do_action;
|
|
}
|
|
|
|
else
|
|
{
|
|
if ( ! yy_did_buffer_switch_on_eof )
|
|
YY_NEW_FILE;
|
|
}
|
|
break;
|
|
}
|
|
|
|
case EOB_ACT_CONTINUE_SCAN:
|
|
yy_c_buf_p =
|
|
yytext_ptr + yy_amount_of_matched_text;
|
|
|
|
yy_current_state = yy_get_previous_state();
|
|
|
|
yy_cp = yy_c_buf_p;
|
|
yy_bp = yytext_ptr + YY_MORE_ADJ;
|
|
goto yy_match;
|
|
|
|
case EOB_ACT_LAST_MATCH:
|
|
yy_c_buf_p =
|
|
&yy_current_buffer->yy_ch_buf[yy_n_chars];
|
|
|
|
yy_current_state = yy_get_previous_state();
|
|
|
|
yy_cp = yy_c_buf_p;
|
|
yy_bp = yytext_ptr + YY_MORE_ADJ;
|
|
goto yy_find_action;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default:
|
|
YY_FATAL_ERROR(
|
|
"fatal flex scanner internal error--no action found" );
|
|
} /* end of action switch */
|
|
} /* end of scanning one token */
|
|
} /* end of yylex */
|
|
|
|
|
|
/* yy_get_next_buffer - try to read in a new buffer
|
|
*
|
|
* Returns a code representing an action:
|
|
* EOB_ACT_LAST_MATCH -
|
|
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
|
|
* EOB_ACT_END_OF_FILE - end of file
|
|
*/
|
|
|
|
static int yy_get_next_buffer()
|
|
{
|
|
register char *dest = yy_current_buffer->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->yy_ch_buf[yy_n_chars + 1] )
|
|
YY_FATAL_ERROR(
|
|
"fatal flex scanner internal error--end of buffer missed" );
|
|
|
|
if ( yy_current_buffer->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->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->yy_n_chars = yy_n_chars = 0;
|
|
|
|
else
|
|
{
|
|
int num_to_read =
|
|
yy_current_buffer->yy_buf_size - number_to_move - 1;
|
|
|
|
while ( num_to_read <= 0 )
|
|
{ /* Not enough room in the buffer - grow it. */
|
|
#ifdef YY_USES_REJECT
|
|
YY_FATAL_ERROR(
|
|
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
|
|
#else
|
|
|
|
/* just a shorter name for the current buffer */
|
|
YY_BUFFER_STATE b = 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. */
|
|
yy_flex_realloc( (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->yy_buf_size -
|
|
number_to_move - 1;
|
|
#endif
|
|
}
|
|
|
|
if ( num_to_read > YY_READ_BUF_SIZE )
|
|
num_to_read = YY_READ_BUF_SIZE;
|
|
|
|
/* Read in more data. */
|
|
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
|
|
yy_n_chars, num_to_read );
|
|
|
|
yy_current_buffer->yy_n_chars = yy_n_chars;
|
|
}
|
|
|
|
if ( yy_n_chars == 0 )
|
|
{
|
|
if ( number_to_move == YY_MORE_ADJ )
|
|
{
|
|
ret_val = EOB_ACT_END_OF_FILE;
|
|
yyrestart( yyin );
|
|
}
|
|
|
|
else
|
|
{
|
|
ret_val = EOB_ACT_LAST_MATCH;
|
|
yy_current_buffer->yy_buffer_status =
|
|
YY_BUFFER_EOF_PENDING;
|
|
}
|
|
}
|
|
|
|
else
|
|
ret_val = EOB_ACT_CONTINUE_SCAN;
|
|
|
|
yy_n_chars += number_to_move;
|
|
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
|
|
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
|
|
|
|
yytext_ptr = &yy_current_buffer->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()
|
|
{
|
|
register yy_state_type yy_current_state;
|
|
register char *yy_cp;
|
|
|
|
yy_current_state = yy_start;
|
|
yy_current_state += YY_AT_BOL();
|
|
|
|
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
|
|
{
|
|
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
|
|
if ( yy_accept[yy_current_state] )
|
|
{
|
|
yy_last_accepting_state = yy_current_state;
|
|
yy_last_accepting_cpos = yy_cp;
|
|
}
|
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
{
|
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
if ( yy_current_state >= 757 )
|
|
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 );
|
|
*/
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
|
|
#else
|
|
static yy_state_type yy_try_NUL_trans( yy_current_state )
|
|
yy_state_type yy_current_state;
|
|
#endif
|
|
{
|
|
register int yy_is_jam;
|
|
register char *yy_cp = yy_c_buf_p;
|
|
|
|
register YY_CHAR yy_c = 1;
|
|
if ( yy_accept[yy_current_state] )
|
|
{
|
|
yy_last_accepting_state = yy_current_state;
|
|
yy_last_accepting_cpos = yy_cp;
|
|
}
|
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
{
|
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
if ( yy_current_state >= 757 )
|
|
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 == 756);
|
|
|
|
return yy_is_jam ? 0 : yy_current_state;
|
|
}
|
|
|
|
|
|
#ifndef YY_NO_UNPUT
|
|
#ifdef YY_USE_PROTOS
|
|
static void yyunput( int c, register char *yy_bp )
|
|
#else
|
|
static void yyunput( c, yy_bp )
|
|
int c;
|
|
register char *yy_bp;
|
|
#endif
|
|
{
|
|
register char *yy_cp = yy_c_buf_p;
|
|
|
|
/* undo effects of setting up yytext */
|
|
*yy_cp = yy_hold_char;
|
|
|
|
if ( yy_cp < yy_current_buffer->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->yy_ch_buf[
|
|
yy_current_buffer->yy_buf_size + 2];
|
|
register char *source =
|
|
&yy_current_buffer->yy_ch_buf[number_to_move];
|
|
|
|
while ( source > yy_current_buffer->yy_ch_buf )
|
|
*--dest = *--source;
|
|
|
|
yy_cp += (int) (dest - source);
|
|
yy_bp += (int) (dest - source);
|
|
yy_current_buffer->yy_n_chars =
|
|
yy_n_chars = yy_current_buffer->yy_buf_size;
|
|
|
|
if ( yy_cp < yy_current_buffer->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;
|
|
}
|
|
#endif /* ifndef YY_NO_UNPUT */
|
|
|
|
|
|
#ifdef __cplusplus
|
|
static int yyinput()
|
|
#else
|
|
static int input()
|
|
#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->yy_ch_buf[yy_n_chars] )
|
|
/* This was really a NUL. */
|
|
*yy_c_buf_p = '\0';
|
|
|
|
else
|
|
{ /* need more input */
|
|
int offset = yy_c_buf_p - yytext_ptr;
|
|
++yy_c_buf_p;
|
|
|
|
switch ( yy_get_next_buffer() )
|
|
{
|
|
case EOB_ACT_LAST_MATCH:
|
|
/* This happens because yy_g_n_b()
|
|
* sees that we've accumulated a
|
|
* token and flags that we need to
|
|
* try matching the token before
|
|
* proceeding. But for input(),
|
|
* there's no matching to consider.
|
|
* So convert the EOB_ACT_LAST_MATCH
|
|
* to EOB_ACT_END_OF_FILE.
|
|
*/
|
|
|
|
/* Reset buffer status. */
|
|
yyrestart( yyin );
|
|
|
|
/* fall through */
|
|
|
|
case EOB_ACT_END_OF_FILE:
|
|
{
|
|
if ( yywrap() )
|
|
return EOF;
|
|
|
|
if ( ! yy_did_buffer_switch_on_eof )
|
|
YY_NEW_FILE;
|
|
#ifdef __cplusplus
|
|
return yyinput();
|
|
#else
|
|
return input();
|
|
#endif
|
|
}
|
|
|
|
case EOB_ACT_CONTINUE_SCAN:
|
|
yy_c_buf_p = yytext_ptr + offset;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
|
|
*yy_c_buf_p = '\0'; /* preserve yytext */
|
|
yy_hold_char = *++yy_c_buf_p;
|
|
|
|
yy_current_buffer->yy_at_bol = (c == '\n');
|
|
|
|
return c;
|
|
}
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
void yyrestart( FILE *input_file )
|
|
#else
|
|
void yyrestart( input_file )
|
|
FILE *input_file;
|
|
#endif
|
|
{
|
|
if ( ! yy_current_buffer )
|
|
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
|
|
|
|
yy_init_buffer( yy_current_buffer, input_file );
|
|
yy_load_buffer_state();
|
|
}
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
|
|
#else
|
|
void yy_switch_to_buffer( new_buffer )
|
|
YY_BUFFER_STATE new_buffer;
|
|
#endif
|
|
{
|
|
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->yy_buf_pos = yy_c_buf_p;
|
|
yy_current_buffer->yy_n_chars = yy_n_chars;
|
|
}
|
|
|
|
yy_current_buffer = new_buffer;
|
|
yy_load_buffer_state();
|
|
|
|
/* We don't actually know whether we did this switch during
|
|
* EOF (yywrap()) processing, but the only time this flag
|
|
* is looked at is after yywrap() is called, so it's safe
|
|
* to go ahead and always set it.
|
|
*/
|
|
yy_did_buffer_switch_on_eof = 1;
|
|
}
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
void yy_load_buffer_state( void )
|
|
#else
|
|
void yy_load_buffer_state()
|
|
#endif
|
|
{
|
|
yy_n_chars = yy_current_buffer->yy_n_chars;
|
|
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
|
|
yyin = yy_current_buffer->yy_input_file;
|
|
yy_hold_char = *yy_c_buf_p;
|
|
}
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
|
|
#else
|
|
YY_BUFFER_STATE yy_create_buffer( file, size )
|
|
FILE *file;
|
|
int size;
|
|
#endif
|
|
{
|
|
YY_BUFFER_STATE b;
|
|
|
|
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
|
|
if ( ! b )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
|
|
|
b->yy_buf_size = size;
|
|
|
|
/* yy_ch_buf has to be 2 characters longer than the size given because
|
|
* we need to put in 2 end-of-buffer characters.
|
|
*/
|
|
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
|
|
if ( ! b->yy_ch_buf )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
|
|
|
b->yy_is_our_buffer = 1;
|
|
|
|
yy_init_buffer( b, file );
|
|
|
|
return b;
|
|
}
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
void yy_delete_buffer( YY_BUFFER_STATE b )
|
|
#else
|
|
void yy_delete_buffer( b )
|
|
YY_BUFFER_STATE b;
|
|
#endif
|
|
{
|
|
if ( ! b )
|
|
return;
|
|
|
|
if ( b == yy_current_buffer )
|
|
yy_current_buffer = (YY_BUFFER_STATE) 0;
|
|
|
|
if ( b->yy_is_our_buffer )
|
|
yy_flex_free( (void *) b->yy_ch_buf );
|
|
|
|
yy_flex_free( (void *) b );
|
|
}
|
|
|
|
|
|
#ifndef YY_ALWAYS_INTERACTIVE
|
|
#ifndef YY_NEVER_INTERACTIVE
|
|
extern int isatty YY_PROTO(( int ));
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
|
|
#else
|
|
void yy_init_buffer( b, file )
|
|
YY_BUFFER_STATE b;
|
|
FILE *file;
|
|
#endif
|
|
|
|
|
|
{
|
|
yy_flush_buffer( b );
|
|
|
|
b->yy_input_file = file;
|
|
b->yy_fill_buffer = 1;
|
|
|
|
#if YY_ALWAYS_INTERACTIVE
|
|
b->yy_is_interactive = 1;
|
|
#else
|
|
#if YY_NEVER_INTERACTIVE
|
|
b->yy_is_interactive = 0;
|
|
#else
|
|
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
|
#endif
|
|
#endif
|
|
}
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
void yy_flush_buffer( YY_BUFFER_STATE b )
|
|
#else
|
|
void yy_flush_buffer( b )
|
|
YY_BUFFER_STATE b;
|
|
#endif
|
|
|
|
{
|
|
if ( ! b )
|
|
return;
|
|
|
|
b->yy_n_chars = 0;
|
|
|
|
/* We always need two end-of-buffer characters. The first causes
|
|
* a transition to the end-of-buffer state. The second causes
|
|
* a jam in that state.
|
|
*/
|
|
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
|
|
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
|
|
|
|
b->yy_buf_pos = &b->yy_ch_buf[0];
|
|
|
|
b->yy_at_bol = 1;
|
|
b->yy_buffer_status = YY_BUFFER_NEW;
|
|
|
|
if ( b == yy_current_buffer )
|
|
yy_load_buffer_state();
|
|
}
|
|
|
|
|
|
#ifndef YY_NO_SCAN_BUFFER
|
|
#ifdef YY_USE_PROTOS
|
|
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
|
|
#else
|
|
YY_BUFFER_STATE yy_scan_buffer( base, size )
|
|
char *base;
|
|
yy_size_t size;
|
|
#endif
|
|
{
|
|
YY_BUFFER_STATE b;
|
|
|
|
if ( size < 2 ||
|
|
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
|
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
|
/* They forgot to leave room for the EOB's. */
|
|
return 0;
|
|
|
|
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
|
|
if ( ! b )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
|
|
|
|
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
|
|
b->yy_buf_pos = b->yy_ch_buf = base;
|
|
b->yy_is_our_buffer = 0;
|
|
b->yy_input_file = 0;
|
|
b->yy_n_chars = b->yy_buf_size;
|
|
b->yy_is_interactive = 0;
|
|
b->yy_at_bol = 1;
|
|
b->yy_fill_buffer = 0;
|
|
b->yy_buffer_status = YY_BUFFER_NEW;
|
|
|
|
yy_switch_to_buffer( b );
|
|
|
|
return b;
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifndef YY_NO_SCAN_STRING
|
|
#ifdef YY_USE_PROTOS
|
|
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
|
|
#else
|
|
YY_BUFFER_STATE yy_scan_string( yy_str )
|
|
yyconst char *yy_str;
|
|
#endif
|
|
{
|
|
int len;
|
|
for ( len = 0; yy_str[len]; ++len )
|
|
;
|
|
|
|
return yy_scan_bytes( yy_str, len );
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifndef YY_NO_SCAN_BYTES
|
|
#ifdef YY_USE_PROTOS
|
|
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
|
|
#else
|
|
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
|
|
yyconst char *bytes;
|
|
int len;
|
|
#endif
|
|
{
|
|
YY_BUFFER_STATE b;
|
|
char *buf;
|
|
yy_size_t n;
|
|
int i;
|
|
|
|
/* Get memory for full buffer, including space for trailing EOB's. */
|
|
n = len + 2;
|
|
buf = (char *) yy_flex_alloc( n );
|
|
if ( ! buf )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
|
|
|
|
for ( i = 0; i < len; ++i )
|
|
buf[i] = bytes[i];
|
|
|
|
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
|
|
|
|
b = yy_scan_buffer( buf, n );
|
|
if ( ! b )
|
|
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
|
|
|
|
/* It's okay to grow etc. this buffer, and we should throw it
|
|
* away when we're done.
|
|
*/
|
|
b->yy_is_our_buffer = 1;
|
|
|
|
return b;
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifndef YY_NO_PUSH_STATE
|
|
#ifdef YY_USE_PROTOS
|
|
static void yy_push_state( int new_state )
|
|
#else
|
|
static void yy_push_state( new_state )
|
|
int new_state;
|
|
#endif
|
|
{
|
|
if ( yy_start_stack_ptr >= yy_start_stack_depth )
|
|
{
|
|
yy_size_t new_size;
|
|
|
|
yy_start_stack_depth += YY_START_STACK_INCR;
|
|
new_size = yy_start_stack_depth * sizeof( int );
|
|
|
|
if ( ! yy_start_stack )
|
|
yy_start_stack = (int *) yy_flex_alloc( new_size );
|
|
|
|
else
|
|
yy_start_stack = (int *) yy_flex_realloc(
|
|
(void *) yy_start_stack, new_size );
|
|
|
|
if ( ! yy_start_stack )
|
|
YY_FATAL_ERROR(
|
|
"out of memory expanding start-condition stack" );
|
|
}
|
|
|
|
yy_start_stack[yy_start_stack_ptr++] = YY_START;
|
|
|
|
BEGIN(new_state);
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifndef YY_NO_POP_STATE
|
|
static void yy_pop_state()
|
|
{
|
|
if ( --yy_start_stack_ptr < 0 )
|
|
YY_FATAL_ERROR( "start-condition stack underflow" );
|
|
|
|
BEGIN(yy_start_stack[yy_start_stack_ptr]);
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifndef YY_NO_TOP_STATE
|
|
static int yy_top_state()
|
|
{
|
|
return yy_start_stack[yy_start_stack_ptr - 1];
|
|
}
|
|
#endif
|
|
|
|
#ifndef YY_EXIT_FAILURE
|
|
#define YY_EXIT_FAILURE 2
|
|
#endif
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
static void yy_fatal_error( yyconst char msg[] )
|
|
#else
|
|
static void yy_fatal_error( msg )
|
|
char msg[];
|
|
#endif
|
|
{
|
|
(void) fprintf( stderr, "%s\n", msg );
|
|
exit( YY_EXIT_FAILURE );
|
|
}
|
|
|
|
|
|
|
|
/* Redefine yyless() so it works in section 3 code. */
|
|
|
|
#undef yyless
|
|
#define yyless(n) \
|
|
do \
|
|
{ \
|
|
/* Undo effects of setting up yytext. */ \
|
|
yytext[yyleng] = yy_hold_char; \
|
|
yy_c_buf_p = yytext + n; \
|
|
yy_hold_char = *yy_c_buf_p; \
|
|
*yy_c_buf_p = '\0'; \
|
|
yyleng = n; \
|
|
} \
|
|
while ( 0 )
|
|
|
|
|
|
/* Internal utility routines. */
|
|
|
|
#ifndef yytext_ptr
|
|
#ifdef YY_USE_PROTOS
|
|
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
|
|
#else
|
|
static void yy_flex_strncpy( s1, s2, n )
|
|
char *s1;
|
|
yyconst char *s2;
|
|
int n;
|
|
#endif
|
|
{
|
|
register int i;
|
|
for ( i = 0; i < n; ++i )
|
|
s1[i] = s2[i];
|
|
}
|
|
#endif
|
|
|
|
#ifdef YY_NEED_STRLEN
|
|
#ifdef YY_USE_PROTOS
|
|
static int yy_flex_strlen( yyconst char *s )
|
|
#else
|
|
static int yy_flex_strlen( s )
|
|
yyconst char *s;
|
|
#endif
|
|
{
|
|
register int n;
|
|
for ( n = 0; s[n]; ++n )
|
|
;
|
|
|
|
return n;
|
|
}
|
|
#endif
|
|
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
static void *yy_flex_alloc( yy_size_t size )
|
|
#else
|
|
static void *yy_flex_alloc( size )
|
|
yy_size_t size;
|
|
#endif
|
|
{
|
|
return (void *) malloc( size );
|
|
}
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
static void *yy_flex_realloc( void *ptr, yy_size_t size )
|
|
#else
|
|
static void *yy_flex_realloc( ptr, size )
|
|
void *ptr;
|
|
yy_size_t size;
|
|
#endif
|
|
{
|
|
/* The cast to (char *) in the following accommodates both
|
|
* implementations that use char* generic pointers, and those
|
|
* that use void* generic pointers. It works with the latter
|
|
* because both ANSI C and C++ allow castless assignment from
|
|
* any pointer type to void*, and deal with argument conversions
|
|
* as though doing an assignment.
|
|
*/
|
|
return (void *) realloc( (char *) ptr, size );
|
|
}
|
|
|
|
#ifdef YY_USE_PROTOS
|
|
static void yy_flex_free( void *ptr )
|
|
#else
|
|
static void yy_flex_free( ptr )
|
|
void *ptr;
|
|
#endif
|
|
{
|
|
free( ptr );
|
|
}
|
|
|
|
#if YY_MAIN
|
|
int main()
|
|
{
|
|
yylex();
|
|
return 0;
|
|
}
|
|
#endif
|
|
#line 245 "SDCC.lex"
|
|
|
|
|
|
int checkCurrFile ( char *s)
|
|
{
|
|
char lineNum[10] ;
|
|
int lNum ;
|
|
char *tptr ;
|
|
|
|
/* first check if this is a #line */
|
|
if ( strncmp(s,"#line",5) )
|
|
return 0 ;
|
|
|
|
/* get to the line number */
|
|
while (!isdigit(*s))
|
|
s++ ;
|
|
tptr = lineNum ;
|
|
while (isdigit(*s))
|
|
*tptr++ = *s++ ;
|
|
*tptr = '\0';
|
|
sscanf(lineNum,"%d",&lNum);
|
|
|
|
/* now see if we have a file name */
|
|
while (*s != '\"' && *s)
|
|
s++ ;
|
|
|
|
/* if we don't have a filename then */
|
|
/* set the current line number to */
|
|
/* line number if printFlag is on */
|
|
if (!*s) {
|
|
lineno = yylineno = lNum ;
|
|
return 0;
|
|
}
|
|
|
|
/* if we have a filename then check */
|
|
/* if it is "standard in" if yes then */
|
|
/* get the currentfile name info */
|
|
s++ ;
|
|
|
|
if ( strncmp(s,fullSrcFileName,strlen(fullSrcFileName)) == 0) {
|
|
lineno = yylineno = lNum;
|
|
currFname = fullSrcFileName ;
|
|
} else {
|
|
char *sb = s;
|
|
/* mark the end of the filename */
|
|
while (*s != '"') s++;
|
|
*s = '\0';
|
|
currFname = malloc (strlen(sb)+1);
|
|
strcpy(currFname,sb);
|
|
lineno = yylineno = lNum;
|
|
}
|
|
filename = currFname ;
|
|
return 0;
|
|
}
|
|
|
|
int column = 0;
|
|
int plineIdx=0;
|
|
|
|
void count()
|
|
{
|
|
int i;
|
|
for (i = 0; yytext[i] != '\0'; i++) {
|
|
if (yytext[i] == '\n') {
|
|
column = 0;
|
|
lineno = ++yylineno ;
|
|
}
|
|
else
|
|
if (yytext[i] == '\t')
|
|
column += 8 - (column % 8);
|
|
else
|
|
column++;
|
|
}
|
|
/* ECHO; */
|
|
}
|
|
|
|
int check_type()
|
|
{
|
|
/* check if it is in the typedef table */
|
|
if (findSym(TypedefTab,NULL,yytext)) {
|
|
strcpy(yylval.yychar,yytext);
|
|
return (TYPE_NAME) ;
|
|
}
|
|
else {
|
|
strcpy (yylval.yychar,yytext);
|
|
return(IDENTIFIER);
|
|
}
|
|
}
|
|
|
|
char strLitBuff[2048]; // TODO: this is asking for the next bug :)
|
|
|
|
/*
|
|
* Change by JTV 2001-05-19 to not concantenate strings
|
|
* to support ANSI hex and octal escape sequences in string liteals
|
|
*/
|
|
|
|
char *stringLiteral () {
|
|
int ch;
|
|
char *str = strLitBuff;
|
|
|
|
*str++ = '\"';
|
|
/* put into the buffer till we hit the first \" */
|
|
|
|
while (1) {
|
|
ch = input();
|
|
|
|
if (!ch)
|
|
break; /* end of input */
|
|
|
|
/* if it is a \ then escape char's are allowed */
|
|
if (ch == '\\') {
|
|
ch=input();
|
|
if (ch=='\n') {
|
|
/* \<newline> is a continuator */
|
|
lineno=++yylineno;
|
|
column=0;
|
|
continue;
|
|
}
|
|
*str++ = '\\'; /* backslash in place */
|
|
*str++ = ch; /* get the escape char, no further check */
|
|
continue; /* carry on */
|
|
}
|
|
|
|
/* if new line we have a new line break, which is illegal */
|
|
if (ch == '\n') {
|
|
werror (W_NEWLINE_IN_STRING);
|
|
*str++ = '\n';
|
|
lineno=++yylineno;
|
|
column=0;
|
|
continue;
|
|
}
|
|
|
|
/* if this is a quote then we have work to do */
|
|
/* find the next non whitespace character */
|
|
/* if that is a double quote then carry on */
|
|
if (ch == '\"') {
|
|
*str++ = ch ; /* Pass end of this string or substring to evaluator */
|
|
while ((ch = input()) && (isspace(ch) || ch=='\\')) {
|
|
switch (ch) {
|
|
case '\\':
|
|
if ((ch=input())!='\n') {
|
|
werror (W_STRAY_BACKSLASH, column);
|
|
unput(ch);
|
|
} else {
|
|
lineno=++yylineno;
|
|
column=0;
|
|
}
|
|
break;
|
|
case '\n':
|
|
yylineno++;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (!ch)
|
|
break;
|
|
|
|
if (ch != '\"') {
|
|
unput(ch) ;
|
|
break ;
|
|
}
|
|
}
|
|
*str++ = ch; /* Put next substring introducer into output string */
|
|
}
|
|
*str = '\0';
|
|
|
|
return strLitBuff;
|
|
}
|
|
|
|
void doPragma (int op, char *cp)
|
|
{
|
|
switch (op) {
|
|
case P_SAVE:
|
|
memcpy(&save_options,&options,sizeof(options));
|
|
memcpy(&save_optimize,&optimize,sizeof(optimize));
|
|
break;
|
|
case P_RESTORE:
|
|
memcpy(&options,&save_options,sizeof(options));
|
|
memcpy(&optimize,&save_optimize,sizeof(optimize));
|
|
break;
|
|
case P_NOINDUCTION:
|
|
optimize.loopInduction = 0 ;
|
|
break;
|
|
case P_NOINVARIANT:
|
|
optimize.loopInvariant = 0 ;
|
|
break;
|
|
case P_INDUCTION:
|
|
optimize.loopInduction = 1 ;
|
|
break;
|
|
case P_STACKAUTO:
|
|
options.stackAuto = 1;
|
|
break;
|
|
case P_NOJTBOUND:
|
|
optimize.noJTabBoundary = 1;
|
|
break;
|
|
case P_NOGCSE:
|
|
optimize.global_cse = 0;
|
|
break;
|
|
case P_NOOVERLAY:
|
|
options.noOverlay = 1;
|
|
break;
|
|
case P_CALLEE_SAVES:
|
|
{
|
|
int i=0;
|
|
/* append to the functions already listed
|
|
in callee-saves */
|
|
for (; options.calleeSaves[i] ;i++);
|
|
parseWithComma(&options.calleeSaves[i], Safe_strdup(cp));
|
|
}
|
|
break;
|
|
case P_EXCLUDE:
|
|
parseWithComma(options.excludeRegs, Safe_strdup(cp));
|
|
break;
|
|
case P_LOOPREV:
|
|
optimize.noLoopReverse = 1;
|
|
break;
|
|
}
|
|
}
|
|
|
|
int process_pragma(char *s)
|
|
{
|
|
char *cp ;
|
|
/* find the pragma */
|
|
while (strncmp(s,"#pragma",7))
|
|
s++;
|
|
s += 7;
|
|
|
|
/* look for the directive */
|
|
while(isspace(*s)) s++;
|
|
|
|
cp = s;
|
|
/* look for the end of the directive */
|
|
while ((! isspace(*s)) &&
|
|
(*s != '\n'))
|
|
s++ ;
|
|
|
|
/* First give the port a chance */
|
|
if (port->process_pragma && !port->process_pragma(cp))
|
|
return 0;
|
|
|
|
/* now compare and do what needs to be done */
|
|
if (strncmp(cp,PRAGMA_SAVE,strlen(PRAGMA_SAVE)) == 0) {
|
|
doPragma(P_SAVE,cp+strlen(PRAGMA_SAVE));
|
|
return 0;
|
|
}
|
|
|
|
if (strncmp(cp,PRAGMA_RESTORE,strlen(PRAGMA_RESTORE)) == 0) {
|
|
doPragma (P_RESTORE,cp+strlen(PRAGMA_RESTORE));
|
|
return 0;
|
|
}
|
|
|
|
if (strncmp(cp,PRAGMA_NOINDUCTION,strlen(PRAGMA_NOINDUCTION)) == 0) {
|
|
doPragma (P_NOINDUCTION,cp+strlen(PRAGMA_NOINDUCTION)) ;
|
|
return 0;
|
|
}
|
|
|
|
if (strncmp(cp,PRAGMA_NOINVARIANT,strlen(PRAGMA_NOINVARIANT)) == 0) {
|
|
doPragma (P_NOINVARIANT,NULL) ;
|
|
return 0;
|
|
}
|
|
|
|
if (strncmp(cp,PRAGMA_INDUCTION,strlen(PRAGMA_INDUCTION)) == 0) {
|
|
doPragma (P_INDUCTION,NULL) ;
|
|
return 0;
|
|
}
|
|
|
|
if (strncmp(cp,PRAGMA_STACKAUTO,strlen(PRAGMA_STACKAUTO)) == 0) {
|
|
doPragma (P_STACKAUTO,NULL);
|
|
return 0;
|
|
}
|
|
|
|
if (strncmp(cp,PRAGMA_NOJTBOUND,strlen(PRAGMA_NOJTBOUND)) == 0) {
|
|
doPragma (P_NOJTBOUND,NULL);
|
|
return 0;
|
|
}
|
|
|
|
if (strncmp(cp,PRAGMA_NOGCSE,strlen(PRAGMA_NOGCSE)) == 0) {
|
|
doPragma (P_NOGCSE,NULL);
|
|
return 0;
|
|
}
|
|
|
|
if (strncmp(cp,PRAGMA_NOOVERLAY,strlen(PRAGMA_NOOVERLAY)) == 0) {
|
|
doPragma (P_NOOVERLAY,NULL);
|
|
return 0;
|
|
}
|
|
|
|
if (strncmp(cp,PRAGMA_CALLEESAVES,strlen(PRAGMA_CALLEESAVES)) == 0) {
|
|
doPragma(P_CALLEE_SAVES,cp+strlen(PRAGMA_CALLEESAVES));
|
|
return 0;
|
|
}
|
|
|
|
if (strncmp(cp,PRAGMA_EXCLUDE,strlen(PRAGMA_EXCLUDE)) == 0) {
|
|
doPragma(P_EXCLUDE,cp+strlen(PRAGMA_EXCLUDE));
|
|
return 0;
|
|
}
|
|
|
|
if (strncmp(cp,PRAGMA_NOLOOPREV,strlen(PRAGMA_NOLOOPREV)) == 0) {
|
|
doPragma(P_LOOPREV,NULL);
|
|
return 0;
|
|
}
|
|
|
|
werror(W_UNKNOWN_PRAGMA,cp);
|
|
return 0;
|
|
}
|
|
|
|
/* will return 1 if the string is a part
|
|
of a target specific keyword */
|
|
int isTargetKeyword(char *s)
|
|
{
|
|
int i;
|
|
|
|
if (port->keywords == NULL)
|
|
return 0;
|
|
for ( i = 0 ; port->keywords[i] ; i++ ) {
|
|
if (strcmp(port->keywords[i],s) == 0)
|
|
return 1;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
extern int fatalError;
|
|
|
|
int yyerror(char *s)
|
|
{
|
|
fflush(stdout);
|
|
|
|
if (yylineno && filename)
|
|
fprintf(stdout,"\n%s(%d) %s: token -> '%s' ; column %d\n",
|
|
filename,yylineno,
|
|
s,yytext,column);
|
|
fatalError++;
|
|
return 0;
|
|
}
|