You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3267 lines
94 KiB
3267 lines
94 KiB
15 years ago
|
#line 2 "lexer.c.tmp"
|
||
|
|
||
|
#line 4 "lexer.c.tmp"
|
||
|
|
||
|
#define YY_INT_ALIGNED short int
|
||
|
|
||
|
/* A lexical scanner generated by flex */
|
||
|
|
||
|
#define FLEX_SCANNER
|
||
|
#define YY_FLEX_MAJOR_VERSION 2
|
||
|
#define YY_FLEX_MINOR_VERSION 5
|
||
|
#define YY_FLEX_SUBMINOR_VERSION 33
|
||
|
#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 __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;
|
||
|
#endif /* ! C99 */
|
||
|
|
||
|
/* 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 /* ! FLEXINT_H */
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
|
||
|
/* The "const" storage-class-modifier is valid. */
|
||
|
#define YY_USE_CONST
|
||
|
|
||
|
#else /* ! __cplusplus */
|
||
|
|
||
|
#if __STDC__
|
||
|
|
||
|
#define YY_USE_CONST
|
||
|
|
||
|
#endif /* __STDC__ */
|
||
|
#endif /* ! __cplusplus */
|
||
|
|
||
|
#ifdef YY_USE_CONST
|
||
|
#define yyconst const
|
||
|
#else
|
||
|
#define yyconst
|
||
|
#endif
|
||
|
|
||
|
/* Returned upon end-of-file. */
|
||
|
#define YY_NULL 0
|
||
|
|
||
|
/* Promotes a possibly negative, possibly signed char to an unsigned
|
||
|
* integer for use as an array index. If the signed char is negative,
|
||
|
* we want to instead treat it as an 8-bit unsigned char, hence the
|
||
|
* double cast.
|
||
|
*/
|
||
|
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
|
||
|
|
||
|
/* Enter a start condition. This macro really ought to take a parameter,
|
||
|
* but we do it the disgusting crufty way forced on us by the ()-less
|
||
|
* definition of BEGIN.
|
||
|
*/
|
||
|
#define BEGIN (yy_start) = 1 + 2 *
|
||
|
|
||
|
/* Translate the current start state into a value that can be later handed
|
||
|
* to BEGIN to return to the state. The YYSTATE alias is for lex
|
||
|
* compatibility.
|
||
|
*/
|
||
|
#define YY_START (((yy_start) - 1) / 2)
|
||
|
#define YYSTATE YY_START
|
||
|
|
||
|
/* Action number for EOF rule of a given start state. */
|
||
|
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
||
|
|
||
|
/* Special action meaning "start processing a new file". */
|
||
|
#define YY_NEW_FILE yyrestart(yyin )
|
||
|
|
||
|
#define YY_END_OF_BUFFER_CHAR 0
|
||
|
|
||
|
/* Size of default input buffer. */
|
||
|
#ifndef YY_BUF_SIZE
|
||
|
#define YY_BUF_SIZE 16384
|
||
|
#endif
|
||
|
|
||
|
/* The state buf must be large enough to hold one state per character in the main buffer.
|
||
|
*/
|
||
|
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
|
||
|
|
||
|
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
|
||
|
#define YY_TYPEDEF_YY_BUFFER_STATE
|
||
|
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
||
|
#endif
|
||
|
|
||
|
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
|
||
|
|
||
|
#define YY_LESS_LINENO(n)
|
||
|
|
||
|
/* Return all but the first "n" matched characters back to the input stream. */
|
||
|
#define yyless(n) \
|
||
|
do \
|
||
|
{ \
|
||
|
/* Undo effects of setting up yytext. */ \
|
||
|
int yyless_macro_arg = (n); \
|
||
|
YY_LESS_LINENO(yyless_macro_arg);\
|
||
|
*yy_cp = (yy_hold_char); \
|
||
|
YY_RESTORE_YY_MORE_OFFSET \
|
||
|
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
|
||
|
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
|
||
|
} \
|
||
|
while ( 0 )
|
||
|
|
||
|
#define unput(c) yyunput( c, (yytext_ptr) )
|
||
|
|
||
|
/* 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).
|
||
|
*/
|
||
|
|
||
|
#ifndef YY_TYPEDEF_YY_SIZE_T
|
||
|
#define YY_TYPEDEF_YY_SIZE_T
|
||
|
typedef unsigned int 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 yyrestart()), so that the user can continue scanning by
|
||
|
* just pointing yyin at a new input file.
|
||
|
*/
|
||
|
#define YY_BUFFER_EOF_PENDING 2
|
||
|
|
||
|
};
|
||
|
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
|
||
|
|
||
|
/* Stack of input buffers. */
|
||
|
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
|
||
|
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
|
||
|
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
|
||
|
|
||
|
/* We provide macros for accessing buffer states in case in the
|
||
|
* future we want to put the buffer states in a more general
|
||
|
* "scanner state".
|
||
|
*
|
||
|
* Returns the top of the stack, or NULL.
|
||
|
*/
|
||
|
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
|
||
|
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
|
||
|
: NULL)
|
||
|
|
||
|
/* Same as previous macro, but useful when we know that the buffer stack is not
|
||
|
* NULL or when we need an lvalue. For internal use only.
|
||
|
*/
|
||
|
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
|
||
|
|
||
|
/* yy_hold_char holds the character lost when yytext is formed. */
|
||
|
static char yy_hold_char;
|
||
|
static 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 = 0; /* whether we need to initialize */
|
||
|
static int yy_start = 0; /* start state number */
|
||
|
|
||
|
/* Flag which is used to allow yywrap()'s to do buffer switches
|
||
|
* instead of setting up a fresh yyin. A bit of a hack ...
|
||
|
*/
|
||
|
static int yy_did_buffer_switch_on_eof;
|
||
|
|
||
|
void yyrestart (FILE *input_file );
|
||
|
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
|
||
|
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
|
||
|
void yy_delete_buffer (YY_BUFFER_STATE b );
|
||
|
void yy_flush_buffer (YY_BUFFER_STATE b );
|
||
|
void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
|
||
|
void yypop_buffer_state (void );
|
||
|
|
||
|
static void yyensure_buffer_stack (void );
|
||
|
static void yy_load_buffer_state (void );
|
||
|
static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
|
||
|
|
||
|
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
|
||
|
|
||
|
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
|
||
|
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
|
||
|
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
|
||
|
|
||
|
void *yyalloc (yy_size_t );
|
||
|
void *yyrealloc (void *,yy_size_t );
|
||
|
void yyfree (void * );
|
||
|
|
||
|
#define yy_new_buffer yy_create_buffer
|
||
|
|
||
|
#define yy_set_interactive(is_interactive) \
|
||
|
{ \
|
||
|
if ( ! YY_CURRENT_BUFFER ){ \
|
||
|
yyensure_buffer_stack (); \
|
||
|
YY_CURRENT_BUFFER_LVALUE = \
|
||
|
yy_create_buffer(yyin,YY_BUF_SIZE ); \
|
||
|
} \
|
||
|
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
|
||
|
}
|
||
|
|
||
|
#define yy_set_bol(at_bol) \
|
||
|
{ \
|
||
|
if ( ! YY_CURRENT_BUFFER ){\
|
||
|
yyensure_buffer_stack (); \
|
||
|
YY_CURRENT_BUFFER_LVALUE = \
|
||
|
yy_create_buffer(yyin,YY_BUF_SIZE ); \
|
||
|
} \
|
||
|
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
|
||
|
}
|
||
|
|
||
|
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
|
||
|
|
||
|
/* Begin user sect3 */
|
||
|
|
||
|
typedef unsigned char YY_CHAR;
|
||
|
|
||
|
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
|
||
|
|
||
|
typedef int yy_state_type;
|
||
|
|
||
|
extern int yylineno;
|
||
|
|
||
|
int yylineno = 1;
|
||
|
|
||
|
extern char *yytext;
|
||
|
#define yytext_ptr yytext
|
||
|
|
||
|
static yy_state_type yy_get_previous_state (void );
|
||
|
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
|
||
|
static int yy_get_next_buffer (void );
|
||
|
static void yy_fatal_error (yyconst char msg[] );
|
||
|
|
||
|
/* Done after the current pattern has been matched and before the
|
||
|
* corresponding action - sets up yytext.
|
||
|
*/
|
||
|
#define YY_DO_BEFORE_ACTION \
|
||
|
(yytext_ptr) = yy_bp; \
|
||
|
yyleng = (size_t) (yy_cp - yy_bp); \
|
||
|
(yy_hold_char) = *yy_cp; \
|
||
|
*yy_cp = '\0'; \
|
||
|
(yy_c_buf_p) = yy_cp;
|
||
|
|
||
|
#define YY_NUM_RULES 111
|
||
|
#define YY_END_OF_BUFFER 112
|
||
|
/* 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[735] =
|
||
|
{ 0,
|
||
|
0, 0, 0, 0, 0, 0, 112, 110, 65, 66,
|
||
|
110, 110, 110, 110, 110, 68, 68, 110, 71, 71,
|
||
|
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
|
||
|
71, 71, 71, 71, 71, 71, 110, 65, 110, 109,
|
||
|
108, 109, 78, 76, 78, 0, 73, 0, 74, 0,
|
||
|
68, 0, 72, 69, 72, 75, 67, 0, 47, 71,
|
||
|
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
|
||
|
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
|
||
|
71, 71, 71, 71, 71, 71, 71, 71, 71, 48,
|
||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
|
||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
77, 69, 64, 72, 67, 70, 71, 71, 71, 71,
|
||
|
71, 71, 71, 71, 71, 71, 71, 27, 71, 71,
|
||
|
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
|
||
|
71, 71, 71, 71, 71, 71, 71, 0, 0, 0,
|
||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
0, 0, 0, 14, 0, 0, 0, 0, 0, 0,
|
||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
0, 0, 0, 0, 0, 69, 40, 71, 25, 23,
|
||
|
71, 71, 71, 33, 71, 71, 71, 28, 71, 71,
|
||
|
|
||
|
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
|
||
|
38, 71, 71, 71, 31, 71, 0, 0, 0, 0,
|
||
|
0, 0, 0, 0, 101, 15, 0, 0, 0, 0,
|
||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
107, 69, 71, 71, 71, 71, 71, 16, 36, 71,
|
||
|
71, 39, 29, 71, 71, 71, 71, 71, 26, 71,
|
||
|
71, 22, 71, 71, 71, 44, 71, 71, 71, 71,
|
||
|
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, 71, 71, 71, 71, 71, 71, 30, 71,
|
||
|
71, 71, 71, 71, 18, 71, 34, 37, 17, 71,
|
||
|
71, 71, 71, 71, 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, 71, 71, 71,
|
||
|
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
|
||
|
71, 20, 71, 21, 71, 41, 71, 32, 24, 0,
|
||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
|
||
|
0, 0, 0, 0, 5, 0, 0, 0, 0, 0,
|
||
|
6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
0, 0, 0, 0, 0, 71, 71, 71, 71, 71,
|
||
|
71, 71, 71, 71, 71, 71, 57, 45, 71, 43,
|
||
|
71, 46, 35, 6, 0, 0, 0, 0, 0, 7,
|
||
|
0, 79, 0, 0, 10, 0, 0, 105, 3, 11,
|
||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
0, 0, 0, 106, 0, 0, 0, 0, 0, 71,
|
||
|
71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
|
||
|
71, 42, 19, 0, 0, 0, 0, 0, 0, 0,
|
||
|
|
||
|
0, 0, 0, 0, 103, 0, 0, 0, 0, 0,
|
||
|
0, 0, 0, 0, 0, 0, 0, 8, 90, 0,
|
||
|
88, 0, 71, 71, 52, 51, 71, 71, 71, 55,
|
||
|
71, 71, 56, 71, 71, 0, 0, 0, 0, 0,
|
||
|
0, 0, 13, 0, 0, 0, 0, 0, 0, 0,
|
||
|
0, 0, 9, 0, 0, 0, 100, 0, 0, 0,
|
||
|
0, 58, 71, 71, 54, 50, 63, 71, 71, 71,
|
||
|
71, 104, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
0, 0, 0, 12, 91, 89, 0, 0, 0, 0,
|
||
|
0, 0, 1, 0, 0, 71, 49, 71, 71, 61,
|
||
|
|
||
|
62, 0, 0, 0, 0, 0, 0, 0, 102, 0,
|
||
|
94, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
71, 59, 60, 0, 0, 0, 0, 0, 0, 0,
|
||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
53, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
0, 0, 0, 0, 99, 2, 0, 0, 0, 0,
|
||
|
0, 0, 0, 0, 0, 0, 93, 0, 0, 0,
|
||
|
0, 85, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
|
0, 0, 4, 0, 0, 0, 0, 0, 0, 0,
|
||
|
0, 0, 0, 0, 84, 0, 0, 0, 0, 0,
|
||
|
|
||
|
97, 0, 0, 0, 81, 0, 0, 0, 0, 0,
|
||
|
0, 0, 0, 0, 83, 0, 0, 92, 98, 95,
|
||
|
0, 80, 0, 0, 0, 96, 0, 0, 0, 82,
|
||
|
0, 86, 87, 0
|
||
|
} ;
|
||
|
|
||
|
static yyconst flex_int32_t yy_ec[256] =
|
||
|
{ 0,
|
||
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
||
|
1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
|
||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
|
1, 2, 1, 5, 1, 1, 6, 1, 7, 1,
|
||
|
1, 8, 9, 1, 10, 11, 12, 13, 14, 14,
|
||
|
14, 14, 14, 14, 14, 14, 14, 15, 1, 1,
|
||
|
1, 1, 1, 1, 16, 17, 18, 19, 20, 21,
|
||
|
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
||
|
32, 33, 34, 35, 36, 37, 38, 39, 40, 26,
|
||
|
1, 1, 1, 1, 41, 1, 42, 43, 44, 45,
|
||
|
|
||
|
46, 47, 48, 49, 50, 26, 51, 52, 53, 54,
|
||
|
55, 56, 26, 57, 58, 59, 60, 61, 62, 63,
|
||
|
64, 26, 1, 65, 1, 1, 1, 1, 1, 1,
|
||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
|
|
||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||
|
1, 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[66] =
|
||
|
{ 0,
|
||
|
1, 1, 2, 1, 1, 1, 1, 1, 1, 3,
|
||
|
3, 3, 4, 4, 1, 4, 4, 4, 4, 4,
|
||
|
4, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||
|
3, 4, 4, 4, 4, 4, 4, 3, 3, 3,
|
||
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||
|
3, 3, 3, 3, 1
|
||
|
} ;
|
||
|
|
||
|
static yyconst flex_int16_t yy_base[743] =
|
||
|
{ 0,
|
||
|
0, 64, 1581, 65, 64, 66, 1583, 1585, 1585, 1585,
|
||
|
70, 73, 68, 73, 80, 80, 84, 1567, 89, 92,
|
||
|
95, 98, 102, 105, 110, 113, 120, 123, 126, 129,
|
||
|
134, 137, 151, 159, 169, 165, 1516, 150, 209, 1585,
|
||
|
1585, 1560, 1585, 1585, 1567, 124, 1585, 181, 1585, 64,
|
||
|
179, 189, 192, 237, 195, 1585, 0, 0, 1585, 200,
|
||
|
211, 242, 206, 248, 252, 255, 258, 264, 267, 270,
|
||
|
274, 277, 281, 285, 288, 291, 294, 300, 303, 309,
|
||
|
315, 320, 332, 337, 342, 348, 351, 355, 358, 1585,
|
||
|
369, 391, 1534, 1553, 186, 1521, 96, 1529, 72, 286,
|
||
|
|
||
|
1524, 332, 1517, 324, 1530, 65, 108, 1517, 1520, 1515,
|
||
|
1585, 370, 222, 382, 0, 0, 390, 417, 420, 423,
|
||
|
426, 429, 432, 435, 438, 441, 444, 449, 452, 455,
|
||
|
458, 466, 471, 481, 484, 492, 495, 498, 501, 506,
|
||
|
509, 512, 524, 527, 532, 537, 541, 1540, 253, 140,
|
||
|
1515, 1542, 1515, 1520, 1541, 1507, 326, 1517, 1515, 429,
|
||
|
1517, 148, 1499, 1585, 1501, 1512, 1511, 294, 1495, 1508,
|
||
|
1493, 1509, 1492, 1503, 1498, 1516, 1487, 1492, 1488, 1493,
|
||
|
1485, 1496, 546, 242, 553, 559, 564, 568, 575, 578,
|
||
|
582, 585, 593, 596, 599, 602, 605, 608, 611, 614,
|
||
|
|
||
|
617, 620, 623, 626, 640, 631, 643, 650, 660, 664,
|
||
|
667, 680, 685, 688, 691, 694, 1496, 1483, 1493, 1491,
|
||
|
1490, 1490, 1473, 1469, 1585, 1585, 1486, 1476, 1471, 1477,
|
||
|
1471, 1509, 1471, 1473, 1478, 1477, 1466, 1472, 1460, 1469,
|
||
|
1459, 1458, 362, 1458, 242, 1497, 1468, 1467, 1453, 1452,
|
||
|
1585, 390, 698, 703, 706, 710, 718, 727, 742, 745,
|
||
|
748, 751, 754, 757, 760, 763, 766, 770, 773, 776,
|
||
|
784, 787, 790, 793, 796, 805, 813, 820, 825, 829,
|
||
|
1450, 1451, 1449, 1447, 1460, 1455, 1448, 1446, 1442, 1455,
|
||
|
1458, 1444, 1441, 1437, 1442, 1448, 1448, 1438, 1440, 1436,
|
||
|
|
||
|
1443, 1465, 1434, 1423, 1440, 1430, 1428, 1428, 1430, 456,
|
||
|
1463, 1420, 832, 846, 836, 839, 867, 872, 850, 875,
|
||
|
880, 883, 886, 889, 893, 896, 899, 902, 905, 908,
|
||
|
916, 919, 923, 929, 1427, 1420, 650, 1425, 1419, 1421,
|
||
|
1415, 1414, 1415, 1429, 1409, 1424, 1409, 1422, 1408, 1415,
|
||
|
1419, 1418, 1416, 1407, 1405, 1405, 1408, 1398, 1438, 1435,
|
||
|
1395, 1408, 1402, 1396, 1404, 1394, 1406, 932, 935, 945,
|
||
|
948, 966, 969, 974, 979, 982, 990, 995, 1001, 1005,
|
||
|
1010, 1013, 1016, 1021, 1024, 1027, 1030, 1033, 1036, 1401,
|
||
|
1428, 1396, 1398, 1397, 1385, 1395, 1381, 1391, 1388, 1391,
|
||
|
|
||
|
1390, 1378, 1388, 1387, 1585, 1386, 1385, 1378, 1394, 1410,
|
||
|
508, 1385, 1369, 1375, 1365, 1374, 1367, 1368, 1370, 1373,
|
||
|
1364, 1372, 1374, 1370, 1362, 1041, 1044, 1047, 1062, 1066,
|
||
|
1069, 1072, 1075, 1078, 1089, 1097, 1100, 1105, 1108, 1111,
|
||
|
1114, 1117, 1120, 1585, 1358, 1370, 1369, 1362, 1359, 1585,
|
||
|
185, 1585, 1353, 1362, 1585, 1388, 1348, 1585, 1585, 1585,
|
||
|
1358, 1339, 1347, 1346, 1354, 1347, 1345, 1338, 1346, 1340,
|
||
|
1349, 1343, 1337, 1585, 1345, 1344, 1344, 1342, 1369, 1123,
|
||
|
1128, 1132, 1135, 1138, 1150, 1153, 1161, 1164, 1167, 1173,
|
||
|
1176, 1179, 1186, 1341, 1328, 1339, 1365, 1323, 1324, 1325,
|
||
|
|
||
|
1325, 391, 1323, 1319, 1585, 1320, 1330, 1329, 1331, 1348,
|
||
|
1313, 1320, 1327, 1314, 1321, 1305, 1284, 1585, 1585, 1290,
|
||
|
1585, 1283, 1191, 1194, 1201, 1204, 1207, 1210, 1217, 1221,
|
||
|
1224, 1228, 1231, 1238, 1241, 1278, 1296, 1294, 1255, 1259,
|
||
|
1245, 389, 1585, 1244, 1247, 1221, 1218, 1217, 1212, 1211,
|
||
|
1200, 1190, 1585, 1182, 1171, 1191, 1585, 1148, 1141, 1136,
|
||
|
1133, 1244, 1250, 1259, 1262, 1265, 1268, 1271, 1274, 1277,
|
||
|
1280, 1585, 1109, 1106, 1097, 1139, 1099, 1091, 1073, 1092,
|
||
|
1063, 1058, 1084, 1585, 1585, 1585, 1051, 1051, 1042, 1042,
|
||
|
1014, 1020, 1585, 1046, 1019, 1285, 1292, 1297, 1305, 1308,
|
||
|
|
||
|
1311, 1014, 1003, 975, 958, 974, 965, 947, 1585, 953,
|
||
|
1585, 942, 938, 935, 932, 916, 928, 914, 915, 919,
|
||
|
1317, 1320, 1323, 917, 915, 902, 906, 888, 932, 903,
|
||
|
891, 891, 906, 863, 863, 846, 829, 813, 823, 820,
|
||
|
1330, 817, 809, 836, 798, 777, 775, 808, 764, 774,
|
||
|
763, 767, 769, 750, 1585, 1585, 747, 733, 732, 722,
|
||
|
695, 701, 700, 702, 686, 722, 1585, 690, 688, 673,
|
||
|
681, 1585, 706, 705, 701, 666, 650, 669, 623, 635,
|
||
|
612, 619, 1585, 613, 603, 602, 592, 591, 593, 580,
|
||
|
526, 510, 504, 500, 1585, 485, 478, 484, 483, 480,
|
||
|
|
||
|
1585, 459, 453, 479, 1585, 443, 417, 439, 374, 367,
|
||
|
353, 343, 339, 322, 1585, 338, 273, 1585, 1585, 1585,
|
||
|
271, 1585, 263, 193, 190, 1585, 152, 122, 96, 1585,
|
||
|
80, 1585, 1585, 1585, 1342, 1346, 1350, 1354, 1356, 1358,
|
||
|
1362, 92
|
||
|
} ;
|
||
|
|
||
|
static yyconst flex_int16_t yy_def[743] =
|
||
|
{ 0,
|
||
|
734, 1, 735, 735, 736, 736, 734, 734, 734, 734,
|
||
|
737, 738, 734, 739, 734, 734, 734, 734, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 737, 734, 738, 734, 734,
|
||
|
734, 739, 739, 739, 739, 734, 741, 742, 734, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 739, 739, 741, 742, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 739, 739, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 740,
|
||
|
740, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 734, 734, 734, 734, 734, 734, 734,
|
||
|
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 740, 740, 740, 740, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 740, 740, 740, 740, 740, 740, 740, 740, 740,
|
||
|
740, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 740, 740, 740, 740, 740,
|
||
|
|
||
|
740, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
740, 740, 740, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
740, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 0, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734
|
||
|
} ;
|
||
|
|
||
|
static yyconst flex_int16_t yy_nxt[1651] =
|
||
|
{ 0,
|
||
|
8, 9, 10, 9, 11, 8, 12, 8, 8, 13,
|
||
|
14, 15, 16, 17, 18, 19, 19, 19, 19, 19,
|
||
|
19, 19, 19, 19, 19, 19, 19, 19, 20, 19,
|
||
|
19, 19, 19, 21, 19, 19, 19, 19, 19, 19,
|
||
|
19, 19, 22, 23, 24, 25, 26, 19, 19, 27,
|
||
|
19, 28, 19, 29, 30, 31, 19, 32, 33, 34,
|
||
|
35, 36, 19, 19, 37, 38, 44, 41, 44, 39,
|
||
|
42, 45, 47, 45, 47, 49, 112, 112, 50, 49,
|
||
|
51, 51, 52, 53, 52, 54, 54, 56, 176, 162,
|
||
|
50, 57, 51, 51, 50, 116, 51, 51, 52, 55,
|
||
|
|
||
|
52, 52, 55, 52, 52, 55, 52, 52, 55, 52,
|
||
|
177, 52, 55, 52, 52, 55, 52, 163, 62, 52,
|
||
|
55, 52, 52, 55, 52, 733, 47, 61, 47, 52,
|
||
|
55, 52, 52, 55, 52, 52, 55, 52, 52, 55,
|
||
|
52, 732, 58, 52, 55, 52, 52, 55, 52, 159,
|
||
|
64, 91, 63, 65, 70, 92, 66, 178, 160, 67,
|
||
|
52, 55, 52, 68, 71, 230, 731, 74, 52, 55,
|
||
|
52, 179, 69, 72, 52, 55, 52, 73, 52, 55,
|
||
|
52, 218, 231, 49, 75, 78, 79, 49, 80, 50,
|
||
|
76, 51, 51, 77, 219, 81, 82, 730, 52, 83,
|
||
|
|
||
|
52, 52, 113, 52, 52, 499, 52, 84, 89, 52,
|
||
|
55, 52, 86, 156, 85, 52, 55, 52, 87, 500,
|
||
|
52, 55, 52, 88, 93, 94, 95, 96, 97, 98,
|
||
|
99, 52, 100, 52, 729, 101, 102, 117, 103, 104,
|
||
|
157, 105, 106, 107, 108, 109, 52, 728, 52, 54,
|
||
|
54, 52, 55, 52, 252, 252, 114, 52, 55, 52,
|
||
|
119, 52, 55, 52, 52, 55, 52, 52, 55, 52,
|
||
|
306, 307, 118, 52, 55, 52, 52, 55, 52, 52,
|
||
|
55, 52, 114, 52, 55, 52, 52, 55, 52, 120,
|
||
|
52, 55, 52, 121, 52, 55, 52, 52, 55, 52,
|
||
|
|
||
|
52, 55, 52, 52, 55, 52, 159, 727, 122, 52,
|
||
|
55, 52, 52, 55, 52, 217, 726, 123, 52, 55,
|
||
|
52, 126, 125, 124, 52, 55, 52, 725, 127, 52,
|
||
|
55, 52, 164, 131, 129, 128, 134, 130, 165, 166,
|
||
|
132, 52, 55, 52, 236, 133, 52, 55, 52, 237,
|
||
|
136, 52, 55, 52, 135, 724, 138, 52, 55, 52,
|
||
|
52, 55, 52, 137, 52, 55, 52, 52, 55, 52,
|
||
|
91, 139, 140, 168, 92, 172, 723, 169, 173, 223,
|
||
|
174, 224, 112, 112, 722, 303, 170, 721, 141, 183,
|
||
|
184, 185, 304, 52, 186, 186, 142, 143, 720, 52,
|
||
|
|
||
|
55, 52, 252, 252, 146, 144, 147, 145, 148, 544,
|
||
|
149, 98, 719, 545, 100, 183, 187, 101, 150, 718,
|
||
|
103, 151, 578, 579, 152, 153, 52, 55, 52, 52,
|
||
|
55, 52, 52, 55, 52, 52, 55, 52, 52, 55,
|
||
|
52, 52, 55, 52, 52, 55, 52, 52, 55, 52,
|
||
|
52, 55, 52, 52, 55, 52, 717, 188, 52, 55,
|
||
|
52, 52, 55, 52, 52, 55, 52, 52, 55, 52,
|
||
|
716, 189, 227, 364, 193, 52, 55, 52, 365, 190,
|
||
|
52, 55, 52, 191, 228, 197, 192, 194, 715, 195,
|
||
|
52, 55, 52, 52, 55, 52, 714, 713, 196, 198,
|
||
|
|
||
|
199, 52, 55, 52, 52, 55, 52, 52, 55, 52,
|
||
|
52, 55, 52, 712, 200, 52, 55, 52, 52, 55,
|
||
|
52, 52, 55, 52, 711, 464, 201, 710, 709, 202,
|
||
|
465, 708, 203, 52, 55, 52, 52, 55, 52, 707,
|
||
|
204, 52, 55, 52, 706, 205, 52, 55, 52, 705,
|
||
|
52, 55, 52, 206, 184, 184, 207, 211, 252, 252,
|
||
|
208, 209, 52, 210, 52, 186, 186, 704, 52, 212,
|
||
|
52, 186, 186, 52, 55, 52, 213, 52, 55, 52,
|
||
|
703, 215, 216, 253, 52, 55, 52, 52, 55, 52,
|
||
|
214, 52, 55, 52, 52, 55, 52, 702, 254, 255,
|
||
|
|
||
|
256, 257, 52, 55, 52, 52, 55, 52, 52, 55,
|
||
|
52, 52, 55, 52, 52, 55, 52, 52, 55, 52,
|
||
|
52, 55, 52, 52, 55, 52, 52, 55, 52, 52,
|
||
|
55, 52, 52, 55, 52, 52, 55, 52, 701, 258,
|
||
|
52, 55, 52, 259, 260, 700, 699, 262, 261, 52,
|
||
|
55, 52, 52, 55, 52, 265, 698, 697, 266, 52,
|
||
|
55, 52, 696, 263, 695, 267, 694, 392, 264, 52,
|
||
|
55, 52, 268, 52, 55, 52, 52, 55, 52, 693,
|
||
|
692, 270, 393, 394, 269, 271, 691, 395, 272, 52,
|
||
|
55, 52, 273, 274, 52, 55, 52, 52, 55, 52,
|
||
|
|
||
|
52, 55, 52, 52, 55, 52, 690, 52, 55, 52,
|
||
|
689, 275, 52, 55, 52, 52, 55, 52, 688, 52,
|
||
|
55, 52, 687, 686, 277, 276, 313, 52, 55, 52,
|
||
|
685, 684, 278, 683, 682, 315, 52, 55, 52, 681,
|
||
|
680, 317, 314, 679, 318, 678, 677, 279, 316, 676,
|
||
|
280, 52, 55, 52, 52, 55, 52, 52, 55, 52,
|
||
|
52, 55, 52, 52, 55, 52, 52, 55, 52, 52,
|
||
|
55, 52, 52, 55, 52, 52, 55, 52, 675, 52,
|
||
|
55, 52, 52, 55, 52, 52, 55, 52, 674, 673,
|
||
|
319, 320, 672, 52, 55, 52, 52, 55, 52, 52,
|
||
|
|
||
|
55, 52, 52, 55, 52, 52, 55, 52, 671, 324,
|
||
|
670, 669, 321, 325, 52, 55, 52, 668, 322, 667,
|
||
|
666, 323, 52, 55, 52, 665, 664, 326, 327, 52,
|
||
|
55, 52, 663, 328, 52, 55, 52, 330, 52, 55,
|
||
|
52, 52, 55, 52, 662, 52, 55, 52, 52, 55,
|
||
|
52, 329, 375, 661, 660, 52, 55, 52, 331, 52,
|
||
|
55, 52, 659, 369, 370, 658, 333, 657, 376, 334,
|
||
|
656, 368, 371, 332, 655, 372, 52, 55, 52, 373,
|
||
|
374, 52, 55, 52, 52, 55, 52, 654, 377, 52,
|
||
|
55, 52, 52, 55, 52, 52, 55, 52, 52, 55,
|
||
|
|
||
|
52, 378, 52, 55, 52, 52, 55, 52, 52, 55,
|
||
|
52, 52, 55, 52, 52, 55, 52, 52, 55, 52,
|
||
|
653, 380, 652, 651, 379, 52, 55, 52, 52, 55,
|
||
|
52, 382, 52, 55, 52, 650, 649, 381, 52, 55,
|
||
|
52, 52, 55, 52, 52, 55, 52, 383, 648, 647,
|
||
|
427, 646, 645, 384, 52, 55, 52, 52, 55, 52,
|
||
|
644, 643, 386, 642, 387, 426, 385, 640, 428, 639,
|
||
|
638, 429, 637, 636, 388, 52, 55, 52, 52, 55,
|
||
|
52, 635, 430, 52, 55, 52, 634, 389, 52, 55,
|
||
|
52, 52, 55, 52, 633, 431, 632, 631, 435, 52,
|
||
|
|
||
|
55, 52, 630, 434, 52, 55, 52, 629, 628, 432,
|
||
|
52, 55, 52, 433, 52, 55, 52, 627, 436, 52,
|
||
|
55, 52, 52, 55, 52, 52, 55, 52, 626, 437,
|
||
|
52, 55, 52, 52, 55, 52, 52, 55, 52, 52,
|
||
|
55, 52, 52, 55, 52, 52, 55, 52, 439, 625,
|
||
|
52, 55, 52, 52, 55, 52, 52, 55, 52, 438,
|
||
|
624, 441, 620, 619, 482, 618, 440, 480, 617, 442,
|
||
|
481, 52, 55, 52, 443, 52, 55, 52, 52, 55,
|
||
|
52, 52, 55, 52, 52, 55, 52, 52, 55, 52,
|
||
|
484, 616, 485, 615, 614, 483, 613, 488, 52, 55,
|
||
|
|
||
|
52, 612, 486, 611, 610, 487, 52, 55, 52, 52,
|
||
|
55, 52, 490, 489, 52, 55, 52, 52, 55, 52,
|
||
|
52, 55, 52, 52, 55, 52, 52, 55, 52, 52,
|
||
|
55, 52, 52, 55, 52, 609, 608, 52, 55, 52,
|
||
|
491, 52, 55, 52, 52, 55, 52, 52, 55, 52,
|
||
|
607, 606, 523, 492, 524, 605, 604, 527, 493, 52,
|
||
|
55, 52, 52, 55, 52, 603, 525, 528, 602, 526,
|
||
|
52, 55, 52, 52, 55, 52, 52, 55, 52, 529,
|
||
|
530, 531, 52, 55, 52, 52, 55, 52, 52, 55,
|
||
|
52, 595, 594, 534, 535, 52, 55, 52, 593, 533,
|
||
|
|
||
|
52, 55, 52, 52, 55, 52, 592, 532, 591, 563,
|
||
|
52, 55, 52, 52, 55, 52, 52, 55, 52, 52,
|
||
|
55, 52, 590, 589, 564, 562, 52, 55, 52, 565,
|
||
|
52, 55, 52, 52, 55, 52, 566, 52, 55, 52,
|
||
|
52, 55, 52, 588, 587, 568, 569, 52, 55, 52,
|
||
|
52, 55, 52, 52, 55, 52, 586, 585, 567, 52,
|
||
|
55, 52, 584, 583, 571, 582, 596, 570, 52, 55,
|
||
|
52, 52, 55, 52, 52, 55, 52, 52, 55, 52,
|
||
|
52, 55, 52, 52, 55, 52, 52, 55, 52, 52,
|
||
|
55, 52, 581, 597, 52, 55, 52, 599, 580, 577,
|
||
|
|
||
|
598, 52, 55, 52, 576, 600, 52, 55, 52, 575,
|
||
|
574, 621, 573, 601, 52, 55, 52, 52, 55, 52,
|
||
|
52, 55, 52, 572, 561, 622, 52, 55, 52, 52,
|
||
|
55, 52, 52, 55, 52, 560, 641, 559, 623, 52,
|
||
|
55, 52, 40, 40, 40, 40, 43, 43, 43, 43,
|
||
|
46, 46, 46, 46, 48, 48, 48, 48, 55, 55,
|
||
|
60, 60, 115, 558, 115, 115, 557, 556, 555, 554,
|
||
|
553, 552, 551, 550, 549, 548, 547, 546, 543, 542,
|
||
|
541, 540, 539, 538, 537, 536, 522, 521, 520, 519,
|
||
|
518, 517, 516, 515, 514, 513, 512, 511, 510, 509,
|
||
|
|
||
|
508, 507, 506, 505, 504, 503, 502, 501, 498, 497,
|
||
|
496, 495, 494, 479, 478, 477, 476, 475, 474, 473,
|
||
|
472, 471, 470, 469, 468, 467, 466, 463, 462, 461,
|
||
|
460, 459, 458, 457, 456, 455, 454, 453, 452, 451,
|
||
|
450, 449, 448, 447, 446, 445, 444, 425, 424, 423,
|
||
|
422, 421, 420, 419, 418, 417, 416, 415, 414, 413,
|
||
|
412, 411, 410, 409, 408, 407, 406, 405, 404, 403,
|
||
|
402, 401, 400, 399, 398, 397, 396, 391, 390, 367,
|
||
|
366, 363, 362, 361, 360, 359, 358, 357, 356, 355,
|
||
|
354, 353, 352, 351, 350, 349, 348, 347, 346, 345,
|
||
|
|
||
|
344, 343, 342, 341, 340, 339, 338, 337, 336, 335,
|
||
|
312, 311, 310, 309, 308, 305, 302, 301, 300, 299,
|
||
|
298, 297, 296, 295, 294, 293, 292, 291, 290, 289,
|
||
|
288, 287, 286, 285, 284, 283, 282, 281, 237, 227,
|
||
|
251, 250, 249, 248, 247, 246, 245, 244, 243, 242,
|
||
|
241, 240, 239, 238, 235, 234, 233, 232, 229, 226,
|
||
|
225, 222, 221, 220, 178, 176, 172, 156, 182, 181,
|
||
|
180, 175, 171, 167, 161, 158, 155, 154, 111, 110,
|
||
|
90, 59, 734, 41, 7, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734
|
||
|
} ;
|
||
|
|
||
|
static yyconst flex_int16_t yy_chk[1651] =
|
||
|
{ 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, 2, 5, 4, 6, 2,
|
||
|
4, 5, 11, 6, 11, 12, 50, 50, 13, 12,
|
||
|
13, 13, 14, 14, 14, 14, 14, 15, 106, 99,
|
||
|
16, 15, 16, 16, 17, 742, 17, 17, 19, 19,
|
||
|
|
||
|
19, 20, 20, 20, 21, 21, 21, 22, 22, 22,
|
||
|
106, 23, 23, 23, 24, 24, 24, 99, 21, 25,
|
||
|
25, 25, 26, 26, 26, 731, 46, 20, 46, 27,
|
||
|
27, 27, 28, 28, 28, 29, 29, 29, 30, 30,
|
||
|
30, 729, 16, 31, 31, 31, 32, 32, 32, 97,
|
||
|
23, 38, 22, 23, 26, 38, 23, 107, 97, 24,
|
||
|
33, 33, 33, 25, 26, 162, 728, 29, 34, 34,
|
||
|
34, 107, 25, 27, 36, 36, 36, 28, 35, 35,
|
||
|
35, 150, 162, 48, 30, 32, 32, 48, 32, 51,
|
||
|
31, 51, 51, 31, 150, 32, 33, 727, 52, 33,
|
||
|
|
||
|
52, 53, 53, 53, 55, 451, 55, 33, 36, 60,
|
||
|
60, 60, 34, 95, 33, 63, 63, 63, 35, 451,
|
||
|
61, 61, 61, 35, 39, 39, 39, 39, 39, 39,
|
||
|
39, 113, 39, 113, 725, 39, 39, 61, 39, 39,
|
||
|
95, 39, 39, 39, 39, 39, 54, 724, 54, 54,
|
||
|
54, 62, 62, 62, 184, 184, 54, 64, 64, 64,
|
||
|
63, 65, 65, 65, 66, 66, 66, 67, 67, 67,
|
||
|
245, 245, 62, 68, 68, 68, 69, 69, 69, 70,
|
||
|
70, 70, 54, 71, 71, 71, 72, 72, 72, 64,
|
||
|
73, 73, 73, 65, 74, 74, 74, 75, 75, 75,
|
||
|
|
||
|
76, 76, 76, 77, 77, 77, 149, 723, 66, 78,
|
||
|
78, 78, 79, 79, 79, 149, 721, 67, 80, 80,
|
||
|
80, 70, 69, 68, 81, 81, 81, 717, 71, 82,
|
||
|
82, 82, 100, 75, 73, 72, 77, 74, 100, 100,
|
||
|
76, 83, 83, 83, 168, 76, 84, 84, 84, 168,
|
||
|
79, 85, 85, 85, 78, 716, 81, 86, 86, 86,
|
||
|
87, 87, 87, 80, 88, 88, 88, 89, 89, 89,
|
||
|
91, 81, 82, 102, 91, 104, 714, 102, 104, 157,
|
||
|
104, 157, 112, 112, 713, 243, 102, 712, 83, 112,
|
||
|
114, 114, 243, 114, 114, 114, 84, 85, 711, 117,
|
||
|
|
||
|
117, 117, 252, 252, 88, 86, 89, 87, 92, 502,
|
||
|
92, 92, 710, 502, 92, 112, 117, 92, 92, 709,
|
||
|
92, 92, 542, 542, 92, 92, 118, 118, 118, 119,
|
||
|
119, 119, 120, 120, 120, 121, 121, 121, 122, 122,
|
||
|
122, 123, 123, 123, 124, 124, 124, 125, 125, 125,
|
||
|
126, 126, 126, 127, 127, 127, 708, 118, 128, 128,
|
||
|
128, 129, 129, 129, 130, 130, 130, 131, 131, 131,
|
||
|
707, 119, 160, 310, 123, 132, 132, 132, 310, 120,
|
||
|
133, 133, 133, 121, 160, 127, 122, 124, 706, 125,
|
||
|
134, 134, 134, 135, 135, 135, 704, 703, 126, 129,
|
||
|
|
||
|
130, 136, 136, 136, 137, 137, 137, 138, 138, 138,
|
||
|
139, 139, 139, 702, 131, 140, 140, 140, 141, 141,
|
||
|
141, 142, 142, 142, 700, 411, 132, 699, 698, 133,
|
||
|
411, 697, 134, 143, 143, 143, 144, 144, 144, 696,
|
||
|
135, 145, 145, 145, 694, 136, 146, 146, 146, 693,
|
||
|
147, 147, 147, 137, 183, 183, 138, 142, 183, 183,
|
||
|
139, 140, 185, 141, 185, 185, 185, 692, 186, 143,
|
||
|
186, 186, 186, 187, 187, 187, 144, 188, 188, 188,
|
||
|
691, 146, 147, 188, 189, 189, 189, 190, 190, 190,
|
||
|
145, 191, 191, 191, 192, 192, 192, 690, 188, 188,
|
||
|
|
||
|
188, 188, 193, 193, 193, 194, 194, 194, 195, 195,
|
||
|
195, 196, 196, 196, 197, 197, 197, 198, 198, 198,
|
||
|
199, 199, 199, 200, 200, 200, 201, 201, 201, 202,
|
||
|
202, 202, 203, 203, 203, 204, 204, 204, 689, 191,
|
||
|
206, 206, 206, 192, 193, 688, 687, 196, 195, 205,
|
||
|
205, 205, 207, 207, 207, 200, 686, 685, 201, 208,
|
||
|
208, 208, 684, 197, 682, 202, 681, 337, 199, 209,
|
||
|
209, 209, 203, 210, 210, 210, 211, 211, 211, 680,
|
||
|
679, 205, 337, 337, 204, 205, 678, 337, 206, 212,
|
||
|
212, 212, 207, 208, 213, 213, 213, 214, 214, 214,
|
||
|
|
||
|
215, 215, 215, 216, 216, 216, 677, 253, 253, 253,
|
||
|
676, 209, 254, 254, 254, 255, 255, 255, 675, 256,
|
||
|
256, 256, 674, 673, 212, 210, 253, 257, 257, 257,
|
||
|
671, 670, 213, 669, 668, 255, 258, 258, 258, 666,
|
||
|
665, 257, 254, 664, 257, 663, 662, 214, 256, 661,
|
||
|
216, 259, 259, 259, 260, 260, 260, 261, 261, 261,
|
||
|
262, 262, 262, 263, 263, 263, 264, 264, 264, 265,
|
||
|
265, 265, 266, 266, 266, 267, 267, 267, 660, 268,
|
||
|
268, 268, 269, 269, 269, 270, 270, 270, 659, 658,
|
||
|
260, 261, 657, 271, 271, 271, 272, 272, 272, 273,
|
||
|
|
||
|
273, 273, 274, 274, 274, 275, 275, 275, 654, 267,
|
||
|
653, 652, 264, 268, 276, 276, 276, 651, 265, 650,
|
||
|
649, 266, 277, 277, 277, 648, 647, 270, 271, 278,
|
||
|
278, 278, 646, 273, 279, 279, 279, 275, 280, 280,
|
||
|
280, 313, 313, 313, 645, 315, 315, 315, 316, 316,
|
||
|
316, 274, 315, 644, 643, 314, 314, 314, 277, 319,
|
||
|
319, 319, 642, 314, 314, 640, 279, 639, 316, 280,
|
||
|
638, 313, 314, 278, 637, 314, 317, 317, 317, 314,
|
||
|
314, 318, 318, 318, 320, 320, 320, 636, 317, 321,
|
||
|
321, 321, 322, 322, 322, 323, 323, 323, 324, 324,
|
||
|
|
||
|
324, 318, 325, 325, 325, 326, 326, 326, 327, 327,
|
||
|
327, 328, 328, 328, 329, 329, 329, 330, 330, 330,
|
||
|
635, 321, 634, 633, 320, 331, 331, 331, 332, 332,
|
||
|
332, 323, 333, 333, 333, 632, 631, 322, 334, 334,
|
||
|
334, 368, 368, 368, 369, 369, 369, 324, 630, 629,
|
||
|
369, 628, 627, 326, 370, 370, 370, 371, 371, 371,
|
||
|
626, 625, 331, 624, 332, 368, 330, 620, 370, 619,
|
||
|
618, 371, 617, 616, 333, 372, 372, 372, 373, 373,
|
||
|
373, 615, 372, 374, 374, 374, 614, 334, 375, 375,
|
||
|
375, 376, 376, 376, 613, 373, 612, 610, 376, 377,
|
||
|
|
||
|
377, 377, 608, 375, 378, 378, 378, 607, 606, 374,
|
||
|
379, 379, 379, 374, 380, 380, 380, 605, 377, 381,
|
||
|
381, 381, 382, 382, 382, 383, 383, 383, 604, 378,
|
||
|
384, 384, 384, 385, 385, 385, 386, 386, 386, 387,
|
||
|
387, 387, 388, 388, 388, 389, 389, 389, 380, 603,
|
||
|
426, 426, 426, 427, 427, 427, 428, 428, 428, 379,
|
||
|
602, 383, 595, 594, 428, 592, 381, 426, 591, 385,
|
||
|
427, 429, 429, 429, 387, 430, 430, 430, 431, 431,
|
||
|
431, 432, 432, 432, 433, 433, 433, 434, 434, 434,
|
||
|
430, 590, 431, 589, 588, 429, 587, 434, 435, 435,
|
||
|
|
||
|
435, 583, 432, 582, 581, 433, 436, 436, 436, 437,
|
||
|
437, 437, 436, 435, 438, 438, 438, 439, 439, 439,
|
||
|
440, 440, 440, 441, 441, 441, 442, 442, 442, 443,
|
||
|
443, 443, 480, 480, 480, 580, 579, 481, 481, 481,
|
||
|
437, 482, 482, 482, 483, 483, 483, 484, 484, 484,
|
||
|
578, 577, 480, 439, 481, 576, 575, 484, 441, 485,
|
||
|
485, 485, 486, 486, 486, 574, 482, 485, 573, 483,
|
||
|
487, 487, 487, 488, 488, 488, 489, 489, 489, 486,
|
||
|
487, 488, 490, 490, 490, 491, 491, 491, 492, 492,
|
||
|
492, 561, 560, 491, 491, 493, 493, 493, 559, 490,
|
||
|
|
||
|
523, 523, 523, 524, 524, 524, 558, 489, 556, 524,
|
||
|
525, 525, 525, 526, 526, 526, 527, 527, 527, 528,
|
||
|
528, 528, 555, 554, 527, 523, 529, 529, 529, 528,
|
||
|
530, 530, 530, 531, 531, 531, 529, 532, 532, 532,
|
||
|
533, 533, 533, 552, 551, 532, 532, 534, 534, 534,
|
||
|
535, 535, 535, 562, 562, 562, 550, 549, 531, 563,
|
||
|
563, 563, 548, 547, 535, 546, 563, 534, 564, 564,
|
||
|
564, 565, 565, 565, 566, 566, 566, 567, 567, 567,
|
||
|
568, 568, 568, 569, 569, 569, 570, 570, 570, 571,
|
||
|
571, 571, 545, 564, 596, 596, 596, 569, 544, 541,
|
||
|
|
||
|
568, 597, 597, 597, 540, 570, 598, 598, 598, 539,
|
||
|
538, 596, 537, 571, 599, 599, 599, 600, 600, 600,
|
||
|
601, 601, 601, 536, 522, 598, 621, 621, 621, 622,
|
||
|
622, 622, 623, 623, 623, 520, 621, 517, 599, 641,
|
||
|
641, 641, 735, 735, 735, 735, 736, 736, 736, 736,
|
||
|
737, 737, 737, 737, 738, 738, 738, 738, 739, 739,
|
||
|
740, 740, 741, 516, 741, 741, 515, 514, 513, 512,
|
||
|
511, 510, 509, 508, 507, 506, 504, 503, 501, 500,
|
||
|
499, 498, 497, 496, 495, 494, 479, 478, 477, 476,
|
||
|
475, 473, 472, 471, 470, 469, 468, 467, 466, 465,
|
||
|
|
||
|
464, 463, 462, 461, 457, 456, 454, 453, 449, 448,
|
||
|
447, 446, 445, 425, 424, 423, 422, 421, 420, 419,
|
||
|
418, 417, 416, 415, 414, 413, 412, 410, 409, 408,
|
||
|
407, 406, 404, 403, 402, 401, 400, 399, 398, 397,
|
||
|
396, 395, 394, 393, 392, 391, 390, 367, 366, 365,
|
||
|
364, 363, 362, 361, 360, 359, 358, 357, 356, 355,
|
||
|
354, 353, 352, 351, 350, 349, 348, 347, 346, 345,
|
||
|
344, 343, 342, 341, 340, 339, 338, 336, 335, 312,
|
||
|
311, 309, 308, 307, 306, 305, 304, 303, 302, 301,
|
||
|
300, 299, 298, 297, 296, 295, 294, 293, 292, 291,
|
||
|
|
||
|
290, 289, 288, 287, 286, 285, 284, 283, 282, 281,
|
||
|
250, 249, 248, 247, 246, 244, 242, 241, 240, 239,
|
||
|
238, 237, 236, 235, 234, 233, 232, 231, 230, 229,
|
||
|
228, 227, 224, 223, 222, 221, 220, 219, 218, 217,
|
||
|
182, 181, 180, 179, 178, 177, 176, 175, 174, 173,
|
||
|
172, 171, 170, 169, 167, 166, 165, 163, 161, 159,
|
||
|
158, 156, 155, 154, 153, 152, 151, 148, 110, 109,
|
||
|
108, 105, 103, 101, 98, 96, 94, 93, 45, 42,
|
||
|
37, 18, 7, 3, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734,
|
||
|
734, 734, 734, 734, 734, 734, 734, 734, 734, 734
|
||
|
} ;
|
||
|
|
||
|
static yy_state_type yy_last_accepting_state;
|
||
|
static char *yy_last_accepting_cpos;
|
||
|
|
||
|
extern int yy_flex_debug;
|
||
|
int yy_flex_debug = 0;
|
||
|
|
||
|
/* The intent behind this definition is that it'll catch
|
||
|
* any uses of REJECT which flex missed.
|
||
|
*/
|
||
|
#define REJECT reject_used_but_not_detected
|
||
|
#define yymore() yymore_used_but_not_detected
|
||
|
#define YY_MORE_ADJ 0
|
||
|
#define YY_RESTORE_YY_MORE_OFFSET
|
||
|
char *yytext;
|
||
|
#line 1 "lexer.l"
|
||
|
/*
|
||
|
* The SIP lexer.
|
||
|
*
|
||
|
* Copyright (c) 2007
|
||
|
* Riverbank Computing Limited <info@riverbankcomputing.co.uk>
|
||
|
*
|
||
|
* This file is part of SIP.
|
||
|
*
|
||
|
* This copy of SIP is licensed for use under the terms of the SIP License
|
||
|
* Agreement. See the file LICENSE for more details.
|
||
|
*
|
||
|
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||
|
*/
|
||
|
#line 17 "lexer.l"
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
#include <errno.h>
|
||
|
|
||
|
#include "sip.h"
|
||
|
#include "parser.h"
|
||
|
|
||
|
|
||
|
#ifndef FLEX_SCANNER
|
||
|
#error "Only flex is supported at the moment"
|
||
|
#endif
|
||
|
|
||
|
|
||
|
#define YY_FATAL_ERROR(s) fatallex(s)
|
||
|
|
||
|
#define MAX_INCLUDE_DEPTH 10
|
||
|
#define MAX_CODE_LINE_LENGTH 1000
|
||
|
|
||
|
|
||
|
static struct inputFile {
|
||
|
int lineno; /* The line number. */
|
||
|
YY_BUFFER_STATE bs; /* The flex buffer state handle. */
|
||
|
char *name; /* The file name. */
|
||
|
char *cwd; /* The path part of the file name. */
|
||
|
parserContext pc; /* The parser context. */
|
||
|
} inputFileStack[MAX_INCLUDE_DEPTH];
|
||
|
|
||
|
static int currentFile = -1; /* Index of the current input file. */
|
||
|
static char codeLine[MAX_CODE_LINE_LENGTH + 2]; /* The current code line. */
|
||
|
static int codeIdx = -1; /* Index of next code character. */
|
||
|
|
||
|
static FILE *openFile(char *);
|
||
|
static void fatallex(char *);
|
||
|
|
||
|
|
||
|
#line 1113 "lexer.c.tmp"
|
||
|
|
||
|
#define INITIAL 0
|
||
|
#define code 1
|
||
|
#define ccomment 2
|
||
|
|
||
|
#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.
|
||
|
*/
|
||
|
|
||
|
#endif
|
||
|
|
||
|
#ifndef YY_EXTRA_TYPE
|
||
|
#define YY_EXTRA_TYPE void *
|
||
|
#endif
|
||
|
|
||
|
static int yy_init_globals (void );
|
||
|
|
||
|
/* Macros after this point can all be overridden by user definitions in
|
||
|
* section 1.
|
||
|
*/
|
||
|
|
||
|
#ifndef YY_SKIP_YYWRAP
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" int yywrap (void );
|
||
|
#else
|
||
|
extern int yywrap (void );
|
||
|
#endif
|
||
|
#endif
|
||
|
|
||
|
static void yyunput (int c,char *buf_ptr );
|
||
|
|
||
|
#ifndef yytext_ptr
|
||
|
static void yy_flex_strncpy (char *,yyconst char *,int );
|
||
|
#endif
|
||
|
|
||
|
#ifdef YY_NEED_STRLEN
|
||
|
static int yy_flex_strlen (yyconst char * );
|
||
|
#endif
|
||
|
|
||
|
#ifndef YY_NO_INPUT
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
static int yyinput (void );
|
||
|
#else
|
||
|
static int input (void );
|
||
|
#endif
|
||
|
|
||
|
#endif
|
||
|
|
||
|
/* Amount of stuff to slurp up with each read. */
|
||
|
#ifndef YY_READ_BUF_SIZE
|
||
|
#define YY_READ_BUF_SIZE 8192
|
||
|
#endif
|
||
|
|
||
|
/* Copy whatever the last rule matched to the standard output. */
|
||
|
#ifndef ECHO
|
||
|
/* This used to be an fputs(), but since the string might contain NUL's,
|
||
|
* we now use fwrite().
|
||
|
*/
|
||
|
#define ECHO (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_LVALUE->yy_is_interactive ) \
|
||
|
{ \
|
||
|
int c = '*'; \
|
||
|
size_t n; \
|
||
|
for ( n = 0; n < max_size && \
|
||
|
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
|
||
|
buf[n] = (char) c; \
|
||
|
if ( c == '\n' ) \
|
||
|
buf[n++] = (char) c; \
|
||
|
if ( c == EOF && ferror( yyin ) ) \
|
||
|
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
||
|
result = n; \
|
||
|
} \
|
||
|
else \
|
||
|
{ \
|
||
|
errno=0; \
|
||
|
while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
|
||
|
{ \
|
||
|
if( errno != EINTR) \
|
||
|
{ \
|
||
|
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
||
|
break; \
|
||
|
} \
|
||
|
errno=0; \
|
||
|
clearerr(yyin); \
|
||
|
} \
|
||
|
}\
|
||
|
\
|
||
|
|
||
|
#endif
|
||
|
|
||
|
/* No semi-colon after return; correct usage is to write "yyterminate();" -
|
||
|
* we don't want an extra ';' after the "return" because that will cause
|
||
|
* some compilers to complain about unreachable statements.
|
||
|
*/
|
||
|
#ifndef yyterminate
|
||
|
#define yyterminate() return YY_NULL
|
||
|
#endif
|
||
|
|
||
|
/* Number of entries by which start-condition stack grows. */
|
||
|
#ifndef YY_START_STACK_INCR
|
||
|
#define YY_START_STACK_INCR 25
|
||
|
#endif
|
||
|
|
||
|
/* Report a fatal error. */
|
||
|
#ifndef YY_FATAL_ERROR
|
||
|
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
|
||
|
#endif
|
||
|
|
||
|
/* end tables serialization structures and prototypes */
|
||
|
|
||
|
/* Default declaration of generated scanner - a define so the user can
|
||
|
* easily add parameters.
|
||
|
*/
|
||
|
#ifndef YY_DECL
|
||
|
#define YY_DECL_IS_OURS 1
|
||
|
|
||
|
extern int yylex (void);
|
||
|
|
||
|
#define YY_DECL int yylex (void)
|
||
|
#endif /* !YY_DECL */
|
||
|
|
||
|
/* Code executed at the beginning of each rule, after yytext and yyleng
|
||
|
* have been set up.
|
||
|
*/
|
||
|
#ifndef YY_USER_ACTION
|
||
|
#define YY_USER_ACTION
|
||
|
#endif
|
||
|
|
||
|
/* Code executed at the end of each rule. */
|
||
|
#ifndef YY_BREAK
|
||
|
#define YY_BREAK break;
|
||
|
#endif
|
||
|
|
||
|
#define YY_RULE_SETUP \
|
||
|
if ( yyleng > 0 ) \
|
||
|
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
|
||
|
(yytext[yyleng - 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 56 "lexer.l"
|
||
|
|
||
|
|
||
|
#line 1274 "lexer.c.tmp"
|
||
|
|
||
|
if ( !(yy_init) )
|
||
|
{
|
||
|
(yy_init) = 1;
|
||
|
|
||
|
#ifdef YY_USER_INIT
|
||
|
YY_USER_INIT;
|
||
|
#endif
|
||
|
|
||
|
if ( ! (yy_start) )
|
||
|
(yy_start) = 1; /* first start state */
|
||
|
|
||
|
if ( ! yyin )
|
||
|
yyin = stdin;
|
||
|
|
||
|
if ( ! yyout )
|
||
|
yyout = stdout;
|
||
|
|
||
|
if ( ! YY_CURRENT_BUFFER ) {
|
||
|
yyensure_buffer_stack ();
|
||
|
YY_CURRENT_BUFFER_LVALUE =
|
||
|
yy_create_buffer(yyin,YY_BUF_SIZE );
|
||
|
}
|
||
|
|
||
|
yy_load_buffer_state( );
|
||
|
}
|
||
|
|
||
|
while ( 1 ) /* loops until end-of-file is reached */
|
||
|
{
|
||
|
yy_cp = (yy_c_buf_p);
|
||
|
|
||
|
/* Support of yytext. */
|
||
|
*yy_cp = (yy_hold_char);
|
||
|
|
||
|
/* yy_bp points to the position in yy_ch_buf of the start of
|
||
|
* the current run.
|
||
|
*/
|
||
|
yy_bp = yy_cp;
|
||
|
|
||
|
yy_current_state = (yy_start);
|
||
|
yy_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 >= 735 )
|
||
|
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] != 1585 );
|
||
|
|
||
|
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 58 "lexer.l"
|
||
|
{return TK_OPTIONS;}
|
||
|
YY_BREAK
|
||
|
case 2:
|
||
|
YY_RULE_SETUP
|
||
|
#line 59 "lexer.l"
|
||
|
{return TK_NOEMITTERS;}
|
||
|
YY_BREAK
|
||
|
case 3:
|
||
|
YY_RULE_SETUP
|
||
|
#line 60 "lexer.l"
|
||
|
{return TK_INCLUDE;}
|
||
|
YY_BREAK
|
||
|
case 4:
|
||
|
YY_RULE_SETUP
|
||
|
#line 61 "lexer.l"
|
||
|
{return TK_OPTINCLUDE;}
|
||
|
YY_BREAK
|
||
|
case 5:
|
||
|
YY_RULE_SETUP
|
||
|
#line 62 "lexer.l"
|
||
|
{return TK_IMPORT;}
|
||
|
YY_BREAK
|
||
|
case 6:
|
||
|
YY_RULE_SETUP
|
||
|
#line 63 "lexer.l"
|
||
|
{return TK_MODULE;}
|
||
|
YY_BREAK
|
||
|
case 7:
|
||
|
YY_RULE_SETUP
|
||
|
#line 64 "lexer.l"
|
||
|
{return TK_CMODULE;}
|
||
|
YY_BREAK
|
||
|
case 8:
|
||
|
YY_RULE_SETUP
|
||
|
#line 65 "lexer.l"
|
||
|
{return TK_TIMELINE;}
|
||
|
YY_BREAK
|
||
|
case 9:
|
||
|
YY_RULE_SETUP
|
||
|
#line 66 "lexer.l"
|
||
|
{return TK_PLATFORMS;}
|
||
|
YY_BREAK
|
||
|
case 10:
|
||
|
YY_RULE_SETUP
|
||
|
#line 67 "lexer.l"
|
||
|
{return TK_FEATURE;}
|
||
|
YY_BREAK
|
||
|
case 11:
|
||
|
YY_RULE_SETUP
|
||
|
#line 68 "lexer.l"
|
||
|
{return TK_LICENSE;}
|
||
|
YY_BREAK
|
||
|
case 12:
|
||
|
YY_RULE_SETUP
|
||
|
#line 69 "lexer.l"
|
||
|
{return TK_MAPPEDTYPE;}
|
||
|
YY_BREAK
|
||
|
case 13:
|
||
|
YY_RULE_SETUP
|
||
|
#line 70 "lexer.l"
|
||
|
{return TK_EXCEPTION;}
|
||
|
YY_BREAK
|
||
|
case 14:
|
||
|
YY_RULE_SETUP
|
||
|
#line 71 "lexer.l"
|
||
|
{return TK_IF;}
|
||
|
YY_BREAK
|
||
|
case 15:
|
||
|
YY_RULE_SETUP
|
||
|
#line 72 "lexer.l"
|
||
|
{return TK_END;}
|
||
|
YY_BREAK
|
||
|
case 16:
|
||
|
YY_RULE_SETUP
|
||
|
#line 73 "lexer.l"
|
||
|
{return TK_CLASS;}
|
||
|
YY_BREAK
|
||
|
case 17:
|
||
|
YY_RULE_SETUP
|
||
|
#line 74 "lexer.l"
|
||
|
{return TK_STRUCT;}
|
||
|
YY_BREAK
|
||
|
case 18:
|
||
|
YY_RULE_SETUP
|
||
|
#line 75 "lexer.l"
|
||
|
{return TK_PUBLIC;}
|
||
|
YY_BREAK
|
||
|
case 19:
|
||
|
YY_RULE_SETUP
|
||
|
#line 76 "lexer.l"
|
||
|
{return TK_PROTECTED;}
|
||
|
YY_BREAK
|
||
|
case 20:
|
||
|
YY_RULE_SETUP
|
||
|
#line 77 "lexer.l"
|
||
|
{return TK_PRIVATE;}
|
||
|
YY_BREAK
|
||
|
case 21:
|
||
|
YY_RULE_SETUP
|
||
|
#line 78 "lexer.l"
|
||
|
{return TK_SIGNALS;}
|
||
|
YY_BREAK
|
||
|
case 22:
|
||
|
YY_RULE_SETUP
|
||
|
#line 79 "lexer.l"
|
||
|
{return TK_SLOTS;}
|
||
|
YY_BREAK
|
||
|
case 23:
|
||
|
YY_RULE_SETUP
|
||
|
#line 80 "lexer.l"
|
||
|
{return TK_CHAR;}
|
||
|
YY_BREAK
|
||
|
case 24:
|
||
|
YY_RULE_SETUP
|
||
|
#line 81 "lexer.l"
|
||
|
{return TK_WCHAR_T;}
|
||
|
YY_BREAK
|
||
|
case 25:
|
||
|
YY_RULE_SETUP
|
||
|
#line 82 "lexer.l"
|
||
|
{return TK_BOOL;}
|
||
|
YY_BREAK
|
||
|
case 26:
|
||
|
YY_RULE_SETUP
|
||
|
#line 83 "lexer.l"
|
||
|
{return TK_SHORT;}
|
||
|
YY_BREAK
|
||
|
case 27:
|
||
|
YY_RULE_SETUP
|
||
|
#line 84 "lexer.l"
|
||
|
{return TK_INT;}
|
||
|
YY_BREAK
|
||
|
case 28:
|
||
|
YY_RULE_SETUP
|
||
|
#line 85 "lexer.l"
|
||
|
{return TK_LONG;}
|
||
|
YY_BREAK
|
||
|
case 29:
|
||
|
YY_RULE_SETUP
|
||
|
#line 86 "lexer.l"
|
||
|
{return TK_FLOAT;}
|
||
|
YY_BREAK
|
||
|
case 30:
|
||
|
YY_RULE_SETUP
|
||
|
#line 87 "lexer.l"
|
||
|
{return TK_DOUBLE;}
|
||
|
YY_BREAK
|
||
|
case 31:
|
||
|
YY_RULE_SETUP
|
||
|
#line 88 "lexer.l"
|
||
|
{return TK_VOID;}
|
||
|
YY_BREAK
|
||
|
case 32:
|
||
|
YY_RULE_SETUP
|
||
|
#line 89 "lexer.l"
|
||
|
{return TK_VIRTUAL;}
|
||
|
YY_BREAK
|
||
|
case 33:
|
||
|
YY_RULE_SETUP
|
||
|
#line 90 "lexer.l"
|
||
|
{return TK_ENUM;}
|
||
|
YY_BREAK
|
||
|
case 34:
|
||
|
YY_RULE_SETUP
|
||
|
#line 91 "lexer.l"
|
||
|
{return TK_SIGNED;}
|
||
|
YY_BREAK
|
||
|
case 35:
|
||
|
YY_RULE_SETUP
|
||
|
#line 92 "lexer.l"
|
||
|
{return TK_UNSIGNED;}
|
||
|
YY_BREAK
|
||
|
case 36:
|
||
|
YY_RULE_SETUP
|
||
|
#line 93 "lexer.l"
|
||
|
{return TK_CONST;}
|
||
|
YY_BREAK
|
||
|
case 37:
|
||
|
YY_RULE_SETUP
|
||
|
#line 94 "lexer.l"
|
||
|
{return TK_STATIC;}
|
||
|
YY_BREAK
|
||
|
case 38:
|
||
|
YY_RULE_SETUP
|
||
|
#line 95 "lexer.l"
|
||
|
{return TK_TRUE;}
|
||
|
YY_BREAK
|
||
|
case 39:
|
||
|
YY_RULE_SETUP
|
||
|
#line 96 "lexer.l"
|
||
|
{return TK_FALSE;}
|
||
|
YY_BREAK
|
||
|
case 40:
|
||
|
YY_RULE_SETUP
|
||
|
#line 97 "lexer.l"
|
||
|
{return TK_NULL;}
|
||
|
YY_BREAK
|
||
|
case 41:
|
||
|
YY_RULE_SETUP
|
||
|
#line 98 "lexer.l"
|
||
|
{return TK_TYPEDEF;}
|
||
|
YY_BREAK
|
||
|
case 42:
|
||
|
YY_RULE_SETUP
|
||
|
#line 99 "lexer.l"
|
||
|
{return TK_NAMESPACE;}
|
||
|
YY_BREAK
|
||
|
case 43:
|
||
|
YY_RULE_SETUP
|
||
|
#line 100 "lexer.l"
|
||
|
{return TK_OPERATOR;}
|
||
|
YY_BREAK
|
||
|
case 44:
|
||
|
YY_RULE_SETUP
|
||
|
#line 101 "lexer.l"
|
||
|
{return TK_THROW;}
|
||
|
YY_BREAK
|
||
|
case 45:
|
||
|
YY_RULE_SETUP
|
||
|
#line 102 "lexer.l"
|
||
|
{return TK_EXPLICIT;}
|
||
|
YY_BREAK
|
||
|
case 46:
|
||
|
YY_RULE_SETUP
|
||
|
#line 103 "lexer.l"
|
||
|
{return TK_TEMPLATE;}
|
||
|
YY_BREAK
|
||
|
case 47:
|
||
|
YY_RULE_SETUP
|
||
|
#line 104 "lexer.l"
|
||
|
{return TK_SCOPE;}
|
||
|
YY_BREAK
|
||
|
case 48:
|
||
|
YY_RULE_SETUP
|
||
|
#line 105 "lexer.l"
|
||
|
{return TK_LOGICAL_OR;}
|
||
|
YY_BREAK
|
||
|
case 49:
|
||
|
YY_RULE_SETUP
|
||
|
#line 106 "lexer.l"
|
||
|
{return TK_PYOBJECT;}
|
||
|
YY_BREAK
|
||
|
case 50:
|
||
|
YY_RULE_SETUP
|
||
|
#line 107 "lexer.l"
|
||
|
{return TK_PYTUPLE;}
|
||
|
YY_BREAK
|
||
|
case 51:
|
||
|
YY_RULE_SETUP
|
||
|
#line 108 "lexer.l"
|
||
|
{return TK_PYLIST;}
|
||
|
YY_BREAK
|
||
|
case 52:
|
||
|
YY_RULE_SETUP
|
||
|
#line 109 "lexer.l"
|
||
|
{return TK_PYDICT;}
|
||
|
YY_BREAK
|
||
|
case 53:
|
||
|
YY_RULE_SETUP
|
||
|
#line 110 "lexer.l"
|
||
|
{return TK_PYCALLABLE;}
|
||
|
YY_BREAK
|
||
|
case 54:
|
||
|
YY_RULE_SETUP
|
||
|
#line 111 "lexer.l"
|
||
|
{return TK_PYSLICE;}
|
||
|
YY_BREAK
|
||
|
case 55:
|
||
|
YY_RULE_SETUP
|
||
|
#line 112 "lexer.l"
|
||
|
{return TK_PYTYPE;}
|
||
|
YY_BREAK
|
||
|
case 56:
|
||
|
YY_RULE_SETUP
|
||
|
#line 113 "lexer.l"
|
||
|
{return TK_SIPSIGNAL;}
|
||
|
YY_BREAK
|
||
|
case 57:
|
||
|
YY_RULE_SETUP
|
||
|
#line 114 "lexer.l"
|
||
|
{return TK_SIPSLOT;}
|
||
|
YY_BREAK
|
||
|
case 58:
|
||
|
YY_RULE_SETUP
|
||
|
#line 115 "lexer.l"
|
||
|
{return TK_SIPANYSLOT;}
|
||
|
YY_BREAK
|
||
|
case 59:
|
||
|
YY_RULE_SETUP
|
||
|
#line 116 "lexer.l"
|
||
|
{return TK_SIPRXCON;}
|
||
|
YY_BREAK
|
||
|
case 60:
|
||
|
YY_RULE_SETUP
|
||
|
#line 117 "lexer.l"
|
||
|
{return TK_SIPRXDIS;}
|
||
|
YY_BREAK
|
||
|
case 61:
|
||
|
YY_RULE_SETUP
|
||
|
#line 118 "lexer.l"
|
||
|
{return TK_SIPSLOTCON;}
|
||
|
YY_BREAK
|
||
|
case 62:
|
||
|
YY_RULE_SETUP
|
||
|
#line 119 "lexer.l"
|
||
|
{return TK_SIPSLOTDIS;}
|
||
|
YY_BREAK
|
||
|
case 63:
|
||
|
YY_RULE_SETUP
|
||
|
#line 120 "lexer.l"
|
||
|
{return TK_QOBJECT;}
|
||
|
YY_BREAK
|
||
|
case 64:
|
||
|
YY_RULE_SETUP
|
||
|
#line 121 "lexer.l"
|
||
|
{return TK_ELLIPSIS;}
|
||
|
YY_BREAK
|
||
|
case 65:
|
||
|
YY_RULE_SETUP
|
||
|
#line 124 "lexer.l"
|
||
|
{ /* Ignore whitespace. */
|
||
|
;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 66:
|
||
|
/* rule 66 can match eol */
|
||
|
YY_RULE_SETUP
|
||
|
#line 128 "lexer.l"
|
||
|
{ /* Maintain the line number. */
|
||
|
++inputFileStack[currentFile].lineno;
|
||
|
|
||
|
if (codeIdx == 0)
|
||
|
{
|
||
|
BEGIN code;
|
||
|
}
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 67:
|
||
|
YY_RULE_SETUP
|
||
|
#line 137 "lexer.l"
|
||
|
{ /* Ignore C++ style comments. */
|
||
|
;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 68:
|
||
|
YY_RULE_SETUP
|
||
|
#line 142 "lexer.l"
|
||
|
{ /* A signed decimal number. */
|
||
|
yylval.number = strtol(yytext,NULL,0);
|
||
|
return TK_NUMBER;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 69:
|
||
|
YY_RULE_SETUP
|
||
|
#line 148 "lexer.l"
|
||
|
{/* A floating point number. */
|
||
|
yylval.real = strtod(yytext,NULL);
|
||
|
return TK_REAL;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 70:
|
||
|
YY_RULE_SETUP
|
||
|
#line 154 "lexer.l"
|
||
|
{ /* An unsigned hexadecimal number. */
|
||
|
yylval.number = strtol(yytext,NULL,16);
|
||
|
return TK_NUMBER;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 71:
|
||
|
YY_RULE_SETUP
|
||
|
#line 160 "lexer.l"
|
||
|
{ /* An identifier name. */
|
||
|
yylval.text = sipStrdup(yytext);
|
||
|
return TK_NAME;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 72:
|
||
|
YY_RULE_SETUP
|
||
|
#line 166 "lexer.l"
|
||
|
{ /* A relative pathname. */
|
||
|
yylval.text = sipStrdup(yytext);
|
||
|
return TK_PATHNAME;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 73:
|
||
|
/* rule 73 can match eol */
|
||
|
YY_RULE_SETUP
|
||
|
#line 172 "lexer.l"
|
||
|
{ /* A double-quoted string. */
|
||
|
char *dp, *sp;
|
||
|
|
||
|
/* Copy the string without the quotes. */
|
||
|
|
||
|
yylval.text = sipMalloc(strlen(yytext) + 1);
|
||
|
|
||
|
dp = yylval.text;
|
||
|
sp = yytext;
|
||
|
|
||
|
while (*sp != '\0')
|
||
|
{
|
||
|
if (*sp != '"')
|
||
|
*dp++ = *sp;
|
||
|
|
||
|
++sp;
|
||
|
}
|
||
|
|
||
|
*dp = '\0';
|
||
|
|
||
|
return TK_STRING;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 74:
|
||
|
/* rule 74 can match eol */
|
||
|
YY_RULE_SETUP
|
||
|
#line 196 "lexer.l"
|
||
|
{ /* A single-quoted character. */
|
||
|
if (strlen(yytext) != 3)
|
||
|
fatallex("Exactly one character expected between single quotes");
|
||
|
|
||
|
yylval.qchar = yytext[1];
|
||
|
|
||
|
return TK_QCHAR;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 75:
|
||
|
YY_RULE_SETUP
|
||
|
#line 206 "lexer.l"
|
||
|
{ /* Ignore C-style comments. */
|
||
|
BEGIN ccomment;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 76:
|
||
|
/* rule 76 can match eol */
|
||
|
YY_RULE_SETUP
|
||
|
#line 209 "lexer.l"
|
||
|
{
|
||
|
++inputFileStack[currentFile].lineno;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 77:
|
||
|
YY_RULE_SETUP
|
||
|
#line 212 "lexer.l"
|
||
|
{
|
||
|
BEGIN INITIAL;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 78:
|
||
|
YY_RULE_SETUP
|
||
|
#line 215 "lexer.l"
|
||
|
{
|
||
|
;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 79:
|
||
|
YY_RULE_SETUP
|
||
|
#line 220 "lexer.l"
|
||
|
{ /* The software license. */
|
||
|
codeIdx = 0;
|
||
|
return TK_COPYING;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 80:
|
||
|
YY_RULE_SETUP
|
||
|
#line 225 "lexer.l"
|
||
|
{ /* The start of a from-type code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_FROMTYPE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 81:
|
||
|
YY_RULE_SETUP
|
||
|
#line 230 "lexer.l"
|
||
|
{ /* The start of a to-type code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_TOTYPE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 82:
|
||
|
YY_RULE_SETUP
|
||
|
#line 235 "lexer.l"
|
||
|
{ /* The start of a to-sub-class code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_TOSUBCLASS;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 83:
|
||
|
YY_RULE_SETUP
|
||
|
#line 240 "lexer.l"
|
||
|
{ /* The start of an exported header code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_EXPHEADERCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 84:
|
||
|
YY_RULE_SETUP
|
||
|
#line 245 "lexer.l"
|
||
|
{ /* The start of a module header code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_MODHEADERCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 85:
|
||
|
YY_RULE_SETUP
|
||
|
#line 250 "lexer.l"
|
||
|
{ /* The start of a type header code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_TYPEHEADERCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 86:
|
||
|
YY_RULE_SETUP
|
||
|
#line 255 "lexer.l"
|
||
|
{ /* The start of a pre-initialisation code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_PREINITCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 87:
|
||
|
YY_RULE_SETUP
|
||
|
#line 260 "lexer.l"
|
||
|
{ /* The start of a post-initialisation code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_POSTINITCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 88:
|
||
|
YY_RULE_SETUP
|
||
|
#line 265 "lexer.l"
|
||
|
{ /* The start of a unit code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_UNITCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 89:
|
||
|
YY_RULE_SETUP
|
||
|
#line 270 "lexer.l"
|
||
|
{ /* The start of a module code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_MODCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 90:
|
||
|
YY_RULE_SETUP
|
||
|
#line 275 "lexer.l"
|
||
|
{ /* The start of a type code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_TYPECODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 91:
|
||
|
YY_RULE_SETUP
|
||
|
#line 280 "lexer.l"
|
||
|
{ /* The start of a C++ method code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_METHODCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 92:
|
||
|
YY_RULE_SETUP
|
||
|
#line 285 "lexer.l"
|
||
|
{ /* The start of a C++ virtual code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_VIRTUALCATCHERCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 93:
|
||
|
YY_RULE_SETUP
|
||
|
#line 290 "lexer.l"
|
||
|
{ /* The start of a traverse code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_TRAVERSECODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 94:
|
||
|
YY_RULE_SETUP
|
||
|
#line 295 "lexer.l"
|
||
|
{ /* The start of a clear code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_CLEARCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 95:
|
||
|
YY_RULE_SETUP
|
||
|
#line 300 "lexer.l"
|
||
|
{ /* The start of a read buffer code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_READBUFFERCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 96:
|
||
|
YY_RULE_SETUP
|
||
|
#line 305 "lexer.l"
|
||
|
{ /* The start of a write buffer code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_WRITEBUFFERCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 97:
|
||
|
YY_RULE_SETUP
|
||
|
#line 310 "lexer.l"
|
||
|
{ /* The start of a segment count code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_SEGCOUNTCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 98:
|
||
|
YY_RULE_SETUP
|
||
|
#line 315 "lexer.l"
|
||
|
{ /* The start of a char buffer code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_CHARBUFFERCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 99:
|
||
|
YY_RULE_SETUP
|
||
|
#line 320 "lexer.l"
|
||
|
{ /* The start of a pre-Python code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_PREPYCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 100:
|
||
|
YY_RULE_SETUP
|
||
|
#line 325 "lexer.l"
|
||
|
{ /* The start of a raise exception code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_RAISECODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 101:
|
||
|
YY_RULE_SETUP
|
||
|
#line 330 "lexer.l"
|
||
|
{ /* The start of a documentation block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_DOC;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 102:
|
||
|
YY_RULE_SETUP
|
||
|
#line 335 "lexer.l"
|
||
|
{ /* The start of an exported documentation block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_EXPORTEDDOC;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 103:
|
||
|
YY_RULE_SETUP
|
||
|
#line 340 "lexer.l"
|
||
|
{ /* The start of a Makefile code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_MAKEFILE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 104:
|
||
|
YY_RULE_SETUP
|
||
|
#line 345 "lexer.l"
|
||
|
{ /* The start of an access code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_ACCESSCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 105:
|
||
|
YY_RULE_SETUP
|
||
|
#line 350 "lexer.l"
|
||
|
{ /* The start of a get code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_GETCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 106:
|
||
|
YY_RULE_SETUP
|
||
|
#line 355 "lexer.l"
|
||
|
{ /* The start of a set code block. */
|
||
|
codeIdx = 0;
|
||
|
return TK_SETCODE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 107:
|
||
|
YY_RULE_SETUP
|
||
|
#line 360 "lexer.l"
|
||
|
{ /* The end of a code block. */
|
||
|
BEGIN INITIAL;
|
||
|
codeIdx = -1;
|
||
|
return TK_END;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 108:
|
||
|
/* rule 108 can match eol */
|
||
|
YY_RULE_SETUP
|
||
|
#line 366 "lexer.l"
|
||
|
{ /* The end of a code line . */
|
||
|
struct inputFile *ifp;
|
||
|
|
||
|
codeLine[codeIdx] = '\n';
|
||
|
codeLine[codeIdx + 1] = '\0';
|
||
|
codeIdx = 0;
|
||
|
|
||
|
ifp = &inputFileStack[currentFile];
|
||
|
|
||
|
yylval.codeb = sipMalloc(sizeof (codeBlock));
|
||
|
|
||
|
yylval.codeb -> frag = sipStrdup(codeLine);
|
||
|
yylval.codeb -> linenr = ifp -> lineno++;
|
||
|
yylval.codeb -> filename = sipStrdup(ifp -> name);
|
||
|
yylval.codeb -> next = NULL;
|
||
|
|
||
|
return TK_CODELINE;
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 109:
|
||
|
YY_RULE_SETUP
|
||
|
#line 385 "lexer.l"
|
||
|
{ /* The contents of a code line. */
|
||
|
if (codeIdx == MAX_CODE_LINE_LENGTH)
|
||
|
fatallex("Line is too long");
|
||
|
|
||
|
codeLine[codeIdx++] = yytext[0];
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 110:
|
||
|
YY_RULE_SETUP
|
||
|
#line 392 "lexer.l"
|
||
|
{ /* Anything else is returned as is. */
|
||
|
return yytext[0];
|
||
|
}
|
||
|
YY_BREAK
|
||
|
case 111:
|
||
|
YY_RULE_SETUP
|
||
|
#line 396 "lexer.l"
|
||
|
ECHO;
|
||
|
YY_BREAK
|
||
|
#line 2092 "lexer.c.tmp"
|
||
|
case YY_STATE_EOF(INITIAL):
|
||
|
case YY_STATE_EOF(code):
|
||
|
case YY_STATE_EOF(ccomment):
|
||
|
yyterminate();
|
||
|
|
||
|
case YY_END_OF_BUFFER:
|
||
|
{
|
||
|
/* Amount of text matched not including the EOB char. */
|
||
|
int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
|
||
|
|
||
|
/* Undo the effects of YY_DO_BEFORE_ACTION. */
|
||
|
*yy_cp = (yy_hold_char);
|
||
|
YY_RESTORE_YY_MORE_OFFSET
|
||
|
|
||
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
|
||
|
{
|
||
|
/* We're scanning a new file or input source. It's
|
||
|
* possible that this happened because the user
|
||
|
* just pointed yyin at a new source and called
|
||
|
* yylex(). If so, then we have to assure
|
||
|
* consistency between YY_CURRENT_BUFFER and our
|
||
|
* globals. Here is the right place to do so, because
|
||
|
* this is the first action (other than possibly a
|
||
|
* back-up) that will match for the new input source.
|
||
|
*/
|
||
|
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
|
||
|
YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
|
||
|
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
|
||
|
}
|
||
|
|
||
|
/* Note that here we test for yy_c_buf_p "<=" to the position
|
||
|
* of the first EOB in the buffer, since yy_c_buf_p will
|
||
|
* already have been incremented past the NUL character
|
||
|
* (since all states make transitions on EOB to the
|
||
|
* end-of-buffer state). Contrast this with the test
|
||
|
* in input().
|
||
|
*/
|
||
|
if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
|
||
|
{ /* This was really a NUL. */
|
||
|
yy_state_type yy_next_state;
|
||
|
|
||
|
(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
|
||
|
|
||
|
yy_current_state = yy_get_previous_state( );
|
||
|
|
||
|
/* Okay, we're now positioned to make the NUL
|
||
|
* transition. We couldn't have
|
||
|
* yy_get_previous_state() go ahead and do it
|
||
|
* for us because it doesn't know how to deal
|
||
|
* with the possibility of jamming (and we don't
|
||
|
* want to build jamming into it because then it
|
||
|
* will run more slowly).
|
||
|
*/
|
||
|
|
||
|
yy_next_state = yy_try_NUL_trans( yy_current_state );
|
||
|
|
||
|
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
||
|
|
||
|
if ( yy_next_state )
|
||
|
{
|
||
|
/* Consume the NUL. */
|
||
|
yy_cp = ++(yy_c_buf_p);
|
||
|
yy_current_state = yy_next_state;
|
||
|
goto yy_match;
|
||
|
}
|
||
|
|
||
|
else
|
||
|
{
|
||
|
yy_cp = (yy_c_buf_p);
|
||
|
goto yy_find_action;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
else switch ( yy_get_next_buffer( ) )
|
||
|
{
|
||
|
case EOB_ACT_END_OF_FILE:
|
||
|
{
|
||
|
(yy_did_buffer_switch_on_eof) = 0;
|
||
|
|
||
|
if ( yywrap( ) )
|
||
|
{
|
||
|
/* Note: because we've taken care in
|
||
|
* yy_get_next_buffer() to have set up
|
||
|
* yytext, we can now set up
|
||
|
* yy_c_buf_p so that if some total
|
||
|
* hoser (like flex itself) wants to
|
||
|
* call the scanner after we return the
|
||
|
* YY_NULL, it'll still work - another
|
||
|
* YY_NULL will get returned.
|
||
|
*/
|
||
|
(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
|
||
|
|
||
|
yy_act = YY_STATE_EOF(YY_START);
|
||
|
goto do_action;
|
||
|
}
|
||
|
|
||
|
else
|
||
|
{
|
||
|
if ( ! (yy_did_buffer_switch_on_eof) )
|
||
|
YY_NEW_FILE;
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
case EOB_ACT_CONTINUE_SCAN:
|
||
|
(yy_c_buf_p) =
|
||
|
(yytext_ptr) + yy_amount_of_matched_text;
|
||
|
|
||
|
yy_current_state = yy_get_previous_state( );
|
||
|
|
||
|
yy_cp = (yy_c_buf_p);
|
||
|
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
||
|
goto yy_match;
|
||
|
|
||
|
case EOB_ACT_LAST_MATCH:
|
||
|
(yy_c_buf_p) =
|
||
|
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
|
||
|
|
||
|
yy_current_state = yy_get_previous_state( );
|
||
|
|
||
|
yy_cp = (yy_c_buf_p);
|
||
|
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
||
|
goto yy_find_action;
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
default:
|
||
|
YY_FATAL_ERROR(
|
||
|
"fatal flex scanner internal error--no action found" );
|
||
|
} /* end of action switch */
|
||
|
} /* end of scanning one token */
|
||
|
} /* end of yylex */
|
||
|
|
||
|
/* yy_get_next_buffer - try to read in a new buffer
|
||
|
*
|
||
|
* Returns a code representing an action:
|
||
|
* EOB_ACT_LAST_MATCH -
|
||
|
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
|
||
|
* EOB_ACT_END_OF_FILE - end of file
|
||
|
*/
|
||
|
static int yy_get_next_buffer (void)
|
||
|
{
|
||
|
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
|
||
|
register char *source = (yytext_ptr);
|
||
|
register int number_to_move, i;
|
||
|
int ret_val;
|
||
|
|
||
|
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
|
||
|
YY_FATAL_ERROR(
|
||
|
"fatal flex scanner internal error--end of buffer missed" );
|
||
|
|
||
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
|
||
|
{ /* Don't try to fill the buffer, so this is an EOF. */
|
||
|
if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
|
||
|
{
|
||
|
/* We matched a single character, the EOB, so
|
||
|
* treat this as a final EOF.
|
||
|
*/
|
||
|
return EOB_ACT_END_OF_FILE;
|
||
|
}
|
||
|
|
||
|
else
|
||
|
{
|
||
|
/* We matched some text prior to the EOB, first
|
||
|
* process it.
|
||
|
*/
|
||
|
return EOB_ACT_LAST_MATCH;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* Try to read more data. */
|
||
|
|
||
|
/* First move last chars to start of buffer. */
|
||
|
number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
|
||
|
|
||
|
for ( i = 0; i < number_to_move; ++i )
|
||
|
*(dest++) = *(source++);
|
||
|
|
||
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
|
||
|
/* don't do the read, it's not guaranteed to return an EOF,
|
||
|
* just force an EOF
|
||
|
*/
|
||
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
|
||
|
|
||
|
else
|
||
|
{
|
||
|
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. */
|
||
|
yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
|
||
|
}
|
||
|
else
|
||
|
/* Can't grow it, we don't own it. */
|
||
|
b->yy_ch_buf = 0;
|
||
|
|
||
|
if ( ! b->yy_ch_buf )
|
||
|
YY_FATAL_ERROR(
|
||
|
"fatal error - scanner input buffer overflow" );
|
||
|
|
||
|
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
|
||
|
|
||
|
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
|
||
|
number_to_move - 1;
|
||
|
|
||
|
}
|
||
|
|
||
|
if ( num_to_read > YY_READ_BUF_SIZE )
|
||
|
num_to_read = YY_READ_BUF_SIZE;
|
||
|
|
||
|
/* Read in more data. */
|
||
|
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
|
||
|
(yy_n_chars), num_to_read );
|
||
|
|
||
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
||
|
}
|
||
|
|
||
|
if ( (yy_n_chars) == 0 )
|
||
|
{
|
||
|
if ( number_to_move == YY_MORE_ADJ )
|
||
|
{
|
||
|
ret_val = EOB_ACT_END_OF_FILE;
|
||
|
yyrestart(yyin );
|
||
|
}
|
||
|
|
||
|
else
|
||
|
{
|
||
|
ret_val = EOB_ACT_LAST_MATCH;
|
||
|
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
|
||
|
YY_BUFFER_EOF_PENDING;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
else
|
||
|
ret_val = EOB_ACT_CONTINUE_SCAN;
|
||
|
|
||
|
(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)] : 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 >= 735 )
|
||
|
yy_c = yy_meta[(unsigned int) yy_c];
|
||
|
}
|
||
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||
|
}
|
||
|
|
||
|
return yy_current_state;
|
||
|
}
|
||
|
|
||
|
/* yy_try_NUL_trans - try to make a transition on the NUL character
|
||
|
*
|
||
|
* synopsis
|
||
|
* next_state = yy_try_NUL_trans( current_state );
|
||
|
*/
|
||
|
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
|
||
|
{
|
||
|
register int yy_is_jam;
|
||
|
register char *yy_cp = (yy_c_buf_p);
|
||
|
|
||
|
register YY_CHAR yy_c = 1;
|
||
|
if ( yy_accept[yy_current_state] )
|
||
|
{
|
||
|
(yy_last_accepting_state) = yy_current_state;
|
||
|
(yy_last_accepting_cpos) = yy_cp;
|
||
|
}
|
||
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
||
|
{
|
||
|
yy_current_state = (int) yy_def[yy_current_state];
|
||
|
if ( yy_current_state >= 735 )
|
||
|
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 == 734);
|
||
|
|
||
|
return yy_is_jam ? 0 : yy_current_state;
|
||
|
}
|
||
|
|
||
|
static void yyunput (int c, register char * yy_bp )
|
||
|
{
|
||
|
register char *yy_cp;
|
||
|
|
||
|
yy_cp = (yy_c_buf_p);
|
||
|
|
||
|
/* undo effects of setting up yytext */
|
||
|
*yy_cp = (yy_hold_char);
|
||
|
|
||
|
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
|
||
|
{ /* need to shift things up to make room */
|
||
|
/* +2 for EOB chars. */
|
||
|
register 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. */
|
||
|
yyrestart(yyin );
|
||
|
|
||
|
/*FALLTHROUGH*/
|
||
|
|
||
|
case EOB_ACT_END_OF_FILE:
|
||
|
{
|
||
|
if ( yywrap( ) )
|
||
|
return EOF;
|
||
|
|
||
|
if ( ! (yy_did_buffer_switch_on_eof) )
|
||
|
YY_NEW_FILE;
|
||
|
#ifdef __cplusplus
|
||
|
return yyinput();
|
||
|
#else
|
||
|
return input();
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
case EOB_ACT_CONTINUE_SCAN:
|
||
|
(yy_c_buf_p) = (yytext_ptr) + offset;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
|
||
|
*(yy_c_buf_p) = '\0'; /* preserve yytext */
|
||
|
(yy_hold_char) = *++(yy_c_buf_p);
|
||
|
|
||
|
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
|
||
|
|
||
|
return c;
|
||
|
}
|
||
|
#endif /* ifndef YY_NO_INPUT */
|
||
|
|
||
|
/** Immediately switch to a different input stream.
|
||
|
* @param input_file A readable stream.
|
||
|
*
|
||
|
* @note This function does not reset the start condition to @c INITIAL .
|
||
|
*/
|
||
|
void yyrestart (FILE * input_file )
|
||
|
{
|
||
|
|
||
|
if ( ! YY_CURRENT_BUFFER ){
|
||
|
yyensure_buffer_stack ();
|
||
|
YY_CURRENT_BUFFER_LVALUE =
|
||
|
yy_create_buffer(yyin,YY_BUF_SIZE );
|
||
|
}
|
||
|
|
||
|
yy_init_buffer(YY_CURRENT_BUFFER,input_file );
|
||
|
yy_load_buffer_state( );
|
||
|
}
|
||
|
|
||
|
/** Switch to a different input buffer.
|
||
|
* @param new_buffer The new input buffer.
|
||
|
*
|
||
|
*/
|
||
|
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
|
||
|
{
|
||
|
|
||
|
/* TODO. We should be able to replace this entire function body
|
||
|
* with
|
||
|
* yypop_buffer_state();
|
||
|
* yypush_buffer_state(new_buffer);
|
||
|
*/
|
||
|
yyensure_buffer_stack ();
|
||
|
if ( YY_CURRENT_BUFFER == new_buffer )
|
||
|
return;
|
||
|
|
||
|
if ( YY_CURRENT_BUFFER )
|
||
|
{
|
||
|
/* Flush out information for old buffer. */
|
||
|
*(yy_c_buf_p) = (yy_hold_char);
|
||
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
|
||
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
||
|
}
|
||
|
|
||
|
YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
||
|
yy_load_buffer_state( );
|
||
|
|
||
|
/* We don't actually know whether we did this switch during
|
||
|
* EOF (yywrap()) processing, but the only time this flag
|
||
|
* is looked at is after yywrap() is called, so it's safe
|
||
|
* to go ahead and always set it.
|
||
|
*/
|
||
|
(yy_did_buffer_switch_on_eof) = 1;
|
||
|
}
|
||
|
|
||
|
static void yy_load_buffer_state (void)
|
||
|
{
|
||
|
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
|
||
|
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
|
||
|
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
|
||
|
(yy_hold_char) = *(yy_c_buf_p);
|
||
|
}
|
||
|
|
||
|
/** Allocate and initialize an input buffer state.
|
||
|
* @param file A readable stream.
|
||
|
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
|
||
|
*
|
||
|
* @return the allocated buffer state.
|
||
|
*/
|
||
|
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
|
||
|
{
|
||
|
YY_BUFFER_STATE b;
|
||
|
|
||
|
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
|
||
|
if ( ! b )
|
||
|
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
||
|
|
||
|
b->yy_buf_size = size;
|
||
|
|
||
|
/* yy_ch_buf has to be 2 characters longer than the size given because
|
||
|
* we need to put in 2 end-of-buffer characters.
|
||
|
*/
|
||
|
b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
|
||
|
if ( ! b->yy_ch_buf )
|
||
|
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
||
|
|
||
|
b->yy_is_our_buffer = 1;
|
||
|
|
||
|
yy_init_buffer(b,file );
|
||
|
|
||
|
return b;
|
||
|
}
|
||
|
|
||
|
/** Destroy the buffer.
|
||
|
* @param b a buffer created with yy_create_buffer()
|
||
|
*
|
||
|
*/
|
||
|
void yy_delete_buffer (YY_BUFFER_STATE b )
|
||
|
{
|
||
|
|
||
|
if ( ! b )
|
||
|
return;
|
||
|
|
||
|
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
|
||
|
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
||
|
|
||
|
if ( b->yy_is_our_buffer )
|
||
|
yyfree((void *) b->yy_ch_buf );
|
||
|
|
||
|
yyfree((void *) b );
|
||
|
}
|
||
|
|
||
|
#ifndef _UNISTD_H /* assume unistd.h has isatty() for us */
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
#ifdef __THROW /* this is a gnuism */
|
||
|
extern int isatty (int ) __THROW;
|
||
|
#else
|
||
|
extern int isatty (int );
|
||
|
#endif
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
#endif
|
||
|
|
||
|
/* Initializes or reinitializes a buffer.
|
||
|
* This function is sometimes called more than once on the same buffer,
|
||
|
* such as during a yyrestart() or at EOF.
|
||
|
*/
|
||
|
static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
|
||
|
|
||
|
{
|
||
|
int oerrno = errno;
|
||
|
|
||
|
yy_flush_buffer(b );
|
||
|
|
||
|
b->yy_input_file = file;
|
||
|
b->yy_fill_buffer = 1;
|
||
|
|
||
|
/* If b is the current buffer, then yy_init_buffer was _probably_
|
||
|
* called from yyrestart() or through yy_get_next_buffer.
|
||
|
* In that case, we don't want to reset the lineno or column.
|
||
|
*/
|
||
|
if (b != YY_CURRENT_BUFFER){
|
||
|
b->yy_bs_lineno = 1;
|
||
|
b->yy_bs_column = 0;
|
||
|
}
|
||
|
|
||
|
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
||
|
|
||
|
errno = oerrno;
|
||
|
}
|
||
|
|
||
|
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
|
||
|
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
|
||
|
*
|
||
|
*/
|
||
|
void yy_flush_buffer (YY_BUFFER_STATE b )
|
||
|
{
|
||
|
if ( ! b )
|
||
|
return;
|
||
|
|
||
|
b->yy_n_chars = 0;
|
||
|
|
||
|
/* We always need two end-of-buffer characters. The first causes
|
||
|
* a transition to the end-of-buffer state. The second causes
|
||
|
* a jam in that state.
|
||
|
*/
|
||
|
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
|
||
|
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
|
||
|
|
||
|
b->yy_buf_pos = &b->yy_ch_buf[0];
|
||
|
|
||
|
b->yy_at_bol = 1;
|
||
|
b->yy_buffer_status = YY_BUFFER_NEW;
|
||
|
|
||
|
if ( b == YY_CURRENT_BUFFER )
|
||
|
yy_load_buffer_state( );
|
||
|
}
|
||
|
|
||
|
/** Pushes the new state onto the stack. The new state becomes
|
||
|
* the current state. This function will allocate the stack
|
||
|
* if necessary.
|
||
|
* @param new_buffer The new state.
|
||
|
*
|
||
|
*/
|
||
|
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
|
||
|
{
|
||
|
if (new_buffer == NULL)
|
||
|
return;
|
||
|
|
||
|
yyensure_buffer_stack();
|
||
|
|
||
|
/* This block is copied from yy_switch_to_buffer. */
|
||
|
if ( YY_CURRENT_BUFFER )
|
||
|
{
|
||
|
/* Flush out information for old buffer. */
|
||
|
*(yy_c_buf_p) = (yy_hold_char);
|
||
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
|
||
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
||
|
}
|
||
|
|
||
|
/* Only push if top exists. Otherwise, replace top. */
|
||
|
if (YY_CURRENT_BUFFER)
|
||
|
(yy_buffer_stack_top)++;
|
||
|
YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
||
|
|
||
|
/* copied from yy_switch_to_buffer. */
|
||
|
yy_load_buffer_state( );
|
||
|
(yy_did_buffer_switch_on_eof) = 1;
|
||
|
}
|
||
|
|
||
|
/** Removes and deletes the top of the stack, if present.
|
||
|
* The next element becomes the new top.
|
||
|
*
|
||
|
*/
|
||
|
void yypop_buffer_state (void)
|
||
|
{
|
||
|
if (!YY_CURRENT_BUFFER)
|
||
|
return;
|
||
|
|
||
|
yy_delete_buffer(YY_CURRENT_BUFFER );
|
||
|
YY_CURRENT_BUFFER_LVALUE = NULL;
|
||
|
if ((yy_buffer_stack_top) > 0)
|
||
|
--(yy_buffer_stack_top);
|
||
|
|
||
|
if (YY_CURRENT_BUFFER) {
|
||
|
yy_load_buffer_state( );
|
||
|
(yy_did_buffer_switch_on_eof) = 1;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* Allocates the stack if it does not exist.
|
||
|
* Guarantees space for at least one push.
|
||
|
*/
|
||
|
static void yyensure_buffer_stack (void)
|
||
|
{
|
||
|
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**)yyalloc
|
||
|
(num_to_alloc * sizeof(struct yy_buffer_state*)
|
||
|
);
|
||
|
|
||
|
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
|
||
|
|
||
|
(yy_buffer_stack_max) = num_to_alloc;
|
||
|
(yy_buffer_stack_top) = 0;
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
|
||
|
|
||
|
/* Increase the buffer to prepare for a possible push. */
|
||
|
int grow_size = 8 /* arbitrary grow size */;
|
||
|
|
||
|
num_to_alloc = (yy_buffer_stack_max) + grow_size;
|
||
|
(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
|
||
|
((yy_buffer_stack),
|
||
|
num_to_alloc * sizeof(struct yy_buffer_state*)
|
||
|
);
|
||
|
|
||
|
/* zero only the new slots.*/
|
||
|
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
|
||
|
(yy_buffer_stack_max) = num_to_alloc;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/** Setup the input buffer state to scan directly from a user-specified character buffer.
|
||
|
* @param base the character buffer
|
||
|
* @param size the size in bytes of the character buffer
|
||
|
*
|
||
|
* @return the newly allocated buffer state object.
|
||
|
*/
|
||
|
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
|
||
|
{
|
||
|
YY_BUFFER_STATE b;
|
||
|
|
||
|
if ( size < 2 ||
|
||
|
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
||
|
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
||
|
/* They forgot to leave room for the EOB's. */
|
||
|
return 0;
|
||
|
|
||
|
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
|
||
|
if ( ! b )
|
||
|
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
|
||
|
|
||
|
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
|
||
|
b->yy_buf_pos = b->yy_ch_buf = base;
|
||
|
b->yy_is_our_buffer = 0;
|
||
|
b->yy_input_file = 0;
|
||
|
b->yy_n_chars = b->yy_buf_size;
|
||
|
b->yy_is_interactive = 0;
|
||
|
b->yy_at_bol = 1;
|
||
|
b->yy_fill_buffer = 0;
|
||
|
b->yy_buffer_status = YY_BUFFER_NEW;
|
||
|
|
||
|
yy_switch_to_buffer(b );
|
||
|
|
||
|
return b;
|
||
|
}
|
||
|
|
||
|
/** Setup the input buffer state to scan a string. The next call to yylex() will
|
||
|
* scan from a @e copy of @a str.
|
||
|
* @param str a NUL-terminated string to scan
|
||
|
*
|
||
|
* @return the newly allocated buffer state object.
|
||
|
* @note If you want to scan bytes that may contain NUL values, then use
|
||
|
* yy_scan_bytes() instead.
|
||
|
*/
|
||
|
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
|
||
|
{
|
||
|
|
||
|
return yy_scan_bytes(yystr,strlen(yystr) );
|
||
|
}
|
||
|
|
||
|
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
|
||
|
* scan from a @e copy of @a bytes.
|
||
|
* @param bytes the byte buffer to scan
|
||
|
* @param len the number of bytes in the buffer pointed to by @a bytes.
|
||
|
*
|
||
|
* @return the newly allocated buffer state object.
|
||
|
*/
|
||
|
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, 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 *) yyalloc(n );
|
||
|
if ( ! buf )
|
||
|
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
|
||
|
|
||
|
for ( i = 0; i < _yybytes_len; ++i )
|
||
|
buf[i] = yybytes[i];
|
||
|
|
||
|
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
|
||
|
|
||
|
b = yy_scan_buffer(buf,n );
|
||
|
if ( ! b )
|
||
|
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
|
||
|
|
||
|
/* It's okay to grow etc. this buffer, and we should throw it
|
||
|
* away when we're done.
|
||
|
*/
|
||
|
b->yy_is_our_buffer = 1;
|
||
|
|
||
|
return b;
|
||
|
}
|
||
|
|
||
|
#ifndef YY_EXIT_FAILURE
|
||
|
#define YY_EXIT_FAILURE 2
|
||
|
#endif
|
||
|
|
||
|
static void yy_fatal_error (yyconst char* msg )
|
||
|
{
|
||
|
(void) fprintf( stderr, "%s\n", msg );
|
||
|
exit( YY_EXIT_FAILURE );
|
||
|
}
|
||
|
|
||
|
/* Redefine yyless() so it works in section 3 code. */
|
||
|
|
||
|
#undef yyless
|
||
|
#define yyless(n) \
|
||
|
do \
|
||
|
{ \
|
||
|
/* Undo effects of setting up yytext. */ \
|
||
|
int yyless_macro_arg = (n); \
|
||
|
YY_LESS_LINENO(yyless_macro_arg);\
|
||
|
yytext[yyleng] = (yy_hold_char); \
|
||
|
(yy_c_buf_p) = yytext + yyless_macro_arg; \
|
||
|
(yy_hold_char) = *(yy_c_buf_p); \
|
||
|
*(yy_c_buf_p) = '\0'; \
|
||
|
yyleng = yyless_macro_arg; \
|
||
|
} \
|
||
|
while ( 0 )
|
||
|
|
||
|
/* Accessor methods (get/set functions) to struct members. */
|
||
|
|
||
|
/** Get the current line number.
|
||
|
*
|
||
|
*/
|
||
|
int yyget_lineno (void)
|
||
|
{
|
||
|
|
||
|
return yylineno;
|
||
|
}
|
||
|
|
||
|
/** Get the input stream.
|
||
|
*
|
||
|
*/
|
||
|
FILE *yyget_in (void)
|
||
|
{
|
||
|
return yyin;
|
||
|
}
|
||
|
|
||
|
/** Get the output stream.
|
||
|
*
|
||
|
*/
|
||
|
FILE *yyget_out (void)
|
||
|
{
|
||
|
return yyout;
|
||
|
}
|
||
|
|
||
|
/** Get the length of the current token.
|
||
|
*
|
||
|
*/
|
||
|
int yyget_leng (void)
|
||
|
{
|
||
|
return yyleng;
|
||
|
}
|
||
|
|
||
|
/** Get the current token.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
char *yyget_text (void)
|
||
|
{
|
||
|
return yytext;
|
||
|
}
|
||
|
|
||
|
/** Set the current line number.
|
||
|
* @param line_number
|
||
|
*
|
||
|
*/
|
||
|
void yyset_lineno (int line_number )
|
||
|
{
|
||
|
|
||
|
yylineno = line_number;
|
||
|
}
|
||
|
|
||
|
/** Set the input stream. This does not discard the current
|
||
|
* input buffer.
|
||
|
* @param in_str A readable stream.
|
||
|
*
|
||
|
* @see yy_switch_to_buffer
|
||
|
*/
|
||
|
void yyset_in (FILE * in_str )
|
||
|
{
|
||
|
yyin = in_str ;
|
||
|
}
|
||
|
|
||
|
void yyset_out (FILE * out_str )
|
||
|
{
|
||
|
yyout = out_str ;
|
||
|
}
|
||
|
|
||
|
int yyget_debug (void)
|
||
|
{
|
||
|
return yy_flex_debug;
|
||
|
}
|
||
|
|
||
|
void yyset_debug (int bdebug )
|
||
|
{
|
||
|
yy_flex_debug = bdebug ;
|
||
|
}
|
||
|
|
||
|
static int yy_init_globals (void)
|
||
|
{
|
||
|
/* Initialization is the same as for the non-reentrant scanner.
|
||
|
* This function is called from yylex_destroy(), so don't allocate here.
|
||
|
*/
|
||
|
|
||
|
(yy_buffer_stack) = 0;
|
||
|
(yy_buffer_stack_top) = 0;
|
||
|
(yy_buffer_stack_max) = 0;
|
||
|
(yy_c_buf_p) = (char *) 0;
|
||
|
(yy_init) = 0;
|
||
|
(yy_start) = 0;
|
||
|
|
||
|
/* Defined in main.c */
|
||
|
#ifdef YY_STDINIT
|
||
|
yyin = stdin;
|
||
|
yyout = stdout;
|
||
|
#else
|
||
|
yyin = (FILE *) 0;
|
||
|
yyout = (FILE *) 0;
|
||
|
#endif
|
||
|
|
||
|
/* For future reference: Set errno on error, since we are called by
|
||
|
* yylex_init()
|
||
|
*/
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
|
||
|
int yylex_destroy (void)
|
||
|
{
|
||
|
|
||
|
/* Pop the buffer stack, destroying each element. */
|
||
|
while(YY_CURRENT_BUFFER){
|
||
|
yy_delete_buffer(YY_CURRENT_BUFFER );
|
||
|
YY_CURRENT_BUFFER_LVALUE = NULL;
|
||
|
yypop_buffer_state();
|
||
|
}
|
||
|
|
||
|
/* Destroy the stack itself. */
|
||
|
yyfree((yy_buffer_stack) );
|
||
|
(yy_buffer_stack) = NULL;
|
||
|
|
||
|
/* Reset the globals. This is important in a non-reentrant scanner so the next time
|
||
|
* yylex() is called, initialization will occur. */
|
||
|
yy_init_globals( );
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
* Internal utility routines.
|
||
|
*/
|
||
|
|
||
|
#ifndef yytext_ptr
|
||
|
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
|
||
|
{
|
||
|
register int i;
|
||
|
for ( i = 0; i < n; ++i )
|
||
|
s1[i] = s2[i];
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#ifdef YY_NEED_STRLEN
|
||
|
static int yy_flex_strlen (yyconst char * s )
|
||
|
{
|
||
|
register int n;
|
||
|
for ( n = 0; s[n]; ++n )
|
||
|
;
|
||
|
|
||
|
return n;
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
void *yyalloc (yy_size_t size )
|
||
|
{
|
||
|
return (void *) malloc( size );
|
||
|
}
|
||
|
|
||
|
void *yyrealloc (void * ptr, yy_size_t size )
|
||
|
{
|
||
|
/* The cast to (char *) in the following accommodates both
|
||
|
* implementations that use char* generic pointers, and those
|
||
|
* that use void* generic pointers. It works with the latter
|
||
|
* because both ANSI C and C++ allow castless assignment from
|
||
|
* any pointer type to void*, and deal with argument conversions
|
||
|
* as though doing an assignment.
|
||
|
*/
|
||
|
return (void *) realloc( (char *) ptr, size );
|
||
|
}
|
||
|
|
||
|
void yyfree (void * ptr )
|
||
|
{
|
||
|
free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
|
||
|
}
|
||
|
|
||
|
#define YYTABLES_NAME "yytables"
|
||
|
|
||
|
#line 396 "lexer.l"
|
||
|
|
||
|
|
||
|
|
||
|
/*
|
||
|
* Hook into EOF handling. Return 0 if there is more to process.
|
||
|
*/
|
||
|
|
||
|
int yywrap()
|
||
|
{
|
||
|
char *cwd;
|
||
|
struct inputFile *ifp;
|
||
|
|
||
|
if ((cwd = inputFileStack[currentFile].cwd) != NULL)
|
||
|
free(cwd);
|
||
|
|
||
|
ifp = &inputFileStack[currentFile--];
|
||
|
|
||
|
/* Tell the parser if this is the end of a file. */
|
||
|
|
||
|
parserEOF(ifp -> name,&ifp -> pc);
|
||
|
|
||
|
/* Tidy up this file. */
|
||
|
|
||
|
fclose(yyin);
|
||
|
free(ifp -> name);
|
||
|
|
||
|
/* See if this was the original file. */
|
||
|
|
||
|
if (currentFile < 0)
|
||
|
return 1;
|
||
|
|
||
|
yy_delete_buffer(YY_CURRENT_BUFFER);
|
||
|
yy_switch_to_buffer(ifp -> bs);
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
|
||
|
/*
|
||
|
* Set up an input file to be read by the lexer, opening it if necessary.
|
||
|
*/
|
||
|
void setInputFile(FILE *fp,char *name,parserContext *pc,int optional)
|
||
|
{
|
||
|
char *fullname = NULL;
|
||
|
|
||
|
if (currentFile >= MAX_INCLUDE_DEPTH - 1)
|
||
|
fatal("Too many nested %%Include, %%OptionalInclude or %%Import statements\n");
|
||
|
|
||
|
if (fp != NULL || (fp = openFile(name)) != NULL)
|
||
|
fullname = sipStrdup(name);
|
||
|
else
|
||
|
{
|
||
|
char *cwd;
|
||
|
|
||
|
/* Try the directory that contains the current file. */
|
||
|
if (currentFile >= 0 && (cwd = inputFileStack[currentFile].cwd) != NULL)
|
||
|
{
|
||
|
fullname = concat(cwd,"/",name,NULL);
|
||
|
|
||
|
if ((fp = openFile(fullname)) == NULL)
|
||
|
{
|
||
|
free(fullname);
|
||
|
fullname = NULL;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* Try the include path if we haven't found anything yet. */
|
||
|
if (fullname == NULL)
|
||
|
{
|
||
|
stringList *sl;
|
||
|
|
||
|
fullname = NULL;
|
||
|
|
||
|
for (sl = includeDirList; sl != NULL; sl = sl -> next)
|
||
|
{
|
||
|
if (fullname != NULL)
|
||
|
free(fullname);
|
||
|
|
||
|
fullname = concat(sl -> s,"/",name,NULL);
|
||
|
|
||
|
if ((fp = openFile(fullname)) != NULL)
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
if (fp == NULL && !optional)
|
||
|
fatal("Unable to find file \"%s\"\n",name);
|
||
|
}
|
||
|
|
||
|
if (fp != NULL)
|
||
|
{
|
||
|
char *cwd;
|
||
|
|
||
|
yyin = fp;
|
||
|
|
||
|
++currentFile;
|
||
|
|
||
|
/*
|
||
|
* Remember the directory containing the new file and make it
|
||
|
* "current".
|
||
|
*/
|
||
|
if ((cwd = strchr(fullname,'/')) != NULL)
|
||
|
{
|
||
|
cwd = sipStrdup(fullname);
|
||
|
*strrchr(cwd,'/') = '\0';
|
||
|
}
|
||
|
|
||
|
inputFileStack[currentFile].lineno = 1;
|
||
|
inputFileStack[currentFile].name = fullname;
|
||
|
inputFileStack[currentFile].pc = *pc;
|
||
|
inputFileStack[currentFile].cwd = cwd;
|
||
|
|
||
|
if (currentFile > 0)
|
||
|
{
|
||
|
inputFileStack[currentFile].bs = YY_CURRENT_BUFFER;
|
||
|
yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
/*
|
||
|
* Open a file for reading or return NULL if it doesn't exist. Any other error
|
||
|
* is fatal.
|
||
|
*/
|
||
|
static FILE *openFile(char *name)
|
||
|
{
|
||
|
FILE *fp;
|
||
|
|
||
|
if ((fp = fopen(name,"r")) == NULL && errno != ENOENT)
|
||
|
fatal("Error in opening file %s\n",name);
|
||
|
|
||
|
return fp;
|
||
|
}
|
||
|
|
||
|
|
||
|
/*
|
||
|
* Handle fatal yacc errors.
|
||
|
*/
|
||
|
void yyerror(char *s)
|
||
|
{
|
||
|
if (currentFile < 0)
|
||
|
fatal("%s\n", s);
|
||
|
|
||
|
fatal("%s:%d: %s\n",
|
||
|
inputFileStack[currentFile].name,
|
||
|
inputFileStack[currentFile].lineno,
|
||
|
s);
|
||
|
}
|
||
|
|
||
|
|
||
|
/*
|
||
|
* Handle warnings while parsing.
|
||
|
*/
|
||
|
void yywarning(char *s)
|
||
|
{
|
||
|
warning("%s:%d: %s\n",
|
||
|
inputFileStack[currentFile].name,
|
||
|
inputFileStack[currentFile].lineno,
|
||
|
s);
|
||
|
}
|
||
|
|
||
|
|
||
|
/*
|
||
|
* Handle fatal lex errors.
|
||
|
*/
|
||
|
static void fatallex(char *s)
|
||
|
{
|
||
|
fatal("%s:%d: Lexical analyser error: %s\n",
|
||
|
inputFileStack[currentFile].name,
|
||
|
inputFileStack[currentFile].lineno,
|
||
|
s);
|
||
|
}
|
||
|
|