Blame src/flex.skl

Packit f00812
%# -*-C-*- vi: set ft=c:
Packit f00812
%# This file is processed in several stages.
Packit f00812
%# Here are the stages, as best as I can describe:
Packit f00812
%#
Packit f00812
%#   1. flex.skl is processed through GNU m4 during the
Packit f00812
%#      pre-compilation stage of flex. Only macros starting
Packit f00812
%#      with `m4preproc_' are processed, and quoting is normal.
Packit f00812
%#
Packit f00812
%#   2. The preprocessed skeleton is translated verbatim into a
Packit f00812
%#      C array, saved as "skel.c" and compiled into the flex binary.
Packit f00812
%#
Packit f00812
%#   3. At runtime, the skeleton is generated and filtered (again)
Packit f00812
%#      through m4. Macros beginning with `m4_' will be processed.
Packit f00812
%#      The quoting is "[[" and "]]" so we don't interfere with
Packit f00812
%#      user code.
Packit f00812
%# 
Packit f00812
%# All generate macros for the m4 stage contain the text "m4" or "M4"
Packit f00812
%# in them. This is to distinguish them from CPP macros.
Packit f00812
%# The exception to this rule is YY_G, which is an m4 macro, 
Packit f00812
%# but it needs to be remain short because it is used everywhere.
Packit f00812
%#
Packit f00812
/* A lexical scanner generated by flex */
Packit f00812
Packit f00812
%#  Macros for preproc stage.
Packit f00812
m4preproc_changecom
Packit f00812
Packit f00812
%# Macros for runtime processing stage.
Packit f00812
m4_changecom
Packit f00812
m4_changequote
Packit f00812
m4_changequote([[, ]])
Packit f00812
Packit f00812
%# 
Packit f00812
%# Lines in this skeleton starting with a "%" character are "control lines"
Packit f00812
%# and affect the generation of the scanner. The possible control codes are
Packit f00812
%# listed and processed in misc.c.
Packit f00812
%#
Packit f00812
%#   %#  -  A comment. The current line is omitted from the generated scanner.
Packit f00812
%#   %if-c++-only  -  The following lines are printed for C++ scanners ONLY.
Packit f00812
%#   %if-c-only    -  The following lines are NOT printed for C++ scanners.
Packit f00812
%#   %if-c-or-c++  -  The following lines are printed in BOTH C and C++ scanners.
Packit f00812
%#   %if-reentrant     - Print for reentrant scanners.(push)
Packit f00812
%#   %if-not-reentrant - Print for non-reentrant scanners. (push)
Packit f00812
%#   %if-bison-bridge  - Print for bison-bridge. (push)
Packit f00812
%#   %if-not-bison-bridge  - Print for non-bison-bridge. (push)
Packit f00812
%#   %endif        - pop from the previous if code.
Packit f00812
%#   %%  -  A stop-point, where code is inserted by flex.
Packit f00812
%#          Each stop-point is numbered here and also in the code generator.
Packit f00812
%#          (See gen.c, etc. for details.)
Packit f00812
%#   %not-for-header  -  Begin code that should NOT appear in a ".h" file.
Packit f00812
%#   %ok-for-header   -  %c and %e are used for building a header file.
Packit f00812
%#   %if-tables-serialization
Packit f00812
%#
Packit f00812
%#   All control-lines EXCEPT comment lines ("%#") will be inserted into
Packit f00812
%#   the generated scanner as a C-style comment. This is to aid those who
Packit f00812
%#   edit the skeleton.
Packit f00812
%#
Packit f00812
Packit f00812
%not-for-header
Packit f00812
%if-c-only
Packit f00812
%if-not-reentrant
Packit f00812
m4_ifelse(M4_YY_PREFIX,yy,,
Packit f00812
#define yy_create_buffer M4_YY_PREFIX[[_create_buffer]]
Packit f00812
#define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]]
Packit f00812
#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]]
Packit f00812
#define yy_init_buffer M4_YY_PREFIX[[_init_buffer]]
Packit f00812
#define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]]
Packit f00812
#define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]]
Packit f00812
#define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]]
Packit f00812
#define yyin M4_YY_PREFIX[[in]]
Packit f00812
#define yyleng M4_YY_PREFIX[[leng]]
Packit f00812
#define yylex M4_YY_PREFIX[[lex]]
Packit f00812
#define yylineno M4_YY_PREFIX[[lineno]]
Packit f00812
#define yyout M4_YY_PREFIX[[out]]
Packit f00812
#define yyrestart M4_YY_PREFIX[[restart]]
Packit f00812
#define yytext M4_YY_PREFIX[[text]]
Packit f00812
#define yywrap M4_YY_PREFIX[[wrap]]
Packit f00812
#define yyalloc M4_YY_PREFIX[[alloc]]
Packit f00812
#define yyrealloc M4_YY_PREFIX[[realloc]]
Packit f00812
#define yyfree M4_YY_PREFIX[[free]]
Packit f00812
)
Packit f00812
%endif
Packit f00812
%endif
Packit f00812
%ok-for-header
Packit f00812
Packit f00812
#define FLEX_SCANNER
Packit f00812
#define YY_FLEX_MAJOR_VERSION FLEX_MAJOR_VERSION
Packit f00812
#define YY_FLEX_MINOR_VERSION FLEX_MINOR_VERSION
Packit f00812
#define YY_FLEX_SUBMINOR_VERSION FLEX_SUBMINOR_VERSION
Packit f00812
#if YY_FLEX_SUBMINOR_VERSION > 0
Packit f00812
#define FLEX_BETA
Packit f00812
#endif
Packit f00812
Packit f00812
%# Some negated symbols
Packit f00812
m4_ifdef( [[M4_YY_IN_HEADER]], , [[m4_define([[M4_YY_NOT_IN_HEADER]], [[]])]])
Packit f00812
m4_ifdef( [[M4_YY_REENTRANT]], , [[m4_define([[M4_YY_NOT_REENTRANT]], [[]])]])
Packit f00812
Packit f00812
%# This is the m4 way to say "(stack_used || is_reentrant)
Packit f00812
m4_ifdef( [[M4_YY_STACK_USED]], [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]])
Packit f00812
m4_ifdef( [[M4_YY_REENTRANT]],  [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]])
Packit f00812
Packit f00812
%# Prefixes.
Packit f00812
%# The complexity here is necessary so that m4 preserves
Packit f00812
%# the argument lists to each C function.
Packit f00812
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define([[M4_YY_PREFIX]], [[yy]])]])
Packit f00812
Packit f00812
m4preproc_define(`M4_GEN_PREFIX',
Packit f00812
    ``m4_define(yy[[$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
Packit f00812
Packit f00812
%if-c++-only
Packit f00812
    /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
Packit f00812
     * following macro. This is required in order to pass the c++-multiple-scanners
Packit f00812
     * test in the regression suite. We get reports that it breaks inheritance.
Packit f00812
     * We will address this in a future release of flex, or omit the C++ scanner
Packit f00812
     * altogether.
Packit f00812
     */
Packit f00812
    #define yyFlexLexer M4_YY_PREFIX[[FlexLexer]]
Packit f00812
%endif
Packit f00812
Packit f00812
%if-c-only
Packit f00812
    M4_GEN_PREFIX(`_create_buffer')
Packit f00812
    M4_GEN_PREFIX(`_delete_buffer')
Packit f00812
    M4_GEN_PREFIX(`_scan_buffer')
Packit f00812
    M4_GEN_PREFIX(`_scan_string')
Packit f00812
    M4_GEN_PREFIX(`_scan_bytes')
Packit f00812
    M4_GEN_PREFIX(`_init_buffer')
Packit f00812
    M4_GEN_PREFIX(`_flush_buffer')
Packit f00812
    M4_GEN_PREFIX(`_load_buffer_state')
Packit f00812
    M4_GEN_PREFIX(`_switch_to_buffer')
Packit f00812
    M4_GEN_PREFIX(`push_buffer_state')
Packit f00812
    M4_GEN_PREFIX(`pop_buffer_state')
Packit f00812
    M4_GEN_PREFIX(`ensure_buffer_stack')
Packit f00812
    M4_GEN_PREFIX(`lex')
Packit f00812
    M4_GEN_PREFIX(`restart')
Packit f00812
    M4_GEN_PREFIX(`lex_init')
Packit f00812
    M4_GEN_PREFIX(`lex_init_extra')
Packit f00812
    M4_GEN_PREFIX(`lex_destroy')
Packit f00812
    M4_GEN_PREFIX(`get_debug')
Packit f00812
    M4_GEN_PREFIX(`set_debug')
Packit f00812
    M4_GEN_PREFIX(`get_extra')
Packit f00812
    M4_GEN_PREFIX(`set_extra')
Packit f00812
    M4_GEN_PREFIX(`get_in')
Packit f00812
    M4_GEN_PREFIX(`set_in')
Packit f00812
    M4_GEN_PREFIX(`get_out')
Packit f00812
    M4_GEN_PREFIX(`set_out')
Packit f00812
    M4_GEN_PREFIX(`get_leng')
Packit f00812
    M4_GEN_PREFIX(`get_text')
Packit f00812
    M4_GEN_PREFIX(`get_lineno')
Packit f00812
    M4_GEN_PREFIX(`set_lineno')
Packit f00812
    m4_ifdef( [[M4_YY_REENTRANT]],
Packit f00812
    [[
Packit f00812
        M4_GEN_PREFIX(`get_column')
Packit f00812
        M4_GEN_PREFIX(`set_column')
Packit f00812
    ]])
Packit f00812
    M4_GEN_PREFIX(`wrap')
Packit f00812
%endif
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_BISON_LVAL]],
Packit f00812
[[
Packit f00812
    M4_GEN_PREFIX(`get_lval')
Packit f00812
    M4_GEN_PREFIX(`set_lval')
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[<M4_YY_BISON_LLOC>]],
Packit f00812
[[
Packit f00812
    M4_GEN_PREFIX(`get_lloc')
Packit f00812
    M4_GEN_PREFIX(`set_lloc')
Packit f00812
]])
Packit f00812
Packit f00812
Packit f00812
    M4_GEN_PREFIX(`alloc')
Packit f00812
    M4_GEN_PREFIX(`realloc')
Packit f00812
    M4_GEN_PREFIX(`free')
Packit f00812
Packit f00812
%if-c-only
Packit f00812
m4_ifdef( [[M4_YY_NOT_REENTRANT]],
Packit f00812
[[
Packit f00812
    M4_GEN_PREFIX(`text')
Packit f00812
    M4_GEN_PREFIX(`leng')
Packit f00812
    M4_GEN_PREFIX(`in')
Packit f00812
    M4_GEN_PREFIX(`out')
Packit f00812
    M4_GEN_PREFIX(`_flex_debug')
Packit f00812
    M4_GEN_PREFIX(`lineno')
Packit f00812
]])
Packit f00812
%endif
Packit f00812
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],
Packit f00812
[[
Packit f00812
    M4_GEN_PREFIX(`tables_fload')
Packit f00812
    M4_GEN_PREFIX(`tables_destroy')
Packit f00812
    M4_GEN_PREFIX(`TABLES_NAME')
Packit f00812
]])
Packit f00812
Packit f00812
/* First, we deal with  platform-specific or compiler-specific issues. */
Packit f00812
Packit f00812
/* begin standard C headers. */
Packit f00812
%if-c-only
Packit f00812
#include <stdio.h>
Packit f00812
#include <string.h>
Packit f00812
#include <errno.h>
Packit f00812
#include <stdlib.h>
Packit f00812
%endif
Packit f00812
Packit f00812
%if-tables-serialization
Packit f00812
#include <sys/types.h>
Packit f00812
#include <netinet/in.h>
Packit f00812
%endif
Packit f00812
/* end standard C headers. */
Packit f00812
Packit f00812
%if-c-or-c++
Packit f00812
m4preproc_include(`flexint.h')
Packit f00812
%endif
Packit f00812
Packit f00812
%if-c++-only
Packit f00812
/* begin standard C++ headers. */
Packit f00812
#include <iostream> 
Packit f00812
#include <errno.h>
Packit f00812
#include <cstdlib>
Packit f00812
#include <cstdio>
Packit f00812
#include <cstring>
Packit f00812
/* end standard C++ headers. */
Packit f00812
%endif
Packit f00812
Packit f00812
/* TODO: this is always defined, so inline it */
Packit f00812
#define yyconst const
Packit f00812
Packit f00812
#if defined(__GNUC__) && __GNUC__ >= 3
Packit f00812
#define yynoreturn __attribute__((__noreturn__))
Packit f00812
#else
Packit f00812
#define yynoreturn
Packit f00812
#endif
Packit f00812
Packit f00812
%# For compilers that can not handle prototypes.
Packit f00812
%# e.g.,
Packit f00812
%# The function prototype
Packit f00812
%#    int foo(int x, char* y);
Packit f00812
%# 
Packit f00812
%# ...should be written as
Packit f00812
%#    int foo M4_YY_PARAMS(int x, char* y);
Packit f00812
%# 
Packit f00812
%# ...which could possibly generate
Packit f00812
%#    int foo ();
Packit f00812
%# 
Packit f00812
m4_ifdef( [[M4_YY_NO_ANSI_FUNC_PROTOS]],
Packit f00812
[[
Packit f00812
    m4_define( [[M4_YY_PARAMS]], [[()]])
Packit f00812
]],
Packit f00812
[[
Packit f00812
    m4_define( [[M4_YY_PARAMS]], [[($*)]])
Packit f00812
]])
Packit f00812
Packit f00812
%not-for-header
Packit f00812
/* Returned upon end-of-file. */
Packit f00812
#define YY_NULL 0
Packit f00812
%ok-for-header
Packit f00812
Packit f00812
%not-for-header
Packit f00812
/* Promotes a possibly negative, possibly signed char to an unsigned
Packit f00812
 * integer for use as an array index.  If the signed char is negative,
Packit f00812
 * we want to instead treat it as an 8-bit unsigned char, hence the
Packit f00812
 * double cast.
Packit f00812
 */
Packit f00812
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
Packit f00812
%ok-for-header
Packit f00812
Packit f00812
Packit f00812
Packit f00812
%if-reentrant
Packit f00812
Packit f00812
/* An opaque pointer. */
Packit f00812
#ifndef YY_TYPEDEF_YY_SCANNER_T
Packit f00812
#define YY_TYPEDEF_YY_SCANNER_T
Packit f00812
typedef void* yyscan_t;
Packit f00812
#endif
Packit f00812
Packit f00812
%# Declare yyguts variable
Packit f00812
m4_define( [[M4_YY_DECL_GUTS_VAR]], [[struct yyguts_t * yyg = (struct yyguts_t*)yyscanner]])
Packit f00812
%# Perform a noop access on yyguts to prevent unused variable complains
Packit f00812
m4_define( [[M4_YY_NOOP_GUTS_VAR]], [[(void)yyg]])
Packit f00812
%# For use wherever a Global is accessed or assigned.
Packit f00812
m4_define( [[YY_G]], [[yyg->$1]])
Packit f00812
Packit f00812
%# For use in function prototypes to append the additional argument.
Packit f00812
m4_define( [[M4_YY_PROTO_LAST_ARG]],  [[, yyscan_t yyscanner]])
Packit f00812
m4_define( [[M4_YY_PROTO_ONLY_ARG]],  [[yyscan_t yyscanner]])
Packit f00812
Packit f00812
%# For use in function definitions to append the additional argument.
Packit f00812
m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],
Packit f00812
[[
Packit f00812
    m4_define( [[M4_YY_DEF_LAST_ARG]], [[, yyscanner]])
Packit f00812
    m4_define( [[M4_YY_DEF_ONLY_ARG]], [[yyscanner]])
Packit f00812
]],
Packit f00812
[[
Packit f00812
    m4_define( [[M4_YY_DEF_LAST_ARG]],  [[, yyscan_t yyscanner]])
Packit f00812
    m4_define( [[M4_YY_DEF_ONLY_ARG]],  [[yyscan_t yyscanner]])
Packit f00812
]])
Packit f00812
m4_define( [[M4_YY_DECL_LAST_ARG]],  [[yyscan_t yyscanner;]])
Packit f00812
Packit f00812
%# For use in function calls to pass the additional argument.
Packit f00812
m4_define( [[M4_YY_CALL_LAST_ARG]], [[, yyscanner]])
Packit f00812
m4_define( [[M4_YY_CALL_ONLY_ARG]], [[yyscanner]])
Packit f00812
Packit f00812
%# For use in function documentation to adjust for additional argument.
Packit f00812
m4_define( [[M4_YY_DOC_PARAM]], [[@param yyscanner The scanner object.]])
Packit f00812
Packit f00812
/* For convenience, these vars (plus the bison vars far below)
Packit f00812
   are macros in the reentrant scanner. */
Packit f00812
#define yyin YY_G(yyin_r)
Packit f00812
#define yyout YY_G(yyout_r)
Packit f00812
#define yyextra YY_G(yyextra_r)
Packit f00812
#define yyleng YY_G(yyleng_r)
Packit f00812
#define yytext YY_G(yytext_r)
Packit f00812
#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
Packit f00812
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
Packit f00812
#define yy_flex_debug YY_G(yy_flex_debug_r)
Packit f00812
Packit f00812
m4_define( [[M4_YY_INCR_LINENO]],
Packit f00812
[[   
Packit f00812
    do{ yylineno++;
Packit f00812
        yycolumn=0;
Packit f00812
    }while(0)
Packit f00812
]])
Packit f00812
Packit f00812
%endif
Packit f00812
Packit f00812
Packit f00812
Packit f00812
%if-not-reentrant
Packit f00812
Packit f00812
m4_define( [[M4_YY_INCR_LINENO]],
Packit f00812
[[   
Packit f00812
    yylineno++;
Packit f00812
]])
Packit f00812
Packit f00812
%# Define these macros to be no-ops.
Packit f00812
m4_define( [[M4_YY_DECL_GUTS_VAR]], [[m4_dnl]])
Packit f00812
m4_define( [[M4_YY_NOOP_GUTS_VAR]], [[m4_dnl]])
Packit f00812
m4_define( [[YY_G]], [[($1)]])
Packit f00812
m4_define( [[M4_YY_PROTO_LAST_ARG]])
Packit f00812
m4_define( [[M4_YY_PROTO_ONLY_ARG]],  [[void]])
Packit f00812
m4_define( [[M4_YY_DEF_LAST_ARG]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],
Packit f00812
[[
Packit f00812
    m4_define( [[M4_YY_DEF_ONLY_ARG]])
Packit f00812
]],
Packit f00812
[[
Packit f00812
    m4_define( [[M4_YY_DEF_ONLY_ARG]],  [[void]])
Packit f00812
]])
Packit f00812
m4_define([[M4_YY_DECL_LAST_ARG]])
Packit f00812
m4_define([[M4_YY_CALL_LAST_ARG]])
Packit f00812
m4_define([[M4_YY_CALL_ONLY_ARG]])
Packit f00812
m4_define( [[M4_YY_DOC_PARAM]], [[]])
Packit f00812
Packit f00812
%endif
Packit f00812
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],
Packit f00812
[[
Packit f00812
%# For compilers that need traditional function definitions.
Packit f00812
%# e.g.,
Packit f00812
%# The function prototype taking 2 arguments
Packit f00812
%#    int foo (int x, char* y)
Packit f00812
%#
Packit f00812
%# ...should be written as
Packit f00812
%#    int foo YYFARGS2(int,x, char*,y)
Packit f00812
%#
Packit f00812
%# ...which could possibly generate
Packit f00812
%#    int foo (x,y,yyscanner)
Packit f00812
%#        int x;
Packit f00812
%#        char * y;
Packit f00812
%#        yyscan_t yyscanner;
Packit f00812
%#
Packit f00812
%# Generate traditional function defs
Packit f00812
    m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG) [[\]]
Packit f00812
        M4_YY_DECL_LAST_ARG]])
Packit f00812
    m4_define( [[YYFARGS1]], [[($2 M4_YY_DEF_LAST_ARG) [[\]]
Packit f00812
        $1 $2; [[\]]
Packit f00812
        M4_YY_DECL_LAST_ARG]])
Packit f00812
    m4_define( [[YYFARGS2]], [[($2,$4 M4_YY_DEF_LAST_ARG) [[\]]
Packit f00812
        $1 $2; [[\]]
Packit f00812
        $3 $4; [[\]]
Packit f00812
        M4_YY_DECL_LAST_ARG]])
Packit f00812
    m4_define( [[YYFARGS3]], [[($2,$4,$6 M4_YY_DEF_LAST_ARG) [[\]]
Packit f00812
        $1 $2; [[\]]
Packit f00812
        $3 $4; [[\]]
Packit f00812
        $5 $6; [[\]]
Packit f00812
        M4_YY_DECL_LAST_ARG]])
Packit f00812
]],
Packit f00812
[[
Packit f00812
%# Generate C99 function defs.
Packit f00812
    m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG)]])
Packit f00812
    m4_define( [[YYFARGS1]], [[($1 $2 M4_YY_DEF_LAST_ARG)]])
Packit f00812
    m4_define( [[YYFARGS2]], [[($1 $2, $3 $4 M4_YY_DEF_LAST_ARG)]])
Packit f00812
    m4_define( [[YYFARGS3]], [[($1 $2, $3 $4, $5 $6 M4_YY_DEF_LAST_ARG)]])
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* Enter a start condition.  This macro really ought to take a parameter,
Packit f00812
 * but we do it the disgusting crufty way forced on us by the ()-less
Packit f00812
 * definition of BEGIN.
Packit f00812
 */
Packit f00812
#define BEGIN YY_G(yy_start) = 1 + 2 *
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* Translate the current start state into a value that can be later handed
Packit f00812
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
Packit f00812
 * compatibility.
Packit f00812
 */
Packit f00812
#define YY_START ((YY_G(yy_start) - 1) / 2)
Packit f00812
#define YYSTATE YY_START
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* Action number for EOF rule of a given start state. */
Packit f00812
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* Special action meaning "start processing a new file". */
Packit f00812
#define YY_NEW_FILE yyrestart( yyin M4_YY_CALL_LAST_ARG )
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
#define YY_END_OF_BUFFER_CHAR 0
Packit f00812
]])
Packit f00812
Packit f00812
/* Size of default input buffer. */
Packit f00812
#ifndef YY_BUF_SIZE
Packit f00812
#ifdef __ia64__
Packit f00812
/* On IA-64, the buffer size is 16k, not 8k.
Packit f00812
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
Packit f00812
 * Ditto for the __ia64__ case accordingly.
Packit f00812
 */
Packit f00812
#define YY_BUF_SIZE 32768
Packit f00812
#else
Packit f00812
#define YY_BUF_SIZE 16384
Packit f00812
#endif /* __ia64__ */
Packit f00812
#endif
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* The state buf must be large enough to hold one state per character in the main buffer.
Packit f00812
 */
Packit f00812
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
Packit f00812
]])
Packit f00812
Packit f00812
Packit f00812
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
Packit f00812
#define YY_TYPEDEF_YY_BUFFER_STATE
Packit f00812
typedef struct yy_buffer_state *YY_BUFFER_STATE;
Packit f00812
#endif
Packit f00812
Packit f00812
#ifndef YY_TYPEDEF_YY_SIZE_T
Packit f00812
#define YY_TYPEDEF_YY_SIZE_T
Packit f00812
typedef size_t yy_size_t;
Packit f00812
#endif
Packit f00812
Packit f00812
%if-not-reentrant
Packit f00812
extern int yyleng;
Packit f00812
%endif
Packit f00812
Packit f00812
%if-c-only
Packit f00812
%if-not-reentrant
Packit f00812
extern FILE *yyin, *yyout;
Packit f00812
%endif
Packit f00812
%endif
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
#define EOB_ACT_CONTINUE_SCAN 0
Packit f00812
#define EOB_ACT_END_OF_FILE 1
Packit f00812
#define EOB_ACT_LAST_MATCH 2
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
    m4_ifdef( [[M4_YY_USE_LINENO]],
Packit f00812
    [[
Packit f00812
    /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
Packit f00812
     *       access to the local variable yy_act. Since yyless() is a macro, it would break
Packit f00812
     *       existing scanners that call yyless() from OUTSIDE yylex. 
Packit f00812
     *       One obvious solution it to make yy_act a global. I tried that, and saw
Packit f00812
     *       a 5% performance hit in a non-yylineno scanner, because yy_act is
Packit f00812
     *       normally declared as a register variable-- so it is not worth it.
Packit f00812
     */
Packit f00812
    #define  YY_LESS_LINENO(n) \
Packit f00812
            do { \
Packit Service dc8f40
                yy_size_t yyl;\
Packit f00812
                for ( yyl = n; yyl < yyleng; ++yyl )\
Packit f00812
                    if ( yytext[yyl] == '\n' )\
Packit f00812
                        --yylineno;\
Packit f00812
            }while(0)
Packit f00812
    #define YY_LINENO_REWIND_TO(dst) \
Packit f00812
            do {\
Packit f00812
                const char *p;\
Packit f00812
                for ( p = yy_cp-1; p >= (dst); --p)\
Packit f00812
                    if ( *p == '\n' )\
Packit f00812
                        --yylineno;\
Packit f00812
            }while(0)
Packit f00812
    ]],
Packit f00812
    [[
Packit f00812
    #define YY_LESS_LINENO(n)
Packit f00812
    #define YY_LINENO_REWIND_TO(ptr)
Packit f00812
    ]])
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* Return all but the first "n" matched characters back to the input stream. */
Packit f00812
#define yyless(n) \
Packit f00812
	do \
Packit f00812
		{ \
Packit f00812
		/* Undo effects of setting up yytext. */ \
Packit Service dc8f40
        yy_size_t yyless_macro_arg = (n); \
Packit f00812
        YY_LESS_LINENO(yyless_macro_arg);\
Packit f00812
		*yy_cp = YY_G(yy_hold_char); \
Packit f00812
		YY_RESTORE_YY_MORE_OFFSET \
Packit f00812
		YY_G(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
Packit f00812
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
Packit f00812
		} \
Packit f00812
	while ( 0 )
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
#define unput(c) yyunput( c, YY_G(yytext_ptr) M4_YY_CALL_LAST_ARG )
Packit f00812
]])
Packit f00812
Packit f00812
#ifndef YY_STRUCT_YY_BUFFER_STATE
Packit f00812
#define YY_STRUCT_YY_BUFFER_STATE
Packit f00812
struct yy_buffer_state
Packit f00812
	{
Packit f00812
%if-c-only
Packit f00812
	FILE *yy_input_file;
Packit f00812
%endif
Packit f00812
Packit f00812
%if-c++-only
Packit f00812
	std::streambuf* yy_input_file; 
Packit f00812
%endif
Packit f00812
Packit f00812
Packit f00812
	char *yy_ch_buf;		/* input buffer */
Packit f00812
	char *yy_buf_pos;		/* current position in input buffer */
Packit f00812
Packit f00812
	/* Size of input buffer in bytes, not including room for EOB
Packit f00812
	 * characters.
Packit f00812
	 */
Packit f00812
	int yy_buf_size;
Packit f00812
Packit f00812
	/* Number of characters read into yy_ch_buf, not including EOB
Packit f00812
	 * characters.
Packit f00812
	 */
Packit f00812
	int yy_n_chars;
Packit f00812
Packit f00812
	/* Whether we "own" the buffer - i.e., we know we created it,
Packit f00812
	 * and can realloc() it to grow it, and should free() it to
Packit f00812
	 * delete it.
Packit f00812
	 */
Packit f00812
	int yy_is_our_buffer;
Packit f00812
Packit f00812
	/* Whether this is an "interactive" input source; if so, and
Packit f00812
	 * if we're using stdio for input, then we want to use getc()
Packit f00812
	 * instead of fread(), to make sure we stop fetching input after
Packit f00812
	 * each newline.
Packit f00812
	 */
Packit f00812
	int yy_is_interactive;
Packit f00812
Packit f00812
	/* Whether we're considered to be at the beginning of a line.
Packit f00812
	 * If so, '^' rules will be active on the next match, otherwise
Packit f00812
	 * not.
Packit f00812
	 */
Packit f00812
	int yy_at_bol;
Packit f00812
Packit f00812
    int yy_bs_lineno; /**< The line count. */
Packit f00812
    int yy_bs_column; /**< The column count. */
Packit f00812
    
Packit f00812
Packit f00812
	/* Whether to try to fill the input buffer when we reach the
Packit f00812
	 * end of it.
Packit f00812
	 */
Packit f00812
	int yy_fill_buffer;
Packit f00812
Packit f00812
	int yy_buffer_status;
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
#define YY_BUFFER_NEW 0
Packit f00812
#define YY_BUFFER_NORMAL 1
Packit f00812
	/* When an EOF's been seen but there's still some text to process
Packit f00812
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
Packit f00812
	 * shouldn't try reading from the input source any more.  We might
Packit f00812
	 * still have a bunch of tokens to match, though, because of
Packit f00812
	 * possible backing-up.
Packit f00812
	 *
Packit f00812
	 * When we actually see the EOF, we change the status to "new"
Packit f00812
	 * (via yyrestart()), so that the user can continue scanning by
Packit f00812
	 * just pointing yyin at a new input file.
Packit f00812
	 */
Packit f00812
#define YY_BUFFER_EOF_PENDING 2
Packit f00812
]])
Packit f00812
	};
Packit f00812
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
Packit f00812
Packit f00812
%if-c-only Standard (non-C++) definition
Packit f00812
%not-for-header
Packit f00812
%if-not-reentrant
Packit f00812
Packit f00812
/* Stack of input buffers. */
Packit f00812
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
Packit f00812
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
Packit f00812
static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
Packit f00812
%endif
Packit f00812
%ok-for-header
Packit f00812
%endif
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* We provide macros for accessing buffer states in case in the
Packit f00812
 * future we want to put the buffer states in a more general
Packit f00812
 * "scanner state".
Packit f00812
 *
Packit f00812
 * Returns the top of the stack, or NULL.
Packit f00812
 */
Packit f00812
#define YY_CURRENT_BUFFER ( YY_G(yy_buffer_stack) \
Packit f00812
                          ? YY_G(yy_buffer_stack)[YY_G(yy_buffer_stack_top)] \
Packit f00812
                          : NULL)
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* Same as previous macro, but useful when we know that the buffer stack is not
Packit f00812
 * NULL or when we need an lvalue. For internal use only.
Packit f00812
 */
Packit f00812
#define YY_CURRENT_BUFFER_LVALUE YY_G(yy_buffer_stack)[YY_G(yy_buffer_stack_top)]
Packit f00812
]])
Packit f00812
Packit f00812
%if-c-only Standard (non-C++) definition
Packit f00812
Packit f00812
%if-not-reentrant
Packit f00812
%not-for-header
Packit f00812
/* yy_hold_char holds the character lost when yytext is formed. */
Packit f00812
static char yy_hold_char;
Packit f00812
static int yy_n_chars;		/* number of characters read into yy_ch_buf */
Packit f00812
int yyleng;
Packit f00812
Packit f00812
/* Points to current character in buffer. */
Packit f00812
static char *yy_c_buf_p = NULL;
Packit f00812
static int yy_init = 0;		/* whether we need to initialize */
Packit f00812
static int yy_start = 0;	/* start state number */
Packit f00812
Packit f00812
/* Flag which is used to allow yywrap()'s to do buffer switches
Packit f00812
 * instead of setting up a fresh yyin.  A bit of a hack ...
Packit f00812
 */
Packit f00812
static int yy_did_buffer_switch_on_eof;
Packit f00812
%ok-for-header
Packit f00812
%endif
Packit f00812
Packit f00812
void yyrestart M4_YY_PARAMS( FILE *input_file M4_YY_PROTO_LAST_ARG );
Packit f00812
void yy_switch_to_buffer M4_YY_PARAMS( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG );
Packit f00812
YY_BUFFER_STATE yy_create_buffer M4_YY_PARAMS( FILE *file, int size M4_YY_PROTO_LAST_ARG );
Packit f00812
void yy_delete_buffer M4_YY_PARAMS( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG );
Packit f00812
void yy_flush_buffer M4_YY_PARAMS( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG );
Packit f00812
void yypush_buffer_state M4_YY_PARAMS( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG );
Packit f00812
void yypop_buffer_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
static void yyensure_buffer_stack M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
static void yy_load_buffer_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
static void yy_init_buffer M4_YY_PARAMS( YY_BUFFER_STATE b, FILE *file M4_YY_PROTO_LAST_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG)
Packit f00812
]])
Packit f00812
Packit f00812
YY_BUFFER_STATE yy_scan_buffer M4_YY_PARAMS( char *base, yy_size_t size M4_YY_PROTO_LAST_ARG );
Packit f00812
YY_BUFFER_STATE yy_scan_string M4_YY_PARAMS( yyconst char *yy_str M4_YY_PROTO_LAST_ARG );
Packit f00812
YY_BUFFER_STATE yy_scan_bytes M4_YY_PARAMS( yyconst char *bytes, int len M4_YY_PROTO_LAST_ARG );
Packit f00812
Packit f00812
%endif
Packit f00812
Packit f00812
void *yyalloc M4_YY_PARAMS( yy_size_t M4_YY_PROTO_LAST_ARG );
Packit f00812
void *yyrealloc M4_YY_PARAMS( void *, yy_size_t M4_YY_PROTO_LAST_ARG );
Packit f00812
void yyfree M4_YY_PARAMS( void * M4_YY_PROTO_LAST_ARG );
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
#define yy_new_buffer yy_create_buffer
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
#define yy_set_interactive(is_interactive) \
Packit f00812
	{ \
Packit f00812
	if ( ! YY_CURRENT_BUFFER ){ \
Packit f00812
        yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); \
Packit f00812
		YY_CURRENT_BUFFER_LVALUE =    \
Packit f00812
            yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); \
