diff --git a/parser.src/DynareFlex.cc b/parser.src/DynareFlex.cc new file mode 100644 index 000000000..1d2b218b3 --- /dev/null +++ b/parser.src/DynareFlex.cc @@ -0,0 +1,4074 @@ +#line 2 "DynareFlex.cc" + +#line 4 "DynareFlex.cc" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 33 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* %if-c++-only */ + /* The c++ scanner is a mess. The FlexLexer.h header file relies on the + * following macro. This is required in order to pass the c++-multiple-scanners + * test in the regression suite. We get reports that it breaks inheritance. + * We will address this in a future release of flex, or omit the C++ scanner + * altogether. + */ + #define yyFlexLexer DynareFlexLexer +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +/* %if-c-only */ +/* %endif */ + +/* %if-tables-serialization */ +/* %endif */ +/* end standard C headers. */ + +/* %if-c-or-c++ */ +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +/* %endif */ + +/* %if-c++-only */ +/* begin standard C++ headers. */ +#include +#include +#include +#include +/* end standard C++ headers. */ +/* %endif */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* %not-for-header */ + +/* Returned upon end-of-file. */ +#define YY_NULL 0 +/* %ok-for-header */ + +/* %not-for-header */ + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +/* %ok-for-header */ + +/* %if-reentrant */ +/* %endif */ + +/* %if-not-reentrant */ + +/* %endif */ + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +/* %if-not-reentrant */ +extern int yyleng; +/* %endif */ + +/* %if-c-only */ +/* %if-not-reentrant */ +/* %endif */ +/* %endif */ + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { +/* %if-c-only */ +/* %endif */ + +/* %if-c++-only */ + std::istream* yy_input_file; +/* %endif */ + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ + +/* %if-not-reentrant */ +/* %endif */ +/* %ok-for-header */ + +/* %endif */ + +/* 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)] + +/* %if-c-only Standard (non-C++) definition */ +/* %if-not-reentrant */ +/* %not-for-header */ + +/* %ok-for-header */ + +/* %endif */ +/* %endif */ + +void *Dynarealloc (yy_size_t ); +void *Dynarerealloc (void *,yy_size_t ); +void Dynarefree (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) + +/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ +/* Begin user sect3 */ + +#define yywrap() 1 +#define YY_SKIP_YYWRAP + +#define FLEX_DEBUG + +typedef unsigned char YY_CHAR; + +#define yytext_ptr yytext + +#include + +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ + +/* 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; \ +/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\ + yyleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ +/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\ + (yy_c_buf_p) = yy_cp; + +/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ +#define YY_NUM_RULES 244 +#define YY_END_OF_BUFFER 245 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[1427] = + { 0, + 0, 0, 10, 10, 0, 0, 0, 0, 242, 242, + 2, 2, 0, 0, 0, 0, 245, 241, 5, 6, + 7, 7, 241, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 241, 10, 5, + 243, 10, 243, 5, 184, 7, 243, 7, 156, 170, + 175, 173, 168, 174, 154, 176, 239, 169, 43, 178, + 177, 179, 171, 155, 172, 185, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 243, + 134, 243, 133, 237, 237, 237, 237, 237, 237, 237, + + 237, 237, 237, 237, 237, 237, 237, 237, 242, 5, + 242, 2, 2, 2, 3, 4, 5, 6, 7, 7, + 8, 9, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 0, 10, 5, 11, 11, 12, 10, 183, 0, + 117, 238, 238, 239, 0, 181, 182, 180, 237, 237, + 237, 142, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + + 189, 237, 158, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 242, 5, 242, 2, 2, 2, 4, 7, 8, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 27, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 13, 0, + 10, 0, 0, 238, 237, 237, 237, 237, 237, 237, + + 237, 237, 237, 191, 237, 237, 237, 237, 237, 186, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 144, 237, 237, 237, 237, 237, 237, 237, + 237, 187, 237, 203, 237, 237, 204, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 190, 237, 237, 237, + 237, 237, 192, 93, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 187, 237, 237, 237, + 237, 237, 237, 118, 242, 2, 240, 240, 240, 240, + + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 0, 10, 0, + 238, 194, 237, 193, 195, 237, 237, 237, 237, 237, + 95, 197, 237, 237, 237, 237, 139, 237, 237, 237, + 237, 237, 214, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 60, 237, 237, 237, + 237, 237, 237, 237, 217, 237, 237, 237, 237, 237, + + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 230, 237, 196, 237, 237, 237, 202, 208, 198, 237, + 237, 237, 237, 237, 237, 121, 237, 0, 57, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 242, 2, + 240, 37, 32, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 44, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 25, 240, 240, 33, 240, 240, + 240, 240, 240, 0, 10, 200, 237, 199, 201, 237, + 237, 237, 237, 237, 106, 237, 237, 237, 237, 237, + 237, 237, 237, 160, 66, 237, 237, 237, 237, 237, + + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 188, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 97, 140, + 237, 237, 237, 212, 237, 237, 237, 68, 237, 237, + 237, 237, 237, 149, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 242, 2, 240, 240, 240, 18, + 240, 240, 240, 240, 46, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 50, + + 240, 48, 240, 31, 240, 240, 14, 23, 0, 10, + 237, 237, 237, 237, 237, 237, 237, 237, 99, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 213, 237, 237, 222, 237, 237, 237, 237, 237, 167, + 237, 237, 237, 237, 237, 237, 59, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 207, + 237, 229, 237, 237, 237, 96, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 210, 237, 237, 237, 237, + 237, 237, 141, 237, 237, 237, 162, 237, 237, 237, + 237, 237, 237, 237, 123, 237, 237, 237, 237, 237, + + 237, 119, 237, 120, 242, 2, 240, 240, 240, 35, + 240, 240, 240, 240, 47, 240, 45, 240, 240, 240, + 240, 240, 240, 17, 240, 240, 240, 240, 36, 240, + 240, 240, 1, 1, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 137, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 102, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 72, + 237, 237, 79, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 227, 237, 237, 237, 237, 237, 67, + 237, 69, 205, 98, 237, 237, 237, 237, 237, 237, + + 237, 209, 237, 237, 237, 237, 237, 237, 237, 157, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 122, 237, 1, 240, 240, 240, 240, 29, 28, 240, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 237, 237, 237, 237, 161, + 237, 237, 70, 104, 58, 237, 237, 237, 86, 237, + 237, 237, 237, 146, 237, 237, 237, 237, 237, 237, + 64, 65, 231, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 237, + + 237, 237, 237, 237, 237, 237, 237, 237, 87, 237, + 237, 237, 232, 237, 237, 135, 127, 125, 237, 237, + 237, 237, 237, 240, 240, 55, 240, 240, 240, 240, + 19, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 240, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 61, 237, 237, 237, 145, 237, 237, 237, + 237, 237, 237, 237, 237, 219, 220, 82, 237, 100, + 237, 73, 237, 237, 71, 237, 237, 75, 237, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 94, 237, + 237, 62, 63, 237, 237, 237, 237, 237, 237, 237, + + 237, 237, 151, 150, 126, 237, 124, 237, 237, 240, + 240, 240, 240, 20, 240, 240, 240, 240, 26, 16, + 240, 240, 240, 240, 240, 240, 15, 237, 237, 237, + 235, 237, 237, 237, 237, 237, 237, 237, 237, 237, + 237, 237, 237, 85, 237, 237, 237, 237, 237, 237, + 80, 152, 77, 237, 237, 237, 237, 237, 237, 228, + 237, 105, 237, 237, 233, 237, 237, 237, 237, 237, + 138, 147, 136, 163, 237, 237, 237, 237, 128, 237, + 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, + 240, 240, 34, 240, 237, 236, 221, 237, 237, 114, + + 237, 237, 237, 237, 237, 237, 237, 234, 84, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 237, 215, + 216, 166, 237, 143, 237, 211, 78, 237, 237, 237, + 237, 237, 237, 132, 40, 240, 240, 240, 240, 240, + 240, 240, 240, 240, 240, 240, 240, 237, 88, 237, + 237, 237, 237, 237, 237, 237, 237, 237, 164, 237, + 237, 237, 237, 165, 81, 218, 237, 237, 76, 237, + 237, 237, 83, 237, 148, 92, 237, 237, 237, 237, + 41, 240, 240, 240, 240, 240, 54, 240, 240, 240, + 39, 240, 237, 237, 237, 237, 110, 237, 237, 237, + + 237, 90, 237, 115, 237, 237, 237, 237, 74, 237, + 237, 237, 237, 237, 237, 237, 129, 240, 240, 56, + 240, 240, 240, 240, 21, 24, 226, 237, 237, 237, + 237, 107, 237, 237, 237, 116, 206, 225, 237, 237, + 237, 237, 237, 237, 130, 131, 240, 240, 240, 240, + 240, 240, 237, 112, 237, 237, 237, 237, 237, 237, + 237, 237, 89, 237, 237, 240, 49, 30, 240, 240, + 240, 108, 237, 111, 113, 237, 237, 223, 237, 237, + 153, 237, 240, 240, 240, 38, 240, 109, 91, 237, + 237, 237, 224, 42, 240, 240, 53, 22, 237, 237, + + 237, 240, 240, 237, 237, 237, 240, 240, 159, 237, + 103, 240, 51, 237, 240, 237, 52, 237, 237, 237, + 237, 237, 237, 237, 101, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 4, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 5, 6, 7, 8, 9, 10, 1, 11, 12, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 22, 22, 22, 22, 22, 22, 23, 24, 25, + 26, 27, 1, 28, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 29, 30, 31, 32, 33, 1, 34, 35, 36, 37, + + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[60] = + { 0, + 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, + 1, 1, 4, 1, 1, 1, 1, 1, 5, 5, + 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5 + } ; + +static yyconst flex_int16_t yy_base[1441] = + { 0, + 0, 1658, 58, 62, 90, 1657, 142, 1656, 74, 198, + 78, 202, 153, 208, 218, 239, 1683, 1687, 68, 1679, + 145, 0, 155, 0, 1626, 120, 16, 37, 122, 1633, + 137, 179, 217, 183, 192, 1632, 1644, 1632, 0, 214, + 211, 1631, 1687, 244, 1649, 245, 1665, 0, 1687, 1687, + 1687, 1687, 1687, 1687, 250, 266, 261, 1687, 1687, 1647, + 1646, 1645, 1687, 1687, 1687, 1687, 0, 240, 222, 121, + 35, 1613, 205, 260, 39, 250, 223, 273, 276, 252, + 116, 274, 1610, 189, 280, 297, 1616, 1633, 1621, 1620, + 1687, 320, 1687, 296, 212, 249, 151, 1622, 300, 1616, + + 309, 232, 1614, 1623, 305, 1626, 312, 1625, 0, 363, + 1613, 0, 367, 1612, 1687, 354, 375, 1653, 0, 0, + 0, 1687, 0, 1621, 1609, 1615, 1599, 1617, 1603, 1612, + 1595, 1595, 1600, 1603, 1593, 1606, 1590, 1588, 1589, 1588, + 1587, 1603, 1584, 1593, 1588, 1588, 1584, 297, 314, 1589, + 1579, 1587, 0, 379, 1687, 348, 1687, 1586, 1687, 1618, + 1687, 366, 370, 376, 396, 1687, 1687, 1687, 0, 1578, + 1576, 0, 1582, 1589, 1564, 1585, 1586, 354, 1566, 1565, + 378, 1568, 349, 1565, 1561, 1578, 1559, 1561, 1577, 1564, + 1576, 1570, 1558, 1567, 1552, 1559, 1551, 1553, 1565, 355, + + 0, 385, 0, 370, 1547, 1566, 1551, 383, 1551, 402, + 1562, 1542, 1557, 1542, 1550, 1557, 380, 340, 1557, 387, + 1537, 242, 1540, 1542, 1552, 1534, 1550, 1536, 1525, 1530, + 1542, 1528, 1526, 1524, 1523, 371, 1522, 1537, 1528, 262, + 1517, 1524, 1530, 389, 410, 1518, 1521, 1530, 1524, 399, + 0, 450, 1523, 0, 454, 1522, 443, 0, 0, 1512, + 1520, 1525, 1512, 1513, 1524, 1502, 1514, 1502, 1506, 1500, + 1508, 1513, 1512, 1507, 1515, 1513, 1504, 1498, 1491, 1495, + 1490, 1493, 1504, 1493, 1484, 1503, 1500, 1482, 322, 1487, + 1486, 452, 456, 460, 1480, 1490, 1483, 1482, 1490, 1487, + + 1475, 408, 1474, 1483, 1489, 1474, 1487, 1486, 1470, 0, + 1465, 1465, 1478, 1463, 1481, 1475, 1474, 1462, 1462, 410, + 1462, 1455, 0, 1473, 1460, 1452, 1459, 1470, 1469, 1463, + 1463, 447, 1455, 0, 1457, 447, 0, 445, 1459, 1445, + 450, 1459, 1442, 1445, 1450, 1437, 1439, 1441, 1437, 1441, + 1440, 1443, 1446, 1441, 1437, 1434, 1428, 1437, 447, 422, + 1442, 1438, 1442, 1430, 1436, 1419, 1431, 1423, 1415, 1418, + 1415, 1432, 1425, 0, 1427, 1431, 1430, 1429, 1413, 1426, + 1408, 1410, 499, 1419, 1410, 1422, 1434, 1409, 1406, 1409, + 1412, 1410, 1394, 0, 1400, 1399, 1412, 1409, 1399, 1403, + + 1392, 454, 1406, 1393, 1383, 1384, 1381, 1387, 1389, 1382, + 1386, 1382, 1384, 1381, 1381, 1389, 1375, 1387, 1371, 1379, + 1388, 1376, 1383, 1378, 1385, 1360, 1381, 1377, 1376, 489, + 493, 1372, 1378, 1370, 1369, 1357, 1356, 1374, 1373, 1352, + 0, 0, 1353, 1364, 1363, 1356, 0, 1362, 1346, 1362, + 1345, 1360, 0, 1343, 1353, 1340, 1350, 1351, 1337, 1355, + 1337, 1353, 1352, 1351, 1348, 482, 1349, 1349, 1362, 1338, + 1328, 1330, 1329, 1325, 1328, 1322, 1325, 1337, 1333, 400, + 1331, 1322, 1326, 470, 1333, 1318, 0, 471, 1331, 1317, + 1329, 1316, 1319, 1324, 0, 1313, 1307, 1309, 1303, 1308, + + 1301, 1305, 1310, 1317, 1297, 1298, 1297, 1299, 1293, 1303, + 0, 1299, 0, 1290, 1304, 1289, 0, 0, 0, 1288, + 1302, 1287, 445, 1301, 1303, 0, 1296, 523, 1687, 1287, + 1299, 1292, 1283, 485, 1282, 1278, 1280, 1289, 1288, 1287, + 492, 1291, 0, 1284, 1277, 1283, 1286, 1261, 1273, 1283, + 1282, 1267, 1280, 1257, 1279, 1256, 1277, 1275, 1270, 1270, + 1268, 1254, 487, 1246, 0, 1251, 1269, 0, 1243, 1267, + 1248, 1250, 1245, 1291, 1290, 0, 470, 0, 0, 1252, + 1240, 483, 1240, 1257, 0, 1251, 1247, 1248, 1236, 1253, + 1251, 1242, 1235, 0, 0, 1234, 1236, 1229, 1237, 1224, + + 1224, 1229, 1222, 1238, 1225, 1227, 1224, 1223, 1218, 489, + 0, 1221, 1233, 1210, 1228, 1216, 1221, 1226, 1224, 1215, + 497, 506, 1226, 1216, 1204, 1204, 1218, 1206, 1213, 1206, + 1199, 1199, 1209, 1212, 1198, 1208, 1198, 1207, 0, 0, + 1206, 1209, 1203, 0, 1189, 1194, 1192, 0, 1204, 1194, + 1184, 1192, 1197, 1199, 1190, 1197, 1191, 1187, 1182, 1180, + 1191, 1183, 1175, 1173, 1182, 1186, 1186, 1184, 1161, 1171, + 1178, 1163, 1162, 1160, 1206, 1205, 1171, 1160, 1152, 0, + 1168, 1172, 1149, 1154, 0, 1149, 1156, 1151, 1154, 1156, + 1161, 1162, 1139, 1140, 1133, 1130, 1130, 1134, 1132, 0, + + 1130, 0, 187, 0, 238, 296, 320, 0, 423, 478, + 503, 486, 504, 509, 493, 510, 507, 503, 0, 506, + 504, 520, 506, 503, 522, 511, 510, 507, 519, 523, + 0, 530, 531, 532, 528, 521, 528, 527, 525, 0, + 530, 534, 520, 536, 528, 534, 0, 528, 525, 545, + 543, 534, 535, 539, 544, 544, 551, 550, 537, 557, + 543, 0, 555, 545, 542, 0, 549, 544, 557, 552, + 547, 562, 550, 552, 553, 0, 552, 557, 556, 555, + 564, 556, 0, 578, 575, 580, 582, 568, 572, 566, + 572, 582, 570, 585, 0, 577, 575, 579, 584, 594, + + 576, 0, 583, 0, 624, 625, 586, 583, 601, 0, + 584, 599, 600, 601, 0, 582, 0, 588, 594, 591, + 607, 612, 609, 0, 615, 601, 603, 602, 0, 610, + 605, 617, 1687, 0, 604, 611, 611, 624, 618, 612, + 622, 610, 626, 0, 613, 629, 632, 615, 622, 621, + 613, 634, 636, 632, 624, 642, 626, 0, 629, 631, + 627, 623, 649, 646, 632, 651, 652, 635, 635, 0, + 656, 645, 0, 655, 637, 651, 656, 650, 652, 650, + 662, 667, 654, 0, 655, 661, 670, 657, 664, 0, + 654, 0, 0, 0, 662, 676, 672, 666, 678, 662, + + 676, 0, 677, 671, 679, 667, 674, 683, 676, 0, + 684, 683, 686, 674, 687, 689, 691, 683, 677, 682, + 0, 699, 0, 681, 696, 684, 698, 0, 0, 700, + 690, 706, 681, 695, 700, 701, 698, 694, 698, 696, + 714, 701, 704, 698, 714, 715, 701, 703, 723, 0, + 709, 713, 0, 0, 0, 706, 727, 710, 0, 730, + 722, 732, 715, 0, 731, 722, 724, 722, 733, 730, + 0, 0, 0, 734, 735, 737, 741, 726, 745, 720, + 728, 743, 738, 745, 748, 749, 737, 749, 742, 748, + 735, 746, 755, 748, 747, 743, 748, 745, 746, 763, + + 750, 764, 756, 750, 754, 773, 767, 770, 0, 769, + 765, 774, 0, 774, 760, 0, 0, 0, 775, 781, + 757, 780, 769, 777, 784, 0, 774, 789, 776, 772, + 0, 776, 778, 787, 776, 777, 795, 798, 787, 788, + 780, 802, 783, 800, 786, 805, 802, 799, 791, 801, + 806, 790, 0, 808, 802, 802, 0, 815, 798, 811, + 807, 816, 810, 814, 809, 0, 0, 0, 807, 0, + 823, 0, 808, 810, 0, 818, 809, 0, 815, 831, + 832, 825, 817, 821, 832, 818, 819, 826, 0, 836, + 833, 0, 0, 836, 830, 836, 837, 832, 844, 834, + + 838, 851, 0, 0, 0, 865, 0, 848, 851, 836, + 856, 839, 843, 0, 855, 860, 848, 855, 0, 0, + 854, 865, 842, 859, 857, 848, 0, 865, 867, 871, + 0, 856, 875, 873, 861, 877, 867, 875, 866, 862, + 863, 879, 870, 0, 880, 882, 876, 871, 885, 890, + 0, 0, 0, 872, 892, 876, 877, 874, 896, 0, + 880, 0, 890, 881, 0, 882, 897, 900, 883, 887, + 0, 0, 0, 0, 888, 907, 908, 893, 0, 904, + 886, 893, 904, 913, 895, 898, 917, 898, 914, 906, + 902, 919, 0, 922, 909, 0, 0, 919, 922, 0, + + 927, 911, 921, 913, 928, 928, 927, 0, 0, 923, + 921, 935, 928, 939, 932, 940, 928, 934, 943, 0, + 0, 0, 946, 0, 947, 0, 0, 938, 946, 948, + 938, 939, 952, 0, 0, 937, 938, 941, 939, 952, + 942, 944, 961, 964, 957, 942, 950, 951, 0, 965, + 959, 971, 952, 961, 974, 975, 958, 965, 0, 974, + 964, 966, 964, 0, 0, 0, 977, 979, 0, 976, + 971, 973, 0, 973, 0, 0, 985, 986, 987, 987, + 0, 985, 994, 980, 978, 980, 0, 979, 988, 982, + 0, 983, 990, 1001, 1004, 993, 0, 1002, 987, 1008, + + 1002, 0, 1002, 0, 993, 999, 1001, 1000, 0, 997, + 1003, 1014, 998, 1014, 1015, 1016, 0, 1001, 1011, 0, + 1010, 1021, 1018, 1003, 0, 0, 0, 1028, 1010, 1029, + 1025, 0, 1024, 1029, 1021, 0, 0, 0, 1018, 1022, + 1029, 1024, 1026, 1026, 0, 0, 1033, 1024, 1030, 1031, + 1024, 1028, 1023, 0, 1045, 1049, 1037, 1051, 1052, 1041, + 1041, 1053, 0, 1037, 1040, 1039, 1060, 0, 1057, 1057, + 1054, 0, 1063, 0, 0, 1061, 1046, 0, 1067, 1055, + 0, 1056, 1045, 1069, 1053, 0, 1054, 0, 0, 1065, + 1074, 1071, 0, 0, 1062, 1065, 0, 0, 1065, 1065, + + 1081, 1062, 1075, 1071, 1070, 1073, 1074, 1069, 0, 1072, + 0, 1087, 0, 1077, 1074, 1070, 0, 1086, 1083, 1096, + 1078, 1090, 1085, 1087, 0, 1687, 1134, 1139, 1144, 1149, + 1154, 1151, 1159, 1164, 1169, 1156, 1174, 1179, 1184, 1189 + } ; + +static yyconst flex_int16_t yy_def[1441] = + { 0, + 1426, 1, 1427, 1427, 1426, 5, 5, 7, 1428, 1428, + 1429, 1429, 1430, 1430, 1430, 1430, 1426, 1426, 1426, 1426, + 1431, 1431, 1426, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1426, 1433, 1433, + 1434, 1433, 1426, 1426, 1426, 1431, 1435, 1431, 1426, 1426, + 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, + 1426, 1426, 1426, 1426, 1426, 1426, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1426, + 1426, 1426, 1426, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1437, 1437, + 1437, 1438, 1438, 1438, 1426, 1426, 1426, 1426, 1431, 1439, + 1440, 1426, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1426, 1433, 1433, 1426, 1434, 1426, 1433, 1426, 1435, + 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1437, 1437, 1437, 1438, 1438, 1438, 1426, 1439, 1440, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1426, + 1433, 1426, 1426, 1426, 1436, 1436, 1436, 1436, 1436, 1436, + + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1437, 1438, 1432, 1432, 1432, 1432, + + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1426, 1433, 1426, + 1426, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1426, 1426, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1437, 1438, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1426, 1433, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1437, 1438, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1426, 1433, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + + 1436, 1436, 1436, 1436, 1437, 1438, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1426, 1433, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1437, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1436, 1436, 1436, 1436, 1436, 1436, + + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, 1432, + 1432, 1432, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1432, 1432, 1432, + 1432, 1432, 1432, 1432, 1432, 1432, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1436, 1432, 1432, 1432, 1432, + 1432, 1432, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 1432, 1432, 1432, 1432, 1432, + 1432, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, 1436, + 1436, 1436, 1432, 1432, 1432, 1432, 1432, 1436, 1436, 1436, + 1436, 1436, 1436, 1432, 1432, 1432, 1432, 1432, 1436, 1436, + + 1436, 1432, 1432, 1436, 1436, 1436, 1432, 1432, 1436, 1436, + 1436, 1432, 1432, 1436, 1432, 1436, 1432, 1436, 1436, 1436, + 1436, 1436, 1436, 1436, 1436, 0, 1426, 1426, 1426, 1426, + 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426 + } ; + +static yyconst flex_int16_t yy_nxt[1747] = + { 0, + 18, 19, 20, 19, 19, 18, 21, 18, 18, 22, + 18, 18, 18, 18, 18, 18, 18, 23, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 24, 24, 25, 26, 27, 28, 24, 24, + 29, 30, 24, 24, 24, 31, 24, 32, 33, 24, + 34, 35, 24, 36, 37, 24, 24, 24, 24, 40, + 20, 40, 40, 40, 20, 40, 40, 128, 180, 117, + 41, 117, 117, 129, 41, 110, 20, 110, 110, 113, + 20, 113, 113, 130, 43, 181, 190, 191, 131, 42, + 43, 44, 20, 44, 44, 45, 46, 43, 47, 48, + + 49, 50, 51, 52, 53, 54, 55, 56, 57, 57, + 57, 57, 58, 59, 60, 61, 62, 43, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 67, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 67, 89, 67, 67, 91, + 43, 120, 43, 125, 44, 20, 44, 44, 92, 115, + 126, 121, 120, 132, 212, 93, 213, 122, 178, 133, + 135, 43, 121, 127, 179, 94, 95, 96, 67, 97, + 98, 99, 67, 100, 136, 67, 101, 102, 103, 67, + 104, 67, 67, 105, 106, 107, 108, 238, 67, 110, + + 20, 110, 110, 113, 20, 113, 113, 182, 43, 44, + 20, 44, 44, 137, 115, 154, 145, 154, 154, 44, + 20, 44, 44, 156, 829, 111, 220, 138, 157, 114, + 139, 146, 147, 148, 221, 90, 116, 116, 116, 116, + 44, 20, 44, 44, 149, 117, 183, 117, 117, 235, + 140, 120, 184, 176, 141, 175, 196, 116, 116, 116, + 116, 142, 120, 176, 143, 244, 90, 144, 162, 162, + 162, 162, 121, 207, 197, 170, 177, 163, 122, 164, + 164, 164, 164, 121, 171, 209, 192, 366, 367, 830, + 172, 173, 174, 185, 193, 186, 236, 165, 165, 210, + + 194, 195, 237, 211, 187, 188, 198, 385, 199, 204, + 189, 214, 215, 205, 200, 314, 206, 207, 216, 201, + 202, 222, 217, 208, 218, 223, 203, 224, 225, 226, + 228, 170, 227, 240, 229, 186, 284, 230, 162, 162, + 162, 162, 285, 831, 199, 188, 247, 173, 174, 234, + 242, 286, 832, 225, 226, 201, 243, 248, 249, 426, + 156, 287, 203, 231, 252, 157, 252, 252, 255, 427, + 255, 255, 257, 257, 257, 257, 117, 359, 117, 117, + 154, 360, 154, 154, 162, 162, 162, 162, 162, 162, + 162, 162, 163, 311, 164, 164, 164, 164, 329, 312, + + 302, 330, 292, 292, 303, 304, 292, 292, 305, 293, + 308, 293, 165, 165, 294, 294, 294, 294, 331, 338, + 333, 381, 304, 362, 332, 309, 334, 357, 339, 833, + 358, 363, 622, 340, 342, 364, 343, 344, 345, 388, + 346, 347, 342, 393, 623, 334, 439, 348, 457, 394, + 349, 252, 350, 252, 252, 255, 458, 255, 255, 440, + 389, 257, 257, 257, 257, 430, 469, 430, 505, 506, + 431, 431, 431, 431, 294, 294, 294, 294, 294, 294, + 294, 294, 480, 474, 834, 503, 481, 484, 475, 476, + 711, 470, 477, 478, 485, 661, 662, 479, 504, 471, + + 528, 528, 712, 528, 546, 547, 548, 431, 431, 431, + 431, 431, 431, 431, 431, 606, 627, 631, 670, 699, + 638, 632, 529, 607, 528, 528, 628, 528, 677, 608, + 678, 715, 753, 716, 741, 835, 836, 837, 700, 742, + 743, 755, 838, 839, 756, 754, 529, 840, 841, 842, + 843, 844, 845, 847, 848, 849, 850, 846, 851, 852, + 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, + 863, 864, 866, 867, 868, 869, 870, 871, 872, 865, + 873, 874, 875, 876, 877, 879, 880, 881, 882, 883, + 884, 878, 885, 886, 887, 888, 889, 890, 891, 892, + + 893, 894, 895, 896, 897, 898, 899, 901, 900, 902, + 903, 904, 906, 907, 908, 909, 910, 911, 912, 913, + 914, 915, 916, 917, 918, 919, 920, 921, 922, 905, + 923, 833, 924, 925, 926, 927, 928, 929, 930, 932, + 933, 934, 931, 935, 936, 937, 938, 939, 940, 941, + 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, + 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, + 962, 963, 964, 965, 966, 967, 969, 970, 971, 972, + 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, + 983, 984, 985, 986, 968, 987, 988, 989, 990, 991, + + 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, + 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, + 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, + 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, + 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, + 1042, 1043, 1044, 1046, 1047, 1048, 1049, 1050, 1051, 1052, + 1045, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, + 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, + 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, + 1082, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1083, 1091, + + 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, + 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, + 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, + 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, + 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 1141, 1142, + 1143, 1144, 1145, 1140, 1146, 1147, 1148, 1149, 1150, 1151, + 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 1160, 1161, + 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, + 1172, 1173, 1174, 1175, 1176, 1177, 1179, 1180, 1181, 1182, + 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1178, 1190, 1191, + + 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201, + 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, + 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, + 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, + 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, + 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1256, + 1251, 1257, 1258, 1259, 1260, 1261, 1252, 1253, 1262, 1254, + 1263, 1264, 1265, 1266, 1255, 1267, 1268, 1269, 1270, 1271, + 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, + 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, + + 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1301, 1302, + 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, + 1313, 1314, 1315, 1316, 1300, 1317, 1318, 1319, 1320, 1321, + 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, + 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, + 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, + 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, + 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, + 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, + 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, + + 1392, 1393, 1394, 1395, 1397, 1398, 1399, 1400, 1401, 1402, + 1396, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411, + 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, + 1422, 1423, 1424, 1425, 39, 39, 39, 39, 39, 109, + 109, 109, 109, 109, 112, 112, 112, 112, 112, 43, + 43, 43, 43, 43, 119, 123, 119, 119, 119, 153, + 169, 153, 828, 153, 155, 827, 155, 155, 155, 160, + 160, 160, 160, 160, 251, 826, 251, 251, 251, 254, + 825, 824, 254, 254, 258, 823, 258, 258, 258, 259, + 822, 259, 259, 259, 821, 820, 819, 818, 817, 816, + + 815, 814, 813, 812, 811, 810, 809, 808, 807, 806, + 805, 804, 803, 802, 801, 800, 799, 798, 797, 796, + 795, 794, 793, 792, 791, 790, 789, 788, 787, 786, + 785, 784, 783, 782, 781, 780, 779, 778, 777, 776, + 775, 774, 773, 772, 771, 770, 769, 768, 767, 766, + 765, 764, 763, 762, 761, 760, 759, 758, 757, 752, + 751, 750, 749, 748, 747, 746, 745, 744, 740, 739, + 738, 737, 736, 735, 734, 733, 732, 731, 730, 729, + 728, 727, 726, 725, 724, 723, 722, 721, 720, 719, + 718, 717, 714, 713, 710, 709, 708, 707, 706, 705, + + 704, 703, 702, 701, 698, 697, 696, 695, 694, 693, + 692, 691, 690, 689, 688, 687, 686, 685, 684, 683, + 682, 681, 680, 679, 676, 675, 674, 673, 672, 671, + 669, 668, 667, 666, 665, 664, 663, 660, 659, 658, + 657, 656, 655, 654, 653, 652, 651, 650, 649, 648, + 647, 646, 645, 644, 643, 642, 641, 640, 639, 638, + 637, 636, 635, 634, 633, 630, 629, 626, 625, 624, + 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, + 611, 610, 609, 605, 604, 603, 602, 601, 600, 599, + 598, 597, 596, 595, 594, 593, 592, 591, 590, 589, + + 588, 587, 586, 585, 584, 583, 582, 581, 580, 579, + 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, + 568, 567, 566, 565, 564, 563, 562, 561, 560, 559, + 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, + 545, 544, 543, 542, 541, 540, 539, 538, 537, 536, + 535, 534, 533, 469, 532, 531, 530, 527, 526, 525, + 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, + 514, 513, 512, 511, 510, 509, 508, 507, 502, 501, + 500, 499, 498, 497, 496, 495, 494, 493, 492, 491, + 490, 489, 488, 487, 486, 483, 482, 473, 472, 468, + + 467, 466, 465, 464, 463, 462, 461, 460, 459, 456, + 455, 454, 453, 452, 451, 450, 449, 448, 447, 446, + 445, 444, 443, 442, 441, 438, 437, 436, 435, 434, + 433, 432, 429, 428, 425, 424, 423, 422, 421, 420, + 419, 418, 417, 416, 415, 414, 413, 412, 411, 410, + 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, + 399, 398, 397, 396, 395, 392, 391, 367, 390, 387, + 330, 386, 384, 383, 382, 380, 379, 378, 377, 376, + 375, 374, 373, 372, 371, 370, 369, 368, 365, 361, + 356, 355, 354, 353, 352, 351, 341, 337, 336, 335, + + 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, + 318, 317, 316, 315, 314, 313, 310, 307, 306, 301, + 300, 299, 298, 297, 296, 295, 161, 291, 290, 289, + 288, 283, 282, 281, 280, 279, 278, 277, 276, 275, + 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, + 264, 263, 262, 261, 260, 118, 256, 253, 250, 228, + 246, 245, 241, 239, 152, 233, 232, 231, 219, 182, + 168, 167, 166, 161, 159, 158, 152, 151, 150, 134, + 124, 118, 1426, 90, 90, 38, 17, 1426, 1426, 1426, + 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, + + 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, + 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, + 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, + 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, + 1426, 1426, 1426, 1426, 1426, 1426 + } ; + +static yyconst flex_int16_t yy_chk[1747] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 3, 3, 3, 4, 4, 4, 4, 27, 71, 19, + 3, 19, 19, 27, 4, 9, 9, 9, 9, 11, + 11, 11, 11, 28, 11, 71, 75, 75, 28, 4, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, + 7, 21, 7, 26, 13, 13, 13, 13, 7, 13, + 26, 23, 21, 29, 81, 7, 81, 23, 70, 29, + 31, 7, 23, 26, 70, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 31, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 97, 7, 10, + + 10, 10, 10, 12, 12, 12, 12, 97, 12, 14, + 14, 14, 14, 32, 14, 40, 34, 40, 40, 15, + 15, 15, 15, 41, 703, 10, 84, 32, 41, 12, + 32, 34, 35, 35, 84, 14, 15, 15, 15, 15, + 16, 16, 16, 16, 35, 44, 73, 44, 44, 95, + 33, 46, 73, 95, 33, 69, 77, 16, 16, 16, + 16, 33, 46, 69, 33, 102, 16, 33, 55, 55, + 55, 55, 56, 102, 77, 68, 69, 57, 56, 57, + 57, 57, 57, 56, 68, 80, 76, 222, 222, 705, + 68, 68, 68, 74, 76, 74, 96, 57, 57, 80, + + 76, 76, 96, 80, 74, 74, 78, 240, 78, 79, + 74, 82, 82, 79, 78, 240, 79, 79, 82, 78, + 78, 85, 82, 79, 82, 85, 78, 85, 85, 85, + 86, 94, 85, 99, 86, 99, 148, 86, 92, 92, + 92, 92, 148, 706, 101, 99, 105, 94, 94, 94, + 101, 149, 707, 105, 105, 101, 101, 105, 107, 289, + 156, 149, 101, 107, 110, 156, 110, 110, 113, 289, + 113, 113, 116, 116, 116, 116, 117, 218, 117, 117, + 154, 218, 154, 154, 162, 162, 162, 162, 163, 163, + 163, 163, 164, 183, 164, 164, 164, 164, 200, 183, + + 178, 200, 162, 162, 178, 178, 163, 163, 178, 165, + 181, 165, 164, 164, 165, 165, 165, 165, 202, 208, + 204, 236, 236, 220, 202, 181, 204, 217, 208, 709, + 217, 220, 480, 208, 210, 220, 210, 210, 210, 244, + 210, 210, 245, 250, 480, 244, 302, 210, 320, 250, + 210, 252, 210, 252, 252, 255, 320, 255, 255, 302, + 245, 257, 257, 257, 257, 292, 332, 292, 360, 360, + 292, 292, 292, 292, 293, 293, 293, 293, 294, 294, + 294, 294, 338, 336, 710, 359, 338, 341, 336, 336, + 577, 332, 336, 336, 341, 523, 523, 336, 359, 332, + + 383, 383, 577, 383, 402, 402, 402, 430, 430, 430, + 430, 431, 431, 431, 431, 466, 484, 488, 534, 563, + 534, 488, 383, 466, 528, 528, 484, 528, 541, 466, + 541, 582, 621, 582, 610, 711, 712, 713, 563, 610, + 610, 622, 714, 715, 622, 621, 528, 716, 717, 718, + 720, 721, 722, 723, 724, 725, 726, 722, 727, 728, + 729, 730, 732, 733, 734, 735, 736, 737, 738, 739, + 741, 742, 743, 744, 745, 746, 748, 749, 750, 742, + 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, + 761, 755, 763, 764, 765, 767, 768, 769, 770, 771, + + 772, 773, 774, 775, 777, 778, 779, 780, 779, 781, + 782, 784, 785, 786, 787, 788, 789, 790, 791, 792, + 793, 794, 796, 797, 798, 799, 800, 801, 803, 784, + 805, 806, 807, 808, 809, 811, 812, 813, 814, 816, + 818, 819, 814, 820, 821, 822, 823, 825, 826, 827, + 828, 830, 831, 832, 835, 835, 836, 837, 838, 839, + 840, 841, 842, 843, 845, 846, 847, 848, 849, 850, + 851, 852, 853, 854, 855, 856, 857, 859, 860, 861, + 862, 863, 864, 865, 866, 867, 868, 869, 871, 872, + 874, 875, 876, 877, 856, 878, 879, 880, 881, 882, + + 883, 885, 886, 887, 888, 889, 891, 895, 896, 897, + 898, 899, 900, 901, 903, 904, 905, 906, 907, 908, + 909, 911, 912, 913, 914, 915, 916, 917, 918, 919, + 920, 922, 924, 925, 926, 927, 930, 931, 932, 933, + 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, + 944, 945, 946, 947, 948, 949, 951, 952, 956, 957, + 946, 958, 960, 961, 962, 963, 965, 966, 967, 968, + 969, 970, 974, 975, 976, 977, 978, 979, 980, 981, + 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, + 992, 993, 994, 995, 996, 997, 998, 999, 992, 1000, + + 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1010, 1011, + 1012, 1014, 1015, 1019, 1020, 1021, 1022, 1023, 1024, 1025, + 1027, 1028, 1029, 1030, 1032, 1033, 1034, 1035, 1036, 1037, + 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, + 1048, 1049, 1050, 1051, 1052, 1054, 1055, 1056, 1058, 1059, + 1060, 1061, 1062, 1056, 1063, 1064, 1065, 1069, 1071, 1073, + 1074, 1076, 1077, 1079, 1080, 1081, 1082, 1083, 1084, 1085, + 1086, 1087, 1088, 1090, 1091, 1094, 1095, 1096, 1097, 1098, + 1099, 1100, 1101, 1102, 1106, 1106, 1108, 1109, 1110, 1111, + 1112, 1113, 1115, 1116, 1117, 1118, 1121, 1106, 1122, 1123, + + 1124, 1125, 1126, 1128, 1129, 1130, 1132, 1133, 1134, 1135, + 1136, 1137, 1138, 1139, 1140, 1141, 1142, 1143, 1145, 1146, + 1147, 1148, 1149, 1150, 1154, 1155, 1156, 1157, 1158, 1159, + 1161, 1163, 1164, 1166, 1167, 1168, 1169, 1170, 1175, 1176, + 1177, 1178, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, + 1188, 1189, 1190, 1191, 1192, 1194, 1195, 1198, 1199, 1201, + 1199, 1202, 1203, 1204, 1205, 1206, 1199, 1199, 1207, 1199, + 1210, 1211, 1212, 1213, 1199, 1214, 1215, 1216, 1217, 1218, + 1219, 1223, 1225, 1228, 1229, 1230, 1231, 1232, 1233, 1236, + 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, + + 1247, 1248, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, + 1258, 1260, 1261, 1262, 1263, 1267, 1268, 1270, 1271, 1272, + 1274, 1277, 1278, 1279, 1255, 1280, 1282, 1283, 1284, 1285, + 1286, 1288, 1289, 1290, 1292, 1293, 1294, 1295, 1296, 1298, + 1299, 1300, 1301, 1303, 1305, 1306, 1307, 1308, 1310, 1311, + 1312, 1313, 1314, 1315, 1316, 1318, 1319, 1321, 1322, 1323, + 1324, 1328, 1329, 1330, 1331, 1333, 1334, 1335, 1339, 1340, + 1341, 1342, 1343, 1344, 1347, 1348, 1349, 1350, 1351, 1352, + 1353, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1364, + 1365, 1366, 1367, 1369, 1370, 1371, 1373, 1376, 1377, 1379, + + 1380, 1382, 1383, 1384, 1385, 1387, 1390, 1391, 1392, 1395, + 1384, 1396, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, + 1407, 1408, 1410, 1412, 1414, 1415, 1416, 1418, 1419, 1420, + 1421, 1422, 1423, 1424, 1427, 1427, 1427, 1427, 1427, 1428, + 1428, 1428, 1428, 1428, 1429, 1429, 1429, 1429, 1429, 1430, + 1430, 1430, 1430, 1430, 1431, 1432, 1431, 1431, 1431, 1433, + 1436, 1433, 701, 1433, 1434, 699, 1434, 1434, 1434, 1435, + 1435, 1435, 1435, 1435, 1437, 698, 1437, 1437, 1437, 1438, + 697, 696, 1438, 1438, 1439, 695, 1439, 1439, 1439, 1440, + 694, 1440, 1440, 1440, 693, 692, 691, 690, 689, 688, + + 687, 686, 684, 683, 682, 681, 679, 678, 677, 676, + 675, 674, 673, 672, 671, 670, 669, 668, 667, 666, + 665, 664, 663, 662, 661, 660, 659, 658, 657, 656, + 655, 654, 653, 652, 651, 650, 649, 647, 646, 645, + 643, 642, 641, 638, 637, 636, 635, 634, 633, 632, + 631, 630, 629, 628, 627, 626, 625, 624, 623, 620, + 619, 618, 617, 616, 615, 614, 613, 612, 609, 608, + 607, 606, 605, 604, 603, 602, 601, 600, 599, 598, + 597, 596, 593, 592, 591, 590, 589, 588, 587, 586, + 584, 583, 581, 580, 575, 574, 573, 572, 571, 570, + + 569, 567, 566, 564, 562, 561, 560, 559, 558, 557, + 556, 555, 554, 553, 552, 551, 550, 549, 548, 547, + 546, 545, 544, 542, 540, 539, 538, 537, 536, 535, + 533, 532, 531, 530, 527, 525, 524, 522, 521, 520, + 516, 515, 514, 512, 510, 509, 508, 507, 506, 505, + 504, 503, 502, 501, 500, 499, 498, 497, 496, 494, + 493, 492, 491, 490, 489, 486, 485, 483, 482, 481, + 479, 478, 477, 476, 475, 474, 473, 472, 471, 470, + 469, 468, 467, 465, 464, 463, 462, 461, 460, 459, + 458, 457, 456, 455, 454, 452, 451, 450, 449, 448, + + 446, 445, 444, 443, 440, 439, 438, 437, 436, 435, + 434, 433, 432, 429, 428, 427, 426, 425, 424, 423, + 422, 421, 420, 419, 418, 417, 416, 415, 414, 413, + 412, 411, 410, 409, 408, 407, 406, 405, 404, 403, + 401, 400, 399, 398, 397, 396, 395, 393, 392, 391, + 390, 389, 388, 387, 386, 385, 384, 382, 381, 380, + 379, 378, 377, 376, 375, 373, 372, 371, 370, 369, + 368, 367, 366, 365, 364, 363, 362, 361, 358, 357, + 356, 355, 354, 353, 352, 351, 350, 349, 348, 347, + 346, 345, 344, 343, 342, 340, 339, 335, 333, 331, + + 330, 329, 328, 327, 326, 325, 324, 322, 321, 319, + 318, 317, 316, 315, 314, 313, 312, 311, 309, 308, + 307, 306, 305, 304, 303, 301, 300, 299, 298, 297, + 296, 295, 291, 290, 288, 287, 286, 285, 284, 283, + 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, + 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, + 262, 261, 260, 256, 253, 249, 248, 247, 246, 243, + 242, 241, 239, 238, 237, 235, 234, 233, 232, 231, + 230, 229, 228, 227, 226, 225, 224, 223, 221, 219, + 216, 215, 214, 213, 212, 211, 209, 207, 206, 205, + + 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, + 189, 188, 187, 186, 185, 184, 182, 180, 179, 177, + 176, 175, 174, 173, 171, 170, 160, 158, 152, 151, + 150, 147, 146, 145, 144, 143, 142, 141, 140, 139, + 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, + 128, 127, 126, 125, 124, 118, 114, 111, 108, 106, + 104, 103, 100, 98, 90, 89, 88, 87, 83, 72, + 62, 61, 60, 47, 45, 42, 38, 37, 36, 30, + 25, 20, 17, 8, 6, 2, 1426, 1426, 1426, 1426, + 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, + + 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, + 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, + 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, + 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, 1426, + 1426, 1426, 1426, 1426, 1426, 1426 + } ; + +static yyconst flex_int16_t yy_rule_linenum[244] = + { 0, + 74, 75, 81, 82, 88, 89, 92, 93, 94, 96, + 97, 98, 101, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 130, + 131, 132, 135, 143, 144, 145, 146, 147, 148, 150, + 151, 152, 153, 154, 155, 156, 159, 162, 163, 164, + 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + + 205, 206, 207, 208, 209, 210, 212, 213, 214, 215, + 216, 217, 218, 219, 221, 222, 224, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 247, 248, 250, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 273, 274, 275, 277, 278, 279, 280, + 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, + 291, 292, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + + 325, 326, 327, 328, 329, 332, 333, 334, 335, 336, + 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, + 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, + 357, 358, 359, 360, 361, 362, 365, 370, 375, 384, + 400, 403, 405 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "DynareFlex.ll" +/* + * Copyright (C) 2003-2008 Dynare Team + * + * This file is part of Dynare. + * + * Dynare is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Dynare is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Dynare. If not, see . + */ +#line 21 "DynareFlex.ll" +using namespace std; + +#include "ParsingDriver.hh" +#include "DynareBison.hh" + +// Announce to Flex the prototype we want for lexing function +#define YY_DECL \ + Dynare::parser::token_type \ + DynareFlex::lex(Dynare::parser::semantic_type *yylval, \ + Dynare::parser::location_type *yylloc, \ + ParsingDriver &driver) + +// Shortcut to access tokens defined by Bison +typedef Dynare::parser::token token; + +/* By default yylex returns int, we use token_type. + Unfortunately yyterminate by default returns 0, which is + not of token_type. */ +#define yyterminate() return Dynare::parser::token_type (0); + +int comment_caller, line_caller; +/* Particular value : when sigma_e command is found + this flag is set to 1, when command finished it is set to 0 + */ +int sigma_e = 0; + + + + + + + +#line 63 "DynareFlex.ll" +// Increments location counter for every token read +#define YY_USER_ACTION yylloc->columns(yyleng); +#line 1420 "DynareFlex.cc" + +#define INITIAL 0 +#define COMMENT 1 +#define DYNARE_STATEMENT 2 +#define DYNARE_BLOCK 3 +#define NATIVE 4 +#define LINE1 5 +#define LINE2 6 +#define LINE3 7 + +#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. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +#include +/* %endif */ +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* %if-c-only Reentrant structure and macros (non-C++). */ +/* %if-reentrant */ +/* %if-c-only */ +/* %endif */ +/* %if-reentrant */ +/* %endif */ +/* %if-bison-bridge */ +/* %endif */ +/* %endif End reentrant structures and macros. */ +/* %not-for-header */ + +/* %ok-for-header */ + +/* %endif */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ + +/* %ok-for-header */ + +/* %endif */ +#endif + +/* %if-c-only */ +/* %endif */ + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ +/* %if-c++-only C++ definition */ +#define ECHO LexerOutput( yytext, yyleng ) +/* %endif */ +#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) \ +/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\ +\ +/* %if-c++-only C++ definition \ */\ + if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +/* %endif */ + +#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 +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +#define YY_FATAL_ERROR(msg) LexerError( msg ) +/* %endif */ +#endif + +/* %if-tables-serialization structures and prototypes */ +/* %not-for-header */ + +/* %ok-for-header */ + +/* %not-for-header */ + +/* %tables-yydmap generated elements */ +/* %endif */ +/* end tables serialization structures and prototypes */ + +/* %ok-for-header */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ +/* %if-c++-only C++ definition */ +#define YY_DECL int yyFlexLexer::yylex() +/* %endif */ +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +/* %% [6.0] YY_RULE_SETUP definition goes here */ +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +/* %not-for-header */ + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +/* %% [7.0] user's declarations go here */ +#line 66 "DynareFlex.ll" + + /* Code put at the beginning of yylex() */ + + // Reset location before reading token + yylloc->step(); + + + /* Rules for matching @line directives */ +#line 1596 "DynareFlex.cc" + + 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 ) +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yyin = & std::cin; +/* %endif */ + + if ( ! yyout ) +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yyout = & std::cout; +/* %endif */ + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { +/* %% [8.0] yymore()-related code goes here */ + 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; + +/* %% [9.0] code to set up and find next match goes here */ + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1427 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_current_state != 1426 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +yy_find_action: +/* %% [10.0] code to find the action number goes here */ + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +/* %% [11.0] code for yylineno update goes here */ + +do_action: /* This label is used only to access EOF actions. */ + +/* %% [12.0] debug code goes here */ + if ( yy_flex_debug ) + { + if ( yy_act == 0 ) + std::cerr << "--scanner backing up\n"; + else if ( yy_act < 244 ) + std::cerr << "--accepting rule at line " << yy_rule_linenum[yy_act] << + "(\"" << yytext << "\")\n"; + else if ( yy_act == 244 ) + std::cerr << "--accepting default rule (\"" << yytext << "\")\n"; + else if ( yy_act == 245 ) + std::cerr << "--(end of buffer or a NUL)\n"; + else + std::cerr << "--EOF (start condition " << YY_START << ")\n"; + } + + switch ( yy_act ) + { /* beginning of action switch */ +/* %% [13.0] actions go here */ + 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 74 "DynareFlex.ll" +{ line_caller = YYSTATE; BEGIN(LINE1); } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 75 "DynareFlex.ll" +{ + if (yylloc->begin.filename) + delete yylloc->begin.filename; + yylloc->begin.filename = yylloc->end.filename = new string(yytext); + BEGIN(LINE2); + } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 81 "DynareFlex.ll" +BEGIN(LINE3); + YY_BREAK +case 4: +YY_RULE_SETUP +#line 82 "DynareFlex.ll" +{ + yylloc->begin.line = yylloc->end.line = atoi(yytext) - 1; + BEGIN(line_caller); + } + YY_BREAK +/* spaces, tabs and EOL are ignored */ +case 5: +YY_RULE_SETUP +#line 88 "DynareFlex.ll" +{ yylloc->step(); } + YY_BREAK +case 6: +/* rule 6 can match eol */ +YY_RULE_SETUP +#line 89 "DynareFlex.ll" +{ yylloc->lines(yyleng); yylloc->step(); } + YY_BREAK +/* Comments */ +case 7: +YY_RULE_SETUP +#line 92 "DynareFlex.ll" + + YY_BREAK +case 8: +YY_RULE_SETUP +#line 93 "DynareFlex.ll" + + YY_BREAK +case 9: +YY_RULE_SETUP +#line 94 "DynareFlex.ll" +{comment_caller = YY_START; BEGIN COMMENT;} + YY_BREAK +case 10: +YY_RULE_SETUP +#line 96 "DynareFlex.ll" + + YY_BREAK +case 11: +YY_RULE_SETUP +#line 97 "DynareFlex.ll" + + YY_BREAK +case 12: +YY_RULE_SETUP +#line 98 "DynareFlex.ll" +{BEGIN comment_caller;} + YY_BREAK +/* Begin of a Dynare statement */ +case 13: +YY_RULE_SETUP +#line 101 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::VAR;} + YY_BREAK +case 14: +YY_RULE_SETUP +#line 102 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::VAREXO;} + YY_BREAK +case 15: +YY_RULE_SETUP +#line 103 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::VAREXO_DET;} + YY_BREAK +case 16: +YY_RULE_SETUP +#line 104 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::PARAMETERS;} + YY_BREAK +case 17: +YY_RULE_SETUP +#line 105 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::PERIODS;} + YY_BREAK +case 18: +YY_RULE_SETUP +#line 106 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::CUTOFF;} + YY_BREAK +case 19: +YY_RULE_SETUP +#line 107 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::MARKOWITZ;} + YY_BREAK +case 20: +YY_RULE_SETUP +#line 108 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::ESTIMATION;} + YY_BREAK +case 21: +YY_RULE_SETUP +#line 109 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::PRIOR_ANALYSIS;} + YY_BREAK +case 22: +YY_RULE_SETUP +#line 110 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::POSTERIOR_ANALYSIS;} + YY_BREAK +case 23: +YY_RULE_SETUP +#line 111 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::VAROBS;} + YY_BREAK +case 24: +YY_RULE_SETUP +#line 112 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::UNIT_ROOT_VARS;} + YY_BREAK +case 25: +YY_RULE_SETUP +#line 113 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::RPLOT;} + YY_BREAK +case 26: +YY_RULE_SETUP +#line 114 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::OSR_PARAMS;} + YY_BREAK +case 27: +YY_RULE_SETUP +#line 115 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::OSR;} + YY_BREAK +case 28: +YY_RULE_SETUP +#line 116 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::DYNATYPE;} + YY_BREAK +case 29: +YY_RULE_SETUP +#line 117 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::DYNASAVE;} + YY_BREAK +case 30: +YY_RULE_SETUP +#line 118 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::MODEL_COMPARISON;} + YY_BREAK +case 31: +YY_RULE_SETUP +#line 120 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::STEADY;} + YY_BREAK +case 32: +YY_RULE_SETUP +#line 121 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::CHECK;} + YY_BREAK +case 33: +YY_RULE_SETUP +#line 122 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::SIMUL;} + YY_BREAK +case 34: +YY_RULE_SETUP +#line 123 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::STOCH_SIMUL;} + YY_BREAK +case 35: +YY_RULE_SETUP +#line 124 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::DSAMPLE;} + YY_BREAK +case 36: +YY_RULE_SETUP +#line 125 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; sigma_e = 1; return token::SIGMA_E;} + YY_BREAK +case 37: +YY_RULE_SETUP +#line 126 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::CALIB;} + YY_BREAK +case 38: +YY_RULE_SETUP +#line 127 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::PLANNER_OBJECTIVE;} + YY_BREAK +case 39: +YY_RULE_SETUP +#line 128 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::RAMSEY_POLICY;} + YY_BREAK +case 40: +YY_RULE_SETUP +#line 130 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::BVAR_DENSITY; } + YY_BREAK +case 41: +YY_RULE_SETUP +#line 131 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::BVAR_FORECAST; } + YY_BREAK +case 42: +YY_RULE_SETUP +#line 132 "DynareFlex.ll" +{BEGIN DYNARE_STATEMENT; return token::DYNARE_SENSITIVITY;} + YY_BREAK +/* End of a Dynare statement */ +case 43: +YY_RULE_SETUP +#line 135 "DynareFlex.ll" +{ + if (!sigma_e) + BEGIN INITIAL; + return Dynare::parser::token_type (yytext[0]); +} + YY_BREAK +/* Begin of a Dynare block */ +case 44: +YY_RULE_SETUP +#line 143 "DynareFlex.ll" +{BEGIN DYNARE_BLOCK; return token::MODEL;} + YY_BREAK +case 45: +YY_RULE_SETUP +#line 144 "DynareFlex.ll" +{BEGIN DYNARE_BLOCK; return token::INITVAL;} + YY_BREAK +case 46: +YY_RULE_SETUP +#line 145 "DynareFlex.ll" +{BEGIN DYNARE_BLOCK; return token::ENDVAL;} + YY_BREAK +case 47: +YY_RULE_SETUP +#line 146 "DynareFlex.ll" +{BEGIN DYNARE_BLOCK; return token::HISTVAL;} + YY_BREAK +case 48: +YY_RULE_SETUP +#line 147 "DynareFlex.ll" +{BEGIN DYNARE_BLOCK; return token::SHOCKS;} + YY_BREAK +case 49: +YY_RULE_SETUP +#line 148 "DynareFlex.ll" +{BEGIN DYNARE_BLOCK; return token::ESTIMATED_PARAMS;} + YY_BREAK +/* priors is an alias for estimated_params */ +case 50: +YY_RULE_SETUP +#line 150 "DynareFlex.ll" +{BEGIN DYNARE_BLOCK;return token::ESTIMATED_PARAMS;} + YY_BREAK +case 51: +YY_RULE_SETUP +#line 151 "DynareFlex.ll" +{BEGIN DYNARE_BLOCK; return token::ESTIMATED_PARAMS_INIT;} + YY_BREAK +case 52: +YY_RULE_SETUP +#line 152 "DynareFlex.ll" +{BEGIN DYNARE_BLOCK; return token::ESTIMATED_PARAMS_BOUNDS;} + YY_BREAK +case 53: +YY_RULE_SETUP +#line 153 "DynareFlex.ll" +{BEGIN DYNARE_BLOCK; return token::OBSERVATION_TRENDS;} + YY_BREAK +case 54: +YY_RULE_SETUP +#line 154 "DynareFlex.ll" +{BEGIN DYNARE_BLOCK; return token::OPTIM_WEIGHTS;} + YY_BREAK +case 55: +YY_RULE_SETUP +#line 155 "DynareFlex.ll" +{BEGIN DYNARE_BLOCK; return token::CALIB_VAR;} + YY_BREAK +case 56: +YY_RULE_SETUP +#line 156 "DynareFlex.ll" +{BEGIN DYNARE_BLOCK; return token::HOMOTOPY_SETUP;} + YY_BREAK +/* End of a Dynare block */ +case 57: +/* rule 57 can match eol */ +YY_RULE_SETUP +#line 159 "DynareFlex.ll" +{BEGIN INITIAL; return token::END;} + YY_BREAK +/* Inside of a Dynare statement */ +case 58: +YY_RULE_SETUP +#line 162 "DynareFlex.ll" +{return token::DATAFILE;} + YY_BREAK +case 59: +YY_RULE_SETUP +#line 163 "DynareFlex.ll" +{return token::METHOD;} + YY_BREAK +case 60: +YY_RULE_SETUP +#line 164 "DynareFlex.ll" +{return token::NOBS;} + YY_BREAK +case 61: +YY_RULE_SETUP +#line 165 "DynareFlex.ll" +{return token::FIRST_OBS;} + YY_BREAK +case 62: +YY_RULE_SETUP +#line 166 "DynareFlex.ll" +{return token::PREFILTER;} + YY_BREAK +case 63: +YY_RULE_SETUP +#line 167 "DynareFlex.ll" +{return token::PRESAMPLE;} + YY_BREAK +case 64: +YY_RULE_SETUP +#line 168 "DynareFlex.ll" +{return token::LIK_ALGO;} + YY_BREAK +case 65: +YY_RULE_SETUP +#line 169 "DynareFlex.ll" +{return token::LIK_INIT;} + YY_BREAK +case 66: +YY_RULE_SETUP +#line 170 "DynareFlex.ll" +{return token::GRAPH;} + YY_BREAK +case 67: +YY_RULE_SETUP +#line 171 "DynareFlex.ll" +{return token::NOGRAPH;} + YY_BREAK +case 68: +YY_RULE_SETUP +#line 172 "DynareFlex.ll" +{return token::PRINT;} + YY_BREAK +case 69: +YY_RULE_SETUP +#line 173 "DynareFlex.ll" +{return token::NOPRINT;} + YY_BREAK +case 70: +YY_RULE_SETUP +#line 174 "DynareFlex.ll" +{return token::CONF_SIG;} + YY_BREAK +case 71: +YY_RULE_SETUP +#line 175 "DynareFlex.ll" +{return token::MH_REPLIC;} + YY_BREAK +case 72: +YY_RULE_SETUP +#line 176 "DynareFlex.ll" +{return token::MH_DROP;} + YY_BREAK +case 73: +YY_RULE_SETUP +#line 177 "DynareFlex.ll" +{return token::MH_JSCALE;} + YY_BREAK +case 74: +YY_RULE_SETUP +#line 178 "DynareFlex.ll" +{return token::MH_INIT_SCALE;} + YY_BREAK +case 75: +YY_RULE_SETUP +#line 179 "DynareFlex.ll" +{return token::MODE_FILE;} + YY_BREAK +case 76: +YY_RULE_SETUP +#line 180 "DynareFlex.ll" +{return token::MODE_COMPUTE;} + YY_BREAK +case 77: +YY_RULE_SETUP +#line 181 "DynareFlex.ll" +{return token::MODE_CHECK;} + YY_BREAK +case 78: +YY_RULE_SETUP +#line 182 "DynareFlex.ll" +{return token::PRIOR_TRUNC;} + YY_BREAK +case 79: +YY_RULE_SETUP +#line 183 "DynareFlex.ll" +{return token::MH_MODE;} + YY_BREAK +case 80: +YY_RULE_SETUP +#line 184 "DynareFlex.ll" +{return token::MH_NBLOCKS;} + YY_BREAK +case 81: +YY_RULE_SETUP +#line 185 "DynareFlex.ll" +{return token::LOAD_MH_FILE;} + YY_BREAK +case 82: +YY_RULE_SETUP +#line 186 "DynareFlex.ll" +{return token::LOGLINEAR;} + YY_BREAK +case 83: +YY_RULE_SETUP +#line 187 "DynareFlex.ll" +{return token::NODIAGNOSTIC;} + YY_BREAK +case 84: +YY_RULE_SETUP +#line 188 "DynareFlex.ll" +{return token::KALMAN_ALGO;} + YY_BREAK +case 85: +YY_RULE_SETUP +#line 189 "DynareFlex.ll" +{return token::KALMAN_TOL;} + YY_BREAK +case 86: +YY_RULE_SETUP +#line 190 "DynareFlex.ll" +{return token::FORECAST;} + YY_BREAK +case 87: +YY_RULE_SETUP +#line 191 "DynareFlex.ll" +{return token::SMOOTHER;} + YY_BREAK +case 88: +YY_RULE_SETUP +#line 192 "DynareFlex.ll" +{return token::BAYESIAN_IRF;} + YY_BREAK +case 89: +YY_RULE_SETUP +#line 193 "DynareFlex.ll" +{return token::MOMENTS_VARENDO;} + YY_BREAK +case 90: +YY_RULE_SETUP +#line 194 "DynareFlex.ll" +{return token::FILTERED_VARS;} + YY_BREAK +case 91: +YY_RULE_SETUP +#line 195 "DynareFlex.ll" +{return token::FILTER_STEP_AHEAD;} + YY_BREAK +case 92: +YY_RULE_SETUP +#line 196 "DynareFlex.ll" +{return token::RELATIVE_IRF;} + YY_BREAK +case 93: +YY_RULE_SETUP +#line 197 "DynareFlex.ll" +{return token::TEX;} + YY_BREAK +case 94: +YY_RULE_SETUP +#line 198 "DynareFlex.ll" +{return token::NOMOMENTS;} + YY_BREAK +case 95: +YY_RULE_SETUP +#line 199 "DynareFlex.ll" +{return token::CORR;} + YY_BREAK +case 96: +YY_RULE_SETUP +#line 200 "DynareFlex.ll" +{return token::NOCORR;} + YY_BREAK +case 97: +YY_RULE_SETUP +#line 201 "DynareFlex.ll" +{return token::OPTIM;} + YY_BREAK +case 98: +YY_RULE_SETUP +#line 202 "DynareFlex.ll" +{return token::PERIODS;} + YY_BREAK +case 99: +YY_RULE_SETUP +#line 203 "DynareFlex.ll" +{return token::CUTOFF;} + YY_BREAK +case 100: +YY_RULE_SETUP +#line 204 "DynareFlex.ll" +{return token::MARKOWITZ;} + YY_BREAK +case 101: +YY_RULE_SETUP +#line 205 "DynareFlex.ll" +{return token::MODEL_COMPARISON;} + YY_BREAK +case 102: +YY_RULE_SETUP +#line 206 "DynareFlex.ll" +{return token::LAPLACE;} + YY_BREAK +case 103: +YY_RULE_SETUP +#line 207 "DynareFlex.ll" +{return token::MODIFIEDHARMONICMEAN;} + YY_BREAK +case 104: +YY_RULE_SETUP +#line 208 "DynareFlex.ll" +{return token::CONSTANT;} + YY_BREAK +case 105: +YY_RULE_SETUP +#line 209 "DynareFlex.ll" +{return token::NOCONSTANT;} + YY_BREAK +case 106: +YY_RULE_SETUP +#line 210 "DynareFlex.ll" +{return token::COVAR;} + YY_BREAK +case 107: +YY_RULE_SETUP +#line 212 "DynareFlex.ll" +{ return token::BVAR_PRIOR_TAU; } + YY_BREAK +case 108: +YY_RULE_SETUP +#line 213 "DynareFlex.ll" +{ return token::BVAR_PRIOR_DECAY; } + YY_BREAK +case 109: +YY_RULE_SETUP +#line 214 "DynareFlex.ll" +{ return token::BVAR_PRIOR_LAMBDA; } + YY_BREAK +case 110: +YY_RULE_SETUP +#line 215 "DynareFlex.ll" +{ return token::BVAR_PRIOR_MU; } + YY_BREAK +case 111: +YY_RULE_SETUP +#line 216 "DynareFlex.ll" +{ return token::BVAR_PRIOR_OMEGA; } + YY_BREAK +case 112: +YY_RULE_SETUP +#line 217 "DynareFlex.ll" +{ return token::BVAR_PRIOR_FLAT; } + YY_BREAK +case 113: +YY_RULE_SETUP +#line 218 "DynareFlex.ll" +{ return token::BVAR_PRIOR_TRAIN; } + YY_BREAK +case 114: +YY_RULE_SETUP +#line 219 "DynareFlex.ll" +{ return token::BVAR_REPLIC; } + YY_BREAK +case 115: +YY_RULE_SETUP +#line 221 "DynareFlex.ll" +{return token::HOMOTOPY_MODE; } + YY_BREAK +case 116: +YY_RULE_SETUP +#line 222 "DynareFlex.ll" +{return token::HOMOTOPY_STEPS; } + YY_BREAK +case 117: +/* rule 117 can match eol */ +YY_RULE_SETUP +#line 224 "DynareFlex.ll" +{ + strtok(yytext+1, "$"); + yylval->string_val = new string(yytext + 1); + return token::TEX_NAME; +} + YY_BREAK +/* Inside a Dynare block */ +case 118: +YY_RULE_SETUP +#line 231 "DynareFlex.ll" +{return token::VAR;} + YY_BREAK +case 119: +YY_RULE_SETUP +#line 232 "DynareFlex.ll" +{return token::STDERR;} + YY_BREAK +case 120: +YY_RULE_SETUP +#line 233 "DynareFlex.ll" +{return token::VALUES;} + YY_BREAK +case 121: +YY_RULE_SETUP +#line 234 "DynareFlex.ll" +{return token::CORR;} + YY_BREAK +case 122: +YY_RULE_SETUP +#line 235 "DynareFlex.ll" +{return token::PERIODS;} + YY_BREAK +case 123: +YY_RULE_SETUP +#line 236 "DynareFlex.ll" +{return token::CUTOFF;} + YY_BREAK +case 124: +YY_RULE_SETUP +#line 237 "DynareFlex.ll" +{return token::MARKOWITZ;} + YY_BREAK +case 125: +YY_RULE_SETUP +#line 238 "DynareFlex.ll" +{return token::FILENAME;} + YY_BREAK +case 126: +YY_RULE_SETUP +#line 239 "DynareFlex.ll" +{return token::GAMMA_PDF;} + YY_BREAK +case 127: +YY_RULE_SETUP +#line 240 "DynareFlex.ll" +{return token::BETA_PDF;} + YY_BREAK +case 128: +YY_RULE_SETUP +#line 241 "DynareFlex.ll" +{return token::NORMAL_PDF;} + YY_BREAK +case 129: +YY_RULE_SETUP +#line 242 "DynareFlex.ll" +{return token::INV_GAMMA_PDF;} + YY_BREAK +case 130: +YY_RULE_SETUP +#line 243 "DynareFlex.ll" +{return token::INV_GAMMA_PDF;} + YY_BREAK +case 131: +YY_RULE_SETUP +#line 244 "DynareFlex.ll" +{return token::INV_GAMMA_PDF;} + YY_BREAK +case 132: +YY_RULE_SETUP +#line 245 "DynareFlex.ll" +{return token::UNIFORM_PDF;} + YY_BREAK +case 133: +YY_RULE_SETUP +#line 247 "DynareFlex.ll" +{return Dynare::parser::token_type (yytext[0]);} + YY_BREAK +case 134: +YY_RULE_SETUP +#line 248 "DynareFlex.ll" +{return Dynare::parser::token_type (yytext[0]);} + YY_BREAK +case 135: +YY_RULE_SETUP +#line 250 "DynareFlex.ll" +{return token::AUTOCORR;} + YY_BREAK +/* Inside Dynare statement */ +case 136: +YY_RULE_SETUP +#line 253 "DynareFlex.ll" +{return token::SOLVE_ALGO;} + YY_BREAK +case 137: +YY_RULE_SETUP +#line 254 "DynareFlex.ll" +{return token::DR_ALGO;} + YY_BREAK +case 138: +YY_RULE_SETUP +#line 255 "DynareFlex.ll" +{return token::SIMUL_ALGO;} + YY_BREAK +case 139: +YY_RULE_SETUP +#line 256 "DynareFlex.ll" +{return token::DROP;} + YY_BREAK +case 140: +YY_RULE_SETUP +#line 257 "DynareFlex.ll" +{return token::ORDER;} + YY_BREAK +case 141: +YY_RULE_SETUP +#line 258 "DynareFlex.ll" +{return token::REPLIC;} + YY_BREAK +case 142: +YY_RULE_SETUP +#line 259 "DynareFlex.ll" +{return token::AR;} + YY_BREAK +case 143: +YY_RULE_SETUP +#line 260 "DynareFlex.ll" +{return token::NOFUNCTIONS;} + YY_BREAK +case 144: +YY_RULE_SETUP +#line 261 "DynareFlex.ll" +{return token::IRF;} + YY_BREAK +case 145: +YY_RULE_SETUP +#line 262 "DynareFlex.ll" +{return token::HP_FILTER;} + YY_BREAK +case 146: +YY_RULE_SETUP +#line 263 "DynareFlex.ll" +{return token::HP_NGRID;} + YY_BREAK +case 147: +YY_RULE_SETUP +#line 264 "DynareFlex.ll" +{return token::SIMUL_SEED;} + YY_BREAK +case 148: +YY_RULE_SETUP +#line 265 "DynareFlex.ll" +{return token::QZ_CRITERIUM;} + YY_BREAK +case 149: +YY_RULE_SETUP +#line 266 "DynareFlex.ll" +{return token::SIMUL;} + YY_BREAK +case 150: +YY_RULE_SETUP +#line 267 "DynareFlex.ll" +{return token::XLS_SHEET;} + YY_BREAK +case 151: +YY_RULE_SETUP +#line 268 "DynareFlex.ll" +{return token::XLS_RANGE;} + YY_BREAK +case 152: +YY_RULE_SETUP +#line 269 "DynareFlex.ll" +{return token::MH_RECOVER;} + YY_BREAK +case 153: +YY_RULE_SETUP +#line 270 "DynareFlex.ll" +{return token::PLANNER_DISCOUNT;} + YY_BREAK +case 154: +YY_RULE_SETUP +#line 273 "DynareFlex.ll" +{return Dynare::parser::token_type (yytext[0]);} + YY_BREAK +case 155: +YY_RULE_SETUP +#line 274 "DynareFlex.ll" +{return Dynare::parser::token_type (yytext[0]);} + YY_BREAK +case 156: +YY_RULE_SETUP +#line 275 "DynareFlex.ll" +{return Dynare::parser::token_type (yytext[0]);} + YY_BREAK +case 157: +YY_RULE_SETUP +#line 277 "DynareFlex.ll" +{return token::USE_DLL;} + YY_BREAK +case 158: +YY_RULE_SETUP +#line 278 "DynareFlex.ll" +{return token::LU;} + YY_BREAK +case 159: +YY_RULE_SETUP +#line 279 "DynareFlex.ll" +{return token::GAUSSIAN_ELIMINATION;} + YY_BREAK +case 160: +YY_RULE_SETUP +#line 280 "DynareFlex.ll" +{return token::GMRES;} + YY_BREAK +case 161: +YY_RULE_SETUP +#line 281 "DynareFlex.ll" +{return token::BICGSTAB;} + YY_BREAK +case 162: +YY_RULE_SETUP +#line 282 "DynareFlex.ll" +{return token::SPARSE;} + YY_BREAK +case 163: +YY_RULE_SETUP +#line 283 "DynareFlex.ll" +{return token::SPARSE_DLL;} + YY_BREAK +case 164: +YY_RULE_SETUP +#line 284 "DynareFlex.ll" +{return token::GCC_COMPILER;} + YY_BREAK +case 165: +YY_RULE_SETUP +#line 285 "DynareFlex.ll" +{return token::LCC_COMPILER;} + YY_BREAK +case 166: +YY_RULE_SETUP +#line 286 "DynareFlex.ll" +{return token::NO_COMPILER;} + YY_BREAK +case 167: +YY_RULE_SETUP +#line 287 "DynareFlex.ll" +{return token::LINEAR;} + YY_BREAK +case 168: +YY_RULE_SETUP +#line 288 "DynareFlex.ll" +{return token::COMMA;} + YY_BREAK +case 169: +YY_RULE_SETUP +#line 289 "DynareFlex.ll" +{return Dynare::parser::token_type (yytext[0]);} + YY_BREAK +case 170: +YY_RULE_SETUP +#line 290 "DynareFlex.ll" +{return Dynare::parser::token_type (yytext[0]);} + YY_BREAK +case 171: +YY_RULE_SETUP +#line 291 "DynareFlex.ll" +{return Dynare::parser::token_type (yytext[0]);} + YY_BREAK +case 172: +YY_RULE_SETUP +#line 292 "DynareFlex.ll" +{ + if (sigma_e) + sigma_e = 0; + return Dynare::parser::token_type (yytext[0]); +} + YY_BREAK +case 173: +YY_RULE_SETUP +#line 297 "DynareFlex.ll" +{return token::PLUS;} + YY_BREAK +case 174: +YY_RULE_SETUP +#line 298 "DynareFlex.ll" +{return token::MINUS;} + YY_BREAK +case 175: +YY_RULE_SETUP +#line 299 "DynareFlex.ll" +{return token::TIMES;} + YY_BREAK +case 176: +YY_RULE_SETUP +#line 300 "DynareFlex.ll" +{return token::DIVIDE;} + YY_BREAK +case 177: +YY_RULE_SETUP +#line 301 "DynareFlex.ll" +{return token::EQUAL;} + YY_BREAK +case 178: +YY_RULE_SETUP +#line 302 "DynareFlex.ll" +{return token::LESS;} + YY_BREAK +case 179: +YY_RULE_SETUP +#line 303 "DynareFlex.ll" +{return token::GREATER;} + YY_BREAK +case 180: +YY_RULE_SETUP +#line 304 "DynareFlex.ll" +{return token::GREATER_EQUAL;} + YY_BREAK +case 181: +YY_RULE_SETUP +#line 305 "DynareFlex.ll" +{return token::LESS_EQUAL;} + YY_BREAK +case 182: +YY_RULE_SETUP +#line 306 "DynareFlex.ll" +{return token::EQUAL_EQUAL;} + YY_BREAK +case 183: +YY_RULE_SETUP +#line 307 "DynareFlex.ll" +{return token::EXCLAMATION_EQUAL;} + YY_BREAK +case 184: +YY_RULE_SETUP +#line 308 "DynareFlex.ll" +{return token::EXCLAMATION;} + YY_BREAK +case 185: +YY_RULE_SETUP +#line 309 "DynareFlex.ll" +{return token::POWER;} + YY_BREAK +case 186: +YY_RULE_SETUP +#line 310 "DynareFlex.ll" +{return token::EXP;} + YY_BREAK +case 187: +YY_RULE_SETUP +#line 311 "DynareFlex.ll" +{return token::LOG;} + YY_BREAK +case 188: +YY_RULE_SETUP +#line 312 "DynareFlex.ll" +{return token::LOG10;} + YY_BREAK +case 189: +YY_RULE_SETUP +#line 313 "DynareFlex.ll" +{return token::LN;} + YY_BREAK +case 190: +YY_RULE_SETUP +#line 314 "DynareFlex.ll" +{return token::SIN;} + YY_BREAK +case 191: +YY_RULE_SETUP +#line 315 "DynareFlex.ll" +{return token::COS;} + YY_BREAK +case 192: +YY_RULE_SETUP +#line 316 "DynareFlex.ll" +{return token::TAN;} + YY_BREAK +case 193: +YY_RULE_SETUP +#line 317 "DynareFlex.ll" +{return token::ASIN;} + YY_BREAK +case 194: +YY_RULE_SETUP +#line 318 "DynareFlex.ll" +{return token::ACOS;} + YY_BREAK +case 195: +YY_RULE_SETUP +#line 319 "DynareFlex.ll" +{return token::ATAN;} + YY_BREAK +case 196: +YY_RULE_SETUP +#line 320 "DynareFlex.ll" +{return token::SINH;} + YY_BREAK +case 197: +YY_RULE_SETUP +#line 321 "DynareFlex.ll" +{return token::COSH;} + YY_BREAK +case 198: +YY_RULE_SETUP +#line 322 "DynareFlex.ll" +{return token::TANH;} + YY_BREAK +case 199: +YY_RULE_SETUP +#line 323 "DynareFlex.ll" +{return token::ASINH;} + YY_BREAK +case 200: +YY_RULE_SETUP +#line 324 "DynareFlex.ll" +{return token::ACOSH;} + YY_BREAK +case 201: +YY_RULE_SETUP +#line 325 "DynareFlex.ll" +{return token::ATANH;} + YY_BREAK +case 202: +YY_RULE_SETUP +#line 326 "DynareFlex.ll" +{return token::SQRT;} + YY_BREAK +case 203: +YY_RULE_SETUP +#line 327 "DynareFlex.ll" +{return token::MAX;} + YY_BREAK +case 204: +YY_RULE_SETUP +#line 328 "DynareFlex.ll" +{return token::MIN;} + YY_BREAK +case 205: +YY_RULE_SETUP +#line 329 "DynareFlex.ll" +{return token::NORMCDF;} + YY_BREAK +/* options for GSA module by Marco Ratto */ +case 206: +YY_RULE_SETUP +#line 332 "DynareFlex.ll" +{return token::IDENTIFICATION;} + YY_BREAK +case 207: +YY_RULE_SETUP +#line 333 "DynareFlex.ll" +{return token::MORRIS;} + YY_BREAK +case 208: +YY_RULE_SETUP +#line 334 "DynareFlex.ll" +{return token::STAB;} + YY_BREAK +case 209: +YY_RULE_SETUP +#line 335 "DynareFlex.ll" +{return token::REDFORM;} + YY_BREAK +case 210: +YY_RULE_SETUP +#line 336 "DynareFlex.ll" +{return token::PPRIOR;} + YY_BREAK +case 211: +YY_RULE_SETUP +#line 337 "DynareFlex.ll" +{return token::PRIOR_RANGE;} + YY_BREAK +case 212: +YY_RULE_SETUP +#line 338 "DynareFlex.ll" +{return token::PPOST;} + YY_BREAK +case 213: +YY_RULE_SETUP +#line 339 "DynareFlex.ll" +{return token::ILPTAU;} + YY_BREAK +case 214: +YY_RULE_SETUP +#line 340 "DynareFlex.ll" +{return token::GLUE;} + YY_BREAK +case 215: +YY_RULE_SETUP +#line 341 "DynareFlex.ll" +{return token::MORRIS_NLIV;} + YY_BREAK +case 216: +YY_RULE_SETUP +#line 342 "DynareFlex.ll" +{return token::MORRIS_NTRA;} + YY_BREAK +case 217: +YY_RULE_SETUP +#line 343 "DynareFlex.ll" +{return token::NSAM;} + YY_BREAK +case 218: +YY_RULE_SETUP +#line 344 "DynareFlex.ll" +{return token::LOAD_REDFORM;} + YY_BREAK +case 219: +YY_RULE_SETUP +#line 345 "DynareFlex.ll" +{return token::LOAD_RMSE;} + YY_BREAK +case 220: +YY_RULE_SETUP +#line 346 "DynareFlex.ll" +{return token::LOAD_STAB;} + YY_BREAK +case 221: +YY_RULE_SETUP +#line 347 "DynareFlex.ll" +{return token::ALPHA2_STAB;} + YY_BREAK +case 222: +YY_RULE_SETUP +#line 348 "DynareFlex.ll" +{return token::KSSTAT;} + YY_BREAK +case 223: +YY_RULE_SETUP +#line 349 "DynareFlex.ll" +{return token::LOGTRANS_REDFORM;} + YY_BREAK +case 224: +YY_RULE_SETUP +#line 350 "DynareFlex.ll" +{return token::THRESHOLD_REDFORM;} + YY_BREAK +case 225: +YY_RULE_SETUP +#line 351 "DynareFlex.ll" +{return token::KSSTAT_REDFORM;} + YY_BREAK +case 226: +YY_RULE_SETUP +#line 352 "DynareFlex.ll" +{return token::ALPHA2_REDFORM;} + YY_BREAK +case 227: +YY_RULE_SETUP +#line 353 "DynareFlex.ll" +{return token::NAMENDO;} + YY_BREAK +case 228: +YY_RULE_SETUP +#line 354 "DynareFlex.ll" +{return token::NAMLAGENDO;} + YY_BREAK +case 229: +YY_RULE_SETUP +#line 355 "DynareFlex.ll" +{return token::NAMEXO;} + YY_BREAK +case 230: +YY_RULE_SETUP +#line 356 "DynareFlex.ll" +{return token::RMSE;} + YY_BREAK +case 231: +YY_RULE_SETUP +#line 357 "DynareFlex.ll" +{return token::LIK_ONLY;} + YY_BREAK +case 232: +YY_RULE_SETUP +#line 358 "DynareFlex.ll" +{return token::VAR_RMSE;} + YY_BREAK +case 233: +YY_RULE_SETUP +#line 359 "DynareFlex.ll" +{return token::PFILT_RMSE;} + YY_BREAK +case 234: +YY_RULE_SETUP +#line 360 "DynareFlex.ll" +{return token::ISTART_RMSE;} + YY_BREAK +case 235: +YY_RULE_SETUP +#line 361 "DynareFlex.ll" +{return token::ALPHA_RMSE;} + YY_BREAK +case 236: +YY_RULE_SETUP +#line 362 "DynareFlex.ll" +{return token::ALPHA2_RMSE;} + YY_BREAK +/* end of GSA options */ +case 237: +YY_RULE_SETUP +#line 365 "DynareFlex.ll" +{ + yylval->string_val = new string(yytext); + return token::NAME; +} + YY_BREAK +case 238: +YY_RULE_SETUP +#line 370 "DynareFlex.ll" +{ + yylval->string_val = new string(yytext); + return token::FLOAT_NUMBER; +} + YY_BREAK +case 239: +YY_RULE_SETUP +#line 375 "DynareFlex.ll" +{ + yylval->string_val = new string(yytext); + return token::INT_NUMBER; +} + YY_BREAK +/* an instruction starting with a recognized symbol (which is not a modfile local variable) + is passed as NAME, + otherwise it is a native statement until the end of the line + */ +case 240: +YY_RULE_SETUP +#line 384 "DynareFlex.ll" +{ + if (driver.symbol_exists_and_is_not_modfile_local_variable(yytext)) + { + BEGIN DYNARE_STATEMENT; + yylval->string_val = new string(yytext); + return token::NAME; + } + else + { + /* Enter a native block */ + BEGIN NATIVE; + yyless(0); + } +} + YY_BREAK +/* Enter a native block */ +case 241: +YY_RULE_SETUP +#line 400 "DynareFlex.ll" +{ BEGIN NATIVE; yyless(0); } + YY_BREAK +/* Add the native statement */ +case 242: +YY_RULE_SETUP +#line 403 "DynareFlex.ll" +{ driver.add_native(yytext); BEGIN INITIAL; } + YY_BREAK +case 243: +YY_RULE_SETUP +#line 405 "DynareFlex.ll" +{ driver.error(*yylloc, "character unrecognized by lexer"); } + YY_BREAK +case 244: +YY_RULE_SETUP +#line 406 "DynareFlex.ll" +ECHO; + YY_BREAK +#line 2989 "DynareFlex.cc" +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(COMMENT): +case YY_STATE_EOF(DYNARE_STATEMENT): +case YY_STATE_EOF(DYNARE_BLOCK): +case YY_STATE_EOF(NATIVE): +case YY_STATE_EOF(LINE1): +case YY_STATE_EOF(LINE2): +case YY_STATE_EOF(LINE3): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { +/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of yylex */ +/* %ok-for-header */ + +/* %if-c++-only */ +/* %not-for-header */ + +yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ) +{ + yyin = arg_yyin; + yyout = arg_yyout; + yy_c_buf_p = 0; + yy_init = 0; + yy_start = 0; + yy_flex_debug = 0; + yylineno = 1; // this will only get updated if %option yylineno + + yy_did_buffer_switch_on_eof = 0; + + yy_looking_for_trail_begin = 0; + yy_more_flag = 0; + yy_more_len = 0; + yy_more_offset = yy_prev_more_offset = 0; + + yy_start_stack_ptr = yy_start_stack_depth = 0; + yy_start_stack = NULL; + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + + yy_state_buf = 0; + +} + +void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out ) +{ + if ( new_in ) + { + yy_delete_buffer( YY_CURRENT_BUFFER ); + yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) ); + } + + if ( new_out ) + yyout = new_out; +} + +#ifdef YY_INTERACTIVE +int yyFlexLexer::LexerInput( char* buf, int /* max_size */ ) +#else +int yyFlexLexer::LexerInput( char* buf, int max_size ) +#endif +{ + if ( yyin->eof() || yyin->fail() ) + return 0; + +#ifdef YY_INTERACTIVE + yyin->get( buf[0] ); + + if ( yyin->eof() ) + return 0; + + if ( yyin->bad() ) + return -1; + + return 1; + +#else + (void) yyin->read( buf, max_size ); + + if ( yyin->bad() ) + return -1; + else + return yyin->gcount(); +#endif +} + +void yyFlexLexer::LexerOutput( const char* buf, int size ) +{ + (void) yyout->write( buf, size ); +} +/* %ok-for-header */ + +/* %endif */ + +/* 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 + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +int yyFlexLexer::yy_get_next_buffer() +/* %endif */ +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + Dynarerealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +/* %if-c-only */ +/* %not-for-header */ + +/* %endif */ +/* %if-c++-only */ + yy_state_type yyFlexLexer::yy_get_previous_state() +/* %endif */ +{ + register yy_state_type yy_current_state; + register char *yy_cp; + +/* %% [15.0] code to get the start state into yy_current_state goes here */ + 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 ) + { +/* %% [16.0] code to find the next state goes here */ + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1427 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) +/* %endif */ +{ + register int yy_is_jam; + /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ + register char *yy_cp = (yy_c_buf_p); + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 1427 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 1426); + + return yy_is_jam ? 0 : yy_current_state; +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yyunput( int c, register char* yy_bp) +/* %endif */ +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + +/* %% [18.0] update yylineno here */ + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + int yyFlexLexer::yyinput() +/* %endif */ +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + +/* %% [19.0] update BOL and yylineno */ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + + return c; +} +/* %if-c-only */ +/* %endif */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yyrestart( std::istream* input_file ) +/* %endif */ +{ + + 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. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +/* %endif */ +{ + + /* 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; +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_load_buffer_state() +/* %endif */ +{ + (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. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size ) +/* %endif */ +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) Dynarealloc(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 *) Dynarealloc(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() + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b ) +/* %endif */ +{ + + 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 ) + Dynarefree((void *) b->yy_ch_buf ); + + Dynarefree((void *) b ); +} + +/* %if-c-only */ +/* %endif */ + +/* %if-c++-only */ + +/* %endif */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file ) +/* %endif */ + +{ + 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; + } + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + b->yy_is_interactive = 0; +/* %endif */ + 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. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b ) +/* %endif */ +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/* %if-c-or-c++ */ +/** 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. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer) +/* %endif */ +{ + 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; +} +/* %endif */ + +/* %if-c-or-c++ */ +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yypop_buffer_state (void) +/* %endif */ +{ + 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; + } +} +/* %endif */ + +/* %if-c-or-c++ */ +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yyensure_buffer_stack(void) +/* %endif */ +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)Dynarealloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)Dynarerealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_push_state( int new_state ) +/* %endif */ +{ + if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) + { + yy_size_t new_size; + + (yy_start_stack_depth) += YY_START_STACK_INCR; + new_size = (yy_start_stack_depth) * sizeof( int ); + + if ( ! (yy_start_stack) ) + (yy_start_stack) = (int *) Dynarealloc(new_size ); + + else + (yy_start_stack) = (int *) Dynarerealloc((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); +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_pop_state() +/* %endif */ +{ + if ( --(yy_start_stack_ptr) < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + int yyFlexLexer::yy_top_state() +/* %endif */ +{ + return (yy_start_stack)[(yy_start_stack_ptr) - 1]; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::LexerError( yyconst char msg[] ) +{ + std::cerr << msg << std::endl; + exit( YY_EXIT_FAILURE ); +} +/* %endif */ + +/* 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. */ + +/* %if-c-only */ +/* %if-reentrant */ +/* %endif */ +/* %if-reentrant */ +/* %endif */ +/* %endif */ + +/* %if-reentrant */ +/* %if-bison-bridge */ +/* %endif */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-or-c++ */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +yyFlexLexer::~yyFlexLexer() +/* %endif */ +{ + + /* 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. */ + Dynarefree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + +/* %if-c++-only */ + delete [] (yy_state_buf); + Dynarefree((yy_start_stack) ); +/* %endif */ + +/* %if-c-only */ +/* %if-reentrant */ +/* %endif */ +/* %endif */ +} +/* %endif */ + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *Dynarealloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *Dynarerealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void Dynarefree (void * ptr ) +{ + free( (char *) ptr ); /* see Dynarerealloc() for (char *) cast */ +} + +/* %if-tables-serialization definitions */ +/* %define-yytables The name for this specific scanner's tables. */ +#define YYTABLES_NAME "yytables" +/* %endif */ + +/* %ok-for-header */ + +#line 406 "DynareFlex.ll" + + + +DynareFlex::DynareFlex(istream* in, ostream* out) + : DynareFlexLexer(in, out) +{ +} + +/* This implementation of DynareFlexLexer::yylex() is required to fill the + * vtable of the class DynareFlexLexer. We define the scanner's main yylex + * function via YY_DECL to reside in the DynareFlex class instead. */ + +#ifdef yylex +# undef yylex +#endif + +int +DynareFlexLexer::yylex() +{ + cerr << "DynareFlexLexer::yylex() has been called, that should never happen!" << endl; + exit(-1); +} + +/* + Local variables: + mode: C++ + End: +*/ + diff --git a/parser.src/macro/MacroFlex.cc b/parser.src/macro/MacroFlex.cc new file mode 100644 index 000000000..31edb3aeb --- /dev/null +++ b/parser.src/macro/MacroFlex.cc @@ -0,0 +1,1989 @@ +#line 2 "MacroFlex.cc" + +#line 4 "MacroFlex.cc" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 33 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* %if-c++-only */ + /* The c++ scanner is a mess. The FlexLexer.h header file relies on the + * following macro. This is required in order to pass the c++-multiple-scanners + * test in the regression suite. We get reports that it breaks inheritance. + * We will address this in a future release of flex, or omit the C++ scanner + * altogether. + */ + #define yyFlexLexer MacroFlexLexer +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +/* %if-c-only */ +/* %endif */ + +/* %if-tables-serialization */ +/* %endif */ +/* end standard C headers. */ + +/* %if-c-or-c++ */ +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +/* %endif */ + +/* %if-c++-only */ +/* begin standard C++ headers. */ +#include +#include +#include +#include +/* end standard C++ headers. */ +/* %endif */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* %not-for-header */ + +/* Returned upon end-of-file. */ +#define YY_NULL 0 +/* %ok-for-header */ + +/* %not-for-header */ + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) +/* %ok-for-header */ + +/* %if-reentrant */ +/* %endif */ + +/* %if-not-reentrant */ + +/* %endif */ + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +/* %if-not-reentrant */ +extern int yyleng; +/* %endif */ + +/* %if-c-only */ +/* %if-not-reentrant */ +/* %endif */ +/* %endif */ + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { +/* %if-c-only */ +/* %endif */ + +/* %if-c++-only */ + std::istream* yy_input_file; +/* %endif */ + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ + +/* %if-not-reentrant */ +/* %endif */ +/* %ok-for-header */ + +/* %endif */ + +/* 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)] + +/* %if-c-only Standard (non-C++) definition */ +/* %if-not-reentrant */ +/* %not-for-header */ + +/* %ok-for-header */ + +/* %endif */ +/* %endif */ + +void *Macroalloc (yy_size_t ); +void *Macrorealloc (void *,yy_size_t ); +void Macrofree (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) + +/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */ +/* Begin user sect3 */ + +#define yywrap() 1 +#define YY_SKIP_YYWRAP + +#define FLEX_DEBUG + +typedef unsigned char YY_CHAR; + +#define yytext_ptr yytext + +#include + +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ + +/* 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; \ +/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\ + yyleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ +/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\ + (yy_c_buf_p) = yy_cp; + +/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */ +#define YY_NUM_RULES 8 +#define YY_END_OF_BUFFER 9 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[35] = + { 0, + 0, 0, 3, 3, 0, 0, 9, 6, 5, 6, + 3, 8, 7, 7, 5, 0, 0, 3, 0, 4, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 2, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 4, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 5, 1, 1, 6, 7, 8, 1, + 1, 1, 9, 1, 1, 10, 1, 11, 1, 1, + 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 6, 7, + + 8, 1, 1, 1, 9, 1, 1, 10, 1, 11, + 1, 1, 1, 1, 1, 1, 12, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[13] = + { 0, + 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, + 1, 1 + } ; + +static yyconst flex_int16_t yy_base[41] = + { 0, + 41, 0, 3, 5, 7, 9, 43, 45, 39, 5, + 0, 45, 45, 38, 37, 28, 29, 0, 34, 45, + 30, 24, 24, 25, 20, 28, 23, 26, 45, 9, + 0, 14, 45, 45, 18, 20, 22, 0, 24, 26 + } ; + +static yyconst flex_int16_t yy_def[41] = + { 0, + 35, 35, 36, 36, 37, 37, 34, 34, 34, 34, + 38, 34, 34, 39, 34, 34, 34, 38, 39, 34, + 34, 34, 34, 34, 34, 40, 34, 40, 34, 34, + 34, 34, 34, 0, 34, 34, 34, 34, 34, 34 + } ; + +static yyconst flex_int16_t yy_nxt[58] = + { 0, + 18, 32, 9, 34, 10, 12, 13, 12, 13, 12, + 14, 12, 14, 16, 17, 32, 31, 33, 8, 8, + 11, 11, 13, 13, 19, 19, 28, 28, 29, 30, + 29, 27, 26, 25, 24, 23, 20, 22, 21, 15, + 20, 15, 34, 9, 7, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34 + } ; + +static yyconst flex_int16_t yy_chk[58] = + { 0, + 38, 31, 2, 0, 2, 3, 3, 4, 4, 5, + 5, 6, 6, 10, 10, 32, 30, 32, 35, 35, + 36, 36, 37, 37, 39, 39, 40, 40, 28, 27, + 26, 25, 24, 23, 22, 21, 19, 17, 16, 15, + 14, 9, 7, 1, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34 + } ; + +static yyconst flex_int16_t yy_rule_linenum[8] = + { 0, + 65, 67, 69, 87, 110, 111, 113 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "MacroFlex.ll" +/* + * Copyright (C) 2008 Dynare Team + * + * This file is part of Dynare. + * + * Dynare is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Dynare is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Dynare. If not, see . + */ +#line 21 "MacroFlex.ll" +using namespace std; + +#include + +#include "MacroDriver.hh" +#include "MacroBison.hh" + +// Announce to Flex the prototype we want for lexing function +#define YY_DECL \ + Macro::parser::token_type \ + MacroFlex::lex(Macro::parser::semantic_type *yylval, \ + Macro::parser::location_type *yylloc, \ + MacroDriver &driver) + +// Shortcut to access tokens defined by Bison +typedef Macro::parser::token token; + +/* By default yylex returns int, we use token_type. + Unfortunately yyterminate by default returns 0, which is + not of token_type. */ +#define yyterminate() return Macro::parser::token_type (0); + + +#line 54 "MacroFlex.ll" +// Increments location counter for every token read +#define YY_USER_ACTION yylloc->columns(yyleng); +#line 548 "MacroFlex.cc" + +#define INITIAL 0 +#define INCLUDE 1 +#define END_INCLUDE 2 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +#include +/* %endif */ +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* %if-c-only Reentrant structure and macros (non-C++). */ +/* %if-reentrant */ +/* %if-c-only */ +/* %endif */ +/* %if-reentrant */ +/* %endif */ +/* %if-bison-bridge */ +/* %endif */ +/* %endif End reentrant structures and macros. */ +/* %not-for-header */ + +/* %ok-for-header */ + +/* %endif */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT +/* %if-c-only Standard (non-C++) definition */ +/* %not-for-header */ + +/* %ok-for-header */ + +/* %endif */ +#endif + +/* %if-c-only */ +/* %endif */ + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ +/* %if-c++-only C++ definition */ +#define ECHO LexerOutput( yytext, yyleng ) +/* %endif */ +#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) \ +/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\ +\ +/* %if-c++-only C++ definition \ */\ + if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +/* %endif */ + +#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 +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +#define YY_FATAL_ERROR(msg) LexerError( msg ) +/* %endif */ +#endif + +/* %if-tables-serialization structures and prototypes */ +/* %not-for-header */ + +/* %ok-for-header */ + +/* %not-for-header */ + +/* %tables-yydmap generated elements */ +/* %endif */ +/* end tables serialization structures and prototypes */ + +/* %ok-for-header */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 +/* %if-c-only Standard (non-C++) definition */ +/* %endif */ +/* %if-c++-only C++ definition */ +#define YY_DECL int yyFlexLexer::yylex() +/* %endif */ +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +/* %% [6.0] YY_RULE_SETUP definition goes here */ +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +/* %not-for-header */ + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +/* %% [7.0] user's declarations go here */ +#line 57 "MacroFlex.ll" + + /* Code put at the beginning of yylex() */ + + // Reset location before reading token + yylloc->step(); + + + /* Ignore @line declarations, replace them by a blank line */ +#line 719 "MacroFlex.cc" + + 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 ) +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yyin = & std::cin; +/* %endif */ + + if ( ! yyout ) +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yyout = & std::cout; +/* %endif */ + + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer( yyin, YY_BUF_SIZE ); + } + + yy_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { +/* %% [8.0] yymore()-related code goes here */ + 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; + +/* %% [9.0] code to set up and find next match goes here */ + yy_current_state = (yy_start); + yy_current_state += YY_AT_BOL(); +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 35 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_current_state != 34 ); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + +yy_find_action: +/* %% [10.0] code to find the action number goes here */ + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +/* %% [11.0] code for yylineno update goes here */ + +do_action: /* This label is used only to access EOF actions. */ + +/* %% [12.0] debug code goes here */ + if ( yy_flex_debug ) + { + if ( yy_act == 0 ) + std::cerr << "--scanner backing up\n"; + else if ( yy_act < 8 ) + std::cerr << "--accepting rule at line " << yy_rule_linenum[yy_act] << + "(\"" << yytext << "\")\n"; + else if ( yy_act == 8 ) + std::cerr << "--accepting default rule (\"" << yytext << "\")\n"; + else if ( yy_act == 9 ) + std::cerr << "--(end of buffer or a NUL)\n"; + else + std::cerr << "--EOF (start condition " << YY_START << ")\n"; + } + + switch ( yy_act ) + { /* beginning of action switch */ +/* %% [13.0] actions go here */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + +case 1: +/* rule 1 can match eol */ +YY_RULE_SETUP +#line 65 "MacroFlex.ll" +{ yylloc->lines(1); yylloc->step(); *yyout << endl; } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 67 "MacroFlex.ll" +BEGIN(INCLUDE); + YY_BREAK +case 3: +YY_RULE_SETUP +#line 69 "MacroFlex.ll" +{ + driver.ifs = new ifstream(yytext); + if (driver.ifs->fail()) + driver.error(*yylloc, "Could not open " + string(yytext)); + // Save old location + yylloc->step(); + driver.loc_stack.push(*yylloc); + // Reset location + yylloc->begin.filename = yylloc->end.filename = new string(yytext); + yylloc->begin.line = yylloc->end.line = 1; + yylloc->begin.column = yylloc->end.column = 0; + // Display @line + *yyout << "@line \"" << *yylloc->begin.filename << "\" 1" << endl; + // Switch to new buffer + yypush_buffer_state(yy_create_buffer(driver.ifs, YY_BUF_SIZE)); + BEGIN(INITIAL); + } + YY_BREAK +case 4: +/* rule 4 can match eol */ +YY_RULE_SETUP +#line 87 "MacroFlex.ll" +{ + yylloc->lines(1); + yylloc->step(); + *yyout << "@line \"" << *yylloc->begin.filename << "\" " + << yylloc->begin.line << endl; + BEGIN(INITIAL); + } + YY_BREAK +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(INCLUDE): +case YY_STATE_EOF(END_INCLUDE): +#line 95 "MacroFlex.ll" +{ + // Try to restore old flex buffer + yypop_buffer_state(); + if (!YY_CURRENT_BUFFER) + { + // Quit lexer if end of main file + yyterminate(); + } + // Else restore old location + delete yylloc->begin.filename; + *yylloc = driver.loc_stack.top(); + driver.loc_stack.pop(); + BEGIN(END_INCLUDE); + } + YY_BREAK +case 5: +/* rule 5 can match eol */ +YY_RULE_SETUP +#line 110 "MacroFlex.ll" +{ yylloc->lines(yyleng); yylloc->step(); ECHO; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 111 "MacroFlex.ll" +{ yylloc->step(); ECHO; } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 113 "MacroFlex.ll" +{ driver.error(*yylloc, "Macro lexer error: '" + string(yytext) + "'"); } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 114 "MacroFlex.ll" +ECHO; + YY_BREAK +#line 913 "MacroFlex.cc" + + 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 + { +/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */ + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( yywrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of yylex */ +/* %ok-for-header */ + +/* %if-c++-only */ +/* %not-for-header */ + +yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ) +{ + yyin = arg_yyin; + yyout = arg_yyout; + yy_c_buf_p = 0; + yy_init = 0; + yy_start = 0; + yy_flex_debug = 0; + yylineno = 1; // this will only get updated if %option yylineno + + yy_did_buffer_switch_on_eof = 0; + + yy_looking_for_trail_begin = 0; + yy_more_flag = 0; + yy_more_len = 0; + yy_more_offset = yy_prev_more_offset = 0; + + yy_start_stack_ptr = yy_start_stack_depth = 0; + yy_start_stack = NULL; + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + + yy_state_buf = 0; + +} + +void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out ) +{ + if ( new_in ) + { + yy_delete_buffer( YY_CURRENT_BUFFER ); + yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) ); + } + + if ( new_out ) + yyout = new_out; +} + +#ifdef YY_INTERACTIVE +int yyFlexLexer::LexerInput( char* buf, int /* max_size */ ) +#else +int yyFlexLexer::LexerInput( char* buf, int max_size ) +#endif +{ + if ( yyin->eof() || yyin->fail() ) + return 0; + +#ifdef YY_INTERACTIVE + yyin->get( buf[0] ); + + if ( yyin->eof() ) + return 0; + + if ( yyin->bad() ) + return -1; + + return 1; + +#else + (void) yyin->read( buf, max_size ); + + if ( yyin->bad() ) + return -1; + else + return yyin->gcount(); +#endif +} + +void yyFlexLexer::LexerOutput( const char* buf, int size ) +{ + (void) yyout->write( buf, size ); +} +/* %ok-for-header */ + +/* %endif */ + +/* 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 + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +int yyFlexLexer::yy_get_next_buffer() +/* %endif */ +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + Macrorealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +/* %if-c-only */ +/* %not-for-header */ + +/* %endif */ +/* %if-c++-only */ + yy_state_type yyFlexLexer::yy_get_previous_state() +/* %endif */ +{ + register yy_state_type yy_current_state; + register char *yy_cp; + +/* %% [15.0] code to get the start state into yy_current_state goes here */ + 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 ) + { +/* %% [16.0] code to find the next state goes here */ + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 35 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state ) +/* %endif */ +{ + register int yy_is_jam; + /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */ + register char *yy_cp = (yy_c_buf_p); + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 35 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 34); + + return yy_is_jam ? 0 : yy_current_state; +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yyunput( int c, register char* yy_bp) +/* %endif */ +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up yytext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + +/* %% [18.0] update yylineno here */ + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + int yyFlexLexer::yyinput() +/* %endif */ +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart( yyin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( yywrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); + +/* %% [19.0] update BOL and yylineno */ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + + return c; +} +/* %if-c-only */ +/* %endif */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yyrestart( std::istream* input_file ) +/* %endif */ +{ + + 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. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +/* %endif */ +{ + + /* 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; +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_load_buffer_state() +/* %endif */ +{ + (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. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size ) +/* %endif */ +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) Macroalloc(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 *) Macroalloc(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() + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b ) +/* %endif */ +{ + + 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 ) + Macrofree((void *) b->yy_ch_buf ); + + Macrofree((void *) b ); +} + +/* %if-c-only */ +/* %endif */ + +/* %if-c++-only */ + +/* %endif */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file ) +/* %endif */ + +{ + 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; + } + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + b->yy_is_interactive = 0; +/* %endif */ + 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. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b ) +/* %endif */ +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/* %if-c-or-c++ */ +/** 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. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer) +/* %endif */ +{ + 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; +} +/* %endif */ + +/* %if-c-or-c++ */ +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yypop_buffer_state (void) +/* %endif */ +{ + 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; + } +} +/* %endif */ + +/* %if-c-or-c++ */ +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::yyensure_buffer_stack(void) +/* %endif */ +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)Macroalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)Macrorealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_push_state( int new_state ) +/* %endif */ +{ + if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) + { + yy_size_t new_size; + + (yy_start_stack_depth) += YY_START_STACK_INCR; + new_size = (yy_start_stack_depth) * sizeof( int ); + + if ( ! (yy_start_stack) ) + (yy_start_stack) = (int *) Macroalloc(new_size ); + + else + (yy_start_stack) = (int *) Macrorealloc((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); +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + void yyFlexLexer::yy_pop_state() +/* %endif */ +{ + if ( --(yy_start_stack_ptr) < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); +} + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ + int yyFlexLexer::yy_top_state() +/* %endif */ +{ + return (yy_start_stack)[(yy_start_stack_ptr) - 1]; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +void yyFlexLexer::LexerError( yyconst char msg[] ) +{ + std::cerr << msg << std::endl; + exit( YY_EXIT_FAILURE ); +} +/* %endif */ + +/* 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. */ + +/* %if-c-only */ +/* %if-reentrant */ +/* %endif */ +/* %if-reentrant */ +/* %endif */ +/* %endif */ + +/* %if-reentrant */ +/* %if-bison-bridge */ +/* %endif */ +/* %endif */ + +/* %if-c-only */ +/* %endif */ + +/* %if-c-or-c++ */ +/* %if-c-only */ +/* %endif */ +/* %if-c++-only */ +yyFlexLexer::~yyFlexLexer() +/* %endif */ +{ + + /* 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. */ + Macrofree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + +/* %if-c++-only */ + delete [] (yy_state_buf); + Macrofree((yy_start_stack) ); +/* %endif */ + +/* %if-c-only */ +/* %if-reentrant */ +/* %endif */ +/* %endif */ +} +/* %endif */ + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *Macroalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *Macrorealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void Macrofree (void * ptr ) +{ + free( (char *) ptr ); /* see Macrorealloc() for (char *) cast */ +} + +/* %if-tables-serialization definitions */ +/* %define-yytables The name for this specific scanner's tables. */ +#define YYTABLES_NAME "yytables" +/* %endif */ + +/* %ok-for-header */ + +#line 114 "MacroFlex.ll" + + + +MacroFlex::MacroFlex(istream* in, ostream* out) + : MacroFlexLexer(in, out) +{ +} + +/* This implementation of MacroFlexLexer::yylex() is required to fill the + * vtable of the class MacroFlexLexer. We define the scanner's main yylex + * function via YY_DECL to reside in the MacroFlex class instead. */ + +#ifdef yylex +# undef yylex +#endif + +int +MacroFlexLexer::yylex() +{ + cerr << "MacroFlexLexer::yylex() has been called, that should never happen!" << endl; + exit(-1); +} + +/* + Local variables: + mode: C++ + End: +*/ +