-#line 2 "agent_lexer.cc"
+#line 1 "agent_lexer.cc"
-#line 4 "agent_lexer.cc"
+#line 3 "agent_lexer.cc"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
/* %not-for-header */
-
/* %if-c-only */
/* %if-not-reentrant */
#define yy_create_buffer agent__create_buffer
#define yy_delete_buffer agent__delete_buffer
-#define yy_flex_debug agent__flex_debug
+#define yy_scan_buffer agent__scan_buffer
+#define yy_scan_string agent__scan_string
+#define yy_scan_bytes agent__scan_bytes
#define yy_init_buffer agent__init_buffer
#define yy_flush_buffer agent__flush_buffer
#define yy_load_buffer_state agent__load_buffer_state
#define yy_switch_to_buffer agent__switch_to_buffer
+#define yypush_buffer_state agent_push_buffer_state
+#define yypop_buffer_state agent_pop_buffer_state
+#define yyensure_buffer_stack agent_ensure_buffer_stack
+#define yy_flex_debug agent__flex_debug
#define yyin agent_in
#define yyleng agent_leng
#define yylex agent_lex
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
/* %endif */
/* %if-c-only */
-
+#ifdef yy_create_buffer
+#define agent__create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer agent__create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define agent__delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer agent__delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define agent__scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer agent__scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define agent__scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string agent__scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define agent__scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes agent__scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define agent__init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer agent__init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define agent__flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer agent__flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define agent__load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state agent__load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define agent__switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer agent__switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define agent_push_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state agent_push_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define agent_pop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state agent_pop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define agent_ensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack agent_ensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define agent_lex_ALREADY_DEFINED
+#else
+#define yylex agent_lex
+#endif
+
+#ifdef yyrestart
+#define agent_restart_ALREADY_DEFINED
+#else
+#define yyrestart agent_restart
+#endif
+
+#ifdef yylex_init
+#define agent_lex_init_ALREADY_DEFINED
+#else
+#define yylex_init agent_lex_init
+#endif
+
+#ifdef yylex_init_extra
+#define agent_lex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra agent_lex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define agent_lex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy agent_lex_destroy
+#endif
+
+#ifdef yyget_debug
+#define agent_get_debug_ALREADY_DEFINED
+#else
+#define yyget_debug agent_get_debug
+#endif
+
+#ifdef yyset_debug
+#define agent_set_debug_ALREADY_DEFINED
+#else
+#define yyset_debug agent_set_debug
+#endif
+
+#ifdef yyget_extra
+#define agent_get_extra_ALREADY_DEFINED
+#else
+#define yyget_extra agent_get_extra
+#endif
+
+#ifdef yyset_extra
+#define agent_set_extra_ALREADY_DEFINED
+#else
+#define yyset_extra agent_set_extra
+#endif
+
+#ifdef yyget_in
+#define agent_get_in_ALREADY_DEFINED
+#else
+#define yyget_in agent_get_in
+#endif
+
+#ifdef yyset_in
+#define agent_set_in_ALREADY_DEFINED
+#else
+#define yyset_in agent_set_in
+#endif
+
+#ifdef yyget_out
+#define agent_get_out_ALREADY_DEFINED
+#else
+#define yyget_out agent_get_out
+#endif
+
+#ifdef yyset_out
+#define agent_set_out_ALREADY_DEFINED
+#else
+#define yyset_out agent_set_out
+#endif
+
+#ifdef yyget_leng
+#define agent_get_leng_ALREADY_DEFINED
+#else
+#define yyget_leng agent_get_leng
+#endif
+
+#ifdef yyget_text
+#define agent_get_text_ALREADY_DEFINED
+#else
+#define yyget_text agent_get_text
+#endif
+
+#ifdef yyget_lineno
+#define agent_get_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno agent_get_lineno
+#endif
+
+#ifdef yyset_lineno
+#define agent_set_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno agent_set_lineno
+#endif
+
+#ifdef yywrap
+#define agent_wrap_ALREADY_DEFINED
+#else
+#define yywrap agent_wrap
+#endif
+
/* %endif */
+#ifdef yyalloc
+#define agent_alloc_ALREADY_DEFINED
+#else
+#define yyalloc agent_alloc
+#endif
+
+#ifdef yyrealloc
+#define agent_realloc_ALREADY_DEFINED
+#else
+#define yyrealloc agent_realloc
+#endif
+
+#ifdef yyfree
+#define agent_free_ALREADY_DEFINED
+#else
+#define yyfree agent_free
+#endif
+
/* %if-c-only */
+#ifdef yytext
+#define agent_text_ALREADY_DEFINED
+#else
+#define yytext agent_text
+#endif
+
+#ifdef yyleng
+#define agent_leng_ALREADY_DEFINED
+#else
+#define yyleng agent_leng
+#endif
+
+#ifdef yyin
+#define agent_in_ALREADY_DEFINED
+#else
+#define yyin agent_in
+#endif
+
+#ifdef yyout
+#define agent_out_ALREADY_DEFINED
+#else
+#define yyout agent_out
+#endif
+
+#ifdef yy_flex_debug
+#define agent__flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug agent__flex_debug
+#endif
+
+#ifdef yylineno
+#define agent_lineno_ALREADY_DEFINED
+#else
+#define yylineno agent_lineno
+#endif
+
/* %endif */
/* First, we deal with platform-specific or compiler-specific issues. */
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
-typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_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 UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
/* %endif */
+/* begin standard C++ headers. */
/* %if-c++-only */
/* %endif */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#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.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* %ok-for-header */
/* %if-reentrant */
* 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 agent_restart(agent_in )
-
+#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
#endif
/* %if-not-reentrant */
-extern yy_size_t agent_leng;
+extern int yyleng;
/* %endif */
/* %if-c-only */
/* %if-not-reentrant */
-extern FILE *agent_in, *agent_out;
+extern FILE *yyin, *yyout;
/* %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)
+ #define YY_LINENO_REWIND_TO(ptr)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up agent_text. */ \
+ /* 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 agent_text again */ \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ 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
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.
*/
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via agent_restart()), so that the user can continue scanning by
- * just pointing agent_in at a new input file.
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
-
/* %if-not-reentrant */
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* %endif */
/* %ok-for-header */
#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.
*/
/* %if-not-reentrant */
/* %not-for-header */
-
-/* yy_hold_char holds the character lost when agent_text is formed. */
+/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t agent_leng;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
+static char *yy_c_buf_p = NULL;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
-/* Flag which is used to allow agent_wrap()'s to do buffer switches
- * instead of setting up a fresh agent_in. A bit of a hack ...
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
/* %ok-for-header */
/* %endif */
-void agent_restart (FILE *input_file );
-void agent__switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE agent__create_buffer (FILE *file,int size );
-void agent__delete_buffer (YY_BUFFER_STATE b );
-void agent__flush_buffer (YY_BUFFER_STATE b );
-void agent_push_buffer_state (YY_BUFFER_STATE new_buffer );
-void agent_pop_buffer_state (void );
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
-static void agent_ensure_buffer_stack (void );
-static void agent__load_buffer_state (void );
-static void agent__init_buffer (YY_BUFFER_STATE b,FILE *file );
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
-#define YY_FLUSH_BUFFER agent__flush_buffer(YY_CURRENT_BUFFER )
-
-YY_BUFFER_STATE agent__scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE agent__scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE agent__scan_bytes (yyconst char *bytes,yy_size_t len );
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
/* %endif */
-void *agent_alloc (yy_size_t );
-void *agent_realloc (void *,yy_size_t );
-void agent_free (void * );
-
-#define yy_new_buffer agent__create_buffer
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- agent_ensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- agent__create_buffer(agent_in,YY_BUF_SIZE ); \
+ 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 ){\
- agent_ensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- agent__create_buffer(agent_in,YY_BUF_SIZE ); \
+ 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] agent_text/agent_in/agent_out/yy_state_type/agent_lineno etc. def's & init go here */
+/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
/* Begin user sect3 */
-#define agent_wrap(n) 1
+#define agent_wrap() (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
#define FLEX_DEBUG
+typedef flex_uint8_t YY_CHAR;
-typedef unsigned char YY_CHAR;
-
-FILE *agent_in = (FILE *) 0, *agent_out = (FILE *) 0;
+FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
-extern int agent_lineno;
+extern int yylineno;
+int yylineno = 1;
-int agent_lineno = 1;
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
-extern char *agent_text;
-#define yytext_ptr agent_text
+/* %% [1.5] DFA */
/* %if-c-only Standard (non-C++) definition */
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
/* %endif */
/* Done after the current pattern has been matched and before the
- * corresponding action - sets up agent_text.
+ * corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
-/* %% [2.0] code to fiddle agent_text and agent_leng for yymore() goes here \ */\
- agent_leng = (yy_size_t) (yy_cp - yy_bp); \
+/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
+ yyleng = (int) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
-/* %% [3.0] code to copy yytext_ptr to agent_text[] goes here, if %array \ */\
+/* %% [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 59
#define YY_END_OF_BUFFER 60
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[326] =
+static const flex_int16_t yy_accept[326] =
{ 0,
52, 52, 0, 0, 0, 0, 0, 0, 0, 0,
60, 58, 10, 11, 58, 1, 52, 49, 52, 52,
0, 30, 17, 24, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
5, 5, 5, 5, 5
} ;
-static yyconst flex_int32_t yy_meta[63] =
+static const YY_CHAR yy_meta[63] =
{ 0,
1, 1, 2, 3, 3, 4, 3, 3, 3, 3,
3, 3, 3, 5, 5, 5, 5, 3, 3, 3,
3, 3
} ;
-static yyconst flex_int16_t yy_base[338] =
+static const flex_int16_t yy_base[338] =
{ 0,
0, 0, 61, 64, 67, 0, 65, 69, 49, 66,
277, 2165, 86, 269, 129, 0, 124, 2165, 172, 129,
2151, 2156, 2159, 132, 128, 121, 111
} ;
-static yyconst flex_int16_t yy_def[338] =
+static const flex_int16_t yy_def[338] =
{ 0,
325, 1, 326, 326, 1, 5, 5, 5, 5, 5,
325, 325, 325, 325, 327, 328, 325, 325, 325, 325,
325, 325, 325, 325, 325, 325, 325
} ;
-static yyconst flex_int16_t yy_nxt[2228] =
+static const flex_int16_t yy_nxt[2228] =
{ 0,
12, 13, 14, 13, 12, 15, 16, 12, 17, 18,
19, 20, 21, 22, 22, 22, 22, 23, 24, 12,
325, 325, 325, 325, 325, 325, 325
} ;
-static yyconst flex_int16_t yy_chk[2228] =
+static const flex_int16_t yy_chk[2228] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int agent__flex_debug;
-int agent__flex_debug = 1;
+extern int yy_flex_debug;
+int yy_flex_debug = 1;
-static yyconst flex_int16_t yy_rule_linenum[59] =
+static const flex_int16_t yy_rule_linenum[59] =
{ 0,
- 132, 134, 136, 141, 142, 147, 148, 149, 161, 164,
- 169, 176, 185, 194, 203, 214, 225, 234, 243, 252,
- 261, 270, 279, 288, 297, 306, 315, 324, 334, 343,
- 352, 361, 370, 379, 388, 397, 406, 415, 424, 433,
- 442, 541, 546, 551, 556, 557, 558, 559, 560, 561,
- 563, 581, 594, 599, 603, 605, 607, 609
+ 133, 135, 137, 142, 143, 148, 149, 150, 162, 165,
+ 170, 177, 186, 195, 204, 215, 226, 235, 244, 253,
+ 262, 271, 280, 289, 298, 307, 316, 325, 335, 344,
+ 353, 362, 371, 380, 389, 398, 407, 416, 425, 434,
+ 443, 542, 547, 552, 557, 558, 559, 560, 561, 562,
+ 564, 582, 595, 600, 604, 606, 608, 610
} ;
/* The intent behind this definition is that it'll catch
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *agent_text;
+char *yytext;
#line 1 "agent_lexer.ll"
/* Copyright (C) 2017-2019 Internet Systems Consortium, Inc. ("ISC")
2.5.31 through 2.5.33): it generates code that does
not conform to C89. See Debian bug 333231
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>. */
-# undef agent_wrap
-# define agent_wrap() 1
+# undef yywrap
+# define yywrap() 1
namespace {
/* To avoid the call to exit... oops! */
#define YY_FATAL_ERROR(msg) isc::agent::ParserContext::fatal(msg)
+#line 1434 "agent_lexer.cc"
/* noyywrap disables automatic rewinding for the next file to parse. Since we
always parse only a single string, there's no need to do any wraps. And
- using agent_wrap requires linking with -lfl, which provides the default agent_wrap
+ using yywrap requires linking with -lfl, which provides the default yywrap
implementation that always returns 1 anyway. */
/* nounput simplifies the lexer, by removing support for putting a character
back into the input stream. We never use such capability anyway. */
/* avoid to get static global variables to remain with C++. */
/* in last resort %option reentrant */
/* Enables debug mode. To see the debug messages, one needs to also set
- agent__flex_debug to 1, then the debug messages will be printed on stderr. */
+ yy_flex_debug to 1, then the debug messages will be printed on stderr. */
/* I have no idea what this option does, except it was specified in the bison
examples and Postgres folks added it to remove gcc 4.3 warnings. Let's
be on the safe side and keep it. */
#define YY_NO_INPUT 1
-
/* These are not token expressions yet, just convenience expressions that
can be used during actual token definitions. Note some can match
incorrect inputs (e.g., IP addresses) which must be checked. */
/* for errors */
#line 96 "agent_lexer.ll"
/* This code run each time a pattern is matched. It updates the location
- by moving it ahead by agent_leng bytes. agent_leng specifies the length of the
+ by moving it ahead by yyleng bytes. yyleng specifies the length of the
currently matched token. */
-#define YY_USER_ACTION driver.loc_.columns(agent_leng);
-#line 1235 "agent_lexer.cc"
+#define YY_USER_ACTION driver.loc_.columns(yyleng);
+#line 1460 "agent_lexer.cc"
+#line 1461 "agent_lexer.cc"
#define INITIAL 0
#define COMMENT 1
/* %if-reentrant */
/* %if-c-only */
-static int yy_init_globals (void );
+static int yy_init_globals ( void );
/* %endif */
/* %if-reentrant */
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int agent_lex_destroy (void );
+int yylex_destroy ( void );
-int agent_get_debug (void );
+int yyget_debug ( void );
-void agent_set_debug (int debug_flag );
+void yyset_debug ( int debug_flag );
-YY_EXTRA_TYPE agent_get_extra (void );
+YY_EXTRA_TYPE yyget_extra ( void );
-void agent_set_extra (YY_EXTRA_TYPE user_defined );
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
-FILE *agent_get_in (void );
+FILE *yyget_in ( void );
-void agent_set_in (FILE * in_str );
+void yyset_in ( FILE * _in_str );
-FILE *agent_get_out (void );
+FILE *yyget_out ( void );
-void agent_set_out (FILE * out_str );
+void yyset_out ( FILE * _out_str );
-yy_size_t agent_get_leng (void );
+ int yyget_leng ( void );
-char *agent_get_text (void );
+char *yyget_text ( void );
-int agent_get_lineno (void );
+int yyget_lineno ( void );
-void agent_set_lineno (int line_number );
+void yyset_lineno ( int _line_number );
/* %if-bison-bridge */
/* %endif */
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int agent_wrap (void );
+extern "C" int yywrap ( void );
#else
-extern int agent_wrap (void );
+extern int yywrap ( void );
#endif
#endif
/* %not-for-header */
-
+#ifndef YY_NO_UNPUT
+
+#endif
/* %ok-for-header */
/* %endif */
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy ( char *, const char *, int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen ( const char * );
#endif
#ifndef YY_NO_INPUT
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
-
#ifdef __cplusplus
-static int yyinput (void );
+static int yyinput ( void );
#else
-static int input (void );
+static int input ( void );
#endif
/* %ok-for-header */
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( agent_text, agent_leng, 1, agent_out )
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- yy_size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
- (c = getc( agent_in )) != EOF && c != '\n'; ++n ) \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( agent_in ) ) \
+ if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, agent_in))==0 && ferror(agent_in)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
break; \
} \
errno=0; \
- clearerr(agent_in); \
+ clearerr(yyin); \
} \
}\
\
/* %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 */
#define YY_DECL_IS_OURS 1
/* %if-c-only Standard (non-C++) definition */
-extern int agent_lex (void);
+extern int yylex (void);
-#define YY_DECL int agent_lex (void)
+#define YY_DECL int yylex (void)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after agent_text and agent_leng
+/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
/* %% [6.0] YY_RULE_SETUP definition goes here */
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;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+ if ( !(yy_init) )
+ {
+ (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
+
+ if ( ! yyin )
+/* %if-c-only */
+ yyin = stdin;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+ if ( ! yyout )
+/* %if-c-only */
+ yyout = stdout;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_load_buffer_state( );
+ }
+
+ {
/* %% [7.0] user's declarations go here */
#line 102 "agent_lexer.ll"
+#line 106 "agent_lexer.ll"
/* This part of the code is copied over to the verbatim to the top
- of the generated agent_lex function. Explanation:
+ of the generated yylex function. Explanation:
http://www.gnu.org/software/bison/manual/html_node/Multiple-start_002dsymbols.html */
- /* Code run each time agent_lex is called. */
+ /* Code run each time yylex is called. */
driver.loc_.step();
/* We currently have 3 points of entries defined:
}
-#line 1510 "agent_lexer.cc"
+#line 1775 "agent_lexer.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 ( ! agent_in )
-/* %if-c-only */
- agent_in = stdin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-
- if ( ! agent_out )
-/* %if-c-only */
- agent_out = stdout;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-
- if ( ! YY_CURRENT_BUFFER ) {
- agent_ensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- agent__create_buffer(agent_in,YY_BUF_SIZE );
- }
-
- agent__load_buffer_state( );
- }
-
- while ( 1 ) /* loops until end-of-file is reached */
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
/* %% [8.0] yymore()-related code goes here */
yy_cp = (yy_c_buf_p);
- /* Support of agent_text. */
+ /* Support of yytext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ 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_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 326 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 325 );
YY_DO_BEFORE_ACTION;
-/* %% [11.0] code for agent_lineno update goes here */
+/* %% [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 ( agent__flex_debug )
+ if ( yy_flex_debug )
{
if ( yy_act == 0 )
fprintf( stderr, "--scanner backing up\n" );
else if ( yy_act < 59 )
fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
- (long)yy_rule_linenum[yy_act], agent_text );
+ (long)yy_rule_linenum[yy_act], yytext );
else if ( yy_act == 59 )
fprintf( stderr, "--accepting default rule (\"%s\")\n",
- agent_text );
+ yytext );
else if ( yy_act == 60 )
fprintf( stderr, "--(end of buffer or a NUL)\n" );
else
case 1:
YY_RULE_SETUP
-#line 132 "agent_lexer.ll"
+#line 133 "agent_lexer.ll"
;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 134 "agent_lexer.ll"
+#line 135 "agent_lexer.ll"
;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 136 "agent_lexer.ll"
+#line 137 "agent_lexer.ll"
{
BEGIN(COMMENT);
comment_start_line = driver.loc_.end.line;;
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 141 "agent_lexer.ll"
+#line 142 "agent_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 142 "agent_lexer.ll"
+#line 143 "agent_lexer.ll"
;
YY_BREAK
case YY_STATE_EOF(COMMENT):
-#line 143 "agent_lexer.ll"
+#line 144 "agent_lexer.ll"
{
isc_throw(ParseError, "Comment not closed. (/* in line " << comment_start_line);
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 147 "agent_lexer.ll"
+#line 148 "agent_lexer.ll"
BEGIN(DIR_ENTER);
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 148 "agent_lexer.ll"
+#line 149 "agent_lexer.ll"
BEGIN(DIR_INCLUDE);
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 149 "agent_lexer.ll"
+#line 150 "agent_lexer.ll"
{
/* Include directive. */
/* Extract the filename. */
- std::string tmp(agent_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
driver.includeFile(tmp);
case YY_STATE_EOF(DIR_ENTER):
case YY_STATE_EOF(DIR_INCLUDE):
case YY_STATE_EOF(DIR_EXIT):
-#line 158 "agent_lexer.ll"
+#line 159 "agent_lexer.ll"
{
isc_throw(ParseError, "Directive not closed.");
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 161 "agent_lexer.ll"
+#line 162 "agent_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 164 "agent_lexer.ll"
+#line 165 "agent_lexer.ll"
{
/* Ok, we found a with space. Let's ignore it and update loc variable. */
driver.loc_.step();
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
-#line 169 "agent_lexer.ll"
+#line 170 "agent_lexer.ll"
{
/* Newline found. Let's update the location and continue. */
- driver.loc_.lines(agent_leng);
+ driver.loc_.lines(yyleng);
driver.loc_.step();
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 176 "agent_lexer.ll"
+#line 177 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 185 "agent_lexer.ll"
+#line 186 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::AGENT:
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 194 "agent_lexer.ll"
+#line 195 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::AGENT:
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 203 "agent_lexer.ll"
+#line 204 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::AGENT:
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 214 "agent_lexer.ll"
+#line 215 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::AGENT:
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 225 "agent_lexer.ll"
+#line 226 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::AGENT:
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 234 "agent_lexer.ll"
+#line 235 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONTROL_SOCKETS:
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 243 "agent_lexer.ll"
+#line 244 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONTROL_SOCKETS:
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 252 "agent_lexer.ll"
+#line 253 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONTROL_SOCKETS:
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 261 "agent_lexer.ll"
+#line 262 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SERVER:
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 270 "agent_lexer.ll"
+#line 271 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SERVER:
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 279 "agent_lexer.ll"
+#line 280 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SOCKET_TYPE:
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 288 "agent_lexer.ll"
+#line 289 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::AGENT:
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 297 "agent_lexer.ll"
+#line 298 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::HOOKS_LIBRARIES:
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 306 "agent_lexer.ll"
+#line 307 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::HOOKS_LIBRARIES:
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 315 "agent_lexer.ll"
+#line 316 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 324 "agent_lexer.ll"
+#line 325 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::AGENT:
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 334 "agent_lexer.ll"
+#line 335 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 343 "agent_lexer.ll"
+#line 344 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 352 "agent_lexer.ll"
+#line 353 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 361 "agent_lexer.ll"
+#line 362 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 370 "agent_lexer.ll"
+#line 371 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 379 "agent_lexer.ll"
+#line 380 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 388 "agent_lexer.ll"
+#line 389 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 397 "agent_lexer.ll"
+#line 398 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 406 "agent_lexer.ll"
+#line 407 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 415 "agent_lexer.ll"
+#line 416 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 424 "agent_lexer.ll"
+#line 425 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 433 "agent_lexer.ll"
+#line 434 "agent_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 442 "agent_lexer.ll"
+#line 443 "agent_lexer.ll"
{
/* A string has been matched. It contains the actual string and single quotes.
We need to get those quotes out of the way and just use its content, e.g.
for 'foo' we should get foo */
- std::string raw(agent_text+1);
+ std::string raw(yytext+1);
size_t len = raw.size() - 1;
raw.resize(len);
std::string decoded;
case 42:
/* rule 42 can match eol */
YY_RULE_SETUP
-#line 541 "agent_lexer.ll"
+#line 542 "agent_lexer.ll"
{
/* Bad string with a forbidden control character inside */
- driver.error(driver.loc_, "Invalid control in " + std::string(agent_text));
+ driver.error(driver.loc_, "Invalid control in " + std::string(yytext));
}
YY_BREAK
case 43:
/* rule 43 can match eol */
YY_RULE_SETUP
-#line 546 "agent_lexer.ll"
+#line 547 "agent_lexer.ll"
{
/* Bad string with a bad escape inside */
- driver.error(driver.loc_, "Bad escape in " + std::string(agent_text));
+ driver.error(driver.loc_, "Bad escape in " + std::string(yytext));
}
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 551 "agent_lexer.ll"
+#line 552 "agent_lexer.ll"
{
/* Bad string with an open escape at the end */
- driver.error(driver.loc_, "Overflow escape in " + std::string(agent_text));
+ driver.error(driver.loc_, "Overflow escape in " + std::string(yytext));
}
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 556 "agent_lexer.ll"
+#line 557 "agent_lexer.ll"
{ return AgentParser::make_LSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 557 "agent_lexer.ll"
+#line 558 "agent_lexer.ll"
{ return AgentParser::make_RSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 558 "agent_lexer.ll"
+#line 559 "agent_lexer.ll"
{ return AgentParser::make_LCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 559 "agent_lexer.ll"
+#line 560 "agent_lexer.ll"
{ return AgentParser::make_RCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 560 "agent_lexer.ll"
+#line 561 "agent_lexer.ll"
{ return AgentParser::make_COMMA(driver.loc_); }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 561 "agent_lexer.ll"
+#line 562 "agent_lexer.ll"
{ return AgentParser::make_COLON(driver.loc_); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 563 "agent_lexer.ll"
+#line 564 "agent_lexer.ll"
{
/* An integer was found. */
- std::string tmp(agent_text);
+ std::string tmp(yytext);
int64_t integer = 0;
try {
/* In substring we want to use negative values (e.g. -1).
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 581 "agent_lexer.ll"
+#line 582 "agent_lexer.ll"
{
/* A floating point was found. */
- std::string tmp(agent_text);
+ std::string tmp(yytext);
double fp = 0.0;
try {
fp = boost::lexical_cast<double>(tmp);
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 594 "agent_lexer.ll"
+#line 595 "agent_lexer.ll"
{
- string tmp(agent_text);
+ string tmp(yytext);
return AgentParser::make_BOOLEAN(tmp == "true", driver.loc_);
}
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 599 "agent_lexer.ll"
+#line 600 "agent_lexer.ll"
{
return AgentParser::make_NULL_TYPE(driver.loc_);
}
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 603 "agent_lexer.ll"
+#line 604 "agent_lexer.ll"
driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 605 "agent_lexer.ll"
+#line 606 "agent_lexer.ll"
driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 607 "agent_lexer.ll"
+#line 608 "agent_lexer.ll"
driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 609 "agent_lexer.ll"
-driver.error (driver.loc_, "Invalid character: " + std::string(agent_text));
+#line 610 "agent_lexer.ll"
+driver.error (driver.loc_, "Invalid character: " + std::string(yytext));
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 611 "agent_lexer.ll"
+#line 612 "agent_lexer.ll"
{
if (driver.states_.empty()) {
return AgentParser::make_END(driver.loc_);
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 634 "agent_lexer.ll"
+#line 635 "agent_lexer.ll"
ECHO;
YY_BREAK
-#line 2321 "agent_lexer.cc"
+#line 2552 "agent_lexer.cc"
case YY_END_OF_BUFFER:
{
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
- * just pointed agent_in at a new source and called
- * agent_lex(). If so, then we have to assure
+ * 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 = agent_in;
+/* %if-c-only */
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( agent_wrap( ) )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * agent_text, we can now 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
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of agent_lex */
+ } /* end of user's declarations */
+} /* end of yylex */
/* %ok-for-header */
/* %if-c++-only */
/* %not-for-header */
-
/* %ok-for-header */
/* %endif */
/* %if-c++-only */
/* %endif */
{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
else
{
- yy_size_t num_to_read =
+ 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;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- yy_size_t new_size = b->yy_buf_size * 2;
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- agent_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
+ b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- agent_restart(agent_in );
+ yyrestart( yyin );
}
else
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) agent_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(yy_n_chars) += number_to_move;
/* %if-c-only */
/* %not-for-header */
-
static yy_state_type yy_get_previous_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
/* %% [15.0] code to get the start state into yy_current_state goes here */
yy_current_state = (yy_start);
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);
+ 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_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 326 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return yy_current_state;
/* %if-c++-only */
/* %endif */
{
- register int yy_is_jam;
+ 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);
+ char *yy_cp = (yy_c_buf_p);
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 326 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 325);
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
+#ifndef YY_NO_UNPUT
/* %if-c-only */
/* %endif */
+#endif
/* %if-c-only */
#ifndef YY_NO_INPUT
else
{ /* need more input */
- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
*/
/* Reset buffer status. */
- agent_restart(agent_in );
+ yyrestart( yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( agent_wrap( ) )
+ if ( yywrap( ) )
return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve agent_text */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
(yy_hold_char) = *++(yy_c_buf_p);
-/* %% [19.0] update BOL and agent_lineno */
+/* %% [19.0] update BOL and yylineno */
return c;
}
* @note This function does not reset the start condition to @c INITIAL .
*/
/* %if-c-only */
- void agent_restart (FILE * input_file )
+ void yyrestart (FILE * input_file )
/* %endif */
/* %if-c++-only */
/* %endif */
{
if ( ! YY_CURRENT_BUFFER ){
- agent_ensure_buffer_stack ();
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- agent__create_buffer(agent_in,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- agent__init_buffer(YY_CURRENT_BUFFER,input_file );
- agent__load_buffer_state( );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
}
+/* %if-c++-only */
+/* %endif */
+
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
/* %if-c-only */
- void agent__switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
/* %endif */
/* %if-c++-only */
/* %endif */
/* TODO. We should be able to replace this entire function body
* with
- * agent_pop_buffer_state();
- * agent_push_buffer_state(new_buffer);
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
*/
- agent_ensure_buffer_stack ();
+ yyensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- agent__load_buffer_state( );
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
- * EOF (agent_wrap()) processing, but the only time this flag
- * is looked at is after agent_wrap() is called, so it's safe
+ * 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 */
-static void agent__load_buffer_state (void)
+static void yy_load_buffer_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- agent_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+/* %if-c-only */
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
(yy_hold_char) = *(yy_c_buf_p);
}
* @return the allocated buffer state.
*/
/* %if-c-only */
- YY_BUFFER_STATE agent__create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
/* %endif */
/* %if-c++-only */
/* %endif */
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) agent_alloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in agent__create_buffer()" );
+ 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 *) agent_alloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in agent__create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- agent__init_buffer(b,file );
+ yy_init_buffer( b, file );
return b;
}
+/* %if-c++-only */
+/* %endif */
+
/** Destroy the buffer.
- * @param b a buffer created with agent__create_buffer()
+ * @param b a buffer created with yy_create_buffer()
*
*/
/* %if-c-only */
- void agent__delete_buffer (YY_BUFFER_STATE b )
+ void yy_delete_buffer (YY_BUFFER_STATE b )
/* %endif */
/* %if-c++-only */
/* %endif */
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- agent_free((void *) b->yy_ch_buf );
+ yyfree( (void *) b->yy_ch_buf );
- agent_free((void *) b );
+ yyfree( (void *) b );
}
-/* %if-c-only */
-
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-
-/* %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 agent_restart() or at EOF.
+ * such as during a yyrestart() or at EOF.
*/
/* %if-c-only */
- static void agent__init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
/* %endif */
/* %if-c++-only */
/* %endif */
{
int oerrno = errno;
- agent__flush_buffer(b );
+ yy_flush_buffer( b );
+/* %if-c-only */
b->yy_input_file = file;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then agent__init_buffer was _probably_
- * called from agent_restart() or through yy_get_next_buffer.
+ /* 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){
*
*/
/* %if-c-only */
- void agent__flush_buffer (YY_BUFFER_STATE b )
+ void yy_flush_buffer (YY_BUFFER_STATE b )
/* %endif */
/* %if-c++-only */
/* %endif */
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- agent__load_buffer_state( );
+ yy_load_buffer_state( );
}
/* %if-c-or-c++ */
*
*/
/* %if-c-only */
-void agent_push_buffer_state (YY_BUFFER_STATE new_buffer )
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
/* %endif */
/* %if-c++-only */
/* %endif */
if (new_buffer == NULL)
return;
- agent_ensure_buffer_stack();
+ yyensure_buffer_stack();
- /* This block is copied from agent__switch_to_buffer. */
+ /* This block is copied from yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from agent__switch_to_buffer. */
- agent__load_buffer_state( );
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
/* %endif */
*
*/
/* %if-c-only */
-void agent_pop_buffer_state (void)
+void yypop_buffer_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
if (!YY_CURRENT_BUFFER)
return;
- agent__delete_buffer(YY_CURRENT_BUFFER );
+ 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) {
- agent__load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
* Guarantees space for at least one push.
*/
/* %if-c-only */
-static void agent_ensure_buffer_stack (void)
+static void yyensure_buffer_stack (void)
/* %endif */
/* %if-c++-only */
/* %endif */
* 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**)agent_alloc
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in agent_ensure_buffer_stack()" );
-
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)agent_realloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in agent_ensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE agent__scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return 0;
+ return NULL;
- b = (YY_BUFFER_STATE) agent_alloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in agent__scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
+ b->yy_input_file = NULL;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- agent__switch_to_buffer(b );
+ yy_switch_to_buffer( b );
return b;
}
/* %endif */
/* %if-c-only */
-/** Setup the input buffer state to scan a string. The next call to agent_lex() will
+/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * agent__scan_bytes() instead.
+ * yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE agent__scan_string (yyconst char * yystr )
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
{
- return agent__scan_bytes(yystr,strlen(yystr) );
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
}
/* %endif */
/* %if-c-only */
-/** Setup the input buffer state to scan the given bytes. The next call to agent_lex() will
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE agent__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n, i;
+ yy_size_t n;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- buf = (char *) agent_alloc(n );
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in agent__scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = agent__scan_buffer(buf,n );
+ b = yy_scan_buffer( buf, n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in agent__scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
#endif
/* %if-c-only */
-static void yy_fatal_error (yyconst char* msg )
+static void yynoreturn yy_fatal_error (const char* msg )
{
- (void) fprintf( stderr, "%s\n", msg );
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* %endif */
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up agent_text. */ \
+ /* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- agent_text[agent_leng] = (yy_hold_char); \
- (yy_c_buf_p) = agent_text + 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'; \
- agent_leng = yyless_macro_arg; \
+ yyleng = yyless_macro_arg; \
} \
while ( 0 )
/** Get the current line number.
*
*/
-int agent_get_lineno (void)
+int yyget_lineno (void)
{
-
- return agent_lineno;
+
+ return yylineno;
}
/** Get the input stream.
*
*/
-FILE *agent_get_in (void)
+FILE *yyget_in (void)
{
- return agent_in;
+ return yyin;
}
/** Get the output stream.
*
*/
-FILE *agent_get_out (void)
+FILE *yyget_out (void)
{
- return agent_out;
+ return yyout;
}
/** Get the length of the current token.
*
*/
-yy_size_t agent_get_leng (void)
+int yyget_leng (void)
{
- return agent_leng;
+ return yyleng;
}
/** Get the current token.
*
*/
-char *agent_get_text (void)
+char *yyget_text (void)
{
- return agent_text;
+ return yytext;
}
/* %if-reentrant */
/* %endif */
/** Set the current line number.
- * @param line_number
+ * @param _line_number line number
*
*/
-void agent_set_lineno (int line_number )
+void yyset_lineno (int _line_number )
{
- agent_lineno = line_number;
+ yylineno = _line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
*
- * @see agent__switch_to_buffer
+ * @see yy_switch_to_buffer
*/
-void agent_set_in (FILE * in_str )
+void yyset_in (FILE * _in_str )
{
- agent_in = in_str ;
+ yyin = _in_str ;
}
-void agent_set_out (FILE * out_str )
+void yyset_out (FILE * _out_str )
{
- agent_out = out_str ;
+ yyout = _out_str ;
}
-int agent_get_debug (void)
+int yyget_debug (void)
{
- return agent__flex_debug;
+ return yy_flex_debug;
}
-void agent_set_debug (int bdebug )
+void yyset_debug (int _bdebug )
{
- agent__flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
/* %endif */
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from agent_lex_destroy(), so don't allocate here.
+ * This function is called from yylex_destroy(), so don't allocate here.
*/
- (yy_buffer_stack) = 0;
+ (yy_buffer_stack) = NULL;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = (char *) 0;
+ (yy_c_buf_p) = NULL;
(yy_init) = 0;
(yy_start) = 0;
/* Defined in main.c */
#ifdef YY_STDINIT
- agent_in = stdin;
- agent_out = stdout;
+ yyin = stdin;
+ yyout = stdout;
#else
- agent_in = (FILE *) 0;
- agent_out = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
- * agent_lex_init()
+ * yylex_init()
*/
return 0;
}
/* %endif */
/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
-/* agent_lex_destroy is for both reentrant and non-reentrant scanners. */
-int agent_lex_destroy (void)
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- agent__delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer( YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- agent_pop_buffer_state();
+ yypop_buffer_state();
}
/* Destroy the stack itself. */
- agent_free((yy_buffer_stack) );
+ yyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * agent_lex() is called, initialization will occur. */
+ * yylex() is called, initialization will occur. */
yy_init_globals( );
/* %if-reentrant */
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
- register int i;
+
+ 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 )
+static int yy_flex_strlen (const char * s )
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
}
#endif
-void *agent_alloc (yy_size_t size )
+void *yyalloc (yy_size_t size )
{
- return (void *) malloc( size );
+ return malloc(size);
}
-void *agent_realloc (void * ptr, yy_size_t size )
+void *yyrealloc (void * ptr, yy_size_t size )
{
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
-void agent_free (void * ptr )
+void yyfree (void * ptr )
{
- free( (char *) ptr ); /* see agent_realloc() for (char *) cast */
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
/* %if-tables-serialization definitions */
/* %ok-for-header */
-#line 634 "agent_lexer.ll"
-
+#line 635 "agent_lexer.ll"
using namespace isc::dhcp;
file_ = "<string>";
sfile_ = 0;
loc_.initialize(&file_);
- agent__flex_debug = trace_scanning_;
+ yy_flex_debug = trace_scanning_;
YY_BUFFER_STATE buffer;
buffer = agent__scan_bytes(str.c_str(), str.size());
if (!buffer) {
file_ = filename;
sfile_ = f;
loc_.initialize(&file_);
- agent__flex_debug = trace_scanning_;
+ yy_flex_debug = trace_scanning_;
YY_BUFFER_STATE buffer;
/* See agent_lexer.cc header for available definitions */
-#line 2 "d2_lexer.cc"
+#line 1 "d2_lexer.cc"
-#line 4 "d2_lexer.cc"
+#line 3 "d2_lexer.cc"
#define YY_INT_ALIGNED short int
/* To avoid the call to exit... oops! */
#define YY_FATAL_ERROR(msg) isc::d2::D2ParserContext::fatal(msg)
-#line 1153 "d2_lexer.cc"
+#line 1152 "d2_lexer.cc"
/* noyywrap disables automatic rewinding for the next file to parse. Since we
always parse only a single string, there's no need to do any wraps. And
using yywrap requires linking with -lfl, which provides the default yywrap
by moving it ahead by yyleng bytes. yyleng specifies the length of the
currently matched token. */
#define YY_USER_ACTION driver.loc_.columns(yyleng);
+#line 1178 "d2_lexer.cc"
#line 1179 "d2_lexer.cc"
-#line 1180 "d2_lexer.cc"
#define INITIAL 0
#define COMMENT 1
}
-#line 1498 "d2_lexer.cc"
+#line 1497 "d2_lexer.cc"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
#line 748 "d2_lexer.ll"
ECHO;
YY_BREAK
-#line 2413 "d2_lexer.cc"
+#line 2412 "d2_lexer.cc"
case YY_END_OF_BUFFER:
{
-#line 2 "dhcp4_lexer.cc"
+#line 1 "dhcp4_lexer.cc"
-#line 4 "dhcp4_lexer.cc"
+#line 3 "dhcp4_lexer.cc"
#define YY_INT_ALIGNED short int
/* To avoid the call to exit... oops! */
#define YY_FATAL_ERROR(msg) isc::dhcp::Parser4Context::fatal(msg)
-#line 1834 "dhcp4_lexer.cc"
+#line 1833 "dhcp4_lexer.cc"
/* noyywrap disables automatic rewinding for the next file to parse. Since we
always parse only a single string, there's no need to do any wraps. And
using yywrap requires linking with -lfl, which provides the default yywrap
by moving it ahead by yyleng bytes. yyleng specifies the length of the
currently matched token. */
#define YY_USER_ACTION driver.loc_.columns(yyleng);
+#line 1859 "dhcp4_lexer.cc"
#line 1860 "dhcp4_lexer.cc"
-#line 1861 "dhcp4_lexer.cc"
#define INITIAL 0
#define COMMENT 1
}
-#line 2191 "dhcp4_lexer.cc"
+#line 2190 "dhcp4_lexer.cc"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
#line 1917 "dhcp4_lexer.ll"
ECHO;
YY_BREAK
-#line 4610 "dhcp4_lexer.cc"
+#line 4609 "dhcp4_lexer.cc"
case YY_END_OF_BUFFER:
{
-#line 2 "dhcp6_lexer.cc"
+#line 1 "dhcp6_lexer.cc"
-#line 4 "dhcp6_lexer.cc"
+#line 3 "dhcp6_lexer.cc"
#define YY_INT_ALIGNED short int
/* To avoid the call to exit... oops! */
#define YY_FATAL_ERROR(msg) isc::dhcp::Parser6Context::fatal(msg)
-#line 1855 "dhcp6_lexer.cc"
+#line 1854 "dhcp6_lexer.cc"
/* noyywrap disables automatic rewinding for the next file to parse. Since we
always parse only a single string, there's no need to do any wraps. And
using yywrap requires linking with -lfl, which provides the default yywrap
by moving it ahead by yyleng bytes. yyleng specifies the length of the
currently matched token. */
#define YY_USER_ACTION driver.loc_.columns(yyleng);
+#line 1880 "dhcp6_lexer.cc"
#line 1881 "dhcp6_lexer.cc"
-#line 1882 "dhcp6_lexer.cc"
#define INITIAL 0
#define COMMENT 1
}
-#line 2214 "dhcp6_lexer.cc"
+#line 2213 "dhcp6_lexer.cc"
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
#line 1978 "dhcp6_lexer.ll"
ECHO;
YY_BREAK
-#line 4715 "dhcp6_lexer.cc"
+#line 4714 "dhcp6_lexer.cc"
case YY_END_OF_BUFFER:
{
-#line 2 "netconf_lexer.cc"
+#line 1 "netconf_lexer.cc"
-#line 4 "netconf_lexer.cc"
+#line 3 "netconf_lexer.cc"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
/* %not-for-header */
-
/* %if-c-only */
/* %if-not-reentrant */
#define yy_create_buffer netconf__create_buffer
#define yy_delete_buffer netconf__delete_buffer
-#define yy_flex_debug netconf__flex_debug
+#define yy_scan_buffer netconf__scan_buffer
+#define yy_scan_string netconf__scan_string
+#define yy_scan_bytes netconf__scan_bytes
#define yy_init_buffer netconf__init_buffer
#define yy_flush_buffer netconf__flush_buffer
#define yy_load_buffer_state netconf__load_buffer_state
#define yy_switch_to_buffer netconf__switch_to_buffer
+#define yypush_buffer_state netconf_push_buffer_state
+#define yypop_buffer_state netconf_pop_buffer_state
+#define yyensure_buffer_stack netconf_ensure_buffer_stack
+#define yy_flex_debug netconf__flex_debug
#define yyin netconf_in
#define yyleng netconf_leng
#define yylex netconf_lex
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
/* %endif */
/* %if-c-only */
-
+#ifdef yy_create_buffer
+#define netconf__create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer netconf__create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define netconf__delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer netconf__delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define netconf__scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer netconf__scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define netconf__scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string netconf__scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define netconf__scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes netconf__scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define netconf__init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer netconf__init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define netconf__flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer netconf__flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define netconf__load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state netconf__load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define netconf__switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer netconf__switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define netconf_push_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state netconf_push_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define netconf_pop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state netconf_pop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define netconf_ensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack netconf_ensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define netconf_lex_ALREADY_DEFINED
+#else
+#define yylex netconf_lex
+#endif
+
+#ifdef yyrestart
+#define netconf_restart_ALREADY_DEFINED
+#else
+#define yyrestart netconf_restart
+#endif
+
+#ifdef yylex_init
+#define netconf_lex_init_ALREADY_DEFINED
+#else
+#define yylex_init netconf_lex_init
+#endif
+
+#ifdef yylex_init_extra
+#define netconf_lex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra netconf_lex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define netconf_lex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy netconf_lex_destroy
+#endif
+
+#ifdef yyget_debug
+#define netconf_get_debug_ALREADY_DEFINED
+#else
+#define yyget_debug netconf_get_debug
+#endif
+
+#ifdef yyset_debug
+#define netconf_set_debug_ALREADY_DEFINED
+#else
+#define yyset_debug netconf_set_debug
+#endif
+
+#ifdef yyget_extra
+#define netconf_get_extra_ALREADY_DEFINED
+#else
+#define yyget_extra netconf_get_extra
+#endif
+
+#ifdef yyset_extra
+#define netconf_set_extra_ALREADY_DEFINED
+#else
+#define yyset_extra netconf_set_extra
+#endif
+
+#ifdef yyget_in
+#define netconf_get_in_ALREADY_DEFINED
+#else
+#define yyget_in netconf_get_in
+#endif
+
+#ifdef yyset_in
+#define netconf_set_in_ALREADY_DEFINED
+#else
+#define yyset_in netconf_set_in
+#endif
+
+#ifdef yyget_out
+#define netconf_get_out_ALREADY_DEFINED
+#else
+#define yyget_out netconf_get_out
+#endif
+
+#ifdef yyset_out
+#define netconf_set_out_ALREADY_DEFINED
+#else
+#define yyset_out netconf_set_out
+#endif
+
+#ifdef yyget_leng
+#define netconf_get_leng_ALREADY_DEFINED
+#else
+#define yyget_leng netconf_get_leng
+#endif
+
+#ifdef yyget_text
+#define netconf_get_text_ALREADY_DEFINED
+#else
+#define yyget_text netconf_get_text
+#endif
+
+#ifdef yyget_lineno
+#define netconf_get_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno netconf_get_lineno
+#endif
+
+#ifdef yyset_lineno
+#define netconf_set_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno netconf_set_lineno
+#endif
+
+#ifdef yywrap
+#define netconf_wrap_ALREADY_DEFINED
+#else
+#define yywrap netconf_wrap
+#endif
+
/* %endif */
+#ifdef yyalloc
+#define netconf_alloc_ALREADY_DEFINED
+#else
+#define yyalloc netconf_alloc
+#endif
+
+#ifdef yyrealloc
+#define netconf_realloc_ALREADY_DEFINED
+#else
+#define yyrealloc netconf_realloc
+#endif
+
+#ifdef yyfree
+#define netconf_free_ALREADY_DEFINED
+#else
+#define yyfree netconf_free
+#endif
+
/* %if-c-only */
+#ifdef yytext
+#define netconf_text_ALREADY_DEFINED
+#else
+#define yytext netconf_text
+#endif
+
+#ifdef yyleng
+#define netconf_leng_ALREADY_DEFINED
+#else
+#define yyleng netconf_leng
+#endif
+
+#ifdef yyin
+#define netconf_in_ALREADY_DEFINED
+#else
+#define yyin netconf_in
+#endif
+
+#ifdef yyout
+#define netconf_out_ALREADY_DEFINED
+#else
+#define yyout netconf_out
+#endif
+
+#ifdef yy_flex_debug
+#define netconf__flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug netconf__flex_debug
+#endif
+
+#ifdef yylineno
+#define netconf_lineno_ALREADY_DEFINED
+#else
+#define yylineno netconf_lineno
+#endif
+
/* %endif */
/* First, we deal with platform-specific or compiler-specific issues. */
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
-typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_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 UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
/* %endif */
+/* begin standard C++ headers. */
/* %if-c++-only */
/* %endif */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#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.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* %ok-for-header */
/* %if-reentrant */
* 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 netconf_restart(netconf_in )
-
+#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
#endif
/* %if-not-reentrant */
-extern yy_size_t netconf_leng;
+extern int yyleng;
/* %endif */
/* %if-c-only */
/* %if-not-reentrant */
-extern FILE *netconf_in, *netconf_out;
+extern FILE *yyin, *yyout;
/* %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)
+ #define YY_LINENO_REWIND_TO(ptr)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up netconf_text. */ \
+ /* 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 netconf_text again */ \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ 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
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.
*/
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via netconf_restart()), so that the user can continue scanning by
- * just pointing netconf_in at a new input file.
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
-
/* %if-not-reentrant */
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* %endif */
/* %ok-for-header */
#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.
*/
/* %if-not-reentrant */
/* %not-for-header */
-
-/* yy_hold_char holds the character lost when netconf_text is formed. */
+/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t netconf_leng;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
+static char *yy_c_buf_p = NULL;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
-/* Flag which is used to allow netconf_wrap()'s to do buffer switches
- * instead of setting up a fresh netconf_in. A bit of a hack ...
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
/* %ok-for-header */
/* %endif */
-void netconf_restart (FILE *input_file );
-void netconf__switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE netconf__create_buffer (FILE *file,int size );
-void netconf__delete_buffer (YY_BUFFER_STATE b );
-void netconf__flush_buffer (YY_BUFFER_STATE b );
-void netconf_push_buffer_state (YY_BUFFER_STATE new_buffer );
-void netconf_pop_buffer_state (void );
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
-static void netconf_ensure_buffer_stack (void );
-static void netconf__load_buffer_state (void );
-static void netconf__init_buffer (YY_BUFFER_STATE b,FILE *file );
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
-#define YY_FLUSH_BUFFER netconf__flush_buffer(YY_CURRENT_BUFFER )
-
-YY_BUFFER_STATE netconf__scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE netconf__scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE netconf__scan_bytes (yyconst char *bytes,yy_size_t len );
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
/* %endif */
-void *netconf_alloc (yy_size_t );
-void *netconf_realloc (void *,yy_size_t );
-void netconf_free (void * );
-
-#define yy_new_buffer netconf__create_buffer
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- netconf_ensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- netconf__create_buffer(netconf_in,YY_BUF_SIZE ); \
+ 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 ){\
- netconf_ensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- netconf__create_buffer(netconf_in,YY_BUF_SIZE ); \
+ 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] netconf_text/netconf_in/netconf_out/yy_state_type/netconf_lineno etc. def's & init go here */
+/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
/* Begin user sect3 */
-#define netconf_wrap(n) 1
+#define netconf_wrap() (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
#define FLEX_DEBUG
+typedef flex_uint8_t YY_CHAR;
-typedef unsigned char YY_CHAR;
-
-FILE *netconf_in = (FILE *) 0, *netconf_out = (FILE *) 0;
+FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
-extern int netconf_lineno;
+extern int yylineno;
+int yylineno = 1;
-int netconf_lineno = 1;
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
-extern char *netconf_text;
-#define yytext_ptr netconf_text
+/* %% [1.5] DFA */
/* %if-c-only Standard (non-C++) definition */
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
/* %endif */
/* Done after the current pattern has been matched and before the
- * corresponding action - sets up netconf_text.
+ * corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
-/* %% [2.0] code to fiddle netconf_text and netconf_leng for yymore() goes here \ */\
- netconf_leng = (yy_size_t) (yy_cp - yy_bp); \
+/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
+ yyleng = (int) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
-/* %% [3.0] code to copy yytext_ptr to netconf_text[] goes here, if %array \ */\
+/* %% [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 63
#define YY_END_OF_BUFFER 64
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[373] =
+static const flex_int16_t yy_accept[373] =
{ 0,
56, 56, 0, 0, 0, 0, 0, 0, 0, 0,
64, 62, 10, 11, 62, 1, 56, 53, 56, 56,
16, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
5, 5, 5, 5, 5
} ;
-static yyconst flex_int32_t yy_meta[61] =
+static const YY_CHAR yy_meta[61] =
{ 0,
1, 1, 2, 3, 3, 4, 3, 3, 3, 3,
3, 3, 5, 6, 6, 6, 6, 3, 3, 3,
5, 3, 5, 5, 3, 3, 3, 3, 3, 3
} ;
-static yyconst flex_int16_t yy_base[386] =
+static const flex_int16_t yy_base[386] =
{ 0,
0, 0, 59, 62, 65, 0, 63, 67, 47, 64,
291, 2525, 84, 286, 125, 0, 105, 2525, 120, 125,
2509, 2511, 2513, 2515, 2517
} ;
-static yyconst flex_int16_t yy_def[386] =
+static const flex_int16_t yy_def[386] =
{ 0,
372, 1, 373, 373, 1, 5, 5, 5, 5, 5,
372, 372, 372, 372, 374, 375, 372, 372, 372, 372,
372, 372, 372, 372, 372
} ;
-static yyconst flex_int16_t yy_nxt[2586] =
+static const flex_int16_t yy_nxt[2586] =
{ 0,
12, 13, 14, 13, 12, 15, 16, 12, 17, 18,
19, 20, 21, 22, 22, 22, 22, 23, 24, 12,
372, 372, 372, 372, 372
} ;
-static yyconst flex_int16_t yy_chk[2586] =
+static const flex_int16_t yy_chk[2586] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int netconf__flex_debug;
-int netconf__flex_debug = 1;
+extern int yy_flex_debug;
+int yy_flex_debug = 1;
-static yyconst flex_int16_t yy_rule_linenum[63] =
+static const flex_int16_t yy_rule_linenum[63] =
{ 0,
- 132, 134, 136, 141, 142, 147, 148, 149, 161, 164,
- 169, 176, 185, 197, 209, 219, 229, 239, 248, 257,
- 266, 275, 284, 293, 302, 311, 320, 329, 338, 347,
- 356, 365, 374, 383, 392, 402, 411, 420, 429, 438,
- 447, 456, 465, 474, 483, 582, 587, 592, 597, 598,
- 599, 600, 601, 602, 604, 622, 635, 640, 644, 646,
- 648, 650
+ 133, 135, 137, 142, 143, 148, 149, 150, 162, 165,
+ 170, 177, 186, 198, 210, 220, 230, 240, 249, 258,
+ 267, 276, 285, 294, 303, 312, 321, 330, 339, 348,
+ 357, 366, 375, 384, 393, 403, 412, 421, 430, 439,
+ 448, 457, 466, 475, 484, 583, 588, 593, 598, 599,
+ 600, 601, 602, 603, 605, 623, 636, 641, 645, 647,
+ 649, 651
} ;
/* The intent behind this definition is that it'll catch
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *netconf_text;
+char *yytext;
#line 1 "netconf_lexer.ll"
/* Copyright (C) 2018-2019 Internet Systems Consortium, Inc. ("ISC")
2.5.31 through 2.5.33): it generates code that does
not conform to C89. See Debian bug 333231
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>. */
-# undef netconf_wrap
-# define netconf_wrap() 1
+# undef yywrap
+# define yywrap() 1
namespace {
/* To avoid the call to exit... oops! */
#define YY_FATAL_ERROR(msg) isc::netconf::ParserContext::fatal(msg)
+#line 1527 "netconf_lexer.cc"
/* noyywrap disables automatic rewinding for the next file to parse. Since we
always parse only a single string, there's no need to do any wraps. And
- using netconf_wrap requires linking with -lfl, which provides the default netconf_wrap
+ using yywrap requires linking with -lfl, which provides the default yywrap
implementation that always returns 1 anyway. */
/* nounput simplifies the lexer, by removing support for putting a character
back into the input stream. We never use such capability anyway. */
/* avoid to get static global variables to remain with C++. */
/* in last resort %option reentrant */
/* Enables debug mode. To see the debug messages, one needs to also set
- netconf__flex_debug to 1, then the debug messages will be printed on stderr. */
+ yy_flex_debug to 1, then the debug messages will be printed on stderr. */
/* I have no idea what this option does, except it was specified in the bison
examples and Postgres folks added it to remove gcc 4.3 warnings. Let's
be on the safe side and keep it. */
#define YY_NO_INPUT 1
-
/* These are not token expressions yet, just convenience expressions that
can be used during actual token definitions. Note some can match
incorrect inputs (e.g., IP addresses) which must be checked. */
/* for errors */
#line 96 "netconf_lexer.ll"
/* This code run each time a pattern is matched. It updates the location
- by moving it ahead by netconf_leng bytes. netconf_leng specifies the length of the
+ by moving it ahead by yyleng bytes. yyleng specifies the length of the
currently matched token. */
-#define YY_USER_ACTION driver.loc_.columns(netconf_leng);
-#line 1328 "netconf_lexer.cc"
+#define YY_USER_ACTION driver.loc_.columns(yyleng);
+#line 1553 "netconf_lexer.cc"
+#line 1554 "netconf_lexer.cc"
#define INITIAL 0
#define COMMENT 1
/* %if-reentrant */
/* %if-c-only */
-static int yy_init_globals (void );
+static int yy_init_globals ( void );
/* %endif */
/* %if-reentrant */
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int netconf_lex_destroy (void );
+int yylex_destroy ( void );
-int netconf_get_debug (void );
+int yyget_debug ( void );
-void netconf_set_debug (int debug_flag );
+void yyset_debug ( int debug_flag );
-YY_EXTRA_TYPE netconf_get_extra (void );
+YY_EXTRA_TYPE yyget_extra ( void );
-void netconf_set_extra (YY_EXTRA_TYPE user_defined );
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
-FILE *netconf_get_in (void );
+FILE *yyget_in ( void );
-void netconf_set_in (FILE * in_str );
+void yyset_in ( FILE * _in_str );
-FILE *netconf_get_out (void );
+FILE *yyget_out ( void );
-void netconf_set_out (FILE * out_str );
+void yyset_out ( FILE * _out_str );
-yy_size_t netconf_get_leng (void );
+ int yyget_leng ( void );
-char *netconf_get_text (void );
+char *yyget_text ( void );
-int netconf_get_lineno (void );
+int yyget_lineno ( void );
-void netconf_set_lineno (int line_number );
+void yyset_lineno ( int _line_number );
/* %if-bison-bridge */
/* %endif */
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int netconf_wrap (void );
+extern "C" int yywrap ( void );
#else
-extern int netconf_wrap (void );
+extern int yywrap ( void );
#endif
#endif
/* %not-for-header */
-
+#ifndef YY_NO_UNPUT
+
+#endif
/* %ok-for-header */
/* %endif */
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy ( char *, const char *, int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen ( const char * );
#endif
#ifndef YY_NO_INPUT
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
-
#ifdef __cplusplus
-static int yyinput (void );
+static int yyinput ( void );
#else
-static int input (void );
+static int input ( void );
#endif
/* %ok-for-header */
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( netconf_text, netconf_leng, 1, netconf_out )
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- yy_size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
- (c = getc( netconf_in )) != EOF && c != '\n'; ++n ) \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( netconf_in ) ) \
+ if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, netconf_in))==0 && ferror(netconf_in)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
break; \
} \
errno=0; \
- clearerr(netconf_in); \
+ clearerr(yyin); \
} \
}\
\
/* %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 */
#define YY_DECL_IS_OURS 1
/* %if-c-only Standard (non-C++) definition */
-extern int netconf_lex (void);
+extern int yylex (void);
-#define YY_DECL int netconf_lex (void)
+#define YY_DECL int yylex (void)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after netconf_text and netconf_leng
+/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
/* %% [6.0] YY_RULE_SETUP definition goes here */
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;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
+ if ( !(yy_init) )
+ {
+ (yy_init) = 1;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! (yy_start) )
+ (yy_start) = 1; /* first start state */
+
+ if ( ! yyin )
+/* %if-c-only */
+ yyin = stdin;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+ if ( ! yyout )
+/* %if-c-only */
+ yyout = stdout;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+ if ( ! YY_CURRENT_BUFFER ) {
+ yyensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+ }
+
+ yy_load_buffer_state( );
+ }
+
+ {
/* %% [7.0] user's declarations go here */
#line 102 "netconf_lexer.ll"
+#line 106 "netconf_lexer.ll"
/* This part of the code is copied over to the verbatim to the top
- of the generated netconf_lex function. Explanation:
+ of the generated yylex function. Explanation:
http://www.gnu.org/software/bison/manual/html_node/Multiple-start_002dsymbols.html */
- /* Code run each time netconf_lex is called. */
+ /* Code run each time yylex is called. */
driver.loc_.step();
/* We currently have 3 points of entries defined:
}
-#line 1603 "netconf_lexer.cc"
+#line 1868 "netconf_lexer.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 ( ! netconf_in )
-/* %if-c-only */
- netconf_in = stdin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-
- if ( ! netconf_out )
-/* %if-c-only */
- netconf_out = stdout;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
-
- if ( ! YY_CURRENT_BUFFER ) {
- netconf_ensure_buffer_stack ();
- YY_CURRENT_BUFFER_LVALUE =
- netconf__create_buffer(netconf_in,YY_BUF_SIZE );
- }
-
- netconf__load_buffer_state( );
- }
-
- while ( 1 ) /* loops until end-of-file is reached */
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
/* %% [8.0] yymore()-related code goes here */
yy_cp = (yy_c_buf_p);
- /* Support of netconf_text. */
+ /* Support of yytext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ 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_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 373 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 372 );
YY_DO_BEFORE_ACTION;
-/* %% [11.0] code for netconf_lineno update goes here */
+/* %% [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 ( netconf__flex_debug )
+ if ( yy_flex_debug )
{
if ( yy_act == 0 )
fprintf( stderr, "--scanner backing up\n" );
else if ( yy_act < 63 )
fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
- (long)yy_rule_linenum[yy_act], netconf_text );
+ (long)yy_rule_linenum[yy_act], yytext );
else if ( yy_act == 63 )
fprintf( stderr, "--accepting default rule (\"%s\")\n",
- netconf_text );
+ yytext );
else if ( yy_act == 64 )
fprintf( stderr, "--(end of buffer or a NUL)\n" );
else
case 1:
YY_RULE_SETUP
-#line 132 "netconf_lexer.ll"
+#line 133 "netconf_lexer.ll"
;
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 134 "netconf_lexer.ll"
+#line 135 "netconf_lexer.ll"
;
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 136 "netconf_lexer.ll"
+#line 137 "netconf_lexer.ll"
{
BEGIN(COMMENT);
comment_start_line = driver.loc_.end.line;;
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 141 "netconf_lexer.ll"
+#line 142 "netconf_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 142 "netconf_lexer.ll"
+#line 143 "netconf_lexer.ll"
;
YY_BREAK
case YY_STATE_EOF(COMMENT):
-#line 143 "netconf_lexer.ll"
+#line 144 "netconf_lexer.ll"
{
isc_throw(ParseError, "Comment not closed. (/* in line " << comment_start_line);
}
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 147 "netconf_lexer.ll"
+#line 148 "netconf_lexer.ll"
BEGIN(DIR_ENTER);
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 148 "netconf_lexer.ll"
+#line 149 "netconf_lexer.ll"
BEGIN(DIR_INCLUDE);
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 149 "netconf_lexer.ll"
+#line 150 "netconf_lexer.ll"
{
/* Include directive. */
/* Extract the filename. */
- std::string tmp(netconf_text+1);
+ std::string tmp(yytext+1);
tmp.resize(tmp.size() - 1);
driver.includeFile(tmp);
case YY_STATE_EOF(DIR_ENTER):
case YY_STATE_EOF(DIR_INCLUDE):
case YY_STATE_EOF(DIR_EXIT):
-#line 158 "netconf_lexer.ll"
+#line 159 "netconf_lexer.ll"
{
isc_throw(ParseError, "Directive not closed.");
}
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 161 "netconf_lexer.ll"
+#line 162 "netconf_lexer.ll"
BEGIN(INITIAL);
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 164 "netconf_lexer.ll"
+#line 165 "netconf_lexer.ll"
{
/* Ok, we found a with space. Let's ignore it and update loc variable. */
driver.loc_.step();
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
-#line 169 "netconf_lexer.ll"
+#line 170 "netconf_lexer.ll"
{
/* Newline found. Let's update the location and continue. */
- driver.loc_.lines(netconf_leng);
+ driver.loc_.lines(yyleng);
driver.loc_.step();
}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 176 "netconf_lexer.ll"
+#line 177 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 185 "netconf_lexer.ll"
+#line 186 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 197 "netconf_lexer.ll"
+#line 198 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 209 "netconf_lexer.ll"
+#line 210 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 219 "netconf_lexer.ll"
+#line 220 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 229 "netconf_lexer.ll"
+#line 230 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 239 "netconf_lexer.ll"
+#line 240 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 248 "netconf_lexer.ll"
+#line 249 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::MANAGED_SERVERS:
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 257 "netconf_lexer.ll"
+#line 258 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::MANAGED_SERVERS:
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 266 "netconf_lexer.ll"
+#line 267 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::MANAGED_SERVERS:
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 275 "netconf_lexer.ll"
+#line 276 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::MANAGED_SERVERS:
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 284 "netconf_lexer.ll"
+#line 285 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SERVER:
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 293 "netconf_lexer.ll"
+#line 294 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SERVER:
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 302 "netconf_lexer.ll"
+#line 303 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SOCKET_TYPE:
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 311 "netconf_lexer.ll"
+#line 312 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SOCKET_TYPE:
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 320 "netconf_lexer.ll"
+#line 321 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::SOCKET_TYPE:
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 329 "netconf_lexer.ll"
+#line 330 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONTROL_SOCKET:
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 338 "netconf_lexer.ll"
+#line 339 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONTROL_SOCKET:
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 347 "netconf_lexer.ll"
+#line 348 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONTROL_SOCKET:
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 356 "netconf_lexer.ll"
+#line 357 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 365 "netconf_lexer.ll"
+#line 366 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::HOOKS_LIBRARIES:
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 374 "netconf_lexer.ll"
+#line 375 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::HOOKS_LIBRARIES:
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 383 "netconf_lexer.ll"
+#line 384 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::CONFIG:
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 392 "netconf_lexer.ll"
+#line 393 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::NETCONF:
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 402 "netconf_lexer.ll"
+#line 403 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 411 "netconf_lexer.ll"
+#line 412 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 420 "netconf_lexer.ll"
+#line 421 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 429 "netconf_lexer.ll"
+#line 430 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 438 "netconf_lexer.ll"
+#line 439 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 447 "netconf_lexer.ll"
+#line 448 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 456 "netconf_lexer.ll"
+#line 457 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::OUTPUT_OPTIONS:
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 465 "netconf_lexer.ll"
+#line 466 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 474 "netconf_lexer.ll"
+#line 475 "netconf_lexer.ll"
{
switch(driver.ctx_) {
case ParserContext::LOGGERS:
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 483 "netconf_lexer.ll"
+#line 484 "netconf_lexer.ll"
{
/* A string has been matched. It contains the actual string and single quotes.
We need to get those quotes out of the way and just use its content, e.g.
for 'foo' we should get foo */
- std::string raw(netconf_text+1);
+ std::string raw(yytext+1);
size_t len = raw.size() - 1;
raw.resize(len);
std::string decoded;
case 46:
/* rule 46 can match eol */
YY_RULE_SETUP
-#line 582 "netconf_lexer.ll"
+#line 583 "netconf_lexer.ll"
{
/* Bad string with a forbidden control character inside */
- driver.error(driver.loc_, "Invalid control in " + std::string(netconf_text));
+ driver.error(driver.loc_, "Invalid control in " + std::string(yytext));
}
YY_BREAK
case 47:
/* rule 47 can match eol */
YY_RULE_SETUP
-#line 587 "netconf_lexer.ll"
+#line 588 "netconf_lexer.ll"
{
/* Bad string with a bad escape inside */
- driver.error(driver.loc_, "Bad escape in " + std::string(netconf_text));
+ driver.error(driver.loc_, "Bad escape in " + std::string(yytext));
}
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 592 "netconf_lexer.ll"
+#line 593 "netconf_lexer.ll"
{
/* Bad string with an open escape at the end */
- driver.error(driver.loc_, "Overflow escape in " + std::string(netconf_text));
+ driver.error(driver.loc_, "Overflow escape in " + std::string(yytext));
}
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 597 "netconf_lexer.ll"
+#line 598 "netconf_lexer.ll"
{ return NetconfParser::make_LSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 598 "netconf_lexer.ll"
+#line 599 "netconf_lexer.ll"
{ return NetconfParser::make_RSQUARE_BRACKET(driver.loc_); }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 599 "netconf_lexer.ll"
+#line 600 "netconf_lexer.ll"
{ return NetconfParser::make_LCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 600 "netconf_lexer.ll"
+#line 601 "netconf_lexer.ll"
{ return NetconfParser::make_RCURLY_BRACKET(driver.loc_); }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 601 "netconf_lexer.ll"
+#line 602 "netconf_lexer.ll"
{ return NetconfParser::make_COMMA(driver.loc_); }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 602 "netconf_lexer.ll"
+#line 603 "netconf_lexer.ll"
{ return NetconfParser::make_COLON(driver.loc_); }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 604 "netconf_lexer.ll"
+#line 605 "netconf_lexer.ll"
{
/* An integer was found. */
- std::string tmp(netconf_text);
+ std::string tmp(yytext);
int64_t integer = 0;
try {
/* In substring we want to use negative values (e.g. -1).
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 622 "netconf_lexer.ll"
+#line 623 "netconf_lexer.ll"
{
/* A floating point was found. */
- std::string tmp(netconf_text);
+ std::string tmp(yytext);
double fp = 0.0;
try {
fp = boost::lexical_cast<double>(tmp);
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 635 "netconf_lexer.ll"
+#line 636 "netconf_lexer.ll"
{
- string tmp(netconf_text);
+ string tmp(yytext);
return NetconfParser::make_BOOLEAN(tmp == "true", driver.loc_);
}
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 640 "netconf_lexer.ll"
+#line 641 "netconf_lexer.ll"
{
return NetconfParser::make_NULL_TYPE(driver.loc_);
}
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 644 "netconf_lexer.ll"
+#line 645 "netconf_lexer.ll"
driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 646 "netconf_lexer.ll"
+#line 647 "netconf_lexer.ll"
driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 648 "netconf_lexer.ll"
+#line 649 "netconf_lexer.ll"
driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 650 "netconf_lexer.ll"
-driver.error (driver.loc_, "Invalid character: " + std::string(netconf_text));
+#line 651 "netconf_lexer.ll"
+driver.error (driver.loc_, "Invalid character: " + std::string(yytext));
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 652 "netconf_lexer.ll"
+#line 653 "netconf_lexer.ll"
{
if (driver.states_.empty()) {
return NetconfParser::make_END(driver.loc_);
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 675 "netconf_lexer.ll"
+#line 676 "netconf_lexer.ll"
ECHO;
YY_BREAK
-#line 2467 "netconf_lexer.cc"
+#line 2698 "netconf_lexer.cc"
case YY_END_OF_BUFFER:
{
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
- * just pointed netconf_in at a new source and called
- * netconf_lex(). If so, then we have to assure
+ * 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 = netconf_in;
+/* %if-c-only */
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( netconf_wrap( ) )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * netconf_text, we can now 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
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of netconf_lex */
+ } /* end of user's declarations */
+} /* end of yylex */
/* %ok-for-header */
/* %if-c++-only */
/* %not-for-header */
-
/* %ok-for-header */
/* %endif */
/* %if-c++-only */
/* %endif */
{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
else
{
- yy_size_t num_to_read =
+ 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;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- yy_size_t new_size = b->yy_buf_size * 2;
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- netconf_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
+ b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- netconf_restart(netconf_in );
+ yyrestart( yyin );
}
else
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) netconf_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(yy_n_chars) += number_to_move;
/* %if-c-only */
/* %not-for-header */
-
static yy_state_type yy_get_previous_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
/* %% [15.0] code to get the start state into yy_current_state goes here */
yy_current_state = (yy_start);
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);
+ 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_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 373 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return yy_current_state;
/* %if-c++-only */
/* %endif */
{
- register int yy_is_jam;
+ 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);
+ char *yy_cp = (yy_c_buf_p);
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 373 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 372);
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
+#ifndef YY_NO_UNPUT
/* %if-c-only */
/* %endif */
+#endif
/* %if-c-only */
#ifndef YY_NO_INPUT
else
{ /* need more input */
- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
*/
/* Reset buffer status. */
- netconf_restart(netconf_in );
+ yyrestart( yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( netconf_wrap( ) )
+ if ( yywrap( ) )
return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve netconf_text */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
(yy_hold_char) = *++(yy_c_buf_p);
-/* %% [19.0] update BOL and netconf_lineno */
+/* %% [19.0] update BOL and yylineno */
return c;
}
* @note This function does not reset the start condition to @c INITIAL .
*/
/* %if-c-only */
- void netconf_restart (FILE * input_file )
+ void yyrestart (FILE * input_file )
/* %endif */
/* %if-c++-only */
/* %endif */
{
if ( ! YY_CURRENT_BUFFER ){
- netconf_ensure_buffer_stack ();
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- netconf__create_buffer(netconf_in,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- netconf__init_buffer(YY_CURRENT_BUFFER,input_file );
- netconf__load_buffer_state( );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
}
+/* %if-c++-only */
+/* %endif */
+
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
/* %if-c-only */
- void netconf__switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
/* %endif */
/* %if-c++-only */
/* %endif */
/* TODO. We should be able to replace this entire function body
* with
- * netconf_pop_buffer_state();
- * netconf_push_buffer_state(new_buffer);
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
*/
- netconf_ensure_buffer_stack ();
+ yyensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- netconf__load_buffer_state( );
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
- * EOF (netconf_wrap()) processing, but the only time this flag
- * is looked at is after netconf_wrap() is called, so it's safe
+ * 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 */
-static void netconf__load_buffer_state (void)
+static void yy_load_buffer_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- netconf_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+/* %if-c-only */
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
(yy_hold_char) = *(yy_c_buf_p);
}
* @return the allocated buffer state.
*/
/* %if-c-only */
- YY_BUFFER_STATE netconf__create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
/* %endif */
/* %if-c++-only */
/* %endif */
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) netconf_alloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in netconf__create_buffer()" );
+ 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 *) netconf_alloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in netconf__create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- netconf__init_buffer(b,file );
+ yy_init_buffer( b, file );
return b;
}
+/* %if-c++-only */
+/* %endif */
+
/** Destroy the buffer.
- * @param b a buffer created with netconf__create_buffer()
+ * @param b a buffer created with yy_create_buffer()
*
*/
/* %if-c-only */
- void netconf__delete_buffer (YY_BUFFER_STATE b )
+ void yy_delete_buffer (YY_BUFFER_STATE b )
/* %endif */
/* %if-c++-only */
/* %endif */
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- netconf_free((void *) b->yy_ch_buf );
+ yyfree( (void *) b->yy_ch_buf );
- netconf_free((void *) b );
+ yyfree( (void *) b );
}
-/* %if-c-only */
-
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-
-/* %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 netconf_restart() or at EOF.
+ * such as during a yyrestart() or at EOF.
*/
/* %if-c-only */
- static void netconf__init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
/* %endif */
/* %if-c++-only */
/* %endif */
{
int oerrno = errno;
- netconf__flush_buffer(b );
+ yy_flush_buffer( b );
+/* %if-c-only */
b->yy_input_file = file;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then netconf__init_buffer was _probably_
- * called from netconf_restart() or through yy_get_next_buffer.
+ /* 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){
*
*/
/* %if-c-only */
- void netconf__flush_buffer (YY_BUFFER_STATE b )
+ void yy_flush_buffer (YY_BUFFER_STATE b )
/* %endif */
/* %if-c++-only */
/* %endif */
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- netconf__load_buffer_state( );
+ yy_load_buffer_state( );
}
/* %if-c-or-c++ */
*
*/
/* %if-c-only */
-void netconf_push_buffer_state (YY_BUFFER_STATE new_buffer )
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
/* %endif */
/* %if-c++-only */
/* %endif */
if (new_buffer == NULL)
return;
- netconf_ensure_buffer_stack();
+ yyensure_buffer_stack();
- /* This block is copied from netconf__switch_to_buffer. */
+ /* This block is copied from yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from netconf__switch_to_buffer. */
- netconf__load_buffer_state( );
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
/* %endif */
*
*/
/* %if-c-only */
-void netconf_pop_buffer_state (void)
+void yypop_buffer_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
if (!YY_CURRENT_BUFFER)
return;
- netconf__delete_buffer(YY_CURRENT_BUFFER );
+ 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) {
- netconf__load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
* Guarantees space for at least one push.
*/
/* %if-c-only */
-static void netconf_ensure_buffer_stack (void)
+static void yyensure_buffer_stack (void)
/* %endif */
/* %if-c++-only */
/* %endif */
* 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**)netconf_alloc
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in netconf_ensure_buffer_stack()" );
-
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)netconf_realloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in netconf_ensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE netconf__scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return 0;
+ return NULL;
- b = (YY_BUFFER_STATE) netconf_alloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in netconf__scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
+ b->yy_input_file = NULL;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- netconf__switch_to_buffer(b );
+ yy_switch_to_buffer( b );
return b;
}
/* %endif */
/* %if-c-only */
-/** Setup the input buffer state to scan a string. The next call to netconf_lex() will
+/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * netconf__scan_bytes() instead.
+ * yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE netconf__scan_string (yyconst char * yystr )
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
{
- return netconf__scan_bytes(yystr,strlen(yystr) );
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
}
/* %endif */
/* %if-c-only */
-/** Setup the input buffer state to scan the given bytes. The next call to netconf_lex() will
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE netconf__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n, i;
+ yy_size_t n;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- buf = (char *) netconf_alloc(n );
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in netconf__scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = netconf__scan_buffer(buf,n );
+ b = yy_scan_buffer( buf, n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in netconf__scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
#endif
/* %if-c-only */
-static void yy_fatal_error (yyconst char* msg )
+static void yynoreturn yy_fatal_error (const char* msg )
{
- (void) fprintf( stderr, "%s\n", msg );
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* %endif */
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up netconf_text. */ \
+ /* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- netconf_text[netconf_leng] = (yy_hold_char); \
- (yy_c_buf_p) = netconf_text + 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'; \
- netconf_leng = yyless_macro_arg; \
+ yyleng = yyless_macro_arg; \
} \
while ( 0 )
/** Get the current line number.
*
*/
-int netconf_get_lineno (void)
+int yyget_lineno (void)
{
-
- return netconf_lineno;
+
+ return yylineno;
}
/** Get the input stream.
*
*/
-FILE *netconf_get_in (void)
+FILE *yyget_in (void)
{
- return netconf_in;
+ return yyin;
}
/** Get the output stream.
*
*/
-FILE *netconf_get_out (void)
+FILE *yyget_out (void)
{
- return netconf_out;
+ return yyout;
}
/** Get the length of the current token.
*
*/
-yy_size_t netconf_get_leng (void)
+int yyget_leng (void)
{
- return netconf_leng;
+ return yyleng;
}
/** Get the current token.
*
*/
-char *netconf_get_text (void)
+char *yyget_text (void)
{
- return netconf_text;
+ return yytext;
}
/* %if-reentrant */
/* %endif */
/** Set the current line number.
- * @param line_number
+ * @param _line_number line number
*
*/
-void netconf_set_lineno (int line_number )
+void yyset_lineno (int _line_number )
{
- netconf_lineno = line_number;
+ yylineno = _line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
*
- * @see netconf__switch_to_buffer
+ * @see yy_switch_to_buffer
*/
-void netconf_set_in (FILE * in_str )
+void yyset_in (FILE * _in_str )
{
- netconf_in = in_str ;
+ yyin = _in_str ;
}
-void netconf_set_out (FILE * out_str )
+void yyset_out (FILE * _out_str )
{
- netconf_out = out_str ;
+ yyout = _out_str ;
}
-int netconf_get_debug (void)
+int yyget_debug (void)
{
- return netconf__flex_debug;
+ return yy_flex_debug;
}
-void netconf_set_debug (int bdebug )
+void yyset_debug (int _bdebug )
{
- netconf__flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
/* %endif */
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from netconf_lex_destroy(), so don't allocate here.
+ * This function is called from yylex_destroy(), so don't allocate here.
*/
- (yy_buffer_stack) = 0;
+ (yy_buffer_stack) = NULL;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = (char *) 0;
+ (yy_c_buf_p) = NULL;
(yy_init) = 0;
(yy_start) = 0;
/* Defined in main.c */
#ifdef YY_STDINIT
- netconf_in = stdin;
- netconf_out = stdout;
+ yyin = stdin;
+ yyout = stdout;
#else
- netconf_in = (FILE *) 0;
- netconf_out = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
- * netconf_lex_init()
+ * yylex_init()
*/
return 0;
}
/* %endif */
/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
-/* netconf_lex_destroy is for both reentrant and non-reentrant scanners. */
-int netconf_lex_destroy (void)
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- netconf__delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer( YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- netconf_pop_buffer_state();
+ yypop_buffer_state();
}
/* Destroy the stack itself. */
- netconf_free((yy_buffer_stack) );
+ yyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * netconf_lex() is called, initialization will occur. */
+ * yylex() is called, initialization will occur. */
yy_init_globals( );
/* %if-reentrant */
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
- register int i;
+
+ 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 )
+static int yy_flex_strlen (const char * s )
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
}
#endif
-void *netconf_alloc (yy_size_t size )
+void *yyalloc (yy_size_t size )
{
- return (void *) malloc( size );
+ return malloc(size);
}
-void *netconf_realloc (void * ptr, yy_size_t size )
+void *yyrealloc (void * ptr, yy_size_t size )
{
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
-void netconf_free (void * ptr )
+void yyfree (void * ptr )
{
- free( (char *) ptr ); /* see netconf_realloc() for (char *) cast */
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
/* %if-tables-serialization definitions */
/* %ok-for-header */
-#line 675 "netconf_lexer.ll"
-
+#line 676 "netconf_lexer.ll"
using namespace isc::dhcp;
file_ = "<string>";
sfile_ = 0;
loc_.initialize(&file_);
- netconf__flex_debug = trace_scanning_;
+ yy_flex_debug = trace_scanning_;
YY_BUFFER_STATE buffer;
buffer = netconf__scan_bytes(str.c_str(), str.size());
if (!buffer) {
file_ = filename;
sfile_ = f;
loc_.initialize(&file_);
- netconf__flex_debug = trace_scanning_;
+ yy_flex_debug = trace_scanning_;
YY_BUFFER_STATE buffer;
/* See netconf_lexer.cc header for available definitions */
-#line 2 "lexer.cc"
+#line 1 "lexer.cc"
-#line 4 "lexer.cc"
+#line 3 "lexer.cc"
#define YY_INT_ALIGNED short int
/* A lexical scanner generated by flex */
/* %not-for-header */
-
/* %if-c-only */
/* %if-not-reentrant */
#define yy_create_buffer eval_create_buffer
#define yy_delete_buffer eval_delete_buffer
-#define yy_flex_debug eval_flex_debug
+#define yy_scan_buffer eval_scan_buffer
+#define yy_scan_string eval_scan_string
+#define yy_scan_bytes eval_scan_bytes
#define yy_init_buffer eval_init_buffer
#define yy_flush_buffer eval_flush_buffer
#define yy_load_buffer_state eval_load_buffer_state
#define yy_switch_to_buffer eval_switch_to_buffer
+#define yypush_buffer_state evalpush_buffer_state
+#define yypop_buffer_state evalpop_buffer_state
+#define yyensure_buffer_stack evalensure_buffer_stack
+#define yy_flex_debug eval_flex_debug
#define yyin evalin
#define yyleng evalleng
#define yylex evallex
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 35
+#define YY_FLEX_MINOR_VERSION 6
+#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
/* %endif */
/* %if-c-only */
-
+#ifdef yy_create_buffer
+#define eval_create_buffer_ALREADY_DEFINED
+#else
+#define yy_create_buffer eval_create_buffer
+#endif
+
+#ifdef yy_delete_buffer
+#define eval_delete_buffer_ALREADY_DEFINED
+#else
+#define yy_delete_buffer eval_delete_buffer
+#endif
+
+#ifdef yy_scan_buffer
+#define eval_scan_buffer_ALREADY_DEFINED
+#else
+#define yy_scan_buffer eval_scan_buffer
+#endif
+
+#ifdef yy_scan_string
+#define eval_scan_string_ALREADY_DEFINED
+#else
+#define yy_scan_string eval_scan_string
+#endif
+
+#ifdef yy_scan_bytes
+#define eval_scan_bytes_ALREADY_DEFINED
+#else
+#define yy_scan_bytes eval_scan_bytes
+#endif
+
+#ifdef yy_init_buffer
+#define eval_init_buffer_ALREADY_DEFINED
+#else
+#define yy_init_buffer eval_init_buffer
+#endif
+
+#ifdef yy_flush_buffer
+#define eval_flush_buffer_ALREADY_DEFINED
+#else
+#define yy_flush_buffer eval_flush_buffer
+#endif
+
+#ifdef yy_load_buffer_state
+#define eval_load_buffer_state_ALREADY_DEFINED
+#else
+#define yy_load_buffer_state eval_load_buffer_state
+#endif
+
+#ifdef yy_switch_to_buffer
+#define eval_switch_to_buffer_ALREADY_DEFINED
+#else
+#define yy_switch_to_buffer eval_switch_to_buffer
+#endif
+
+#ifdef yypush_buffer_state
+#define evalpush_buffer_state_ALREADY_DEFINED
+#else
+#define yypush_buffer_state evalpush_buffer_state
+#endif
+
+#ifdef yypop_buffer_state
+#define evalpop_buffer_state_ALREADY_DEFINED
+#else
+#define yypop_buffer_state evalpop_buffer_state
+#endif
+
+#ifdef yyensure_buffer_stack
+#define evalensure_buffer_stack_ALREADY_DEFINED
+#else
+#define yyensure_buffer_stack evalensure_buffer_stack
+#endif
+
+#ifdef yylex
+#define evallex_ALREADY_DEFINED
+#else
+#define yylex evallex
+#endif
+
+#ifdef yyrestart
+#define evalrestart_ALREADY_DEFINED
+#else
+#define yyrestart evalrestart
+#endif
+
+#ifdef yylex_init
+#define evallex_init_ALREADY_DEFINED
+#else
+#define yylex_init evallex_init
+#endif
+
+#ifdef yylex_init_extra
+#define evallex_init_extra_ALREADY_DEFINED
+#else
+#define yylex_init_extra evallex_init_extra
+#endif
+
+#ifdef yylex_destroy
+#define evallex_destroy_ALREADY_DEFINED
+#else
+#define yylex_destroy evallex_destroy
+#endif
+
+#ifdef yyget_debug
+#define evalget_debug_ALREADY_DEFINED
+#else
+#define yyget_debug evalget_debug
+#endif
+
+#ifdef yyset_debug
+#define evalset_debug_ALREADY_DEFINED
+#else
+#define yyset_debug evalset_debug
+#endif
+
+#ifdef yyget_extra
+#define evalget_extra_ALREADY_DEFINED
+#else
+#define yyget_extra evalget_extra
+#endif
+
+#ifdef yyset_extra
+#define evalset_extra_ALREADY_DEFINED
+#else
+#define yyset_extra evalset_extra
+#endif
+
+#ifdef yyget_in
+#define evalget_in_ALREADY_DEFINED
+#else
+#define yyget_in evalget_in
+#endif
+
+#ifdef yyset_in
+#define evalset_in_ALREADY_DEFINED
+#else
+#define yyset_in evalset_in
+#endif
+
+#ifdef yyget_out
+#define evalget_out_ALREADY_DEFINED
+#else
+#define yyget_out evalget_out
+#endif
+
+#ifdef yyset_out
+#define evalset_out_ALREADY_DEFINED
+#else
+#define yyset_out evalset_out
+#endif
+
+#ifdef yyget_leng
+#define evalget_leng_ALREADY_DEFINED
+#else
+#define yyget_leng evalget_leng
+#endif
+
+#ifdef yyget_text
+#define evalget_text_ALREADY_DEFINED
+#else
+#define yyget_text evalget_text
+#endif
+
+#ifdef yyget_lineno
+#define evalget_lineno_ALREADY_DEFINED
+#else
+#define yyget_lineno evalget_lineno
+#endif
+
+#ifdef yyset_lineno
+#define evalset_lineno_ALREADY_DEFINED
+#else
+#define yyset_lineno evalset_lineno
+#endif
+
+#ifdef yywrap
+#define evalwrap_ALREADY_DEFINED
+#else
+#define yywrap evalwrap
+#endif
+
/* %endif */
+#ifdef yyalloc
+#define evalalloc_ALREADY_DEFINED
+#else
+#define yyalloc evalalloc
+#endif
+
+#ifdef yyrealloc
+#define evalrealloc_ALREADY_DEFINED
+#else
+#define yyrealloc evalrealloc
+#endif
+
+#ifdef yyfree
+#define evalfree_ALREADY_DEFINED
+#else
+#define yyfree evalfree
+#endif
+
/* %if-c-only */
+#ifdef yytext
+#define evaltext_ALREADY_DEFINED
+#else
+#define yytext evaltext
+#endif
+
+#ifdef yyleng
+#define evalleng_ALREADY_DEFINED
+#else
+#define yyleng evalleng
+#endif
+
+#ifdef yyin
+#define evalin_ALREADY_DEFINED
+#else
+#define yyin evalin
+#endif
+
+#ifdef yyout
+#define evalout_ALREADY_DEFINED
+#else
+#define yyout evalout
+#endif
+
+#ifdef yy_flex_debug
+#define eval_flex_debug_ALREADY_DEFINED
+#else
+#define yy_flex_debug eval_flex_debug
+#endif
+
+#ifdef yylineno
+#define evallineno_ALREADY_DEFINED
+#else
+#define yylineno evallineno
+#endif
+
/* %endif */
/* First, we deal with platform-specific or compiler-specific issues. */
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
-typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_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 UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
/* %endif */
+/* begin standard C++ headers. */
/* %if-c++-only */
/* %endif */
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
+
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define yynoreturn __attribute__((__noreturn__))
#else
-#define yyconst
+#define yynoreturn
#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.
+/* Promotes a possibly negative, possibly signed char to an
+ * integer in range [0..255] for use as an array index.
*/
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
/* %ok-for-header */
/* %if-reentrant */
* 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 evalrestart(evalin )
-
+#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
#endif
/* %if-not-reentrant */
-extern yy_size_t evalleng;
+extern int yyleng;
/* %endif */
/* %if-c-only */
/* %if-not-reentrant */
-extern FILE *evalin, *evalout;
+extern FILE *yyin, *yyout;
/* %endif */
/* %endif */
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
-
+
/* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
* access to the local variable yy_act. Since yyless() is a macro, it would break
- * existing scanners that call yyless() from OUTSIDE evallex.
+ * existing scanners that call yyless() from OUTSIDE yylex.
* One obvious solution it to make yy_act a global. I tried that, and saw
- * a 5% performance hit in a non-evallineno scanner, because yy_act is
+ * a 5% performance hit in a non-yylineno scanner, because yy_act is
* normally declared as a register variable-- so it is not worth it.
*/
#define YY_LESS_LINENO(n) \
do { \
- yy_size_t yyl;\
- for ( yyl = n; yyl < evalleng; ++yyl )\
- if ( evaltext[yyl] == '\n' )\
- --evallineno;\
+ int yyl;\
+ for ( yyl = n; yyl < yyleng; ++yyl )\
+ if ( yytext[yyl] == '\n' )\
+ --yylineno;\
+ }while(0)
+ #define YY_LINENO_REWIND_TO(dst) \
+ do {\
+ const char *p;\
+ for ( p = yy_cp-1; p >= (dst); --p)\
+ if ( *p == '\n' )\
+ --yylineno;\
}while(0)
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up evaltext. */ \
+ /* 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 evaltext again */ \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
-
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_STRUCT_YY_BUFFER_STATE
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ 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
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.
*/
* possible backing-up.
*
* When we actually see the EOF, we change the status to "new"
- * (via evalrestart()), so that the user can continue scanning by
- * just pointing evalin at a new input file.
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
-
/* %if-not-reentrant */
/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
-static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
/* %endif */
/* %ok-for-header */
#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.
*/
/* %if-not-reentrant */
/* %not-for-header */
-
-/* yy_hold_char holds the character lost when evaltext is formed. */
+/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t evalleng;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
+static char *yy_c_buf_p = NULL;
static int yy_init = 0; /* whether we need to initialize */
static int yy_start = 0; /* start state number */
-/* Flag which is used to allow evalwrap()'s to do buffer switches
- * instead of setting up a fresh evalin. A bit of a hack ...
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
*/
static int yy_did_buffer_switch_on_eof;
/* %ok-for-header */
/* %endif */
-void evalrestart (FILE *input_file );
-void eval_switch_to_buffer (YY_BUFFER_STATE new_buffer );
-YY_BUFFER_STATE eval_create_buffer (FILE *file,int size );
-void eval_delete_buffer (YY_BUFFER_STATE b );
-void eval_flush_buffer (YY_BUFFER_STATE b );
-void evalpush_buffer_state (YY_BUFFER_STATE new_buffer );
-void evalpop_buffer_state (void );
-
-static void evalensure_buffer_stack (void );
-static void eval_load_buffer_state (void );
-static void eval_init_buffer (YY_BUFFER_STATE b,FILE *file );
+void yyrestart ( FILE *input_file );
+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
+void yy_delete_buffer ( YY_BUFFER_STATE b );
+void yy_flush_buffer ( YY_BUFFER_STATE b );
+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
+void yypop_buffer_state ( void );
-#define YY_FLUSH_BUFFER eval_flush_buffer(YY_CURRENT_BUFFER )
+static void yyensure_buffer_stack ( void );
+static void yy_load_buffer_state ( void );
+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
-YY_BUFFER_STATE eval_scan_buffer (char *base,yy_size_t size );
-YY_BUFFER_STATE eval_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE eval_scan_bytes (yyconst char *bytes,yy_size_t len );
+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
+YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
/* %endif */
-void *evalalloc (yy_size_t );
-void *evalrealloc (void *,yy_size_t );
-void evalfree (void * );
-
-#define yy_new_buffer eval_create_buffer
+void *yyalloc ( yy_size_t );
+void *yyrealloc ( void *, yy_size_t );
+void yyfree ( void * );
+#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
{ \
if ( ! YY_CURRENT_BUFFER ){ \
- evalensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- eval_create_buffer(evalin,YY_BUF_SIZE ); \
+ 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 ){\
- evalensure_buffer_stack (); \
+ yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
- eval_create_buffer(evalin,YY_BUF_SIZE ); \
+ 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] evaltext/evalin/evalout/yy_state_type/evallineno etc. def's & init go here */
+/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
/* Begin user sect3 */
-#define evalwrap(n) 1
+#define evalwrap() (/*CONSTCOND*/1)
#define YY_SKIP_YYWRAP
#define FLEX_DEBUG
+typedef flex_uint8_t YY_CHAR;
-typedef unsigned char YY_CHAR;
-
-FILE *evalin = (FILE *) 0, *evalout = (FILE *) 0;
+FILE *yyin = NULL, *yyout = NULL;
typedef int yy_state_type;
-extern int evallineno;
+extern int yylineno;
+int yylineno = 1;
-int evallineno = 1;
+extern char *yytext;
+#ifdef yytext_ptr
+#undef yytext_ptr
+#endif
+#define yytext_ptr yytext
-extern char *evaltext;
-#define yytext_ptr evaltext
+/* %% [1.5] DFA */
/* %if-c-only Standard (non-C++) definition */
-static yy_state_type yy_get_previous_state (void );
-static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
-static int yy_get_next_buffer (void );
-static void yy_fatal_error (yyconst char msg[] );
+static yy_state_type yy_get_previous_state ( void );
+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
+static int yy_get_next_buffer ( void );
+static void yynoreturn yy_fatal_error ( const char* msg );
/* %endif */
/* Done after the current pattern has been matched and before the
- * corresponding action - sets up evaltext.
+ * corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
-/* %% [2.0] code to fiddle evaltext and evalleng for yymore() goes here \ */\
- evalleng = (yy_size_t) (yy_cp - yy_bp); \
+/* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\
+ yyleng = (int) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
-/* %% [3.0] code to copy yytext_ptr to evaltext[] goes here, if %array \ */\
+/* %% [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 54
#define YY_END_OF_BUFFER 55
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[213] =
+static const flex_int16_t yy_accept[213] =
{ 0,
0, 0, 55, 53, 1, 2, 53, 47, 48, 52,
51, 53, 46, 5, 5, 53, 53, 53, 53, 49,
34, 0
} ;
-static yyconst flex_int32_t yy_ec[256] =
+static const YY_CHAR yy_ec[256] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[45] =
+static const YY_CHAR yy_meta[45] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 3,
4, 4, 4, 4, 5, 1, 4, 1, 1, 1,
1, 1, 1, 1
} ;
-static yyconst flex_int16_t yy_base[218] =
+static const flex_int16_t yy_base[218] =
{ 0,
0, 0, 325, 326, 322, 320, 318, 326, 326, 326,
326, 34, 326, 39, 36, 306, 304, 81, 115, 326,
0, 326, 208, 210, 212, 85, 215
} ;
-static yyconst flex_int16_t yy_def[218] =
+static const flex_int16_t yy_def[218] =
{ 0,
212, 1, 212, 212, 212, 212, 213, 212, 212, 212,
212, 212, 212, 212, 14, 214, 212, 212, 18, 212,
19, 0, 212, 212, 212, 212, 212
} ;
-static yyconst flex_int16_t yy_nxt[371] =
+static const flex_int16_t yy_nxt[371] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 15, 15, 16, 17, 18, 19, 19, 20,
212, 212, 212, 212, 212, 212, 212, 212, 212, 212
} ;
-static yyconst flex_int16_t yy_chk[371] =
+static const flex_int16_t yy_chk[371] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
} ;
/* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[55] =
+static const flex_int32_t yy_rule_can_match_eol[55] =
{ 0,
0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
-extern int eval_flex_debug;
-int eval_flex_debug = 1;
+extern int yy_flex_debug;
+int yy_flex_debug = 1;
-static yyconst flex_int16_t yy_rule_linenum[54] =
+static const flex_int16_t yy_rule_linenum[54] =
{ 0,
- 105, 110, 116, 126, 132, 150, 174, 188, 189, 190,
- 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,
- 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,
- 211, 212, 213, 214, 215, 216, 217, 218, 219, 220,
- 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
- 231, 232, 233
+ 106, 111, 117, 127, 133, 151, 175, 189, 190, 191,
+ 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 234
} ;
/* The intent behind this definition is that it'll catch
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *evaltext;
+char *yytext;
#line 1 "lexer.ll"
/* Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
2.5.31 through 2.5.33): it generates code that does
not conform to C89. See Debian bug 333231
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>. */
-# undef evalwrap
-# define evalwrap() 1
+# undef yywrap
+# define yywrap() 1
/* The location of the current token. The lexer will keep updating it. This
variable will be useful for logging errors. */
/* To avoid the call to exit... oops! */
#define YY_FATAL_ERROR(msg) isc::eval::EvalContext::fatal(msg)
+#line 1006 "lexer.cc"
/* noyywrap disables automatic rewinding for the next file to parse. Since we
always parse only a single string, there's no need to do any wraps. And
- using evalwrap requires linking with -lfl, which provides the default evalwrap
+ using yywrap requires linking with -lfl, which provides the default yywrap
implementation that always returns 1 anyway. */
/* nounput simplifies the lexer, by removing support for putting a character
back into the input stream. We never use such capability anyway. */
incorrect inputs (e.g., IP addresses) which must be checked. */
#line 80 "lexer.ll"
/* This code run each time a pattern is matched. It updates the location
- by moving it ahead by evalleng bytes. evalleng specifies the length of the
+ by moving it ahead by yyleng bytes. yyleng specifies the length of the
currently matched token. */
#define YY_USER_ACTION loc.columns(evalleng);
-#line 799 "lexer.cc"
+#line 1031 "lexer.cc"
+#line 1032 "lexer.cc"
#define INITIAL 0
/* %if-reentrant */
/* %if-c-only */
-static int yy_init_globals (void );
+static int yy_init_globals ( void );
/* %endif */
/* %if-reentrant */
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
-int evallex_destroy (void );
+int yylex_destroy ( void );
-int evalget_debug (void );
+int yyget_debug ( void );
-void evalset_debug (int debug_flag );
+void yyset_debug ( int debug_flag );
-YY_EXTRA_TYPE evalget_extra (void );
+YY_EXTRA_TYPE yyget_extra ( void );
-void evalset_extra (YY_EXTRA_TYPE user_defined );
+void yyset_extra ( YY_EXTRA_TYPE user_defined );
-FILE *evalget_in (void );
+FILE *yyget_in ( void );
-void evalset_in (FILE * in_str );
+void yyset_in ( FILE * _in_str );
-FILE *evalget_out (void );
+FILE *yyget_out ( void );
-void evalset_out (FILE * out_str );
+void yyset_out ( FILE * _out_str );
-yy_size_t evalget_leng (void );
+ int yyget_leng ( void );
-char *evalget_text (void );
+char *yyget_text ( void );
-int evalget_lineno (void );
+int yyget_lineno ( void );
-void evalset_lineno (int line_number );
+void yyset_lineno ( int _line_number );
/* %if-bison-bridge */
/* %endif */
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int evalwrap (void );
+extern "C" int yywrap ( void );
#else
-extern int evalwrap (void );
+extern int yywrap ( void );
#endif
#endif
/* %not-for-header */
-
+#ifndef YY_NO_UNPUT
+
+#endif
/* %ok-for-header */
/* %endif */
#ifndef yytext_ptr
-static void yy_flex_strncpy (char *,yyconst char *,int );
+static void yy_flex_strncpy ( char *, const char *, int );
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * );
+static int yy_flex_strlen ( const char * );
#endif
#ifndef YY_NO_INPUT
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */
-
#ifdef __cplusplus
-static int yyinput (void );
+static int yyinput ( void );
#else
-static int input (void );
+static int input ( void );
#endif
/* %ok-for-header */
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( evaltext, evalleng, 1, evalout )
+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- yy_size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
- (c = getc( evalin )) != EOF && c != '\n'; ++n ) \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
- if ( c == EOF && ferror( evalin ) ) \
+ if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
- while ( (result = fread(buf, 1, max_size, evalin))==0 && ferror(evalin)) \
+ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
break; \
} \
errno=0; \
- clearerr(evalin); \
+ clearerr(yyin); \
} \
}\
\
/* %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 */
#define YY_DECL_IS_OURS 1
/* %if-c-only Standard (non-C++) definition */
-extern int evallex (void);
+extern int yylex (void);
-#define YY_DECL int evallex (void)
+#define YY_DECL int yylex (void)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
#endif /* !YY_DECL */
-/* Code executed at the beginning of each rule, after evaltext and evalleng
+/* Code executed at the beginning of each rule, after yytext and yyleng
* have been set up.
*/
#ifndef YY_USER_ACTION
/* Code executed at the end of each rule. */
#ifndef YY_BREAK
-#define YY_BREAK break;
+#define YY_BREAK /*LINTED*/break;
#endif
/* %% [6.0] YY_RULE_SETUP definition goes here */
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;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
-/* %% [7.0] user's declarations go here */
-#line 86 "lexer.ll"
-
-
-
- /* Code run each time evallex is called. */
- loc.step();
-
- if (start_token_flag) {
- start_token_flag = false;
- switch (start_token_value) {
- case EvalContext::PARSER_BOOL:
- return isc::eval::EvalParser::make_TOPLEVEL_BOOL(loc);
- default:
- case EvalContext::PARSER_STRING:
- return isc::eval::EvalParser::make_TOPLEVEL_STRING(loc);
- }
- }
-
-
-
-#line 1059 "lexer.cc"
-
if ( !(yy_init) )
{
(yy_init) = 1;
if ( ! (yy_start) )
(yy_start) = 1; /* first start state */
- if ( ! evalin )
+ if ( ! yyin )
/* %if-c-only */
- evalin = stdin;
+ yyin = stdin;
/* %endif */
/* %if-c++-only */
/* %endif */
- if ( ! evalout )
+ if ( ! yyout )
/* %if-c-only */
- evalout = stdout;
+ yyout = stdout;
/* %endif */
/* %if-c++-only */
/* %endif */
if ( ! YY_CURRENT_BUFFER ) {
- evalensure_buffer_stack ();
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- eval_create_buffer(evalin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- eval_load_buffer_state( );
+ yy_load_buffer_state( );
}
- while ( 1 ) /* loops until end-of-file is reached */
+ {
+/* %% [7.0] user's declarations go here */
+#line 86 "lexer.ll"
+
+
+
+#line 90 "lexer.ll"
+ /* Code run each time evallex is called. */
+ loc.step();
+
+ if (start_token_flag) {
+ start_token_flag = false;
+ switch (start_token_value) {
+ case EvalContext::PARSER_BOOL:
+ return isc::eval::EvalParser::make_TOPLEVEL_BOOL(loc);
+ default:
+ case EvalContext::PARSER_STRING:
+ return isc::eval::EvalParser::make_TOPLEVEL_STRING(loc);
+ }
+ }
+
+
+
+#line 1331 "lexer.cc"
+
+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
{
/* %% [8.0] yymore()-related code goes here */
yy_cp = (yy_c_buf_p);
- /* Support of evaltext. */
+ /* Support of yytext. */
*yy_cp = (yy_hold_char);
/* yy_bp points to the position in yy_ch_buf of the start of
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ 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_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 213 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
++yy_cp;
}
while ( yy_current_state != 212 );
YY_DO_BEFORE_ACTION;
-/* %% [11.0] code for evallineno update goes here */
+/* %% [11.0] code for yylineno update goes here */
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
- yy_size_t yyl;
- for ( yyl = 0; yyl < evalleng; ++yyl )
- if ( evaltext[yyl] == '\n' )
-
- evallineno++;
+ int yyl;
+ for ( yyl = 0; yyl < yyleng; ++yyl )
+ if ( yytext[yyl] == '\n' )
+
+ yylineno++;
;
}
do_action: /* This label is used only to access EOF actions. */
/* %% [12.0] debug code goes here */
- if ( eval_flex_debug )
+ if ( yy_flex_debug )
{
if ( yy_act == 0 )
fprintf( stderr, "--scanner backing up\n" );
else if ( yy_act < 54 )
fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
- (long)yy_rule_linenum[yy_act], evaltext );
+ (long)yy_rule_linenum[yy_act], yytext );
else if ( yy_act == 54 )
fprintf( stderr, "--accepting default rule (\"%s\")\n",
- evaltext );
+ yytext );
else if ( yy_act == 55 )
fprintf( stderr, "--(end of buffer or a NUL)\n" );
else
case 1:
YY_RULE_SETUP
-#line 105 "lexer.ll"
+#line 106 "lexer.ll"
{
/* Ok, we found a with space. Let's ignore it and update loc variable. */
loc.step();
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
-#line 110 "lexer.ll"
+#line 111 "lexer.ll"
{
/* Newline found. Let's update the location and continue. */
loc.lines(evalleng);
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 116 "lexer.ll"
+#line 117 "lexer.ll"
{
/* A string has been matched. It contains the actual string and single quotes.
We need to get those quotes out of the way and just use its content, e.g.
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 126 "lexer.ll"
+#line 127 "lexer.ll"
{
/* A hex string has been matched. It contains the '0x' or '0X' header
followed by at least one hexadecimal digit. */
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 132 "lexer.ll"
+#line 133 "lexer.ll"
{
/* An integer was found. */
std::string tmp(evaltext);
YY_BREAK
case 6:
/* rule 6 can match eol */
-*yy_cp = (yy_hold_char); /* undo effects of setting up evaltext */
+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
+YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
-YY_DO_BEFORE_ACTION; /* set up evaltext again */
+YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 150 "lexer.ll"
+#line 151 "lexer.ll"
{
/* This string specifies option name starting with a letter
and further containing letters, digits, hyphens and
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 174 "lexer.ll"
+#line 175 "lexer.ll"
{
/* IPv4 or IPv6 address */
std::string tmp(evaltext);
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 188 "lexer.ll"
+#line 189 "lexer.ll"
return isc::eval::EvalParser::make_EQUAL(loc);
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 189 "lexer.ll"
+#line 190 "lexer.ll"
return isc::eval::EvalParser::make_OPTION(loc);
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 190 "lexer.ll"
+#line 191 "lexer.ll"
return isc::eval::EvalParser::make_RELAY4(loc);
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 191 "lexer.ll"
+#line 192 "lexer.ll"
return isc::eval::EvalParser::make_RELAY6(loc);
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 192 "lexer.ll"
+#line 193 "lexer.ll"
return isc::eval::EvalParser::make_PEERADDR(loc);
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 193 "lexer.ll"
+#line 194 "lexer.ll"
return isc::eval::EvalParser::make_LINKADDR(loc);
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 194 "lexer.ll"
+#line 195 "lexer.ll"
return isc::eval::EvalParser::make_TEXT(loc);
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 195 "lexer.ll"
+#line 196 "lexer.ll"
return isc::eval::EvalParser::make_HEX(loc);
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 196 "lexer.ll"
+#line 197 "lexer.ll"
return isc::eval::EvalParser::make_EXISTS(loc);
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 197 "lexer.ll"
+#line 198 "lexer.ll"
return isc::eval::EvalParser::make_PKT(loc);
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 198 "lexer.ll"
+#line 199 "lexer.ll"
return isc::eval::EvalParser::make_IFACE(loc);
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 199 "lexer.ll"
+#line 200 "lexer.ll"
return isc::eval::EvalParser::make_SRC(loc);
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 200 "lexer.ll"
+#line 201 "lexer.ll"
return isc::eval::EvalParser::make_DST(loc);
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 201 "lexer.ll"
+#line 202 "lexer.ll"
return isc::eval::EvalParser::make_LEN(loc);
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 202 "lexer.ll"
+#line 203 "lexer.ll"
return isc::eval::EvalParser::make_PKT4(loc);
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 203 "lexer.ll"
+#line 204 "lexer.ll"
return isc::eval::EvalParser::make_CHADDR(loc);
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 204 "lexer.ll"
+#line 205 "lexer.ll"
return isc::eval::EvalParser::make_HLEN(loc);
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 205 "lexer.ll"
+#line 206 "lexer.ll"
return isc::eval::EvalParser::make_HTYPE(loc);
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 206 "lexer.ll"
+#line 207 "lexer.ll"
return isc::eval::EvalParser::make_CIADDR(loc);
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 207 "lexer.ll"
+#line 208 "lexer.ll"
return isc::eval::EvalParser::make_GIADDR(loc);
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 208 "lexer.ll"
+#line 209 "lexer.ll"
return isc::eval::EvalParser::make_YIADDR(loc);
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 209 "lexer.ll"
+#line 210 "lexer.ll"
return isc::eval::EvalParser::make_SIADDR(loc);
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 210 "lexer.ll"
+#line 211 "lexer.ll"
return isc::eval::EvalParser::make_PKT6(loc);
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 211 "lexer.ll"
+#line 212 "lexer.ll"
return isc::eval::EvalParser::make_MSGTYPE(loc);
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 212 "lexer.ll"
+#line 213 "lexer.ll"
return isc::eval::EvalParser::make_TRANSID(loc);
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 213 "lexer.ll"
+#line 214 "lexer.ll"
return isc::eval::EvalParser::make_VENDOR(loc);
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 214 "lexer.ll"
+#line 215 "lexer.ll"
return isc::eval::EvalParser::make_VENDOR_CLASS(loc);
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 215 "lexer.ll"
+#line 216 "lexer.ll"
return isc::eval::EvalParser::make_DATA(loc);
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 216 "lexer.ll"
+#line 217 "lexer.ll"
return isc::eval::EvalParser::make_ENTERPRISE(loc);
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 217 "lexer.ll"
+#line 218 "lexer.ll"
return isc::eval::EvalParser::make_SUBSTRING(loc);
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 218 "lexer.ll"
+#line 219 "lexer.ll"
return isc::eval::EvalParser::make_ALL(loc);
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 219 "lexer.ll"
+#line 220 "lexer.ll"
return isc::eval::EvalParser::make_CONCAT(loc);
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 220 "lexer.ll"
+#line 221 "lexer.ll"
return isc::eval::EvalParser::make_IFELSE(loc);
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 221 "lexer.ll"
+#line 222 "lexer.ll"
return isc::eval::EvalParser::make_TOHEXSTRING(loc);
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 222 "lexer.ll"
+#line 223 "lexer.ll"
return isc::eval::EvalParser::make_NOT(loc);
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 223 "lexer.ll"
+#line 224 "lexer.ll"
return isc::eval::EvalParser::make_AND(loc);
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 224 "lexer.ll"
+#line 225 "lexer.ll"
return isc::eval::EvalParser::make_OR(loc);
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 225 "lexer.ll"
+#line 226 "lexer.ll"
return isc::eval::EvalParser::make_MEMBER(loc);
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 226 "lexer.ll"
+#line 227 "lexer.ll"
return isc::eval::EvalParser::make_DOT(loc);
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 227 "lexer.ll"
+#line 228 "lexer.ll"
return isc::eval::EvalParser::make_LPAREN(loc);
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 228 "lexer.ll"
+#line 229 "lexer.ll"
return isc::eval::EvalParser::make_RPAREN(loc);
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 229 "lexer.ll"
+#line 230 "lexer.ll"
return isc::eval::EvalParser::make_LBRACKET(loc);
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 230 "lexer.ll"
+#line 231 "lexer.ll"
return isc::eval::EvalParser::make_RBRACKET(loc);
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 231 "lexer.ll"
+#line 232 "lexer.ll"
return isc::eval::EvalParser::make_COMA(loc);
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 232 "lexer.ll"
+#line 233 "lexer.ll"
return isc::eval::EvalParser::make_ANY(loc);
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 233 "lexer.ll"
+#line 234 "lexer.ll"
driver.error (loc, "Invalid character: " + std::string(evaltext));
YY_BREAK
case YY_STATE_EOF(INITIAL):
-#line 234 "lexer.ll"
+#line 235 "lexer.ll"
return isc::eval::EvalParser::make_END(loc);
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 235 "lexer.ll"
+#line 236 "lexer.ll"
ECHO;
YY_BREAK
-#line 1527 "lexer.cc"
+#line 1766 "lexer.cc"
case YY_END_OF_BUFFER:
{
{
/* We're scanning a new file or input source. It's
* possible that this happened because the user
- * just pointed evalin at a new source and called
- * evallex(). If so, then we have to assure
+ * 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 = evalin;
+/* %if-c-only */
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
}
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( evalwrap( ) )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
- * evaltext, we can now 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
"fatal flex scanner internal error--no action found" );
} /* end of action switch */
} /* end of scanning one token */
-} /* end of evallex */
+ } /* end of user's declarations */
+} /* end of yylex */
/* %ok-for-header */
/* %if-c++-only */
/* %not-for-header */
-
/* %ok-for-header */
/* %endif */
/* %if-c++-only */
/* %endif */
{
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = (yytext_ptr);
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = (yytext_ptr);
+ int number_to_move, i;
int ret_val;
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
/* Try to read more data. */
/* First move last chars to start of buffer. */
- number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
for ( i = 0; i < number_to_move; ++i )
*(dest++) = *(source++);
else
{
- yy_size_t num_to_read =
+ 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;
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
- yy_size_t new_size = b->yy_buf_size * 2;
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
b->yy_ch_buf = (char *)
/* Include room in for 2 EOB chars. */
- evalrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ yyrealloc( (void *) b->yy_ch_buf,
+ (yy_size_t) (b->yy_buf_size + 2) );
}
else
/* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
+ b->yy_ch_buf = NULL;
if ( ! b->yy_ch_buf )
YY_FATAL_ERROR(
if ( number_to_move == YY_MORE_ADJ )
{
ret_val = EOB_ACT_END_OF_FILE;
- evalrestart(evalin );
+ yyrestart( yyin );
}
else
else
ret_val = EOB_ACT_CONTINUE_SCAN;
- if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
- yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
- YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) evalrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
(yy_n_chars) += number_to_move;
/* %if-c-only */
/* %not-for-header */
-
static yy_state_type yy_get_previous_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
/* %% [15.0] code to get the start state into yy_current_state goes here */
yy_current_state = (yy_start);
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);
+ 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_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 213 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
}
return yy_current_state;
/* %if-c++-only */
/* %endif */
{
- register int yy_is_jam;
+ 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);
+ char *yy_cp = (yy_c_buf_p);
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
(yy_last_accepting_state) = yy_current_state;
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 213 )
- yy_c = yy_meta[(unsigned int) yy_c];
+ yy_c = yy_meta[yy_c];
}
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
yy_is_jam = (yy_current_state == 212);
- return yy_is_jam ? 0 : yy_current_state;
+ return yy_is_jam ? 0 : yy_current_state;
}
+#ifndef YY_NO_UNPUT
/* %if-c-only */
/* %endif */
+#endif
/* %if-c-only */
#ifndef YY_NO_INPUT
else
{ /* need more input */
- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
*/
/* Reset buffer status. */
- evalrestart(evalin );
+ yyrestart( yyin );
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
- if ( evalwrap( ) )
+ if ( yywrap( ) )
return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
- *(yy_c_buf_p) = '\0'; /* preserve evaltext */
+ *(yy_c_buf_p) = '\0'; /* preserve yytext */
(yy_hold_char) = *++(yy_c_buf_p);
-/* %% [19.0] update BOL and evallineno */
+/* %% [19.0] update BOL and yylineno */
if ( c == '\n' )
-
- evallineno++;
+
+ yylineno++;
;
return c;
* @note This function does not reset the start condition to @c INITIAL .
*/
/* %if-c-only */
- void evalrestart (FILE * input_file )
+ void yyrestart (FILE * input_file )
/* %endif */
/* %if-c++-only */
/* %endif */
{
if ( ! YY_CURRENT_BUFFER ){
- evalensure_buffer_stack ();
+ yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
- eval_create_buffer(evalin,YY_BUF_SIZE );
+ yy_create_buffer( yyin, YY_BUF_SIZE );
}
- eval_init_buffer(YY_CURRENT_BUFFER,input_file );
- eval_load_buffer_state( );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file );
+ yy_load_buffer_state( );
}
+/* %if-c++-only */
+/* %endif */
+
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
*
*/
/* %if-c-only */
- void eval_switch_to_buffer (YY_BUFFER_STATE new_buffer )
+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
/* %endif */
/* %if-c++-only */
/* %endif */
/* TODO. We should be able to replace this entire function body
* with
- * evalpop_buffer_state();
- * evalpush_buffer_state(new_buffer);
+ * yypop_buffer_state();
+ * yypush_buffer_state(new_buffer);
*/
- evalensure_buffer_stack ();
+ yyensure_buffer_stack ();
if ( YY_CURRENT_BUFFER == new_buffer )
return;
}
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- eval_load_buffer_state( );
+ yy_load_buffer_state( );
/* We don't actually know whether we did this switch during
- * EOF (evalwrap()) processing, but the only time this flag
- * is looked at is after evalwrap() is called, so it's safe
+ * 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 */
-static void eval_load_buffer_state (void)
+static void yy_load_buffer_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
- evalin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+/* %if-c-only */
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
(yy_hold_char) = *(yy_c_buf_p);
}
* @return the allocated buffer state.
*/
/* %if-c-only */
- YY_BUFFER_STATE eval_create_buffer (FILE * file, int size )
+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
/* %endif */
/* %if-c++-only */
/* %endif */
{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) evalalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in eval_create_buffer()" );
+ 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 *) evalalloc(b->yy_buf_size + 2 );
+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in eval_create_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
b->yy_is_our_buffer = 1;
- eval_init_buffer(b,file );
+ yy_init_buffer( b, file );
return b;
}
+/* %if-c++-only */
+/* %endif */
+
/** Destroy the buffer.
- * @param b a buffer created with eval_create_buffer()
+ * @param b a buffer created with yy_create_buffer()
*
*/
/* %if-c-only */
- void eval_delete_buffer (YY_BUFFER_STATE b )
+ void yy_delete_buffer (YY_BUFFER_STATE b )
/* %endif */
/* %if-c++-only */
/* %endif */
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
if ( b->yy_is_our_buffer )
- evalfree((void *) b->yy_ch_buf );
+ yyfree( (void *) b->yy_ch_buf );
- evalfree((void *) b );
+ yyfree( (void *) b );
}
-/* %if-c-only */
-
-#ifndef __cplusplus
-extern int isatty (int );
-#endif /* __cplusplus */
-
-/* %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 evalrestart() or at EOF.
+ * such as during a yyrestart() or at EOF.
*/
/* %if-c-only */
- static void eval_init_buffer (YY_BUFFER_STATE b, FILE * file )
+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
/* %endif */
/* %if-c++-only */
/* %endif */
{
int oerrno = errno;
- eval_flush_buffer(b );
+ yy_flush_buffer( b );
+/* %if-c-only */
b->yy_input_file = file;
+/* %endif */
+/* %if-c++-only */
+/* %endif */
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then eval_init_buffer was _probably_
- * called from evalrestart() or through yy_get_next_buffer.
+ /* 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){
*
*/
/* %if-c-only */
- void eval_flush_buffer (YY_BUFFER_STATE b )
+ void yy_flush_buffer (YY_BUFFER_STATE b )
/* %endif */
/* %if-c++-only */
/* %endif */
b->yy_buffer_status = YY_BUFFER_NEW;
if ( b == YY_CURRENT_BUFFER )
- eval_load_buffer_state( );
+ yy_load_buffer_state( );
}
/* %if-c-or-c++ */
*
*/
/* %if-c-only */
-void evalpush_buffer_state (YY_BUFFER_STATE new_buffer )
+void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
/* %endif */
/* %if-c++-only */
/* %endif */
if (new_buffer == NULL)
return;
- evalensure_buffer_stack();
+ yyensure_buffer_stack();
- /* This block is copied from eval_switch_to_buffer. */
+ /* This block is copied from yy_switch_to_buffer. */
if ( YY_CURRENT_BUFFER )
{
/* Flush out information for old buffer. */
(yy_buffer_stack_top)++;
YY_CURRENT_BUFFER_LVALUE = new_buffer;
- /* copied from eval_switch_to_buffer. */
- eval_load_buffer_state( );
+ /* copied from yy_switch_to_buffer. */
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
/* %endif */
*
*/
/* %if-c-only */
-void evalpop_buffer_state (void)
+void yypop_buffer_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
if (!YY_CURRENT_BUFFER)
return;
- eval_delete_buffer(YY_CURRENT_BUFFER );
+ 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) {
- eval_load_buffer_state( );
+ yy_load_buffer_state( );
(yy_did_buffer_switch_on_eof) = 1;
}
}
* Guarantees space for at least one push.
*/
/* %if-c-only */
-static void evalensure_buffer_stack (void)
+static void yyensure_buffer_stack (void)
/* %endif */
/* %if-c++-only */
/* %endif */
* 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**)evalalloc
+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in evalensure_buffer_stack()" );
-
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
/* Increase the buffer to prepare for a possible push. */
- int grow_size = 8 /* arbitrary grow size */;
+ yy_size_t grow_size = 8 /* arbitrary grow size */;
num_to_alloc = (yy_buffer_stack_max) + grow_size;
- (yy_buffer_stack) = (struct yy_buffer_state**)evalrealloc
+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
if ( ! (yy_buffer_stack) )
- YY_FATAL_ERROR( "out of dynamic memory in evalensure_buffer_stack()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
* @param base the character buffer
* @param size the size in bytes of the character buffer
*
- * @return the newly allocated buffer state object.
+ * @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE eval_scan_buffer (char * base, yy_size_t size )
+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
/* They forgot to leave room for the EOB's. */
- return 0;
+ return NULL;
- b = (YY_BUFFER_STATE) evalalloc(sizeof( struct yy_buffer_state ) );
+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in eval_scan_buffer()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
+ b->yy_input_file = NULL;
b->yy_n_chars = b->yy_buf_size;
b->yy_is_interactive = 0;
b->yy_at_bol = 1;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- eval_switch_to_buffer(b );
+ yy_switch_to_buffer( b );
return b;
}
/* %endif */
/* %if-c-only */
-/** Setup the input buffer state to scan a string. The next call to evallex() will
+/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
- * eval_scan_bytes() instead.
+ * yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE eval_scan_string (yyconst char * yystr )
+YY_BUFFER_STATE yy_scan_string (const char * yystr )
{
- return eval_scan_bytes(yystr,strlen(yystr) );
+ return yy_scan_bytes( yystr, (int) strlen(yystr) );
}
/* %endif */
/* %if-c-only */
-/** Setup the input buffer state to scan the given bytes. The next call to evallex() will
+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE eval_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n, i;
+ yy_size_t n;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = _yybytes_len + 2;
- buf = (char *) evalalloc(n );
+ n = (yy_size_t) (_yybytes_len + 2);
+ buf = (char *) yyalloc( n );
if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in eval_scan_bytes()" );
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
for ( i = 0; i < _yybytes_len; ++i )
buf[i] = yybytes[i];
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
- b = eval_scan_buffer(buf,n );
+ b = yy_scan_buffer( buf, n );
if ( ! b )
- YY_FATAL_ERROR( "bad buffer in eval_scan_bytes()" );
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
/* It's okay to grow etc. this buffer, and we should throw it
* away when we're done.
#endif
/* %if-c-only */
-static void yy_fatal_error (yyconst char* msg )
+static void yynoreturn yy_fatal_error (const char* msg )
{
- (void) fprintf( stderr, "%s\n", msg );
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* %endif */
#define yyless(n) \
do \
{ \
- /* Undo effects of setting up evaltext. */ \
+ /* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
- evaltext[evalleng] = (yy_hold_char); \
- (yy_c_buf_p) = evaltext + 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'; \
- evalleng = yyless_macro_arg; \
+ yyleng = yyless_macro_arg; \
} \
while ( 0 )
/** Get the current line number.
*
*/
-int evalget_lineno (void)
+int yyget_lineno (void)
{
-
- return evallineno;
+
+ return yylineno;
}
/** Get the input stream.
*
*/
-FILE *evalget_in (void)
+FILE *yyget_in (void)
{
- return evalin;
+ return yyin;
}
/** Get the output stream.
*
*/
-FILE *evalget_out (void)
+FILE *yyget_out (void)
{
- return evalout;
+ return yyout;
}
/** Get the length of the current token.
*
*/
-yy_size_t evalget_leng (void)
+int yyget_leng (void)
{
- return evalleng;
+ return yyleng;
}
/** Get the current token.
*
*/
-char *evalget_text (void)
+char *yyget_text (void)
{
- return evaltext;
+ return yytext;
}
/* %if-reentrant */
/* %endif */
/** Set the current line number.
- * @param line_number
+ * @param _line_number line number
*
*/
-void evalset_lineno (int line_number )
+void yyset_lineno (int _line_number )
{
- evallineno = line_number;
+ yylineno = _line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
*
- * @see eval_switch_to_buffer
+ * @see yy_switch_to_buffer
*/
-void evalset_in (FILE * in_str )
+void yyset_in (FILE * _in_str )
{
- evalin = in_str ;
+ yyin = _in_str ;
}
-void evalset_out (FILE * out_str )
+void yyset_out (FILE * _out_str )
{
- evalout = out_str ;
+ yyout = _out_str ;
}
-int evalget_debug (void)
+int yyget_debug (void)
{
- return eval_flex_debug;
+ return yy_flex_debug;
}
-void evalset_debug (int bdebug )
+void yyset_debug (int _bdebug )
{
- eval_flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
/* %endif */
static int yy_init_globals (void)
{
/* Initialization is the same as for the non-reentrant scanner.
- * This function is called from evallex_destroy(), so don't allocate here.
+ * This function is called from yylex_destroy(), so don't allocate here.
*/
- /* We do not touch evallineno unless the option is enabled. */
- evallineno = 1;
+ /* We do not touch yylineno unless the option is enabled. */
+ yylineno = 1;
- (yy_buffer_stack) = 0;
+ (yy_buffer_stack) = NULL;
(yy_buffer_stack_top) = 0;
(yy_buffer_stack_max) = 0;
- (yy_c_buf_p) = (char *) 0;
+ (yy_c_buf_p) = NULL;
(yy_init) = 0;
(yy_start) = 0;
/* Defined in main.c */
#ifdef YY_STDINIT
- evalin = stdin;
- evalout = stdout;
+ yyin = stdin;
+ yyout = stdout;
#else
- evalin = (FILE *) 0;
- evalout = (FILE *) 0;
+ yyin = NULL;
+ yyout = NULL;
#endif
/* For future reference: Set errno on error, since we are called by
- * evallex_init()
+ * yylex_init()
*/
return 0;
}
/* %endif */
/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
-/* evallex_destroy is for both reentrant and non-reentrant scanners. */
-int evallex_destroy (void)
+/* yylex_destroy is for both reentrant and non-reentrant scanners. */
+int yylex_destroy (void)
{
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
- eval_delete_buffer(YY_CURRENT_BUFFER );
+ yy_delete_buffer( YY_CURRENT_BUFFER );
YY_CURRENT_BUFFER_LVALUE = NULL;
- evalpop_buffer_state();
+ yypop_buffer_state();
}
/* Destroy the stack itself. */
- evalfree((yy_buffer_stack) );
+ yyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
/* Reset the globals. This is important in a non-reentrant scanner so the next time
- * evallex() is called, initialization will occur. */
+ * yylex() is called, initialization will occur. */
yy_init_globals( );
/* %if-reentrant */
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
- register int i;
+
+ 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 )
+static int yy_flex_strlen (const char * s )
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
}
#endif
-void *evalalloc (yy_size_t size )
+void *yyalloc (yy_size_t size )
{
- return (void *) malloc( size );
+ return malloc(size);
}
-void *evalrealloc (void * ptr, yy_size_t size )
+void *yyrealloc (void * ptr, yy_size_t size )
{
+
/* The cast to (char *) in the following accommodates both
* implementations that use char* generic pointers, and those
* that use void* generic pointers. It works with the latter
* any pointer type to void*, and deal with argument conversions
* as though doing an assignment.
*/
- return (void *) realloc( (char *) ptr, size );
+ return realloc(ptr, size);
}
-void evalfree (void * ptr )
+void yyfree (void * ptr )
{
- free( (char *) ptr ); /* see evalrealloc() for (char *) cast */
+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
}
/* %if-tables-serialization definitions */
/* %ok-for-header */
-#line 235 "lexer.ll"
-
+#line 236 "lexer.ll"
using namespace isc::eval;