Packit f00812
	} \
Packit f00812
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
Packit f00812
	}
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
#define yy_set_bol(at_bol) \
Packit f00812
	{ \
Packit f00812
	if ( ! YY_CURRENT_BUFFER ){\
Packit f00812
        yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); \
Packit f00812
		YY_CURRENT_BUFFER_LVALUE =    \
Packit f00812
            yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); \
Packit f00812
	} \
Packit f00812
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
Packit f00812
	}
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
Packit f00812
]])
Packit f00812
Packit f00812
%% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
%% [1.5] DFA
Packit f00812
]])
Packit f00812
Packit f00812
%if-c-only Standard (non-C++) definition
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
static yy_state_type yy_get_previous_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
static yy_state_type yy_try_NUL_trans M4_YY_PARAMS( yy_state_type current_state  M4_YY_PROTO_LAST_ARG);
Packit f00812
static int yy_get_next_buffer M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
static void yynoreturn yy_fatal_error M4_YY_PARAMS( yyconst char* msg M4_YY_PROTO_LAST_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
%endif
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* Done after the current pattern has been matched and before the
Packit f00812
 * corresponding action - sets up yytext.
Packit f00812
 */
Packit f00812
#define YY_DO_BEFORE_ACTION \
Packit f00812
	YY_G(yytext_ptr) = yy_bp; \
Packit f00812
%% [2.0] code to fiddle yytext and yyleng for yymore() goes here \
Packit f00812
	YY_G(yy_hold_char) = *yy_cp; \
Packit f00812
	*yy_cp = '\0'; \
Packit f00812
%% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \
Packit f00812
	YY_G(yy_c_buf_p) = yy_cp;
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
%% [4.0] data tables for the DFA and the user's section 1 definitions go here
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_IN_HEADER]], [[#ifdef YY_HEADER_EXPORT_START_CONDITIONS]])
Packit f00812
M4_YY_SC_DEFS
Packit f00812
m4_ifdef( [[M4_YY_IN_HEADER]], [[#endif]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_UNISTD_H]],,
Packit f00812
[[
Packit f00812
#ifndef YY_NO_UNISTD_H
Packit f00812
/* Special case for "unistd.h", since it is non-ANSI. We include it way
Packit f00812
 * down here because we want the user's section 1 to have been scanned first.
Packit f00812
 * The user has a chance to override it with an option.
Packit f00812
 */
Packit f00812
%if-c-only
Packit f00812
#include <unistd.h>
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
#include <unistd.h>
Packit f00812
%endif
Packit f00812
#endif
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_EXTRA_TYPE_DEFS]],
Packit f00812
[[
Packit f00812
#define YY_EXTRA_TYPE M4_EXTRA_TYPE_DEFS
Packit f00812
]],
Packit f00812
[[
Packit f00812
#ifndef YY_EXTRA_TYPE
Packit f00812
#define YY_EXTRA_TYPE void *
Packit f00812
#endif
Packit f00812
]]
Packit f00812
)
Packit f00812
Packit f00812
%if-c-only Reentrant structure and macros (non-C++).
Packit f00812
%if-reentrant
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* Holds the entire state of the reentrant scanner. */
Packit f00812
struct yyguts_t
Packit f00812
    {
Packit f00812
Packit f00812
    /* User-defined. Not touched by flex. */
Packit f00812
    YY_EXTRA_TYPE yyextra_r;
Packit f00812
Packit f00812
    /* The rest are the same as the globals declared in the non-reentrant scanner. */
Packit f00812
    FILE *yyin_r, *yyout_r;
Packit f00812
    size_t yy_buffer_stack_top; /**< index of top of stack. */
Packit f00812
    size_t yy_buffer_stack_max; /**< capacity of stack. */
Packit f00812
    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
Packit f00812
    char yy_hold_char;
Packit f00812
    int yy_n_chars;
Packit f00812
    int yyleng_r;
Packit f00812
    char *yy_c_buf_p;
Packit f00812
    int yy_init;
Packit f00812
    int yy_start;
Packit f00812
    int yy_did_buffer_switch_on_eof;
Packit f00812
    int yy_start_stack_ptr;
Packit f00812
    int yy_start_stack_depth;
Packit f00812
    int *yy_start_stack;
Packit f00812
    yy_state_type yy_last_accepting_state;
Packit f00812
    char* yy_last_accepting_cpos;
Packit f00812
Packit f00812
    int yylineno_r;
Packit f00812
    int yy_flex_debug_r;
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_USES_REJECT]],
Packit f00812
[[
Packit f00812
    yy_state_type *yy_state_buf;
Packit f00812
    yy_state_type *yy_state_ptr;
Packit f00812
    char *yy_full_match;
Packit f00812
    int yy_lp;
Packit f00812
Packit f00812
    /* These are only needed for trailing context rules,
Packit f00812
     * but there's no conditional variable for that yet. */
Packit f00812
    int yy_looking_for_trail_begin;
Packit f00812
    int yy_full_lp;
Packit f00812
    int *yy_full_state;
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_TEXT_IS_ARRAY]],
Packit f00812
[[
Packit f00812
    char yytext_r[YYLMAX];
Packit f00812
    char *yytext_ptr;
Packit f00812
    int yy_more_offset;
Packit f00812
    int yy_prev_more_offset;
Packit f00812
]],
Packit f00812
[[
Packit f00812
    char *yytext_r;
Packit f00812
    int yy_more_flag;
Packit f00812
    int yy_more_len;
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_BISON_LVAL]],
Packit f00812
[[
Packit f00812
    YYSTYPE * yylval_r;
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[<M4_YY_BISON_LLOC>]],
Packit f00812
[[
Packit f00812
    YYLTYPE * yylloc_r;
Packit f00812
]])
Packit f00812
Packit f00812
    }; /* end struct yyguts_t */
Packit f00812
]])
Packit f00812
Packit f00812
Packit f00812
%if-c-only
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
static int yy_init_globals M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
]])
Packit f00812
%endif
Packit f00812
Packit f00812
%if-reentrant
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
    m4_ifdef( [[M4_YY_BISON_LVAL]],
Packit f00812
    [[
Packit f00812
    /* This must go here because YYSTYPE and YYLTYPE are included
Packit f00812
     * from bison output in section 1.*/
Packit f00812
    #    define yylval YY_G(yylval_r)
Packit f00812
    ]])
