#line 2 "VPreLex_pretmp.cpp"
#line 4 "VPreLex_pretmp.cpp"
#define YY_INT_ALIGNED long int
/* A lexical scanner generated by flex */
#define yy_create_buffer VPreLex_create_buffer
#define yy_delete_buffer VPreLex_delete_buffer
#define yy_scan_buffer VPreLex_scan_buffer
#define yy_scan_string VPreLex_scan_string
#define yy_scan_bytes VPreLex_scan_bytes
#define yy_init_buffer VPreLex_init_buffer
#define yy_flush_buffer VPreLex_flush_buffer
#define yy_load_buffer_state VPreLex_load_buffer_state
#define yy_switch_to_buffer VPreLex_switch_to_buffer
#define yypush_buffer_state VPreLexpush_buffer_state
#define yypop_buffer_state VPreLexpop_buffer_state
#define yyensure_buffer_stack VPreLexensure_buffer_stack
#define yy_flex_debug VPreLex_flex_debug
#define yyin VPreLexin
#define yyleng VPreLexleng
#define yylex VPreLexlex
#define yylineno VPreLexlineno
#define yyout VPreLexout
#define yyrestart VPreLexrestart
#define yytext VPreLextext
#define yywrap VPreLexwrap
#define yyalloc VPreLexalloc
#define yyrealloc VPreLexrealloc
#define yyfree VPreLexfree
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
#ifdef yy_create_buffer
#define VPreLex_create_buffer_ALREADY_DEFINED
#else
#define yy_create_buffer VPreLex_create_buffer
#endif
#ifdef yy_delete_buffer
#define VPreLex_delete_buffer_ALREADY_DEFINED
#else
#define yy_delete_buffer VPreLex_delete_buffer
#endif
#ifdef yy_scan_buffer
#define VPreLex_scan_buffer_ALREADY_DEFINED
#else
#define yy_scan_buffer VPreLex_scan_buffer
#endif
#ifdef yy_scan_string
#define VPreLex_scan_string_ALREADY_DEFINED
#else
#define yy_scan_string VPreLex_scan_string
#endif
#ifdef yy_scan_bytes
#define VPreLex_scan_bytes_ALREADY_DEFINED
#else
#define yy_scan_bytes VPreLex_scan_bytes
#endif
#ifdef yy_init_buffer
#define VPreLex_init_buffer_ALREADY_DEFINED
#else
#define yy_init_buffer VPreLex_init_buffer
#endif
#ifdef yy_flush_buffer
#define VPreLex_flush_buffer_ALREADY_DEFINED
#else
#define yy_flush_buffer VPreLex_flush_buffer
#endif
#ifdef yy_load_buffer_state
#define VPreLex_load_buffer_state_ALREADY_DEFINED
#else
#define yy_load_buffer_state VPreLex_load_buffer_state
#endif
#ifdef yy_switch_to_buffer
#define VPreLex_switch_to_buffer_ALREADY_DEFINED
#else
#define yy_switch_to_buffer VPreLex_switch_to_buffer
#endif
#ifdef yypush_buffer_state
#define VPreLexpush_buffer_state_ALREADY_DEFINED
#else
#define yypush_buffer_state VPreLexpush_buffer_state
#endif
#ifdef yypop_buffer_state
#define VPreLexpop_buffer_state_ALREADY_DEFINED
#else
#define yypop_buffer_state VPreLexpop_buffer_state
#endif
#ifdef yyensure_buffer_stack
#define VPreLexensure_buffer_stack_ALREADY_DEFINED
#else
#define yyensure_buffer_stack VPreLexensure_buffer_stack
#endif
#ifdef yylex
#define VPreLexlex_ALREADY_DEFINED
#else
#define yylex VPreLexlex
#endif
#ifdef yyrestart
#define VPreLexrestart_ALREADY_DEFINED
#else
#define yyrestart VPreLexrestart
#endif
#ifdef yylex_init
#define VPreLexlex_init_ALREADY_DEFINED
#else
#define yylex_init VPreLexlex_init
#endif
#ifdef yylex_init_extra
#define VPreLexlex_init_extra_ALREADY_DEFINED
#else
#define yylex_init_extra VPreLexlex_init_extra
#endif
#ifdef yylex_destroy
#define VPreLexlex_destroy_ALREADY_DEFINED
#else
#define yylex_destroy VPreLexlex_destroy
#endif
#ifdef yyget_debug
#define VPreLexget_debug_ALREADY_DEFINED
#else
#define yyget_debug VPreLexget_debug
#endif
#ifdef yyset_debug
#define VPreLexset_debug_ALREADY_DEFINED
#else
#define yyset_debug VPreLexset_debug
#endif
#ifdef yyget_extra
#define VPreLexget_extra_ALREADY_DEFINED
#else
#define yyget_extra VPreLexget_extra
#endif
#ifdef yyset_extra
#define VPreLexset_extra_ALREADY_DEFINED
#else
#define yyset_extra VPreLexset_extra
#endif
#ifdef yyget_in
#define VPreLexget_in_ALREADY_DEFINED
#else
#define yyget_in VPreLexget_in
#endif
#ifdef yyset_in
#define VPreLexset_in_ALREADY_DEFINED
#else
#define yyset_in VPreLexset_in
#endif
#ifdef yyget_out
#define VPreLexget_out_ALREADY_DEFINED
#else
#define yyget_out VPreLexget_out
#endif
#ifdef yyset_out
#define VPreLexset_out_ALREADY_DEFINED
#else
#define yyset_out VPreLexset_out
#endif
#ifdef yyget_leng
#define VPreLexget_leng_ALREADY_DEFINED
#else
#define yyget_leng VPreLexget_leng
#endif
#ifdef yyget_text
#define VPreLexget_text_ALREADY_DEFINED
#else
#define yyget_text VPreLexget_text
#endif
#ifdef yyget_lineno
#define VPreLexget_lineno_ALREADY_DEFINED
#else
#define yyget_lineno VPreLexget_lineno
#endif
#ifdef yyset_lineno
#define VPreLexset_lineno_ALREADY_DEFINED
#else
#define yyset_lineno VPreLexset_lineno
#endif
#ifdef yywrap
#define VPreLexwrap_ALREADY_DEFINED
#else
#define yywrap VPreLexwrap
#endif
#ifdef yyalloc
#define VPreLexalloc_ALREADY_DEFINED
#else
#define yyalloc VPreLexalloc
#endif
#ifdef yyrealloc
#define VPreLexrealloc_ALREADY_DEFINED
#else
#define yyrealloc VPreLexrealloc
#endif
#ifdef yyfree
#define VPreLexfree_ALREADY_DEFINED
#else
#define yyfree VPreLexfree
#endif
#ifdef yytext
#define VPreLextext_ALREADY_DEFINED
#else
#define yytext VPreLextext
#endif
#ifdef yyleng
#define VPreLexleng_ALREADY_DEFINED
#else
#define yyleng VPreLexleng
#endif
#ifdef yyin
#define VPreLexin_ALREADY_DEFINED
#else
#define yyin VPreLexin
#endif
#ifdef yyout
#define VPreLexout_ALREADY_DEFINED
#else
#define yyout VPreLexout
#endif
#ifdef yy_flex_debug
#define VPreLex_flex_debug_ALREADY_DEFINED
#else
#define yy_flex_debug VPreLex_flex_debug
#endif
#ifdef yylineno
#define VPreLexlineno_ALREADY_DEFINED
#else
#define yylineno VPreLexlineno
#endif
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
/* end standard C headers. */
/* flex integer type definitions */
#ifndef FLEXINT_H
#define FLEXINT_H
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
* if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif
#include <inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX (4294967295U)
#endif
#ifndef SIZE_MAX
#define SIZE_MAX (~(size_t)0)
#endif
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
/* begin standard C++ headers. */
/* TODO: this is always defined, so inline it */
#define yyconst const
#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))
#else
#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an
* integer in range [0..255] for use as an array index.
*/
#define YY_SC_TO_UI(c) ((YY_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
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
* Ditto for the __ia64__ case accordingly.
*/
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
*/
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#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)
#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.
*/
int 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 = NULL; /**< 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 = NULL;
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 ( const char *yy_str );
YY_BUFFER_STATE yy_scan_bytes ( const 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 */
#define VPreLexwrap() (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
typedef flex_uint8_t YY_CHAR;
FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
extern int yylineno;
int yylineno = 1;
extern char *yytext;
#ifdef yytext_ptr
#undef yytext_ptr
#endif
#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 yynoreturn yy_fatal_error ( const 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; \
(yytext_ptr) -= (yy_more_len); \
yyleng = (int) (yy_cp - (yytext_ptr)); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 121
#define YY_END_OF_BUFFER 122
/* 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 const flex_int32_t yy_accept[692] =
{ 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, 122, 119, 117, 112, 116, 118,
15, 119, 113, 119, 119, 1, 117, 116, 119, 108,
106, 108, 108, 107, 18, 16, 18, 21, 17, 120,
50, 49, 50, 48, 63, 56, 65, 55, 58, 51,
52, 65, 65, 61, 65, 62, 63, 73, 70, 75,
69, 72, 75, 75, 75, 80, 78, 80, 80, 79,
80, 35, 32, 31, 34, 33, 24, 26, 35, 35,
32, 34, 35, 96, 84, 97, 83, 85, 90, 91,
97, 92, 97, 88, 89, 97, 45, 44, 45, 47,
120, 40, 39, 40, 40, 40, 102, 100, 102, 102,
101, 117, 112, 0, 104, 103, 113, 0, 113, 22,
109, 0, 109, 111, 109, 109, 109, 109, 109, 117,
0, 0, 0, 109, 106, 0, 105, 107, 16, 0,
17, 20, 19, 20, 49, 0, 63, 56, 0, 53,
54, 64, 57, 0, 60, 0, 73, 70, 0, 66,
68, 74, 71, 0, 78, 0, 76, 79, 77, 0,
32, 31, 0, 26, 0, 26, 25, 28, 0, 28,
30, 32, 0, 28, 96, 84, 0, 81, 82, 87,
93, 0, 95, 44, 0, 46, 39, 0, 0, 0,
0, 100, 0, 0, 0, 101, 0, 0, 0, 0,
103, 103, 0, 103, 103, 103, 103, 114, 113, 109,
0, 109, 109, 109, 109, 109, 109, 109, 109, 109,
109, 0, 109, 0, 54, 0, 68, 68, 27, 28,
0, 28, 0, 28, 28, 82, 93, 0, 93, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 103,
103, 103, 103, 113, 110, 109, 109, 109, 109, 109,
109, 109, 109, 109, 109, 109, 109, 0, 109, 59,
67, 0, 29, 23, 28, 28, 28, 94, 86, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 103, 103, 103, 103, 109,
109, 109, 4, 109, 109, 109, 109, 109, 109, 109,
109, 109, 0, 109, 28, 28, 28, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 103, 103, 103, 103, 103, 109,
109, 109, 5, 6, 12, 7, 109, 109, 109, 109,
10, 0, 0, 28, 28, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 103, 103, 103, 103, 103,
109, 109, 3, 8, 109, 109, 109, 109, 0, 0,
2, 0, 28, 28, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 103, 0, 103, 103, 103, 109, 109,
9, 0, 109, 109, 0, 28, 28, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 103, 0, 103, 103, 103, 0, 13, 14,
0, 109, 109, 13, 14, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 103, 0,
103, 103, 0, 0, 36, 109, 0, 0, 0, 0,
0, 0, 0, 0, 0, 103, 0, 103, 0, 0,
109, 0, 0, 0, 0, 0, 0, 103, 0, 103,
0, 0, 11, 0, 0, 0, 0, 0, 0, 103,
0, 103, 0, 0, 0, 41, 0, 0, 0, 0,
103, 0, 103, 0, 0, 0, 0, 0, 0, 0,
103, 0, 103, 0, 0, 0, 0, 0, 0, 0,
103, 0, 103, 0, 0, 0, 0, 0, 0, 0,
103, 0, 103, 0, 0, 0, 0, 0, 0, 0,
103, 0, 103, 0, 0, 0, 0, 0, 0, 0,
103, 0, 103, 0, 0, 0, 0, 0, 0, 0,
103, 0, 103, 0, 0, 0, 0, 0, 99, 0,
98, 98, 103, 0, 0, 0, 0, 0, 0, 99,
99, 99, 0, 0, 98, 98, 98, 98, 98, 103,
0, 0, 0, 0, 99, 98, 103, 0, 0, 0,
0, 103, 0, 0, 0, 0, 103, 0, 0, 0,
0, 103, 0, 0, 0, 0, 103, 0, 0, 0,
0, 103, 0, 0, 0, 0, 103, 0, 0, 0,
42, 103, 0, 0, 43, 103, 0, 37, 38, 38,
0
} ;
static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 2, 4, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 5, 1, 1, 1, 1,
1, 2, 1, 6, 1, 7, 1, 1, 1, 8,
9, 10, 1, 11, 1, 1, 12, 13, 13, 13,
13, 13, 13, 13, 13, 13, 13, 1, 1, 1,
1, 14, 1, 1, 15, 16, 17, 17, 18, 19,
20, 21, 22, 17, 17, 23, 24, 25, 26, 27,
17, 28, 29, 30, 17, 17, 17, 17, 31, 17,
32, 33, 34, 1, 35, 36, 37, 38, 39, 40,
41, 42, 43, 21, 44, 17, 17, 45, 46, 47,
48, 49, 17, 50, 51, 52, 53, 17, 17, 17,
31, 17, 32, 1, 34, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 54, 1, 1, 1,
54, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 54, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static const YY_CHAR yy_meta[55] =
{ 0,
1, 2, 3, 4, 1, 5, 6, 7, 7, 8,
9, 8, 10, 1, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 7, 5, 7, 11, 12, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 1
} ;
static const flex_int32_t yy_base[736] =
{ 0,
0, 54, 108, 162, 216, 270, 12, 14, 322, 356,
36, 67, 392, 446, 500, 554, 606, 640, 71, 88,
40, 91, 676, 730, 1773, 1774, 1770, 1774, 20, 1774,
1774, 9, 1735, 0, 779, 1774, 45, 94, 827, 1774,
1774, 22, 1758, 0, 1774, 1774, 24, 1774, 0, 26,
1774, 1774, 34, 1774, 0, 1774, 47, 0, 1774, 1774,
1774, 1774, 68, 1774, 79, 1774, 93, 0, 1774, 102,
0, 1774, 1774, 113, 125, 1774, 1774, 128, 1757, 0,
130, 1774, 1766, 1774, 132, 1774, 1774, 1731, 0, 118,
141, 144, 146, 0, 1774, 134, 0, 1774, 1774, 1774,
1774, 1774, 145, 1774, 1774, 150, 1774, 1774, 146, 1774,
0, 1774, 1774, 155, 1754, 4, 1774, 1774, 157, 175,
0, 1763, 1774, 185, 284, 570, 1728, 1727, 1726, 1774,
1725, 0, 157, 1774, 48, 154, 161, 57, 164, 203,
208, 1715, 211, 193, 1774, 228, 1774, 0, 1774, 230,
0, 1774, 1774, 232, 1774, 237, 0, 1774, 239, 1774,
0, 1774, 1774, 242, 1774, 1723, 0, 1774, 250, 1774,
1725, 1774, 1774, 252, 1774, 254, 1774, 0, 1774, 256,
1755, 1774, 258, 1720, 1719, 1718, 1774, 1717, 1716, 228,
1774, 264, 287, 249, 0, 1774, 291, 1774, 0, 1774,
1715, 1714, 1774, 1774, 293, 1774, 1774, 304, 263, 1702,
1698, 1774, 306, 576, 741, 0, 744, 160, 255, 1716,
1742, 745, 750, 294, 288, 171, 313, 1774, 1709, 1708,
1707, 1706, 334, 278, 286, 279, 251, 303, 306, 335,
308, 1697, 300, 348, 0, 1734, 1706, 372, 1774, 1702,
1701, 1700, 1729, 350, 331, 0, 1698, 1697, 1696, 1725,
378, 1680, 1689, 1691, 798, 361, 359, 1696, 802, 367,
380, 1695, 394, 396, 387, 390, 387, 1694, 388, 425,
427, 414, 455, 1688, 1774, 399, 440, 429, 430, 431,
433, 338, 341, 432, 447, 436, 381, 1676, 404, 1774,
1774, 416, 1774, 1774, 462, 463, 450, 1774, 1774, 1685,
1672, 1677, 477, 479, 470, 480, 482, 495, 499, 502,
498, 509, 511, 502, 514, 531, 580, 572, 627, 215,
505, 534, 1683, 495, 502, 533, 535, 553, 293, 546,
560, 537, 1677, 624, 516, 568, 628, 1674, 1666, 1669,
611, 586, 611, 612, 615, 641, 623, 645, 665, 1693,
672, 675, 671, 678, 698, 751, 702, 519, 765, 618,
681, 621, 1677, 1676, 1666, 1654, 669, 625, 407, 664,
660, 485, 722, 740, 762, 1632, 1607, 1617, 731, 762,
761, 1632, 786, 794, 794, 1627, 664, 807, 795, 785,
800, 810, 809, 1626, 813, 711, 846, 837, 851, 850,
838, 842, 1610, 1600, 686, 755, 812, 834, 881, 887,
1774, 891, 861, 863, 1598, 1572, 1621, 803, 842, 853,
868, 898, 886, 874, 887, 904, 1591, 878, 908, 896,
884, 896, 901, 913, 916, 591, 915, 920, 891, 895,
1581, 718, 900, 904, 944, 914, 916, 951, 1575, 930,
955, 1584, 910, 956, 1574, 913, 926, 933, 945, 1573,
940, 968, 959, 943, 969, 970, 973, 986, 1557, 1556,
1532, 942, 944, 1545, 1544, 992, 1536, 1524, 955, 966,
975, 971, 972, 980, 989, 977, 981, 989, 1014, 997,
1011, 703, 1523, 1514, 1512, 991, 1493, 1490, 1493, 1015,
1002, 1022, 1010, 1017, 1014, 1041, 1021, 996, 1492, 1487,
1011, 1487, 1493, 1481, 1023, 1024, 1021, 1050, 1026, 1053,
1479, 1489, 1493, 1472, 1483, 1481, 1029, 1031, 1040, 1063,
1046, 1069, 1480, 1481, 1470, 1774, 1471, 1051, 1052, 1061,
1074, 1066, 345, 1470, 1452, 1464, 1450, 1069, 1072, 1060,
1088, 1063, 1079, 1430, 1477, 1426, 1475, 1064, 1065, 1081,
1096, 1084, 1117, 1122, 807, 1125, 137, 1089, 1095, 1423,
1100, 1422, 1130, 1137, 1414, 1140, 1407, 1418, 1397, 1097,
1124, 1107, 1116, 1390, 1387, 1382, 1388, 1112, 1117, 1127,
1143, 1129, 1145, 1375, 1373, 1376, 1376, 1126, 1127, 1134,
1159, 1135, 1152, 1366, 1362, 1227, 1212, 1157, 1162, 1180,
1185, 1189, 1166, 1213, 1224, 1209, 1207, 1190, 1244, 1251,
1193, 1200, 1201, 1240, 1247, 1204, 1205, 1246, 1208, 1179,
1214, 1199, 1197, 1198, 1774, 1774, 1175, 1196, 1194, 1195,
1190, 871, 1191, 1192, 1187, 1197, 1182, 1189, 1184, 1192,
1193, 1176, 1179, 1188, 1188, 1174, 1194, 1184, 1184, 1170,
1180, 1195, 1181, 1167, 1176, 1118, 1211, 961, 801, 383,
1774, 1212, 228, 169, 1774, 1214, 61, 1774, 27, 1774,
1774, 1263, 1275, 1287, 1299, 1311, 1323, 1335, 1347, 1359,
1371, 1383, 1395, 1402, 1414, 1422, 1425, 1427, 1438, 1450,
1462, 1474, 1486, 1489, 1495, 1507, 1514, 1526, 1533, 1545,
1548, 1559, 1566, 1578, 1589, 1601, 1608, 1620, 1632, 1639,
1651, 1663, 1675, 1687, 1699
} ;
static const flex_int32_t yy_def[736] =
{ 0,
692, 692, 693, 693, 694, 694, 695, 695, 696, 696,
697, 697, 698, 698, 699, 699, 700, 700, 701, 701,
702, 702, 703, 703, 691, 691, 691, 691, 691, 691,
691, 691, 704, 705, 706, 691, 691, 691, 706, 691,
691, 691, 691, 707, 691, 691, 691, 691, 708, 709,
691, 691, 691, 691, 710, 691, 691, 710, 691, 691,
691, 691, 691, 691, 711, 691, 710, 712, 691, 691,
712, 691, 691, 691, 713, 691, 691, 691, 691, 714,
691, 691, 691, 691, 691, 691, 691, 715, 716, 717,
691, 691, 717, 718, 691, 691, 718, 691, 691, 691,
691, 691, 691, 691, 691, 719, 691, 691, 691, 691,
720, 691, 691, 691, 691, 691, 691, 691, 691, 691,
721, 691, 691, 691, 691, 722, 704, 691, 705, 691,
723, 724, 723, 691, 723, 723, 723, 723, 723, 691,
691, 691, 691, 723, 691, 691, 691, 707, 691, 691,
708, 691, 691, 691, 691, 691, 710, 691, 691, 691,
725, 691, 691, 691, 691, 691, 712, 691, 691, 691,
726, 691, 691, 691, 691, 691, 691, 714, 691, 691,
691, 691, 691, 715, 691, 716, 691, 727, 728, 727,
691, 691, 691, 727, 718, 691, 691, 691, 729, 691,
730, 731, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 721, 691, 691, 691, 691,
722, 722, 691, 722, 722, 722, 722, 691, 705, 723,
691, 724, 723, 723, 723, 723, 723, 723, 723, 723,
723, 691, 723, 691, 725, 691, 726, 726, 691, 727,
691, 728, 691, 727, 727, 729, 730, 691, 731, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 722,
722, 722, 722, 705, 691, 723, 723, 723, 723, 723,
723, 723, 723, 723, 723, 723, 723, 691, 723, 691,
691, 691, 691, 691, 727, 727, 727, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 722, 722, 722, 722, 723,
723, 723, 723, 723, 723, 723, 723, 723, 723, 723,
723, 723, 691, 723, 727, 727, 727, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 722, 722, 722, 722, 722, 723,
723, 723, 723, 723, 723, 723, 723, 723, 723, 723,
723, 691, 732, 727, 727, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 722, 722, 722, 722, 722,
723, 723, 723, 723, 723, 723, 723, 723, 732, 732,
691, 732, 727, 727, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 722, 691, 722, 722, 722, 723, 723,
723, 691, 723, 723, 732, 727, 727, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 722, 691, 722, 722, 722, 691, 723, 723,
691, 723, 723, 727, 727, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 722, 691,
722, 722, 691, 691, 723, 723, 691, 691, 691, 691,
691, 691, 691, 691, 691, 722, 691, 722, 691, 691,
723, 691, 691, 691, 691, 691, 691, 722, 691, 722,
691, 691, 723, 691, 691, 691, 691, 691, 691, 722,
691, 722, 691, 691, 691, 691, 691, 691, 691, 691,
722, 691, 722, 691, 691, 691, 691, 691, 691, 691,
722, 691, 722, 691, 691, 691, 691, 691, 691, 691,
722, 691, 722, 691, 691, 691, 691, 691, 691, 691,
722, 691, 722, 691, 691, 691, 691, 691, 691, 691,
722, 691, 722, 691, 691, 691, 691, 691, 691, 691,
722, 691, 722, 691, 691, 691, 691, 691, 691, 691,
722, 691, 722, 691, 691, 691, 691, 691, 733, 691,
734, 735, 722, 691, 691, 691, 691, 691, 691, 733,
733, 733, 691, 691, 734, 734, 735, 735, 735, 722,
691, 691, 691, 691, 691, 691, 722, 691, 691, 691,
691, 722, 691, 691, 691, 691, 722, 691, 691, 691,
691, 722, 691, 691, 691, 691, 722, 691, 691, 691,
691, 722, 691, 691, 691, 691, 722, 691, 691, 691,
691, 722, 691, 691, 691, 722, 691, 691, 722, 691,
0, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691
} ;
static const flex_int32_t yy_nxt[1829] =
{ 0,
26, 27, 28, 29, 30, 31, 26, 26, 26, 26,
26, 32, 26, 26, 52, 53, 52, 53, 125, 54,
126, 54, 123, 124, 145, 146, 149, 150, 153, 154,
691, 26, 34, 26, 691, 35, 155, 156, 69, 70,
71, 72, 113, 114, 210, 73, 140, 74, 141, 158,
159, 115, 211, 36, 26, 37, 28, 38, 30, 31,
26, 26, 26, 26, 26, 32, 26, 26, 75, 69,
70, 71, 72, 108, 109, 116, 73, 160, 74, 161,
142, 163, 164, 231, 110, 26, 34, 26, 234, 39,
108, 109, 231, 113, 114, 141, 123, 143, 165, 75,
690, 110, 115, 111, 168, 169, 240, 36, 40, 40,
41, 42, 40, 40, 40, 40, 40, 43, 40, 40,
111, 40, 170, 187, 171, 166, 116, 173, 174, 142,
175, 176, 179, 180, 182, 183, 196, 197, 577, 40,
40, 40, 192, 40, 141, 141, 182, 193, 204, 205,
189, 187, 190, 191, 198, 200, 199, 207, 208, 212,
213, 40, 40, 40, 41, 42, 40, 40, 40, 40,
40, 43, 40, 40, 691, 40, 142, 587, 189, 142,
190, 191, 202, 273, 214, 203, 215, 123, 124, 231,
194, 233, 231, 40, 40, 40, 231, 40, 235, 231,
236, 282, 238, 237, 140, 273, 141, 239, 688, 141,
241, 141, 141, 123, 143, 40, 45, 45, 46, 47,
45, 48, 45, 45, 45, 45, 45, 45, 231, 45,
145, 146, 149, 150, 153, 244, 243, 370, 142, 155,
156, 158, 159, 142, 163, 164, 142, 45, 50, 45,
231, 45, 168, 169, 173, 174, 175, 176, 179, 180,
182, 183, 254, 251, 261, 192, 261, 141, 687, 45,
45, 45, 46, 47, 45, 48, 45, 45, 45, 45,
45, 45, 274, 45, 251, 217, 231, 217, 141, 182,
193, 691, 255, 196, 197, 204, 205, 691, 218, 142,
291, 45, 50, 45, 274, 45, 207, 208, 212, 213,
219, 262, 220, 231, 231, 281, 691, 280, 290, 288,
218, 231, 142, 45, 56, 57, 58, 59, 231, 60,
61, 62, 219, 63, 220, 231, 289, 281, 231, 280,
281, 231, 292, 231, 294, 378, 299, 297, 691, 293,
153, 244, 286, 64, 65, 66, 287, 67, 56, 57,
58, 59, 283, 60, 61, 62, 251, 63, 305, 231,
231, 295, 306, 231, 301, 302, 231, 307, 337, 261,
338, 261, 296, 563, 313, 251, 314, 64, 65, 66,
316, 67, 76, 76, 77, 78, 76, 76, 76, 76,
76, 79, 76, 76, 248, 76, 313, 317, 314, 319,
320, 321, 316, 322, 323, 323, 231, 691, 301, 302,
330, 342, 685, 76, 81, 76, 262, 76, 691, 317,
691, 319, 320, 321, 231, 322, 323, 325, 328, 231,
326, 327, 231, 416, 344, 76, 76, 76, 77, 78,
76, 76, 76, 76, 76, 79, 76, 76, 691, 76,
328, 331, 326, 327, 231, 231, 231, 231, 231, 327,
333, 231, 332, 334, 335, 231, 339, 76, 81, 76,
336, 76, 231, 345, 346, 251, 383, 341, 383, 340,
347, 329, 351, 352, 353, 354, 355, 251, 251, 76,
82, 83, 84, 85, 86, 87, 82, 82, 82, 82,
82, 82, 82, 82, 351, 352, 353, 354, 355, 356,
357, 358, 691, 359, 361, 362, 363, 360, 362, 371,
231, 82, 89, 82, 691, 90, 373, 231, 384, 409,
231, 356, 357, 374, 358, 359, 361, 362, 363, 360,
364, 251, 365, 82, 82, 91, 84, 92, 86, 87,
82, 82, 82, 82, 82, 82, 82, 82, 231, 231,
231, 222, 231, 223, 365, 691, 376, 265, 381, 265,
372, 231, 375, 691, 224, 82, 89, 82, 231, 93,
266, 379, 385, 377, 691, 231, 225, 367, 226, 366,
380, 368, 267, 251, 268, 390, 224, 82, 95, 96,
97, 98, 266, 99, 100, 101, 102, 103, 227, 367,
226, 475, 366, 368, 267, 383, 268, 383, 390, 383,
691, 383, 389, 393, 394, 411, 391, 104, 101, 105,
392, 106, 95, 96, 97, 98, 366, 99, 100, 101,
102, 103, 397, 231, 389, 393, 231, 394, 391, 231,
231, 413, 392, 251, 415, 436, 395, 436, 398, 369,
396, 104, 101, 105, 397, 106, 117, 117, 118, 119,
117, 117, 117, 117, 117, 117, 117, 120, 395, 117,
398, 399, 396, 401, 402, 231, 403, 402, 412, 231,
404, 691, 417, 418, 231, 691, 691, 117, 117, 117,
414, 117, 444, 399, 445, 401, 231, 402, 403, 452,
405, 231, 404, 420, 421, 422, 451, 406, 408, 117,
117, 117, 118, 119, 117, 117, 117, 117, 117, 117,
117, 120, 269, 117, 269, 217, 222, 217, 223, 406,
408, 223, 518, 223, 691, 270, 452, 423, 218, 224,
428, 117, 117, 117, 276, 117, 481, 271, 691, 272,
219, 225, 220, 226, 407, 251, 277, 270, 278, 424,
218, 224, 428, 117, 130, 429, 276, 430, 407, 271,
231, 272, 219, 227, 220, 226, 407, 251, 279, 265,
278, 265, 438, 269, 461, 269, 461, 429, 575, 430,
410, 132, 266, 133, 134, 432, 270, 433, 135, 136,
434, 397, 137, 437, 267, 438, 268, 138, 271, 439,
272, 139, 130, 440, 266, 441, 440, 432, 270, 433,
691, 684, 434, 397, 585, 437, 267, 231, 268, 691,
271, 439, 272, 691, 691, 440, 428, 441, 443, 132,
406, 133, 134, 453, 406, 446, 135, 136, 447, 231,
137, 144, 449, 231, 691, 138, 450, 231, 428, 139,
454, 462, 406, 421, 455, 463, 448, 446, 420, 421,
422, 447, 420, 421, 422, 456, 251, 457, 251, 464,
432, 464, 465, 462, 466, 436, 469, 436, 463, 445,
439, 445, 470, 471, 444, 439, 445, 445, 691, 445,
657, 477, 432, 478, 465, 479, 231, 466, 469, 480,
231, 460, 439, 467, 470, 231, 471, 472, 491, 231,
482, 494, 473, 476, 483, 474, 421, 455, 484, 251,
485, 251, 486, 495, 486, 467, 461, 464, 461, 464,
491, 397, 691, 494, 473, 476, 496, 474, 498, 478,
500, 478, 691, 691, 477, 495, 478, 231, 488, 231,
506, 505, 510, 397, 489, 492, 499, 478, 496, 478,
498, 501, 500, 486, 428, 486, 511, 406, 512, 691,
432, 513, 473, 514, 510, 397, 489, 492, 499, 439,
515, 517, 683, 501, 691, 474, 428, 691, 511, 406,
512, 502, 432, 513, 473, 514, 231, 397, 516, 525,
428, 439, 515, 517, 503, 521, 526, 474, 432, 406,
507, 527, 439, 530, 691, 529, 231, 537, 538, 539,
516, 525, 428, 691, 541, 533, 691, 548, 526, 549,
432, 406, 550, 527, 439, 528, 691, 529, 552, 537,
538, 539, 691, 558, 559, 560, 541, 691, 540, 548,
562, 549, 691, 568, 550, 551, 569, 528, 561, 570,
552, 691, 572, 578, 579, 558, 559, 560, 580, 691,
540, 582, 562, 691, 542, 568, 588, 551, 569, 553,
561, 570, 589, 581, 572, 578, 579, 571, 583, 691,
584, 580, 600, 584, 582, 584, 586, 691, 586, 588,
573, 583, 602, 584, 591, 589, 581, 608, 584, 571,
584, 586, 609, 586, 600, 610, 691, 612, 691, 601,
618, 619, 620, 622, 602, 691, 603, 681, 628, 608,
628, 611, 691, 631, 609, 632, 629, 593, 610, 691,
612, 601, 618, 619, 594, 620, 622, 621, 691, 691,
596, 633, 691, 633, 611, 691, 636, 613, 637, 634,
639, 628, 637, 628, 631, 623, 632, 691, 691, 629,
621, 631, 633, 632, 633, 636, 639, 637, 637, 639,
634, 637, 640, 647, 691, 691, 680, 691, 679, 678,
676, 675, 674, 652, 673, 671, 670, 667, 669, 662,
668, 666, 665, 677, 672, 664, 663, 661, 660, 659,
658, 656, 655, 654, 653, 651, 650, 649, 648, 691,
691, 646, 686, 689, 691, 645, 644, 643, 642, 641,
627, 626, 682, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, 44, 44, 49, 49, 49,
49, 49, 49, 49, 49, 49, 49, 49, 49, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
51, 55, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 68, 68, 68, 68, 68, 68, 68,
68, 68, 68, 68, 68, 80, 80, 80, 80, 80,
80, 80, 80, 80, 80, 80, 80, 88, 88, 88,
88, 88, 88, 88, 88, 88, 88, 88, 88, 94,
94, 94, 94, 94, 94, 94, 94, 94, 94, 94,
94, 107, 107, 107, 107, 107, 107, 107, 107, 107,
107, 107, 107, 112, 112, 112, 112, 112, 112, 112,
112, 112, 112, 112, 112, 121, 121, 121, 121, 121,
121, 121, 121, 121, 121, 121, 121, 127, 625, 624,
617, 127, 127, 127, 129, 616, 615, 614, 129, 129,
129, 129, 129, 129, 129, 129, 131, 607, 606, 605,
604, 599, 131, 131, 148, 148, 151, 151, 152, 152,
152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
157, 157, 598, 597, 595, 157, 592, 590, 157, 157,
157, 157, 162, 162, 162, 162, 162, 162, 162, 162,
162, 162, 162, 162, 167, 167, 577, 576, 575, 167,
167, 574, 167, 167, 167, 167, 172, 172, 172, 172,
172, 172, 172, 172, 172, 172, 172, 172, 178, 178,
184, 567, 566, 565, 184, 184, 184, 186, 564, 557,
556, 186, 186, 186, 186, 186, 186, 186, 188, 555,
554, 547, 546, 545, 188, 188, 195, 195, 231, 544,
543, 195, 536, 535, 534, 195, 195, 201, 532, 531,
524, 523, 522, 201, 201, 206, 206, 231, 206, 206,
206, 206, 206, 206, 206, 206, 206, 216, 216, 221,
221, 520, 221, 221, 221, 221, 221, 221, 221, 221,
221, 230, 519, 509, 508, 230, 230, 230, 232, 251,
251, 504, 232, 232, 232, 232, 232, 232, 232, 245,
245, 231, 231, 245, 245, 245, 245, 245, 245, 245,
245, 247, 247, 497, 493, 247, 247, 247, 247, 247,
247, 247, 247, 250, 490, 487, 231, 250, 250, 250,
252, 468, 460, 459, 252, 252, 252, 252, 252, 252,
252, 252, 256, 256, 458, 231, 256, 256, 256, 256,
256, 256, 256, 256, 257, 231, 442, 435, 257, 257,
257, 259, 431, 427, 426, 259, 259, 259, 259, 259,
259, 259, 259, 419, 419, 419, 419, 419, 419, 419,
419, 419, 419, 419, 419, 630, 630, 425, 630, 630,
630, 630, 630, 630, 630, 630, 630, 635, 635, 231,
635, 635, 635, 635, 635, 635, 635, 635, 635, 638,
638, 231, 638, 638, 638, 638, 638, 638, 638, 638,
638, 231, 231, 400, 388, 387, 386, 382, 231, 350,
349, 348, 343, 284, 324, 318, 315, 312, 311, 310,
309, 258, 308, 258, 304, 251, 303, 251, 248, 300,
298, 231, 285, 231, 284, 691, 275, 264, 263, 260,
258, 253, 251, 185, 249, 185, 181, 248, 246, 242,
231, 229, 228, 128, 122, 209, 185, 181, 177, 147,
128, 122, 691, 25, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691
} ;
static const flex_int32_t yy_chk[1829] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 7, 7, 8, 8, 32, 7,
32, 8, 29, 29, 42, 42, 47, 47, 50, 50,
689, 1, 1, 1, 0, 1, 53, 53, 11, 11,
11, 11, 21, 21, 116, 11, 37, 11, 37, 57,
57, 21, 116, 1, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 11, 12,
12, 12, 12, 19, 19, 21, 12, 63, 12, 63,
37, 65, 65, 135, 19, 2, 2, 2, 135, 2,
20, 20, 138, 22, 22, 38, 38, 38, 67, 12,
687, 20, 22, 19, 70, 70, 138, 2, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
20, 3, 74, 90, 74, 67, 22, 75, 75, 38,
78, 78, 81, 81, 85, 85, 96, 96, 577, 3,
3, 3, 91, 3, 91, 92, 92, 92, 109, 109,
90, 93, 90, 90, 103, 106, 103, 114, 114, 119,
119, 3, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 226, 4, 91, 577, 93, 92,
93, 93, 106, 218, 120, 106, 120, 124, 124, 136,
93, 133, 133, 4, 4, 4, 137, 4, 136, 139,
136, 226, 137, 136, 140, 218, 140, 137, 684, 141,
139, 141, 143, 143, 143, 4, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 144, 5,
146, 146, 150, 150, 154, 154, 144, 330, 140, 156,
156, 159, 159, 141, 164, 164, 143, 5, 5, 5,
330, 5, 169, 169, 174, 174, 176, 176, 180, 180,
183, 183, 190, 190, 209, 192, 209, 192, 683, 5,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 219, 6, 194, 125, 237, 125, 193, 193,
193, 225, 194, 197, 197, 205, 205, 224, 125, 192,
237, 6, 6, 6, 219, 6, 208, 208, 213, 213,
125, 209, 125, 234, 236, 225, 227, 224, 236, 234,
125, 235, 193, 6, 9, 9, 9, 9, 339, 9,
9, 9, 125, 9, 125, 243, 235, 225, 238, 224,
227, 239, 238, 241, 239, 339, 243, 241, 553, 238,
244, 244, 233, 9, 9, 9, 233, 9, 10, 10,
10, 10, 227, 10, 10, 10, 255, 10, 254, 233,
240, 240, 254, 292, 248, 248, 293, 255, 292, 261,
293, 261, 240, 553, 266, 254, 267, 10, 10, 10,
270, 10, 13, 13, 13, 13, 13, 13, 13, 13,
13, 13, 13, 13, 248, 13, 266, 271, 267, 273,
274, 275, 270, 276, 277, 279, 297, 282, 302, 302,
286, 297, 680, 13, 13, 13, 261, 13, 280, 271,
281, 273, 274, 275, 286, 276, 277, 279, 282, 299,
280, 281, 379, 379, 299, 13, 14, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 14, 283, 14,
282, 287, 280, 281, 288, 289, 290, 294, 291, 283,
289, 296, 288, 289, 290, 287, 294, 14, 14, 14,
291, 14, 295, 305, 306, 307, 382, 296, 382, 295,
307, 283, 313, 314, 315, 316, 317, 305, 306, 14,
15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
15, 15, 15, 15, 313, 314, 315, 316, 317, 318,
319, 320, 368, 321, 322, 323, 324, 321, 325, 331,
334, 15, 15, 15, 326, 15, 334, 335, 345, 368,
331, 318, 319, 335, 320, 321, 322, 323, 324, 321,
325, 345, 326, 15, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 336, 332,
337, 126, 342, 126, 326, 328, 337, 214, 342, 214,
332, 340, 336, 327, 126, 16, 16, 16, 338, 16,
214, 340, 346, 338, 446, 341, 126, 328, 126, 327,
341, 328, 214, 346, 214, 352, 126, 16, 17, 17,
17, 17, 214, 17, 17, 17, 17, 17, 126, 328,
126, 446, 327, 328, 214, 344, 214, 344, 352, 347,
329, 347, 351, 354, 355, 370, 353, 17, 17, 17,
353, 17, 18, 18, 18, 18, 329, 18, 18, 18,
18, 18, 357, 370, 351, 354, 372, 355, 353, 344,
378, 372, 353, 347, 378, 397, 356, 397, 358, 329,
356, 18, 18, 18, 357, 18, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 23, 356, 23,
358, 359, 356, 361, 362, 381, 363, 364, 371, 380,
363, 365, 380, 381, 377, 367, 502, 23, 23, 23,
377, 23, 406, 359, 406, 361, 371, 362, 363, 452,
364, 415, 363, 383, 383, 383, 415, 365, 367, 23,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 215, 24, 215, 217, 222, 217, 222, 365,
367, 223, 502, 223, 366, 215, 416, 384, 217, 222,
389, 24, 24, 24, 223, 24, 452, 215, 369, 215,
217, 222, 217, 222, 366, 384, 223, 215, 223, 385,
217, 222, 389, 24, 35, 390, 223, 391, 369, 215,
416, 215, 217, 222, 217, 222, 366, 385, 223, 265,
223, 265, 400, 269, 428, 269, 428, 390, 575, 391,
369, 35, 265, 35, 35, 393, 269, 394, 35, 35,
395, 398, 35, 399, 265, 400, 265, 35, 269, 401,
269, 35, 39, 402, 265, 403, 405, 393, 269, 394,
408, 679, 395, 398, 575, 399, 265, 417, 265, 407,
269, 401, 269, 410, 409, 402, 429, 403, 405, 39,
407, 39, 39, 417, 410, 408, 39, 39, 409, 418,
39, 39, 411, 411, 652, 39, 412, 412, 429, 39,
418, 430, 407, 419, 419, 431, 410, 408, 420, 420,
420, 409, 422, 422, 422, 423, 423, 424, 424, 432,
433, 432, 434, 430, 435, 436, 438, 436, 431, 439,
440, 439, 441, 442, 444, 443, 444, 445, 447, 445,
652, 448, 433, 448, 434, 449, 449, 435, 438, 450,
450, 460, 440, 436, 441, 453, 442, 443, 463, 454,
453, 466, 444, 447, 454, 445, 455, 455, 456, 456,
457, 457, 458, 467, 458, 436, 461, 464, 461, 464,
463, 468, 473, 466, 444, 447, 469, 445, 471, 472,
474, 472, 475, 476, 477, 467, 477, 482, 460, 483,
483, 482, 489, 468, 461, 464, 473, 478, 469, 478,
471, 476, 474, 486, 490, 486, 491, 475, 492, 518,
493, 494, 477, 495, 489, 496, 461, 464, 473, 497,
498, 500, 678, 476, 501, 478, 490, 499, 491, 475,
492, 477, 493, 494, 477, 495, 506, 496, 499, 510,
511, 497, 498, 500, 478, 506, 512, 478, 513, 501,
486, 514, 515, 518, 516, 517, 521, 525, 526, 527,
499, 510, 511, 528, 529, 521, 530, 537, 512, 538,
513, 501, 539, 514, 515, 516, 540, 517, 541, 525,
526, 527, 542, 548, 549, 550, 529, 551, 528, 537,
552, 538, 563, 558, 539, 540, 559, 516, 551, 560,
541, 561, 562, 568, 569, 548, 549, 550, 570, 571,
528, 572, 552, 581, 530, 558, 578, 540, 559, 542,
551, 560, 579, 571, 562, 568, 569, 561, 573, 593,
573, 570, 590, 574, 572, 574, 576, 591, 576, 578,
563, 583, 592, 583, 581, 579, 571, 598, 584, 561,
584, 586, 599, 586, 590, 600, 601, 602, 603, 591,
608, 609, 610, 612, 592, 613, 593, 676, 618, 598,
618, 601, 611, 619, 599, 619, 618, 583, 600, 623,
602, 591, 608, 609, 584, 610, 612, 611, 647, 662,
586, 620, 640, 620, 601, 657, 621, 603, 621, 620,
622, 628, 622, 628, 631, 613, 631, 667, 672, 628,
611, 632, 633, 632, 633, 636, 637, 636, 637, 639,
633, 639, 623, 640, 677, 682, 675, 686, 674, 673,
671, 670, 669, 647, 668, 666, 665, 662, 664, 657,
663, 661, 660, 672, 667, 659, 658, 656, 655, 654,
653, 651, 650, 649, 648, 644, 643, 642, 641, 638,
635, 634, 682, 686, 630, 629, 627, 626, 625, 624,
617, 616, 677, 692, 692, 692, 692, 692, 692, 692,
692, 692, 692, 692, 692, 693, 693, 693, 693, 693,
693, 693, 693, 693, 693, 693, 693, 694, 694, 694,
694, 694, 694, 694, 694, 694, 694, 694, 694, 695,
695, 695, 695, 695, 695, 695, 695, 695, 695, 695,
695, 696, 696, 696, 696, 696, 696, 696, 696, 696,
696, 696, 696, 697, 697, 697, 697, 697, 697, 697,
697, 697, 697, 697, 697, 698, 698, 698, 698, 698,
698, 698, 698, 698, 698, 698, 698, 699, 699, 699,
699, 699, 699, 699, 699, 699, 699, 699, 699, 700,
700, 700, 700, 700, 700, 700, 700, 700, 700, 700,
700, 701, 701, 701, 701, 701, 701, 701, 701, 701,
701, 701, 701, 702, 702, 702, 702, 702, 702, 702,
702, 702, 702, 702, 702, 703, 703, 703, 703, 703,
703, 703, 703, 703, 703, 703, 703, 704, 615, 614,
607, 704, 704, 704, 705, 606, 605, 604, 705, 705,
705, 705, 705, 705, 705, 705, 706, 597, 596, 595,
594, 589, 706, 706, 707, 707, 708, 708, 709, 709,
709, 709, 709, 709, 709, 709, 709, 709, 709, 709,
710, 710, 588, 587, 585, 710, 582, 580, 710, 710,
710, 710, 711, 711, 711, 711, 711, 711, 711, 711,
711, 711, 711, 711, 712, 712, 567, 566, 565, 712,
712, 564, 712, 712, 712, 712, 713, 713, 713, 713,
713, 713, 713, 713, 713, 713, 713, 713, 714, 714,
715, 557, 556, 555, 715, 715, 715, 716, 554, 547,
545, 716, 716, 716, 716, 716, 716, 716, 717, 544,
543, 536, 535, 534, 717, 717, 718, 718, 533, 532,
531, 718, 524, 523, 522, 718, 718, 719, 520, 519,
509, 508, 507, 719, 719, 720, 720, 505, 720, 720,
720, 720, 720, 720, 720, 720, 720, 721, 721, 722,
722, 504, 722, 722, 722, 722, 722, 722, 722, 722,
722, 723, 503, 488, 487, 723, 723, 723, 724, 485,
484, 481, 724, 724, 724, 724, 724, 724, 724, 725,
725, 480, 479, 725, 725, 725, 725, 725, 725, 725,
725, 726, 726, 470, 465, 726, 726, 726, 726, 726,
726, 726, 726, 727, 462, 459, 451, 727, 727, 727,
728, 437, 427, 426, 728, 728, 728, 728, 728, 728,
728, 728, 729, 729, 425, 414, 729, 729, 729, 729,
729, 729, 729, 729, 730, 413, 404, 396, 730, 730,
730, 731, 392, 388, 387, 731, 731, 731, 731, 731,
731, 731, 731, 732, 732, 732, 732, 732, 732, 732,
732, 732, 732, 732, 732, 733, 733, 386, 733, 733,
733, 733, 733, 733, 733, 733, 733, 734, 734, 376,
734, 734, 734, 734, 734, 734, 734, 734, 734, 735,
735, 375, 735, 735, 735, 735, 735, 735, 735, 735,
735, 374, 373, 360, 350, 349, 348, 343, 333, 312,
311, 310, 298, 284, 278, 272, 268, 264, 263, 262,
260, 259, 258, 257, 253, 252, 251, 250, 247, 246,
242, 232, 231, 230, 229, 221, 220, 211, 210, 202,
201, 189, 188, 186, 185, 184, 181, 171, 166, 142,
131, 129, 128, 127, 122, 115, 88, 83, 79, 43,
33, 27, 25, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691, 691, 691,
691, 691, 691, 691, 691, 691, 691, 691
} ;
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
static int yy_more_flag = 0;
static int yy_more_len = 0;
#define yymore() ((yy_more_flag) = 1)
#define YY_MORE_ADJ (yy_more_len)
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "VPreLex.l"
#line 6 "VPreLex.l"
/******************************************************************************
* DESCRIPTION: Verilog Preprocessor Lexer
*
* This file is part of Verilog-Perl.
*
* Author: Wilson Snyder <wsnyder@wsnyder.org>
*
* Code available from: https://www.veripool.org/verilog-perl
*
******************************************************************************
*
* Copyright 2000-2024 by Wilson Snyder. This program is free software;
* you can redistribute it and/or modify it under the terms of either the GNU
* Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*****************************************************************************
* Do not use Flex in C++ mode. It has bugs with yyunput() which result in
* lost characters.
*****************************************************************************/
#include "VPreProc.h"
#include "VPreLex.h"
#include <cstdio>
#include <cstdarg>
#include <cstring>
#include <iostream>
// Flex 2.5.35 has compile warning in ECHO, so we'll default our own rule
#define ECHO yyerrorf("Missing VPreLex.l rule: ECHO rule invoked in state %d: %s", YY_START, yytext);
VPreLex* VPreLex::s_currentLexp = NULL; // Current lexing point
#define LEXP VPreLex::s_currentLexp
#define linenoInc() { LEXP->linenoInc(); }
static bool pedantic() { return LEXP->m_pedantic; }
static bool keepWhitespace() { return LEXP->m_keepWhitespace; }
static void appendDefValue(const char* t, size_t l) { LEXP->appendDefValue(t,l); }
void yyerror(char* msg) { LEXP->curFilelinep()->error(msg); }
#define YY_INPUT(buf,result,max_size) \
result = LEXP->inputToLex(buf,max_size);
// Accessors, because flex keeps changing the type of yyleng
char* yyourtext() { return yytext; }
size_t yyourleng() { return (size_t)yyleng; }
void yyourtext(const char* textp, size_t size) { yytext=(char*)textp; yyleng=size; }
void yyerrorf(const char* format, ...) {
char msg[1024];
va_list ap;
va_start(ap,format);
vsprintf(msg,format,ap);
va_end(ap);
yyerror(msg);
}
static bool isWhitespace(const std::string& str) {
for (std::string::const_iterator pos = str.begin(); pos != str.end(); ++pos) {
if (!isspace(*pos)) return false;
}
return true;
}
/**********************************************************************/
#line 1421 "VPreLex_pretmp.cpp"
/* drop: Drop Ctrl-Z - can't pass thru or may EOF the output too soon */
/* Where we use symb/symbdef, we must also look for a `` join */
/* Note in the preprocessor \ESCaped is *not* always special; mantis1537/bug441 */
/* Case insensitive; unfortunately ?i: isn't in flex 2.5.4 which is popular */
#line 119 "VPreLex.l"
/**************************************************************/
#line 1429 "VPreLex_pretmp.cpp"
#define INITIAL 0
#define CMTMODE 1
#define STRMODE 2
#define DEFFPAR 3
#define DEFFORM 4
#define DEFVAL 5
#define DEFCMT 6
#define STRIFY 7
#define ARGMODE 8
#define INCMODE 9
#define PRTMODE 10
#define OFFMODE 11
#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 );
int 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
static void yyunput ( int c, char *buf_ptr );
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy ( char *, const char *, int );
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen ( const char * );
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput ( void );
#else
static int input ( void );
#endif
#endif
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = NULL;
static void yy_push_state ( int _new_state );
static void yy_pop_state ( void );
static int yy_top_state ( void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO do { if (fwrite( yytext, (size_t) 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 = '*'; \
int 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 = (int) fread(buf, 1, (yy_size_t) 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 \
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
{
yy_state_type yy_current_state;
char *yy_cp, *yy_bp;
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 120 "VPreLex.l"
#line 1673 "VPreLex_pretmp.cpp"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
(yy_more_len) = 0;
if ( (yy_more_flag) )
{
(yy_more_len) = (int) ((yy_c_buf_p) - (yytext_ptr));
(yy_more_flag) = 0;
}
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
{
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 >= 692 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 1774 );
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 122 "VPreLex.l"
{ }
YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
#line 123 "VPreLex.l"
{ LEXP->lineDirective(yytext);
return(VP_LINE); }
YY_BREAK
/* Special directives we recognize */
case 3:
YY_RULE_SETUP
#line 127 "VPreLex.l"
{ return(VP_DEFINE); }
YY_BREAK
case 4:
YY_RULE_SETUP
#line 128 "VPreLex.l"
{ return(VP_ELSE); }
YY_BREAK
case 5:
YY_RULE_SETUP
#line 129 "VPreLex.l"
{ return(VP_ELSIF); }
YY_BREAK
case 6:
YY_RULE_SETUP
#line 130 "VPreLex.l"
{ return(VP_ENDIF); }
YY_BREAK
case 7:
YY_RULE_SETUP
#line 131 "VPreLex.l"
{ return(VP_IFDEF); }
YY_BREAK
case 8:
YY_RULE_SETUP
#line 132 "VPreLex.l"
{ return(VP_IFNDEF); }
YY_BREAK
case 9:
YY_RULE_SETUP
#line 133 "VPreLex.l"
{ return(VP_INCLUDE); }
YY_BREAK
case 10:
YY_RULE_SETUP
#line 134 "VPreLex.l"
{ return(VP_UNDEF); }
YY_BREAK
case 11:
YY_RULE_SETUP
#line 135 "VPreLex.l"
{ return(VP_UNDEFINEALL); }
YY_BREAK
case 12:
YY_RULE_SETUP
#line 136 "VPreLex.l"
{ if (!pedantic()) return (VP_ERROR); else return(VP_DEFREF); }
YY_BREAK
case 13:
YY_RULE_SETUP
#line 137 "VPreLex.l"
{ static string rtnfile;
rtnfile = '"'; rtnfile += LEXP->curFilelinep()->filename();
rtnfile += '"'; yytext=(char*)rtnfile.c_str(); yyleng = rtnfile.length();
return (VP_STRING); }
YY_BREAK
case 14:
YY_RULE_SETUP
#line 141 "VPreLex.l"
{ static char buf[10];
sprintf(buf, "%d",LEXP->curFilelinep()->lineno());
yytext = buf; yyleng = strlen(yytext);
return (VP_TEXT); }
YY_BREAK
/* Pass-through strings */
case 15:
YY_RULE_SETUP
#line 147 "VPreLex.l"
{ yy_push_state(STRMODE); yymore(); }
YY_BREAK
case YY_STATE_EOF(STRMODE):
#line 148 "VPreLex.l"
{ linenoInc(); yyerrorf("EOF in unterminated string"); yyleng=0; yyterminate(); }
YY_BREAK
case 16:
/* rule 16 can match eol */
YY_RULE_SETUP
#line 149 "VPreLex.l"
{ linenoInc(); yyerrorf("Unterminated string"); BEGIN(INITIAL); }
YY_BREAK
case 17:
YY_RULE_SETUP
#line 150 "VPreLex.l"
{ yymore(); }
YY_BREAK
case 18:
/* rule 18 can match eol */
YY_RULE_SETUP
#line 151 "VPreLex.l"
{ yymore(); }
YY_BREAK
case 19:
/* rule 19 can match eol */
YY_RULE_SETUP
#line 152 "VPreLex.l"
{ linenoInc(); yymore(); }
YY_BREAK
case 20:
YY_RULE_SETUP
#line 153 "VPreLex.l"
{ yymore(); }
YY_BREAK
case 21:
YY_RULE_SETUP
#line 154 "VPreLex.l"
{ yy_pop_state();
if (LEXP->m_parenLevel || LEXP->m_defQuote) { LEXP->m_defQuote=false; appendDefValue(yytext,yyleng); yyleng=0; }
else return (VP_STRING); }
YY_BREAK
/* Stringification */
case 22:
YY_RULE_SETUP
#line 159 "VPreLex.l"
{ yy_push_state(STRIFY); return VP_STRIFY; }
YY_BREAK
case YY_STATE_EOF(STRIFY):
#line 160 "VPreLex.l"
{ linenoInc(); yyerrorf("EOF in unterminated '\""); yyleng=0; yyterminate(); }
YY_BREAK
case 23:
YY_RULE_SETUP
#line 161 "VPreLex.l"
{ return VP_BACKQUOTE; }
YY_BREAK
case 24:
YY_RULE_SETUP
#line 162 "VPreLex.l"
{ yy_push_state(STRMODE); yymore(); }
YY_BREAK
case 25:
YY_RULE_SETUP
#line 163 "VPreLex.l"
{ yy_pop_state(); return VP_STRIFY; }
YY_BREAK
case 26:
YY_RULE_SETUP
#line 164 "VPreLex.l"
{ return (VP_SYMBOL); }
YY_BREAK
case 27:
YY_RULE_SETUP
#line 165 "VPreLex.l"
{ yyleng-=2; return (VP_SYMBOL_JOIN); }
YY_BREAK
case 28:
YY_RULE_SETUP
#line 166 "VPreLex.l"
{ return (VP_DEFREF); }
YY_BREAK
case 29:
YY_RULE_SETUP
#line 167 "VPreLex.l"
{ yyleng-=2; return (VP_DEFREF_JOIN); }
YY_BREAK
case 30:
YY_RULE_SETUP
#line 168 "VPreLex.l"
{ yyleng-=2; return (VP_JOIN); }
YY_BREAK
case 31:
/* rule 31 can match eol */
YY_RULE_SETUP
#line 169 "VPreLex.l"
{ linenoInc(); yytext=(char*)"\n"; yyleng=1; return(VP_WHITE); }
YY_BREAK
case 32:
YY_RULE_SETUP
#line 170 "VPreLex.l"
{ return (VP_WHITE); }
YY_BREAK
case 33:
YY_RULE_SETUP
#line 171 "VPreLex.l"
{ }
YY_BREAK
case 34:
YY_RULE_SETUP
#line 172 "VPreLex.l"
{ }
YY_BREAK
case 35:
YY_RULE_SETUP
#line 173 "VPreLex.l"
{ return (VP_TEXT); }
YY_BREAK
/* Protected blocks */
case 36:
YY_RULE_SETUP
#line 176 "VPreLex.l"
{ yy_push_state(PRTMODE); yymore(); }
YY_BREAK
case 37:
YY_RULE_SETUP
#line 177 "VPreLex.l"
{ yy_push_state(PRTMODE); yymore(); }
YY_BREAK
case 38:
YY_RULE_SETUP
#line 178 "VPreLex.l"
{ yy_push_state(PRTMODE); yymore(); }
YY_BREAK
case YY_STATE_EOF(PRTMODE):
#line 179 "VPreLex.l"
{ linenoInc(); yyerrorf("EOF in `protected"); yyleng=0; yyterminate(); }
YY_BREAK
case 39:
/* rule 39 can match eol */
YY_RULE_SETUP
#line 180 "VPreLex.l"
{ linenoInc(); return VP_TEXT; }
YY_BREAK
case 40:
YY_RULE_SETUP
#line 181 "VPreLex.l"
{ yymore(); }
YY_BREAK
case 41:
YY_RULE_SETUP
#line 182 "VPreLex.l"
{ yy_pop_state(); return VP_TEXT; }
YY_BREAK
case 42:
YY_RULE_SETUP
#line 183 "VPreLex.l"
{ yy_pop_state(); return VP_TEXT; }
YY_BREAK
case 43:
YY_RULE_SETUP
#line 184 "VPreLex.l"
{ yy_pop_state(); return VP_TEXT; }
YY_BREAK
/* Pass-through include <> filenames */
case YY_STATE_EOF(INCMODE):
#line 187 "VPreLex.l"
{ linenoInc(); yyerrorf("EOF in unterminated include filename"); yyleng=0; yyterminate(); }
YY_BREAK
case 44:
/* rule 44 can match eol */
YY_RULE_SETUP
#line 188 "VPreLex.l"
{ linenoInc(); yyerrorf("Unterminated include filename"); BEGIN(INITIAL); }
YY_BREAK
case 45:
/* rule 45 can match eol */
YY_RULE_SETUP
#line 189 "VPreLex.l"
{ yymore(); }
YY_BREAK
case 46:
YY_RULE_SETUP
#line 190 "VPreLex.l"
{ yymore(); }
YY_BREAK
case 47:
YY_RULE_SETUP
#line 191 "VPreLex.l"
{ yy_pop_state(); return VP_STRING; }
YY_BREAK
/* Reading definition formal parenthesis (or not) to begin formal arguments */
/* Note '(' must IMMEDIATELY follow definition name */
case 48:
YY_RULE_SETUP
#line 195 "VPreLex.l"
{ appendDefValue("(",1); LEXP->m_formalLevel=1; BEGIN(DEFFORM); }
YY_BREAK
case 49:
/* rule 49 can match eol */
YY_RULE_SETUP
#line 196 "VPreLex.l"
{ yy_pop_state(); unput('\n'); yyleng=0; return VP_DEFFORM; } /* DEFVAL will later grab the return */
YY_BREAK
case YY_STATE_EOF(DEFFPAR):
#line 197 "VPreLex.l"
{ yy_pop_state(); return VP_DEFFORM; } /* empty formals */
YY_BREAK
case 50:
YY_RULE_SETUP
#line 198 "VPreLex.l"
{ yy_pop_state(); unput(yytext[yyleng-1]); yyleng=0; return VP_DEFFORM; } /* empty formals */
YY_BREAK
/* Reading definition formals (declaration of a define) */
case 51:
YY_RULE_SETUP
#line 201 "VPreLex.l"
{ appendDefValue(yytext,yyleng); yyleng=0; ++LEXP->m_formalLevel; }
YY_BREAK
case 52:
YY_RULE_SETUP
#line 202 "VPreLex.l"
{ appendDefValue(yytext,yyleng); yyleng=0; if ((--LEXP->m_formalLevel)==0) { yy_pop_state(); return VP_DEFFORM; } }
YY_BREAK
case 53:
YY_RULE_SETUP
#line 203 "VPreLex.l"
{ yy_push_state(CMTMODE); yymore(); }
YY_BREAK
case 54:
YY_RULE_SETUP
#line 204 "VPreLex.l"
{ return (VP_COMMENT);}
YY_BREAK
case 55:
YY_RULE_SETUP
#line 205 "VPreLex.l"
{ }
YY_BREAK
case YY_STATE_EOF(DEFFORM):
#line 206 "VPreLex.l"
{ linenoInc(); yy_pop_state(); yyerrorf("Unterminated ( in define formal arguments."); yyleng=0; return VP_DEFFORM; }
YY_BREAK
case 56:
/* rule 56 can match eol */
YY_RULE_SETUP
#line 207 "VPreLex.l"
{ linenoInc(); appendDefValue((char*)"\n",1); } /* Include return so can maintain output line count */
YY_BREAK
case 57:
/* rule 57 can match eol */
YY_RULE_SETUP
#line 208 "VPreLex.l"
{ linenoInc(); appendDefValue((char*)"\\\n",2); } /* Include return so can maintain output line count */
YY_BREAK
case 58:
YY_RULE_SETUP
#line 209 "VPreLex.l"
{ LEXP->m_defQuote=true; yy_push_state(STRMODE); yymore(); } /* Legal only in default values */
YY_BREAK
case 59:
YY_RULE_SETUP
#line 210 "VPreLex.l"
{ appendDefValue(yytext,yyleng); } /* Maybe illegal, otherwise in default value */
YY_BREAK
case 60:
YY_RULE_SETUP
#line 211 "VPreLex.l"
{ appendDefValue(yytext,yyleng); } /* Maybe illegal, otherwise in default value */
YY_BREAK
case 61:
YY_RULE_SETUP
#line 212 "VPreLex.l"
{ LEXP->m_formalLevel++; appendDefValue(yytext,yyleng); }
YY_BREAK
case 62:
YY_RULE_SETUP
#line 213 "VPreLex.l"
{ LEXP->m_formalLevel--; appendDefValue(yytext,yyleng); }
YY_BREAK
case 63:
#line 215 "VPreLex.l"
case 64:
#line 216 "VPreLex.l"
case 65:
YY_RULE_SETUP
#line 216 "VPreLex.l"
{ appendDefValue(yytext,yyleng); }
YY_BREAK
/* Reading definition value (declaration of a define's text) */
case 66:
YY_RULE_SETUP
#line 219 "VPreLex.l"
{ LEXP->m_defCmtSlash=false; yy_push_state(DEFCMT); yymore(); } /* Special comment parser */
YY_BREAK
case 67:
/* rule 67 can match eol */
YY_RULE_SETUP
#line 220 "VPreLex.l"
{ linenoInc(); appendDefValue((char*)"\n",1); } /* Spec says // not part of define value */
YY_BREAK
case 68:
YY_RULE_SETUP
#line 221 "VPreLex.l"
{ return (VP_COMMENT);}
YY_BREAK
case 69:
YY_RULE_SETUP
#line 222 "VPreLex.l"
{ }
YY_BREAK
case YY_STATE_EOF(DEFVAL):
#line 223 "VPreLex.l"
{ linenoInc(); yy_pop_state(); yytext=(char*)"\n"; yyleng=1; return (VP_DEFVALUE); } /* Technically illegal, but people complained */
YY_BREAK
case 70:
/* rule 70 can match eol */
YY_RULE_SETUP
#line 224 "VPreLex.l"
{ linenoInc(); yy_pop_state(); yytext=(char*)"\n"; yyleng=1; return (VP_DEFVALUE); }
YY_BREAK
case 71:
/* rule 71 can match eol */
YY_RULE_SETUP
#line 225 "VPreLex.l"
{ linenoInc(); appendDefValue((char*)"\\\n",2); } /* Return, AND \ is part of define value */
YY_BREAK
case 72:
YY_RULE_SETUP
#line 226 "VPreLex.l"
{ LEXP->m_defQuote=true; yy_push_state(STRMODE); yymore(); }
YY_BREAK
case 73:
#line 228 "VPreLex.l"
case 74:
#line 229 "VPreLex.l"
case 75:
YY_RULE_SETUP
#line 229 "VPreLex.l"
{ appendDefValue(yytext,yyleng); }
YY_BREAK
/* Comments inside define values - if embedded get added to define value per spec */
/* - if no \{crnl} ending then the comment belongs to the next line, as a non-embedded comment */
/* - if all but (say) 3rd line is missing \ then it's indeterminate */
case 76:
YY_RULE_SETUP
#line 234 "VPreLex.l"
{ yy_pop_state(); appendDefValue(yytext,yyleng); }
YY_BREAK
case 77:
/* rule 77 can match eol */
YY_RULE_SETUP
#line 235 "VPreLex.l"
{ linenoInc(); LEXP->m_defCmtSlash=true;
appendDefValue(yytext,yyleng-2); appendDefValue((char*)"\n",1); } /* Return but not \ */
YY_BREAK
case 78:
/* rule 78 can match eol */
YY_RULE_SETUP
#line 237 "VPreLex.l"
{ linenoInc(); yymore(); if (LEXP->m_defCmtSlash) yyerrorf("One line of /* ... */ is missing \\ before newline");
BEGIN(CMTMODE); }
YY_BREAK
case 79:
YY_RULE_SETUP
#line 239 "VPreLex.l"
{ yymore(); }
YY_BREAK
case 80:
YY_RULE_SETUP
#line 240 "VPreLex.l"
{ yymore(); }
YY_BREAK
case YY_STATE_EOF(DEFCMT):
#line 241 "VPreLex.l"
{ yyerrorf("EOF in '/* ... */' block comment\n"); yyleng=0; yyterminate(); }
YY_BREAK
/* Define arguments (use of a define) */
case 81:
YY_RULE_SETUP
#line 244 "VPreLex.l"
{ yy_push_state(CMTMODE); yymore(); }
YY_BREAK
case 82:
YY_RULE_SETUP
#line 245 "VPreLex.l"
{ return (VP_COMMENT);}
YY_BREAK
case 83:
YY_RULE_SETUP
#line 246 "VPreLex.l"
{ }
YY_BREAK
case YY_STATE_EOF(ARGMODE):
#line 247 "VPreLex.l"
{ yyerrorf("EOF in define argument list\n"); yyleng = 0; yyterminate(); }
YY_BREAK
case 84:
/* rule 84 can match eol */
YY_RULE_SETUP
#line 248 "VPreLex.l"
{ linenoInc(); yytext=(char*)"\n"; yyleng=1; return(VP_WHITE); }
YY_BREAK
case 85:
YY_RULE_SETUP
#line 249 "VPreLex.l"
{ yy_push_state(STRMODE); yymore(); }
YY_BREAK
case 86:
YY_RULE_SETUP
#line 250 "VPreLex.l"
{ appendDefValue(yytext,yyleng); } /* Literal text */
YY_BREAK
case 87:
YY_RULE_SETUP
#line 251 "VPreLex.l"
{ yy_push_state(STRIFY); return(VP_STRIFY); }
YY_BREAK
case 88:
YY_RULE_SETUP
#line 252 "VPreLex.l"
{ LEXP->m_parenLevel++; appendDefValue(yytext,yyleng); }
YY_BREAK
case 89:
YY_RULE_SETUP
#line 253 "VPreLex.l"
{ LEXP->m_parenLevel--; appendDefValue(yytext,yyleng); }
YY_BREAK
case 90:
YY_RULE_SETUP
#line 254 "VPreLex.l"
{ LEXP->m_parenLevel++;
// Note paren level 0 means before "(" of starting args
// Level 1 means "," between arguments
// Level 2+ means one argument's internal ()
if (LEXP->m_parenLevel == 1) { // Starting (
if (!isWhitespace(LEXP->m_defValue)) {
yyerrorf("Illegal text before '(' that starts define arguments: '%s'",
LEXP->m_defValue.c_str());
}
}
if (LEXP->m_parenLevel>1) {
appendDefValue(yytext,yyleng);
} else {
return (VP_TEXT);
}}
YY_BREAK
case 91:
YY_RULE_SETUP
#line 269 "VPreLex.l"
{ LEXP->m_parenLevel--;
if (LEXP->m_parenLevel>0) {
appendDefValue(yytext,yyleng);
} else {
yy_pop_state(); return (VP_DEFARG);
}}
YY_BREAK
case 92:
YY_RULE_SETUP
#line 275 "VPreLex.l"
{ if (LEXP->m_parenLevel>1) {
appendDefValue(yytext,yyleng);
} else {
yy_pop_state(); return (VP_DEFARG);
}}
YY_BREAK
case 93:
YY_RULE_SETUP
#line 280 "VPreLex.l"
{ appendDefValue(yytext,yyleng); } /* defref in defref - outer macro expands first */
YY_BREAK
case 94:
YY_RULE_SETUP
#line 281 "VPreLex.l"
{ appendDefValue(yytext,yyleng); } /* defref in defref - outer macro expands first */
YY_BREAK
case 95:
YY_RULE_SETUP
#line 282 "VPreLex.l"
{ appendDefValue(yytext,yyleng); } /* defref in defref - outer macro expands first */
YY_BREAK
case 96:
#line 284 "VPreLex.l"
case 97:
YY_RULE_SETUP
#line 284 "VPreLex.l"
{ appendDefValue(yytext,yyleng); }
YY_BREAK
/* Translate offs. Note final newline not included */
case 98:
YY_RULE_SETUP
#line 287 "VPreLex.l"
{
if (LEXP->m_synthesis) { yy_push_state(OFFMODE); }
return(VP_COMMENT); }
YY_BREAK
case 99:
YY_RULE_SETUP
#line 290 "VPreLex.l"
{
if (LEXP->m_synthesis) { yy_pop_state(); }
return(VP_COMMENT); }
YY_BREAK
case 100:
/* rule 100 can match eol */
YY_RULE_SETUP
#line 293 "VPreLex.l"
{ linenoInc(); yymore(); } /* Need to end the / / */
YY_BREAK
case 101:
YY_RULE_SETUP
#line 294 "VPreLex.l"
{ }
YY_BREAK
case 102:
YY_RULE_SETUP
#line 295 "VPreLex.l"
{ }
YY_BREAK
case YY_STATE_EOF(OFFMODE):
#line 296 "VPreLex.l"
{ yyerrorf("EOF in '/*synthesis translate_off*/' region\n"); yyleng=0; yyterminate(); }
YY_BREAK
/* One line comments. Note final newline not included */
case 103:
YY_RULE_SETUP
#line 299 "VPreLex.l"
{ return (VP_COMMENT); }
YY_BREAK
/* C-style comments. */
/**** See also DEFCMT */
case 104:
YY_RULE_SETUP
#line 303 "VPreLex.l"
{ yy_push_state(CMTMODE); yymore(); }
YY_BREAK
case 105:
YY_RULE_SETUP
#line 304 "VPreLex.l"
{ yy_pop_state(); return(VP_COMMENT); }
YY_BREAK
case 106:
/* rule 106 can match eol */
YY_RULE_SETUP
#line 305 "VPreLex.l"
{ linenoInc(); yymore(); }
YY_BREAK
case 107:
YY_RULE_SETUP
#line 306 "VPreLex.l"
{ yymore(); }
YY_BREAK
case 108:
YY_RULE_SETUP
#line 307 "VPreLex.l"
{ yymore(); }
YY_BREAK
case YY_STATE_EOF(CMTMODE):
#line 308 "VPreLex.l"
{ yyerrorf("EOF in '/* ... */' block comment\n"); yyleng=0; yyterminate(); }
YY_BREAK
/* Define calls */
/* symbdef prevents normal lex rules from making `\`"foo a symbol {`"foo} instead of a BACKQUOTE */
case 109:
YY_RULE_SETUP
#line 312 "VPreLex.l"
{ return (VP_DEFREF); }
YY_BREAK
case 110:
YY_RULE_SETUP
#line 313 "VPreLex.l"
{ yyleng-=2; return (VP_DEFREF_JOIN); }
YY_BREAK
case 111:
YY_RULE_SETUP
#line 314 "VPreLex.l"
{ yyleng-=2; return (VP_JOIN); }
YY_BREAK
/* Generics */
case YY_STATE_EOF(INITIAL):
#line 317 "VPreLex.l"
{ yyterminate(); } /* A "normal" EOF */
YY_BREAK
case 112:
/* rule 112 can match eol */
YY_RULE_SETUP
#line 318 "VPreLex.l"
{ linenoInc(); yytext=(char*)"\n"; yyleng=1; return(VP_WHITE); }
YY_BREAK
case 113:
YY_RULE_SETUP
#line 319 "VPreLex.l"
{ return (VP_SYMBOL); }
YY_BREAK
case 114:
YY_RULE_SETUP
#line 320 "VPreLex.l"
{ yyleng-=2; return (VP_SYMBOL_JOIN); }
YY_BREAK
case 115:
YY_RULE_SETUP
#line 321 "VPreLex.l"
{ yyleng-=2; return (VP_JOIN); }
YY_BREAK
case 116:
YY_RULE_SETUP
#line 322 "VPreLex.l"
{ }
YY_BREAK
case 117:
YY_RULE_SETUP
#line 323 "VPreLex.l"
{ if (!keepWhitespace()) { yytext=(char*)" "; yyleng=1; } return VP_WHITE; }
YY_BREAK
case 118:
YY_RULE_SETUP
#line 324 "VPreLex.l"
{ }
YY_BREAK
case 119:
YY_RULE_SETUP
#line 325 "VPreLex.l"
{ return (VP_TEXT); }
YY_BREAK
case 120:
/* rule 120 can match eol */
YY_RULE_SETUP
#line 327 "VPreLex.l"
{ yymore(); } /* Prevent hitting ECHO; */
YY_BREAK
case 121:
YY_RULE_SETUP
#line 328 "VPreLex.l"
ECHO;
YY_BREAK
#line 2454 "VPreLex_pretmp.cpp"
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)
{
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
char *source = (yytext_ptr);
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_LVALUE;
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,
(yy_size_t) (b->yy_buf_size + 2) );
}
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = NULL;
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_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
int 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, (yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
/* "- 2" to take care of EOB's */
YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(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)
{
yy_state_type yy_current_state;
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 )
{
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 >= 692 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + 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 )
{
int yy_is_jam;
char *yy_cp = (yy_c_buf_p);
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 >= 692 )
yy_c = yy_meta[yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 691);
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_UNPUT
static void yyunput (int c, char * yy_bp )
{
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. */
int number_to_move = (yy_n_chars) + 2;
char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
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) = (int) 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;
}
#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 */
int offset = (int) ((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 0;
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( (yy_size_t) (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; /* After all that talk, this was set to 1 anyways... */
(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 NULL;
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 = (int) (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 = NULL;
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 (const char * yystr )
{
return yy_scan_bytes( yystr, (int) 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 (const 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 = (yy_size_t) (_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;
}
static void yy_push_state (int _new_state )
{
if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
{
yy_size_t new_size;
(yy_start_stack_depth) += YY_START_STACK_INCR;
new_size = (yy_size_t) (yy_start_stack_depth) * sizeof( int );
if ( ! (yy_start_stack) )
(yy_start_stack) = (int *) yyalloc( new_size );
else
(yy_start_stack) = (int *) yyrealloc(
(void *) (yy_start_stack), new_size );
if ( ! (yy_start_stack) )
YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
}
(yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
BEGIN(_new_state);
}
static void yy_pop_state (void)
{
if ( --(yy_start_stack_ptr) < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
}
static int yy_top_state (void)
{
return (yy_start_stack)[(yy_start_stack_ptr) - 1];
}
#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif
static void yynoreturn yy_fatal_error (const char* msg )
{
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 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) = NULL;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
(yy_c_buf_p) = NULL;
(yy_init) = 0;
(yy_start) = 0;
(yy_start_stack_ptr) = 0;
(yy_start_stack_depth) = 0;
(yy_start_stack) = NULL;
/* Defined in main.c */
#ifdef YY_STDINIT
yyin = stdin;
yyout = stdout;
#else
yyin = NULL;
yyout = NULL;
#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;
/* Destroy the start condition stack. */
yyfree( (yy_start_stack) );
(yy_start_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, const char * s2, int n )
{
int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (const char * s )
{
int n;
for ( n = 0; s[n]; ++n )
;
return n;
}
#endif
void *yyalloc (yy_size_t size )
{
return 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 realloc(ptr, size);
}
void yyfree (void * ptr )
{
free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
#define YYTABLES_NAME "yytables"
#line 328 "VPreLex.l"
void VPreLex::pushStateDefArg(int level) {
// Enter define substitution argument state
yy_push_state(ARGMODE);
m_parenLevel = level;
m_defValue = "";
}
void VPreLex::pushStateDefForm() {
// Enter define formal arguments state
yy_push_state(DEFFPAR); // First is an optional ( to begin args
m_parenLevel = 0;
m_defValue = "";
}
void VPreLex::pushStateDefValue() {
// Enter define value state
yy_push_state(DEFVAL);
m_parenLevel = 0;
m_defValue = "";
}
void VPreLex::pushStateIncFilename() {
// Enter include <> filename state
yy_push_state(INCMODE);
yymore();
}
void VPreLex::debug(int level) {
#ifdef FLEX_DEBUG
yy_flex_debug=level;
#endif
}
int VPreLex::debug() {
#ifdef FLEX_DEBUG
return yy_flex_debug;
#else
return 0;
#endif
}
int VPreLex::lex() {
VPreLex::s_currentLexp = this; // Tell parser where to get/put data
m_tokFilelinep = curFilelinep(); // Remember token start location, may be updated by the lexer later
return yylex();
}
size_t VPreLex::inputToLex(char* buf, size_t max_size) {
// We need a custom YY_INPUT because we can't use flex buffers.
// Flex buffers are limited to 2GB, and we can't chop into 2G pieces
// because buffers can't end in the middle of tokens.
// Note if we switched streams here (which we don't) "buf" would be
// become a stale invalid pointer.
//
VPreStream* streamp = curStreamp();
if (debug()>=10) { cout<<"- pp:inputToLex ITL s="<<max_size<<" bs="<<streamp->m_buffers.size()<<endl; dumpStack(); }
// For testing, use really small chunks
//if (max_size > 13) max_size=13;
again:
size_t got = 0;
// Get from this stream
while (got < max_size // Haven't got enough
&& !streamp->m_buffers.empty()) { // And something buffered
string front = curStreamp()->m_buffers.front(); streamp->m_buffers.pop_front();
size_t len = front.length();
if (len > (max_size-got)) { // Front string too big
len = (max_size-got);
string remainder = front.substr(len);
front = front.substr(0, len);
streamp->m_buffers.push_front(remainder); // Put back remainder for next time
}
strncpy(buf+got, front.c_str(), len);
got += len;
}
if (!got) { // end of stream; try "above" file
bool again=false;
string forceOut = endOfStream(again/*ref*/);
streamp = curStreamp(); // May have been updated
if (forceOut != "") {
if (forceOut.length() > max_size) {
yyerrorf("Output buffer too small for a `line");
} else {
got = forceOut.length();
strncpy(buf, forceOut.c_str(), got);
}
} else {
if (streamp->m_eof) {
if (debug()) cout<<"- EOF\n";
}
got = 0; // 0=EOF/EOS - although got was already 0.
if (again) goto again;
}
}
if (debug()>=10) { cout<<"- pp::inputToLex got="<<got<<" '"<<string(buf,got)<<"'"<<endl; }
return got;
}
string VPreLex::endOfStream(bool& againr) {
// Switch to file or next unputString
againr = false;
if (debug()) cout<<"-EOS state="<<curStreamp()->m_termState<<" at "<<curFilelinep()<<endl;
if (curStreamp()->m_eof) return ""; // Don't delete the final "EOF" stream
bool exited_file = curStreamp()->m_file;
if (!exited_file) {
// Midpoint of stream, just change buffers
delete curStreamp();
m_streampStack.pop(); // Must work as size>1; EOF is entry 0
againr = true;
return "";
}
// Multiple steps because we need FLEX to see ending \n and EOS to end
// any illegal states, like an unterminated `protected region
else if (!curStreamp()->m_termState) {
// First shutdown phase for a file
// Terminate all files with a newline. This prevents problems if
// the user had a define without a terminating newline,
// otherwise the resumed file's next line would get tacked on.
// Also makes it likely the `line that changes files comes out
// immediately.
curStreamp()->m_termState = 1;
return "\n"; // Exit old file
}
else if (curStreamp()->m_termState == 1) {
// Now the EOF - can't be sent with other characters
curStreamp()->m_termState = 2;
return ""; // End of file
}
else if (curStreamp()->m_termState == 2) {
// Now ending `line
curStreamp()->m_termState = 3;
return curFilelinep()->lineDirectiveStrg(2); // Exit old file
}
else {
// Final shutdown phase for a stream, we can finally change the
// current fileline to the new stream
curStreamp()->m_termState = 0;
VFileLine* filelinep = curFilelinep();
delete curStreamp();
m_streampStack.pop(); // Must work as size>1; EOF is entry 0
if (curStreamp()->m_eof) {
// EOF doesn't have a "real" fileline, but a linenumber of 0 from init time
// Inherit whatever we last parsed so it's more obvious.
curFilelinep(filelinep);
}
// The caller parser remembered the start location for the text we are parsing,
// but we've discovered there was a file switch along the way, so update it.
m_tokFilelinep = curFilelinep();
//
if (curStreamp()->m_eof) {
return "";
} else {
return curFilelinep()->lineDirectiveStrg(0); // Reenter resumed file
}
}
}
void VPreLex::initFirstBuffer(VFileLine* filelinep) {
// Called from constructor to make first buffer
// yy_create_buffer also sets yy_fill_buffer=1 so reads from YY_INPUT
VPreStream* streamp = new VPreStream(filelinep, this);
streamp->m_eof = true;
m_streampStack.push(streamp);
//
m_bufferState = yy_create_buffer(NULL, YY_BUF_SIZE);
yy_switch_to_buffer(m_bufferState);
yyrestart(NULL);
}
void VPreLex::scanNewFile(VFileLine* filelinep) {
// Called on new open file. scanBytesBack will be called next.
if (streamDepth() > VPreProc::DEFINE_RECURSION_LEVEL_MAX) {
// The recursive `include in VPreProcImp should trigger first
yyerrorf("Recursive `define or other nested inclusion");
curStreamp()->m_eof = true; // Fake it to stop recursion
} else {
VPreStream* streamp = new VPreStream(filelinep, this);
m_tokFilelinep = curFilelinep();
streamp->m_file = true;
scanSwitchStream(streamp);
}
}
void VPreLex::scanBytes(const string& str) {
// Note buffers also appended in ::scanBytesBack
// Not "m_buffers.push_front(string(strp,len))" as we need a `define
// to take effect immediately, in the middle of the current buffer
// Also we don't use scan_bytes that would set yy_fill_buffer
// which would force Flex to bypass our YY_INPUT routine.
if (streamDepth() > VPreProc::DEFINE_RECURSION_LEVEL_MAX) {
// More streams if recursive `define with complex insertion
// More buffers mostly if something internal goes funky
yyerrorf("Recursive `define or other nested inclusion");
curStreamp()->m_eof = true; // Fake it to stop recursion
} else {
VPreStream* streamp = new VPreStream(curFilelinep(), this);
streamp->m_buffers.push_front(str);
scanSwitchStream(streamp);
}
}
void VPreLex::scanSwitchStream(VPreStream* streamp) {
curStreamp()->m_buffers.push_front(currentUnreadChars());
m_streampStack.push(streamp);
yyrestart(NULL);
}
void VPreLex::scanBytesBack(const string& str) {
// Initial creation, that will pull from YY_INPUT==inputToLex
// Note buffers also appended in ::scanBytes
if (curStreamp()->m_eof) yyerrorf("scanBytesBack without being under scanNewFile");
curStreamp()->m_buffers.push_back(str);
}
string VPreLex::currentUnreadChars() {
// WARNING - Peeking at internals
if (!currentBuffer()) return "";
ssize_t left = (yy_n_chars - (yy_c_buf_p - currentBuffer()->yy_ch_buf));
if (left > 0) { // left may be -1 at EOS
*(yy_c_buf_p) = (yy_hold_char);
return string(yy_c_buf_p, left);
} else {
return "";
}
}
YY_BUFFER_STATE VPreLex::currentBuffer() {
return YY_CURRENT_BUFFER;
}
int VPreLex::currentStartState() {
return YY_START;
}
void VPreLex::dumpSummary() {
cout<<"- pp::dumpSummary curBuf="<<(void*)(currentBuffer());
#ifdef FLEX_DEBUG // Else peeking at internals may cause portability issues
ssize_t left = (yy_n_chars
- (yy_c_buf_p
-currentBuffer()->yy_ch_buf));
cout<<" left="<<dec<<left;
#endif
cout<<endl;
}
void VPreLex::dumpStack() {
// For debug use
dumpSummary();
stack<VPreStream*> tmpstack = LEXP->m_streampStack;
while (!tmpstack.empty()) {
VPreStream* streamp = tmpstack.top();
cout<<"- bufferStack["<<(void*)(streamp)<<"]: "
<<" at="<<streamp->m_curFilelinep
<<" nBuf="<<streamp->m_buffers.size()
<<" size0="<<(streamp->m_buffers.empty() ? 0 : streamp->m_buffers.front().length())
<<(streamp->m_eof?" [EOF]":"")
<<(streamp->m_file?" [FILE]":"");
cout<<endl;
tmpstack.pop();
}
}
string VPreLex::cleanDbgStrg(const string& in) {
string out = in;
string::size_type pos;
while ((pos=out.find("\n")) != string::npos) { out.replace(pos, 1, "\\n"); }
while ((pos=out.find("\r")) != string::npos) { out.replace(pos, 1, "\\r"); }
return out;
}
void VPreLex::unused() {
if (0) {
// Prevent unused warnings
yy_top_state();
}
}
/*###################################################################
* Local Variables:
* mode: C++
* End:
*/