3095 lines
86 KiB
C
3095 lines
86 KiB
C
#line 2 "scan.c"
|
|
|
|
#line 4 "scan.c"
|
|
|
|
#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 35
|
|
#if YY_FLEX_SUBMINOR_VERSION > 0
|
|
#define FLEX_BETA
|
|
#endif
|
|
|
|
/* First, we deal with platform-specific or compiler-specific issues. */
|
|
|
|
/* begin standard C headers. */
|
|
#ifdef _LIBC
|
|
#include "namespace.h"
|
|
#endif
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <errno.h>
|
|
#include <stdlib.h>
|
|
|
|
/* end standard C headers. */
|
|
|
|
/* $NetBSD: flexint.h,v 1.2 2014/10/29 18:28:36 christos Exp $ */
|
|
|
|
/* flex integer type definitions */
|
|
|
|
#ifndef FLEXINT_H
|
|
#define FLEXINT_H
|
|
|
|
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
|
|
|
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
|
|
|
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
|
* if you want the limit (max/min) macros for int types.
|
|
*/
|
|
#ifndef __STDC_LIMIT_MACROS
|
|
#define __STDC_LIMIT_MACROS 1
|
|
#endif
|
|
|
|
#include <inttypes.h>
|
|
typedef int8_t flex_int8_t;
|
|
typedef uint8_t flex_uint8_t;
|
|
typedef int16_t flex_int16_t;
|
|
typedef uint16_t flex_uint16_t;
|
|
typedef int32_t flex_int32_t;
|
|
typedef uint32_t flex_uint32_t;
|
|
#else
|
|
typedef signed char flex_int8_t;
|
|
typedef short int flex_int16_t;
|
|
typedef int flex_int32_t;
|
|
typedef unsigned char flex_uint8_t;
|
|
typedef unsigned short int flex_uint16_t;
|
|
typedef unsigned int flex_uint32_t;
|
|
|
|
/* Limits of integral types. */
|
|
#ifndef INT8_MIN
|
|
#define INT8_MIN (-128)
|
|
#endif
|
|
#ifndef INT16_MIN
|
|
#define INT16_MIN (-32767-1)
|
|
#endif
|
|
#ifndef INT32_MIN
|
|
#define INT32_MIN (-2147483647-1)
|
|
#endif
|
|
#ifndef INT8_MAX
|
|
#define INT8_MAX (127)
|
|
#endif
|
|
#ifndef INT16_MAX
|
|
#define INT16_MAX (32767)
|
|
#endif
|
|
#ifndef INT32_MAX
|
|
#define INT32_MAX (2147483647)
|
|
#endif
|
|
#ifndef UINT8_MAX
|
|
#define UINT8_MAX (255U)
|
|
#endif
|
|
#ifndef UINT16_MAX
|
|
#define UINT16_MAX (65535U)
|
|
#endif
|
|
#ifndef UINT32_MAX
|
|
#define UINT32_MAX (4294967295U)
|
|
#endif
|
|
|
|
#endif /* ! C99 */
|
|
|
|
#endif /* ! FLEXINT_H */
|
|
|
|
#ifdef __cplusplus
|
|
|
|
/* The "const" storage-class-modifier is valid. */
|
|
#define YY_USE_CONST
|
|
|
|
#else /* ! __cplusplus */
|
|
|
|
/* C99 requires __STDC__ to be defined as 1. */
|
|
#if defined (__STDC__)
|
|
|
|
#define YY_USE_CONST
|
|
|
|
#endif /* defined (__STDC__) */
|
|
#endif /* ! __cplusplus */
|
|
|
|
#ifdef YY_USE_CONST
|
|
#define yyconst const
|
|
#else
|
|
#define yyconst
|
|
#endif
|
|
|
|
/* Returned upon end-of-file. */
|
|
#define YY_NULL 0
|
|
|
|
/* Promotes a possibly negative, possibly signed char to an unsigned
|
|
* integer for use as an array index. If the signed char is negative,
|
|
* we want to instead treat it as an 8-bit unsigned char, hence the
|
|
* double cast.
|
|
*/
|
|
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
|
|
|
|
/* Enter a start condition. This macro really ought to take a parameter,
|
|
* but we do it the disgusting crufty way forced on us by the ()-less
|
|
* definition of BEGIN.
|
|
*/
|
|
#define BEGIN (yy_start) = 1 + 2 *
|
|
|
|
/* Translate the current start state into a value that can be later handed
|
|
* to BEGIN to return to the state. The YYSTATE alias is for lex
|
|
* compatibility.
|
|
*/
|
|
#define YY_START (((yy_start) - 1) / 2)
|
|
#define YYSTATE YY_START
|
|
|
|
/* Action number for EOF rule of a given start state. */
|
|
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
|
|
|
/* Special action meaning "start processing a new file". */
|
|
#define YY_NEW_FILE 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
|
|
|
|
#ifndef YY_TYPEDEF_YY_SIZE_T
|
|
#define YY_TYPEDEF_YY_SIZE_T
|
|
typedef size_t yy_size_t;
|
|
#endif
|
|
|
|
extern yy_size_t 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)
|
|
#define YY_LINENO_REWIND_TO(ptr)
|
|
|
|
/* 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) )
|
|
|
|
#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.
|
|
*/
|
|
yy_size_t 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 yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
|
|
yy_size_t 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,yy_size_t 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 */
|
|
|
|
#define yywrap() (/*CONSTCOND*/1)
|
|
#define YY_SKIP_YYWRAP
|
|
|
|
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 );
|
|
#if defined(__GNUC__) && __GNUC__ >= 3
|
|
__attribute__((__noreturn__))
|
|
#endif
|
|
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 77
|
|
#define YY_END_OF_BUFFER 78
|
|
/* 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[437] =
|
|
{ 0,
|
|
0, 0, 0, 0, 78, 76, 75, 72, 76, 74,
|
|
76, 64, 68, 70, 76, 65, 65, 65, 65, 65,
|
|
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
|
|
65, 65, 65, 73, 60, 59, 60, 60, 75, 71,
|
|
0, 66, 0, 74, 51, 64, 64, 68, 0, 0,
|
|
70, 52, 65, 65, 65, 2, 65, 65, 65, 65,
|
|
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
|
|
65, 65, 65, 65, 65, 34, 65, 37, 65, 65,
|
|
65, 65, 65, 65, 65, 65, 65, 65, 65, 0,
|
|
0, 0, 67, 69, 1, 65, 65, 65, 65, 65,
|
|
|
|
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
|
|
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
|
|
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
|
|
65, 65, 65, 65, 65, 65, 0, 0, 0, 0,
|
|
0, 65, 65, 65, 6, 65, 65, 65, 65, 65,
|
|
65, 65, 65, 65, 65, 65, 65, 65, 20, 65,
|
|
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
|
|
65, 65, 65, 65, 65, 65, 65, 65, 65, 43,
|
|
65, 65, 65, 47, 65, 65, 50, 0, 0, 0,
|
|
0, 0, 65, 4, 5, 65, 65, 65, 65, 9,
|
|
|
|
65, 65, 65, 65, 65, 65, 19, 65, 65, 0,
|
|
57, 0, 65, 65, 22, 23, 65, 65, 65, 65,
|
|
65, 65, 27, 65, 65, 65, 31, 65, 65, 65,
|
|
65, 65, 65, 65, 65, 65, 65, 65, 65, 0,
|
|
0, 0, 0, 0, 3, 65, 65, 65, 8, 65,
|
|
10, 12, 65, 65, 65, 17, 65, 65, 0, 0,
|
|
58, 0, 65, 0, 65, 65, 24, 65, 65, 65,
|
|
65, 65, 65, 35, 65, 65, 65, 39, 65, 44,
|
|
45, 46, 48, 65, 0, 0, 0, 65, 65, 65,
|
|
11, 65, 65, 65, 65, 65, 65, 0, 65, 0,
|
|
|
|
0, 65, 65, 26, 65, 65, 65, 65, 65, 65,
|
|
38, 65, 65, 49, 0, 0, 65, 65, 65, 13,
|
|
65, 16, 65, 0, 65, 65, 0, 53, 0, 0,
|
|
0, 0, 25, 65, 65, 30, 65, 65, 36, 0,
|
|
65, 65, 0, 65, 0, 65, 14, 65, 0, 0,
|
|
65, 0, 0, 54, 0, 0, 0, 0, 0, 65,
|
|
65, 65, 65, 0, 0, 0, 65, 65, 65, 0,
|
|
0, 0, 65, 65, 65, 0, 55, 0, 0, 0,
|
|
65, 0, 0, 0, 0, 0, 61, 0, 0, 65,
|
|
65, 65, 33, 0, 0, 0, 0, 63, 0, 0,
|
|
|
|
65, 65, 40, 0, 0, 0, 0, 62, 0, 0,
|
|
65, 65, 65, 0, 0, 56, 0, 0, 21, 0,
|
|
28, 65, 32, 0, 65, 42, 0, 7, 15, 18,
|
|
0, 65, 65, 29, 41, 0
|
|
} ;
|
|
|
|
static yyconst YY_CHAR yy_ec[256] =
|
|
{ 0,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 2, 1, 4, 5, 1, 1, 1, 1, 1,
|
|
1, 1, 6, 1, 7, 8, 8, 9, 10, 10,
|
|
10, 10, 10, 10, 10, 11, 11, 12, 1, 1,
|
|
13, 1, 1, 1, 14, 14, 14, 14, 14, 14,
|
|
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
|
15, 15, 15, 15, 15, 15, 15, 16, 15, 15,
|
|
1, 17, 1, 1, 15, 1, 18, 19, 20, 21,
|
|
|
|
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
|
32, 33, 15, 34, 35, 36, 37, 38, 39, 40,
|
|
41, 42, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 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 YY_CHAR yy_meta[44] =
|
|
{ 0,
|
|
1, 2, 3, 4, 5, 1, 6, 7, 8, 8,
|
|
8, 1, 1, 9, 9, 9, 1, 9, 9, 9,
|
|
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
|
|
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
|
|
9, 9, 1
|
|
} ;
|
|
|
|
static yyconst flex_uint16_t yy_base[470] =
|
|
{ 0,
|
|
0, 0, 41, 42, 924, 1387, 920, 885, 42, 0,
|
|
871, 0, 39, 42, 869, 49, 53, 58, 65, 63,
|
|
67, 73, 85, 75, 96, 102, 104, 111, 118, 125,
|
|
113, 120, 123, 1387, 1387, 1387, 47, 855, 859, 1387,
|
|
90, 1387, 849, 0, 1387, 0, 0, 130, 830, 150,
|
|
166, 1387, 0, 136, 145, 148, 155, 171, 173, 175,
|
|
178, 181, 185, 187, 191, 194, 203, 209, 217, 219,
|
|
221, 225, 227, 229, 235, 237, 242, 244, 251, 254,
|
|
256, 258, 263, 265, 268, 274, 276, 278, 281, 51,
|
|
807, 84, 1387, 0, 283, 285, 293, 289, 297, 299,
|
|
|
|
307, 313, 315, 317, 319, 321, 327, 325, 338, 346,
|
|
348, 350, 354, 356, 358, 360, 366, 369, 373, 375,
|
|
379, 385, 391, 389, 396, 402, 408, 410, 412, 416,
|
|
418, 420, 427, 425, 429, 432, 795, 791, 782, 769,
|
|
766, 436, 438, 444, 451, 455, 460, 462, 464, 466,
|
|
468, 471, 473, 475, 483, 496, 505, 507, 512, 514,
|
|
516, 518, 521, 524, 526, 528, 530, 532, 537, 540,
|
|
543, 546, 552, 555, 557, 560, 564, 569, 576, 566,
|
|
581, 583, 586, 591, 595, 597, 600, 169, 608, 750,
|
|
734, 729, 607, 609, 611, 613, 617, 621, 623, 626,
|
|
|
|
629, 631, 635, 640, 645, 648, 650, 652, 657, 670,
|
|
1387, 742, 674, 691, 676, 678, 685, 681, 687, 683,
|
|
689, 691, 693, 695, 702, 705, 707, 709, 711, 713,
|
|
717, 722, 724, 726, 730, 732, 734, 736, 742, 701,
|
|
686, 750, 703, 657, 752, 754, 760, 764, 768, 770,
|
|
772, 775, 777, 782, 785, 789, 791, 793, 668, 800,
|
|
1387, 665, 625, 659, 802, 799, 804, 809, 815, 817,
|
|
819, 822, 319, 824, 826, 828, 832, 834, 837, 839,
|
|
841, 843, 850, 852, 631, 627, 638, 857, 859, 861,
|
|
863, 865, 867, 869, 605, 878, 882, 623, 587, 889,
|
|
|
|
607, 891, 889, 893, 899, 901, 895, 568, 567, 904,
|
|
906, 908, 184, 910, 553, 523, 912, 921, 503, 924,
|
|
926, 929, 498, 509, 936, 473, 937, 1387, 502, 943,
|
|
947, 490, 946, 948, 952, 954, 459, 467, 956, 577,
|
|
455, 428, 453, 958, 761, 427, 960, 423, 967, 439,
|
|
407, 411, 971, 1387, 402, 980, 203, 984, 988, 970,
|
|
986, 369, 354, 236, 995, 1000, 331, 327, 998, 367,
|
|
1008, 1012, 314, 1010, 298, 1019, 1387, 313, 1023, 1028,
|
|
280, 305, 385, 1032, 299, 1037, 1387, 276, 1041, 1040,
|
|
1042, 232, 0, 390, 1049, 243, 1053, 1387, 227, 1057,
|
|
|
|
188, 167, 1056, 483, 1063, 193, 1067, 1387, 164, 1074,
|
|
140, 1073, 114, 138, 1080, 1387, 133, 1084, 0, 110,
|
|
1083, 1085, 0, 85, 49, 0, 59, 0, 1087, 0,
|
|
55, 1089, 32, 1091, 0, 1387, 1124, 1133, 1142, 1146,
|
|
1149, 1153, 1157, 1166, 1175, 1183, 1191, 1199, 1207, 1216,
|
|
1224, 1232, 1240, 1248, 1256, 1264, 1273, 1282, 1290, 1299,
|
|
1307, 1316, 1324, 1333, 1341, 1350, 1359, 1368, 1377
|
|
} ;
|
|
|
|
static yyconst flex_int16_t yy_def[470] =
|
|
{ 0,
|
|
436, 1, 437, 437, 436, 436, 436, 436, 438, 439,
|
|
436, 440, 441, 441, 436, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 436, 436, 436, 436, 436, 436, 436,
|
|
438, 436, 438, 439, 436, 440, 440, 441, 441, 441,
|
|
441, 436, 443, 442, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 442, 442, 442, 436,
|
|
436, 436, 436, 50, 442, 442, 442, 442, 442, 442,
|
|
|
|
442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 436, 436, 436, 436,
|
|
436, 442, 442, 442, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 442, 436, 436, 436,
|
|
436, 436, 442, 442, 442, 442, 442, 442, 442, 442,
|
|
|
|
442, 442, 442, 442, 442, 442, 442, 442, 442, 436,
|
|
436, 444, 442, 443, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 442, 442, 442, 436,
|
|
436, 436, 436, 436, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 442, 442, 442, 442, 444, 436,
|
|
436, 445, 443, 446, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 443, 442, 442, 442, 442, 442, 442, 442,
|
|
442, 442, 442, 442, 436, 436, 436, 442, 442, 442,
|
|
442, 442, 442, 442, 443, 442, 442, 445, 443, 447,
|
|
|
|
448, 442, 442, 442, 442, 442, 442, 443, 443, 442,
|
|
442, 442, 443, 442, 436, 436, 442, 442, 443, 442,
|
|
442, 442, 443, 449, 442, 443, 436, 436, 450, 447,
|
|
451, 452, 442, 442, 442, 442, 443, 443, 442, 453,
|
|
443, 443, 436, 442, 454, 443, 442, 443, 455, 456,
|
|
443, 450, 436, 436, 457, 451, 458, 459, 452, 442,
|
|
442, 443, 443, 460, 461, 453, 443, 443, 442, 462,
|
|
463, 454, 443, 442, 443, 436, 436, 464, 455, 465,
|
|
443, 457, 458, 436, 458, 436, 436, 466, 459, 442,
|
|
442, 443, 443, 460, 436, 460, 436, 436, 467, 461,
|
|
|
|
443, 443, 442, 462, 436, 462, 436, 436, 468, 463,
|
|
443, 442, 443, 464, 436, 436, 469, 465, 443, 466,
|
|
442, 442, 443, 467, 443, 443, 468, 443, 442, 443,
|
|
469, 442, 443, 442, 443, 0, 436, 436, 436, 436,
|
|
436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
|
|
436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
|
|
436, 436, 436, 436, 436, 436, 436, 436, 436
|
|
} ;
|
|
|
|
static yyconst flex_uint16_t yy_nxt[1431] =
|
|
{ 0,
|
|
6, 7, 8, 9, 10, 11, 6, 12, 13, 14,
|
|
14, 15, 6, 16, 16, 16, 6, 17, 18, 19,
|
|
20, 21, 22, 16, 16, 23, 16, 16, 24, 25,
|
|
26, 27, 28, 29, 30, 31, 16, 32, 33, 16,
|
|
16, 16, 34, 36, 36, 42, 47, 48, 48, 47,
|
|
51, 51, 51, 435, 50, 53, 47, 416, 43, 53,
|
|
47, 408, 37, 37, 53, 47, 38, 38, 433, 53,
|
|
47, 53, 47, 53, 47, 90, 137, 91, 50, 53,
|
|
47, 53, 47, 55, 62, 138, 57, 398, 56, 59,
|
|
60, 53, 47, 93, 58, 64, 61, 65, 66, 63,
|
|
|
|
72, 67, 53, 47, 140, 68, 43, 69, 53, 47,
|
|
53, 47, 387, 73, 141, 70, 71, 53, 47, 53,
|
|
47, 74, 77, 75, 53, 47, 53, 47, 80, 53,
|
|
47, 53, 47, 76, 78, 416, 79, 47, 48, 48,
|
|
377, 88, 53, 47, 81, 82, 84, 430, 89, 83,
|
|
85, 53, 47, 87, 53, 47, 86, 47, 94, 94,
|
|
94, 53, 47, 94, 428, 95, 408, 94, 94, 94,
|
|
94, 94, 94, 47, 51, 51, 51, 53, 47, 53,
|
|
47, 53, 47, 96, 53, 47, 97, 53, 47, 240,
|
|
99, 53, 47, 53, 47, 436, 98, 53, 47, 241,
|
|
|
|
53, 47, 426, 103, 341, 100, 384, 101, 102, 53,
|
|
47, 108, 106, 425, 105, 53, 47, 342, 104, 385,
|
|
110, 107, 109, 53, 47, 53, 47, 53, 47, 398,
|
|
111, 53, 47, 53, 47, 53, 47, 112, 114, 395,
|
|
115, 53, 47, 53, 47, 436, 117, 113, 53, 47,
|
|
53, 47, 396, 118, 119, 116, 122, 53, 47, 121,
|
|
53, 47, 53, 47, 53, 47, 120, 423, 123, 53,
|
|
47, 53, 47, 126, 53, 47, 124, 127, 387, 128,
|
|
53, 47, 53, 47, 53, 47, 125, 53, 47, 53,
|
|
47, 53, 47, 130, 129, 53, 47, 134, 131, 53,
|
|
|
|
47, 436, 142, 53, 47, 53, 47, 354, 133, 419,
|
|
132, 135, 143, 53, 47, 377, 136, 144, 146, 53,
|
|
47, 53, 47, 53, 47, 53, 47, 53, 47, 413,
|
|
145, 53, 47, 53, 47, 148, 153, 149, 308, 147,
|
|
150, 309, 154, 156, 53, 47, 151, 152, 157, 411,
|
|
158, 155, 53, 47, 53, 47, 53, 47, 402, 159,
|
|
53, 47, 53, 47, 53, 47, 53, 47, 401, 160,
|
|
405, 162, 53, 47, 163, 53, 47, 393, 161, 53,
|
|
47, 53, 47, 406, 164, 53, 47, 166, 384, 165,
|
|
167, 53, 47, 395, 169, 53, 47, 53, 47, 392,
|
|
|
|
168, 385, 53, 47, 354, 173, 396, 170, 53, 47,
|
|
172, 171, 174, 328, 53, 47, 53, 47, 53, 47,
|
|
175, 176, 53, 47, 53, 47, 53, 47, 381, 177,
|
|
178, 53, 47, 53, 47, 53, 47, 181, 53, 47,
|
|
350, 182, 53, 47, 53, 47, 179, 180, 184, 375,
|
|
53, 47, 373, 183, 350, 193, 187, 53, 47, 368,
|
|
185, 53, 47, 186, 195, 194, 53, 47, 53, 47,
|
|
53, 47, 53, 47, 53, 47, 367, 53, 47, 53,
|
|
47, 53, 47, 196, 363, 197, 405, 198, 203, 53,
|
|
47, 332, 199, 357, 206, 362, 201, 358, 200, 406,
|
|
|
|
202, 205, 53, 47, 328, 204, 210, 211, 351, 212,
|
|
324, 53, 47, 53, 47, 348, 208, 207, 214, 47,
|
|
53, 47, 53, 47, 53, 47, 209, 53, 47, 213,
|
|
53, 47, 53, 47, 53, 47, 53, 47, 53, 47,
|
|
217, 346, 218, 53, 47, 343, 53, 47, 215, 53,
|
|
47, 216, 53, 47, 324, 222, 220, 225, 53, 47,
|
|
219, 53, 47, 53, 47, 223, 53, 47, 224, 221,
|
|
53, 47, 53, 47, 229, 53, 47, 226, 340, 227,
|
|
364, 232, 53, 47, 365, 230, 228, 53, 47, 53,
|
|
47, 231, 53, 47, 233, 338, 234, 53, 47, 337,
|
|
|
|
235, 53, 47, 53, 47, 237, 53, 47, 301, 210,
|
|
211, 236, 212, 53, 47, 53, 47, 53, 47, 53,
|
|
47, 326, 239, 53, 47, 261, 238, 53, 47, 53,
|
|
47, 245, 53, 47, 323, 53, 47, 53, 47, 301,
|
|
250, 53, 47, 246, 249, 248, 53, 47, 316, 247,
|
|
251, 53, 47, 315, 53, 47, 53, 47, 53, 47,
|
|
264, 254, 255, 53, 47, 299, 252, 261, 253, 256,
|
|
211, 210, 211, 257, 212, 260, 261, 258, 262, 287,
|
|
53, 47, 53, 47, 53, 47, 264, 53, 47, 53,
|
|
47, 53, 47, 53, 47, 53, 47, 53, 47, 53,
|
|
|
|
47, 53, 47, 265, 264, 267, 286, 266, 53, 47,
|
|
268, 53, 47, 53, 47, 273, 47, 53, 47, 53,
|
|
47, 269, 285, 53, 47, 263, 272, 270, 53, 47,
|
|
53, 47, 53, 47, 275, 271, 53, 47, 53, 47,
|
|
53, 47, 53, 47, 211, 277, 274, 276, 53, 47,
|
|
244, 260, 261, 281, 262, 282, 243, 279, 53, 47,
|
|
53, 47, 345, 278, 370, 280, 53, 47, 371, 283,
|
|
53, 47, 242, 284, 53, 47, 53, 47, 53, 47,
|
|
289, 53, 47, 53, 47, 290, 192, 288, 53, 47,
|
|
191, 53, 47, 291, 292, 295, 47, 53, 47, 53,
|
|
|
|
47, 260, 261, 301, 262, 53, 47, 190, 53, 47,
|
|
53, 47, 189, 296, 297, 53, 47, 188, 293, 294,
|
|
302, 53, 47, 53, 47, 53, 47, 139, 53, 47,
|
|
53, 47, 53, 47, 53, 47, 304, 47, 53, 47,
|
|
53, 47, 303, 313, 47, 53, 47, 53, 47, 53,
|
|
47, 436, 305, 312, 306, 307, 53, 47, 53, 47,
|
|
39, 310, 311, 53, 47, 53, 47, 319, 47, 53,
|
|
47, 53, 47, 53, 47, 53, 47, 92, 317, 324,
|
|
318, 52, 314, 45, 53, 47, 40, 321, 53, 47,
|
|
327, 328, 332, 329, 320, 53, 47, 53, 47, 53,
|
|
|
|
47, 53, 47, 322, 325, 53, 47, 53, 47, 340,
|
|
53, 47, 53, 47, 53, 47, 53, 47, 53, 47,
|
|
333, 39, 345, 436, 334, 339, 335, 53, 47, 336,
|
|
53, 47, 53, 47, 344, 53, 47, 350, 327, 328,
|
|
436, 329, 53, 47, 327, 328, 436, 329, 353, 354,
|
|
436, 355, 53, 47, 53, 47, 436, 347, 53, 47,
|
|
53, 47, 53, 47, 53, 47, 53, 47, 376, 377,
|
|
436, 378, 353, 354, 436, 355, 53, 47, 436, 360,
|
|
374, 353, 354, 369, 355, 386, 387, 361, 388, 436,
|
|
436, 436, 53, 47, 436, 358, 397, 398, 436, 399,
|
|
|
|
390, 436, 436, 436, 53, 47, 436, 365, 436, 407,
|
|
408, 391, 409, 436, 436, 436, 53, 47, 436, 371,
|
|
376, 377, 436, 378, 376, 377, 436, 378, 436, 415,
|
|
416, 412, 417, 386, 387, 436, 388, 403, 386, 387,
|
|
436, 388, 386, 387, 436, 388, 53, 47, 53, 47,
|
|
397, 398, 436, 399, 397, 398, 436, 399, 397, 398,
|
|
436, 399, 53, 47, 407, 408, 436, 409, 407, 408,
|
|
436, 409, 436, 422, 421, 407, 408, 436, 409, 53,
|
|
47, 415, 416, 436, 417, 415, 416, 436, 417, 53,
|
|
47, 53, 47, 53, 47, 53, 47, 53, 47, 436,
|
|
|
|
436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
|
|
429, 436, 436, 436, 436, 432, 436, 436, 436, 436,
|
|
436, 436, 436, 434, 35, 35, 35, 35, 35, 35,
|
|
35, 35, 35, 41, 41, 41, 41, 41, 41, 41,
|
|
41, 41, 44, 44, 436, 44, 44, 44, 44, 44,
|
|
44, 46, 46, 46, 46, 49, 49, 49, 54, 54,
|
|
54, 54, 53, 436, 53, 53, 259, 259, 259, 259,
|
|
259, 259, 259, 259, 259, 298, 298, 298, 298, 298,
|
|
298, 298, 298, 298, 300, 436, 436, 436, 436, 436,
|
|
436, 300, 330, 330, 436, 330, 330, 436, 330, 330,
|
|
|
|
331, 436, 436, 436, 436, 436, 436, 331, 349, 436,
|
|
436, 436, 436, 436, 436, 349, 352, 352, 352, 352,
|
|
352, 352, 352, 352, 352, 356, 356, 436, 356, 356,
|
|
436, 356, 356, 359, 436, 359, 436, 436, 359, 359,
|
|
359, 366, 436, 366, 436, 436, 366, 366, 366, 372,
|
|
436, 372, 436, 436, 372, 372, 372, 379, 379, 436,
|
|
379, 379, 436, 379, 379, 380, 436, 436, 436, 436,
|
|
436, 436, 380, 382, 382, 382, 382, 382, 382, 382,
|
|
382, 382, 383, 383, 383, 383, 383, 383, 383, 383,
|
|
383, 389, 389, 436, 389, 389, 389, 389, 389, 394,
|
|
|
|
394, 394, 394, 394, 394, 394, 394, 394, 400, 400,
|
|
436, 400, 400, 400, 400, 400, 404, 404, 404, 404,
|
|
404, 404, 404, 404, 404, 410, 410, 436, 410, 410,
|
|
410, 410, 410, 414, 414, 414, 414, 414, 414, 414,
|
|
414, 414, 418, 418, 436, 418, 418, 436, 418, 418,
|
|
420, 420, 420, 420, 420, 420, 420, 420, 420, 424,
|
|
424, 424, 424, 424, 424, 424, 424, 424, 427, 427,
|
|
427, 427, 427, 427, 427, 427, 427, 431, 431, 431,
|
|
431, 431, 431, 431, 431, 431, 5, 436, 436, 436,
|
|
436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
|
|
|
|
436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
|
|
436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
|
|
436, 436, 436, 436, 436, 436, 436, 436, 436, 436
|
|
} ;
|
|
|
|
static yyconst flex_int16_t yy_chk[1431] =
|
|
{ 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, 3, 4, 9, 13, 13, 13, 14,
|
|
14, 14, 14, 433, 13, 16, 16, 431, 9, 17,
|
|
17, 427, 3, 4, 18, 18, 3, 4, 425, 20,
|
|
20, 19, 19, 21, 21, 37, 90, 37, 13, 22,
|
|
22, 24, 24, 17, 20, 90, 18, 424, 17, 19,
|
|
19, 23, 23, 41, 18, 21, 19, 21, 22, 20,
|
|
|
|
24, 22, 25, 25, 92, 23, 41, 23, 26, 26,
|
|
27, 27, 420, 25, 92, 23, 23, 28, 28, 31,
|
|
31, 25, 27, 26, 29, 29, 32, 32, 28, 33,
|
|
33, 30, 30, 26, 27, 417, 27, 48, 48, 48,
|
|
414, 32, 54, 54, 28, 28, 30, 413, 33, 29,
|
|
30, 55, 55, 31, 56, 56, 30, 50, 50, 50,
|
|
50, 57, 57, 50, 411, 55, 409, 50, 50, 50,
|
|
50, 50, 50, 51, 51, 51, 51, 58, 58, 59,
|
|
59, 60, 60, 56, 61, 61, 57, 62, 62, 188,
|
|
59, 63, 63, 64, 64, 406, 58, 65, 65, 188,
|
|
|
|
66, 66, 402, 62, 313, 60, 357, 61, 61, 67,
|
|
67, 65, 64, 401, 63, 68, 68, 313, 62, 357,
|
|
67, 64, 66, 69, 69, 70, 70, 71, 71, 399,
|
|
68, 72, 72, 73, 73, 74, 74, 69, 70, 364,
|
|
71, 75, 75, 76, 76, 396, 73, 69, 77, 77,
|
|
78, 78, 364, 73, 73, 72, 75, 79, 79, 74,
|
|
80, 80, 81, 81, 82, 82, 73, 392, 77, 83,
|
|
83, 84, 84, 80, 85, 85, 77, 81, 388, 82,
|
|
86, 86, 87, 87, 88, 88, 79, 89, 89, 95,
|
|
95, 96, 96, 84, 83, 98, 98, 88, 85, 97,
|
|
|
|
97, 385, 96, 99, 99, 100, 100, 382, 87, 381,
|
|
86, 88, 97, 101, 101, 378, 89, 98, 100, 102,
|
|
102, 103, 103, 104, 104, 105, 105, 106, 106, 375,
|
|
99, 108, 108, 107, 107, 102, 104, 103, 273, 101,
|
|
103, 273, 104, 106, 109, 109, 103, 103, 107, 373,
|
|
108, 105, 110, 110, 111, 111, 112, 112, 368, 109,
|
|
113, 113, 114, 114, 115, 115, 116, 116, 367, 110,
|
|
370, 112, 117, 117, 113, 118, 118, 363, 111, 119,
|
|
119, 120, 120, 370, 114, 121, 121, 116, 383, 115,
|
|
117, 122, 122, 394, 119, 124, 124, 123, 123, 362,
|
|
|
|
118, 383, 125, 125, 355, 122, 394, 120, 126, 126,
|
|
121, 120, 123, 352, 127, 127, 128, 128, 129, 129,
|
|
124, 125, 130, 130, 131, 131, 132, 132, 351, 126,
|
|
127, 134, 134, 133, 133, 135, 135, 130, 136, 136,
|
|
350, 131, 142, 142, 143, 143, 128, 129, 133, 348,
|
|
144, 144, 346, 132, 343, 142, 136, 145, 145, 342,
|
|
134, 146, 146, 135, 144, 143, 147, 147, 148, 148,
|
|
149, 149, 150, 150, 151, 151, 341, 152, 152, 153,
|
|
153, 154, 154, 146, 338, 147, 404, 148, 152, 155,
|
|
155, 332, 149, 332, 154, 337, 150, 332, 149, 404,
|
|
|
|
151, 153, 156, 156, 329, 152, 157, 157, 326, 157,
|
|
324, 157, 157, 158, 158, 323, 156, 155, 159, 159,
|
|
160, 160, 161, 161, 162, 162, 156, 163, 163, 158,
|
|
164, 164, 165, 165, 166, 166, 167, 167, 168, 168,
|
|
162, 319, 163, 169, 169, 316, 170, 170, 160, 171,
|
|
171, 161, 172, 172, 315, 167, 165, 170, 173, 173,
|
|
164, 174, 174, 175, 175, 168, 176, 176, 169, 166,
|
|
177, 177, 180, 180, 174, 178, 178, 171, 340, 172,
|
|
340, 177, 179, 179, 340, 175, 173, 181, 181, 182,
|
|
182, 176, 183, 183, 178, 309, 179, 184, 184, 308,
|
|
|
|
181, 185, 185, 186, 186, 183, 187, 187, 301, 189,
|
|
189, 182, 189, 193, 193, 194, 194, 195, 195, 196,
|
|
196, 299, 186, 197, 197, 298, 185, 198, 198, 199,
|
|
199, 193, 200, 200, 295, 201, 201, 202, 202, 287,
|
|
199, 203, 203, 195, 198, 197, 204, 204, 286, 196,
|
|
201, 205, 205, 285, 206, 206, 207, 207, 208, 208,
|
|
264, 204, 205, 209, 209, 263, 202, 262, 203, 206,
|
|
259, 210, 210, 208, 210, 213, 213, 209, 213, 244,
|
|
213, 213, 215, 215, 216, 216, 217, 218, 218, 220,
|
|
220, 217, 217, 219, 219, 221, 221, 222, 222, 223,
|
|
|
|
223, 224, 224, 218, 243, 220, 241, 219, 225, 225,
|
|
221, 226, 226, 227, 227, 228, 228, 229, 229, 230,
|
|
230, 222, 240, 231, 231, 214, 226, 224, 232, 232,
|
|
233, 233, 234, 234, 230, 225, 235, 235, 236, 236,
|
|
237, 237, 238, 238, 212, 232, 229, 231, 239, 239,
|
|
192, 242, 242, 236, 242, 237, 191, 234, 245, 245,
|
|
246, 246, 345, 233, 345, 235, 247, 247, 345, 238,
|
|
248, 248, 190, 239, 249, 249, 250, 250, 251, 251,
|
|
247, 252, 252, 253, 253, 248, 141, 246, 254, 254,
|
|
140, 255, 255, 250, 253, 256, 256, 257, 257, 258,
|
|
|
|
258, 260, 260, 265, 260, 266, 266, 139, 265, 265,
|
|
267, 267, 138, 257, 258, 268, 268, 137, 254, 255,
|
|
266, 269, 269, 270, 270, 271, 271, 91, 272, 272,
|
|
274, 274, 275, 275, 276, 276, 269, 49, 277, 277,
|
|
278, 278, 268, 279, 279, 280, 280, 281, 281, 282,
|
|
282, 43, 270, 277, 271, 272, 283, 283, 284, 284,
|
|
39, 275, 276, 288, 288, 289, 289, 290, 290, 291,
|
|
291, 292, 292, 293, 293, 294, 294, 38, 288, 296,
|
|
289, 15, 284, 11, 296, 296, 8, 293, 297, 297,
|
|
300, 300, 302, 300, 292, 303, 303, 302, 302, 304,
|
|
|
|
304, 307, 307, 294, 297, 305, 305, 306, 306, 312,
|
|
310, 310, 311, 311, 312, 312, 314, 314, 317, 317,
|
|
303, 7, 318, 5, 305, 310, 306, 318, 318, 307,
|
|
320, 320, 321, 321, 317, 322, 322, 325, 327, 327,
|
|
0, 327, 325, 325, 330, 330, 0, 330, 331, 331,
|
|
0, 331, 333, 333, 334, 334, 0, 321, 335, 335,
|
|
336, 336, 339, 339, 344, 344, 347, 347, 349, 349,
|
|
0, 349, 353, 353, 0, 353, 360, 360, 0, 334,
|
|
347, 356, 356, 344, 356, 358, 358, 335, 358, 359,
|
|
0, 359, 361, 361, 0, 359, 365, 365, 0, 365,
|
|
|
|
360, 366, 0, 366, 369, 369, 0, 366, 0, 371,
|
|
371, 361, 371, 372, 0, 372, 374, 374, 0, 372,
|
|
376, 376, 0, 376, 379, 379, 0, 379, 0, 380,
|
|
380, 374, 380, 384, 384, 0, 384, 369, 386, 386,
|
|
0, 386, 389, 389, 0, 389, 390, 390, 391, 391,
|
|
395, 395, 0, 395, 397, 397, 0, 397, 400, 400,
|
|
0, 400, 403, 403, 405, 405, 0, 405, 407, 407,
|
|
0, 407, 0, 391, 390, 410, 410, 0, 410, 412,
|
|
412, 415, 415, 0, 415, 418, 418, 0, 418, 421,
|
|
421, 422, 422, 429, 429, 432, 432, 434, 434, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
412, 0, 0, 0, 0, 422, 0, 0, 0, 0,
|
|
0, 0, 0, 432, 437, 437, 437, 437, 437, 437,
|
|
437, 437, 437, 438, 438, 438, 438, 438, 438, 438,
|
|
438, 438, 439, 439, 0, 439, 439, 439, 439, 439,
|
|
439, 440, 440, 440, 440, 441, 441, 441, 442, 442,
|
|
442, 442, 443, 0, 443, 443, 444, 444, 444, 444,
|
|
444, 444, 444, 444, 444, 445, 445, 445, 445, 445,
|
|
445, 445, 445, 445, 446, 0, 0, 0, 0, 0,
|
|
0, 446, 447, 447, 0, 447, 447, 0, 447, 447,
|
|
|
|
448, 0, 0, 0, 0, 0, 0, 448, 449, 0,
|
|
0, 0, 0, 0, 0, 449, 450, 450, 450, 450,
|
|
450, 450, 450, 450, 450, 451, 451, 0, 451, 451,
|
|
0, 451, 451, 452, 0, 452, 0, 0, 452, 452,
|
|
452, 453, 0, 453, 0, 0, 453, 453, 453, 454,
|
|
0, 454, 0, 0, 454, 454, 454, 455, 455, 0,
|
|
455, 455, 0, 455, 455, 456, 0, 0, 0, 0,
|
|
0, 0, 456, 457, 457, 457, 457, 457, 457, 457,
|
|
457, 457, 458, 458, 458, 458, 458, 458, 458, 458,
|
|
458, 459, 459, 0, 459, 459, 459, 459, 459, 460,
|
|
|
|
460, 460, 460, 460, 460, 460, 460, 460, 461, 461,
|
|
0, 461, 461, 461, 461, 461, 462, 462, 462, 462,
|
|
462, 462, 462, 462, 462, 463, 463, 0, 463, 463,
|
|
463, 463, 463, 464, 464, 464, 464, 464, 464, 464,
|
|
464, 464, 465, 465, 0, 465, 465, 0, 465, 465,
|
|
466, 466, 466, 466, 466, 466, 466, 466, 466, 467,
|
|
467, 467, 467, 467, 467, 467, 467, 467, 468, 468,
|
|
468, 468, 468, 468, 468, 468, 468, 469, 469, 469,
|
|
469, 469, 469, 469, 469, 469, 436, 436, 436, 436,
|
|
436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
|
|
|
|
436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
|
|
436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
|
|
436, 436, 436, 436, 436, 436, 436, 436, 436, 436
|
|
} ;
|
|
|
|
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 "scan.l"
|
|
#line 2 "scan.l"
|
|
/* $NetBSD: scan.l,v 1.25 2015/09/04 10:16:35 uebayasi Exp $ */
|
|
|
|
/*
|
|
* Copyright (c) 1992, 1993
|
|
* The Regents of the University of California. All rights reserved.
|
|
*
|
|
* This software was developed by the Computer Systems Engineering group
|
|
* at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
|
|
* contributed to Berkeley.
|
|
*
|
|
* All advertising materials mentioning features or use of this software
|
|
* must display the following acknowledgement:
|
|
* This product includes software developed by the University of
|
|
* California, Lawrence Berkeley Laboratories.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer.
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
* documentation and/or other materials provided with the distribution.
|
|
* 3. Neither the name of the University nor the names of its contributors
|
|
* may be used to endorse or promote products derived from this software
|
|
* without specific prior written permission.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
* SUCH DAMAGE.
|
|
*
|
|
* from: @(#)scan.l 8.1 (Berkeley) 6/6/93
|
|
*/
|
|
|
|
#include <sys/cdefs.h>
|
|
__RCSID("$NetBSD: scan.l,v 1.25 2015/09/04 10:16:35 uebayasi Exp $");
|
|
|
|
#include <sys/param.h>
|
|
#include <errno.h>
|
|
#include <libgen.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
#include <stddef.h>
|
|
#include <ctype.h>
|
|
#include <util.h>
|
|
#undef ECHO
|
|
#include "defs.h"
|
|
#include "gram.h"
|
|
|
|
int yyline;
|
|
const char *yyfile;
|
|
const char *lastfile;
|
|
char curinclpath[PATH_MAX];
|
|
int ifdefstate = -1;
|
|
int st;
|
|
#define IDS_PARENT_DISABLED \
|
|
((ifdefstate > 6) && ((((ifdefstate/6)-1) & 1) == 1))
|
|
#define IDS_MAX_DEPTH 362797056 /* 6^11 */
|
|
/* States for ifdefstate:
|
|
|
|
0 -> matched ifdef
|
|
1 -> unmatched ifdef
|
|
2 -> matched elifdef
|
|
3 -> unmatched elifdef
|
|
4 -> matched else
|
|
5 -> unmatched else
|
|
|
|
Upon "ifdef", add one and multiply by 6.
|
|
Upon "endif", divide by 6, remove 1.
|
|
|
|
ifdef -> MATCH => continue
|
|
MISMATCH => set to 1
|
|
elifdef -> if (!1) -> MISMATCH
|
|
MATCH => set to 2
|
|
MISMATCH => if (2 || 3) set to 3, else set to 1
|
|
else -> if (1) -> MATCH
|
|
MATCH => set to 4
|
|
MISMATCH => set to 5
|
|
|
|
in each case, if parent & 1 == 1, MISMATCH
|
|
*/
|
|
|
|
/*
|
|
* Data for returning to previous files from include files.
|
|
*/
|
|
struct incl {
|
|
struct incl *in_prev; /* previous includes in effect, if any */
|
|
YY_BUFFER_STATE in_buf; /* previous lex state */
|
|
const char *in_fname; /* previous file name */
|
|
int in_lineno; /* previous line number */
|
|
int in_ateof; /* token to insert at EOF */
|
|
int in_interesting; /* previous value for "interesting" */
|
|
int in_ifdefstate; /* conditional level */
|
|
};
|
|
static struct incl *incl;
|
|
static int endinclude(void);
|
|
static int getincludepath(void);
|
|
static int getcurifdef(void);
|
|
|
|
|
|
#define YY_NO_INPUT 1
|
|
|
|
#line 1039 "scan.c"
|
|
|
|
#define INITIAL 0
|
|
#define IGNORED 1
|
|
|
|
#ifndef YY_NO_UNISTD_H
|
|
/* Special case for "unistd.h", since it is non-ANSI. We include it way
|
|
* down here because we want the user's section 1 to have been scanned first.
|
|
* The user has a chance to override it with an option.
|
|
*/
|
|
#include <unistd.h>
|
|
#endif
|
|
|
|
#ifndef YY_EXTRA_TYPE
|
|
#define YY_EXTRA_TYPE void *
|
|
#endif
|
|
|
|
static int yy_init_globals (void );
|
|
|
|
/* Accessor methods to globals.
|
|
These are made visible to non-reentrant scanners for convenience. */
|
|
|
|
int yylex_destroy (void );
|
|
|
|
int yyget_debug (void );
|
|
|
|
void yyset_debug (int debug_flag );
|
|
|
|
YY_EXTRA_TYPE yyget_extra (void );
|
|
|
|
void yyset_extra (YY_EXTRA_TYPE user_defined );
|
|
|
|
FILE *yyget_in (void );
|
|
|
|
void yyset_in (FILE * _in_str );
|
|
|
|
FILE *yyget_out (void );
|
|
|
|
void yyset_out (FILE * _out_str );
|
|
|
|
yy_size_t yyget_leng (void );
|
|
|
|
char *yyget_text (void );
|
|
|
|
int yyget_lineno (void );
|
|
|
|
void yyset_lineno (int _line_number );
|
|
|
|
/* Macros after this point can all be overridden by user definitions in
|
|
* section 1.
|
|
*/
|
|
|
|
#ifndef YY_SKIP_YYWRAP
|
|
#ifdef __cplusplus
|
|
extern "C" int yywrap (void );
|
|
#else
|
|
extern int yywrap (void );
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef YY_NO_UNPUT
|
|
|
|
#endif
|
|
|
|
#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 do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
|
|
#endif
|
|
|
|
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
|
* is returned in "result".
|
|
*/
|
|
#ifndef YY_INPUT
|
|
#define YY_INPUT(buf,result,max_size) \
|
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
|
{ \
|
|
int c = '*'; \
|
|
size_t n; \
|
|
for ( n = 0; n < max_size && \
|
|
(c = getc( 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 /*LINTED*/break;
|
|
#endif
|
|
|
|
#define YY_RULE_SETUP \
|
|
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;
|
|
|
|
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( );
|
|
}
|
|
|
|
{
|
|
#line 124 "scan.l"
|
|
|
|
/* Local variables for yylex() */
|
|
int tok;
|
|
|
|
#line 1256 "scan.c"
|
|
|
|
while (/*CONSTCOND*/ 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_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 >= 437 )
|
|
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] != 1387 );
|
|
|
|
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 128 "scan.l"
|
|
return AND;
|
|
YY_BREAK
|
|
case 2:
|
|
YY_RULE_SETUP
|
|
#line 129 "scan.l"
|
|
return AT;
|
|
YY_BREAK
|
|
case 3:
|
|
YY_RULE_SETUP
|
|
#line 130 "scan.l"
|
|
return ATTACH;
|
|
YY_BREAK
|
|
case 4:
|
|
YY_RULE_SETUP
|
|
#line 131 "scan.l"
|
|
return BLOCK;
|
|
YY_BREAK
|
|
case 5:
|
|
YY_RULE_SETUP
|
|
#line 132 "scan.l"
|
|
return BUILD;
|
|
YY_BREAK
|
|
case 6:
|
|
YY_RULE_SETUP
|
|
#line 133 "scan.l"
|
|
return CHAR;
|
|
YY_BREAK
|
|
case 7:
|
|
YY_RULE_SETUP
|
|
#line 134 "scan.l"
|
|
return COMPILE_WITH;
|
|
YY_BREAK
|
|
case 8:
|
|
YY_RULE_SETUP
|
|
#line 135 "scan.l"
|
|
return CONFIG;
|
|
YY_BREAK
|
|
case 9:
|
|
YY_RULE_SETUP
|
|
#line 136 "scan.l"
|
|
return DEFFS;
|
|
YY_BREAK
|
|
case 10:
|
|
YY_RULE_SETUP
|
|
#line 137 "scan.l"
|
|
return DEFINE;
|
|
YY_BREAK
|
|
case 11:
|
|
YY_RULE_SETUP
|
|
#line 138 "scan.l"
|
|
return DEFFLAG;
|
|
YY_BREAK
|
|
case 12:
|
|
YY_RULE_SETUP
|
|
#line 139 "scan.l"
|
|
return DEFOPT;
|
|
YY_BREAK
|
|
case 13:
|
|
YY_RULE_SETUP
|
|
#line 140 "scan.l"
|
|
return DEFPARAM;
|
|
YY_BREAK
|
|
case 14:
|
|
YY_RULE_SETUP
|
|
#line 141 "scan.l"
|
|
return DEFPSEUDO;
|
|
YY_BREAK
|
|
case 15:
|
|
YY_RULE_SETUP
|
|
#line 142 "scan.l"
|
|
return DEFPSEUDODEV;
|
|
YY_BREAK
|
|
case 16:
|
|
YY_RULE_SETUP
|
|
#line 143 "scan.l"
|
|
return DEVCLASS;
|
|
YY_BREAK
|
|
case 17:
|
|
YY_RULE_SETUP
|
|
#line 144 "scan.l"
|
|
return DEVICE;
|
|
YY_BREAK
|
|
case 18:
|
|
YY_RULE_SETUP
|
|
#line 145 "scan.l"
|
|
return DEVICE_MAJOR;
|
|
YY_BREAK
|
|
case 19:
|
|
YY_RULE_SETUP
|
|
#line 146 "scan.l"
|
|
return DUMPS;
|
|
YY_BREAK
|
|
case 20:
|
|
YY_RULE_SETUP
|
|
#line 147 "scan.l"
|
|
return XFILE;
|
|
YY_BREAK
|
|
case 21:
|
|
YY_RULE_SETUP
|
|
#line 148 "scan.l"
|
|
return FILE_SYSTEM;
|
|
YY_BREAK
|
|
case 22:
|
|
YY_RULE_SETUP
|
|
#line 149 "scan.l"
|
|
return FLAGS;
|
|
YY_BREAK
|
|
case 23:
|
|
YY_RULE_SETUP
|
|
#line 150 "scan.l"
|
|
return IDENT;
|
|
YY_BREAK
|
|
case 24:
|
|
YY_RULE_SETUP
|
|
#line 151 "scan.l"
|
|
return IOCONF;
|
|
YY_BREAK
|
|
case 25:
|
|
YY_RULE_SETUP
|
|
#line 152 "scan.l"
|
|
return LINKZERO;
|
|
YY_BREAK
|
|
case 26:
|
|
YY_RULE_SETUP
|
|
#line 153 "scan.l"
|
|
return XMACHINE;
|
|
YY_BREAK
|
|
case 27:
|
|
YY_RULE_SETUP
|
|
#line 154 "scan.l"
|
|
return MAJOR;
|
|
YY_BREAK
|
|
case 28:
|
|
YY_RULE_SETUP
|
|
#line 155 "scan.l"
|
|
return MAKEOPTIONS;
|
|
YY_BREAK
|
|
case 29:
|
|
YY_RULE_SETUP
|
|
#line 156 "scan.l"
|
|
return MAXPARTITIONS;
|
|
YY_BREAK
|
|
case 30:
|
|
YY_RULE_SETUP
|
|
#line 157 "scan.l"
|
|
return MAXUSERS;
|
|
YY_BREAK
|
|
case 31:
|
|
YY_RULE_SETUP
|
|
#line 158 "scan.l"
|
|
return MINOR;
|
|
YY_BREAK
|
|
case 32:
|
|
YY_RULE_SETUP
|
|
#line 159 "scan.l"
|
|
return NEEDS_COUNT;
|
|
YY_BREAK
|
|
case 33:
|
|
YY_RULE_SETUP
|
|
#line 160 "scan.l"
|
|
return NEEDS_FLAG;
|
|
YY_BREAK
|
|
case 34:
|
|
YY_RULE_SETUP
|
|
#line 161 "scan.l"
|
|
return NO;
|
|
YY_BREAK
|
|
case 35:
|
|
YY_RULE_SETUP
|
|
#line 162 "scan.l"
|
|
return XOBJECT;
|
|
YY_BREAK
|
|
case 36:
|
|
YY_RULE_SETUP
|
|
#line 163 "scan.l"
|
|
return OBSOLETE;
|
|
YY_BREAK
|
|
case 37:
|
|
YY_RULE_SETUP
|
|
#line 164 "scan.l"
|
|
return ON;
|
|
YY_BREAK
|
|
case 38:
|
|
YY_RULE_SETUP
|
|
#line 165 "scan.l"
|
|
return OPTIONS;
|
|
YY_BREAK
|
|
case 39:
|
|
YY_RULE_SETUP
|
|
#line 166 "scan.l"
|
|
return PREFIX;
|
|
YY_BREAK
|
|
case 40:
|
|
YY_RULE_SETUP
|
|
#line 167 "scan.l"
|
|
return BUILDPREFIX;
|
|
YY_BREAK
|
|
case 41:
|
|
YY_RULE_SETUP
|
|
#line 168 "scan.l"
|
|
return PSEUDO_DEVICE;
|
|
YY_BREAK
|
|
case 42:
|
|
YY_RULE_SETUP
|
|
#line 169 "scan.l"
|
|
return PSEUDO_ROOT;
|
|
YY_BREAK
|
|
case 43:
|
|
YY_RULE_SETUP
|
|
#line 170 "scan.l"
|
|
return ROOT;
|
|
YY_BREAK
|
|
case 44:
|
|
YY_RULE_SETUP
|
|
#line 171 "scan.l"
|
|
return SELECT;
|
|
YY_BREAK
|
|
case 45:
|
|
YY_RULE_SETUP
|
|
#line 172 "scan.l"
|
|
return SINGLE;
|
|
YY_BREAK
|
|
case 46:
|
|
YY_RULE_SETUP
|
|
#line 173 "scan.l"
|
|
return SOURCE;
|
|
YY_BREAK
|
|
case 47:
|
|
YY_RULE_SETUP
|
|
#line 174 "scan.l"
|
|
return TYPE;
|
|
YY_BREAK
|
|
case 48:
|
|
YY_RULE_SETUP
|
|
#line 175 "scan.l"
|
|
return VECTOR;
|
|
YY_BREAK
|
|
case 49:
|
|
YY_RULE_SETUP
|
|
#line 176 "scan.l"
|
|
return VERSION;
|
|
YY_BREAK
|
|
case 50:
|
|
YY_RULE_SETUP
|
|
#line 177 "scan.l"
|
|
return WITH;
|
|
YY_BREAK
|
|
case 51:
|
|
YY_RULE_SETUP
|
|
#line 179 "scan.l"
|
|
return PLUSEQ;
|
|
YY_BREAK
|
|
case 52:
|
|
YY_RULE_SETUP
|
|
#line 180 "scan.l"
|
|
return COLONEQ;
|
|
YY_BREAK
|
|
case 53:
|
|
/* rule 53 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 182 "scan.l"
|
|
{
|
|
ifdefstate = (ifdefstate + 1) * 6;
|
|
if (ifdefstate >= IDS_MAX_DEPTH) {
|
|
yyerror("too many levels of conditional");
|
|
}
|
|
if (!IDS_PARENT_DISABLED && getcurifdef()) {
|
|
BEGIN(INITIAL);
|
|
} else {
|
|
ifdefstate++;
|
|
BEGIN(IGNORED);
|
|
}
|
|
yyline++;
|
|
}
|
|
YY_BREAK
|
|
case 54:
|
|
/* rule 54 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 196 "scan.l"
|
|
{
|
|
ifdefstate = (ifdefstate + 1) * 6;
|
|
if (ifdefstate >= IDS_MAX_DEPTH) {
|
|
yyerror("too many levels of conditional");
|
|
}
|
|
if (!IDS_PARENT_DISABLED && !getcurifdef()) {
|
|
BEGIN(INITIAL);
|
|
} else {
|
|
ifdefstate++;
|
|
BEGIN(IGNORED);
|
|
}
|
|
yyline++;
|
|
}
|
|
YY_BREAK
|
|
case 55:
|
|
/* rule 55 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 211 "scan.l"
|
|
{
|
|
st = ifdefstate % 6;
|
|
if (ifdefstate < 0 || st > 3) {
|
|
yyerror("mismatched elifdef");
|
|
}
|
|
if (IDS_PARENT_DISABLED ||
|
|
st != 1 || !getcurifdef()) {
|
|
if (st == 2 || st == 3) {
|
|
ifdefstate += 3 - st;
|
|
} else {
|
|
ifdefstate += 1 - st;
|
|
}
|
|
BEGIN(IGNORED);
|
|
} else {
|
|
ifdefstate++;
|
|
BEGIN(INITIAL);
|
|
}
|
|
yyline++;
|
|
}
|
|
YY_BREAK
|
|
case 56:
|
|
/* rule 56 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 231 "scan.l"
|
|
{
|
|
st = ifdefstate % 6;
|
|
if (ifdefstate < 0 || st > 3) {
|
|
yyerror("mismatched elifndef");
|
|
}
|
|
if (IDS_PARENT_DISABLED ||
|
|
st != 1 || getcurifdef()) {
|
|
if (st == 2 || st == 3) {
|
|
ifdefstate += 3 - st;
|
|
} else {
|
|
ifdefstate += 1 - st;
|
|
}
|
|
BEGIN(IGNORED);
|
|
} else {
|
|
ifdefstate++;
|
|
BEGIN(INITIAL);
|
|
}
|
|
yyline++;
|
|
}
|
|
YY_BREAK
|
|
case 57:
|
|
/* rule 57 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 251 "scan.l"
|
|
{
|
|
st = ifdefstate % 6;
|
|
if (ifdefstate < 0 || st > 3) {
|
|
yyerror("mismatched else");
|
|
}
|
|
if (!IDS_PARENT_DISABLED && (st == 1)) {
|
|
ifdefstate += 3;
|
|
BEGIN(INITIAL);
|
|
} else {
|
|
ifdefstate += 5 - st;
|
|
BEGIN(IGNORED);
|
|
}
|
|
yyline++;
|
|
}
|
|
YY_BREAK
|
|
case 58:
|
|
/* rule 58 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 266 "scan.l"
|
|
{
|
|
if (ifdefstate < 0) {
|
|
yyerror("mismatched endif");
|
|
}
|
|
if (!IDS_PARENT_DISABLED) {
|
|
BEGIN(INITIAL);
|
|
}
|
|
ifdefstate = (ifdefstate/6) - 1;
|
|
yyline++;
|
|
}
|
|
YY_BREAK
|
|
case 59:
|
|
/* rule 59 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 277 "scan.l"
|
|
{
|
|
yyline++;
|
|
}
|
|
YY_BREAK
|
|
case 60:
|
|
YY_RULE_SETUP
|
|
#line 281 "scan.l"
|
|
/* ignore */
|
|
YY_BREAK
|
|
case 61:
|
|
/* rule 61 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 283 "scan.l"
|
|
{
|
|
yyline++;
|
|
if (getincludepath()) {
|
|
include(curinclpath, 0, 0, 1);
|
|
} else {
|
|
yyerror("bad include path-name");
|
|
}
|
|
}
|
|
YY_BREAK
|
|
case 62:
|
|
/* rule 62 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 292 "scan.l"
|
|
{
|
|
yyline++;
|
|
if (getincludepath()) {
|
|
include(curinclpath, 0, 1, 1);
|
|
} else {
|
|
yyerror("bad cinclude path-name");
|
|
}
|
|
}
|
|
YY_BREAK
|
|
case 63:
|
|
/* rule 63 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 301 "scan.l"
|
|
{
|
|
yyline++;
|
|
if (!oktopackage) {
|
|
yyerror("package not allowed here");
|
|
} else if (getincludepath()) {
|
|
package(curinclpath);
|
|
} else {
|
|
yyerror("bad package path-name");
|
|
}
|
|
}
|
|
YY_BREAK
|
|
case 64:
|
|
YY_RULE_SETUP
|
|
#line 312 "scan.l"
|
|
{
|
|
yylval.str = intern(yytext);
|
|
return PATHNAME;
|
|
}
|
|
YY_BREAK
|
|
case 65:
|
|
YY_RULE_SETUP
|
|
#line 317 "scan.l"
|
|
{
|
|
yylval.str = intern(yytext);
|
|
return WORD;
|
|
}
|
|
YY_BREAK
|
|
case 66:
|
|
YY_RULE_SETUP
|
|
#line 322 "scan.l"
|
|
{
|
|
yylval.str = intern("");
|
|
return EMPTYSTRING;
|
|
}
|
|
YY_BREAK
|
|
case 67:
|
|
/* rule 67 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 327 "scan.l"
|
|
{
|
|
size_t l = strlen(yytext);
|
|
if (l > 1 && yytext[l - 1] == '"')
|
|
yytext[l - 1] = '\0';
|
|
|
|
yylval.str = intern(yytext + 1);
|
|
return QSTRING;
|
|
}
|
|
YY_BREAK
|
|
case 68:
|
|
YY_RULE_SETUP
|
|
#line 335 "scan.l"
|
|
{
|
|
yylval.num.fmt = 8;
|
|
yylval.num.val = strtoll(yytext, NULL, 8);
|
|
return NUMBER;
|
|
}
|
|
YY_BREAK
|
|
case 69:
|
|
YY_RULE_SETUP
|
|
#line 340 "scan.l"
|
|
{
|
|
yylval.num.fmt = 16;
|
|
yylval.num.val = (long long)strtoull(yytext + 2, NULL, 16);
|
|
return NUMBER;
|
|
}
|
|
YY_BREAK
|
|
case 70:
|
|
YY_RULE_SETUP
|
|
#line 345 "scan.l"
|
|
{
|
|
yylval.num.fmt = 10;
|
|
yylval.num.val = strtoll(yytext, NULL, 10);
|
|
return NUMBER;
|
|
}
|
|
YY_BREAK
|
|
case 71:
|
|
/* rule 71 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 350 "scan.l"
|
|
{
|
|
/*
|
|
* Note: newline followed by whitespace is always a
|
|
* continuation of the previous line, so do NOT
|
|
* return a token in this case.
|
|
*/
|
|
yyline++;
|
|
}
|
|
YY_BREAK
|
|
case 72:
|
|
/* rule 72 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 358 "scan.l"
|
|
{
|
|
yyline++;
|
|
return '\n';
|
|
}
|
|
YY_BREAK
|
|
case 73:
|
|
YY_RULE_SETUP
|
|
#line 362 "scan.l"
|
|
{
|
|
/* Detect NUL characters in the config file and
|
|
* error out.
|
|
*/
|
|
cfgerror("NUL character detected at line %i", yyline);
|
|
}
|
|
YY_BREAK
|
|
case 74:
|
|
YY_RULE_SETUP
|
|
#line 368 "scan.l"
|
|
{ /* ignored (comment) */; }
|
|
YY_BREAK
|
|
case 75:
|
|
YY_RULE_SETUP
|
|
#line 369 "scan.l"
|
|
{ /* ignored (white space) */; }
|
|
YY_BREAK
|
|
case 76:
|
|
YY_RULE_SETUP
|
|
#line 370 "scan.l"
|
|
{ return yytext[0]; }
|
|
YY_BREAK
|
|
case YY_STATE_EOF(INITIAL):
|
|
case YY_STATE_EOF(IGNORED):
|
|
#line 371 "scan.l"
|
|
{
|
|
if (ifdefstate > (incl == NULL ? -1 : incl->in_ifdefstate)) {
|
|
yyerror("reached EOF while looking for endif");
|
|
}
|
|
if (incl == NULL)
|
|
return YY_NULL;
|
|
tok = endinclude();
|
|
if (tok)
|
|
return tok;
|
|
/* otherwise continue scanning */
|
|
}
|
|
YY_BREAK
|
|
case 77:
|
|
YY_RULE_SETUP
|
|
#line 383 "scan.l"
|
|
ECHO;
|
|
YY_BREAK
|
|
#line 1876 "scan.c"
|
|
|
|
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 user's declarations */
|
|
} /* 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 yy_size_t 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 = (yy_size_t)(((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
|
|
{
|
|
yy_size_t 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_LVALUE;
|
|
|
|
int yy_c_buf_p_offset =
|
|
(int) ((yy_c_buf_p) - b->yy_ch_buf);
|
|
|
|
if ( b->yy_is_our_buffer )
|
|
{
|
|
yy_size_t 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;
|
|
|
|
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
|
/* Extend the array by 50%, plus the number we really need. */
|
|
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
|
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
|
|
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
|
|
}
|
|
|
|
(yy_n_chars) += number_to_move;
|
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
|
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
|
|
|
|
(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
|
|
|
|
return ret_val;
|
|
}
|
|
|
|
/* yy_get_previous_state - get the state just before the EOB char was reached */
|
|
|
|
static yy_state_type yy_get_previous_state (void)
|
|
{
|
|
register yy_state_type yy_current_state;
|
|
register char *yy_cp;
|
|
|
|
yy_current_state = (yy_start);
|
|
|
|
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)] : 43);
|
|
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 >= 437 )
|
|
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 = 43;
|
|
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 >= 437 )
|
|
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 == 436);
|
|
|
|
return yy_is_jam ? 0 : yy_current_state;
|
|
}
|
|
|
|
#ifndef YY_NO_UNPUT
|
|
|
|
#endif
|
|
|
|
#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 */
|
|
yy_size_t offset = (yy_size_t)
|
|
((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);
|
|
|
|
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 = (yy_size_t)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 );
|
|
}
|
|
|
|
/* 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)
|
|
{
|
|
yy_size_t 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*)
|
|
);
|
|
if ( ! (yy_buffer_stack) )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
|
|
|
|
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
|
|
|
|
(yy_buffer_stack_max) = num_to_alloc;
|
|
(yy_buffer_stack_top) = 0;
|
|
return;
|
|
}
|
|
|
|
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
|
|
|
|
/* Increase the buffer to prepare for a possible push. */
|
|
yy_size_t 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*)
|
|
);
|
|
if ( ! (yy_buffer_stack) )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
|
|
|
|
/* zero only the new slots.*/
|
|
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
|
|
(yy_buffer_stack_max) = num_to_alloc;
|
|
}
|
|
}
|
|
|
|
/** Setup the input buffer state to scan directly from a user-specified character buffer.
|
|
* @param base the character buffer
|
|
* @param size the size in bytes of the character buffer
|
|
*
|
|
* @return the newly allocated buffer state object.
|
|
*/
|
|
YY_BUFFER_STATE 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 yystr a NUL-terminated string to scan
|
|
*
|
|
* @return the newly allocated buffer state object.
|
|
* @note If you want to scan bytes that may contain NUL values, then use
|
|
* 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 yybytes the byte buffer to scan
|
|
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
|
*
|
|
* @return the newly allocated buffer state object.
|
|
*/
|
|
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
|
|
{
|
|
YY_BUFFER_STATE b;
|
|
char *buf;
|
|
yy_size_t n;
|
|
yy_size_t 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.
|
|
*
|
|
*/
|
|
yy_size_t 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 383 "scan.l"
|
|
|
|
|
|
|
|
int interesting = 1;
|
|
|
|
static int
|
|
curdir_push(const char *fname)
|
|
{
|
|
struct prefix *pf;
|
|
char *p, *d, *f;
|
|
|
|
/* Set up the initial "current directory" for include directives. */
|
|
d = dirname(f = estrdup(fname));
|
|
if (*d == '/')
|
|
p = estrdup(d);
|
|
else {
|
|
char *cwd, buf[PATH_MAX];
|
|
|
|
if ((cwd = getcwd(buf, sizeof(buf))) == NULL) {
|
|
free(f);
|
|
return (-1);
|
|
}
|
|
easprintf(&p, "%s/%s", cwd, d);
|
|
}
|
|
free(f);
|
|
pf = ecalloc(1, sizeof(*pf));
|
|
pf->pf_prefix = p;
|
|
SLIST_INSERT_HEAD(&curdirs, pf, pf_next);
|
|
|
|
return (0);
|
|
}
|
|
|
|
static void
|
|
curdir_pop(void)
|
|
{
|
|
struct prefix *pf;
|
|
|
|
pf = SLIST_FIRST(&curdirs);
|
|
SLIST_REMOVE_HEAD(&curdirs, pf_next);
|
|
if (SLIST_EMPTY(&curdirs))
|
|
panic("curdirs is empty");
|
|
/* LINTED cast away const (pf_prefix is malloc'd for curdirs) */
|
|
free((void *)__UNCONST(pf->pf_prefix));
|
|
free(pf);
|
|
}
|
|
|
|
/*
|
|
* Open the "main" file (conffile).
|
|
*/
|
|
int
|
|
firstfile(const char *fname)
|
|
{
|
|
|
|
#if defined(__NetBSD__)
|
|
if ((yyin = fopen(fname, "rf")) == NULL)
|
|
#else
|
|
if ((yyin = fopen(fname, "r")) == NULL)
|
|
#endif
|
|
return (-1);
|
|
|
|
if (curdir_push(fname) == -1)
|
|
return (-1);
|
|
|
|
yyfile = conffile = fname;
|
|
yyline = 1;
|
|
return (0);
|
|
}
|
|
|
|
/*
|
|
* Add a "package" to the configuration. This is essentially
|
|
* syntactic sugar around the sequence:
|
|
*
|
|
* prefix ../some/directory
|
|
* include "files.package"
|
|
* prefix
|
|
*/
|
|
void
|
|
package(const char *fname)
|
|
{
|
|
char *fname1 = estrdup(fname);
|
|
char *fname2 = estrdup(fname);
|
|
char *dir = dirname(fname1);
|
|
char *file = basename(fname2);
|
|
|
|
/*
|
|
* Push the prefix on to the prefix stack and process the include
|
|
* file. When we reach the end of the include file, inserting
|
|
* the PREFIX token into the input stream will pop the prefix off
|
|
* of the prefix stack.
|
|
*/
|
|
prefix_push(dir);
|
|
(void) include(file, PREFIX, 0, 1);
|
|
|
|
free(fname1);
|
|
free(fname2);
|
|
}
|
|
|
|
int includedepth;
|
|
|
|
/*
|
|
* Open the named file for inclusion at the current point. Returns 0 on
|
|
* success (file opened and previous state pushed), nonzero on failure
|
|
* (fopen failed, complaint made). The `ateof' parameter controls the
|
|
* token to be inserted at the end of the include file (i.e. ENDFILE).
|
|
* If ateof == 0 then nothing is inserted.
|
|
*/
|
|
int
|
|
include(const char *fname, int ateof, int conditional, int direct)
|
|
{
|
|
FILE *fp;
|
|
struct incl *in;
|
|
char *s;
|
|
static int havedirs;
|
|
extern int vflag;
|
|
|
|
if (havedirs == 0) {
|
|
havedirs = 1;
|
|
setupdirs();
|
|
}
|
|
|
|
if (fname[0] == '/')
|
|
s = estrdup(fname);
|
|
else if (fname[0] == '.' && fname[1] == '/') {
|
|
struct prefix *pf = SLIST_FIRST(&curdirs);
|
|
easprintf(&s, "%s/%s", pf->pf_prefix, fname + 2);
|
|
} else
|
|
s = sourcepath(fname);
|
|
if ((fp = fopen(s, "r")) == NULL) {
|
|
if (conditional == 0)
|
|
cfgerror("cannot open %s for reading: %s", s,
|
|
strerror(errno));
|
|
else if (vflag)
|
|
cfgwarn("cannot open conditional include file %s: %s",
|
|
s, strerror(errno));
|
|
free(s);
|
|
return (-1);
|
|
}
|
|
if (curdir_push(s) == -1) {
|
|
cfgerror("cannot record current working directory for %s", s);
|
|
fclose(fp);
|
|
free(s);
|
|
return (-1);
|
|
}
|
|
in = ecalloc(1, sizeof *in);
|
|
in->in_prev = incl;
|
|
in->in_buf = YY_CURRENT_BUFFER;
|
|
in->in_fname = yyfile;
|
|
in->in_lineno = yyline;
|
|
in->in_ateof = ateof;
|
|
in->in_interesting = interesting;
|
|
in->in_ifdefstate = ifdefstate;
|
|
interesting = direct & interesting;
|
|
if (interesting)
|
|
logconfig_include(fp, fname);
|
|
incl = in;
|
|
CFGDBG(1, "include `%s' from `%s' line %d", fname, yyfile, yyline);
|
|
yy_switch_to_buffer(yy_create_buffer(fp,YY_BUF_SIZE));
|
|
yyfile = intern(s);
|
|
yyline = 1;
|
|
free(s);
|
|
includedepth++;
|
|
return (0);
|
|
}
|
|
|
|
/*
|
|
* Extract the pathname from a include/cinclude/package into curinclpath
|
|
*/
|
|
static int
|
|
getincludepath(void)
|
|
{
|
|
const char *p = yytext;
|
|
ptrdiff_t len;
|
|
const char *e;
|
|
|
|
while (*p && isascii((unsigned int)*p) && !isspace((unsigned int)*p))
|
|
p++;
|
|
while (*p && isascii((unsigned int)*p) && isspace((unsigned int)*p))
|
|
p++;
|
|
if (!*p)
|
|
return 0;
|
|
if (*p == '"') {
|
|
p++;
|
|
e = strchr(p, '"');
|
|
if (!e) return 0;
|
|
} else {
|
|
e = p;
|
|
while (*e && isascii((unsigned int)*e)
|
|
&& !isspace((unsigned int)*e))
|
|
e++;
|
|
}
|
|
|
|
len = e-p;
|
|
if (len > (ptrdiff_t)sizeof(curinclpath)-1)
|
|
len = sizeof(curinclpath)-1;
|
|
strncpy(curinclpath, p, sizeof(curinclpath));
|
|
curinclpath[len] = '\0';
|
|
|
|
return 1;
|
|
}
|
|
|
|
/*
|
|
* Terminate the most recent inclusion.
|
|
*/
|
|
static int
|
|
endinclude(void)
|
|
{
|
|
struct incl *in;
|
|
int ateof;
|
|
|
|
curdir_pop();
|
|
if ((in = incl) == NULL)
|
|
panic("endinclude");
|
|
incl = in->in_prev;
|
|
lastfile = yyfile;
|
|
yy_delete_buffer(YY_CURRENT_BUFFER);
|
|
(void)fclose(yyin);
|
|
yy_switch_to_buffer(in->in_buf);
|
|
yyfile = in->in_fname;
|
|
yyline = in->in_lineno;
|
|
ateof = in->in_ateof;
|
|
interesting = in->in_interesting;
|
|
free(in);
|
|
|
|
includedepth--;
|
|
|
|
return (ateof);
|
|
}
|
|
|
|
/*
|
|
* Return the current line number. If yacc has looked ahead and caused
|
|
* us to consume a newline, we have to subtract one. yychar is yacc's
|
|
* token lookahead, so we can tell.
|
|
*/
|
|
u_short
|
|
currentline(void)
|
|
{
|
|
extern int yychar;
|
|
|
|
return (u_short)(yyline - (yychar == '\n'));
|
|
}
|
|
|
|
static int
|
|
getcurifdef(void)
|
|
{
|
|
char *p = yytext, *q;
|
|
|
|
while (*p && isascii((unsigned int)*p) && !isspace((unsigned int)*p))
|
|
p++;
|
|
while (*p && isascii((unsigned int)*p) && isspace((unsigned int)*p))
|
|
p++;
|
|
q = p;
|
|
while (*q && isascii((unsigned int)*q) && !isspace((unsigned int)*q))
|
|
q++;
|
|
*q = '\0';
|
|
|
|
return ht_lookup(attrtab, intern(p)) != NULL;
|
|
}
|
|
|