Packit f00812
Packit f00812
    m4_ifdef( [[<M4_YY_BISON_LLOC>]],
Packit f00812
    [[
Packit f00812
    #    define yylloc YY_G(yylloc_r)
Packit f00812
    ]])
Packit f00812
]])
Packit f00812
Packit f00812
int yylex_init M4_YY_PARAMS(yyscan_t* scanner);
Packit f00812
Packit f00812
int yylex_init_extra M4_YY_PARAMS( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
Packit f00812
Packit f00812
%endif
Packit f00812
Packit f00812
%endif End reentrant structures and macros.
Packit f00812
Packit f00812
/* Accessor methods to globals.
Packit f00812
   These are made visible to non-reentrant scanners for convenience. */
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_DESTROY]],,
Packit f00812
[[
Packit f00812
int yylex_destroy M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_DEBUG]],,
Packit f00812
[[
Packit f00812
int yyget_debug M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_SET_DEBUG]],,
Packit f00812
[[
Packit f00812
void yyset_debug M4_YY_PARAMS( int debug_flag M4_YY_PROTO_LAST_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_EXTRA]],,
Packit f00812
[[
Packit f00812
YY_EXTRA_TYPE yyget_extra M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_SET_EXTRA]],,
Packit f00812
[[
Packit f00812
void yyset_extra M4_YY_PARAMS( YY_EXTRA_TYPE user_defined M4_YY_PROTO_LAST_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_IN]],,
Packit f00812
[[
Packit f00812
FILE *yyget_in M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_SET_IN]],,
Packit f00812
[[
Packit f00812
void yyset_in  M4_YY_PARAMS( FILE * _in_str M4_YY_PROTO_LAST_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_OUT]],,
Packit f00812
[[
Packit f00812
FILE *yyget_out M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_SET_OUT]],,
Packit f00812
[[
Packit f00812
void yyset_out  M4_YY_PARAMS( FILE * _out_str M4_YY_PROTO_LAST_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_LENG]],,
Packit f00812
[[
Packit f00812
			int yyget_leng M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_TEXT]],,
Packit f00812
[[
Packit f00812
char *yyget_text M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_LINENO]],,
Packit f00812
[[
Packit f00812
int yyget_lineno M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_SET_LINENO]],,
Packit f00812
[[
Packit f00812
void yyset_lineno M4_YY_PARAMS( int _line_number M4_YY_PROTO_LAST_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_REENTRANT]],
Packit f00812
[[
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_COLUMN]],,
Packit f00812
[[
Packit f00812
int yyget_column  M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
]])
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_REENTRANT]],
Packit f00812
[[
Packit f00812
m4_ifdef( [[M4_YY_NO_SET_COLUMN]],,
Packit f00812
[[
Packit f00812
void yyset_column M4_YY_PARAMS( int _column_no M4_YY_PROTO_LAST_ARG );
Packit f00812
]])
Packit f00812
]])
Packit f00812
Packit f00812
%if-bison-bridge
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_LVAL]],,
Packit f00812
[[
Packit f00812
YYSTYPE * yyget_lval M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
]])
Packit f00812
Packit f00812
void yyset_lval M4_YY_PARAMS( YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG );
Packit f00812
Packit f00812
m4_ifdef( [[<M4_YY_BISON_LLOC>]],
Packit f00812
[[
Packit f00812
    m4_ifdef( [[M4_YY_NO_GET_LLOC]],,
Packit f00812
    [[
Packit f00812
       YYLTYPE *yyget_lloc M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
    ]])
Packit f00812
Packit f00812
    m4_ifdef( [[M4_YY_NO_SET_LLOC]],,
Packit f00812
    [[
Packit f00812
        void yyset_lloc M4_YY_PARAMS( YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG );
Packit f00812
    ]])
Packit f00812
]])
Packit f00812
%endif
Packit f00812
Packit f00812
/* Macros after this point can all be overridden by user definitions in
Packit f00812
 * section 1.
Packit f00812
 */
Packit f00812
Packit f00812
#ifndef YY_SKIP_YYWRAP
Packit f00812
#ifdef __cplusplus
Packit f00812
extern "C" int yywrap M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
#else
Packit f00812
extern int yywrap M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
#endif
Packit f00812
#endif
Packit f00812
Packit f00812
%not-for-header
Packit f00812
#ifndef YY_NO_UNPUT
Packit f00812
    m4_ifdef( [[M4_YY_NO_UNPUT]],,
Packit f00812
    [[
Packit f00812
    static void yyunput M4_YY_PARAMS( int c, char *buf_ptr  M4_YY_PROTO_LAST_ARG);
Packit f00812
    ]])
Packit f00812
#endif
Packit f00812
%ok-for-header
Packit f00812
%endif
Packit f00812
Packit f00812
#ifndef yytext_ptr
Packit f00812
static void yy_flex_strncpy M4_YY_PARAMS( char *, yyconst char *, int M4_YY_PROTO_LAST_ARG);
Packit f00812
#endif
Packit f00812
Packit f00812
#ifdef YY_NEED_STRLEN
Packit f00812
static int yy_flex_strlen M4_YY_PARAMS( yyconst char * M4_YY_PROTO_LAST_ARG);
Packit f00812
#endif
Packit f00812
Packit f00812
#ifndef YY_NO_INPUT
Packit f00812
%if-c-only Standard (non-C++) definition
Packit f00812
%not-for-header
Packit f00812
#ifdef __cplusplus
Packit f00812
static int yyinput M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
#else
Packit f00812
static int input M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
#endif
Packit f00812
%ok-for-header
Packit f00812
%endif
Packit f00812
#endif
Packit f00812
Packit f00812
Packit f00812
%if-c-only
Packit f00812
%# TODO: This is messy.
Packit f00812
m4_ifdef( [[M4_YY_STACK_USED]],
Packit f00812
[[
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_REENTRANT]],
Packit f00812
[[
Packit f00812
    m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
    [[
Packit f00812
        static int yy_start_stack_ptr = 0;
Packit f00812
        static int yy_start_stack_depth = 0;
Packit f00812
        static int *yy_start_stack = NULL;
Packit f00812
    ]])
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
    m4_ifdef( [[M4_YY_NO_PUSH_STATE]],,
Packit f00812
    [[
Packit f00812
    static void yy_push_state M4_YY_PARAMS( int _new_state M4_YY_PROTO_LAST_ARG);
Packit f00812
    ]])
Packit f00812
    m4_ifdef( [[M4_YY_NO_POP_STATE]],,
Packit f00812
    [[
Packit f00812
    static void yy_pop_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
    ]])
Packit f00812
    m4_ifdef( [[M4_YY_NO_TOP_STATE]],,
Packit f00812
    [[
Packit f00812
    static int yy_top_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
Packit f00812
    ]])
Packit f00812
]])
Packit f00812
Packit f00812
]],
Packit f00812
[[
Packit f00812
m4_define( [[M4_YY_NO_PUSH_STATE]])
Packit f00812
m4_define( [[M4_YY_NO_POP_STATE]])
Packit f00812
m4_define( [[M4_YY_NO_TOP_STATE]])
Packit f00812
]])
Packit f00812
%endif
Packit f00812
Packit f00812
/* Amount of stuff to slurp up with each read. */
Packit f00812
#ifndef YY_READ_BUF_SIZE
Packit f00812
#ifdef __ia64__
Packit f00812
/* On IA-64, the buffer size is 16k, not 8k */
Packit f00812
#define YY_READ_BUF_SIZE 16384
Packit f00812
#else
Packit f00812
#define YY_READ_BUF_SIZE 8192
Packit f00812
#endif /* __ia64__ */
Packit f00812
#endif
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* Copy whatever the last rule matched to the standard output. */
Packit f00812
#ifndef ECHO
Packit f00812
%if-c-only Standard (non-C++) definition
Packit f00812
/* This used to be an fputs(), but since the string might contain NUL's,
Packit f00812
 * we now use fwrite().
Packit f00812
 */
Packit f00812
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
Packit f00812
%endif
Packit f00812
%if-c++-only C++ definition
Packit f00812
#define ECHO LexerOutput( yytext, yyleng )
Packit f00812
%endif
Packit f00812
#endif
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
Packit f00812
 * is returned in "result".
Packit f00812
 */
Packit f00812
#ifndef YY_INPUT
Packit f00812
#define YY_INPUT(buf,result,max_size) \
Packit f00812
%% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \
Packit f00812
\
Packit f00812
%if-c++-only C++ definition \
Packit f00812
	if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \
Packit f00812
		YY_FATAL_ERROR( "input in flex scanner failed" );
Packit f00812
%endif
Packit f00812
Packit f00812
#endif
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* No semi-colon after return; correct usage is to write "yyterminate();" -
Packit f00812
 * we don't want an extra ';' after the "return" because that will cause
Packit f00812
 * some compilers to complain about unreachable statements.
Packit f00812
 */
Packit f00812
#ifndef yyterminate
Packit f00812
#define yyterminate() return YY_NULL
Packit f00812
#endif
Packit f00812
]])
Packit f00812
Packit f00812
/* Number of entries by which start-condition stack grows. */
Packit f00812
#ifndef YY_START_STACK_INCR
Packit f00812
#define YY_START_STACK_INCR 25
Packit f00812
#endif
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* Report a fatal error. */
Packit f00812
#ifndef YY_FATAL_ERROR
Packit f00812
%if-c-only
Packit f00812
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg M4_YY_CALL_LAST_ARG)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
#define YY_FATAL_ERROR(msg) LexerError( msg )
Packit f00812
%endif
Packit f00812
#endif
Packit f00812
]])
Packit f00812
Packit f00812
%if-tables-serialization structures and prototypes
Packit f00812
m4preproc_include(`tables_shared.h')
Packit f00812
Packit f00812
/* Load the DFA tables from the given stream.  */
Packit f00812
int yytables_fload M4_YY_PARAMS(FILE * fp M4_YY_PROTO_LAST_ARG);
Packit f00812
Packit f00812
/* Unload the tables from memory. */
Packit f00812
int yytables_destroy M4_YY_PARAMS(M4_YY_PROTO_ONLY_ARG);
Packit f00812
%not-for-header
Packit f00812
Packit f00812
/** Describes a mapping from a serialized table id to its deserialized state in
Packit f00812
 * this scanner.  This is the bridge between our "generic" deserialization code
Packit f00812
 * and the specifics of this scanner. 
Packit f00812
 */
Packit f00812
struct yytbl_dmap {
Packit f00812
	enum yytbl_id dm_id;/**< table identifier */
Packit f00812
	void  **dm_arr;		/**< address of pointer to store the deserialized table. */
Packit f00812
	size_t  dm_sz;		/**< local sizeof() each element in table. */
Packit f00812
};
Packit f00812
Packit f00812
/** A {0,0,0}-terminated list of structs, forming the map */
Packit f00812
static struct yytbl_dmap yydmap[] =
Packit f00812
{
Packit f00812
%tables-yydmap generated elements
Packit f00812
    {0,0,0}
Packit f00812
};
Packit f00812
Packit f00812
/** A tables-reader object to maintain some state in the read. */
Packit f00812
struct yytbl_reader {
Packit f00812
    FILE * fp; /**< input stream */
Packit f00812
    flex_uint32_t bread; /**< bytes read since beginning of current tableset */
Packit f00812
};
Packit f00812
Packit f00812
%endif
Packit f00812
/* end tables serialization structures and prototypes */
Packit f00812
Packit f00812
%ok-for-header
Packit f00812
Packit f00812
/* Default declaration of generated scanner - a define so the user can
Packit f00812
 * easily add parameters.
Packit f00812
 */
Packit f00812
#ifndef YY_DECL
Packit f00812
#define YY_DECL_IS_OURS 1
Packit f00812
%if-c-only Standard (non-C++) definition
Packit f00812
Packit f00812
Packit f00812
m4_define( [[M4_YY_LEX_PROTO]], [[M4_YY_PARAMS(M4_YY_PROTO_ONLY_ARG)]])
Packit f00812
m4_define( [[M4_YY_LEX_DECLARATION]], [[YYFARGS0(void)]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_BISON_LVAL]],
Packit f00812
[[
Packit f00812
    m4_dnl  The bison pure parser is used. Redefine yylex to
Packit f00812
    m4_dnl  accept the lval parameter.
Packit f00812
Packit f00812
    m4_define( [[M4_YY_LEX_PROTO]], [[\]]
Packit f00812
               [[M4_YY_PARAMS(YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG)]])
Packit f00812
    m4_define( [[M4_YY_LEX_DECLARATION]], [[\]]
Packit f00812
               [[YYFARGS1(YYSTYPE *,yylval_param)]])
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[<M4_YY_BISON_LLOC>]],
Packit f00812
[[
Packit f00812
    m4_dnl  Locations are used. yylex should also accept the ylloc parameter.
Packit f00812
Packit f00812
    m4_define( [[M4_YY_LEX_PROTO]], [[\]]
Packit f00812
               [[M4_YY_PARAMS(YYSTYPE * yylval_param, YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG)]])
Packit f00812
    m4_define( [[M4_YY_LEX_DECLARATION]], [[\]]
Packit f00812
               [[YYFARGS2(YYSTYPE *,yylval_param, YYLTYPE *,yylloc_param)]])
Packit f00812
]])
Packit f00812
Packit f00812
extern int yylex M4_YY_LEX_PROTO;
Packit f00812
Packit f00812
#define YY_DECL int yylex M4_YY_LEX_DECLARATION
Packit f00812
%endif
Packit f00812
%if-c++-only C++ definition
Packit f00812
#define YY_DECL int yyFlexLexer::yylex()
Packit f00812
%endif
Packit f00812
#endif /* !YY_DECL */
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* Code executed at the beginning of each rule, after yytext and yyleng
Packit f00812
 * have been set up.
Packit f00812
 */
Packit f00812
#ifndef YY_USER_ACTION
Packit f00812
#define YY_USER_ACTION
Packit f00812
#endif
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* Code executed at the end of each rule. */
Packit f00812
#ifndef YY_BREAK
Packit f00812
#define YY_BREAK /*LINTED*/break;
Packit f00812
#endif
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
%% [6.0] YY_RULE_SETUP definition goes here
Packit f00812
]])
Packit f00812
Packit f00812
%not-for-header
Packit f00812
/** The main scanner function which does all the work.
Packit f00812
 */
Packit f00812
YY_DECL
Packit f00812
{
Packit f00812
	yy_state_type yy_current_state;
Packit f00812
	char *yy_cp, *yy_bp;
Packit f00812
	int yy_act;
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_REENTRANT]],
Packit f00812
[[
Packit f00812
    m4_ifdef( [[M4_YY_BISON_LVAL]],
Packit f00812
    [[
Packit f00812
        YYSTYPE * yylval;
Packit f00812
    ]])
Packit f00812
    m4_ifdef( [[<M4_YY_BISON_LLOC>]],
Packit f00812
    [[
Packit f00812
        YYLTYPE * yylloc;
Packit f00812
    ]])
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_BISON_LVAL]],
Packit f00812
[[
Packit f00812
    yylval = yylval_param;
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[<M4_YY_BISON_LLOC>]],
Packit f00812
[[
Packit f00812
    yylloc = yylloc_param;
Packit f00812
]])
Packit f00812
Packit f00812
	if ( !YY_G(yy_init) )
Packit f00812
		{
Packit f00812
		YY_G(yy_init) = 1;
Packit f00812
Packit f00812
#ifdef YY_USER_INIT
Packit f00812
		YY_USER_INIT;
Packit f00812
#endif
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_USES_REJECT]],
Packit f00812
[[
Packit f00812
        /* Create the reject buffer large enough to save one state per allowed character. */
Packit f00812
        if ( ! YY_G(yy_state_buf) )
Packit f00812
            YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  M4_YY_CALL_LAST_ARG);
Packit f00812
            if ( ! YY_G(yy_state_buf) )
Packit f00812
                YY_FATAL_ERROR( "out of dynamic memory in yylex()" );
Packit f00812
]])
Packit f00812
Packit f00812
		if ( ! YY_G(yy_start) )
Packit f00812
			YY_G(yy_start) = 1;	/* first start state */
Packit f00812
Packit f00812
		if ( ! yyin )
Packit f00812
%if-c-only
Packit f00812
			yyin = stdin;
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
			yyin.rdbuf(std::cin.rdbuf());
Packit f00812
%endif
Packit f00812
Packit f00812
		if ( ! yyout )
Packit f00812
%if-c-only
Packit f00812
			yyout = stdout;
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
			yyout.rdbuf(std::cout.rdbuf());
Packit f00812
%endif
Packit f00812
Packit f00812
		if ( ! YY_CURRENT_BUFFER ) {
Packit f00812
			yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG);
Packit f00812
			YY_CURRENT_BUFFER_LVALUE =
Packit f00812
				yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG);
Packit f00812
		}
Packit f00812
Packit f00812
		yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
Packit f00812
		}
Packit f00812
Packit f00812
	{
Packit f00812
%% [7.0] user's declarations go here
Packit f00812
Packit f00812
	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
Packit f00812
		{
Packit f00812
%% [8.0] yymore()-related code goes here
Packit f00812
		yy_cp = YY_G(yy_c_buf_p);
Packit f00812
Packit f00812
		/* Support of yytext. */
Packit f00812
		*yy_cp = YY_G(yy_hold_char);
Packit f00812
Packit f00812
		/* yy_bp points to the position in yy_ch_buf of the start of
Packit f00812
		 * the current run.
Packit f00812
		 */
Packit f00812
		yy_bp = yy_cp;
Packit f00812
Packit f00812
%% [9.0] code to set up and find next match goes here
Packit f00812
Packit f00812
yy_find_action:
Packit f00812
%% [10.0] code to find the action number goes here
Packit f00812
Packit f00812
		YY_DO_BEFORE_ACTION;
Packit f00812
Packit f00812
%% [11.0] code for yylineno update goes here
Packit f00812
Packit f00812
do_action:	/* This label is used only to access EOF actions. */
Packit f00812
Packit f00812
%% [12.0] debug code goes here
Packit f00812
Packit f00812
		switch ( yy_act )
Packit f00812
	{ /* beginning of action switch */
Packit f00812
%% [13.0] actions go here
Packit f00812
Packit f00812
	case YY_END_OF_BUFFER:
Packit f00812
		{
Packit f00812
		/* Amount of text matched not including the EOB char. */
Packit f00812
		int yy_amount_of_matched_text = (int) (yy_cp - YY_G(yytext_ptr)) - 1;
Packit f00812
Packit f00812
		/* Undo the effects of YY_DO_BEFORE_ACTION. */
Packit f00812
		*yy_cp = YY_G(yy_hold_char);
Packit f00812
		YY_RESTORE_YY_MORE_OFFSET
Packit f00812
Packit f00812
		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
Packit f00812
			{
Packit f00812
			/* We're scanning a new file or input source.  It's
Packit f00812
			 * possible that this happened because the user
Packit f00812
			 * just pointed yyin at a new source and called
Packit f00812
			 * yylex().  If so, then we have to assure
Packit f00812
			 * consistency between YY_CURRENT_BUFFER and our
Packit f00812
			 * globals.  Here is the right place to do so, because
Packit f00812
			 * this is the first action (other than possibly a
Packit f00812
			 * back-up) that will match for the new input source.
Packit f00812
			 */
Packit f00812
			YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
Packit f00812
%if-c-only
Packit f00812
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf();
Packit f00812
%endif
Packit f00812
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
Packit f00812
			}
Packit f00812
Packit f00812
		/* Note that here we test for yy_c_buf_p "<=" to the position
Packit f00812
		 * of the first EOB in the buffer, since yy_c_buf_p will
Packit f00812
		 * already have been incremented past the NUL character
Packit f00812
		 * (since all states make transitions on EOB to the
Packit f00812
		 * end-of-buffer state).  Contrast this with the test
Packit f00812
		 * in input().
Packit f00812
		 */
Packit f00812
		if ( YY_G(yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] )
Packit f00812
			{ /* This was really a NUL. */
Packit f00812
			yy_state_type yy_next_state;
Packit f00812
Packit f00812
			YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + yy_amount_of_matched_text;
Packit f00812
Packit f00812
			yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG );
Packit f00812
Packit f00812
			/* Okay, we're now positioned to make the NUL
Packit f00812
			 * transition.  We couldn't have
Packit f00812
			 * yy_get_previous_state() go ahead and do it
Packit f00812
			 * for us because it doesn't know how to deal
Packit f00812
			 * with the possibility of jamming (and we don't
Packit f00812
			 * want to build jamming into it because then it
Packit f00812
			 * will run more slowly).
Packit f00812
			 */
Packit f00812
Packit f00812
			yy_next_state = yy_try_NUL_trans( yy_current_state M4_YY_CALL_LAST_ARG);
Packit f00812
Packit f00812
			yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ;
Packit f00812
Packit f00812
			if ( yy_next_state )
Packit f00812
				{
Packit f00812
				/* Consume the NUL. */
Packit f00812
				yy_cp = ++YY_G(yy_c_buf_p);
Packit f00812
				yy_current_state = yy_next_state;
Packit f00812
				goto yy_match;
Packit f00812
				}
Packit f00812
Packit f00812
			else
Packit f00812
				{
Packit f00812
%% [14.0] code to do back-up for compressed tables and set up yy_cp goes here
Packit f00812
				goto yy_find_action;
Packit f00812
				}
Packit f00812
			}
Packit f00812
Packit f00812
		else switch ( yy_get_next_buffer( M4_YY_CALL_ONLY_ARG ) )
Packit f00812
			{
Packit f00812
			case EOB_ACT_END_OF_FILE:
Packit f00812
				{
Packit f00812
				YY_G(yy_did_buffer_switch_on_eof) = 0;
Packit f00812
Packit f00812
				if ( yywrap( M4_YY_CALL_ONLY_ARG ) )
Packit f00812
					{
Packit f00812
					/* Note: because we've taken care in
Packit f00812
					 * yy_get_next_buffer() to have set up
Packit f00812
					 * yytext, we can now set up
Packit f00812
					 * yy_c_buf_p so that if some total
Packit f00812
					 * hoser (like flex itself) wants to
Packit f00812
					 * call the scanner after we return the
Packit f00812
					 * YY_NULL, it'll still work - another
Packit f00812
					 * YY_NULL will get returned.
Packit f00812
					 */
Packit f00812
					YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + YY_MORE_ADJ;
Packit f00812
Packit f00812
					yy_act = YY_STATE_EOF(YY_START);
Packit f00812
					goto do_action;
Packit f00812
					}
Packit f00812
Packit f00812
				else
Packit f00812
					{
Packit f00812
					if ( ! YY_G(yy_did_buffer_switch_on_eof) )
Packit f00812
						YY_NEW_FILE;
Packit f00812
					}
Packit f00812
				break;
Packit f00812
				}
Packit f00812
Packit f00812
			case EOB_ACT_CONTINUE_SCAN:
Packit f00812
				YY_G(yy_c_buf_p) =
Packit f00812
					YY_G(yytext_ptr) + yy_amount_of_matched_text;
Packit f00812
Packit f00812
				yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG );
Packit f00812
Packit f00812
				yy_cp = YY_G(yy_c_buf_p);
Packit f00812
				yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ;
Packit f00812
				goto yy_match;
Packit f00812
Packit f00812
			case EOB_ACT_LAST_MATCH:
Packit f00812
				YY_G(yy_c_buf_p) =
Packit f00812
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)];
Packit f00812
Packit f00812
				yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG );
Packit f00812
Packit f00812
				yy_cp = YY_G(yy_c_buf_p);
Packit f00812
				yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ;
Packit f00812
				goto yy_find_action;
Packit f00812
			}
Packit f00812
		break;
Packit f00812
		}
Packit f00812
Packit f00812
	default:
Packit f00812
		YY_FATAL_ERROR(
Packit f00812
			"fatal flex scanner internal error--no action found" );
Packit f00812
	} /* end of action switch */
Packit f00812
		} /* end of scanning one token */
Packit f00812
	} /* end of user's declarations */
Packit f00812
} /* end of yylex */
Packit f00812
%ok-for-header
Packit f00812
Packit f00812
%if-c++-only
Packit f00812
%not-for-header
Packit f00812
/* The contents of this function are C++ specific, so the YY_G macro is not used.
Packit f00812
 * This constructor simply maintains backward compatibility.
Packit f00812
 * DEPRECATED
Packit f00812
 */
Packit f00812
yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ):
Packit f00812
	yyin(arg_yyin ? arg_yyin->rdbuf() : std::cin.rdbuf()),
Packit f00812
	yyout(arg_yyout ? arg_yyout->rdbuf() : std::cout.rdbuf())
Packit f00812
{
Packit f00812
	ctor_common();
Packit f00812
}
Packit f00812
Packit f00812
/* The contents of this function are C++ specific, so the YY_G macro is not used.
Packit f00812
 */
Packit f00812
yyFlexLexer::yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ):
Packit f00812
	yyin(arg_yyin.rdbuf()),
Packit f00812
	yyout(arg_yyout.rdbuf())
Packit f00812
{
Packit f00812
	ctor_common();
Packit f00812
}
Packit f00812
Packit f00812
/* The contents of this function are C++ specific, so the YY_G macro is not used.
Packit f00812
 */
Packit f00812
void yyFlexLexer::ctor_common()
Packit f00812
{
Packit f00812
	yy_c_buf_p = 0;
Packit f00812
	yy_init = 0;
Packit f00812
	yy_start = 0;
Packit f00812
	yy_flex_debug = 0;
Packit f00812
	yylineno = 1;	// this will only get updated if %option yylineno
Packit f00812
Packit f00812
	yy_did_buffer_switch_on_eof = 0;
Packit f00812
Packit f00812
	yy_looking_for_trail_begin = 0;
Packit f00812
	yy_more_flag = 0;
Packit f00812
	yy_more_len = 0;
Packit f00812
	yy_more_offset = yy_prev_more_offset = 0;
Packit f00812
Packit f00812
	yy_start_stack_ptr = yy_start_stack_depth = 0;
Packit f00812
	yy_start_stack = NULL;
Packit f00812
Packit f00812
	yy_buffer_stack = NULL;
Packit f00812
	yy_buffer_stack_top = 0;
Packit f00812
	yy_buffer_stack_max = 0;
Packit f00812
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_USES_REJECT]],
Packit f00812
[[
Packit f00812
	yy_state_buf = new yy_state_type[YY_STATE_BUF_SIZE];
Packit f00812
]],
Packit f00812
[[
Packit f00812
	yy_state_buf = 0;
Packit f00812
]])
Packit f00812
}
Packit f00812
Packit f00812
/* The contents of this function are C++ specific, so the YY_G macro is not used.
Packit f00812
 */
Packit f00812
yyFlexLexer::~yyFlexLexer()
Packit f00812
{
Packit f00812
	delete [] yy_state_buf;
Packit f00812
	yyfree( yy_start_stack M4_YY_CALL_LAST_ARG );
Packit f00812
	yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG);
Packit f00812
	yyfree( yy_buffer_stack M4_YY_CALL_LAST_ARG );
Packit f00812
}
Packit f00812
Packit f00812
/* The contents of this function are C++ specific, so the YY_G macro is not used.
Packit f00812
 */
Packit f00812
void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out )
Packit f00812
{
Packit f00812
	// was if( new_in )
Packit f00812
	yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG);
Packit f00812
	yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE  M4_YY_CALL_LAST_ARG) M4_YY_CALL_LAST_ARG);
Packit f00812
Packit f00812
	// was if( new_out )
Packit f00812
	yyout.rdbuf(new_out.rdbuf());
Packit f00812
}
Packit f00812
Packit f00812
/* The contents of this function are C++ specific, so the YY_G macro is not used.
Packit f00812
 */
Packit f00812
void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
Packit f00812
{
Packit f00812
	if( ! new_in ) {
Packit f00812
		new_in = &yyin;
Packit f00812
	}
Packit f00812
Packit f00812
	if ( ! new_out ) {
Packit f00812
		new_out = &yyout;
Packit f00812
	}
Packit f00812
Packit f00812
	switch_streams(*new_in, *new_out);
Packit f00812
}
Packit f00812
Packit f00812
#ifdef YY_INTERACTIVE
Packit f00812
int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
Packit f00812
#else
Packit f00812
int yyFlexLexer::LexerInput( char* buf, int max_size )
Packit f00812
#endif
Packit f00812
{
Packit f00812
	if ( yyin.eof() || yyin.fail() )
Packit f00812
		return 0;
Packit f00812
Packit f00812
#ifdef YY_INTERACTIVE
Packit f00812
	yyin.get( buf[0] );
Packit f00812
Packit f00812
	if ( yyin.eof() )
Packit f00812
		return 0;
Packit f00812
Packit f00812
	if ( yyin.bad() )
Packit f00812
		return -1;
Packit f00812
Packit f00812
	return 1;
Packit f00812
Packit f00812
#else
Packit f00812
	(void) yyin.read( buf, max_size );
Packit f00812
Packit f00812
	if ( yyin.bad() )
Packit f00812
		return -1;
Packit f00812
	else
Packit f00812
		return yyin.gcount();
Packit f00812
#endif
Packit f00812
}
Packit f00812
Packit f00812
void yyFlexLexer::LexerOutput( const char* buf, int size )
Packit f00812
{
Packit f00812
	(void) yyout.write( buf, size );
Packit f00812
}
Packit f00812
%ok-for-header
Packit f00812
%endif
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/* yy_get_next_buffer - try to read in a new buffer
Packit f00812
 *
Packit f00812
 * Returns a code representing an action:
Packit f00812
 *	EOB_ACT_LAST_MATCH -
Packit f00812
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
Packit f00812
 *	EOB_ACT_END_OF_FILE - end of file
Packit f00812
 */
Packit f00812
%if-c-only
Packit f00812
static int yy_get_next_buffer YYFARGS0(void)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
int yyFlexLexer::yy_get_next_buffer()
Packit f00812
%endif
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
Packit f00812
	char *source = YY_G(yytext_ptr);
Packit f00812
	yy_size_t number_to_move, i;
Packit f00812
	int ret_val;
Packit f00812
Packit f00812
	if ( YY_G(yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] )
Packit f00812
		YY_FATAL_ERROR(
Packit f00812
		"fatal flex scanner internal error--end of buffer missed" );
Packit f00812
Packit f00812
	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
Packit f00812
		{ /* Don't try to fill the buffer, so this is an EOF. */
Packit f00812
		if ( YY_G(yy_c_buf_p) - YY_G(yytext_ptr) - YY_MORE_ADJ == 1 )
Packit f00812
			{
Packit f00812
			/* We matched a single character, the EOB, so
Packit f00812
			 * treat this as a final EOF.
Packit f00812
			 */
Packit f00812
			return EOB_ACT_END_OF_FILE;
Packit f00812
			}
Packit f00812
Packit f00812
		else
Packit f00812
			{
Packit f00812
			/* We matched some text prior to the EOB, first
Packit f00812
			 * process it.
Packit f00812
			 */
Packit f00812
			return EOB_ACT_LAST_MATCH;
Packit f00812
			}
Packit f00812
		}
Packit f00812
Packit f00812
	/* Try to read more data. */
Packit f00812
Packit f00812
	/* First move last chars to start of buffer. */
Packit f00812
	number_to_move = (yy_size_t) (YY_G(yy_c_buf_p) - YY_G(yytext_ptr)) - 1;
Packit f00812
Packit f00812
	for ( i = 0; i < number_to_move; ++i )
Packit f00812
		*(dest++) = *(source++);
Packit f00812
Packit f00812
	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
Packit f00812
		/* don't do the read, it's not guaranteed to return an EOF,
Packit f00812
		 * just force an EOF
Packit f00812
		 */
Packit f00812
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars) = 0;
Packit f00812
Packit f00812
	else
Packit f00812
		{
Packit f00812
			int num_to_read =
Packit f00812
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
Packit f00812
Packit f00812
		while ( num_to_read <= 0 )
Packit f00812
			{ /* Not enough room in the buffer - grow it. */
Packit f00812
m4_ifdef( [[M4_YY_USES_REJECT]],
Packit f00812
[[
Packit f00812
			YY_FATAL_ERROR(
Packit f00812
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
Packit f00812
]],
Packit f00812
[[
Packit f00812
			/* just a shorter name for the current buffer */
Packit f00812
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
Packit f00812
Packit f00812
			int yy_c_buf_p_offset =
Packit f00812
				(int) (YY_G(yy_c_buf_p) - b->yy_ch_buf);
Packit f00812
Packit f00812
			if ( b->yy_is_our_buffer )
Packit f00812
				{
Packit f00812
				int new_size = b->yy_buf_size * 2;
Packit f00812
Packit f00812
				if ( new_size <= 0 )
Packit f00812
					b->yy_buf_size += b->yy_buf_size / 8;
Packit f00812
				else
Packit f00812
					b->yy_buf_size *= 2;
Packit f00812
Packit f00812
				b->yy_ch_buf = (char *)
Packit f00812
					/* Include room in for 2 EOB chars. */
Packit f00812
					yyrealloc( (void *) b->yy_ch_buf,
Packit Service 424d24
							 b->yy_buf_size + 2 M4_YY_CALL_LAST_ARG );
Packit f00812
				}
Packit f00812
			else
Packit f00812
				/* Can't grow it, we don't own it. */
Packit f00812
				b->yy_ch_buf = NULL;
Packit f00812
Packit f00812
			if ( ! b->yy_ch_buf )
Packit f00812
				YY_FATAL_ERROR(
Packit f00812
				"fatal error - scanner input buffer overflow" );
Packit f00812
Packit f00812
			YY_G(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
Packit f00812
Packit f00812
			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
Packit f00812
						number_to_move - 1;
Packit f00812
]])
Packit f00812
			}
Packit f00812
Packit f00812
		if ( num_to_read > YY_READ_BUF_SIZE )
Packit f00812
			num_to_read = YY_READ_BUF_SIZE;
Packit f00812
Packit f00812
		/* Read in more data. */
Packit f00812
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
Packit f00812
			YY_G(yy_n_chars), num_to_read );
Packit f00812
Packit f00812
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars);
Packit f00812
		}
Packit f00812
Packit f00812
	if ( YY_G(yy_n_chars) == 0 )
Packit f00812
		{
Packit f00812
		if ( number_to_move == YY_MORE_ADJ )
Packit f00812
			{
Packit f00812
			ret_val = EOB_ACT_END_OF_FILE;
Packit f00812
			yyrestart( yyin  M4_YY_CALL_LAST_ARG);
Packit f00812
			}
Packit f00812
Packit f00812
		else
Packit f00812
			{
Packit f00812
			ret_val = EOB_ACT_LAST_MATCH;
Packit f00812
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
Packit f00812
				YY_BUFFER_EOF_PENDING;
Packit f00812
			}
Packit f00812
		}
Packit f00812
Packit f00812
	else
Packit f00812
		ret_val = EOB_ACT_CONTINUE_SCAN;
Packit f00812
Packit f00812
	if ((int) (YY_G(yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
Packit f00812
		/* Extend the array by 50%, plus the number we really need. */
Packit f00812
		int new_size = YY_G(yy_n_chars) + number_to_move + (YY_G(yy_n_chars) >> 1);
Packit f00812
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
Packit Service bd8ca0
			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size M4_YY_CALL_LAST_ARG );
Packit f00812
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
Packit f00812
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
Packit f00812
	}
Packit f00812
Packit f00812
	YY_G(yy_n_chars) += number_to_move;
Packit f00812
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
Packit f00812
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
Packit f00812
Packit f00812
	YY_G(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
Packit f00812
Packit f00812
	return ret_val;
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
/* yy_get_previous_state - get the state just before the EOB char was reached */
Packit f00812
Packit f00812
%if-c-only
Packit f00812
%not-for-header
Packit f00812
    static yy_state_type yy_get_previous_state YYFARGS0(void)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    yy_state_type yyFlexLexer::yy_get_previous_state()
Packit f00812
%endif
Packit f00812
{
Packit f00812
	yy_state_type yy_current_state;
Packit f00812
	char *yy_cp;
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
%% [15.0] code to get the start state into yy_current_state goes here
Packit f00812
Packit f00812
	for ( yy_cp = YY_G(yytext_ptr) + YY_MORE_ADJ; yy_cp < YY_G(yy_c_buf_p); ++yy_cp )
Packit f00812
		{
Packit f00812
%% [16.0] code to find the next state goes here
Packit f00812
		}
Packit f00812
Packit f00812
	return yy_current_state;
Packit f00812
}
Packit f00812
Packit f00812
Packit f00812
/* yy_try_NUL_trans - try to make a transition on the NUL character
Packit f00812
 *
Packit f00812
 * synopsis
Packit f00812
 *	next_state = yy_try_NUL_trans( current_state );
Packit f00812
 */
Packit f00812
%if-c-only
Packit f00812
    static yy_state_type yy_try_NUL_trans  YYFARGS1( yy_state_type, yy_current_state)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
Packit f00812
%endif
Packit f00812
{
Packit f00812
	int yy_is_jam;
Packit f00812
    M4_YY_DECL_GUTS_VAR(); /* This var may be unused depending upon options. */
Packit f00812
%% [17.0] code to find the next state, and perhaps do backing up, goes here
Packit f00812
Packit f00812
	M4_YY_NOOP_GUTS_VAR();
Packit f00812
	return yy_is_jam ? 0 : yy_current_state;
Packit f00812
}
Packit f00812
Packit f00812
Packit f00812
#ifndef YY_NO_UNPUT
Packit f00812
%if-c-only
Packit f00812
m4_ifdef( [[M4_YY_NO_UNPUT]],,
Packit f00812
[[
Packit f00812
    static void yyunput YYFARGS2( int,c, char *,yy_bp)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    void yyFlexLexer::yyunput( int c, char* yy_bp)
Packit f00812
%endif
Packit f00812
{
Packit f00812
	char *yy_cp;
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
    yy_cp = YY_G(yy_c_buf_p);
Packit f00812
Packit f00812
	/* undo effects of setting up yytext */
Packit f00812
	*yy_cp = YY_G(yy_hold_char);
Packit f00812
Packit f00812
	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Packit f00812
		{ /* need to shift things up to make room */
Packit f00812
		/* +2 for EOB chars. */
Packit f00812
		int number_to_move = YY_G(yy_n_chars) + 2;
Packit f00812
		char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
Packit f00812
					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
Packit f00812
		char *source =
Packit f00812
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
Packit f00812
Packit f00812
		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
Packit f00812
			*--dest = *--source;
Packit f00812
Packit f00812
		yy_cp += (int) (dest - source);
Packit f00812
		yy_bp += (int) (dest - source);
Packit f00812
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
Packit f00812
			YY_G(yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
Packit f00812
Packit f00812
		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
Packit f00812
			YY_FATAL_ERROR( "flex scanner push-back overflow" );
Packit f00812
		}
Packit f00812
Packit f00812
	*--yy_cp = (char) c;
Packit f00812
Packit f00812
%% [18.0] update yylineno here
Packit f00812
m4_ifdef( [[M4_YY_USE_LINENO]],
Packit f00812
[[
Packit f00812
    if ( c == '\n' ){
Packit f00812
        --yylineno;
Packit f00812
    }
Packit f00812
]])
Packit f00812
Packit f00812
	YY_G(yytext_ptr) = yy_bp;
Packit f00812
	YY_G(yy_hold_char) = *yy_cp;
Packit f00812
	YY_G(yy_c_buf_p) = yy_cp;
Packit f00812
}
Packit f00812
%if-c-only
Packit f00812
]])
Packit f00812
%endif
Packit f00812
#endif
Packit f00812
Packit f00812
%if-c-only
Packit f00812
#ifndef YY_NO_INPUT
Packit f00812
#ifdef __cplusplus
Packit f00812
    static int yyinput YYFARGS0(void)
Packit f00812
#else
Packit f00812
    static int input  YYFARGS0(void)
Packit f00812
#endif
Packit f00812
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    int yyFlexLexer::yyinput()
Packit f00812
%endif
Packit f00812
{
Packit f00812
	int c;
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
	*YY_G(yy_c_buf_p) = YY_G(yy_hold_char);
Packit f00812
Packit f00812
	if ( *YY_G(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
Packit f00812
		{
Packit f00812
		/* yy_c_buf_p now points to the character we want to return.
Packit f00812
		 * If this occurs *before* the EOB characters, then it's a
Packit f00812
		 * valid NUL; if not, then we've hit the end of the buffer.
Packit f00812
		 */
Packit f00812
		if ( YY_G(yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] )
Packit f00812
			/* This was really a NUL. */
Packit f00812
			*YY_G(yy_c_buf_p) = '\0';
Packit f00812
Packit f00812
		else
Packit f00812
			{ /* need more input */
Packit f00812
			int offset = YY_G(yy_c_buf_p) - YY_G(yytext_ptr);
Packit f00812
			++YY_G(yy_c_buf_p);
Packit f00812
Packit f00812
			switch ( yy_get_next_buffer( M4_YY_CALL_ONLY_ARG ) )
Packit f00812
				{
Packit f00812
				case EOB_ACT_LAST_MATCH:
Packit f00812
					/* This happens because yy_g_n_b()
Packit f00812
					 * sees that we've accumulated a
Packit f00812
					 * token and flags that we need to
Packit f00812
					 * try matching the token before
Packit f00812
					 * proceeding.  But for input(),
Packit f00812
					 * there's no matching to consider.
Packit f00812
					 * So convert the EOB_ACT_LAST_MATCH
Packit f00812
					 * to EOB_ACT_END_OF_FILE.
Packit f00812
					 */
Packit f00812
Packit f00812
					/* Reset buffer status. */
Packit f00812
					yyrestart( yyin M4_YY_CALL_LAST_ARG);
Packit f00812
Packit f00812
					/*FALLTHROUGH*/
Packit f00812
Packit f00812
				case EOB_ACT_END_OF_FILE:
Packit f00812
					{
Packit f00812
					if ( yywrap( M4_YY_CALL_ONLY_ARG ) )
Packit f00812
						return 0;
Packit f00812
Packit f00812
					if ( ! YY_G(yy_did_buffer_switch_on_eof) )
Packit f00812
						YY_NEW_FILE;
Packit f00812
#ifdef __cplusplus
Packit f00812
					return yyinput(M4_YY_CALL_ONLY_ARG);
Packit f00812
#else
Packit f00812
					return input(M4_YY_CALL_ONLY_ARG);
Packit f00812
#endif
Packit f00812
					}
Packit f00812
Packit f00812
				case EOB_ACT_CONTINUE_SCAN:
Packit f00812
					YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + offset;
Packit f00812
					break;
Packit f00812
				}
Packit f00812
			}
Packit f00812
		}
Packit f00812
Packit f00812
	c = *(unsigned char *) YY_G(yy_c_buf_p);	/* cast for 8-bit char's */
Packit f00812
	*YY_G(yy_c_buf_p) = '\0';	/* preserve yytext */
Packit f00812
	YY_G(yy_hold_char) = *++YY_G(yy_c_buf_p);
Packit f00812
Packit f00812
%% [19.0] update BOL and yylineno
Packit f00812
Packit f00812
	return c;
Packit f00812
}
Packit f00812
%if-c-only
Packit f00812
#endif	/* ifndef YY_NO_INPUT */
Packit f00812
%endif
Packit f00812
Packit f00812
/** Immediately switch to a different input stream.
Packit f00812
 * @param input_file A readable stream.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 * @note This function does not reset the start condition to @c INITIAL .
Packit f00812
 */
Packit f00812
%if-c-only
Packit f00812
    void yyrestart  YYFARGS1( FILE *,input_file)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    void yyFlexLexer::yyrestart( std::istream& input_file )
Packit f00812
%endif
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
	if ( ! YY_CURRENT_BUFFER ){
Packit f00812
        yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG);
Packit f00812
		YY_CURRENT_BUFFER_LVALUE =
Packit f00812
            yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG);
Packit f00812
	}
Packit f00812
Packit f00812
	yy_init_buffer( YY_CURRENT_BUFFER, input_file M4_YY_CALL_LAST_ARG);
Packit f00812
	yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
Packit f00812
}
Packit f00812
Packit f00812
%if-c++-only
Packit f00812
/** Delegate to the new version that takes an istream reference.
Packit f00812
 * @param input_file A readable stream.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 * @note This function does not reset the start condition to @c INITIAL .
Packit f00812
 */
Packit f00812
void yyFlexLexer::yyrestart( std::istream* input_file )
Packit f00812
{
Packit f00812
	yyrestart( *input_file );
Packit f00812
}
Packit f00812
%endif
Packit f00812
Packit f00812
/** Switch to a different input buffer.
Packit f00812
 * @param new_buffer The new input buffer.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
%if-c-only
Packit f00812
    void yy_switch_to_buffer  YYFARGS1( YY_BUFFER_STATE ,new_buffer)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
Packit f00812
%endif
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
	/* TODO. We should be able to replace this entire function body
Packit f00812
	 * with
Packit f00812
	 *		yypop_buffer_state();
Packit f00812
	 *		yypush_buffer_state(new_buffer);
Packit f00812
     */
Packit f00812
	yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG);
Packit f00812
	if ( YY_CURRENT_BUFFER == new_buffer )
Packit f00812
		return;
Packit f00812
Packit f00812
	if ( YY_CURRENT_BUFFER )
Packit f00812
		{
Packit f00812
		/* Flush out information for old buffer. */
Packit f00812
		*YY_G(yy_c_buf_p) = YY_G(yy_hold_char);
Packit f00812
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = YY_G(yy_c_buf_p);
Packit f00812
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars);
Packit f00812
		}
Packit f00812
Packit f00812
	YY_CURRENT_BUFFER_LVALUE = new_buffer;
Packit f00812
	yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
Packit f00812
Packit f00812
	/* We don't actually know whether we did this switch during
Packit f00812
	 * EOF (yywrap()) processing, but the only time this flag
Packit f00812
	 * is looked at is after yywrap() is called, so it's safe
Packit f00812
	 * to go ahead and always set it.
Packit f00812
	 */
Packit f00812
	YY_G(yy_did_buffer_switch_on_eof) = 1;
Packit f00812
}
Packit f00812
Packit f00812
Packit f00812
%if-c-only
Packit f00812
static void yy_load_buffer_state  YYFARGS0(void)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    void yyFlexLexer::yy_load_buffer_state()
Packit f00812
%endif
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
	YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
Packit f00812
	YY_G(yytext_ptr) = YY_G(yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
Packit f00812
%if-c-only
Packit f00812
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
	yyin.rdbuf(YY_CURRENT_BUFFER_LVALUE->yy_input_file);
Packit f00812
%endif
Packit f00812
	YY_G(yy_hold_char) = *YY_G(yy_c_buf_p);
Packit f00812
}
Packit f00812
Packit f00812
/** Allocate and initialize an input buffer state.
Packit f00812
 * @param file A readable stream.
Packit f00812
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 * @return the allocated buffer state.
Packit f00812
 */
Packit f00812
%if-c-only
Packit f00812
    YY_BUFFER_STATE yy_create_buffer  YYFARGS2( FILE *,file, int ,size)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size )
Packit f00812
%endif
Packit f00812
{
Packit f00812
	YY_BUFFER_STATE b;
Packit f00812
    m4_dnl M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) M4_YY_CALL_LAST_ARG );
Packit f00812
	if ( ! b )
Packit f00812
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Packit f00812
Packit Service 424d24
	b->yy_buf_size = (yy_size_t)size;
Packit f00812
Packit f00812
	/* yy_ch_buf has to be 2 characters longer than the size given because
Packit f00812
	 * we need to put in 2 end-of-buffer characters.
Packit f00812
	 */
Packit Service 424d24
	b->yy_ch_buf = (char *) yyalloc( b->yy_buf_size + 2 M4_YY_CALL_LAST_ARG );
Packit f00812
	if ( ! b->yy_ch_buf )
Packit f00812
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Packit f00812
Packit f00812
	b->yy_is_our_buffer = 1;
Packit f00812
Packit f00812
	yy_init_buffer( b, file M4_YY_CALL_LAST_ARG);
Packit f00812
Packit f00812
	return b;
Packit f00812
}
Packit f00812
Packit f00812
%if-c++-only
Packit f00812
/** Delegate creation of buffers to the new version that takes an istream reference.
Packit f00812
 * @param file A readable stream.
Packit f00812
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 * @return the allocated buffer state.
Packit f00812
 */
Packit f00812
	YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
Packit f00812
{
Packit f00812
	return yy_create_buffer( *file, size );
Packit f00812
}
Packit f00812
%endif
Packit f00812
Packit f00812
/** Destroy the buffer.
Packit f00812
 * @param b a buffer created with yy_create_buffer()
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
%if-c-only
Packit f00812
    void yy_delete_buffer YYFARGS1( YY_BUFFER_STATE ,b)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
Packit f00812
%endif
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
	if ( ! b )
Packit f00812
		return;
Packit f00812
Packit f00812
	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
Packit f00812
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
Packit f00812
Packit f00812
	if ( b->yy_is_our_buffer )
Packit f00812
		yyfree( (void *) b->yy_ch_buf M4_YY_CALL_LAST_ARG );
Packit f00812
Packit f00812
	yyfree( (void *) b M4_YY_CALL_LAST_ARG );
Packit f00812
}
Packit f00812
Packit f00812
Packit f00812
/* Initializes or reinitializes a buffer.
Packit f00812
 * This function is sometimes called more than once on the same buffer,
Packit f00812
 * such as during a yyrestart() or at EOF.
Packit f00812
 */
Packit f00812
%if-c-only
Packit f00812
    static void yy_init_buffer  YYFARGS2( YY_BUFFER_STATE ,b, FILE *,file)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file )
Packit f00812
%endif
Packit f00812
Packit f00812
{
Packit f00812
	int oerrno = errno;
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
	yy_flush_buffer( b M4_YY_CALL_LAST_ARG);
Packit f00812
Packit f00812
%if-c-only
Packit f00812
	b->yy_input_file = file;
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
	b->yy_input_file = file.rdbuf();
Packit f00812
%endif
Packit f00812
	b->yy_fill_buffer = 1;
Packit f00812
Packit f00812
    /* If b is the current buffer, then yy_init_buffer was _probably_
Packit f00812
     * called from yyrestart() or through yy_get_next_buffer.
Packit f00812
     * In that case, we don't want to reset the lineno or column.
Packit f00812
     */
Packit f00812
    if (b != YY_CURRENT_BUFFER){
Packit f00812
        b->yy_bs_lineno = 1;
Packit f00812
        b->yy_bs_column = 0;
Packit f00812
    }
Packit f00812
Packit f00812
%if-c-only
Packit f00812
m4_ifdef( [[M4_YY_ALWAYS_INTERACTIVE]],
Packit f00812
[[
Packit f00812
	b->yy_is_interactive = 1;
Packit f00812
]],
Packit f00812
[[
Packit f00812
    m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]],
Packit f00812
    [[
Packit f00812
        b->yy_is_interactive = 0;
Packit f00812
    ]],
Packit f00812
    [[
Packit f00812
        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
Packit f00812
    ]])
Packit f00812
]])
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
	b->yy_is_interactive = 0;
Packit f00812
%endif
Packit f00812
	errno = oerrno;
Packit f00812
}
Packit f00812
Packit f00812
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
Packit f00812
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
%if-c-only
Packit f00812
    void yy_flush_buffer YYFARGS1( YY_BUFFER_STATE ,b)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
Packit f00812
%endif
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
	if ( ! b )
Packit f00812
		return;
Packit f00812
Packit f00812
	b->yy_n_chars = 0;
Packit f00812
Packit f00812
	/* We always need two end-of-buffer characters.  The first causes
Packit f00812
	 * a transition to the end-of-buffer state.  The second causes
Packit f00812
	 * a jam in that state.
Packit f00812
	 */
Packit f00812
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
Packit f00812
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
Packit f00812
Packit f00812
	b->yy_buf_pos = &b->yy_ch_buf[0];
Packit f00812
Packit f00812
	b->yy_at_bol = 1;
Packit f00812
	b->yy_buffer_status = YY_BUFFER_NEW;
Packit f00812
Packit f00812
	if ( b == YY_CURRENT_BUFFER )
Packit f00812
		yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
Packit f00812
}
Packit f00812
Packit f00812
%if-c-or-c++
Packit f00812
/** Pushes the new state onto the stack. The new state becomes
Packit f00812
 *  the current state. This function will allocate the stack
Packit f00812
 *  if necessary.
Packit f00812
 *  @param new_buffer The new state.
Packit f00812
 *  M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
%if-c-only
Packit f00812
void yypush_buffer_state YYFARGS1(YY_BUFFER_STATE,new_buffer)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
Packit f00812
%endif
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
	if (new_buffer == NULL)
Packit f00812
		return;
Packit f00812
Packit f00812
	yyensure_buffer_stack(M4_YY_CALL_ONLY_ARG);
Packit f00812
Packit f00812
	/* This block is copied from yy_switch_to_buffer. */
Packit f00812
	if ( YY_CURRENT_BUFFER )
Packit f00812
		{
Packit f00812
		/* Flush out information for old buffer. */
Packit f00812
		*YY_G(yy_c_buf_p) = YY_G(yy_hold_char);
Packit f00812
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = YY_G(yy_c_buf_p);
Packit f00812
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars);
Packit f00812
		}
Packit f00812
Packit f00812
	/* Only push if top exists. Otherwise, replace top. */
Packit f00812
	if (YY_CURRENT_BUFFER)
Packit f00812
		YY_G(yy_buffer_stack_top)++;
Packit f00812
	YY_CURRENT_BUFFER_LVALUE = new_buffer;
Packit f00812
Packit f00812
	/* copied from yy_switch_to_buffer. */
Packit f00812
	yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
Packit f00812
	YY_G(yy_did_buffer_switch_on_eof) = 1;
Packit f00812
}
Packit f00812
%endif
Packit f00812
Packit f00812
Packit f00812
%if-c-or-c++
Packit f00812
/** Removes and deletes the top of the stack, if present.
Packit f00812
 *  The next element becomes the new top.
Packit f00812
 *  M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
%if-c-only
Packit f00812
void yypop_buffer_state YYFARGS0(void)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
void yyFlexLexer::yypop_buffer_state (void)
Packit f00812
%endif
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
	if (!YY_CURRENT_BUFFER)
Packit f00812
		return;
Packit f00812
Packit f00812
	yy_delete_buffer(YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG);
Packit f00812
	YY_CURRENT_BUFFER_LVALUE = NULL;
Packit f00812
	if (YY_G(yy_buffer_stack_top) > 0)
Packit f00812
		--YY_G(yy_buffer_stack_top);
Packit f00812
Packit f00812
	if (YY_CURRENT_BUFFER) {
Packit f00812
		yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );
Packit f00812
		YY_G(yy_did_buffer_switch_on_eof) = 1;
Packit f00812
	}
Packit f00812
}
Packit f00812
%endif
Packit f00812
Packit f00812
Packit f00812
%if-c-or-c++
Packit f00812
/* Allocates the stack if it does not exist.
Packit f00812
 *  Guarantees space for at least one push.
Packit f00812
 */
Packit f00812
%if-c-only
Packit f00812
static void yyensure_buffer_stack YYFARGS0(void)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
void yyFlexLexer::yyensure_buffer_stack(void)
Packit f00812
%endif
Packit f00812
{
Packit f00812
	int num_to_alloc;
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
	if (!YY_G(yy_buffer_stack)) {
Packit f00812
Packit f00812
		/* First allocation is just for 2 elements, since we don't know if this
Packit f00812
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
Packit f00812
		 * immediate realloc on the next call.
Packit f00812
         */
Packit f00812
      num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
Packit f00812
		YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
Packit f00812
								(num_to_alloc * sizeof(struct yy_buffer_state*)
Packit f00812
								M4_YY_CALL_LAST_ARG);
Packit f00812
		if ( ! YY_G(yy_buffer_stack) )
Packit f00812
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
Packit f00812
								  
Packit f00812
		
Packit f00812
		memset(YY_G(yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
Packit f00812
				
Packit f00812
		YY_G(yy_buffer_stack_max) = num_to_alloc;
Packit f00812
		YY_G(yy_buffer_stack_top) = 0;
Packit f00812
		return;
Packit f00812
	}
Packit f00812
Packit f00812
	if (YY_G(yy_buffer_stack_top) >= (YY_G(yy_buffer_stack_max)) - 1){
Packit f00812
Packit f00812
		/* Increase the buffer to prepare for a possible push. */
Packit f00812
		yy_size_t grow_size = 8 /* arbitrary grow size */;
Packit f00812
Packit f00812
		num_to_alloc = YY_G(yy_buffer_stack_max) + grow_size;
Packit f00812
		YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
Packit f00812
								(YY_G(yy_buffer_stack),
Packit f00812
								num_to_alloc * sizeof(struct yy_buffer_state*)
Packit f00812
								M4_YY_CALL_LAST_ARG);
Packit f00812
		if ( ! YY_G(yy_buffer_stack) )
Packit f00812
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
Packit f00812
Packit f00812
		/* zero only the new slots.*/
Packit f00812
		memset(YY_G(yy_buffer_stack) + YY_G(yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
Packit f00812
		YY_G(yy_buffer_stack_max) = num_to_alloc;
Packit f00812
	}
Packit f00812
}
Packit f00812
%endif
Packit f00812
Packit f00812
Packit f00812
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_SCAN_BUFFER]],,
Packit f00812
[[
Packit f00812
%if-c-only
Packit f00812
/** Setup the input buffer state to scan directly from a user-specified character buffer.
Packit f00812
 * @param base the character buffer
Packit f00812
 * @param size the size in bytes of the character buffer
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 * @return the newly allocated buffer state object. 
Packit f00812
 */
Packit f00812
YY_BUFFER_STATE yy_scan_buffer  YYFARGS2( char *,base, yy_size_t ,size)
Packit f00812
{
Packit f00812
	YY_BUFFER_STATE b;
Packit f00812
    m4_dnl M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
	if ( size < 2 ||
Packit f00812
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
Packit f00812
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
Packit f00812
		/* They forgot to leave room for the EOB's. */
Packit f00812
		return NULL;
Packit f00812
Packit f00812
	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) M4_YY_CALL_LAST_ARG );
Packit f00812
	if ( ! b )
Packit f00812
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
Packit f00812
Packit Service 424d24
	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
Packit f00812
	b->yy_buf_pos = b->yy_ch_buf = base;
Packit f00812
	b->yy_is_our_buffer = 0;
Packit f00812
	b->yy_input_file = NULL;
Packit f00812
	b->yy_n_chars = b->yy_buf_size;
Packit f00812
	b->yy_is_interactive = 0;
Packit f00812
	b->yy_at_bol = 1;
Packit f00812
	b->yy_fill_buffer = 0;
Packit f00812
	b->yy_buffer_status = YY_BUFFER_NEW;
Packit f00812
Packit f00812
	yy_switch_to_buffer( b M4_YY_CALL_LAST_ARG );
Packit f00812
Packit f00812
	return b;
Packit f00812
}
Packit f00812
%endif
Packit f00812
]])
Packit f00812
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_SCAN_STRING]],,
Packit f00812
[[
Packit f00812
%if-c-only
Packit f00812
/** Setup the input buffer state to scan a string. The next call to yylex() will
Packit f00812
 * scan from a @e copy of @a str.
Packit f00812
 * @param yystr a NUL-terminated string to scan
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 * @return the newly allocated buffer state object.
Packit f00812
 * @note If you want to scan bytes that may contain NUL values, then use
Packit f00812
 *       yy_scan_bytes() instead.
Packit f00812
 */
Packit f00812
YY_BUFFER_STATE yy_scan_string YYFARGS1( yyconst char *, yystr)
Packit f00812
{
Packit f00812
    m4_dnl M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
	return yy_scan_bytes( yystr, (int) strlen(yystr) M4_YY_CALL_LAST_ARG);
Packit f00812
}
Packit f00812
%endif
Packit f00812
]])
Packit f00812
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_SCAN_BYTES]],,
Packit f00812
[[
Packit f00812
%if-c-only
Packit f00812
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
Packit f00812
 * scan from a @e copy of @a bytes.
Packit f00812
 * @param yybytes the byte buffer to scan
Packit f00812
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 * @return the newly allocated buffer state object.
Packit f00812
 */
Packit f00812
YY_BUFFER_STATE yy_scan_bytes  YYFARGS2( yyconst char *,yybytes, int ,_yybytes_len)
Packit f00812
{
Packit f00812
	YY_BUFFER_STATE b;
Packit f00812
	char *buf;
Packit f00812
	yy_size_t n;
Packit Service 424d24
	yy_size_t i;
Packit f00812
    m4_dnl M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
	/* Get memory for full buffer, including space for trailing EOB's. */
Packit Service 424d24
	n = (yy_size_t) _yybytes_len + 2;
Packit f00812
	buf = (char *) yyalloc( n M4_YY_CALL_LAST_ARG );
Packit f00812
	if ( ! buf )
Packit f00812
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
Packit f00812
Packit f00812
	for ( i = 0; i < _yybytes_len; ++i )
Packit f00812
		buf[i] = yybytes[i];
Packit f00812
Packit f00812
	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
Packit f00812
Packit f00812
	b = yy_scan_buffer( buf, n M4_YY_CALL_LAST_ARG);
Packit f00812
	if ( ! b )
Packit f00812
		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
Packit f00812
Packit f00812
	/* It's okay to grow etc. this buffer, and we should throw it
Packit f00812
	 * away when we're done.
Packit f00812
	 */
Packit f00812
	b->yy_is_our_buffer = 1;
Packit f00812
Packit f00812
	return b;
Packit f00812
}
Packit f00812
%endif
Packit f00812
]])
Packit f00812
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_PUSH_STATE]],,
Packit f00812
[[
Packit f00812
%if-c-only
Packit f00812
    static void yy_push_state YYFARGS1( int ,_new_state)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    void yyFlexLexer::yy_push_state( int _new_state )
Packit f00812
%endif
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
	if ( YY_G(yy_start_stack_ptr) >= YY_G(yy_start_stack_depth) )
Packit f00812
		{
Packit f00812
		yy_size_t new_size;
Packit f00812
Packit f00812
		YY_G(yy_start_stack_depth) += YY_START_STACK_INCR;
Packit f00812
		new_size = (yy_size_t) YY_G(yy_start_stack_depth) * sizeof( int );
Packit f00812
Packit f00812
		if ( ! YY_G(yy_start_stack) )
Packit f00812
			YY_G(yy_start_stack) = (int *) yyalloc( new_size M4_YY_CALL_LAST_ARG );
Packit f00812
Packit f00812
		else
Packit f00812
			YY_G(yy_start_stack) = (int *) yyrealloc(
Packit f00812
					(void *) YY_G(yy_start_stack), new_size M4_YY_CALL_LAST_ARG );
Packit f00812
Packit f00812
		if ( ! YY_G(yy_start_stack) )
Packit f00812
			YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
Packit f00812
		}
Packit f00812
Packit f00812
	YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr)++] = YY_START;
Packit f00812
Packit f00812
	BEGIN(_new_state);
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_POP_STATE]],,
Packit f00812
[[
Packit f00812
%if-c-only
Packit f00812
    static void yy_pop_state  YYFARGS0(void)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    void yyFlexLexer::yy_pop_state()
Packit f00812
%endif
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
	if ( --YY_G(yy_start_stack_ptr) < 0 )
Packit f00812
		YY_FATAL_ERROR( "start-condition stack underflow" );
Packit f00812
Packit f00812
	BEGIN(YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr)]);
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_TOP_STATE]],,
Packit f00812
[[
Packit f00812
%if-c-only
Packit f00812
    static int yy_top_state  YYFARGS0(void)
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
    int yyFlexLexer::yy_top_state()
Packit f00812
%endif
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
	return YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr) - 1];
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
#ifndef YY_EXIT_FAILURE
Packit f00812
#define YY_EXIT_FAILURE 2
Packit f00812
#endif
Packit f00812
Packit f00812
%if-c-only
Packit f00812
static void yynoreturn yy_fatal_error YYFARGS1(yyconst char*, msg)
Packit f00812
{
Packit f00812
	M4_YY_DECL_GUTS_VAR();
Packit f00812
	M4_YY_NOOP_GUTS_VAR();
Packit f00812
	(void) fprintf( stderr, "%s\n", msg );
Packit f00812
	exit( YY_EXIT_FAILURE );
Packit f00812
}
Packit f00812
%endif
Packit f00812
%if-c++-only
Packit f00812
void yyFlexLexer::LexerError( yyconst char* msg )
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
	std::cerr << msg << std::endl;
Packit f00812
	exit( YY_EXIT_FAILURE );
Packit f00812
}
Packit f00812
%endif
Packit f00812
Packit f00812
/* Redefine yyless() so it works in section 3 code. */
Packit f00812
Packit f00812
#undef yyless
Packit f00812
#define yyless(n) \
Packit f00812
	do \
Packit f00812
		{ \
Packit f00812
		/* Undo effects of setting up yytext. */ \
Packit Service dc8f40
        yy_size_t yyless_macro_arg = (n); \
Packit f00812
        YY_LESS_LINENO(yyless_macro_arg);\
Packit f00812
		yytext[yyleng] = YY_G(yy_hold_char); \
Packit f00812
		YY_G(yy_c_buf_p) = yytext + yyless_macro_arg; \
Packit f00812
		YY_G(yy_hold_char) = *YY_G(yy_c_buf_p); \
Packit f00812
		*YY_G(yy_c_buf_p) = '\0'; \
Packit f00812
		yyleng = yyless_macro_arg; \
Packit f00812
		} \
Packit f00812
	while ( 0 )
Packit f00812
Packit f00812
Packit f00812
Packit f00812
/* Accessor  methods (get/set functions) to struct members. */
Packit f00812
Packit f00812
%if-c-only
Packit f00812
%if-reentrant
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_EXTRA]],,
Packit f00812
[[
Packit f00812
/** Get the user-defined data for this scanner.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
YY_EXTRA_TYPE yyget_extra  YYFARGS0(void)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    return yyextra;
Packit f00812
}
Packit f00812
]])
Packit f00812
%endif
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_LINENO]],,
Packit f00812
[[
Packit f00812
/** Get the current line number.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
int yyget_lineno  YYFARGS0(void)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    
Packit f00812
    m4_ifdef( [[M4_YY_REENTRANT]],
Packit f00812
    [[
Packit f00812
        if (! YY_CURRENT_BUFFER)
Packit f00812
            return 0;
Packit f00812
    ]])
Packit f00812
    return yylineno;
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_REENTRANT]],
Packit f00812
[[
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_COLUMN]],,
Packit f00812
[[
Packit f00812
/** Get the current column number.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
int yyget_column  YYFARGS0(void)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    
Packit f00812
    m4_ifdef( [[M4_YY_REENTRANT]],
Packit f00812
    [[
Packit f00812
        if (! YY_CURRENT_BUFFER)
Packit f00812
            return 0;
Packit f00812
    ]])
Packit f00812
    return yycolumn;
Packit f00812
}
Packit f00812
]])
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_IN]],,
Packit f00812
[[
Packit f00812
/** Get the input stream.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
FILE *yyget_in  YYFARGS0(void)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    return yyin;
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_OUT]],,
Packit f00812
[[
Packit f00812
/** Get the output stream.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
FILE *yyget_out  YYFARGS0(void)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    return yyout;
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_LENG]],,
Packit f00812
[[
Packit f00812
/** Get the length of the current token.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
int yyget_leng  YYFARGS0(void)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    return yyleng;
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
/** Get the current token.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_TEXT]],,
Packit f00812
[[
Packit f00812
char *yyget_text  YYFARGS0(void)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    return yytext;
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
%if-reentrant
Packit f00812
m4_ifdef( [[M4_YY_NO_SET_EXTRA]],,
Packit f00812
[[
Packit f00812
/** Set the user-defined data. This data is never touched by the scanner.
Packit f00812
 * @param user_defined The data to be associated with this scanner.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
void yyset_extra YYFARGS1( YY_EXTRA_TYPE ,user_defined)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    yyextra = user_defined ;
Packit f00812
}
Packit f00812
]])
Packit f00812
%endif
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_SET_LINENO]],,
Packit f00812
[[
Packit f00812
/** Set the current line number.
Packit f00812
 * @param _line_number line number
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
void yyset_lineno YYFARGS1( int ,_line_number)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
    m4_ifdef( [[M4_YY_REENTRANT]],
Packit f00812
    [[
Packit f00812
        /* lineno is only valid if an input buffer exists. */
Packit f00812
        if (! YY_CURRENT_BUFFER )
Packit f00812
           YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
Packit f00812
    ]])
Packit f00812
    yylineno = _line_number;
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_REENTRANT]],
Packit f00812
[[
Packit f00812
m4_ifdef( [[M4_YY_NO_SET_COLUMN]],,
Packit f00812
[[
Packit f00812
/** Set the current column.
Packit f00812
 * @param _column_no column number
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 */
Packit f00812
void yyset_column YYFARGS1( int , _column_no)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
    m4_ifdef( [[M4_YY_REENTRANT]],
Packit f00812
    [[
Packit f00812
        /* column is only valid if an input buffer exists. */
Packit f00812
        if (! YY_CURRENT_BUFFER )
Packit f00812
           YY_FATAL_ERROR( "yyset_column called with no buffer" );
Packit f00812
    ]])
Packit f00812
    yycolumn = _column_no;
Packit f00812
}
Packit f00812
]])
Packit f00812
]])
Packit f00812
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_SET_IN]],,
Packit f00812
[[
Packit f00812
/** Set the input stream. This does not discard the current
Packit f00812
 * input buffer.
Packit f00812
 * @param _in_str A readable stream.
Packit f00812
 * M4_YY_DOC_PARAM
Packit f00812
 * @see yy_switch_to_buffer
Packit f00812
 */
Packit f00812
void yyset_in YYFARGS1( FILE * ,_in_str)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    yyin = _in_str ;
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_SET_OUT]],,
Packit f00812
[[
Packit f00812
void yyset_out YYFARGS1( FILE * ,_out_str)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    yyout = _out_str ;
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_DEBUG]],,
Packit f00812
[[
Packit f00812
int yyget_debug  YYFARGS0(void)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    return yy_flex_debug;
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_SET_DEBUG]],,
Packit f00812
[[
Packit f00812
void yyset_debug YYFARGS1( int ,_bdebug)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    yy_flex_debug = _bdebug ;
Packit f00812
}
Packit f00812
]])
Packit f00812
%endif
Packit f00812
Packit f00812
%if-reentrant
Packit f00812
/* Accessor methods for yylval and yylloc */
Packit f00812
Packit f00812
%if-bison-bridge
Packit f00812
m4_ifdef( [[M4_YY_NO_GET_LVAL]],,
Packit f00812
[[
Packit f00812
YYSTYPE * yyget_lval  YYFARGS0(void)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    return yylval;
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_SET_LVAL]],,
Packit f00812
[[
Packit f00812
void yyset_lval YYFARGS1( YYSTYPE * ,yylval_param)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    yylval = yylval_param;
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[<M4_YY_BISON_LLOC>]],
Packit f00812
[[
Packit f00812
    m4_ifdef( [[M4_YY_NO_GET_LLOC]],,
Packit f00812
    [[
Packit f00812
YYLTYPE *yyget_lloc  YYFARGS0(void)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    return yylloc;
Packit f00812
}
Packit f00812
    ]])
Packit f00812
Packit f00812
    m4_ifdef( [[M4_YY_NO_SET_LLOC]],,
Packit f00812
    [[
Packit f00812
void yyset_lloc YYFARGS1( YYLTYPE * ,yylloc_param)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    yylloc = yylloc_param;
Packit f00812
}
Packit f00812
    ]])
Packit f00812
]])
Packit f00812
Packit f00812
%endif
Packit f00812
Packit f00812
Packit f00812
/* User-visible API */
Packit f00812
Packit f00812
/* yylex_init is special because it creates the scanner itself, so it is
Packit f00812
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
Packit f00812
 * That's why we explicitly handle the declaration, instead of using our macros.
Packit f00812
 */
Packit f00812
m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],
Packit f00812
[[
Packit f00812
int yylex_init( ptr_yy_globals )
Packit f00812
    yyscan_t* ptr_yy_globals;
Packit f00812
]],
Packit f00812
[[
Packit f00812
int yylex_init(yyscan_t* ptr_yy_globals)
Packit f00812
]])
Packit f00812
{
Packit f00812
    if (ptr_yy_globals == NULL){
Packit f00812
        errno = EINVAL;
Packit f00812
        return 1;
Packit f00812
    }
Packit f00812
Packit f00812
    *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
Packit f00812
Packit f00812
    if (*ptr_yy_globals == NULL){
Packit f00812
        errno = ENOMEM;
Packit f00812
        return 1;
Packit f00812
    }
Packit f00812
Packit f00812
    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
Packit f00812
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
Packit f00812
Packit f00812
    return yy_init_globals ( *ptr_yy_globals );
Packit f00812
}
Packit f00812
Packit f00812
Packit f00812
/* yylex_init_extra has the same functionality as yylex_init, but follows the
Packit f00812
 * convention of taking the scanner as the last argument. Note however, that
Packit f00812
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
Packit f00812
 * is the reason, too, why this function also must handle its own declaration).
Packit f00812
 * The user defined value in the first argument will be available to yyalloc in
Packit f00812
 * the yyextra field.
Packit f00812
 */
Packit f00812
m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],
Packit f00812
[[
Packit f00812
int yylex_init_extra( yy_user_defined, ptr_yy_globals )
Packit f00812
    YY_EXTRA_TYPE yy_user_defined;
Packit f00812
    yyscan_t* ptr_yy_globals;
Packit f00812
]],
Packit f00812
[[
Packit f00812
int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
Packit f00812
]])
Packit f00812
{
Packit f00812
    struct yyguts_t dummy_yyguts;
Packit f00812
Packit f00812
    yyset_extra (yy_user_defined, &dummy_yyguts);
Packit f00812
Packit f00812
    if (ptr_yy_globals == NULL){
Packit f00812
        errno = EINVAL;
Packit f00812
        return 1;
Packit f00812
    }
Packit f00812
	
Packit f00812
    *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
Packit f00812
	
Packit f00812
    if (*ptr_yy_globals == NULL){
Packit f00812
        errno = ENOMEM;
Packit f00812
        return 1;
Packit f00812
    }
Packit f00812
    
Packit f00812
    /* By setting to 0xAA, we expose bugs in
Packit f00812
    yy_init_globals. Leave at 0x00 for releases. */
Packit f00812
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
Packit f00812
    
Packit f00812
    yyset_extra (yy_user_defined, *ptr_yy_globals);
Packit f00812
    
Packit f00812
    return yy_init_globals ( *ptr_yy_globals );
Packit f00812
}
Packit f00812
Packit f00812
%endif if-c-only
Packit f00812
%# Actually, that ended an if-rentrant section
Packit f00812
Packit f00812
%if-c-only
Packit f00812
static int yy_init_globals YYFARGS0(void)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
    /* Initialization is the same as for the non-reentrant scanner.
Packit f00812
     * This function is called from yylex_destroy(), so don't allocate here.
Packit f00812
     */
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_USE_LINENO]],
Packit f00812
[[
Packit f00812
    m4_ifdef( [[M4_YY_NOT_REENTRANT]],
Packit f00812
    [[
Packit f00812
    /* We do not touch yylineno unless the option is enabled. */
Packit f00812
    yylineno =  1;
Packit f00812
    ]])
Packit f00812
]])
Packit f00812
    YY_G(yy_buffer_stack) = NULL;
Packit f00812
    YY_G(yy_buffer_stack_top) = 0;
Packit f00812
    YY_G(yy_buffer_stack_max) = 0;
Packit f00812
    YY_G(yy_c_buf_p) = NULL;
Packit f00812
    YY_G(yy_init) = 0;
Packit f00812
    YY_G(yy_start) = 0;
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_HAS_START_STACK_VARS]],
Packit f00812
[[
Packit f00812
    YY_G(yy_start_stack_ptr) = 0;
Packit f00812
    YY_G(yy_start_stack_depth) = 0;
Packit f00812
    YY_G(yy_start_stack) =  NULL;
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_USES_REJECT]],
Packit f00812
[[
Packit f00812
    YY_G(yy_state_buf) = 0;
Packit f00812
    YY_G(yy_state_ptr) = 0;
Packit f00812
    YY_G(yy_full_match) = 0;
Packit f00812
    YY_G(yy_lp) = 0;
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_TEXT_IS_ARRAY]],
Packit f00812
[[
Packit f00812
    YY_G(yytext_ptr) = 0;
Packit f00812
    YY_G(yy_more_offset) = 0;
Packit f00812
    YY_G(yy_prev_more_offset) = 0;
Packit f00812
]])
Packit f00812
Packit f00812
/* Defined in main.c */
Packit f00812
#ifdef YY_STDINIT
Packit f00812
    yyin = stdin;
Packit f00812
    yyout = stdout;
Packit f00812
#else
Packit f00812
    yyin = NULL;
Packit f00812
    yyout = NULL;
Packit f00812
#endif
Packit f00812
Packit f00812
    /* For future reference: Set errno on error, since we are called by
Packit f00812
     * yylex_init()
Packit f00812
     */
Packit f00812
    return 0;
Packit f00812
}
Packit f00812
%endif
Packit f00812
Packit f00812
Packit f00812
%if-c-only SNIP! this currently causes conflicts with the c++ scanner
Packit f00812
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
Packit f00812
int yylex_destroy  YYFARGS0(void)
Packit f00812
{
Packit f00812
    M4_YY_DECL_GUTS_VAR();
Packit f00812
Packit f00812
    /* Pop the buffer stack, destroying each element. */
Packit f00812
	while(YY_CURRENT_BUFFER){
Packit f00812
		yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG );
Packit f00812
		YY_CURRENT_BUFFER_LVALUE = NULL;
Packit f00812
		yypop_buffer_state(M4_YY_CALL_ONLY_ARG);
Packit f00812
	}
Packit f00812
Packit f00812
	/* Destroy the stack itself. */
Packit f00812
	yyfree(YY_G(yy_buffer_stack) M4_YY_CALL_LAST_ARG);
Packit f00812
	YY_G(yy_buffer_stack) = NULL;
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_HAS_START_STACK_VARS]],
Packit f00812
[[
Packit f00812
    /* Destroy the start condition stack. */
Packit f00812
        yyfree( YY_G(yy_start_stack) M4_YY_CALL_LAST_ARG );
Packit f00812
        YY_G(yy_start_stack) = NULL;
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_USES_REJECT]],
Packit f00812
[[
Packit f00812
    yyfree ( YY_G(yy_state_buf) M4_YY_CALL_LAST_ARG);
Packit f00812
    YY_G(yy_state_buf)  = NULL;
Packit f00812
]])
Packit f00812
Packit f00812
    /* Reset the globals. This is important in a non-reentrant scanner so the next time
Packit f00812
     * yylex() is called, initialization will occur. */
Packit f00812
    yy_init_globals( M4_YY_CALL_ONLY_ARG);
Packit f00812
Packit f00812
%if-reentrant
Packit f00812
    /* Destroy the main struct (reentrant only). */
Packit f00812
    yyfree ( yyscanner M4_YY_CALL_LAST_ARG );
Packit f00812
    yyscanner = NULL;
Packit f00812
%endif
Packit f00812
    return 0;
Packit f00812
}
Packit f00812
%endif
Packit f00812
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
/*
Packit f00812
 * Internal utility routines.
Packit f00812
 */
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
#ifndef yytext_ptr
Packit f00812
static void yy_flex_strncpy YYFARGS3( char*,s1, yyconst char *,s2, int,n)
Packit f00812
{
Packit f00812
	M4_YY_DECL_GUTS_VAR();
Packit f00812
	M4_YY_NOOP_GUTS_VAR();
Packit f00812
Packit f00812
	int i;
Packit f00812
	for ( i = 0; i < n; ++i )
Packit f00812
		s1[i] = s2[i];
Packit f00812
}
Packit f00812
#endif
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
Packit f00812
[[
Packit f00812
#ifdef YY_NEED_STRLEN
Packit f00812
static int yy_flex_strlen YYFARGS1( yyconst char *,s)
Packit f00812
{
Packit f00812
	int n;
Packit f00812
	for ( n = 0; s[n]; ++n )
Packit f00812
		;
Packit f00812
Packit f00812
	return n;
Packit f00812
}
Packit f00812
#endif
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_FLEX_ALLOC]],,
Packit f00812
[[
Packit f00812
void *yyalloc YYFARGS1( yy_size_t ,size)
Packit f00812
{
Packit f00812
	M4_YY_DECL_GUTS_VAR();
Packit f00812
	M4_YY_NOOP_GUTS_VAR();
Packit f00812
	return malloc(size);
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_FLEX_REALLOC]],,
Packit f00812
[[
Packit f00812
void *yyrealloc  YYFARGS2( void *,ptr, yy_size_t ,size)
Packit f00812
{
Packit f00812
	M4_YY_DECL_GUTS_VAR();
Packit f00812
	M4_YY_NOOP_GUTS_VAR();
Packit f00812
Packit f00812
	/* The cast to (char *) in the following accommodates both
Packit f00812
	 * implementations that use char* generic pointers, and those
Packit f00812
	 * that use void* generic pointers.  It works with the latter
Packit f00812
	 * because both ANSI C and C++ allow castless assignment from
Packit f00812
	 * any pointer type to void*, and deal with argument conversions
Packit f00812
	 * as though doing an assignment.
Packit f00812
	 */
Packit f00812
	return realloc(ptr, size);
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
m4_ifdef( [[M4_YY_NO_FLEX_FREE]],,
Packit f00812
[[
Packit f00812
void yyfree YYFARGS1( void *,ptr)
Packit f00812
{
Packit f00812
	M4_YY_DECL_GUTS_VAR();
Packit f00812
	M4_YY_NOOP_GUTS_VAR();
Packit f00812
	free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
%if-tables-serialization definitions
Packit f00812
m4preproc_include(`tables_shared.c')
Packit f00812
Packit f00812
static int yytbl_read8 (void *v, struct yytbl_reader * rd)
Packit f00812
{
Packit f00812
    errno = 0;
Packit f00812
    if (fread (v, sizeof (flex_uint8_t), 1, rd->fp) != 1){
Packit f00812
        errno = EIO;
Packit f00812
        return -1;
Packit f00812
    }
Packit f00812
    rd->bread += sizeof(flex_uint8_t);
Packit f00812
    return 0;
Packit f00812
}
Packit f00812
Packit f00812
static int yytbl_read16 (void *v, struct yytbl_reader * rd)
Packit f00812
{
Packit f00812
    errno = 0;
Packit f00812
    if (fread (v, sizeof (flex_uint16_t), 1, rd->fp) != 1){
Packit f00812
        errno = EIO;
Packit f00812
        return -1;
Packit f00812
    }
Packit f00812
    *((flex_uint16_t *) v) = ntohs (*((flex_uint16_t *) v));
Packit f00812
    rd->bread += sizeof(flex_uint16_t);
Packit f00812
    return 0;
Packit f00812
}
Packit f00812
Packit f00812
static int yytbl_read32 (void *v, struct yytbl_reader * rd)
Packit f00812
{
Packit f00812
    errno = 0;
Packit f00812
    if (fread (v, sizeof (flex_uint32_t), 1, rd->fp) != 1){
Packit f00812
        errno = EIO;
Packit f00812
        return -1;
Packit f00812
    }
Packit f00812
    *((flex_uint32_t *) v) = ntohl (*((flex_uint32_t *) v));
Packit f00812
    rd->bread += sizeof(flex_uint32_t);
Packit f00812
    return 0;
Packit f00812
}
Packit f00812
Packit f00812
/** Read the header */
Packit f00812
static int yytbl_hdr_read YYFARGS2(struct yytbl_hdr *, th, struct yytbl_reader *, rd)
Packit f00812
{
Packit f00812
    size_t  bytes;
Packit f00812
    memset (th, 0, sizeof (struct yytbl_hdr));
Packit f00812
Packit f00812
    if (yytbl_read32 (&(th->th_magic), rd) != 0)
Packit f00812
        return -1;
Packit f00812
Packit f00812
    if (th->th_magic != YYTBL_MAGIC){
Packit f00812
        YY_FATAL_ERROR( "bad magic number" );   /* TODO: not fatal. */
Packit f00812
        return -1;
Packit f00812
    }
Packit f00812
Packit f00812
    if (yytbl_read32 (&(th->th_hsize), rd) != 0
Packit f00812
        || yytbl_read32 (&(th->th_ssize), rd) != 0
Packit f00812
        || yytbl_read16 (&(th->th_flags), rd) != 0)
Packit f00812
        return -1;
Packit f00812
Packit f00812
    /* Sanity check on header size. Greater than 1k suggests some funny business. */
Packit f00812
    if (th->th_hsize < 16 || th->th_hsize > 1024){
Packit f00812
        YY_FATAL_ERROR( "insane header size detected" );   /* TODO: not fatal. */
Packit f00812
        return -1;
Packit f00812
    }
Packit f00812
Packit f00812
    /* Allocate enough space for the version and name fields */
Packit f00812
    bytes = th->th_hsize - 14;
Packit f00812
    th->th_version = (char *) yyalloc (bytes M4_YY_CALL_LAST_ARG);
Packit f00812
    if ( ! th->th_version )
Packit f00812
        YY_FATAL_ERROR( "out of dynamic memory in yytbl_hdr_read()" );
Packit f00812
Packit f00812
    /* we read it all into th_version, and point th_name into that data */
Packit f00812
    if (fread (th->th_version, 1, bytes, rd->fp) != bytes){
Packit f00812
        errno = EIO;
Packit f00812
        yyfree(th->th_version M4_YY_CALL_LAST_ARG);
Packit f00812
        th->th_version = NULL;
Packit f00812
        return -1;
Packit f00812
    }
Packit f00812
    else
Packit f00812
        rd->bread += bytes;
Packit f00812
Packit f00812
    th->th_name = th->th_version + strlen (th->th_version) + 1;
Packit f00812
    return 0;
Packit f00812
}
Packit f00812
Packit f00812
/** lookup id in the dmap list.
Packit f00812
 *  @param dmap pointer to first element in list
Packit f00812
 *  @return NULL if not found.
Packit f00812
 */
Packit f00812
static struct yytbl_dmap *yytbl_dmap_lookup YYFARGS2(struct yytbl_dmap *, dmap,
Packit f00812
                                                      int, id)
Packit f00812
{
Packit f00812
	M4_YY_DECL_GUTS_VAR();
Packit f00812
	M4_YY_NOOP_GUTS_VAR();
Packit f00812
Packit f00812
    while (dmap->dm_id)
Packit f00812
        if ((int)(dmap->dm_id) == id)
Packit f00812
            return dmap;
Packit f00812
        else
Packit f00812
            dmap++;
Packit f00812
    return NULL;
Packit f00812
}
Packit f00812
Packit f00812
/** Read a table while mapping its contents to the local array. 
Packit f00812
 *  @param dmap used to performing mapping
Packit f00812
 *  @return 0 on success
Packit f00812
 */
Packit f00812
static int yytbl_data_load YYFARGS2(struct yytbl_dmap *, dmap, struct yytbl_reader*, rd)
Packit f00812
{
Packit f00812
    struct yytbl_data td;
Packit f00812
    struct yytbl_dmap *transdmap=0;
Packit f00812
    int     len, i, rv, inner_loop_count;
Packit f00812
    void   *p=0;
Packit f00812
Packit f00812
    memset (&td, 0, sizeof (struct yytbl_data));
Packit f00812
Packit f00812
    if (yytbl_read16 (&td.td_id, rd) != 0
Packit f00812
        || yytbl_read16 (&td.td_flags, rd) != 0
Packit f00812
        || yytbl_read32 (&td.td_hilen, rd) != 0
Packit f00812
        || yytbl_read32 (&td.td_lolen, rd) != 0)
Packit f00812
        return -1;
Packit f00812
Packit f00812
    /* Lookup the map for the transition table so we have it in case we need it
Packit f00812
     * inside the loop below. This scanner might not even have a transition
Packit f00812
     * table, which is ok.
Packit f00812
     */
Packit f00812
    transdmap = yytbl_dmap_lookup (dmap, YYTD_ID_TRANSITION M4_YY_CALL_LAST_ARG);
Packit f00812
Packit f00812
    if ((dmap = yytbl_dmap_lookup (dmap, td.td_id M4_YY_CALL_LAST_ARG)) == NULL){
Packit f00812
        YY_FATAL_ERROR( "table id not found in map." );   /* TODO: not fatal. */
Packit f00812
        return -1;
Packit f00812
    }
Packit f00812
Packit f00812
    /* Allocate space for table.
Packit f00812
     * The --full yy_transition table is a special case, since we
Packit f00812
     * need the dmap.dm_sz entry to tell us the sizeof the individual
Packit f00812
     * struct members.
Packit f00812
     */
Packit f00812
    {
Packit f00812
    size_t  bytes;
Packit f00812
Packit f00812
    if ((td.td_flags & YYTD_STRUCT))
Packit f00812
        bytes = sizeof(struct yy_trans_info) * td.td_lolen * (td.td_hilen ? td.td_hilen : 1);
Packit f00812
    else
Packit f00812
        bytes = td.td_lolen * (td.td_hilen ? td.td_hilen : 1) * dmap->dm_sz;
Packit f00812
Packit f00812
    if(M4_YY_TABLES_VERIFY)
Packit f00812
        /* We point to the array itself */
Packit f00812
        p = dmap->dm_arr; 
Packit f00812
    else
Packit f00812
        /* We point to the address of a pointer. */
Packit f00812
        *dmap->dm_arr = p = (void *) yyalloc (bytes M4_YY_CALL_LAST_ARG);
Packit f00812
        if ( ! p )
Packit f00812
            YY_FATAL_ERROR( "out of dynamic memory in yytbl_data_load()" );
Packit f00812
    }
Packit f00812
Packit f00812
    /* If it's a struct, we read 2 integers to get one element */
Packit f00812
    if ((td.td_flags & YYTD_STRUCT) != 0)
Packit f00812
        inner_loop_count = 2;
Packit f00812
    else
Packit f00812
        inner_loop_count = 1;
Packit f00812
Packit f00812
    /* read and map each element.
Packit f00812
     * This loop iterates once for each element of the td_data array.
Packit f00812
     * Notice that we increment 'i' in the inner loop.
Packit f00812
     */
Packit f00812
    len = yytbl_calc_total_len (&td);
Packit f00812
    for (i = 0; i < len; ){
Packit f00812
        int    j;
Packit f00812
Packit f00812
Packit f00812
        /* This loop really executes exactly 1 or 2 times.
Packit f00812
         * The second time is to handle the second member of the
Packit f00812
         * YYTD_STRUCT for the yy_transition array.
Packit f00812
         */
Packit f00812
        for (j = 0; j < inner_loop_count; j++, i++) {
Packit f00812
            flex_int32_t t32;
Packit f00812
Packit f00812
            /* read into t32 no matter what the real size is. */
Packit f00812
            {
Packit f00812
            flex_int16_t t16;
Packit f00812
            flex_int8_t  t8;
Packit f00812
Packit f00812
            switch (YYTDFLAGS2BYTES (td.td_flags)) {
Packit f00812
            case sizeof (flex_int32_t):
Packit f00812
                rv = yytbl_read32 (&t32, rd);
Packit f00812
                break;
Packit f00812
            case sizeof (flex_int16_t):
Packit f00812
                rv = yytbl_read16 (&t16, rd);
Packit f00812
                t32 = t16;
Packit f00812
                break;
Packit f00812
            case sizeof (flex_int8_t):
Packit f00812
                rv = yytbl_read8 (&t8, rd);
Packit f00812
                t32 = t8;
Packit f00812
                break;
Packit f00812
            default: 
Packit f00812
                YY_FATAL_ERROR( "invalid td_flags" );   /* TODO: not fatal. */
Packit f00812
                return -1;
Packit f00812
            }
Packit f00812
            }
Packit f00812
            if (rv != 0)
Packit f00812
                return -1;
Packit f00812
Packit f00812
            /* copy into the deserialized array... */
Packit f00812
Packit f00812
            if ((td.td_flags & YYTD_STRUCT)) {
Packit f00812
                /* t32 is the j'th member of a two-element struct. */
Packit f00812
                void   *v;
Packit f00812
Packit f00812
                v = j == 0 ? &(((struct yy_trans_info *) p)->yy_verify)
Packit f00812
                    : &(((struct yy_trans_info *) p)->yy_nxt);
Packit f00812
Packit f00812
                switch (dmap->dm_sz) {
Packit f00812
                case sizeof (flex_int32_t):
Packit f00812
                    if (M4_YY_TABLES_VERIFY){
Packit f00812
                        if( ((flex_int32_t *) v)[0] != (flex_int32_t) t32)
Packit f00812
                           YY_FATAL_ERROR( "tables verification failed at YYTD_STRUCT flex_int32_t" );
Packit f00812
                    }else
Packit f00812
                        ((flex_int32_t *) v)[0] = (flex_int32_t) t32;
Packit f00812
                    break;
Packit f00812
                case sizeof (flex_int16_t):
Packit f00812
                    if (M4_YY_TABLES_VERIFY ){
Packit f00812
                        if(((flex_int16_t *) v)[0] != (flex_int16_t) t32)
Packit f00812
                        YY_FATAL_ERROR( "tables verification failed at YYTD_STRUCT flex_int16_t" );
Packit f00812
                    }else
Packit f00812
                        ((flex_int16_t *) v)[0] = (flex_int16_t) t32;
Packit f00812
                    break;
Packit f00812
                case sizeof(flex_int8_t):
Packit f00812
                    if (M4_YY_TABLES_VERIFY ){
Packit f00812
                         if( ((flex_int8_t *) v)[0] != (flex_int8_t) t32)
Packit f00812
                        YY_FATAL_ERROR( "tables verification failed at YYTD_STRUCT flex_int8_t" );
Packit f00812
                    }else
Packit f00812
                        ((flex_int8_t *) v)[0] = (flex_int8_t) t32;
Packit f00812
                    break;
Packit f00812
                default:
Packit f00812
                    YY_FATAL_ERROR( "invalid dmap->dm_sz for struct" );   /* TODO: not fatal. */
Packit f00812
                    return -1;
Packit f00812
                }
Packit f00812
Packit f00812
                /* if we're done with j, increment p */
Packit f00812
                if (j == 1)
Packit f00812
                    p = (struct yy_trans_info *) p + 1;
Packit f00812
            }
Packit f00812
            else if ((td.td_flags & YYTD_PTRANS)) {
Packit f00812
                /* t32 is an index into the transition array. */
Packit f00812
                struct yy_trans_info *v;
Packit f00812
Packit f00812
Packit f00812
                if (!transdmap){
Packit f00812
                    YY_FATAL_ERROR( "transition table not found" );   /* TODO: not fatal. */
Packit f00812
                    return -1;
Packit f00812
                }
Packit f00812
                
Packit f00812
                if( M4_YY_TABLES_VERIFY)
Packit f00812
                    v = &(((struct yy_trans_info *) (transdmap->dm_arr))[t32]);
Packit f00812
                else
Packit f00812
                    v = &((*((struct yy_trans_info **) (transdmap->dm_arr)))[t32]);
Packit f00812
Packit f00812
                if(M4_YY_TABLES_VERIFY ){
Packit f00812
                    if( ((struct yy_trans_info **) p)[0] != v)
Packit f00812
                        YY_FATAL_ERROR( "tables verification failed at YYTD_PTRANS" );
Packit f00812
                }else
Packit f00812
                    ((struct yy_trans_info **) p)[0] = v;
Packit f00812
                
Packit f00812
                /* increment p */
Packit f00812
                p = (struct yy_trans_info **) p + 1;
Packit f00812
            }
Packit f00812
            else {
Packit f00812
                /* t32 is a plain int. copy data, then incrememnt p. */
Packit f00812
                switch (dmap->dm_sz) {
Packit f00812
                case sizeof (flex_int32_t):
Packit f00812
                    if(M4_YY_TABLES_VERIFY ){
Packit f00812
                        if( ((flex_int32_t *) p)[0] != (flex_int32_t) t32)
Packit f00812
                        YY_FATAL_ERROR( "tables verification failed at flex_int32_t" );
Packit f00812
                    }else
Packit f00812
                        ((flex_int32_t *) p)[0] = (flex_int32_t) t32;
Packit f00812
                    p = ((flex_int32_t *) p) + 1;
Packit f00812
                    break;
Packit f00812
                case sizeof (flex_int16_t):
Packit f00812
                    if(M4_YY_TABLES_VERIFY ){
Packit f00812
                        if( ((flex_int16_t *) p)[0] != (flex_int16_t) t32)
Packit f00812
                        YY_FATAL_ERROR( "tables verification failed at flex_int16_t" );
Packit f00812
                    }else
Packit f00812
                        ((flex_int16_t *) p)[0] = (flex_int16_t) t32;
Packit f00812
                    p = ((flex_int16_t *) p) + 1;
Packit f00812
                    break;
Packit f00812
                case sizeof (flex_int8_t):
Packit f00812
                    if(M4_YY_TABLES_VERIFY ){
Packit f00812
                        if( ((flex_int8_t *) p)[0] != (flex_int8_t) t32)
Packit f00812
                        YY_FATAL_ERROR( "tables verification failed at flex_int8_t" );
Packit f00812
                    }else
Packit f00812
                        ((flex_int8_t *) p)[0] = (flex_int8_t) t32;
Packit f00812
                    p = ((flex_int8_t *) p) + 1;
Packit f00812
                    break;
Packit f00812
                default:
Packit f00812
                    YY_FATAL_ERROR( "invalid dmap->dm_sz for plain int" );   /* TODO: not fatal. */
Packit f00812
                    return -1;
Packit f00812
                }
Packit f00812
            }
Packit f00812
        }
Packit f00812
Packit f00812
    }
Packit f00812
Packit f00812
    /* Now eat padding. */
Packit f00812
    {
Packit f00812
        int pad;
Packit f00812
        pad = yypad64(rd->bread);
Packit f00812
        while(--pad >= 0){
Packit f00812
            flex_int8_t t8;
Packit f00812
            if(yytbl_read8(&t8,rd) != 0)
Packit f00812
                return -1;
Packit f00812
        }
Packit f00812
    }
Packit f00812
Packit f00812
    return 0;
Packit f00812
}
Packit f00812
Packit f00812
%define-yytables   The name for this specific scanner's tables.
Packit f00812
Packit f00812
/* Find the key and load the DFA tables from the given stream.  */
Packit f00812
static int yytbl_fload YYFARGS2(FILE *, fp, const char *, key)
Packit f00812
{
Packit f00812
    int rv=0;
Packit f00812
    struct yytbl_hdr th;
Packit f00812
    struct yytbl_reader rd;
Packit f00812
Packit f00812
    rd.fp = fp;
Packit f00812
    th.th_version = NULL;
Packit f00812
Packit f00812
    /* Keep trying until we find the right set of tables or end of file. */
Packit f00812
    while (!feof(rd.fp)) {
Packit f00812
        rd.bread = 0;
Packit f00812
        if (yytbl_hdr_read (&th, &rd M4_YY_CALL_LAST_ARG) != 0){
Packit f00812
            rv = -1;
Packit f00812
            goto return_rv;
Packit f00812
        }
Packit f00812
Packit f00812
        /* A NULL key means choose the first set of tables. */
Packit f00812
        if (key == NULL)
Packit f00812
            break;
Packit f00812
Packit f00812
        if (strcmp(th.th_name,key) != 0){
Packit f00812
            /* Skip ahead to next set */
Packit f00812
            fseek(rd.fp, th.th_ssize - th.th_hsize, SEEK_CUR);
Packit f00812
            yyfree(th.th_version M4_YY_CALL_LAST_ARG);
Packit f00812
            th.th_version = NULL;
Packit f00812
        }
Packit f00812
        else
Packit f00812
            break;
Packit f00812
    }
Packit f00812
Packit f00812
    while (rd.bread < th.th_ssize){
Packit f00812
        /* Load the data tables */
Packit f00812
        if(yytbl_data_load (yydmap,&rd M4_YY_CALL_LAST_ARG) != 0){
Packit f00812
            rv = -1;
Packit f00812
            goto return_rv;
Packit f00812
        }
Packit f00812
    }
Packit f00812
Packit f00812
return_rv:
Packit f00812
    if(th.th_version){
Packit f00812
        yyfree(th.th_version M4_YY_CALL_LAST_ARG);
Packit f00812
        th.th_version = NULL;
Packit f00812
    }
Packit f00812
Packit f00812
    return rv;
Packit f00812
}
Packit f00812
Packit f00812
/** Load the DFA tables for this scanner from the given stream.  */
Packit f00812
int yytables_fload YYFARGS1(FILE *, fp)
Packit f00812
{
Packit f00812
Packit f00812
    if( yytbl_fload(fp, YYTABLES_NAME M4_YY_CALL_LAST_ARG) != 0)
Packit f00812
        return -1;
Packit f00812
    return 0;
Packit f00812
}
Packit f00812
Packit f00812
/** Destroy the loaded tables, freeing memory, etc.. */
Packit f00812
int yytables_destroy YYFARGS0(void)
Packit f00812
{   
Packit f00812
    struct yytbl_dmap *dmap=0;
Packit f00812
Packit f00812
    if(!M4_YY_TABLES_VERIFY){
Packit f00812
        /* Walk the dmap, freeing the pointers */
Packit f00812
        for(dmap=yydmap; dmap->dm_id; dmap++) {
Packit f00812
            void * v;
Packit f00812
            v = dmap->dm_arr;
Packit f00812
            if(v && *(char**)v){
Packit f00812
                    yyfree(*(char**)v M4_YY_CALL_LAST_ARG);
Packit f00812
                    *(char**)v = NULL;
Packit f00812
            }
Packit f00812
        }
Packit f00812
    }
Packit f00812
Packit f00812
    return 0;
Packit f00812
}
Packit f00812
Packit f00812
/* end table serialization code definitions */
Packit f00812
%endif
Packit f00812
Packit f00812
Packit f00812
m4_ifdef([[M4_YY_MAIN]], [[
Packit f00812
int main M4_YY_PARAMS(void);
Packit f00812
Packit f00812
int main ()
Packit f00812
{
Packit f00812
Packit f00812
%if-reentrant
Packit f00812
    yyscan_t lexer;
Packit f00812
    yylex_init(&lexer);
Packit f00812
    yylex( lexer );
Packit f00812
    yylex_destroy( lexer);
Packit f00812
Packit f00812
%endif
Packit f00812
%if-not-reentrant
Packit f00812
	yylex();
Packit f00812
%endif
Packit f00812
Packit f00812
	return 0;
Packit f00812
}
Packit f00812
]])
Packit f00812
Packit f00812
%ok-for-header
Packit f00812
m4_ifdef( [[M4_YY_IN_HEADER]],
Packit f00812
[[
Packit f00812
#undef YY_NEW_FILE
Packit f00812
#undef YY_FLUSH_BUFFER
Packit f00812
#undef yy_set_bol
Packit f00812
#undef yy_new_buffer
Packit f00812
#undef yy_set_interactive
Packit f00812
#undef YY_DO_BEFORE_ACTION
Packit f00812
Packit f00812
#ifdef YY_DECL_IS_OURS
Packit f00812
#undef YY_DECL_IS_OURS
Packit f00812
#undef YY_DECL
Packit f00812
#endif
Packit f00812
]])