1ab76bc97SJung-uk Kim /* File created from flex.skl via mkskel.sh */ 2ab76bc97SJung-uk Kim 3ab76bc97SJung-uk Kim #include "flexdef.h" 4ab76bc97SJung-uk Kim 5ab76bc97SJung-uk Kim const char *skel[] = { 6ab76bc97SJung-uk Kim "/* A lexical scanner generated by flex */", 7ab76bc97SJung-uk Kim "", 8ab76bc97SJung-uk Kim "", 9ab76bc97SJung-uk Kim "", 10ab76bc97SJung-uk Kim "m4_changecom", 11ab76bc97SJung-uk Kim "m4_changequote", 12ab76bc97SJung-uk Kim "m4_changequote([[, ]])", 13ab76bc97SJung-uk Kim "", 14ab76bc97SJung-uk Kim "", 15ab76bc97SJung-uk Kim "%not-for-header", 16ab76bc97SJung-uk Kim "%if-c-only", 17ab76bc97SJung-uk Kim "%if-not-reentrant", 18ab76bc97SJung-uk Kim "m4_ifelse(M4_YY_PREFIX,yy,,", 19ab76bc97SJung-uk Kim "#define yy_create_buffer M4_YY_PREFIX[[_create_buffer]]", 20ab76bc97SJung-uk Kim "#define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]]", 217e382390SJung-uk Kim "#define yy_scan_buffer M4_YY_PREFIX[[_scan_buffer]]", 227e382390SJung-uk Kim "#define yy_scan_string M4_YY_PREFIX[[_scan_string]]", 237e382390SJung-uk Kim "#define yy_scan_bytes M4_YY_PREFIX[[_scan_bytes]]", 24ab76bc97SJung-uk Kim "#define yy_init_buffer M4_YY_PREFIX[[_init_buffer]]", 25ab76bc97SJung-uk Kim "#define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]]", 26ab76bc97SJung-uk Kim "#define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]]", 27ab76bc97SJung-uk Kim "#define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]]", 287e382390SJung-uk Kim "#define yypush_buffer_state M4_YY_PREFIX[[push_buffer_state]]", 297e382390SJung-uk Kim "#define yypop_buffer_state M4_YY_PREFIX[[pop_buffer_state]]", 307e382390SJung-uk Kim "#define yyensure_buffer_stack M4_YY_PREFIX[[ensure_buffer_stack]]", 317e382390SJung-uk Kim "#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]]", 32ab76bc97SJung-uk Kim "#define yyin M4_YY_PREFIX[[in]]", 33ab76bc97SJung-uk Kim "#define yyleng M4_YY_PREFIX[[leng]]", 34ab76bc97SJung-uk Kim "#define yylex M4_YY_PREFIX[[lex]]", 35ab76bc97SJung-uk Kim "#define yylineno M4_YY_PREFIX[[lineno]]", 36ab76bc97SJung-uk Kim "#define yyout M4_YY_PREFIX[[out]]", 37ab76bc97SJung-uk Kim "#define yyrestart M4_YY_PREFIX[[restart]]", 38ab76bc97SJung-uk Kim "#define yytext M4_YY_PREFIX[[text]]", 39ab76bc97SJung-uk Kim "#define yywrap M4_YY_PREFIX[[wrap]]", 40ab76bc97SJung-uk Kim "#define yyalloc M4_YY_PREFIX[[alloc]]", 41ab76bc97SJung-uk Kim "#define yyrealloc M4_YY_PREFIX[[realloc]]", 42ab76bc97SJung-uk Kim "#define yyfree M4_YY_PREFIX[[free]]", 43ab76bc97SJung-uk Kim ")", 44ab76bc97SJung-uk Kim "%endif", 45ab76bc97SJung-uk Kim "%endif", 46ab76bc97SJung-uk Kim "%ok-for-header", 47ab76bc97SJung-uk Kim "", 48ab76bc97SJung-uk Kim "#define FLEX_SCANNER", 49ab76bc97SJung-uk Kim "#define YY_FLEX_MAJOR_VERSION 2", 507e382390SJung-uk Kim "#define YY_FLEX_MINOR_VERSION 6", 517e382390SJung-uk Kim "#define YY_FLEX_SUBMINOR_VERSION 4", 52ab76bc97SJung-uk Kim "#if YY_FLEX_SUBMINOR_VERSION > 0", 53ab76bc97SJung-uk Kim "#define FLEX_BETA", 54ab76bc97SJung-uk Kim "#endif", 55ab76bc97SJung-uk Kim "", 56ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_IN_HEADER]], , [[m4_define([[M4_YY_NOT_IN_HEADER]], [[]])]])", 57ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_REENTRANT]], , [[m4_define([[M4_YY_NOT_REENTRANT]], [[]])]])", 58ab76bc97SJung-uk Kim "", 59ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_STACK_USED]], [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]])", 60ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_REENTRANT]], [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]])", 61ab76bc97SJung-uk Kim "", 62ab76bc97SJung-uk Kim "", 63ab76bc97SJung-uk Kim "", 64ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define([[M4_YY_PREFIX]], [[yy]])]])", 65ab76bc97SJung-uk Kim "", 66ab76bc97SJung-uk Kim "", 67ab76bc97SJung-uk Kim "", 68ab76bc97SJung-uk Kim "%if-c++-only", 69ab76bc97SJung-uk Kim " /* The c++ scanner is a mess. The FlexLexer.h header file relies on the", 70ab76bc97SJung-uk Kim " * following macro. This is required in order to pass the c++-multiple-scanners", 71ab76bc97SJung-uk Kim " * test in the regression suite. We get reports that it breaks inheritance.", 72ab76bc97SJung-uk Kim " * We will address this in a future release of flex, or omit the C++ scanner", 73ab76bc97SJung-uk Kim " * altogether.", 74ab76bc97SJung-uk Kim " */", 75ab76bc97SJung-uk Kim " #define yyFlexLexer M4_YY_PREFIX[[FlexLexer]]", 76ab76bc97SJung-uk Kim "%endif", 77ab76bc97SJung-uk Kim "", 78ab76bc97SJung-uk Kim "%if-c-only", 797e382390SJung-uk Kim "m4_ifelse(M4_YY_PREFIX,yy,,", 807e382390SJung-uk Kim " ", 817e382390SJung-uk Kim "[[#ifdef yy_create_buffer", 827e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[_create_buffer_ALREADY_DEFINED", 837e382390SJung-uk Kim "#else", 847e382390SJung-uk Kim "#define yy_create_buffer ]]M4_YY_PREFIX[[_create_buffer", 857e382390SJung-uk Kim "#endif]]", 867e382390SJung-uk Kim "", 877e382390SJung-uk Kim " ", 887e382390SJung-uk Kim "[[#ifdef yy_delete_buffer", 897e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[_delete_buffer_ALREADY_DEFINED", 907e382390SJung-uk Kim "#else", 917e382390SJung-uk Kim "#define yy_delete_buffer ]]M4_YY_PREFIX[[_delete_buffer", 927e382390SJung-uk Kim "#endif]]", 937e382390SJung-uk Kim "", 947e382390SJung-uk Kim " ", 957e382390SJung-uk Kim "[[#ifdef yy_scan_buffer", 967e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[_scan_buffer_ALREADY_DEFINED", 977e382390SJung-uk Kim "#else", 987e382390SJung-uk Kim "#define yy_scan_buffer ]]M4_YY_PREFIX[[_scan_buffer", 997e382390SJung-uk Kim "#endif]]", 1007e382390SJung-uk Kim "", 1017e382390SJung-uk Kim " ", 1027e382390SJung-uk Kim "[[#ifdef yy_scan_string", 1037e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[_scan_string_ALREADY_DEFINED", 1047e382390SJung-uk Kim "#else", 1057e382390SJung-uk Kim "#define yy_scan_string ]]M4_YY_PREFIX[[_scan_string", 1067e382390SJung-uk Kim "#endif]]", 1077e382390SJung-uk Kim "", 1087e382390SJung-uk Kim " ", 1097e382390SJung-uk Kim "[[#ifdef yy_scan_bytes", 1107e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[_scan_bytes_ALREADY_DEFINED", 1117e382390SJung-uk Kim "#else", 1127e382390SJung-uk Kim "#define yy_scan_bytes ]]M4_YY_PREFIX[[_scan_bytes", 1137e382390SJung-uk Kim "#endif]]", 1147e382390SJung-uk Kim "", 1157e382390SJung-uk Kim " ", 1167e382390SJung-uk Kim "[[#ifdef yy_init_buffer", 1177e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[_init_buffer_ALREADY_DEFINED", 1187e382390SJung-uk Kim "#else", 1197e382390SJung-uk Kim "#define yy_init_buffer ]]M4_YY_PREFIX[[_init_buffer", 1207e382390SJung-uk Kim "#endif]]", 1217e382390SJung-uk Kim "", 1227e382390SJung-uk Kim " ", 1237e382390SJung-uk Kim "[[#ifdef yy_flush_buffer", 1247e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[_flush_buffer_ALREADY_DEFINED", 1257e382390SJung-uk Kim "#else", 1267e382390SJung-uk Kim "#define yy_flush_buffer ]]M4_YY_PREFIX[[_flush_buffer", 1277e382390SJung-uk Kim "#endif]]", 1287e382390SJung-uk Kim "", 1297e382390SJung-uk Kim " ", 1307e382390SJung-uk Kim "[[#ifdef yy_load_buffer_state", 1317e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[_load_buffer_state_ALREADY_DEFINED", 1327e382390SJung-uk Kim "#else", 1337e382390SJung-uk Kim "#define yy_load_buffer_state ]]M4_YY_PREFIX[[_load_buffer_state", 1347e382390SJung-uk Kim "#endif]]", 1357e382390SJung-uk Kim "", 1367e382390SJung-uk Kim " ", 1377e382390SJung-uk Kim "[[#ifdef yy_switch_to_buffer", 1387e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[_switch_to_buffer_ALREADY_DEFINED", 1397e382390SJung-uk Kim "#else", 1407e382390SJung-uk Kim "#define yy_switch_to_buffer ]]M4_YY_PREFIX[[_switch_to_buffer", 1417e382390SJung-uk Kim "#endif]]", 1427e382390SJung-uk Kim "", 1437e382390SJung-uk Kim " ", 1447e382390SJung-uk Kim "[[#ifdef yypush_buffer_state", 1457e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[push_buffer_state_ALREADY_DEFINED", 1467e382390SJung-uk Kim "#else", 1477e382390SJung-uk Kim "#define yypush_buffer_state ]]M4_YY_PREFIX[[push_buffer_state", 1487e382390SJung-uk Kim "#endif]]", 1497e382390SJung-uk Kim "", 1507e382390SJung-uk Kim " ", 1517e382390SJung-uk Kim "[[#ifdef yypop_buffer_state", 1527e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[pop_buffer_state_ALREADY_DEFINED", 1537e382390SJung-uk Kim "#else", 1547e382390SJung-uk Kim "#define yypop_buffer_state ]]M4_YY_PREFIX[[pop_buffer_state", 1557e382390SJung-uk Kim "#endif]]", 1567e382390SJung-uk Kim "", 1577e382390SJung-uk Kim " ", 1587e382390SJung-uk Kim "[[#ifdef yyensure_buffer_stack", 1597e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[ensure_buffer_stack_ALREADY_DEFINED", 1607e382390SJung-uk Kim "#else", 1617e382390SJung-uk Kim "#define yyensure_buffer_stack ]]M4_YY_PREFIX[[ensure_buffer_stack", 1627e382390SJung-uk Kim "#endif]]", 1637e382390SJung-uk Kim "", 1647e382390SJung-uk Kim " ", 1657e382390SJung-uk Kim "[[#ifdef yylex", 1667e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[lex_ALREADY_DEFINED", 1677e382390SJung-uk Kim "#else", 1687e382390SJung-uk Kim "#define yylex ]]M4_YY_PREFIX[[lex", 1697e382390SJung-uk Kim "#endif]]", 1707e382390SJung-uk Kim "", 1717e382390SJung-uk Kim " ", 1727e382390SJung-uk Kim "[[#ifdef yyrestart", 1737e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[restart_ALREADY_DEFINED", 1747e382390SJung-uk Kim "#else", 1757e382390SJung-uk Kim "#define yyrestart ]]M4_YY_PREFIX[[restart", 1767e382390SJung-uk Kim "#endif]]", 1777e382390SJung-uk Kim "", 1787e382390SJung-uk Kim " ", 1797e382390SJung-uk Kim "[[#ifdef yylex_init", 1807e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[lex_init_ALREADY_DEFINED", 1817e382390SJung-uk Kim "#else", 1827e382390SJung-uk Kim "#define yylex_init ]]M4_YY_PREFIX[[lex_init", 1837e382390SJung-uk Kim "#endif]]", 1847e382390SJung-uk Kim "", 1857e382390SJung-uk Kim " ", 1867e382390SJung-uk Kim "[[#ifdef yylex_init_extra", 1877e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[lex_init_extra_ALREADY_DEFINED", 1887e382390SJung-uk Kim "#else", 1897e382390SJung-uk Kim "#define yylex_init_extra ]]M4_YY_PREFIX[[lex_init_extra", 1907e382390SJung-uk Kim "#endif]]", 1917e382390SJung-uk Kim "", 1927e382390SJung-uk Kim " ", 1937e382390SJung-uk Kim "[[#ifdef yylex_destroy", 1947e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[lex_destroy_ALREADY_DEFINED", 1957e382390SJung-uk Kim "#else", 1967e382390SJung-uk Kim "#define yylex_destroy ]]M4_YY_PREFIX[[lex_destroy", 1977e382390SJung-uk Kim "#endif]]", 1987e382390SJung-uk Kim "", 1997e382390SJung-uk Kim " ", 2007e382390SJung-uk Kim "[[#ifdef yyget_debug", 2017e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[get_debug_ALREADY_DEFINED", 2027e382390SJung-uk Kim "#else", 2037e382390SJung-uk Kim "#define yyget_debug ]]M4_YY_PREFIX[[get_debug", 2047e382390SJung-uk Kim "#endif]]", 2057e382390SJung-uk Kim "", 2067e382390SJung-uk Kim " ", 2077e382390SJung-uk Kim "[[#ifdef yyset_debug", 2087e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[set_debug_ALREADY_DEFINED", 2097e382390SJung-uk Kim "#else", 2107e382390SJung-uk Kim "#define yyset_debug ]]M4_YY_PREFIX[[set_debug", 2117e382390SJung-uk Kim "#endif]]", 2127e382390SJung-uk Kim "", 2137e382390SJung-uk Kim " ", 2147e382390SJung-uk Kim "[[#ifdef yyget_extra", 2157e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[get_extra_ALREADY_DEFINED", 2167e382390SJung-uk Kim "#else", 2177e382390SJung-uk Kim "#define yyget_extra ]]M4_YY_PREFIX[[get_extra", 2187e382390SJung-uk Kim "#endif]]", 2197e382390SJung-uk Kim "", 2207e382390SJung-uk Kim " ", 2217e382390SJung-uk Kim "[[#ifdef yyset_extra", 2227e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[set_extra_ALREADY_DEFINED", 2237e382390SJung-uk Kim "#else", 2247e382390SJung-uk Kim "#define yyset_extra ]]M4_YY_PREFIX[[set_extra", 2257e382390SJung-uk Kim "#endif]]", 2267e382390SJung-uk Kim "", 2277e382390SJung-uk Kim " ", 2287e382390SJung-uk Kim "[[#ifdef yyget_in", 2297e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[get_in_ALREADY_DEFINED", 2307e382390SJung-uk Kim "#else", 2317e382390SJung-uk Kim "#define yyget_in ]]M4_YY_PREFIX[[get_in", 2327e382390SJung-uk Kim "#endif]]", 2337e382390SJung-uk Kim "", 2347e382390SJung-uk Kim " ", 2357e382390SJung-uk Kim "[[#ifdef yyset_in", 2367e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[set_in_ALREADY_DEFINED", 2377e382390SJung-uk Kim "#else", 2387e382390SJung-uk Kim "#define yyset_in ]]M4_YY_PREFIX[[set_in", 2397e382390SJung-uk Kim "#endif]]", 2407e382390SJung-uk Kim "", 2417e382390SJung-uk Kim " ", 2427e382390SJung-uk Kim "[[#ifdef yyget_out", 2437e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[get_out_ALREADY_DEFINED", 2447e382390SJung-uk Kim "#else", 2457e382390SJung-uk Kim "#define yyget_out ]]M4_YY_PREFIX[[get_out", 2467e382390SJung-uk Kim "#endif]]", 2477e382390SJung-uk Kim "", 2487e382390SJung-uk Kim " ", 2497e382390SJung-uk Kim "[[#ifdef yyset_out", 2507e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[set_out_ALREADY_DEFINED", 2517e382390SJung-uk Kim "#else", 2527e382390SJung-uk Kim "#define yyset_out ]]M4_YY_PREFIX[[set_out", 2537e382390SJung-uk Kim "#endif]]", 2547e382390SJung-uk Kim "", 2557e382390SJung-uk Kim " ", 2567e382390SJung-uk Kim "[[#ifdef yyget_leng", 2577e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[get_leng_ALREADY_DEFINED", 2587e382390SJung-uk Kim "#else", 2597e382390SJung-uk Kim "#define yyget_leng ]]M4_YY_PREFIX[[get_leng", 2607e382390SJung-uk Kim "#endif]]", 2617e382390SJung-uk Kim "", 2627e382390SJung-uk Kim " ", 2637e382390SJung-uk Kim "[[#ifdef yyget_text", 2647e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[get_text_ALREADY_DEFINED", 2657e382390SJung-uk Kim "#else", 2667e382390SJung-uk Kim "#define yyget_text ]]M4_YY_PREFIX[[get_text", 2677e382390SJung-uk Kim "#endif]]", 2687e382390SJung-uk Kim "", 2697e382390SJung-uk Kim " ", 2707e382390SJung-uk Kim "[[#ifdef yyget_lineno", 2717e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[get_lineno_ALREADY_DEFINED", 2727e382390SJung-uk Kim "#else", 2737e382390SJung-uk Kim "#define yyget_lineno ]]M4_YY_PREFIX[[get_lineno", 2747e382390SJung-uk Kim "#endif]]", 2757e382390SJung-uk Kim "", 2767e382390SJung-uk Kim " ", 2777e382390SJung-uk Kim "[[#ifdef yyset_lineno", 2787e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[set_lineno_ALREADY_DEFINED", 2797e382390SJung-uk Kim "#else", 2807e382390SJung-uk Kim "#define yyset_lineno ]]M4_YY_PREFIX[[set_lineno", 2817e382390SJung-uk Kim "#endif]]", 2827e382390SJung-uk Kim "", 283ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_REENTRANT]],", 284ab76bc97SJung-uk Kim " [[", 2857e382390SJung-uk Kim " ", 2867e382390SJung-uk Kim "[[#ifdef yyget_column", 2877e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[get_column_ALREADY_DEFINED", 2887e382390SJung-uk Kim "#else", 2897e382390SJung-uk Kim "#define yyget_column ]]M4_YY_PREFIX[[get_column", 2907e382390SJung-uk Kim "#endif]]", 2917e382390SJung-uk Kim "", 2927e382390SJung-uk Kim " ", 2937e382390SJung-uk Kim "[[#ifdef yyset_column", 2947e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[set_column_ALREADY_DEFINED", 2957e382390SJung-uk Kim "#else", 2967e382390SJung-uk Kim "#define yyset_column ]]M4_YY_PREFIX[[set_column", 2977e382390SJung-uk Kim "#endif]]", 2987e382390SJung-uk Kim "", 299ab76bc97SJung-uk Kim " ]])", 3007e382390SJung-uk Kim " ", 3017e382390SJung-uk Kim "[[#ifdef yywrap", 3027e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[wrap_ALREADY_DEFINED", 3037e382390SJung-uk Kim "#else", 3047e382390SJung-uk Kim "#define yywrap ]]M4_YY_PREFIX[[wrap", 3057e382390SJung-uk Kim "#endif]]", 3067e382390SJung-uk Kim "", 3077e382390SJung-uk Kim ")", 308ab76bc97SJung-uk Kim "%endif", 309ab76bc97SJung-uk Kim "", 310ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_BISON_LVAL]],", 311ab76bc97SJung-uk Kim "[[", 3127e382390SJung-uk Kim " ", 3137e382390SJung-uk Kim "[[#ifdef yyget_lval", 3147e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[get_lval_ALREADY_DEFINED", 3157e382390SJung-uk Kim "#else", 3167e382390SJung-uk Kim "#define yyget_lval ]]M4_YY_PREFIX[[get_lval", 3177e382390SJung-uk Kim "#endif]]", 3187e382390SJung-uk Kim "", 3197e382390SJung-uk Kim " ", 3207e382390SJung-uk Kim "[[#ifdef yyset_lval", 3217e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[set_lval_ALREADY_DEFINED", 3227e382390SJung-uk Kim "#else", 3237e382390SJung-uk Kim "#define yyset_lval ]]M4_YY_PREFIX[[set_lval", 3247e382390SJung-uk Kim "#endif]]", 3257e382390SJung-uk Kim "", 326ab76bc97SJung-uk Kim "]])", 327ab76bc97SJung-uk Kim "", 328ab76bc97SJung-uk Kim "m4_ifdef( [[<M4_YY_BISON_LLOC>]],", 329ab76bc97SJung-uk Kim "[[", 3307e382390SJung-uk Kim " ", 3317e382390SJung-uk Kim "[[#ifdef yyget_lloc", 3327e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[get_lloc_ALREADY_DEFINED", 3337e382390SJung-uk Kim "#else", 3347e382390SJung-uk Kim "#define yyget_lloc ]]M4_YY_PREFIX[[get_lloc", 3357e382390SJung-uk Kim "#endif]]", 3367e382390SJung-uk Kim "", 3377e382390SJung-uk Kim " ", 3387e382390SJung-uk Kim "[[#ifdef yyset_lloc", 3397e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[set_lloc_ALREADY_DEFINED", 3407e382390SJung-uk Kim "#else", 3417e382390SJung-uk Kim "#define yyset_lloc ]]M4_YY_PREFIX[[set_lloc", 3427e382390SJung-uk Kim "#endif]]", 3437e382390SJung-uk Kim "", 344ab76bc97SJung-uk Kim "]])", 345ab76bc97SJung-uk Kim "", 346ab76bc97SJung-uk Kim "", 3477e382390SJung-uk Kim "m4_ifelse(M4_YY_PREFIX,yy,,", 3487e382390SJung-uk Kim " ", 3497e382390SJung-uk Kim "[[#ifdef yyalloc", 3507e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[alloc_ALREADY_DEFINED", 3517e382390SJung-uk Kim "#else", 3527e382390SJung-uk Kim "#define yyalloc ]]M4_YY_PREFIX[[alloc", 3537e382390SJung-uk Kim "#endif]]", 3547e382390SJung-uk Kim "", 3557e382390SJung-uk Kim " ", 3567e382390SJung-uk Kim "[[#ifdef yyrealloc", 3577e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[realloc_ALREADY_DEFINED", 3587e382390SJung-uk Kim "#else", 3597e382390SJung-uk Kim "#define yyrealloc ]]M4_YY_PREFIX[[realloc", 3607e382390SJung-uk Kim "#endif]]", 3617e382390SJung-uk Kim "", 3627e382390SJung-uk Kim " ", 3637e382390SJung-uk Kim "[[#ifdef yyfree", 3647e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[free_ALREADY_DEFINED", 3657e382390SJung-uk Kim "#else", 3667e382390SJung-uk Kim "#define yyfree ]]M4_YY_PREFIX[[free", 3677e382390SJung-uk Kim "#endif]]", 3687e382390SJung-uk Kim "", 3697e382390SJung-uk Kim ")", 370ab76bc97SJung-uk Kim "", 371ab76bc97SJung-uk Kim "%if-c-only", 3727e382390SJung-uk Kim "m4_ifelse(M4_YY_PREFIX,yy,,", 373ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_REENTRANT]],", 374ab76bc97SJung-uk Kim "[[", 3757e382390SJung-uk Kim " ", 3767e382390SJung-uk Kim "[[#ifdef yytext", 3777e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[text_ALREADY_DEFINED", 3787e382390SJung-uk Kim "#else", 3797e382390SJung-uk Kim "#define yytext ]]M4_YY_PREFIX[[text", 3807e382390SJung-uk Kim "#endif]]", 3817e382390SJung-uk Kim "", 3827e382390SJung-uk Kim " ", 3837e382390SJung-uk Kim "[[#ifdef yyleng", 3847e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[leng_ALREADY_DEFINED", 3857e382390SJung-uk Kim "#else", 3867e382390SJung-uk Kim "#define yyleng ]]M4_YY_PREFIX[[leng", 3877e382390SJung-uk Kim "#endif]]", 3887e382390SJung-uk Kim "", 3897e382390SJung-uk Kim " ", 3907e382390SJung-uk Kim "[[#ifdef yyin", 3917e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[in_ALREADY_DEFINED", 3927e382390SJung-uk Kim "#else", 3937e382390SJung-uk Kim "#define yyin ]]M4_YY_PREFIX[[in", 3947e382390SJung-uk Kim "#endif]]", 3957e382390SJung-uk Kim "", 3967e382390SJung-uk Kim " ", 3977e382390SJung-uk Kim "[[#ifdef yyout", 3987e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[out_ALREADY_DEFINED", 3997e382390SJung-uk Kim "#else", 4007e382390SJung-uk Kim "#define yyout ]]M4_YY_PREFIX[[out", 4017e382390SJung-uk Kim "#endif]]", 4027e382390SJung-uk Kim "", 4037e382390SJung-uk Kim " ", 4047e382390SJung-uk Kim "[[#ifdef yy_flex_debug", 4057e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[_flex_debug_ALREADY_DEFINED", 4067e382390SJung-uk Kim "#else", 4077e382390SJung-uk Kim "#define yy_flex_debug ]]M4_YY_PREFIX[[_flex_debug", 4087e382390SJung-uk Kim "#endif]]", 4097e382390SJung-uk Kim "", 4107e382390SJung-uk Kim " ", 4117e382390SJung-uk Kim "[[#ifdef yylineno", 4127e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[lineno_ALREADY_DEFINED", 4137e382390SJung-uk Kim "#else", 4147e382390SJung-uk Kim "#define yylineno ]]M4_YY_PREFIX[[lineno", 4157e382390SJung-uk Kim "#endif]]", 4167e382390SJung-uk Kim "", 417ab76bc97SJung-uk Kim "]])", 4187e382390SJung-uk Kim ")", 419ab76bc97SJung-uk Kim "%endif", 420ab76bc97SJung-uk Kim "", 421ab76bc97SJung-uk Kim "", 422ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],", 423ab76bc97SJung-uk Kim "[[", 4247e382390SJung-uk Kim " ", 4257e382390SJung-uk Kim "[[#ifdef yytables_fload", 4267e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[tables_fload_ALREADY_DEFINED", 4277e382390SJung-uk Kim "#else", 4287e382390SJung-uk Kim "#define yytables_fload ]]M4_YY_PREFIX[[tables_fload", 4297e382390SJung-uk Kim "#endif]]", 4307e382390SJung-uk Kim "", 4317e382390SJung-uk Kim " ", 4327e382390SJung-uk Kim "[[#ifdef yytables_destroy", 4337e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[tables_destroy_ALREADY_DEFINED", 4347e382390SJung-uk Kim "#else", 4357e382390SJung-uk Kim "#define yytables_destroy ]]M4_YY_PREFIX[[tables_destroy", 4367e382390SJung-uk Kim "#endif]]", 4377e382390SJung-uk Kim "", 4387e382390SJung-uk Kim " ", 4397e382390SJung-uk Kim "[[#ifdef yyTABLES_NAME", 4407e382390SJung-uk Kim "#define ]]M4_YY_PREFIX[[TABLES_NAME_ALREADY_DEFINED", 4417e382390SJung-uk Kim "#else", 4427e382390SJung-uk Kim "#define yyTABLES_NAME ]]M4_YY_PREFIX[[TABLES_NAME", 4437e382390SJung-uk Kim "#endif]]", 4447e382390SJung-uk Kim "", 445ab76bc97SJung-uk Kim "]])", 446ab76bc97SJung-uk Kim "", 447ab76bc97SJung-uk Kim "/* First, we deal with platform-specific or compiler-specific issues. */", 448ab76bc97SJung-uk Kim "", 449ab76bc97SJung-uk Kim "/* begin standard C headers. */", 450ab76bc97SJung-uk Kim "%if-c-only", 451ab76bc97SJung-uk Kim "#include <stdio.h>", 452ab76bc97SJung-uk Kim "#include <string.h>", 453ab76bc97SJung-uk Kim "#include <errno.h>", 454ab76bc97SJung-uk Kim "#include <stdlib.h>", 455ab76bc97SJung-uk Kim "%endif", 456ab76bc97SJung-uk Kim "", 457ab76bc97SJung-uk Kim "%if-tables-serialization", 458ab76bc97SJung-uk Kim "#include <sys/types.h>", 459ab76bc97SJung-uk Kim "#include <netinet/in.h>", 460ab76bc97SJung-uk Kim "%endif", 461ab76bc97SJung-uk Kim "/* end standard C headers. */", 462ab76bc97SJung-uk Kim "", 463ab76bc97SJung-uk Kim "%if-c-or-c++", 464ab76bc97SJung-uk Kim "/* flex integer type definitions */", 465ab76bc97SJung-uk Kim "", 466ab76bc97SJung-uk Kim "#ifndef FLEXINT_H", 467ab76bc97SJung-uk Kim "#define FLEXINT_H", 468ab76bc97SJung-uk Kim "", 469ab76bc97SJung-uk Kim "/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */", 470ab76bc97SJung-uk Kim "", 471ab76bc97SJung-uk Kim "#if defined(__FreeBSD__) || \\", 472ab76bc97SJung-uk Kim " (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)", 473ab76bc97SJung-uk Kim "", 474ab76bc97SJung-uk Kim "/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,", 475ab76bc97SJung-uk Kim " * if you want the limit (max/min) macros for int types. ", 476ab76bc97SJung-uk Kim " */", 477ab76bc97SJung-uk Kim "#ifndef __STDC_LIMIT_MACROS", 478ab76bc97SJung-uk Kim "#define __STDC_LIMIT_MACROS 1", 479ab76bc97SJung-uk Kim "#endif", 480ab76bc97SJung-uk Kim "", 481ab76bc97SJung-uk Kim "#include <inttypes.h>", 482ab76bc97SJung-uk Kim "typedef int8_t flex_int8_t;", 483ab76bc97SJung-uk Kim "typedef uint8_t flex_uint8_t;", 484ab76bc97SJung-uk Kim "typedef int16_t flex_int16_t;", 485ab76bc97SJung-uk Kim "typedef uint16_t flex_uint16_t;", 486ab76bc97SJung-uk Kim "typedef int32_t flex_int32_t;", 487ab76bc97SJung-uk Kim "typedef uint32_t flex_uint32_t;", 488ab76bc97SJung-uk Kim "#else", 489ab76bc97SJung-uk Kim "typedef signed char flex_int8_t;", 490ab76bc97SJung-uk Kim "typedef short int flex_int16_t;", 491ab76bc97SJung-uk Kim "typedef int flex_int32_t;", 492ab76bc97SJung-uk Kim "typedef unsigned char flex_uint8_t; ", 493ab76bc97SJung-uk Kim "typedef unsigned short int flex_uint16_t;", 494ab76bc97SJung-uk Kim "typedef unsigned int flex_uint32_t;", 495ab76bc97SJung-uk Kim "", 496ab76bc97SJung-uk Kim "/* Limits of integral types. */", 497ab76bc97SJung-uk Kim "#ifndef INT8_MIN", 498ab76bc97SJung-uk Kim "#define INT8_MIN (-128)", 499ab76bc97SJung-uk Kim "#endif", 500ab76bc97SJung-uk Kim "#ifndef INT16_MIN", 501ab76bc97SJung-uk Kim "#define INT16_MIN (-32767-1)", 502ab76bc97SJung-uk Kim "#endif", 503ab76bc97SJung-uk Kim "#ifndef INT32_MIN", 504ab76bc97SJung-uk Kim "#define INT32_MIN (-2147483647-1)", 505ab76bc97SJung-uk Kim "#endif", 506ab76bc97SJung-uk Kim "#ifndef INT8_MAX", 507ab76bc97SJung-uk Kim "#define INT8_MAX (127)", 508ab76bc97SJung-uk Kim "#endif", 509ab76bc97SJung-uk Kim "#ifndef INT16_MAX", 510ab76bc97SJung-uk Kim "#define INT16_MAX (32767)", 511ab76bc97SJung-uk Kim "#endif", 512ab76bc97SJung-uk Kim "#ifndef INT32_MAX", 513ab76bc97SJung-uk Kim "#define INT32_MAX (2147483647)", 514ab76bc97SJung-uk Kim "#endif", 515ab76bc97SJung-uk Kim "#ifndef UINT8_MAX", 516ab76bc97SJung-uk Kim "#define UINT8_MAX (255U)", 517ab76bc97SJung-uk Kim "#endif", 518ab76bc97SJung-uk Kim "#ifndef UINT16_MAX", 519ab76bc97SJung-uk Kim "#define UINT16_MAX (65535U)", 520ab76bc97SJung-uk Kim "#endif", 521ab76bc97SJung-uk Kim "#ifndef UINT32_MAX", 522ab76bc97SJung-uk Kim "#define UINT32_MAX (4294967295U)", 523ab76bc97SJung-uk Kim "#endif", 524ab76bc97SJung-uk Kim "", 5257e382390SJung-uk Kim "#ifndef SIZE_MAX", 5267e382390SJung-uk Kim "#define SIZE_MAX (~(size_t)0)", 5277e382390SJung-uk Kim "#endif", 5287e382390SJung-uk Kim "", 529ab76bc97SJung-uk Kim "#endif /* ! C99 */", 530ab76bc97SJung-uk Kim "", 531ab76bc97SJung-uk Kim "#endif /* ! FLEXINT_H */", 532ab76bc97SJung-uk Kim "", 533ab76bc97SJung-uk Kim "%endif", 534ab76bc97SJung-uk Kim "", 535ab76bc97SJung-uk Kim "/* begin standard C++ headers. */", 5367e382390SJung-uk Kim "%if-c++-only", 537ab76bc97SJung-uk Kim "#include <iostream>", 538ab76bc97SJung-uk Kim "#include <errno.h>", 539ab76bc97SJung-uk Kim "#include <cstdlib>", 540ab76bc97SJung-uk Kim "#include <cstdio>", 541ab76bc97SJung-uk Kim "#include <cstring>", 542ab76bc97SJung-uk Kim "/* end standard C++ headers. */", 543ab76bc97SJung-uk Kim "%endif", 544ab76bc97SJung-uk Kim "", 5457e382390SJung-uk Kim "/* TODO: this is always defined, so inline it */", 546ab76bc97SJung-uk Kim "#define yyconst const", 547ab76bc97SJung-uk Kim "", 5487e382390SJung-uk Kim "#if defined(__GNUC__) && __GNUC__ >= 3", 5497e382390SJung-uk Kim "#define yynoreturn __attribute__((__noreturn__))", 5507e382390SJung-uk Kim "#else", 5517e382390SJung-uk Kim "#define yynoreturn", 5527e382390SJung-uk Kim "#endif", 553ab76bc97SJung-uk Kim "", 554ab76bc97SJung-uk Kim "%not-for-header", 555ab76bc97SJung-uk Kim "/* Returned upon end-of-file. */", 556ab76bc97SJung-uk Kim "#define YY_NULL 0", 557ab76bc97SJung-uk Kim "%ok-for-header", 558ab76bc97SJung-uk Kim "", 559ab76bc97SJung-uk Kim "%not-for-header", 5607e382390SJung-uk Kim "/* Promotes a possibly negative, possibly signed char to an", 5617e382390SJung-uk Kim " * integer in range [0..255] for use as an array index.", 562ab76bc97SJung-uk Kim " */", 5637e382390SJung-uk Kim "#define YY_SC_TO_UI(c) ((YY_CHAR) (c))", 564ab76bc97SJung-uk Kim "%ok-for-header", 565ab76bc97SJung-uk Kim "", 566ab76bc97SJung-uk Kim "", 567ab76bc97SJung-uk Kim "", 568ab76bc97SJung-uk Kim "%if-reentrant", 569ab76bc97SJung-uk Kim "", 570ab76bc97SJung-uk Kim "/* An opaque pointer. */", 571ab76bc97SJung-uk Kim "#ifndef YY_TYPEDEF_YY_SCANNER_T", 572ab76bc97SJung-uk Kim "#define YY_TYPEDEF_YY_SCANNER_T", 573ab76bc97SJung-uk Kim "typedef void* yyscan_t;", 574ab76bc97SJung-uk Kim "#endif", 575ab76bc97SJung-uk Kim "", 576ab76bc97SJung-uk Kim "m4_define( [[M4_YY_DECL_GUTS_VAR]], [[struct yyguts_t * yyg = (struct yyguts_t*)yyscanner]])", 577ab76bc97SJung-uk Kim "m4_define( [[M4_YY_NOOP_GUTS_VAR]], [[(void)yyg]])", 578ab76bc97SJung-uk Kim "m4_define( [[YY_G]], [[yyg->$1]])", 579ab76bc97SJung-uk Kim "", 580ab76bc97SJung-uk Kim "m4_define( [[M4_YY_PROTO_LAST_ARG]], [[, yyscan_t yyscanner]])", 581ab76bc97SJung-uk Kim "m4_define( [[M4_YY_PROTO_ONLY_ARG]], [[yyscan_t yyscanner]])", 582ab76bc97SJung-uk Kim "", 583ab76bc97SJung-uk Kim "m4_define( [[M4_YY_DEF_LAST_ARG]], [[, yyscan_t yyscanner]])", 584ab76bc97SJung-uk Kim "m4_define( [[M4_YY_DEF_ONLY_ARG]], [[yyscan_t yyscanner]])", 585ab76bc97SJung-uk Kim "m4_define( [[M4_YY_DECL_LAST_ARG]], [[yyscan_t yyscanner;]])", 586ab76bc97SJung-uk Kim "", 587ab76bc97SJung-uk Kim "m4_define( [[M4_YY_CALL_LAST_ARG]], [[, yyscanner]])", 588ab76bc97SJung-uk Kim "m4_define( [[M4_YY_CALL_ONLY_ARG]], [[yyscanner]])", 589ab76bc97SJung-uk Kim "", 590ab76bc97SJung-uk Kim "m4_define( [[M4_YY_DOC_PARAM]], [[@param yyscanner The scanner object.]])", 591ab76bc97SJung-uk Kim "", 592ab76bc97SJung-uk Kim "/* For convenience, these vars (plus the bison vars far below)", 593ab76bc97SJung-uk Kim " are macros in the reentrant scanner. */", 594ab76bc97SJung-uk Kim "#define yyin YY_G(yyin_r)", 595ab76bc97SJung-uk Kim "#define yyout YY_G(yyout_r)", 596ab76bc97SJung-uk Kim "#define yyextra YY_G(yyextra_r)", 597ab76bc97SJung-uk Kim "#define yyleng YY_G(yyleng_r)", 598ab76bc97SJung-uk Kim "#define yytext YY_G(yytext_r)", 599ab76bc97SJung-uk Kim "#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)", 600ab76bc97SJung-uk Kim "#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)", 601ab76bc97SJung-uk Kim "#define yy_flex_debug YY_G(yy_flex_debug_r)", 602ab76bc97SJung-uk Kim "", 603ab76bc97SJung-uk Kim "m4_define( [[M4_YY_INCR_LINENO]],", 604ab76bc97SJung-uk Kim "[[", 605ab76bc97SJung-uk Kim " do{ yylineno++;", 606ab76bc97SJung-uk Kim " yycolumn=0;", 607ab76bc97SJung-uk Kim " }while(0)", 608ab76bc97SJung-uk Kim "]])", 609ab76bc97SJung-uk Kim "", 610ab76bc97SJung-uk Kim "%endif", 611ab76bc97SJung-uk Kim "", 612ab76bc97SJung-uk Kim "", 613ab76bc97SJung-uk Kim "", 614ab76bc97SJung-uk Kim "%if-not-reentrant", 615ab76bc97SJung-uk Kim "", 616ab76bc97SJung-uk Kim "m4_define( [[M4_YY_INCR_LINENO]],", 617ab76bc97SJung-uk Kim "[[", 618ab76bc97SJung-uk Kim " yylineno++;", 619ab76bc97SJung-uk Kim "]])", 620ab76bc97SJung-uk Kim "", 621ab76bc97SJung-uk Kim "m4_define( [[M4_YY_DECL_GUTS_VAR]], [[m4_dnl]])", 622ab76bc97SJung-uk Kim "m4_define( [[M4_YY_NOOP_GUTS_VAR]], [[m4_dnl]])", 623ab76bc97SJung-uk Kim "m4_define( [[YY_G]], [[($1)]])", 624ab76bc97SJung-uk Kim "m4_define( [[M4_YY_PROTO_LAST_ARG]])", 625ab76bc97SJung-uk Kim "m4_define( [[M4_YY_PROTO_ONLY_ARG]], [[void]])", 626ab76bc97SJung-uk Kim "m4_define( [[M4_YY_DEF_LAST_ARG]])", 627ab76bc97SJung-uk Kim "", 628ab76bc97SJung-uk Kim "m4_define( [[M4_YY_DEF_ONLY_ARG]], [[void]])", 629ab76bc97SJung-uk Kim "m4_define([[M4_YY_DECL_LAST_ARG]])", 630ab76bc97SJung-uk Kim "m4_define([[M4_YY_CALL_LAST_ARG]])", 631ab76bc97SJung-uk Kim "m4_define([[M4_YY_CALL_ONLY_ARG]])", 6327e382390SJung-uk Kim "m4_define( [[M4_YY_DOC_PARAM]], )", 633ab76bc97SJung-uk Kim "", 634ab76bc97SJung-uk Kim "%endif", 635ab76bc97SJung-uk Kim "", 636ab76bc97SJung-uk Kim "", 637ab76bc97SJung-uk Kim "m4_define( [[YYFARGS1]], [[($1 $2 M4_YY_DEF_LAST_ARG)]])", 638ab76bc97SJung-uk Kim "m4_define( [[YYFARGS2]], [[($1 $2, $3 $4 M4_YY_DEF_LAST_ARG)]])", 639ab76bc97SJung-uk Kim "m4_define( [[YYFARGS3]], [[($1 $2, $3 $4, $5 $6 M4_YY_DEF_LAST_ARG)]])", 640ab76bc97SJung-uk Kim "", 641ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 642ab76bc97SJung-uk Kim "[[", 643ab76bc97SJung-uk Kim "/* Enter a start condition. This macro really ought to take a parameter,", 644ab76bc97SJung-uk Kim " * but we do it the disgusting crufty way forced on us by the ()-less", 645ab76bc97SJung-uk Kim " * definition of BEGIN.", 646ab76bc97SJung-uk Kim " */", 647ab76bc97SJung-uk Kim "#define BEGIN YY_G(yy_start) = 1 + 2 *", 648ab76bc97SJung-uk Kim "/* Translate the current start state into a value that can be later handed", 649ab76bc97SJung-uk Kim " * to BEGIN to return to the state. The YYSTATE alias is for lex", 650ab76bc97SJung-uk Kim " * compatibility.", 651ab76bc97SJung-uk Kim " */", 652ab76bc97SJung-uk Kim "#define YY_START ((YY_G(yy_start) - 1) / 2)", 653ab76bc97SJung-uk Kim "#define YYSTATE YY_START", 654ab76bc97SJung-uk Kim "/* Action number for EOF rule of a given start state. */", 655ab76bc97SJung-uk Kim "#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)", 656ab76bc97SJung-uk Kim "/* Special action meaning \"start processing a new file\". */", 657ab76bc97SJung-uk Kim "#define YY_NEW_FILE yyrestart( yyin M4_YY_CALL_LAST_ARG )", 658ab76bc97SJung-uk Kim "#define YY_END_OF_BUFFER_CHAR 0", 659ab76bc97SJung-uk Kim "]])", 660ab76bc97SJung-uk Kim "", 661ab76bc97SJung-uk Kim "/* Size of default input buffer. */", 662ab76bc97SJung-uk Kim "#ifndef YY_BUF_SIZE", 6637e382390SJung-uk Kim "#ifdef __ia64__", 6647e382390SJung-uk Kim "/* On IA-64, the buffer size is 16k, not 8k.", 6657e382390SJung-uk Kim " * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.", 6667e382390SJung-uk Kim " * Ditto for the __ia64__ case accordingly.", 6677e382390SJung-uk Kim " */", 6687e382390SJung-uk Kim "#define YY_BUF_SIZE 32768", 6697e382390SJung-uk Kim "#else", 670ab76bc97SJung-uk Kim "#define YY_BUF_SIZE 16384", 6717e382390SJung-uk Kim "#endif /* __ia64__ */", 672ab76bc97SJung-uk Kim "#endif", 673ab76bc97SJung-uk Kim "", 674ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 675ab76bc97SJung-uk Kim "[[", 676ab76bc97SJung-uk Kim "/* The state buf must be large enough to hold one state per character in the main buffer.", 677ab76bc97SJung-uk Kim " */", 678ab76bc97SJung-uk Kim "#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))", 679ab76bc97SJung-uk Kim "]])", 680ab76bc97SJung-uk Kim "", 681ab76bc97SJung-uk Kim "", 682ab76bc97SJung-uk Kim "#ifndef YY_TYPEDEF_YY_BUFFER_STATE", 683ab76bc97SJung-uk Kim "#define YY_TYPEDEF_YY_BUFFER_STATE", 684ab76bc97SJung-uk Kim "typedef struct yy_buffer_state *YY_BUFFER_STATE;", 685ab76bc97SJung-uk Kim "#endif", 686ab76bc97SJung-uk Kim "", 687ab76bc97SJung-uk Kim "#ifndef YY_TYPEDEF_YY_SIZE_T", 688ab76bc97SJung-uk Kim "#define YY_TYPEDEF_YY_SIZE_T", 689ab76bc97SJung-uk Kim "typedef size_t yy_size_t;", 690ab76bc97SJung-uk Kim "#endif", 691ab76bc97SJung-uk Kim "", 692ab76bc97SJung-uk Kim "%if-not-reentrant", 6937e382390SJung-uk Kim "extern int yyleng;", 694ab76bc97SJung-uk Kim "%endif", 695ab76bc97SJung-uk Kim "", 696ab76bc97SJung-uk Kim "%if-c-only", 697ab76bc97SJung-uk Kim "%if-not-reentrant", 698ab76bc97SJung-uk Kim "extern FILE *yyin, *yyout;", 699ab76bc97SJung-uk Kim "%endif", 700ab76bc97SJung-uk Kim "%endif", 701ab76bc97SJung-uk Kim "", 702ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 703ab76bc97SJung-uk Kim "[[", 704ab76bc97SJung-uk Kim "#define EOB_ACT_CONTINUE_SCAN 0", 705ab76bc97SJung-uk Kim "#define EOB_ACT_END_OF_FILE 1", 706ab76bc97SJung-uk Kim "#define EOB_ACT_LAST_MATCH 2", 707ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_USE_LINENO]],", 708ab76bc97SJung-uk Kim " [[", 709ab76bc97SJung-uk Kim " /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires", 710ab76bc97SJung-uk Kim " * access to the local variable yy_act. Since yyless() is a macro, it would break", 711ab76bc97SJung-uk Kim " * existing scanners that call yyless() from OUTSIDE yylex.", 712ab76bc97SJung-uk Kim " * One obvious solution it to make yy_act a global. I tried that, and saw", 713ab76bc97SJung-uk Kim " * a 5% performance hit in a non-yylineno scanner, because yy_act is", 714ab76bc97SJung-uk Kim " * normally declared as a register variable-- so it is not worth it.", 715ab76bc97SJung-uk Kim " */", 716ab76bc97SJung-uk Kim " #define YY_LESS_LINENO(n) \\", 717ab76bc97SJung-uk Kim " do { \\", 718ab76bc97SJung-uk Kim " int yyl;\\", 719ab76bc97SJung-uk Kim " for ( yyl = n; yyl < yyleng; ++yyl )\\", 720ab76bc97SJung-uk Kim " if ( yytext[yyl] == '\\n' )\\", 721ab76bc97SJung-uk Kim " --yylineno;\\", 722ab76bc97SJung-uk Kim " }while(0)", 7237e382390SJung-uk Kim " #define YY_LINENO_REWIND_TO(dst) \\", 7247e382390SJung-uk Kim " do {\\", 7257e382390SJung-uk Kim " const char *p;\\", 7267e382390SJung-uk Kim " for ( p = yy_cp-1; p >= (dst); --p)\\", 7277e382390SJung-uk Kim " if ( *p == '\\n' )\\", 7287e382390SJung-uk Kim " --yylineno;\\", 7297e382390SJung-uk Kim " }while(0)", 730ab76bc97SJung-uk Kim " ]],", 731ab76bc97SJung-uk Kim " [[", 732ab76bc97SJung-uk Kim " #define YY_LESS_LINENO(n)", 7337e382390SJung-uk Kim " #define YY_LINENO_REWIND_TO(ptr)", 734ab76bc97SJung-uk Kim " ]])", 735ab76bc97SJung-uk Kim "/* Return all but the first \"n\" matched characters back to the input stream. */", 736ab76bc97SJung-uk Kim "#define yyless(n) \\", 737ab76bc97SJung-uk Kim " do \\", 738ab76bc97SJung-uk Kim " { \\", 739ab76bc97SJung-uk Kim " /* Undo effects of setting up yytext. */ \\", 740ab76bc97SJung-uk Kim " int yyless_macro_arg = (n); \\", 741ab76bc97SJung-uk Kim " YY_LESS_LINENO(yyless_macro_arg);\\", 742ab76bc97SJung-uk Kim " *yy_cp = YY_G(yy_hold_char); \\", 743ab76bc97SJung-uk Kim " YY_RESTORE_YY_MORE_OFFSET \\", 744ab76bc97SJung-uk Kim " YY_G(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \\", 745ab76bc97SJung-uk Kim " YY_DO_BEFORE_ACTION; /* set up yytext again */ \\", 746ab76bc97SJung-uk Kim " } \\", 747ab76bc97SJung-uk Kim " while ( 0 )", 748ab76bc97SJung-uk Kim "#define unput(c) yyunput( c, YY_G(yytext_ptr) M4_YY_CALL_LAST_ARG )", 749ab76bc97SJung-uk Kim "]])", 750ab76bc97SJung-uk Kim "", 751ab76bc97SJung-uk Kim "#ifndef YY_STRUCT_YY_BUFFER_STATE", 752ab76bc97SJung-uk Kim "#define YY_STRUCT_YY_BUFFER_STATE", 753ab76bc97SJung-uk Kim "struct yy_buffer_state", 754ab76bc97SJung-uk Kim " {", 755ab76bc97SJung-uk Kim "%if-c-only", 756ab76bc97SJung-uk Kim " FILE *yy_input_file;", 757ab76bc97SJung-uk Kim "%endif", 758ab76bc97SJung-uk Kim "", 759ab76bc97SJung-uk Kim "%if-c++-only", 7607e382390SJung-uk Kim " std::streambuf* yy_input_file;", 761ab76bc97SJung-uk Kim "%endif", 762ab76bc97SJung-uk Kim "", 763ab76bc97SJung-uk Kim "", 764ab76bc97SJung-uk Kim " char *yy_ch_buf; /* input buffer */", 765ab76bc97SJung-uk Kim " char *yy_buf_pos; /* current position in input buffer */", 766ab76bc97SJung-uk Kim "", 767ab76bc97SJung-uk Kim " /* Size of input buffer in bytes, not including room for EOB", 768ab76bc97SJung-uk Kim " * characters.", 769ab76bc97SJung-uk Kim " */", 7707e382390SJung-uk Kim " int yy_buf_size;", 771ab76bc97SJung-uk Kim "", 772ab76bc97SJung-uk Kim " /* Number of characters read into yy_ch_buf, not including EOB", 773ab76bc97SJung-uk Kim " * characters.", 774ab76bc97SJung-uk Kim " */", 7757e382390SJung-uk Kim " int yy_n_chars;", 776ab76bc97SJung-uk Kim "", 777ab76bc97SJung-uk Kim " /* Whether we \"own\" the buffer - i.e., we know we created it,", 778ab76bc97SJung-uk Kim " * and can realloc() it to grow it, and should free() it to", 779ab76bc97SJung-uk Kim " * delete it.", 780ab76bc97SJung-uk Kim " */", 781ab76bc97SJung-uk Kim " int yy_is_our_buffer;", 782ab76bc97SJung-uk Kim "", 783ab76bc97SJung-uk Kim " /* Whether this is an \"interactive\" input source; if so, and", 784ab76bc97SJung-uk Kim " * if we're using stdio for input, then we want to use getc()", 785ab76bc97SJung-uk Kim " * instead of fread(), to make sure we stop fetching input after", 786ab76bc97SJung-uk Kim " * each newline.", 787ab76bc97SJung-uk Kim " */", 788ab76bc97SJung-uk Kim " int yy_is_interactive;", 789ab76bc97SJung-uk Kim "", 790ab76bc97SJung-uk Kim " /* Whether we're considered to be at the beginning of a line.", 791ab76bc97SJung-uk Kim " * If so, '^' rules will be active on the next match, otherwise", 792ab76bc97SJung-uk Kim " * not.", 793ab76bc97SJung-uk Kim " */", 794ab76bc97SJung-uk Kim " int yy_at_bol;", 795ab76bc97SJung-uk Kim "", 796ab76bc97SJung-uk Kim " int yy_bs_lineno; /**< The line count. */", 797ab76bc97SJung-uk Kim " int yy_bs_column; /**< The column count. */", 798ab76bc97SJung-uk Kim "", 799ab76bc97SJung-uk Kim "", 800ab76bc97SJung-uk Kim " /* Whether to try to fill the input buffer when we reach the", 801ab76bc97SJung-uk Kim " * end of it.", 802ab76bc97SJung-uk Kim " */", 803ab76bc97SJung-uk Kim " int yy_fill_buffer;", 804ab76bc97SJung-uk Kim "", 805ab76bc97SJung-uk Kim " int yy_buffer_status;", 806ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 807ab76bc97SJung-uk Kim "[[", 808ab76bc97SJung-uk Kim "#define YY_BUFFER_NEW 0", 809ab76bc97SJung-uk Kim "#define YY_BUFFER_NORMAL 1", 810ab76bc97SJung-uk Kim " /* When an EOF's been seen but there's still some text to process", 811ab76bc97SJung-uk Kim " * then we mark the buffer as YY_EOF_PENDING, to indicate that we", 812ab76bc97SJung-uk Kim " * shouldn't try reading from the input source any more. We might", 813ab76bc97SJung-uk Kim " * still have a bunch of tokens to match, though, because of", 814ab76bc97SJung-uk Kim " * possible backing-up.", 815ab76bc97SJung-uk Kim " *", 816ab76bc97SJung-uk Kim " * When we actually see the EOF, we change the status to \"new\"", 817ab76bc97SJung-uk Kim " * (via yyrestart()), so that the user can continue scanning by", 818ab76bc97SJung-uk Kim " * just pointing yyin at a new input file.", 819ab76bc97SJung-uk Kim " */", 820ab76bc97SJung-uk Kim "#define YY_BUFFER_EOF_PENDING 2", 821ab76bc97SJung-uk Kim "]])", 822ab76bc97SJung-uk Kim " };", 823ab76bc97SJung-uk Kim "#endif /* !YY_STRUCT_YY_BUFFER_STATE */", 824ab76bc97SJung-uk Kim "", 825ab76bc97SJung-uk Kim "%if-c-only Standard (non-C++) definition", 826ab76bc97SJung-uk Kim "%not-for-header", 827ab76bc97SJung-uk Kim "%if-not-reentrant", 828ab76bc97SJung-uk Kim "", 829ab76bc97SJung-uk Kim "/* Stack of input buffers. */", 830ab76bc97SJung-uk Kim "static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */", 831ab76bc97SJung-uk Kim "static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */", 8327e382390SJung-uk Kim "static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */", 833ab76bc97SJung-uk Kim "%endif", 834ab76bc97SJung-uk Kim "%ok-for-header", 835ab76bc97SJung-uk Kim "%endif", 836ab76bc97SJung-uk Kim "", 837ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 838ab76bc97SJung-uk Kim "[[", 839ab76bc97SJung-uk Kim "/* We provide macros for accessing buffer states in case in the", 840ab76bc97SJung-uk Kim " * future we want to put the buffer states in a more general", 841ab76bc97SJung-uk Kim " * \"scanner state\".", 842ab76bc97SJung-uk Kim " *", 843ab76bc97SJung-uk Kim " * Returns the top of the stack, or NULL.", 844ab76bc97SJung-uk Kim " */", 845ab76bc97SJung-uk Kim "#define YY_CURRENT_BUFFER ( YY_G(yy_buffer_stack) \\", 846ab76bc97SJung-uk Kim " ? YY_G(yy_buffer_stack)[YY_G(yy_buffer_stack_top)] \\", 847ab76bc97SJung-uk Kim " : NULL)", 848ab76bc97SJung-uk Kim "#define yy_current_buffer YY_CURRENT_BUFFER", 849ab76bc97SJung-uk Kim "/* Same as previous macro, but useful when we know that the buffer stack is not", 850ab76bc97SJung-uk Kim " * NULL or when we need an lvalue. For internal use only.", 851ab76bc97SJung-uk Kim " */", 852ab76bc97SJung-uk Kim "#define YY_CURRENT_BUFFER_LVALUE YY_G(yy_buffer_stack)[YY_G(yy_buffer_stack_top)]", 853ab76bc97SJung-uk Kim "]])", 854ab76bc97SJung-uk Kim "", 855ab76bc97SJung-uk Kim "%if-c-only Standard (non-C++) definition", 856ab76bc97SJung-uk Kim "", 857ab76bc97SJung-uk Kim "%if-not-reentrant", 858ab76bc97SJung-uk Kim "%not-for-header", 859ab76bc97SJung-uk Kim "/* yy_hold_char holds the character lost when yytext is formed. */", 860ab76bc97SJung-uk Kim "static char yy_hold_char;", 8617e382390SJung-uk Kim "static int yy_n_chars; /* number of characters read into yy_ch_buf */", 8627e382390SJung-uk Kim "int yyleng;", 863ab76bc97SJung-uk Kim "", 864ab76bc97SJung-uk Kim "/* Points to current character in buffer. */", 8657e382390SJung-uk Kim "static char *yy_c_buf_p = NULL;", 866ab76bc97SJung-uk Kim "static int yy_init = 0; /* whether we need to initialize */", 867ab76bc97SJung-uk Kim "static int yy_start = 0; /* start state number */", 868ab76bc97SJung-uk Kim "", 869ab76bc97SJung-uk Kim "/* Flag which is used to allow yywrap()'s to do buffer switches", 870ab76bc97SJung-uk Kim " * instead of setting up a fresh yyin. A bit of a hack ...", 871ab76bc97SJung-uk Kim " */", 872ab76bc97SJung-uk Kim "static int yy_did_buffer_switch_on_eof;", 873ab76bc97SJung-uk Kim "%ok-for-header", 874ab76bc97SJung-uk Kim "%endif", 875ab76bc97SJung-uk Kim "", 8767e382390SJung-uk Kim "void yyrestart ( FILE *input_file M4_YY_PROTO_LAST_ARG );", 8777e382390SJung-uk Kim "void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG );", 8787e382390SJung-uk Kim "YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size M4_YY_PROTO_LAST_ARG );", 8797e382390SJung-uk Kim "void yy_delete_buffer ( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG );", 8807e382390SJung-uk Kim "void yy_flush_buffer ( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG );", 8817e382390SJung-uk Kim "void yypush_buffer_state ( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG );", 8827e382390SJung-uk Kim "void yypop_buffer_state ( M4_YY_PROTO_ONLY_ARG );", 883ab76bc97SJung-uk Kim "", 884ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 885ab76bc97SJung-uk Kim "[[", 8867e382390SJung-uk Kim "static void yyensure_buffer_stack ( M4_YY_PROTO_ONLY_ARG );", 8877e382390SJung-uk Kim "static void yy_load_buffer_state ( M4_YY_PROTO_ONLY_ARG );", 8887e382390SJung-uk Kim "static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file M4_YY_PROTO_LAST_ARG );", 889ab76bc97SJung-uk Kim "#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG)", 890ab76bc97SJung-uk Kim "]])", 891ab76bc97SJung-uk Kim "", 8927e382390SJung-uk Kim "YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size M4_YY_PROTO_LAST_ARG );", 8937e382390SJung-uk Kim "YY_BUFFER_STATE yy_scan_string ( const char *yy_str M4_YY_PROTO_LAST_ARG );", 8947e382390SJung-uk Kim "YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len M4_YY_PROTO_LAST_ARG );", 895ab76bc97SJung-uk Kim "", 896ab76bc97SJung-uk Kim "%endif", 897ab76bc97SJung-uk Kim "", 8987e382390SJung-uk Kim "void *yyalloc ( yy_size_t M4_YY_PROTO_LAST_ARG );", 8997e382390SJung-uk Kim "void *yyrealloc ( void *, yy_size_t M4_YY_PROTO_LAST_ARG );", 9007e382390SJung-uk Kim "void yyfree ( void * M4_YY_PROTO_LAST_ARG );", 901ab76bc97SJung-uk Kim "", 902ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 903ab76bc97SJung-uk Kim "[[", 904ab76bc97SJung-uk Kim "#define yy_new_buffer yy_create_buffer", 905ab76bc97SJung-uk Kim "#define yy_set_interactive(is_interactive) \\", 906ab76bc97SJung-uk Kim " { \\", 907ab76bc97SJung-uk Kim " if ( ! YY_CURRENT_BUFFER ){ \\", 908ab76bc97SJung-uk Kim " yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); \\", 909ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE = \\", 910ab76bc97SJung-uk Kim " yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); \\", 911ab76bc97SJung-uk Kim " } \\", 912ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \\", 913ab76bc97SJung-uk Kim " }", 914ab76bc97SJung-uk Kim "#define yy_set_bol(at_bol) \\", 915ab76bc97SJung-uk Kim " { \\", 916ab76bc97SJung-uk Kim " if ( ! YY_CURRENT_BUFFER ){\\", 917ab76bc97SJung-uk Kim " yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); \\", 918ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE = \\", 919ab76bc97SJung-uk Kim " yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); \\", 920ab76bc97SJung-uk Kim " } \\", 921ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \\", 922ab76bc97SJung-uk Kim " }", 923ab76bc97SJung-uk Kim "#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)", 924ab76bc97SJung-uk Kim "]])", 925ab76bc97SJung-uk Kim "", 926ab76bc97SJung-uk Kim "%% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here", 927ab76bc97SJung-uk Kim "", 928ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 929ab76bc97SJung-uk Kim "[[", 930ab76bc97SJung-uk Kim "%% [1.5] DFA", 931ab76bc97SJung-uk Kim "]])", 932ab76bc97SJung-uk Kim "", 933ab76bc97SJung-uk Kim "%if-c-only Standard (non-C++) definition", 934ab76bc97SJung-uk Kim "", 935ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 936ab76bc97SJung-uk Kim "[[", 9377e382390SJung-uk Kim "static yy_state_type yy_get_previous_state ( M4_YY_PROTO_ONLY_ARG );", 9387e382390SJung-uk Kim "static yy_state_type yy_try_NUL_trans ( yy_state_type current_state M4_YY_PROTO_LAST_ARG);", 9397e382390SJung-uk Kim "static int yy_get_next_buffer ( M4_YY_PROTO_ONLY_ARG );", 940c6e66cbfSAlex Richardson "static void yynoreturn yy_fatal_error ( const char* msg M4_YY_PROTO_LAST_ARG );", 941ab76bc97SJung-uk Kim "]])", 942ab76bc97SJung-uk Kim "", 943ab76bc97SJung-uk Kim "%endif", 944ab76bc97SJung-uk Kim "", 945ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 946ab76bc97SJung-uk Kim "[[", 947ab76bc97SJung-uk Kim "/* Done after the current pattern has been matched and before the", 948ab76bc97SJung-uk Kim " * corresponding action - sets up yytext.", 949ab76bc97SJung-uk Kim " */", 950ab76bc97SJung-uk Kim "#define YY_DO_BEFORE_ACTION \\", 951ab76bc97SJung-uk Kim " YY_G(yytext_ptr) = yy_bp; \\", 952ab76bc97SJung-uk Kim "%% [2.0] code to fiddle yytext and yyleng for yymore() goes here \\", 953ab76bc97SJung-uk Kim " YY_G(yy_hold_char) = *yy_cp; \\", 954ab76bc97SJung-uk Kim " *yy_cp = '\\0'; \\", 955ab76bc97SJung-uk Kim "%% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \\", 956ab76bc97SJung-uk Kim " YY_G(yy_c_buf_p) = yy_cp;", 957ab76bc97SJung-uk Kim "%% [4.0] data tables for the DFA and the user's section 1 definitions go here", 958ab76bc97SJung-uk Kim "]])", 959ab76bc97SJung-uk Kim "", 960ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_IN_HEADER]], [[#ifdef YY_HEADER_EXPORT_START_CONDITIONS]])", 961ab76bc97SJung-uk Kim "M4_YY_SC_DEFS", 962ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_IN_HEADER]], [[#endif]])", 963ab76bc97SJung-uk Kim "", 964ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_UNISTD_H]],,", 965ab76bc97SJung-uk Kim "[[", 966ab76bc97SJung-uk Kim "#ifndef YY_NO_UNISTD_H", 967ab76bc97SJung-uk Kim "/* Special case for \"unistd.h\", since it is non-ANSI. We include it way", 968ab76bc97SJung-uk Kim " * down here because we want the user's section 1 to have been scanned first.", 969ab76bc97SJung-uk Kim " * The user has a chance to override it with an option.", 970ab76bc97SJung-uk Kim " */", 971ab76bc97SJung-uk Kim "%if-c-only", 972ab76bc97SJung-uk Kim "#include <unistd.h>", 973ab76bc97SJung-uk Kim "%endif", 974ab76bc97SJung-uk Kim "%if-c++-only", 975ab76bc97SJung-uk Kim "#include <unistd.h>", 976ab76bc97SJung-uk Kim "%endif", 977ab76bc97SJung-uk Kim "#endif", 978ab76bc97SJung-uk Kim "]])", 979ab76bc97SJung-uk Kim "", 980ab76bc97SJung-uk Kim "m4_ifdef( [[M4_EXTRA_TYPE_DEFS]],", 981ab76bc97SJung-uk Kim "[[", 982ab76bc97SJung-uk Kim "#define YY_EXTRA_TYPE M4_EXTRA_TYPE_DEFS", 983ab76bc97SJung-uk Kim "]],", 984ab76bc97SJung-uk Kim "[[", 985ab76bc97SJung-uk Kim "#ifndef YY_EXTRA_TYPE", 986ab76bc97SJung-uk Kim "#define YY_EXTRA_TYPE void *", 987ab76bc97SJung-uk Kim "#endif", 988ab76bc97SJung-uk Kim "]]", 989ab76bc97SJung-uk Kim ")", 990ab76bc97SJung-uk Kim "", 991ab76bc97SJung-uk Kim "%if-c-only Reentrant structure and macros (non-C++).", 992ab76bc97SJung-uk Kim "%if-reentrant", 993ab76bc97SJung-uk Kim "", 994ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 995ab76bc97SJung-uk Kim "[[", 996ab76bc97SJung-uk Kim "/* Holds the entire state of the reentrant scanner. */", 997ab76bc97SJung-uk Kim "struct yyguts_t", 998ab76bc97SJung-uk Kim " {", 999ab76bc97SJung-uk Kim "", 1000ab76bc97SJung-uk Kim " /* User-defined. Not touched by flex. */", 1001ab76bc97SJung-uk Kim " YY_EXTRA_TYPE yyextra_r;", 1002ab76bc97SJung-uk Kim "", 1003ab76bc97SJung-uk Kim " /* The rest are the same as the globals declared in the non-reentrant scanner. */", 1004ab76bc97SJung-uk Kim " FILE *yyin_r, *yyout_r;", 1005ab76bc97SJung-uk Kim " size_t yy_buffer_stack_top; /**< index of top of stack. */", 1006ab76bc97SJung-uk Kim " size_t yy_buffer_stack_max; /**< capacity of stack. */", 1007ab76bc97SJung-uk Kim " YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */", 1008ab76bc97SJung-uk Kim " char yy_hold_char;", 10097e382390SJung-uk Kim " int yy_n_chars;", 10107e382390SJung-uk Kim " int yyleng_r;", 1011ab76bc97SJung-uk Kim " char *yy_c_buf_p;", 1012ab76bc97SJung-uk Kim " int yy_init;", 1013ab76bc97SJung-uk Kim " int yy_start;", 1014ab76bc97SJung-uk Kim " int yy_did_buffer_switch_on_eof;", 1015ab76bc97SJung-uk Kim " int yy_start_stack_ptr;", 1016ab76bc97SJung-uk Kim " int yy_start_stack_depth;", 1017ab76bc97SJung-uk Kim " int *yy_start_stack;", 1018ab76bc97SJung-uk Kim " yy_state_type yy_last_accepting_state;", 1019ab76bc97SJung-uk Kim " char* yy_last_accepting_cpos;", 1020ab76bc97SJung-uk Kim "", 1021ab76bc97SJung-uk Kim " int yylineno_r;", 1022ab76bc97SJung-uk Kim " int yy_flex_debug_r;", 1023ab76bc97SJung-uk Kim "", 1024ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_USES_REJECT]],", 1025ab76bc97SJung-uk Kim "[[", 1026ab76bc97SJung-uk Kim " yy_state_type *yy_state_buf;", 1027ab76bc97SJung-uk Kim " yy_state_type *yy_state_ptr;", 1028ab76bc97SJung-uk Kim " char *yy_full_match;", 1029ab76bc97SJung-uk Kim " int yy_lp;", 1030ab76bc97SJung-uk Kim "", 1031ab76bc97SJung-uk Kim " /* These are only needed for trailing context rules,", 1032ab76bc97SJung-uk Kim " * but there's no conditional variable for that yet. */", 1033ab76bc97SJung-uk Kim " int yy_looking_for_trail_begin;", 1034ab76bc97SJung-uk Kim " int yy_full_lp;", 1035ab76bc97SJung-uk Kim " int *yy_full_state;", 1036ab76bc97SJung-uk Kim "]])", 1037ab76bc97SJung-uk Kim "", 1038ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_TEXT_IS_ARRAY]],", 1039ab76bc97SJung-uk Kim "[[", 1040ab76bc97SJung-uk Kim " char yytext_r[YYLMAX];", 1041ab76bc97SJung-uk Kim " char *yytext_ptr;", 1042ab76bc97SJung-uk Kim " int yy_more_offset;", 1043ab76bc97SJung-uk Kim " int yy_prev_more_offset;", 1044ab76bc97SJung-uk Kim "]],", 1045ab76bc97SJung-uk Kim "[[", 1046ab76bc97SJung-uk Kim " char *yytext_r;", 1047ab76bc97SJung-uk Kim " int yy_more_flag;", 1048ab76bc97SJung-uk Kim " int yy_more_len;", 1049ab76bc97SJung-uk Kim "]])", 1050ab76bc97SJung-uk Kim "", 1051ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_BISON_LVAL]],", 1052ab76bc97SJung-uk Kim "[[", 1053ab76bc97SJung-uk Kim " YYSTYPE * yylval_r;", 1054ab76bc97SJung-uk Kim "]])", 1055ab76bc97SJung-uk Kim "", 1056ab76bc97SJung-uk Kim "m4_ifdef( [[<M4_YY_BISON_LLOC>]],", 1057ab76bc97SJung-uk Kim "[[", 1058ab76bc97SJung-uk Kim " YYLTYPE * yylloc_r;", 1059ab76bc97SJung-uk Kim "]])", 1060ab76bc97SJung-uk Kim "", 1061ab76bc97SJung-uk Kim " }; /* end struct yyguts_t */", 1062ab76bc97SJung-uk Kim "]])", 1063ab76bc97SJung-uk Kim "", 1064ab76bc97SJung-uk Kim "", 1065ab76bc97SJung-uk Kim "%if-c-only", 1066ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 1067ab76bc97SJung-uk Kim "[[", 10687e382390SJung-uk Kim "static int yy_init_globals ( M4_YY_PROTO_ONLY_ARG );", 1069ab76bc97SJung-uk Kim "]])", 1070ab76bc97SJung-uk Kim "%endif", 1071ab76bc97SJung-uk Kim "", 1072ab76bc97SJung-uk Kim "%if-reentrant", 1073ab76bc97SJung-uk Kim "", 1074ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 1075ab76bc97SJung-uk Kim "[[", 1076ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_BISON_LVAL]],", 1077ab76bc97SJung-uk Kim " [[", 1078ab76bc97SJung-uk Kim " /* This must go here because YYSTYPE and YYLTYPE are included", 1079ab76bc97SJung-uk Kim " * from bison output in section 1.*/", 1080ab76bc97SJung-uk Kim " # define yylval YY_G(yylval_r)", 1081ab76bc97SJung-uk Kim " ]])", 1082ab76bc97SJung-uk Kim "", 1083ab76bc97SJung-uk Kim " m4_ifdef( [[<M4_YY_BISON_LLOC>]],", 1084ab76bc97SJung-uk Kim " [[", 1085ab76bc97SJung-uk Kim " # define yylloc YY_G(yylloc_r)", 1086ab76bc97SJung-uk Kim " ]])", 1087ab76bc97SJung-uk Kim "]])", 1088ab76bc97SJung-uk Kim "", 10897e382390SJung-uk Kim "int yylex_init (yyscan_t* scanner);", 1090ab76bc97SJung-uk Kim "", 10917e382390SJung-uk Kim "int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);", 1092ab76bc97SJung-uk Kim "", 1093ab76bc97SJung-uk Kim "%endif", 1094ab76bc97SJung-uk Kim "", 1095ab76bc97SJung-uk Kim "%endif End reentrant structures and macros.", 1096ab76bc97SJung-uk Kim "", 1097ab76bc97SJung-uk Kim "/* Accessor methods to globals.", 1098ab76bc97SJung-uk Kim " These are made visible to non-reentrant scanners for convenience. */", 1099ab76bc97SJung-uk Kim "", 1100ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_DESTROY]],,", 1101ab76bc97SJung-uk Kim "[[", 11027e382390SJung-uk Kim "int yylex_destroy ( M4_YY_PROTO_ONLY_ARG );", 1103ab76bc97SJung-uk Kim "]])", 1104ab76bc97SJung-uk Kim "", 1105ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_DEBUG]],,", 1106ab76bc97SJung-uk Kim "[[", 11077e382390SJung-uk Kim "int yyget_debug ( M4_YY_PROTO_ONLY_ARG );", 1108ab76bc97SJung-uk Kim "]])", 1109ab76bc97SJung-uk Kim "", 1110ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SET_DEBUG]],,", 1111ab76bc97SJung-uk Kim "[[", 11127e382390SJung-uk Kim "void yyset_debug ( int debug_flag M4_YY_PROTO_LAST_ARG );", 1113ab76bc97SJung-uk Kim "]])", 1114ab76bc97SJung-uk Kim "", 1115ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_EXTRA]],,", 1116ab76bc97SJung-uk Kim "[[", 11177e382390SJung-uk Kim "YY_EXTRA_TYPE yyget_extra ( M4_YY_PROTO_ONLY_ARG );", 1118ab76bc97SJung-uk Kim "]])", 1119ab76bc97SJung-uk Kim "", 1120ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SET_EXTRA]],,", 1121ab76bc97SJung-uk Kim "[[", 11227e382390SJung-uk Kim "void yyset_extra ( YY_EXTRA_TYPE user_defined M4_YY_PROTO_LAST_ARG );", 1123ab76bc97SJung-uk Kim "]])", 1124ab76bc97SJung-uk Kim "", 1125ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_IN]],,", 1126ab76bc97SJung-uk Kim "[[", 11277e382390SJung-uk Kim "FILE *yyget_in ( M4_YY_PROTO_ONLY_ARG );", 1128ab76bc97SJung-uk Kim "]])", 1129ab76bc97SJung-uk Kim "", 1130ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SET_IN]],,", 1131ab76bc97SJung-uk Kim "[[", 11327e382390SJung-uk Kim "void yyset_in ( FILE * _in_str M4_YY_PROTO_LAST_ARG );", 1133ab76bc97SJung-uk Kim "]])", 1134ab76bc97SJung-uk Kim "", 1135ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_OUT]],,", 1136ab76bc97SJung-uk Kim "[[", 11377e382390SJung-uk Kim "FILE *yyget_out ( M4_YY_PROTO_ONLY_ARG );", 1138ab76bc97SJung-uk Kim "]])", 1139ab76bc97SJung-uk Kim "", 1140ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SET_OUT]],,", 1141ab76bc97SJung-uk Kim "[[", 11427e382390SJung-uk Kim "void yyset_out ( FILE * _out_str M4_YY_PROTO_LAST_ARG );", 1143ab76bc97SJung-uk Kim "]])", 1144ab76bc97SJung-uk Kim "", 1145ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_LENG]],,", 1146ab76bc97SJung-uk Kim "[[", 11477e382390SJung-uk Kim " int yyget_leng ( M4_YY_PROTO_ONLY_ARG );", 1148ab76bc97SJung-uk Kim "]])", 1149ab76bc97SJung-uk Kim "", 1150ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_TEXT]],,", 1151ab76bc97SJung-uk Kim "[[", 11527e382390SJung-uk Kim "char *yyget_text ( M4_YY_PROTO_ONLY_ARG );", 1153ab76bc97SJung-uk Kim "]])", 1154ab76bc97SJung-uk Kim "", 1155ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_LINENO]],,", 1156ab76bc97SJung-uk Kim "[[", 11577e382390SJung-uk Kim "int yyget_lineno ( M4_YY_PROTO_ONLY_ARG );", 1158ab76bc97SJung-uk Kim "]])", 1159ab76bc97SJung-uk Kim "", 1160ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SET_LINENO]],,", 1161ab76bc97SJung-uk Kim "[[", 11627e382390SJung-uk Kim "void yyset_lineno ( int _line_number M4_YY_PROTO_LAST_ARG );", 1163ab76bc97SJung-uk Kim "]])", 1164ab76bc97SJung-uk Kim "", 1165ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_REENTRANT]],", 1166ab76bc97SJung-uk Kim "[[", 1167ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_COLUMN]],,", 1168ab76bc97SJung-uk Kim "[[", 11697e382390SJung-uk Kim "int yyget_column ( M4_YY_PROTO_ONLY_ARG );", 1170ab76bc97SJung-uk Kim "]])", 1171ab76bc97SJung-uk Kim "]])", 1172ab76bc97SJung-uk Kim "", 1173ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_REENTRANT]],", 1174ab76bc97SJung-uk Kim "[[", 1175ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SET_COLUMN]],,", 1176ab76bc97SJung-uk Kim "[[", 11777e382390SJung-uk Kim "void yyset_column ( int _column_no M4_YY_PROTO_LAST_ARG );", 1178ab76bc97SJung-uk Kim "]])", 1179ab76bc97SJung-uk Kim "]])", 1180ab76bc97SJung-uk Kim "", 1181ab76bc97SJung-uk Kim "%if-bison-bridge", 1182ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_LVAL]],,", 1183ab76bc97SJung-uk Kim "[[", 11847e382390SJung-uk Kim "YYSTYPE * yyget_lval ( M4_YY_PROTO_ONLY_ARG );", 1185ab76bc97SJung-uk Kim "]])", 1186ab76bc97SJung-uk Kim "", 11877e382390SJung-uk Kim "void yyset_lval ( YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG );", 1188ab76bc97SJung-uk Kim "", 1189ab76bc97SJung-uk Kim "m4_ifdef( [[<M4_YY_BISON_LLOC>]],", 1190ab76bc97SJung-uk Kim "[[", 1191ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_NO_GET_LLOC]],,", 1192ab76bc97SJung-uk Kim " [[", 11937e382390SJung-uk Kim " YYLTYPE *yyget_lloc ( M4_YY_PROTO_ONLY_ARG );", 1194ab76bc97SJung-uk Kim " ]])", 1195ab76bc97SJung-uk Kim "", 1196ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_NO_SET_LLOC]],,", 1197ab76bc97SJung-uk Kim " [[", 11987e382390SJung-uk Kim " void yyset_lloc ( YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG );", 1199ab76bc97SJung-uk Kim " ]])", 1200ab76bc97SJung-uk Kim "]])", 1201ab76bc97SJung-uk Kim "%endif", 1202ab76bc97SJung-uk Kim "", 1203ab76bc97SJung-uk Kim "/* Macros after this point can all be overridden by user definitions in", 1204ab76bc97SJung-uk Kim " * section 1.", 1205ab76bc97SJung-uk Kim " */", 1206ab76bc97SJung-uk Kim "", 1207ab76bc97SJung-uk Kim "#ifndef YY_SKIP_YYWRAP", 1208ab76bc97SJung-uk Kim "#ifdef __cplusplus", 12097e382390SJung-uk Kim "extern \"C\" int yywrap ( M4_YY_PROTO_ONLY_ARG );", 1210ab76bc97SJung-uk Kim "#else", 12117e382390SJung-uk Kim "extern int yywrap ( M4_YY_PROTO_ONLY_ARG );", 1212ab76bc97SJung-uk Kim "#endif", 1213ab76bc97SJung-uk Kim "#endif", 1214ab76bc97SJung-uk Kim "", 1215ab76bc97SJung-uk Kim "%not-for-header", 12167e382390SJung-uk Kim "#ifndef YY_NO_UNPUT", 1217ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_NO_UNPUT]],,", 1218ab76bc97SJung-uk Kim " [[", 12197e382390SJung-uk Kim " static void yyunput ( int c, char *buf_ptr M4_YY_PROTO_LAST_ARG);", 1220ab76bc97SJung-uk Kim " ]])", 12217e382390SJung-uk Kim "#endif", 1222ab76bc97SJung-uk Kim "%ok-for-header", 1223ab76bc97SJung-uk Kim "%endif", 1224ab76bc97SJung-uk Kim "", 1225ab76bc97SJung-uk Kim "#ifndef yytext_ptr", 12267e382390SJung-uk Kim "static void yy_flex_strncpy ( char *, const char *, int M4_YY_PROTO_LAST_ARG);", 1227ab76bc97SJung-uk Kim "#endif", 1228ab76bc97SJung-uk Kim "", 1229ab76bc97SJung-uk Kim "#ifdef YY_NEED_STRLEN", 12307e382390SJung-uk Kim "static int yy_flex_strlen ( const char * M4_YY_PROTO_LAST_ARG);", 1231ab76bc97SJung-uk Kim "#endif", 1232ab76bc97SJung-uk Kim "", 1233ab76bc97SJung-uk Kim "#ifndef YY_NO_INPUT", 1234ab76bc97SJung-uk Kim "%if-c-only Standard (non-C++) definition", 1235ab76bc97SJung-uk Kim "%not-for-header", 1236ab76bc97SJung-uk Kim "#ifdef __cplusplus", 12377e382390SJung-uk Kim "static int yyinput ( M4_YY_PROTO_ONLY_ARG );", 1238ab76bc97SJung-uk Kim "#else", 12397e382390SJung-uk Kim "static int input ( M4_YY_PROTO_ONLY_ARG );", 1240ab76bc97SJung-uk Kim "#endif", 1241ab76bc97SJung-uk Kim "%ok-for-header", 1242ab76bc97SJung-uk Kim "%endif", 1243ab76bc97SJung-uk Kim "#endif", 1244ab76bc97SJung-uk Kim "", 1245ab76bc97SJung-uk Kim "", 1246ab76bc97SJung-uk Kim "%if-c-only", 1247ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_STACK_USED]],", 1248ab76bc97SJung-uk Kim "[[", 1249ab76bc97SJung-uk Kim "", 1250ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_REENTRANT]],", 1251ab76bc97SJung-uk Kim "[[", 1252ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 1253ab76bc97SJung-uk Kim " [[", 1254ab76bc97SJung-uk Kim " static int yy_start_stack_ptr = 0;", 1255ab76bc97SJung-uk Kim " static int yy_start_stack_depth = 0;", 1256ab76bc97SJung-uk Kim " static int *yy_start_stack = NULL;", 1257ab76bc97SJung-uk Kim " ]])", 1258ab76bc97SJung-uk Kim "]])", 1259ab76bc97SJung-uk Kim "", 1260ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 1261ab76bc97SJung-uk Kim "[[", 1262ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_NO_PUSH_STATE]],,", 1263ab76bc97SJung-uk Kim " [[", 12647e382390SJung-uk Kim " static void yy_push_state ( int _new_state M4_YY_PROTO_LAST_ARG);", 1265ab76bc97SJung-uk Kim " ]])", 1266ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_NO_POP_STATE]],,", 1267ab76bc97SJung-uk Kim " [[", 12687e382390SJung-uk Kim " static void yy_pop_state ( M4_YY_PROTO_ONLY_ARG );", 1269ab76bc97SJung-uk Kim " ]])", 1270ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_NO_TOP_STATE]],,", 1271ab76bc97SJung-uk Kim " [[", 12727e382390SJung-uk Kim " static int yy_top_state ( M4_YY_PROTO_ONLY_ARG );", 1273ab76bc97SJung-uk Kim " ]])", 1274ab76bc97SJung-uk Kim "]])", 1275ab76bc97SJung-uk Kim "", 1276ab76bc97SJung-uk Kim "]],", 1277ab76bc97SJung-uk Kim "[[", 1278ab76bc97SJung-uk Kim "m4_define( [[M4_YY_NO_PUSH_STATE]])", 1279ab76bc97SJung-uk Kim "m4_define( [[M4_YY_NO_POP_STATE]])", 1280ab76bc97SJung-uk Kim "m4_define( [[M4_YY_NO_TOP_STATE]])", 1281ab76bc97SJung-uk Kim "]])", 1282ab76bc97SJung-uk Kim "%endif", 1283ab76bc97SJung-uk Kim "", 1284ab76bc97SJung-uk Kim "/* Amount of stuff to slurp up with each read. */", 1285ab76bc97SJung-uk Kim "#ifndef YY_READ_BUF_SIZE", 12867e382390SJung-uk Kim "#ifdef __ia64__", 12877e382390SJung-uk Kim "/* On IA-64, the buffer size is 16k, not 8k */", 12887e382390SJung-uk Kim "#define YY_READ_BUF_SIZE 16384", 12897e382390SJung-uk Kim "#else", 1290ab76bc97SJung-uk Kim "#define YY_READ_BUF_SIZE 8192", 12917e382390SJung-uk Kim "#endif /* __ia64__ */", 1292ab76bc97SJung-uk Kim "#endif", 1293ab76bc97SJung-uk Kim "", 1294ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 1295ab76bc97SJung-uk Kim "[[", 1296ab76bc97SJung-uk Kim "/* Copy whatever the last rule matched to the standard output. */", 1297ab76bc97SJung-uk Kim "#ifndef ECHO", 1298ab76bc97SJung-uk Kim "%if-c-only Standard (non-C++) definition", 1299ab76bc97SJung-uk Kim "/* This used to be an fputs(), but since the string might contain NUL's,", 1300ab76bc97SJung-uk Kim " * we now use fwrite().", 1301ab76bc97SJung-uk Kim " */", 13027e382390SJung-uk Kim "#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)", 1303ab76bc97SJung-uk Kim "%endif", 1304ab76bc97SJung-uk Kim "%if-c++-only C++ definition", 1305ab76bc97SJung-uk Kim "#define ECHO LexerOutput( yytext, yyleng )", 1306ab76bc97SJung-uk Kim "%endif", 1307ab76bc97SJung-uk Kim "#endif", 1308ab76bc97SJung-uk Kim "]])", 1309ab76bc97SJung-uk Kim "", 1310ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 1311ab76bc97SJung-uk Kim "[[", 1312ab76bc97SJung-uk Kim "/* Gets input and stuffs it into \"buf\". number of characters read, or YY_NULL,", 1313ab76bc97SJung-uk Kim " * is returned in \"result\".", 1314ab76bc97SJung-uk Kim " */", 1315ab76bc97SJung-uk Kim "#ifndef YY_INPUT", 1316ab76bc97SJung-uk Kim "#define YY_INPUT(buf,result,max_size) \\", 1317ab76bc97SJung-uk Kim "%% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \\", 1318ab76bc97SJung-uk Kim "\\", 1319ab76bc97SJung-uk Kim "%if-c++-only C++ definition \\", 13207e382390SJung-uk Kim " if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \\", 1321ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"input in flex scanner failed\" );", 1322ab76bc97SJung-uk Kim "%endif", 1323ab76bc97SJung-uk Kim "", 1324ab76bc97SJung-uk Kim "#endif", 1325ab76bc97SJung-uk Kim "]])", 1326ab76bc97SJung-uk Kim "", 1327ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 1328ab76bc97SJung-uk Kim "[[", 1329ab76bc97SJung-uk Kim "/* No semi-colon after return; correct usage is to write \"yyterminate();\" -", 1330ab76bc97SJung-uk Kim " * we don't want an extra ';' after the \"return\" because that will cause", 1331ab76bc97SJung-uk Kim " * some compilers to complain about unreachable statements.", 1332ab76bc97SJung-uk Kim " */", 1333ab76bc97SJung-uk Kim "#ifndef yyterminate", 1334ab76bc97SJung-uk Kim "#define yyterminate() return YY_NULL", 1335ab76bc97SJung-uk Kim "#endif", 1336ab76bc97SJung-uk Kim "]])", 1337ab76bc97SJung-uk Kim "", 1338ab76bc97SJung-uk Kim "/* Number of entries by which start-condition stack grows. */", 1339ab76bc97SJung-uk Kim "#ifndef YY_START_STACK_INCR", 1340ab76bc97SJung-uk Kim "#define YY_START_STACK_INCR 25", 1341ab76bc97SJung-uk Kim "#endif", 1342ab76bc97SJung-uk Kim "", 1343ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 1344ab76bc97SJung-uk Kim "[[", 1345ab76bc97SJung-uk Kim "/* Report a fatal error. */", 1346ab76bc97SJung-uk Kim "#ifndef YY_FATAL_ERROR", 1347ab76bc97SJung-uk Kim "%if-c-only", 1348ab76bc97SJung-uk Kim "#define YY_FATAL_ERROR(msg) yy_fatal_error( msg M4_YY_CALL_LAST_ARG)", 1349ab76bc97SJung-uk Kim "%endif", 1350ab76bc97SJung-uk Kim "%if-c++-only", 1351ab76bc97SJung-uk Kim "#define YY_FATAL_ERROR(msg) LexerError( msg )", 1352ab76bc97SJung-uk Kim "%endif", 1353ab76bc97SJung-uk Kim "#endif", 1354ab76bc97SJung-uk Kim "]])", 1355ab76bc97SJung-uk Kim "", 1356ab76bc97SJung-uk Kim "%if-tables-serialization structures and prototypes", 1357ab76bc97SJung-uk Kim "#ifdef FLEX_SCANNER", 1358ab76bc97SJung-uk Kim "/*", 1359ab76bc97SJung-uk Kim "dnl tables_shared.h - tables serialization header", 1360ab76bc97SJung-uk Kim "dnl", 1361ab76bc97SJung-uk Kim "dnl Copyright (c) 1990 The Regents of the University of California.", 1362ab76bc97SJung-uk Kim "dnl All rights reserved.", 1363ab76bc97SJung-uk Kim "dnl", 1364ab76bc97SJung-uk Kim "dnl This code is derived from software contributed to Berkeley by", 1365ab76bc97SJung-uk Kim "dnl Vern Paxson.", 1366ab76bc97SJung-uk Kim "dnl", 1367ab76bc97SJung-uk Kim "dnl The United States Government has rights in this work pursuant", 1368ab76bc97SJung-uk Kim "dnl to contract no. DE-AC03-76SF00098 between the United States", 1369ab76bc97SJung-uk Kim "dnl Department of Energy and the University of California.", 1370ab76bc97SJung-uk Kim "dnl", 1371ab76bc97SJung-uk Kim "dnl This file is part of flex.", 1372ab76bc97SJung-uk Kim "dnl", 1373ab76bc97SJung-uk Kim "dnl Redistribution and use in source and binary forms, with or without", 1374ab76bc97SJung-uk Kim "dnl modification, are permitted provided that the following conditions", 1375ab76bc97SJung-uk Kim "dnl are met:", 1376ab76bc97SJung-uk Kim "dnl", 1377ab76bc97SJung-uk Kim "dnl 1. Redistributions of source code must retain the above copyright", 1378ab76bc97SJung-uk Kim "dnl notice, this list of conditions and the following disclaimer.", 1379ab76bc97SJung-uk Kim "dnl 2. Redistributions in binary form must reproduce the above copyright", 1380ab76bc97SJung-uk Kim "dnl notice, this list of conditions and the following disclaimer in the", 1381ab76bc97SJung-uk Kim "dnl documentation and/or other materials provided with the distribution.", 1382ab76bc97SJung-uk Kim "dnl", 1383ab76bc97SJung-uk Kim "dnl Neither the name of the University nor the names of its contributors", 1384ab76bc97SJung-uk Kim "dnl may be used to endorse or promote products derived from this software", 1385ab76bc97SJung-uk Kim "dnl without specific prior written permission.", 1386ab76bc97SJung-uk Kim "dnl", 1387ab76bc97SJung-uk Kim "dnl THIS SOFTWARE IS PROVIDED `AS IS' AND WITHOUT ANY EXPRESS OR", 1388ab76bc97SJung-uk Kim "dnl IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED", 1389ab76bc97SJung-uk Kim "dnl WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR", 1390ab76bc97SJung-uk Kim "dnl PURPOSE.", 1391ab76bc97SJung-uk Kim "", 1392ab76bc97SJung-uk Kim "dnl", 1393ab76bc97SJung-uk Kim "dnl This file is meant to be included in both the skeleton and the actual", 1394ab76bc97SJung-uk Kim "dnl flex code (hence the name \"_shared\").", 1395ab76bc97SJung-uk Kim "*/", 1396ab76bc97SJung-uk Kim "#ifndef yyskel_static", 1397ab76bc97SJung-uk Kim "#define yyskel_static static", 1398ab76bc97SJung-uk Kim "#endif", 1399ab76bc97SJung-uk Kim "#else", 1400ab76bc97SJung-uk Kim "#ifndef yyskel_static", 1401ab76bc97SJung-uk Kim "#define yyskel_static", 1402ab76bc97SJung-uk Kim "#endif", 1403ab76bc97SJung-uk Kim "#endif", 1404ab76bc97SJung-uk Kim "", 1405ab76bc97SJung-uk Kim "/* Structures and prototypes for serializing flex tables. The", 1406ab76bc97SJung-uk Kim " * binary format is documented in the manual.", 1407ab76bc97SJung-uk Kim " *", 1408ab76bc97SJung-uk Kim " * Design considerations:", 1409ab76bc97SJung-uk Kim " *", 1410ab76bc97SJung-uk Kim " * - The format allows many tables per file.", 1411ab76bc97SJung-uk Kim " * - The tables can be streamed.", 1412ab76bc97SJung-uk Kim " * - All data is stored in network byte order.", 1413ab76bc97SJung-uk Kim " * - We do not hinder future unicode support.", 1414ab76bc97SJung-uk Kim " * - We can lookup tables by name.", 1415ab76bc97SJung-uk Kim " */", 1416ab76bc97SJung-uk Kim "", 1417ab76bc97SJung-uk Kim "/** Magic number for serialized format. */", 1418ab76bc97SJung-uk Kim "#ifndef YYTBL_MAGIC", 1419ab76bc97SJung-uk Kim "#define YYTBL_MAGIC 0xF13C57B1", 1420ab76bc97SJung-uk Kim "#endif", 1421ab76bc97SJung-uk Kim "", 1422ab76bc97SJung-uk Kim "/** Calculate (0-7) = number bytes needed to pad n to next 64-bit boundary. */", 1423ab76bc97SJung-uk Kim "#ifndef yypad64", 1424ab76bc97SJung-uk Kim "#define yypad64(n) ((8-((n)%8))%8)", 1425ab76bc97SJung-uk Kim "#endif", 1426ab76bc97SJung-uk Kim "", 1427ab76bc97SJung-uk Kim "", 1428ab76bc97SJung-uk Kim "#ifndef YYTABLES_TYPES", 1429ab76bc97SJung-uk Kim "#define YYTABLES_TYPES", 1430ab76bc97SJung-uk Kim "/** Possible values for td_id field. Each one corresponds to a", 1431ab76bc97SJung-uk Kim " * scanner table of the same name.", 1432ab76bc97SJung-uk Kim " */", 1433ab76bc97SJung-uk Kim "enum yytbl_id {", 1434ab76bc97SJung-uk Kim " YYTD_ID_ACCEPT = 0x01, /**< 1-dim ints */", 1435ab76bc97SJung-uk Kim " YYTD_ID_BASE = 0x02, /**< 1-dim ints */", 1436ab76bc97SJung-uk Kim " YYTD_ID_CHK = 0x03, /**< 1-dim ints */", 1437ab76bc97SJung-uk Kim " YYTD_ID_DEF = 0x04, /**< 1-dim ints */", 1438ab76bc97SJung-uk Kim " YYTD_ID_EC = 0x05, /**< 1-dim ints */", 1439ab76bc97SJung-uk Kim " YYTD_ID_META = 0x06, /**< 1-dim ints */", 1440ab76bc97SJung-uk Kim " YYTD_ID_NUL_TRANS = 0x07, /**< 1-dim ints, maybe indices */", 1441ab76bc97SJung-uk Kim " YYTD_ID_NXT = 0x08, /**< may be 2 dimensional ints */", 1442ab76bc97SJung-uk Kim " YYTD_ID_RULE_CAN_MATCH_EOL = 0x09, /**< 1-dim ints */", 1443ab76bc97SJung-uk Kim " YYTD_ID_START_STATE_LIST = 0x0A, /**< 1-dim indices into trans tbl */", 1444ab76bc97SJung-uk Kim " YYTD_ID_TRANSITION = 0x0B, /**< structs */", 1445ab76bc97SJung-uk Kim " YYTD_ID_ACCLIST = 0x0C /**< 1-dim ints */", 1446ab76bc97SJung-uk Kim "};", 1447ab76bc97SJung-uk Kim "", 1448ab76bc97SJung-uk Kim "/** bit flags for t_flags field of struct yytbl_data */", 1449ab76bc97SJung-uk Kim "enum yytbl_flags {", 1450ab76bc97SJung-uk Kim " /* These first three are mutually exclusive */", 1451ab76bc97SJung-uk Kim " YYTD_DATA8 = 0x01, /**< data is an array of type flex_int8_t */", 1452ab76bc97SJung-uk Kim " YYTD_DATA16 = 0x02, /**< data is an array of type flex_int16_t */", 1453ab76bc97SJung-uk Kim " YYTD_DATA32 = 0x04, /**< data is an array of type flex_int32_t */", 1454ab76bc97SJung-uk Kim "", 1455ab76bc97SJung-uk Kim " /* These two are mutually exclusive. */", 1456ab76bc97SJung-uk Kim " YYTD_PTRANS = 0x08, /**< data is a list of indexes of entries", 1457ab76bc97SJung-uk Kim " into the expanded yy_transition", 1458ab76bc97SJung-uk Kim " array. See notes in manual. */", 1459ab76bc97SJung-uk Kim " YYTD_STRUCT = 0x10 /**< data consists of yy_trans_info structs */", 1460ab76bc97SJung-uk Kim "};", 1461ab76bc97SJung-uk Kim "", 1462ab76bc97SJung-uk Kim "/* The serialized tables header. */", 1463ab76bc97SJung-uk Kim "struct yytbl_hdr {", 1464ab76bc97SJung-uk Kim " flex_uint32_t th_magic; /**< Must be 0xF13C57B1 (comes from \"Flex Table\") */", 1465ab76bc97SJung-uk Kim " flex_uint32_t th_hsize; /**< Size of this header in bytes. */", 1466ab76bc97SJung-uk Kim " flex_uint32_t th_ssize; /**< Size of this dataset, in bytes, including header. */", 1467ab76bc97SJung-uk Kim " flex_uint16_t th_flags; /**< Currently unused, must be 0 */", 1468ab76bc97SJung-uk Kim " char *th_version; /**< Flex version string. NUL terminated. */", 1469ab76bc97SJung-uk Kim " char *th_name; /**< The name of this table set. NUL terminated. */", 1470ab76bc97SJung-uk Kim "};", 1471ab76bc97SJung-uk Kim "", 1472ab76bc97SJung-uk Kim "/** A single serialized table */", 1473ab76bc97SJung-uk Kim "struct yytbl_data {", 1474ab76bc97SJung-uk Kim " flex_uint16_t td_id; /**< enum yytbl_id table identifier */", 1475ab76bc97SJung-uk Kim " flex_uint16_t td_flags; /**< how to interpret this data */", 1476ab76bc97SJung-uk Kim " flex_uint32_t td_hilen; /**< num elements in highest dimension array */", 1477ab76bc97SJung-uk Kim " flex_uint32_t td_lolen; /**< num elements in lowest dimension array */", 1478ab76bc97SJung-uk Kim " void *td_data; /**< table data */", 1479ab76bc97SJung-uk Kim "};", 1480ab76bc97SJung-uk Kim "#endif", 1481ab76bc97SJung-uk Kim "", 1482ab76bc97SJung-uk Kim "/** Extract corresponding data size_t from td_flags */", 1483ab76bc97SJung-uk Kim "#ifndef YYTDFLAGS2BYTES", 1484ab76bc97SJung-uk Kim "#define YYTDFLAGS2BYTES(td_flags)\\", 1485ab76bc97SJung-uk Kim " (((td_flags) & YYTD_DATA8)\\", 1486ab76bc97SJung-uk Kim " ? sizeof(flex_int8_t)\\", 1487ab76bc97SJung-uk Kim " :(((td_flags) & YYTD_DATA16)\\", 1488ab76bc97SJung-uk Kim " ? sizeof(flex_int16_t)\\", 1489ab76bc97SJung-uk Kim " :sizeof(flex_int32_t)))", 1490ab76bc97SJung-uk Kim "#endif", 1491ab76bc97SJung-uk Kim "", 1492ab76bc97SJung-uk Kim "#ifdef FLEX_SCANNER", 1493ab76bc97SJung-uk Kim "%not-for-header", 1494ab76bc97SJung-uk Kim "#endif", 1495ab76bc97SJung-uk Kim "yyskel_static flex_int32_t yytbl_calc_total_len (const struct yytbl_data *tbl);", 1496ab76bc97SJung-uk Kim "#ifdef FLEX_SCANNER", 1497ab76bc97SJung-uk Kim "%ok-for-header", 1498ab76bc97SJung-uk Kim "#endif", 1499ab76bc97SJung-uk Kim "", 1500ab76bc97SJung-uk Kim "/* vim:set noexpandtab cindent tabstop=8 softtabstop=0 shiftwidth=8 textwidth=0: */", 1501ab76bc97SJung-uk Kim "", 1502ab76bc97SJung-uk Kim "", 1503ab76bc97SJung-uk Kim "/* Load the DFA tables from the given stream. */", 15047e382390SJung-uk Kim "int yytables_fload (FILE * fp M4_YY_PROTO_LAST_ARG);", 1505ab76bc97SJung-uk Kim "", 1506ab76bc97SJung-uk Kim "/* Unload the tables from memory. */", 15077e382390SJung-uk Kim "int yytables_destroy (M4_YY_PROTO_ONLY_ARG);", 1508ab76bc97SJung-uk Kim "%not-for-header", 1509ab76bc97SJung-uk Kim "", 1510ab76bc97SJung-uk Kim "/** Describes a mapping from a serialized table id to its deserialized state in", 1511ab76bc97SJung-uk Kim " * this scanner. This is the bridge between our \"generic\" deserialization code", 1512ab76bc97SJung-uk Kim " * and the specifics of this scanner.", 1513ab76bc97SJung-uk Kim " */", 1514ab76bc97SJung-uk Kim "struct yytbl_dmap {", 1515ab76bc97SJung-uk Kim " enum yytbl_id dm_id;/**< table identifier */", 1516ab76bc97SJung-uk Kim " void **dm_arr; /**< address of pointer to store the deserialized table. */", 1517ab76bc97SJung-uk Kim " size_t dm_sz; /**< local sizeof() each element in table. */", 1518ab76bc97SJung-uk Kim "};", 1519ab76bc97SJung-uk Kim "", 1520ab76bc97SJung-uk Kim "/** A {0,0,0}-terminated list of structs, forming the map */", 1521ab76bc97SJung-uk Kim "static struct yytbl_dmap yydmap[] =", 1522ab76bc97SJung-uk Kim "{", 1523ab76bc97SJung-uk Kim "%tables-yydmap generated elements", 1524ab76bc97SJung-uk Kim " {0,0,0}", 1525ab76bc97SJung-uk Kim "};", 1526ab76bc97SJung-uk Kim "", 1527ab76bc97SJung-uk Kim "/** A tables-reader object to maintain some state in the read. */", 1528ab76bc97SJung-uk Kim "struct yytbl_reader {", 1529ab76bc97SJung-uk Kim " FILE * fp; /**< input stream */", 1530ab76bc97SJung-uk Kim " flex_uint32_t bread; /**< bytes read since beginning of current tableset */", 1531ab76bc97SJung-uk Kim "};", 1532ab76bc97SJung-uk Kim "", 1533ab76bc97SJung-uk Kim "%endif", 1534ab76bc97SJung-uk Kim "/* end tables serialization structures and prototypes */", 1535ab76bc97SJung-uk Kim "", 1536ab76bc97SJung-uk Kim "%ok-for-header", 1537ab76bc97SJung-uk Kim "", 1538ab76bc97SJung-uk Kim "/* Default declaration of generated scanner - a define so the user can", 1539ab76bc97SJung-uk Kim " * easily add parameters.", 1540ab76bc97SJung-uk Kim " */", 1541ab76bc97SJung-uk Kim "#ifndef YY_DECL", 1542ab76bc97SJung-uk Kim "#define YY_DECL_IS_OURS 1", 1543ab76bc97SJung-uk Kim "%if-c-only Standard (non-C++) definition", 1544ab76bc97SJung-uk Kim "", 1545ab76bc97SJung-uk Kim "", 15467e382390SJung-uk Kim "m4_define( [[M4_YY_LEX_PROTO]], [[(M4_YY_PROTO_ONLY_ARG)]])", 15477e382390SJung-uk Kim "m4_define( [[M4_YY_LEX_DECLARATION]], [[(M4_YY_DEF_ONLY_ARG)]])", 1548ab76bc97SJung-uk Kim "", 1549ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_BISON_LVAL]],", 1550ab76bc97SJung-uk Kim "[[", 1551ab76bc97SJung-uk Kim " m4_dnl The bison pure parser is used. Redefine yylex to", 1552ab76bc97SJung-uk Kim " m4_dnl accept the lval parameter.", 1553ab76bc97SJung-uk Kim "", 1554ab76bc97SJung-uk Kim " m4_define( [[M4_YY_LEX_PROTO]], [[\\]]", 15557e382390SJung-uk Kim " [[(YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG)]])", 1556ab76bc97SJung-uk Kim " m4_define( [[M4_YY_LEX_DECLARATION]], [[\\]]", 1557ab76bc97SJung-uk Kim " [[YYFARGS1(YYSTYPE *,yylval_param)]])", 1558ab76bc97SJung-uk Kim "]])", 1559ab76bc97SJung-uk Kim "", 1560ab76bc97SJung-uk Kim "m4_ifdef( [[<M4_YY_BISON_LLOC>]],", 1561ab76bc97SJung-uk Kim "[[", 1562ab76bc97SJung-uk Kim " m4_dnl Locations are used. yylex should also accept the ylloc parameter.", 1563ab76bc97SJung-uk Kim "", 1564ab76bc97SJung-uk Kim " m4_define( [[M4_YY_LEX_PROTO]], [[\\]]", 15657e382390SJung-uk Kim " [[(YYSTYPE * yylval_param, YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG)]])", 1566ab76bc97SJung-uk Kim " m4_define( [[M4_YY_LEX_DECLARATION]], [[\\]]", 1567ab76bc97SJung-uk Kim " [[YYFARGS2(YYSTYPE *,yylval_param, YYLTYPE *,yylloc_param)]])", 1568ab76bc97SJung-uk Kim "]])", 1569ab76bc97SJung-uk Kim "", 1570ab76bc97SJung-uk Kim "extern int yylex M4_YY_LEX_PROTO;", 1571ab76bc97SJung-uk Kim "", 1572ab76bc97SJung-uk Kim "#define YY_DECL int yylex M4_YY_LEX_DECLARATION", 1573ab76bc97SJung-uk Kim "%endif", 1574ab76bc97SJung-uk Kim "%if-c++-only C++ definition", 1575ab76bc97SJung-uk Kim "#define YY_DECL int yyFlexLexer::yylex()", 1576ab76bc97SJung-uk Kim "%endif", 1577ab76bc97SJung-uk Kim "#endif /* !YY_DECL */", 1578ab76bc97SJung-uk Kim "", 1579ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 1580ab76bc97SJung-uk Kim "[[", 1581ab76bc97SJung-uk Kim "/* Code executed at the beginning of each rule, after yytext and yyleng", 1582ab76bc97SJung-uk Kim " * have been set up.", 1583ab76bc97SJung-uk Kim " */", 1584ab76bc97SJung-uk Kim "#ifndef YY_USER_ACTION", 1585ab76bc97SJung-uk Kim "#define YY_USER_ACTION", 1586ab76bc97SJung-uk Kim "#endif", 1587ab76bc97SJung-uk Kim "]])", 1588ab76bc97SJung-uk Kim "", 1589ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 1590ab76bc97SJung-uk Kim "[[", 1591ab76bc97SJung-uk Kim "/* Code executed at the end of each rule. */", 1592ab76bc97SJung-uk Kim "#ifndef YY_BREAK", 15937e382390SJung-uk Kim "#define YY_BREAK /*LINTED*/break;", 1594ab76bc97SJung-uk Kim "#endif", 1595ab76bc97SJung-uk Kim "]])", 1596ab76bc97SJung-uk Kim "", 1597ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 1598ab76bc97SJung-uk Kim "[[", 1599ab76bc97SJung-uk Kim "%% [6.0] YY_RULE_SETUP definition goes here", 1600ab76bc97SJung-uk Kim "]])", 1601ab76bc97SJung-uk Kim "", 1602ab76bc97SJung-uk Kim "%not-for-header", 1603ab76bc97SJung-uk Kim "/** The main scanner function which does all the work.", 1604ab76bc97SJung-uk Kim " */", 1605ab76bc97SJung-uk Kim "YY_DECL", 1606ab76bc97SJung-uk Kim "{", 1607ab76bc97SJung-uk Kim " yy_state_type yy_current_state;", 1608ab76bc97SJung-uk Kim " char *yy_cp, *yy_bp;", 1609ab76bc97SJung-uk Kim " int yy_act;", 1610ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 1611ab76bc97SJung-uk Kim "", 1612ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_REENTRANT]],", 1613ab76bc97SJung-uk Kim "[[", 1614ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_BISON_LVAL]],", 1615ab76bc97SJung-uk Kim " [[", 1616ab76bc97SJung-uk Kim " YYSTYPE * yylval;", 1617ab76bc97SJung-uk Kim " ]])", 1618ab76bc97SJung-uk Kim " m4_ifdef( [[<M4_YY_BISON_LLOC>]],", 1619ab76bc97SJung-uk Kim " [[", 1620ab76bc97SJung-uk Kim " YYLTYPE * yylloc;", 1621ab76bc97SJung-uk Kim " ]])", 1622ab76bc97SJung-uk Kim "]])", 1623ab76bc97SJung-uk Kim "", 1624ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_BISON_LVAL]],", 1625ab76bc97SJung-uk Kim "[[", 1626ab76bc97SJung-uk Kim " yylval = yylval_param;", 1627ab76bc97SJung-uk Kim "]])", 1628ab76bc97SJung-uk Kim "", 1629ab76bc97SJung-uk Kim "m4_ifdef( [[<M4_YY_BISON_LLOC>]],", 1630ab76bc97SJung-uk Kim "[[", 1631ab76bc97SJung-uk Kim " yylloc = yylloc_param;", 1632ab76bc97SJung-uk Kim "]])", 1633ab76bc97SJung-uk Kim "", 1634ab76bc97SJung-uk Kim " if ( !YY_G(yy_init) )", 1635ab76bc97SJung-uk Kim " {", 1636ab76bc97SJung-uk Kim " YY_G(yy_init) = 1;", 1637ab76bc97SJung-uk Kim "", 1638ab76bc97SJung-uk Kim "#ifdef YY_USER_INIT", 1639ab76bc97SJung-uk Kim " YY_USER_INIT;", 1640ab76bc97SJung-uk Kim "#endif", 1641ab76bc97SJung-uk Kim "", 1642ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_USES_REJECT]],", 1643ab76bc97SJung-uk Kim "[[", 1644ab76bc97SJung-uk Kim " /* Create the reject buffer large enough to save one state per allowed character. */", 1645ab76bc97SJung-uk Kim " if ( ! YY_G(yy_state_buf) )", 1646ab76bc97SJung-uk Kim " YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE M4_YY_CALL_LAST_ARG);", 1647ab76bc97SJung-uk Kim " if ( ! YY_G(yy_state_buf) )", 1648ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"out of dynamic memory in yylex()\" );", 1649ab76bc97SJung-uk Kim "]])", 1650ab76bc97SJung-uk Kim "", 1651ab76bc97SJung-uk Kim " if ( ! YY_G(yy_start) )", 1652ab76bc97SJung-uk Kim " YY_G(yy_start) = 1; /* first start state */", 1653ab76bc97SJung-uk Kim "", 1654ab76bc97SJung-uk Kim " if ( ! yyin )", 1655ab76bc97SJung-uk Kim "%if-c-only", 1656ab76bc97SJung-uk Kim " yyin = stdin;", 1657ab76bc97SJung-uk Kim "%endif", 1658ab76bc97SJung-uk Kim "%if-c++-only", 16597e382390SJung-uk Kim " yyin.rdbuf(std::cin.rdbuf());", 1660ab76bc97SJung-uk Kim "%endif", 1661ab76bc97SJung-uk Kim "", 1662ab76bc97SJung-uk Kim " if ( ! yyout )", 1663ab76bc97SJung-uk Kim "%if-c-only", 1664ab76bc97SJung-uk Kim " yyout = stdout;", 1665ab76bc97SJung-uk Kim "%endif", 1666ab76bc97SJung-uk Kim "%if-c++-only", 16677e382390SJung-uk Kim " yyout.rdbuf(std::cout.rdbuf());", 1668ab76bc97SJung-uk Kim "%endif", 1669ab76bc97SJung-uk Kim "", 1670ab76bc97SJung-uk Kim " if ( ! YY_CURRENT_BUFFER ) {", 1671ab76bc97SJung-uk Kim " yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG);", 1672ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE =", 1673ab76bc97SJung-uk Kim " yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG);", 1674ab76bc97SJung-uk Kim " }", 1675ab76bc97SJung-uk Kim "", 1676ab76bc97SJung-uk Kim " yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );", 1677ab76bc97SJung-uk Kim " }", 1678ab76bc97SJung-uk Kim "", 16797e382390SJung-uk Kim " {", 16807e382390SJung-uk Kim "%% [7.0] user's declarations go here", 16817e382390SJung-uk Kim "", 16827e382390SJung-uk Kim " while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */", 1683ab76bc97SJung-uk Kim " {", 1684ab76bc97SJung-uk Kim "%% [8.0] yymore()-related code goes here", 1685ab76bc97SJung-uk Kim " yy_cp = YY_G(yy_c_buf_p);", 1686ab76bc97SJung-uk Kim "", 1687ab76bc97SJung-uk Kim " /* Support of yytext. */", 1688ab76bc97SJung-uk Kim " *yy_cp = YY_G(yy_hold_char);", 1689ab76bc97SJung-uk Kim "", 1690ab76bc97SJung-uk Kim " /* yy_bp points to the position in yy_ch_buf of the start of", 1691ab76bc97SJung-uk Kim " * the current run.", 1692ab76bc97SJung-uk Kim " */", 1693ab76bc97SJung-uk Kim " yy_bp = yy_cp;", 1694ab76bc97SJung-uk Kim "", 1695ab76bc97SJung-uk Kim "%% [9.0] code to set up and find next match goes here", 1696ab76bc97SJung-uk Kim "", 1697ab76bc97SJung-uk Kim "yy_find_action:", 1698ab76bc97SJung-uk Kim "%% [10.0] code to find the action number goes here", 1699ab76bc97SJung-uk Kim "", 1700ab76bc97SJung-uk Kim " YY_DO_BEFORE_ACTION;", 1701ab76bc97SJung-uk Kim "", 1702ab76bc97SJung-uk Kim "%% [11.0] code for yylineno update goes here", 1703ab76bc97SJung-uk Kim "", 1704ab76bc97SJung-uk Kim "do_action: /* This label is used only to access EOF actions. */", 1705ab76bc97SJung-uk Kim "", 1706ab76bc97SJung-uk Kim "%% [12.0] debug code goes here", 1707ab76bc97SJung-uk Kim "", 1708ab76bc97SJung-uk Kim " switch ( yy_act )", 1709ab76bc97SJung-uk Kim " { /* beginning of action switch */", 1710ab76bc97SJung-uk Kim "%% [13.0] actions go here", 1711ab76bc97SJung-uk Kim "", 1712ab76bc97SJung-uk Kim " case YY_END_OF_BUFFER:", 1713ab76bc97SJung-uk Kim " {", 1714ab76bc97SJung-uk Kim " /* Amount of text matched not including the EOB char. */", 1715ab76bc97SJung-uk Kim " int yy_amount_of_matched_text = (int) (yy_cp - YY_G(yytext_ptr)) - 1;", 1716ab76bc97SJung-uk Kim "", 1717ab76bc97SJung-uk Kim " /* Undo the effects of YY_DO_BEFORE_ACTION. */", 1718ab76bc97SJung-uk Kim " *yy_cp = YY_G(yy_hold_char);", 1719ab76bc97SJung-uk Kim " YY_RESTORE_YY_MORE_OFFSET", 1720ab76bc97SJung-uk Kim "", 1721ab76bc97SJung-uk Kim " if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )", 1722ab76bc97SJung-uk Kim " {", 1723ab76bc97SJung-uk Kim " /* We're scanning a new file or input source. It's", 1724ab76bc97SJung-uk Kim " * possible that this happened because the user", 1725ab76bc97SJung-uk Kim " * just pointed yyin at a new source and called", 1726ab76bc97SJung-uk Kim " * yylex(). If so, then we have to assure", 1727ab76bc97SJung-uk Kim " * consistency between YY_CURRENT_BUFFER and our", 1728ab76bc97SJung-uk Kim " * globals. Here is the right place to do so, because", 1729ab76bc97SJung-uk Kim " * this is the first action (other than possibly a", 1730ab76bc97SJung-uk Kim " * back-up) that will match for the new input source.", 1731ab76bc97SJung-uk Kim " */", 1732ab76bc97SJung-uk Kim " YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;", 17337e382390SJung-uk Kim "%if-c-only", 1734ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;", 17357e382390SJung-uk Kim "%endif", 17367e382390SJung-uk Kim "%if-c++-only", 17377e382390SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin.rdbuf();", 17387e382390SJung-uk Kim "%endif", 1739ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;", 1740ab76bc97SJung-uk Kim " }", 1741ab76bc97SJung-uk Kim "", 1742ab76bc97SJung-uk Kim " /* Note that here we test for yy_c_buf_p \"<=\" to the position", 1743ab76bc97SJung-uk Kim " * of the first EOB in the buffer, since yy_c_buf_p will", 1744ab76bc97SJung-uk Kim " * already have been incremented past the NUL character", 1745ab76bc97SJung-uk Kim " * (since all states make transitions on EOB to the", 1746ab76bc97SJung-uk Kim " * end-of-buffer state). Contrast this with the test", 1747ab76bc97SJung-uk Kim " * in input().", 1748ab76bc97SJung-uk Kim " */", 1749ab76bc97SJung-uk Kim " if ( YY_G(yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] )", 1750ab76bc97SJung-uk Kim " { /* This was really a NUL. */", 1751ab76bc97SJung-uk Kim " yy_state_type yy_next_state;", 1752ab76bc97SJung-uk Kim "", 1753ab76bc97SJung-uk Kim " YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + yy_amount_of_matched_text;", 1754ab76bc97SJung-uk Kim "", 1755ab76bc97SJung-uk Kim " yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG );", 1756ab76bc97SJung-uk Kim "", 1757ab76bc97SJung-uk Kim " /* Okay, we're now positioned to make the NUL", 1758ab76bc97SJung-uk Kim " * transition. We couldn't have", 1759ab76bc97SJung-uk Kim " * yy_get_previous_state() go ahead and do it", 1760ab76bc97SJung-uk Kim " * for us because it doesn't know how to deal", 1761ab76bc97SJung-uk Kim " * with the possibility of jamming (and we don't", 1762ab76bc97SJung-uk Kim " * want to build jamming into it because then it", 1763ab76bc97SJung-uk Kim " * will run more slowly).", 1764ab76bc97SJung-uk Kim " */", 1765ab76bc97SJung-uk Kim "", 1766ab76bc97SJung-uk Kim " yy_next_state = yy_try_NUL_trans( yy_current_state M4_YY_CALL_LAST_ARG);", 1767ab76bc97SJung-uk Kim "", 1768ab76bc97SJung-uk Kim " yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ;", 1769ab76bc97SJung-uk Kim "", 1770ab76bc97SJung-uk Kim " if ( yy_next_state )", 1771ab76bc97SJung-uk Kim " {", 1772ab76bc97SJung-uk Kim " /* Consume the NUL. */", 1773ab76bc97SJung-uk Kim " yy_cp = ++YY_G(yy_c_buf_p);", 1774ab76bc97SJung-uk Kim " yy_current_state = yy_next_state;", 1775ab76bc97SJung-uk Kim " goto yy_match;", 1776ab76bc97SJung-uk Kim " }", 1777ab76bc97SJung-uk Kim "", 1778ab76bc97SJung-uk Kim " else", 1779ab76bc97SJung-uk Kim " {", 1780ab76bc97SJung-uk Kim "%% [14.0] code to do back-up for compressed tables and set up yy_cp goes here", 1781ab76bc97SJung-uk Kim " goto yy_find_action;", 1782ab76bc97SJung-uk Kim " }", 1783ab76bc97SJung-uk Kim " }", 1784ab76bc97SJung-uk Kim "", 1785ab76bc97SJung-uk Kim " else switch ( yy_get_next_buffer( M4_YY_CALL_ONLY_ARG ) )", 1786ab76bc97SJung-uk Kim " {", 1787ab76bc97SJung-uk Kim " case EOB_ACT_END_OF_FILE:", 1788ab76bc97SJung-uk Kim " {", 1789ab76bc97SJung-uk Kim " YY_G(yy_did_buffer_switch_on_eof) = 0;", 1790ab76bc97SJung-uk Kim "", 1791ab76bc97SJung-uk Kim " if ( yywrap( M4_YY_CALL_ONLY_ARG ) )", 1792ab76bc97SJung-uk Kim " {", 1793ab76bc97SJung-uk Kim " /* Note: because we've taken care in", 1794ab76bc97SJung-uk Kim " * yy_get_next_buffer() to have set up", 1795ab76bc97SJung-uk Kim " * yytext, we can now set up", 1796ab76bc97SJung-uk Kim " * yy_c_buf_p so that if some total", 1797ab76bc97SJung-uk Kim " * hoser (like flex itself) wants to", 1798ab76bc97SJung-uk Kim " * call the scanner after we return the", 1799ab76bc97SJung-uk Kim " * YY_NULL, it'll still work - another", 1800ab76bc97SJung-uk Kim " * YY_NULL will get returned.", 1801ab76bc97SJung-uk Kim " */", 1802ab76bc97SJung-uk Kim " YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + YY_MORE_ADJ;", 1803ab76bc97SJung-uk Kim "", 1804ab76bc97SJung-uk Kim " yy_act = YY_STATE_EOF(YY_START);", 1805ab76bc97SJung-uk Kim " goto do_action;", 1806ab76bc97SJung-uk Kim " }", 1807ab76bc97SJung-uk Kim "", 1808ab76bc97SJung-uk Kim " else", 1809ab76bc97SJung-uk Kim " {", 1810ab76bc97SJung-uk Kim " if ( ! YY_G(yy_did_buffer_switch_on_eof) )", 1811ab76bc97SJung-uk Kim " YY_NEW_FILE;", 1812ab76bc97SJung-uk Kim " }", 1813ab76bc97SJung-uk Kim " break;", 1814ab76bc97SJung-uk Kim " }", 1815ab76bc97SJung-uk Kim "", 1816ab76bc97SJung-uk Kim " case EOB_ACT_CONTINUE_SCAN:", 1817ab76bc97SJung-uk Kim " YY_G(yy_c_buf_p) =", 1818ab76bc97SJung-uk Kim " YY_G(yytext_ptr) + yy_amount_of_matched_text;", 1819ab76bc97SJung-uk Kim "", 1820ab76bc97SJung-uk Kim " yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG );", 1821ab76bc97SJung-uk Kim "", 1822ab76bc97SJung-uk Kim " yy_cp = YY_G(yy_c_buf_p);", 1823ab76bc97SJung-uk Kim " yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ;", 1824ab76bc97SJung-uk Kim " goto yy_match;", 1825ab76bc97SJung-uk Kim "", 1826ab76bc97SJung-uk Kim " case EOB_ACT_LAST_MATCH:", 1827ab76bc97SJung-uk Kim " YY_G(yy_c_buf_p) =", 1828ab76bc97SJung-uk Kim " &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)];", 1829ab76bc97SJung-uk Kim "", 1830ab76bc97SJung-uk Kim " yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG );", 1831ab76bc97SJung-uk Kim "", 1832ab76bc97SJung-uk Kim " yy_cp = YY_G(yy_c_buf_p);", 1833ab76bc97SJung-uk Kim " yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ;", 1834ab76bc97SJung-uk Kim " goto yy_find_action;", 1835ab76bc97SJung-uk Kim " }", 1836ab76bc97SJung-uk Kim " break;", 1837ab76bc97SJung-uk Kim " }", 1838ab76bc97SJung-uk Kim "", 1839ab76bc97SJung-uk Kim " default:", 1840ab76bc97SJung-uk Kim " YY_FATAL_ERROR(", 1841ab76bc97SJung-uk Kim " \"fatal flex scanner internal error--no action found\" );", 1842ab76bc97SJung-uk Kim " } /* end of action switch */", 1843ab76bc97SJung-uk Kim " } /* end of scanning one token */", 18447e382390SJung-uk Kim " } /* end of user's declarations */", 1845ab76bc97SJung-uk Kim "} /* end of yylex */", 1846ab76bc97SJung-uk Kim "%ok-for-header", 1847ab76bc97SJung-uk Kim "", 1848ab76bc97SJung-uk Kim "%if-c++-only", 1849ab76bc97SJung-uk Kim "%not-for-header", 1850ab76bc97SJung-uk Kim "/* The contents of this function are C++ specific, so the YY_G macro is not used.", 18517e382390SJung-uk Kim " * This constructor simply maintains backward compatibility.", 18527e382390SJung-uk Kim " * DEPRECATED", 1853ab76bc97SJung-uk Kim " */", 18547e382390SJung-uk Kim "yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ):", 18557e382390SJung-uk Kim " yyin(arg_yyin ? arg_yyin->rdbuf() : std::cin.rdbuf()),", 18567e382390SJung-uk Kim " yyout(arg_yyout ? arg_yyout->rdbuf() : std::cout.rdbuf())", 1857ab76bc97SJung-uk Kim "{", 18587e382390SJung-uk Kim " ctor_common();", 18597e382390SJung-uk Kim "}", 18607e382390SJung-uk Kim "", 18617e382390SJung-uk Kim "/* The contents of this function are C++ specific, so the YY_G macro is not used.", 18627e382390SJung-uk Kim " */", 18637e382390SJung-uk Kim "yyFlexLexer::yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ):", 18647e382390SJung-uk Kim " yyin(arg_yyin.rdbuf()),", 18657e382390SJung-uk Kim " yyout(arg_yyout.rdbuf())", 18667e382390SJung-uk Kim "{", 18677e382390SJung-uk Kim " ctor_common();", 18687e382390SJung-uk Kim "}", 18697e382390SJung-uk Kim "", 18707e382390SJung-uk Kim "/* The contents of this function are C++ specific, so the YY_G macro is not used.", 18717e382390SJung-uk Kim " */", 18727e382390SJung-uk Kim "void yyFlexLexer::ctor_common()", 18737e382390SJung-uk Kim "{", 1874ab76bc97SJung-uk Kim " yy_c_buf_p = 0;", 1875ab76bc97SJung-uk Kim " yy_init = 0;", 1876ab76bc97SJung-uk Kim " yy_start = 0;", 1877ab76bc97SJung-uk Kim " yy_flex_debug = 0;", 1878ab76bc97SJung-uk Kim " yylineno = 1; // this will only get updated if %option yylineno", 1879ab76bc97SJung-uk Kim "", 1880ab76bc97SJung-uk Kim " yy_did_buffer_switch_on_eof = 0;", 1881ab76bc97SJung-uk Kim "", 1882ab76bc97SJung-uk Kim " yy_looking_for_trail_begin = 0;", 1883ab76bc97SJung-uk Kim " yy_more_flag = 0;", 1884ab76bc97SJung-uk Kim " yy_more_len = 0;", 1885ab76bc97SJung-uk Kim " yy_more_offset = yy_prev_more_offset = 0;", 1886ab76bc97SJung-uk Kim "", 1887ab76bc97SJung-uk Kim " yy_start_stack_ptr = yy_start_stack_depth = 0;", 1888ab76bc97SJung-uk Kim " yy_start_stack = NULL;", 1889ab76bc97SJung-uk Kim "", 18907e382390SJung-uk Kim " yy_buffer_stack = NULL;", 1891ab76bc97SJung-uk Kim " yy_buffer_stack_top = 0;", 1892ab76bc97SJung-uk Kim " yy_buffer_stack_max = 0;", 1893ab76bc97SJung-uk Kim "", 1894ab76bc97SJung-uk Kim "", 1895ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_USES_REJECT]],", 1896ab76bc97SJung-uk Kim "[[", 1897ab76bc97SJung-uk Kim " yy_state_buf = new yy_state_type[YY_STATE_BUF_SIZE];", 1898ab76bc97SJung-uk Kim "]],", 1899ab76bc97SJung-uk Kim "[[", 1900ab76bc97SJung-uk Kim " yy_state_buf = 0;", 1901ab76bc97SJung-uk Kim "]])", 1902ab76bc97SJung-uk Kim "}", 1903ab76bc97SJung-uk Kim "", 1904ab76bc97SJung-uk Kim "/* The contents of this function are C++ specific, so the YY_G macro is not used.", 1905ab76bc97SJung-uk Kim " */", 1906ab76bc97SJung-uk Kim "yyFlexLexer::~yyFlexLexer()", 1907ab76bc97SJung-uk Kim "{", 1908ab76bc97SJung-uk Kim " delete [] yy_state_buf;", 1909ab76bc97SJung-uk Kim " yyfree( yy_start_stack M4_YY_CALL_LAST_ARG );", 1910ab76bc97SJung-uk Kim " yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG);", 1911ab76bc97SJung-uk Kim " yyfree( yy_buffer_stack M4_YY_CALL_LAST_ARG );", 1912ab76bc97SJung-uk Kim "}", 1913ab76bc97SJung-uk Kim "", 1914ab76bc97SJung-uk Kim "/* The contents of this function are C++ specific, so the YY_G macro is not used.", 1915ab76bc97SJung-uk Kim " */", 19167e382390SJung-uk Kim "void yyFlexLexer::switch_streams( std::istream& new_in, std::ostream& new_out )", 1917ab76bc97SJung-uk Kim "{", 19187e382390SJung-uk Kim " // was if( new_in )", 1919ab76bc97SJung-uk Kim " yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG);", 1920ab76bc97SJung-uk Kim " yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE M4_YY_CALL_LAST_ARG) M4_YY_CALL_LAST_ARG);", 19217e382390SJung-uk Kim "", 19227e382390SJung-uk Kim " // was if( new_out )", 19237e382390SJung-uk Kim " yyout.rdbuf(new_out.rdbuf());", 1924ab76bc97SJung-uk Kim "}", 1925ab76bc97SJung-uk Kim "", 19267e382390SJung-uk Kim "/* The contents of this function are C++ specific, so the YY_G macro is not used.", 19277e382390SJung-uk Kim " */", 19287e382390SJung-uk Kim "void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )", 19297e382390SJung-uk Kim "{", 19307e382390SJung-uk Kim " if( ! new_in ) {", 19317e382390SJung-uk Kim " new_in = &yyin;", 19327e382390SJung-uk Kim " }", 19337e382390SJung-uk Kim "", 19347e382390SJung-uk Kim " if ( ! new_out ) {", 19357e382390SJung-uk Kim " new_out = &yyout;", 19367e382390SJung-uk Kim " }", 19377e382390SJung-uk Kim "", 19387e382390SJung-uk Kim " switch_streams(*new_in, *new_out);", 1939ab76bc97SJung-uk Kim "}", 1940ab76bc97SJung-uk Kim "", 1941ab76bc97SJung-uk Kim "#ifdef YY_INTERACTIVE", 1942ab76bc97SJung-uk Kim "int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )", 1943ab76bc97SJung-uk Kim "#else", 1944ab76bc97SJung-uk Kim "int yyFlexLexer::LexerInput( char* buf, int max_size )", 1945ab76bc97SJung-uk Kim "#endif", 1946ab76bc97SJung-uk Kim "{", 19477e382390SJung-uk Kim " if ( yyin.eof() || yyin.fail() )", 1948ab76bc97SJung-uk Kim " return 0;", 1949ab76bc97SJung-uk Kim "", 1950ab76bc97SJung-uk Kim "#ifdef YY_INTERACTIVE", 19517e382390SJung-uk Kim " yyin.get( buf[0] );", 1952ab76bc97SJung-uk Kim "", 19537e382390SJung-uk Kim " if ( yyin.eof() )", 1954ab76bc97SJung-uk Kim " return 0;", 1955ab76bc97SJung-uk Kim "", 19567e382390SJung-uk Kim " if ( yyin.bad() )", 1957ab76bc97SJung-uk Kim " return -1;", 1958ab76bc97SJung-uk Kim "", 1959ab76bc97SJung-uk Kim " return 1;", 1960ab76bc97SJung-uk Kim "", 1961ab76bc97SJung-uk Kim "#else", 19627e382390SJung-uk Kim " (void) yyin.read( buf, max_size );", 1963ab76bc97SJung-uk Kim "", 19647e382390SJung-uk Kim " if ( yyin.bad() )", 1965ab76bc97SJung-uk Kim " return -1;", 1966ab76bc97SJung-uk Kim " else", 19677e382390SJung-uk Kim " return yyin.gcount();", 1968ab76bc97SJung-uk Kim "#endif", 1969ab76bc97SJung-uk Kim "}", 1970ab76bc97SJung-uk Kim "", 1971ab76bc97SJung-uk Kim "void yyFlexLexer::LexerOutput( const char* buf, int size )", 1972ab76bc97SJung-uk Kim "{", 19737e382390SJung-uk Kim " (void) yyout.write( buf, size );", 1974ab76bc97SJung-uk Kim "}", 1975ab76bc97SJung-uk Kim "%ok-for-header", 1976ab76bc97SJung-uk Kim "%endif", 1977ab76bc97SJung-uk Kim "", 1978ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 1979ab76bc97SJung-uk Kim "[[", 1980ab76bc97SJung-uk Kim "/* yy_get_next_buffer - try to read in a new buffer", 1981ab76bc97SJung-uk Kim " *", 1982ab76bc97SJung-uk Kim " * Returns a code representing an action:", 1983ab76bc97SJung-uk Kim " * EOB_ACT_LAST_MATCH -", 1984ab76bc97SJung-uk Kim " * EOB_ACT_CONTINUE_SCAN - continue scanning from current position", 1985ab76bc97SJung-uk Kim " * EOB_ACT_END_OF_FILE - end of file", 1986ab76bc97SJung-uk Kim " */", 1987ab76bc97SJung-uk Kim "%if-c-only", 19887e382390SJung-uk Kim "static int yy_get_next_buffer (M4_YY_DEF_ONLY_ARG)", 1989ab76bc97SJung-uk Kim "%endif", 1990ab76bc97SJung-uk Kim "%if-c++-only", 1991ab76bc97SJung-uk Kim "int yyFlexLexer::yy_get_next_buffer()", 1992ab76bc97SJung-uk Kim "%endif", 1993ab76bc97SJung-uk Kim "{", 1994ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 1995ab76bc97SJung-uk Kim " char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;", 1996ab76bc97SJung-uk Kim " char *source = YY_G(yytext_ptr);", 1997ab76bc97SJung-uk Kim " int number_to_move, i;", 1998ab76bc97SJung-uk Kim " int ret_val;", 1999ab76bc97SJung-uk Kim "", 2000ab76bc97SJung-uk Kim " if ( YY_G(yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] )", 2001ab76bc97SJung-uk Kim " YY_FATAL_ERROR(", 2002ab76bc97SJung-uk Kim " \"fatal flex scanner internal error--end of buffer missed\" );", 2003ab76bc97SJung-uk Kim "", 2004ab76bc97SJung-uk Kim " if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )", 2005ab76bc97SJung-uk Kim " { /* Don't try to fill the buffer, so this is an EOF. */", 2006ab76bc97SJung-uk Kim " if ( YY_G(yy_c_buf_p) - YY_G(yytext_ptr) - YY_MORE_ADJ == 1 )", 2007ab76bc97SJung-uk Kim " {", 2008ab76bc97SJung-uk Kim " /* We matched a single character, the EOB, so", 2009ab76bc97SJung-uk Kim " * treat this as a final EOF.", 2010ab76bc97SJung-uk Kim " */", 2011ab76bc97SJung-uk Kim " return EOB_ACT_END_OF_FILE;", 2012ab76bc97SJung-uk Kim " }", 2013ab76bc97SJung-uk Kim "", 2014ab76bc97SJung-uk Kim " else", 2015ab76bc97SJung-uk Kim " {", 2016ab76bc97SJung-uk Kim " /* We matched some text prior to the EOB, first", 2017ab76bc97SJung-uk Kim " * process it.", 2018ab76bc97SJung-uk Kim " */", 2019ab76bc97SJung-uk Kim " return EOB_ACT_LAST_MATCH;", 2020ab76bc97SJung-uk Kim " }", 2021ab76bc97SJung-uk Kim " }", 2022ab76bc97SJung-uk Kim "", 2023ab76bc97SJung-uk Kim " /* Try to read more data. */", 2024ab76bc97SJung-uk Kim "", 2025ab76bc97SJung-uk Kim " /* First move last chars to start of buffer. */", 20267e382390SJung-uk Kim " number_to_move = (int) (YY_G(yy_c_buf_p) - YY_G(yytext_ptr) - 1);", 2027ab76bc97SJung-uk Kim "", 2028ab76bc97SJung-uk Kim " for ( i = 0; i < number_to_move; ++i )", 2029ab76bc97SJung-uk Kim " *(dest++) = *(source++);", 2030ab76bc97SJung-uk Kim "", 2031ab76bc97SJung-uk Kim " if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )", 2032ab76bc97SJung-uk Kim " /* don't do the read, it's not guaranteed to return an EOF,", 2033ab76bc97SJung-uk Kim " * just force an EOF", 2034ab76bc97SJung-uk Kim " */", 2035ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars) = 0;", 2036ab76bc97SJung-uk Kim "", 2037ab76bc97SJung-uk Kim " else", 2038ab76bc97SJung-uk Kim " {", 20397e382390SJung-uk Kim " int num_to_read =", 2040ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;", 2041ab76bc97SJung-uk Kim "", 2042ab76bc97SJung-uk Kim " while ( num_to_read <= 0 )", 2043ab76bc97SJung-uk Kim " { /* Not enough room in the buffer - grow it. */", 2044ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_USES_REJECT]],", 2045ab76bc97SJung-uk Kim "[[", 2046ab76bc97SJung-uk Kim " YY_FATAL_ERROR(", 2047ab76bc97SJung-uk Kim "\"input buffer overflow, can't enlarge buffer because scanner uses REJECT\" );", 2048ab76bc97SJung-uk Kim "]],", 2049ab76bc97SJung-uk Kim "[[", 2050ab76bc97SJung-uk Kim " /* just a shorter name for the current buffer */", 2051ab76bc97SJung-uk Kim " YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;", 2052ab76bc97SJung-uk Kim "", 2053ab76bc97SJung-uk Kim " int yy_c_buf_p_offset =", 2054ab76bc97SJung-uk Kim " (int) (YY_G(yy_c_buf_p) - b->yy_ch_buf);", 2055ab76bc97SJung-uk Kim "", 2056ab76bc97SJung-uk Kim " if ( b->yy_is_our_buffer )", 2057ab76bc97SJung-uk Kim " {", 20587e382390SJung-uk Kim " int new_size = b->yy_buf_size * 2;", 2059ab76bc97SJung-uk Kim "", 2060ab76bc97SJung-uk Kim " if ( new_size <= 0 )", 2061ab76bc97SJung-uk Kim " b->yy_buf_size += b->yy_buf_size / 8;", 2062ab76bc97SJung-uk Kim " else", 2063ab76bc97SJung-uk Kim " b->yy_buf_size *= 2;", 2064ab76bc97SJung-uk Kim "", 2065ab76bc97SJung-uk Kim " b->yy_ch_buf = (char *)", 2066ab76bc97SJung-uk Kim " /* Include room in for 2 EOB chars. */", 2067ab76bc97SJung-uk Kim " yyrealloc( (void *) b->yy_ch_buf,", 20687e382390SJung-uk Kim " (yy_size_t) (b->yy_buf_size + 2) M4_YY_CALL_LAST_ARG );", 2069ab76bc97SJung-uk Kim " }", 2070ab76bc97SJung-uk Kim " else", 2071ab76bc97SJung-uk Kim " /* Can't grow it, we don't own it. */", 20727e382390SJung-uk Kim " b->yy_ch_buf = NULL;", 2073ab76bc97SJung-uk Kim "", 2074ab76bc97SJung-uk Kim " if ( ! b->yy_ch_buf )", 2075ab76bc97SJung-uk Kim " YY_FATAL_ERROR(", 2076ab76bc97SJung-uk Kim " \"fatal error - scanner input buffer overflow\" );", 2077ab76bc97SJung-uk Kim "", 2078ab76bc97SJung-uk Kim " YY_G(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];", 2079ab76bc97SJung-uk Kim "", 2080ab76bc97SJung-uk Kim " num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -", 2081ab76bc97SJung-uk Kim " number_to_move - 1;", 2082ab76bc97SJung-uk Kim "]])", 2083ab76bc97SJung-uk Kim " }", 2084ab76bc97SJung-uk Kim "", 2085ab76bc97SJung-uk Kim " if ( num_to_read > YY_READ_BUF_SIZE )", 2086ab76bc97SJung-uk Kim " num_to_read = YY_READ_BUF_SIZE;", 2087ab76bc97SJung-uk Kim "", 2088ab76bc97SJung-uk Kim " /* Read in more data. */", 2089ab76bc97SJung-uk Kim " YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),", 2090ab76bc97SJung-uk Kim " YY_G(yy_n_chars), num_to_read );", 2091ab76bc97SJung-uk Kim "", 2092ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars);", 2093ab76bc97SJung-uk Kim " }", 2094ab76bc97SJung-uk Kim "", 2095ab76bc97SJung-uk Kim " if ( YY_G(yy_n_chars) == 0 )", 2096ab76bc97SJung-uk Kim " {", 2097ab76bc97SJung-uk Kim " if ( number_to_move == YY_MORE_ADJ )", 2098ab76bc97SJung-uk Kim " {", 2099ab76bc97SJung-uk Kim " ret_val = EOB_ACT_END_OF_FILE;", 2100ab76bc97SJung-uk Kim " yyrestart( yyin M4_YY_CALL_LAST_ARG);", 2101ab76bc97SJung-uk Kim " }", 2102ab76bc97SJung-uk Kim "", 2103ab76bc97SJung-uk Kim " else", 2104ab76bc97SJung-uk Kim " {", 2105ab76bc97SJung-uk Kim " ret_val = EOB_ACT_LAST_MATCH;", 2106ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =", 2107ab76bc97SJung-uk Kim " YY_BUFFER_EOF_PENDING;", 2108ab76bc97SJung-uk Kim " }", 2109ab76bc97SJung-uk Kim " }", 2110ab76bc97SJung-uk Kim "", 2111ab76bc97SJung-uk Kim " else", 2112ab76bc97SJung-uk Kim " ret_val = EOB_ACT_CONTINUE_SCAN;", 2113ab76bc97SJung-uk Kim "", 21147e382390SJung-uk Kim " if ((YY_G(yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {", 2115ab76bc97SJung-uk Kim " /* Extend the array by 50%, plus the number we really need. */", 21167e382390SJung-uk Kim " int new_size = YY_G(yy_n_chars) + number_to_move + (YY_G(yy_n_chars) >> 1);", 2117ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(", 21187e382390SJung-uk Kim " (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size M4_YY_CALL_LAST_ARG );", 2119ab76bc97SJung-uk Kim " if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )", 2120ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"out of dynamic memory in yy_get_next_buffer()\" );", 21217e382390SJung-uk Kim " /* \"- 2\" to take care of EOB's */", 21227e382390SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);", 2123ab76bc97SJung-uk Kim " }", 2124ab76bc97SJung-uk Kim "", 2125ab76bc97SJung-uk Kim " YY_G(yy_n_chars) += number_to_move;", 2126ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;", 2127ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;", 2128ab76bc97SJung-uk Kim "", 2129ab76bc97SJung-uk Kim " YY_G(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];", 2130ab76bc97SJung-uk Kim "", 2131ab76bc97SJung-uk Kim " return ret_val;", 2132ab76bc97SJung-uk Kim "}", 2133ab76bc97SJung-uk Kim "]])", 2134ab76bc97SJung-uk Kim "", 2135ab76bc97SJung-uk Kim "/* yy_get_previous_state - get the state just before the EOB char was reached */", 2136ab76bc97SJung-uk Kim "", 2137ab76bc97SJung-uk Kim "%if-c-only", 2138ab76bc97SJung-uk Kim "%not-for-header", 21397e382390SJung-uk Kim " static yy_state_type yy_get_previous_state (M4_YY_DEF_ONLY_ARG)", 2140ab76bc97SJung-uk Kim "%endif", 2141ab76bc97SJung-uk Kim "%if-c++-only", 2142ab76bc97SJung-uk Kim " yy_state_type yyFlexLexer::yy_get_previous_state()", 2143ab76bc97SJung-uk Kim "%endif", 2144ab76bc97SJung-uk Kim "{", 2145ab76bc97SJung-uk Kim " yy_state_type yy_current_state;", 2146ab76bc97SJung-uk Kim " char *yy_cp;", 2147ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2148ab76bc97SJung-uk Kim "", 2149ab76bc97SJung-uk Kim "%% [15.0] code to get the start state into yy_current_state goes here", 2150ab76bc97SJung-uk Kim "", 2151ab76bc97SJung-uk Kim " for ( yy_cp = YY_G(yytext_ptr) + YY_MORE_ADJ; yy_cp < YY_G(yy_c_buf_p); ++yy_cp )", 2152ab76bc97SJung-uk Kim " {", 2153ab76bc97SJung-uk Kim "%% [16.0] code to find the next state goes here", 2154ab76bc97SJung-uk Kim " }", 2155ab76bc97SJung-uk Kim "", 2156ab76bc97SJung-uk Kim " return yy_current_state;", 2157ab76bc97SJung-uk Kim "}", 2158ab76bc97SJung-uk Kim "", 2159ab76bc97SJung-uk Kim "", 2160ab76bc97SJung-uk Kim "/* yy_try_NUL_trans - try to make a transition on the NUL character", 2161ab76bc97SJung-uk Kim " *", 2162ab76bc97SJung-uk Kim " * synopsis", 2163ab76bc97SJung-uk Kim " * next_state = yy_try_NUL_trans( current_state );", 2164ab76bc97SJung-uk Kim " */", 2165ab76bc97SJung-uk Kim "%if-c-only", 2166ab76bc97SJung-uk Kim " static yy_state_type yy_try_NUL_trans YYFARGS1( yy_state_type, yy_current_state)", 2167ab76bc97SJung-uk Kim "%endif", 2168ab76bc97SJung-uk Kim "%if-c++-only", 2169ab76bc97SJung-uk Kim " yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )", 2170ab76bc97SJung-uk Kim "%endif", 2171ab76bc97SJung-uk Kim "{", 2172ab76bc97SJung-uk Kim " int yy_is_jam;", 2173ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR(); /* This var may be unused depending upon options. */", 2174ab76bc97SJung-uk Kim "%% [17.0] code to find the next state, and perhaps do backing up, goes here", 2175ab76bc97SJung-uk Kim "", 2176ab76bc97SJung-uk Kim " M4_YY_NOOP_GUTS_VAR();", 2177ab76bc97SJung-uk Kim " return yy_is_jam ? 0 : yy_current_state;", 2178ab76bc97SJung-uk Kim "}", 2179ab76bc97SJung-uk Kim "", 2180ab76bc97SJung-uk Kim "", 21817e382390SJung-uk Kim "#ifndef YY_NO_UNPUT", 2182ab76bc97SJung-uk Kim "%if-c-only", 2183ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_UNPUT]],,", 2184ab76bc97SJung-uk Kim "[[", 2185ab76bc97SJung-uk Kim " static void yyunput YYFARGS2( int,c, char *,yy_bp)", 2186ab76bc97SJung-uk Kim "%endif", 2187ab76bc97SJung-uk Kim "%if-c++-only", 2188ab76bc97SJung-uk Kim " void yyFlexLexer::yyunput( int c, char* yy_bp)", 2189ab76bc97SJung-uk Kim "%endif", 2190ab76bc97SJung-uk Kim "{", 2191ab76bc97SJung-uk Kim " char *yy_cp;", 2192ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2193ab76bc97SJung-uk Kim "", 2194ab76bc97SJung-uk Kim " yy_cp = YY_G(yy_c_buf_p);", 2195ab76bc97SJung-uk Kim "", 2196ab76bc97SJung-uk Kim " /* undo effects of setting up yytext */", 2197ab76bc97SJung-uk Kim " *yy_cp = YY_G(yy_hold_char);", 2198ab76bc97SJung-uk Kim "", 2199ab76bc97SJung-uk Kim " if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )", 2200ab76bc97SJung-uk Kim " { /* need to shift things up to make room */", 2201ab76bc97SJung-uk Kim " /* +2 for EOB chars. */", 22027e382390SJung-uk Kim " int number_to_move = YY_G(yy_n_chars) + 2;", 2203ab76bc97SJung-uk Kim " char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[", 2204ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];", 2205ab76bc97SJung-uk Kim " char *source =", 2206ab76bc97SJung-uk Kim " &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];", 2207ab76bc97SJung-uk Kim "", 2208ab76bc97SJung-uk Kim " while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )", 2209ab76bc97SJung-uk Kim " *--dest = *--source;", 2210ab76bc97SJung-uk Kim "", 2211ab76bc97SJung-uk Kim " yy_cp += (int) (dest - source);", 2212ab76bc97SJung-uk Kim " yy_bp += (int) (dest - source);", 2213ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_n_chars =", 22147e382390SJung-uk Kim " YY_G(yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;", 2215ab76bc97SJung-uk Kim "", 2216ab76bc97SJung-uk Kim " if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )", 2217ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"flex scanner push-back overflow\" );", 2218ab76bc97SJung-uk Kim " }", 2219ab76bc97SJung-uk Kim "", 2220ab76bc97SJung-uk Kim " *--yy_cp = (char) c;", 2221ab76bc97SJung-uk Kim "", 2222ab76bc97SJung-uk Kim "%% [18.0] update yylineno here", 2223ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_USE_LINENO]],", 2224ab76bc97SJung-uk Kim "[[", 2225ab76bc97SJung-uk Kim " if ( c == '\\n' ){", 2226ab76bc97SJung-uk Kim " --yylineno;", 2227ab76bc97SJung-uk Kim " }", 2228ab76bc97SJung-uk Kim "]])", 2229ab76bc97SJung-uk Kim "", 2230ab76bc97SJung-uk Kim " YY_G(yytext_ptr) = yy_bp;", 2231ab76bc97SJung-uk Kim " YY_G(yy_hold_char) = *yy_cp;", 2232ab76bc97SJung-uk Kim " YY_G(yy_c_buf_p) = yy_cp;", 2233ab76bc97SJung-uk Kim "}", 2234ab76bc97SJung-uk Kim "%if-c-only", 2235ab76bc97SJung-uk Kim "]])", 2236ab76bc97SJung-uk Kim "%endif", 22377e382390SJung-uk Kim "#endif", 2238ab76bc97SJung-uk Kim "", 2239ab76bc97SJung-uk Kim "%if-c-only", 2240ab76bc97SJung-uk Kim "#ifndef YY_NO_INPUT", 2241ab76bc97SJung-uk Kim "#ifdef __cplusplus", 22427e382390SJung-uk Kim " static int yyinput (M4_YY_DEF_ONLY_ARG)", 2243ab76bc97SJung-uk Kim "#else", 22447e382390SJung-uk Kim " static int input (M4_YY_DEF_ONLY_ARG)", 2245ab76bc97SJung-uk Kim "#endif", 2246ab76bc97SJung-uk Kim "", 2247ab76bc97SJung-uk Kim "%endif", 2248ab76bc97SJung-uk Kim "%if-c++-only", 2249ab76bc97SJung-uk Kim " int yyFlexLexer::yyinput()", 2250ab76bc97SJung-uk Kim "%endif", 2251ab76bc97SJung-uk Kim "{", 2252ab76bc97SJung-uk Kim " int c;", 2253ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2254ab76bc97SJung-uk Kim "", 2255ab76bc97SJung-uk Kim " *YY_G(yy_c_buf_p) = YY_G(yy_hold_char);", 2256ab76bc97SJung-uk Kim "", 2257ab76bc97SJung-uk Kim " if ( *YY_G(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )", 2258ab76bc97SJung-uk Kim " {", 2259ab76bc97SJung-uk Kim " /* yy_c_buf_p now points to the character we want to return.", 2260ab76bc97SJung-uk Kim " * If this occurs *before* the EOB characters, then it's a", 2261ab76bc97SJung-uk Kim " * valid NUL; if not, then we've hit the end of the buffer.", 2262ab76bc97SJung-uk Kim " */", 2263ab76bc97SJung-uk Kim " if ( YY_G(yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] )", 2264ab76bc97SJung-uk Kim " /* This was really a NUL. */", 2265ab76bc97SJung-uk Kim " *YY_G(yy_c_buf_p) = '\\0';", 2266ab76bc97SJung-uk Kim "", 2267ab76bc97SJung-uk Kim " else", 2268ab76bc97SJung-uk Kim " { /* need more input */", 22697e382390SJung-uk Kim " int offset = (int) (YY_G(yy_c_buf_p) - YY_G(yytext_ptr));", 2270ab76bc97SJung-uk Kim " ++YY_G(yy_c_buf_p);", 2271ab76bc97SJung-uk Kim "", 2272ab76bc97SJung-uk Kim " switch ( yy_get_next_buffer( M4_YY_CALL_ONLY_ARG ) )", 2273ab76bc97SJung-uk Kim " {", 2274ab76bc97SJung-uk Kim " case EOB_ACT_LAST_MATCH:", 2275ab76bc97SJung-uk Kim " /* This happens because yy_g_n_b()", 2276ab76bc97SJung-uk Kim " * sees that we've accumulated a", 2277ab76bc97SJung-uk Kim " * token and flags that we need to", 2278ab76bc97SJung-uk Kim " * try matching the token before", 2279ab76bc97SJung-uk Kim " * proceeding. But for input(),", 2280ab76bc97SJung-uk Kim " * there's no matching to consider.", 2281ab76bc97SJung-uk Kim " * So convert the EOB_ACT_LAST_MATCH", 2282ab76bc97SJung-uk Kim " * to EOB_ACT_END_OF_FILE.", 2283ab76bc97SJung-uk Kim " */", 2284ab76bc97SJung-uk Kim "", 2285ab76bc97SJung-uk Kim " /* Reset buffer status. */", 2286ab76bc97SJung-uk Kim " yyrestart( yyin M4_YY_CALL_LAST_ARG);", 2287ab76bc97SJung-uk Kim "", 2288ab76bc97SJung-uk Kim " /*FALLTHROUGH*/", 2289ab76bc97SJung-uk Kim "", 2290ab76bc97SJung-uk Kim " case EOB_ACT_END_OF_FILE:", 2291ab76bc97SJung-uk Kim " {", 2292ab76bc97SJung-uk Kim " if ( yywrap( M4_YY_CALL_ONLY_ARG ) )", 2293686cf546SJung-uk Kim "#ifdef YY_FLEX_LEX_COMPAT", 22947e382390SJung-uk Kim " return 0;", 2295686cf546SJung-uk Kim "#else", 2296686cf546SJung-uk Kim " return EOF;", 2297686cf546SJung-uk Kim "#endif", 2298ab76bc97SJung-uk Kim "", 2299ab76bc97SJung-uk Kim " if ( ! YY_G(yy_did_buffer_switch_on_eof) )", 2300ab76bc97SJung-uk Kim " YY_NEW_FILE;", 2301ab76bc97SJung-uk Kim "#ifdef __cplusplus", 2302ab76bc97SJung-uk Kim " return yyinput(M4_YY_CALL_ONLY_ARG);", 2303ab76bc97SJung-uk Kim "#else", 2304ab76bc97SJung-uk Kim " return input(M4_YY_CALL_ONLY_ARG);", 2305ab76bc97SJung-uk Kim "#endif", 2306ab76bc97SJung-uk Kim " }", 2307ab76bc97SJung-uk Kim "", 2308ab76bc97SJung-uk Kim " case EOB_ACT_CONTINUE_SCAN:", 2309ab76bc97SJung-uk Kim " YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + offset;", 2310ab76bc97SJung-uk Kim " break;", 2311ab76bc97SJung-uk Kim " }", 2312ab76bc97SJung-uk Kim " }", 2313ab76bc97SJung-uk Kim " }", 2314ab76bc97SJung-uk Kim "", 2315ab76bc97SJung-uk Kim " c = *(unsigned char *) YY_G(yy_c_buf_p); /* cast for 8-bit char's */", 2316ab76bc97SJung-uk Kim " *YY_G(yy_c_buf_p) = '\\0'; /* preserve yytext */", 2317ab76bc97SJung-uk Kim " YY_G(yy_hold_char) = *++YY_G(yy_c_buf_p);", 2318ab76bc97SJung-uk Kim "", 2319ab76bc97SJung-uk Kim "%% [19.0] update BOL and yylineno", 2320ab76bc97SJung-uk Kim "", 2321ab76bc97SJung-uk Kim " return c;", 2322ab76bc97SJung-uk Kim "}", 2323ab76bc97SJung-uk Kim "%if-c-only", 2324ab76bc97SJung-uk Kim "#endif /* ifndef YY_NO_INPUT */", 2325ab76bc97SJung-uk Kim "%endif", 2326ab76bc97SJung-uk Kim "", 2327ab76bc97SJung-uk Kim "/** Immediately switch to a different input stream.", 2328ab76bc97SJung-uk Kim " * @param input_file A readable stream.", 2329ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2330ab76bc97SJung-uk Kim " * @note This function does not reset the start condition to @c INITIAL .", 2331ab76bc97SJung-uk Kim " */", 2332ab76bc97SJung-uk Kim "%if-c-only", 2333ab76bc97SJung-uk Kim " void yyrestart YYFARGS1( FILE *,input_file)", 2334ab76bc97SJung-uk Kim "%endif", 2335ab76bc97SJung-uk Kim "%if-c++-only", 23367e382390SJung-uk Kim " void yyFlexLexer::yyrestart( std::istream& input_file )", 2337ab76bc97SJung-uk Kim "%endif", 2338ab76bc97SJung-uk Kim "{", 2339ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2340ab76bc97SJung-uk Kim "", 2341ab76bc97SJung-uk Kim " if ( ! YY_CURRENT_BUFFER ){", 2342ab76bc97SJung-uk Kim " yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG);", 2343ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE =", 2344ab76bc97SJung-uk Kim " yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG);", 2345ab76bc97SJung-uk Kim " }", 2346ab76bc97SJung-uk Kim "", 2347ab76bc97SJung-uk Kim " yy_init_buffer( YY_CURRENT_BUFFER, input_file M4_YY_CALL_LAST_ARG);", 2348ab76bc97SJung-uk Kim " yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );", 2349ab76bc97SJung-uk Kim "}", 2350ab76bc97SJung-uk Kim "", 23517e382390SJung-uk Kim "%if-c++-only", 23527e382390SJung-uk Kim "/** Delegate to the new version that takes an istream reference.", 23537e382390SJung-uk Kim " * @param input_file A readable stream.", 23547e382390SJung-uk Kim " * M4_YY_DOC_PARAM", 23557e382390SJung-uk Kim " * @note This function does not reset the start condition to @c INITIAL .", 23567e382390SJung-uk Kim " */", 23577e382390SJung-uk Kim "void yyFlexLexer::yyrestart( std::istream* input_file )", 23587e382390SJung-uk Kim "{", 23597e382390SJung-uk Kim " if( ! input_file ) {", 23607e382390SJung-uk Kim " input_file = &yyin;", 23617e382390SJung-uk Kim " }", 23627e382390SJung-uk Kim " yyrestart( *input_file );", 23637e382390SJung-uk Kim "}", 23647e382390SJung-uk Kim "%endif", 23657e382390SJung-uk Kim "", 2366ab76bc97SJung-uk Kim "/** Switch to a different input buffer.", 2367ab76bc97SJung-uk Kim " * @param new_buffer The new input buffer.", 2368ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2369ab76bc97SJung-uk Kim " */", 2370ab76bc97SJung-uk Kim "%if-c-only", 2371ab76bc97SJung-uk Kim " void yy_switch_to_buffer YYFARGS1( YY_BUFFER_STATE ,new_buffer)", 2372ab76bc97SJung-uk Kim "%endif", 2373ab76bc97SJung-uk Kim "%if-c++-only", 2374ab76bc97SJung-uk Kim " void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )", 2375ab76bc97SJung-uk Kim "%endif", 2376ab76bc97SJung-uk Kim "{", 2377ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2378ab76bc97SJung-uk Kim "", 2379ab76bc97SJung-uk Kim " /* TODO. We should be able to replace this entire function body", 2380ab76bc97SJung-uk Kim " * with", 2381ab76bc97SJung-uk Kim " * yypop_buffer_state();", 2382ab76bc97SJung-uk Kim " * yypush_buffer_state(new_buffer);", 2383ab76bc97SJung-uk Kim " */", 2384ab76bc97SJung-uk Kim " yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG);", 2385ab76bc97SJung-uk Kim " if ( YY_CURRENT_BUFFER == new_buffer )", 2386ab76bc97SJung-uk Kim " return;", 2387ab76bc97SJung-uk Kim "", 2388ab76bc97SJung-uk Kim " if ( YY_CURRENT_BUFFER )", 2389ab76bc97SJung-uk Kim " {", 2390ab76bc97SJung-uk Kim " /* Flush out information for old buffer. */", 2391ab76bc97SJung-uk Kim " *YY_G(yy_c_buf_p) = YY_G(yy_hold_char);", 2392ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = YY_G(yy_c_buf_p);", 2393ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars);", 2394ab76bc97SJung-uk Kim " }", 2395ab76bc97SJung-uk Kim "", 2396ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE = new_buffer;", 2397ab76bc97SJung-uk Kim " yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );", 2398ab76bc97SJung-uk Kim "", 2399ab76bc97SJung-uk Kim " /* We don't actually know whether we did this switch during", 2400ab76bc97SJung-uk Kim " * EOF (yywrap()) processing, but the only time this flag", 2401ab76bc97SJung-uk Kim " * is looked at is after yywrap() is called, so it's safe", 2402ab76bc97SJung-uk Kim " * to go ahead and always set it.", 2403ab76bc97SJung-uk Kim " */", 2404ab76bc97SJung-uk Kim " YY_G(yy_did_buffer_switch_on_eof) = 1;", 2405ab76bc97SJung-uk Kim "}", 2406ab76bc97SJung-uk Kim "", 2407ab76bc97SJung-uk Kim "", 2408ab76bc97SJung-uk Kim "%if-c-only", 24097e382390SJung-uk Kim "static void yy_load_buffer_state (M4_YY_DEF_ONLY_ARG)", 2410ab76bc97SJung-uk Kim "%endif", 2411ab76bc97SJung-uk Kim "%if-c++-only", 2412ab76bc97SJung-uk Kim " void yyFlexLexer::yy_load_buffer_state()", 2413ab76bc97SJung-uk Kim "%endif", 2414ab76bc97SJung-uk Kim "{", 2415ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2416ab76bc97SJung-uk Kim " YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;", 2417ab76bc97SJung-uk Kim " YY_G(yytext_ptr) = YY_G(yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;", 24187e382390SJung-uk Kim "%if-c-only", 2419ab76bc97SJung-uk Kim " yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;", 24207e382390SJung-uk Kim "%endif", 24217e382390SJung-uk Kim "%if-c++-only", 24227e382390SJung-uk Kim " yyin.rdbuf(YY_CURRENT_BUFFER_LVALUE->yy_input_file);", 24237e382390SJung-uk Kim "%endif", 2424ab76bc97SJung-uk Kim " YY_G(yy_hold_char) = *YY_G(yy_c_buf_p);", 2425ab76bc97SJung-uk Kim "}", 2426ab76bc97SJung-uk Kim "", 2427ab76bc97SJung-uk Kim "/** Allocate and initialize an input buffer state.", 2428ab76bc97SJung-uk Kim " * @param file A readable stream.", 2429ab76bc97SJung-uk Kim " * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.", 2430ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2431ab76bc97SJung-uk Kim " * @return the allocated buffer state.", 2432ab76bc97SJung-uk Kim " */", 2433ab76bc97SJung-uk Kim "%if-c-only", 2434ab76bc97SJung-uk Kim " YY_BUFFER_STATE yy_create_buffer YYFARGS2( FILE *,file, int ,size)", 2435ab76bc97SJung-uk Kim "%endif", 2436ab76bc97SJung-uk Kim "%if-c++-only", 24377e382390SJung-uk Kim " YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream& file, int size )", 2438ab76bc97SJung-uk Kim "%endif", 2439ab76bc97SJung-uk Kim "{", 2440ab76bc97SJung-uk Kim " YY_BUFFER_STATE b;", 2441ab76bc97SJung-uk Kim " m4_dnl M4_YY_DECL_GUTS_VAR();", 2442ab76bc97SJung-uk Kim "", 2443ab76bc97SJung-uk Kim " b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) M4_YY_CALL_LAST_ARG );", 2444ab76bc97SJung-uk Kim " if ( ! b )", 2445ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"out of dynamic memory in yy_create_buffer()\" );", 2446ab76bc97SJung-uk Kim "", 2447ab76bc97SJung-uk Kim " b->yy_buf_size = size;", 2448ab76bc97SJung-uk Kim "", 2449ab76bc97SJung-uk Kim " /* yy_ch_buf has to be 2 characters longer than the size given because", 2450ab76bc97SJung-uk Kim " * we need to put in 2 end-of-buffer characters.", 2451ab76bc97SJung-uk Kim " */", 24527e382390SJung-uk Kim " b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) M4_YY_CALL_LAST_ARG );", 2453ab76bc97SJung-uk Kim " if ( ! b->yy_ch_buf )", 2454ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"out of dynamic memory in yy_create_buffer()\" );", 2455ab76bc97SJung-uk Kim "", 2456ab76bc97SJung-uk Kim " b->yy_is_our_buffer = 1;", 2457ab76bc97SJung-uk Kim "", 2458ab76bc97SJung-uk Kim " yy_init_buffer( b, file M4_YY_CALL_LAST_ARG);", 2459ab76bc97SJung-uk Kim "", 2460ab76bc97SJung-uk Kim " return b;", 2461ab76bc97SJung-uk Kim "}", 2462ab76bc97SJung-uk Kim "", 24637e382390SJung-uk Kim "%if-c++-only", 24647e382390SJung-uk Kim "/** Delegate creation of buffers to the new version that takes an istream reference.", 24657e382390SJung-uk Kim " * @param file A readable stream.", 24667e382390SJung-uk Kim " * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.", 24677e382390SJung-uk Kim " * M4_YY_DOC_PARAM", 24687e382390SJung-uk Kim " * @return the allocated buffer state.", 24697e382390SJung-uk Kim " */", 24707e382390SJung-uk Kim " YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )", 24717e382390SJung-uk Kim "{", 24727e382390SJung-uk Kim " return yy_create_buffer( *file, size );", 24737e382390SJung-uk Kim "}", 24747e382390SJung-uk Kim "%endif", 24757e382390SJung-uk Kim "", 2476ab76bc97SJung-uk Kim "/** Destroy the buffer.", 2477ab76bc97SJung-uk Kim " * @param b a buffer created with yy_create_buffer()", 2478ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2479ab76bc97SJung-uk Kim " */", 2480ab76bc97SJung-uk Kim "%if-c-only", 2481ab76bc97SJung-uk Kim " void yy_delete_buffer YYFARGS1( YY_BUFFER_STATE ,b)", 2482ab76bc97SJung-uk Kim "%endif", 2483ab76bc97SJung-uk Kim "%if-c++-only", 2484ab76bc97SJung-uk Kim " void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )", 2485ab76bc97SJung-uk Kim "%endif", 2486ab76bc97SJung-uk Kim "{", 2487ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2488ab76bc97SJung-uk Kim "", 2489ab76bc97SJung-uk Kim " if ( ! b )", 2490ab76bc97SJung-uk Kim " return;", 2491ab76bc97SJung-uk Kim "", 2492ab76bc97SJung-uk Kim " if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */", 2493ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;", 2494ab76bc97SJung-uk Kim "", 2495ab76bc97SJung-uk Kim " if ( b->yy_is_our_buffer )", 2496ab76bc97SJung-uk Kim " yyfree( (void *) b->yy_ch_buf M4_YY_CALL_LAST_ARG );", 2497ab76bc97SJung-uk Kim "", 2498ab76bc97SJung-uk Kim " yyfree( (void *) b M4_YY_CALL_LAST_ARG );", 2499ab76bc97SJung-uk Kim "}", 2500ab76bc97SJung-uk Kim "", 2501ab76bc97SJung-uk Kim "", 2502ab76bc97SJung-uk Kim "/* Initializes or reinitializes a buffer.", 2503ab76bc97SJung-uk Kim " * This function is sometimes called more than once on the same buffer,", 2504ab76bc97SJung-uk Kim " * such as during a yyrestart() or at EOF.", 2505ab76bc97SJung-uk Kim " */", 2506ab76bc97SJung-uk Kim "%if-c-only", 2507ab76bc97SJung-uk Kim " static void yy_init_buffer YYFARGS2( YY_BUFFER_STATE ,b, FILE *,file)", 2508ab76bc97SJung-uk Kim "%endif", 2509ab76bc97SJung-uk Kim "%if-c++-only", 25107e382390SJung-uk Kim " void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream& file )", 2511ab76bc97SJung-uk Kim "%endif", 2512ab76bc97SJung-uk Kim "", 2513ab76bc97SJung-uk Kim "{", 2514ab76bc97SJung-uk Kim " int oerrno = errno;", 2515ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2516ab76bc97SJung-uk Kim "", 2517ab76bc97SJung-uk Kim " yy_flush_buffer( b M4_YY_CALL_LAST_ARG);", 2518ab76bc97SJung-uk Kim "", 25197e382390SJung-uk Kim "%if-c-only", 2520ab76bc97SJung-uk Kim " b->yy_input_file = file;", 25217e382390SJung-uk Kim "%endif", 25227e382390SJung-uk Kim "%if-c++-only", 25237e382390SJung-uk Kim " b->yy_input_file = file.rdbuf();", 25247e382390SJung-uk Kim "%endif", 2525ab76bc97SJung-uk Kim " b->yy_fill_buffer = 1;", 2526ab76bc97SJung-uk Kim "", 2527ab76bc97SJung-uk Kim " /* If b is the current buffer, then yy_init_buffer was _probably_", 2528ab76bc97SJung-uk Kim " * called from yyrestart() or through yy_get_next_buffer.", 2529ab76bc97SJung-uk Kim " * In that case, we don't want to reset the lineno or column.", 2530ab76bc97SJung-uk Kim " */", 2531ab76bc97SJung-uk Kim " if (b != YY_CURRENT_BUFFER){", 2532ab76bc97SJung-uk Kim " b->yy_bs_lineno = 1;", 2533ab76bc97SJung-uk Kim " b->yy_bs_column = 0;", 2534ab76bc97SJung-uk Kim " }", 2535ab76bc97SJung-uk Kim "", 2536ab76bc97SJung-uk Kim "%if-c-only", 2537ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_ALWAYS_INTERACTIVE]],", 2538ab76bc97SJung-uk Kim "[[", 2539ab76bc97SJung-uk Kim " b->yy_is_interactive = 1;", 2540ab76bc97SJung-uk Kim "]],", 2541ab76bc97SJung-uk Kim "[[", 2542ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]],", 2543ab76bc97SJung-uk Kim " [[", 2544ab76bc97SJung-uk Kim " b->yy_is_interactive = 0;", 2545ab76bc97SJung-uk Kim " ]],", 2546ab76bc97SJung-uk Kim " [[", 2547ab76bc97SJung-uk Kim " b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;", 2548ab76bc97SJung-uk Kim " ]])", 2549ab76bc97SJung-uk Kim "]])", 2550ab76bc97SJung-uk Kim "%endif", 2551ab76bc97SJung-uk Kim "%if-c++-only", 2552ab76bc97SJung-uk Kim " b->yy_is_interactive = 0;", 2553ab76bc97SJung-uk Kim "%endif", 2554ab76bc97SJung-uk Kim " errno = oerrno;", 2555ab76bc97SJung-uk Kim "}", 2556ab76bc97SJung-uk Kim "", 2557ab76bc97SJung-uk Kim "/** Discard all buffered characters. On the next scan, YY_INPUT will be called.", 2558ab76bc97SJung-uk Kim " * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.", 2559ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2560ab76bc97SJung-uk Kim " */", 2561ab76bc97SJung-uk Kim "%if-c-only", 2562ab76bc97SJung-uk Kim " void yy_flush_buffer YYFARGS1( YY_BUFFER_STATE ,b)", 2563ab76bc97SJung-uk Kim "%endif", 2564ab76bc97SJung-uk Kim "%if-c++-only", 2565ab76bc97SJung-uk Kim " void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )", 2566ab76bc97SJung-uk Kim "%endif", 2567ab76bc97SJung-uk Kim "{", 2568ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2569ab76bc97SJung-uk Kim " if ( ! b )", 2570ab76bc97SJung-uk Kim " return;", 2571ab76bc97SJung-uk Kim "", 2572ab76bc97SJung-uk Kim " b->yy_n_chars = 0;", 2573ab76bc97SJung-uk Kim "", 2574ab76bc97SJung-uk Kim " /* We always need two end-of-buffer characters. The first causes", 2575ab76bc97SJung-uk Kim " * a transition to the end-of-buffer state. The second causes", 2576ab76bc97SJung-uk Kim " * a jam in that state.", 2577ab76bc97SJung-uk Kim " */", 2578ab76bc97SJung-uk Kim " b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;", 2579ab76bc97SJung-uk Kim " b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;", 2580ab76bc97SJung-uk Kim "", 2581ab76bc97SJung-uk Kim " b->yy_buf_pos = &b->yy_ch_buf[0];", 2582ab76bc97SJung-uk Kim "", 2583ab76bc97SJung-uk Kim " b->yy_at_bol = 1;", 2584ab76bc97SJung-uk Kim " b->yy_buffer_status = YY_BUFFER_NEW;", 2585ab76bc97SJung-uk Kim "", 2586ab76bc97SJung-uk Kim " if ( b == YY_CURRENT_BUFFER )", 2587ab76bc97SJung-uk Kim " yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );", 2588ab76bc97SJung-uk Kim "}", 2589ab76bc97SJung-uk Kim "", 2590ab76bc97SJung-uk Kim "%if-c-or-c++", 2591ab76bc97SJung-uk Kim "/** Pushes the new state onto the stack. The new state becomes", 2592ab76bc97SJung-uk Kim " * the current state. This function will allocate the stack", 2593ab76bc97SJung-uk Kim " * if necessary.", 2594ab76bc97SJung-uk Kim " * @param new_buffer The new state.", 2595ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2596ab76bc97SJung-uk Kim " */", 2597ab76bc97SJung-uk Kim "%if-c-only", 2598ab76bc97SJung-uk Kim "void yypush_buffer_state YYFARGS1(YY_BUFFER_STATE,new_buffer)", 2599ab76bc97SJung-uk Kim "%endif", 2600ab76bc97SJung-uk Kim "%if-c++-only", 2601ab76bc97SJung-uk Kim "void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)", 2602ab76bc97SJung-uk Kim "%endif", 2603ab76bc97SJung-uk Kim "{", 2604ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2605ab76bc97SJung-uk Kim " if (new_buffer == NULL)", 2606ab76bc97SJung-uk Kim " return;", 2607ab76bc97SJung-uk Kim "", 2608ab76bc97SJung-uk Kim " yyensure_buffer_stack(M4_YY_CALL_ONLY_ARG);", 2609ab76bc97SJung-uk Kim "", 2610ab76bc97SJung-uk Kim " /* This block is copied from yy_switch_to_buffer. */", 2611ab76bc97SJung-uk Kim " if ( YY_CURRENT_BUFFER )", 2612ab76bc97SJung-uk Kim " {", 2613ab76bc97SJung-uk Kim " /* Flush out information for old buffer. */", 2614ab76bc97SJung-uk Kim " *YY_G(yy_c_buf_p) = YY_G(yy_hold_char);", 2615ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = YY_G(yy_c_buf_p);", 2616ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars);", 2617ab76bc97SJung-uk Kim " }", 2618ab76bc97SJung-uk Kim "", 2619ab76bc97SJung-uk Kim " /* Only push if top exists. Otherwise, replace top. */", 2620ab76bc97SJung-uk Kim " if (YY_CURRENT_BUFFER)", 2621ab76bc97SJung-uk Kim " YY_G(yy_buffer_stack_top)++;", 2622ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE = new_buffer;", 2623ab76bc97SJung-uk Kim "", 2624ab76bc97SJung-uk Kim " /* copied from yy_switch_to_buffer. */", 2625ab76bc97SJung-uk Kim " yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );", 2626ab76bc97SJung-uk Kim " YY_G(yy_did_buffer_switch_on_eof) = 1;", 2627ab76bc97SJung-uk Kim "}", 2628ab76bc97SJung-uk Kim "%endif", 2629ab76bc97SJung-uk Kim "", 2630ab76bc97SJung-uk Kim "", 2631ab76bc97SJung-uk Kim "%if-c-or-c++", 2632ab76bc97SJung-uk Kim "/** Removes and deletes the top of the stack, if present.", 2633ab76bc97SJung-uk Kim " * The next element becomes the new top.", 2634ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2635ab76bc97SJung-uk Kim " */", 2636ab76bc97SJung-uk Kim "%if-c-only", 26377e382390SJung-uk Kim "void yypop_buffer_state (M4_YY_DEF_ONLY_ARG)", 2638ab76bc97SJung-uk Kim "%endif", 2639ab76bc97SJung-uk Kim "%if-c++-only", 2640ab76bc97SJung-uk Kim "void yyFlexLexer::yypop_buffer_state (void)", 2641ab76bc97SJung-uk Kim "%endif", 2642ab76bc97SJung-uk Kim "{", 2643ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2644ab76bc97SJung-uk Kim " if (!YY_CURRENT_BUFFER)", 2645ab76bc97SJung-uk Kim " return;", 2646ab76bc97SJung-uk Kim "", 2647ab76bc97SJung-uk Kim " yy_delete_buffer(YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG);", 2648ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE = NULL;", 2649ab76bc97SJung-uk Kim " if (YY_G(yy_buffer_stack_top) > 0)", 2650ab76bc97SJung-uk Kim " --YY_G(yy_buffer_stack_top);", 2651ab76bc97SJung-uk Kim "", 2652ab76bc97SJung-uk Kim " if (YY_CURRENT_BUFFER) {", 2653ab76bc97SJung-uk Kim " yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );", 2654ab76bc97SJung-uk Kim " YY_G(yy_did_buffer_switch_on_eof) = 1;", 2655ab76bc97SJung-uk Kim " }", 2656ab76bc97SJung-uk Kim "}", 2657ab76bc97SJung-uk Kim "%endif", 2658ab76bc97SJung-uk Kim "", 2659ab76bc97SJung-uk Kim "", 2660ab76bc97SJung-uk Kim "%if-c-or-c++", 2661ab76bc97SJung-uk Kim "/* Allocates the stack if it does not exist.", 2662ab76bc97SJung-uk Kim " * Guarantees space for at least one push.", 2663ab76bc97SJung-uk Kim " */", 2664ab76bc97SJung-uk Kim "%if-c-only", 26657e382390SJung-uk Kim "static void yyensure_buffer_stack (M4_YY_DEF_ONLY_ARG)", 2666ab76bc97SJung-uk Kim "%endif", 2667ab76bc97SJung-uk Kim "%if-c++-only", 2668ab76bc97SJung-uk Kim "void yyFlexLexer::yyensure_buffer_stack(void)", 2669ab76bc97SJung-uk Kim "%endif", 2670ab76bc97SJung-uk Kim "{", 2671ab76bc97SJung-uk Kim " yy_size_t num_to_alloc;", 2672ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2673ab76bc97SJung-uk Kim "", 2674ab76bc97SJung-uk Kim " if (!YY_G(yy_buffer_stack)) {", 2675ab76bc97SJung-uk Kim "", 2676ab76bc97SJung-uk Kim " /* First allocation is just for 2 elements, since we don't know if this", 2677ab76bc97SJung-uk Kim " * scanner will even need a stack. We use 2 instead of 1 to avoid an", 2678ab76bc97SJung-uk Kim " * immediate realloc on the next call.", 2679ab76bc97SJung-uk Kim " */", 26807e382390SJung-uk Kim " num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */", 2681ab76bc97SJung-uk Kim " YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc", 2682ab76bc97SJung-uk Kim " (num_to_alloc * sizeof(struct yy_buffer_state*)", 2683ab76bc97SJung-uk Kim " M4_YY_CALL_LAST_ARG);", 2684ab76bc97SJung-uk Kim " if ( ! YY_G(yy_buffer_stack) )", 2685ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"out of dynamic memory in yyensure_buffer_stack()\" );", 2686ab76bc97SJung-uk Kim "", 2687ab76bc97SJung-uk Kim "", 2688ab76bc97SJung-uk Kim " memset(YY_G(yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));", 2689ab76bc97SJung-uk Kim "", 2690ab76bc97SJung-uk Kim " YY_G(yy_buffer_stack_max) = num_to_alloc;", 2691ab76bc97SJung-uk Kim " YY_G(yy_buffer_stack_top) = 0;", 2692ab76bc97SJung-uk Kim " return;", 2693ab76bc97SJung-uk Kim " }", 2694ab76bc97SJung-uk Kim "", 2695ab76bc97SJung-uk Kim " if (YY_G(yy_buffer_stack_top) >= (YY_G(yy_buffer_stack_max)) - 1){", 2696ab76bc97SJung-uk Kim "", 2697ab76bc97SJung-uk Kim " /* Increase the buffer to prepare for a possible push. */", 26987e382390SJung-uk Kim " yy_size_t grow_size = 8 /* arbitrary grow size */;", 2699ab76bc97SJung-uk Kim "", 2700ab76bc97SJung-uk Kim " num_to_alloc = YY_G(yy_buffer_stack_max) + grow_size;", 2701ab76bc97SJung-uk Kim " YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc", 2702ab76bc97SJung-uk Kim " (YY_G(yy_buffer_stack),", 2703ab76bc97SJung-uk Kim " num_to_alloc * sizeof(struct yy_buffer_state*)", 2704ab76bc97SJung-uk Kim " M4_YY_CALL_LAST_ARG);", 2705ab76bc97SJung-uk Kim " if ( ! YY_G(yy_buffer_stack) )", 2706ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"out of dynamic memory in yyensure_buffer_stack()\" );", 2707ab76bc97SJung-uk Kim "", 2708ab76bc97SJung-uk Kim " /* zero only the new slots.*/", 2709ab76bc97SJung-uk Kim " memset(YY_G(yy_buffer_stack) + YY_G(yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));", 2710ab76bc97SJung-uk Kim " YY_G(yy_buffer_stack_max) = num_to_alloc;", 2711ab76bc97SJung-uk Kim " }", 2712ab76bc97SJung-uk Kim "}", 2713ab76bc97SJung-uk Kim "%endif", 2714ab76bc97SJung-uk Kim "", 2715ab76bc97SJung-uk Kim "", 2716ab76bc97SJung-uk Kim "", 2717ab76bc97SJung-uk Kim "", 2718ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SCAN_BUFFER]],,", 2719ab76bc97SJung-uk Kim "[[", 2720ab76bc97SJung-uk Kim "%if-c-only", 2721ab76bc97SJung-uk Kim "/** Setup the input buffer state to scan directly from a user-specified character buffer.", 2722ab76bc97SJung-uk Kim " * @param base the character buffer", 2723ab76bc97SJung-uk Kim " * @param size the size in bytes of the character buffer", 2724ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2725ab76bc97SJung-uk Kim " * @return the newly allocated buffer state object.", 2726ab76bc97SJung-uk Kim " */", 2727ab76bc97SJung-uk Kim "YY_BUFFER_STATE yy_scan_buffer YYFARGS2( char *,base, yy_size_t ,size)", 2728ab76bc97SJung-uk Kim "{", 2729ab76bc97SJung-uk Kim " YY_BUFFER_STATE b;", 2730ab76bc97SJung-uk Kim " m4_dnl M4_YY_DECL_GUTS_VAR();", 2731ab76bc97SJung-uk Kim "", 2732ab76bc97SJung-uk Kim " if ( size < 2 ||", 2733ab76bc97SJung-uk Kim " base[size-2] != YY_END_OF_BUFFER_CHAR ||", 2734ab76bc97SJung-uk Kim " base[size-1] != YY_END_OF_BUFFER_CHAR )", 2735ab76bc97SJung-uk Kim " /* They forgot to leave room for the EOB's. */", 27367e382390SJung-uk Kim " return NULL;", 2737ab76bc97SJung-uk Kim "", 2738ab76bc97SJung-uk Kim " b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) M4_YY_CALL_LAST_ARG );", 2739ab76bc97SJung-uk Kim " if ( ! b )", 2740ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"out of dynamic memory in yy_scan_buffer()\" );", 2741ab76bc97SJung-uk Kim "", 27427e382390SJung-uk Kim " b->yy_buf_size = (int) (size - 2); /* \"- 2\" to take care of EOB's */", 2743ab76bc97SJung-uk Kim " b->yy_buf_pos = b->yy_ch_buf = base;", 2744ab76bc97SJung-uk Kim " b->yy_is_our_buffer = 0;", 27457e382390SJung-uk Kim " b->yy_input_file = NULL;", 2746ab76bc97SJung-uk Kim " b->yy_n_chars = b->yy_buf_size;", 2747ab76bc97SJung-uk Kim " b->yy_is_interactive = 0;", 2748ab76bc97SJung-uk Kim " b->yy_at_bol = 1;", 2749ab76bc97SJung-uk Kim " b->yy_fill_buffer = 0;", 2750ab76bc97SJung-uk Kim " b->yy_buffer_status = YY_BUFFER_NEW;", 2751ab76bc97SJung-uk Kim "", 2752ab76bc97SJung-uk Kim " yy_switch_to_buffer( b M4_YY_CALL_LAST_ARG );", 2753ab76bc97SJung-uk Kim "", 2754ab76bc97SJung-uk Kim " return b;", 2755ab76bc97SJung-uk Kim "}", 2756ab76bc97SJung-uk Kim "%endif", 2757ab76bc97SJung-uk Kim "]])", 2758ab76bc97SJung-uk Kim "", 2759ab76bc97SJung-uk Kim "", 2760ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SCAN_STRING]],,", 2761ab76bc97SJung-uk Kim "[[", 2762ab76bc97SJung-uk Kim "%if-c-only", 2763ab76bc97SJung-uk Kim "/** Setup the input buffer state to scan a string. The next call to yylex() will", 2764ab76bc97SJung-uk Kim " * scan from a @e copy of @a str.", 2765ab76bc97SJung-uk Kim " * @param yystr a NUL-terminated string to scan", 2766ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2767ab76bc97SJung-uk Kim " * @return the newly allocated buffer state object.", 2768ab76bc97SJung-uk Kim " * @note If you want to scan bytes that may contain NUL values, then use", 2769ab76bc97SJung-uk Kim " * yy_scan_bytes() instead.", 2770ab76bc97SJung-uk Kim " */", 27717e382390SJung-uk Kim "YY_BUFFER_STATE yy_scan_string YYFARGS1( const char *, yystr)", 2772ab76bc97SJung-uk Kim "{", 2773ab76bc97SJung-uk Kim " m4_dnl M4_YY_DECL_GUTS_VAR();", 2774ab76bc97SJung-uk Kim "", 27757e382390SJung-uk Kim " return yy_scan_bytes( yystr, (int) strlen(yystr) M4_YY_CALL_LAST_ARG);", 2776ab76bc97SJung-uk Kim "}", 2777ab76bc97SJung-uk Kim "%endif", 2778ab76bc97SJung-uk Kim "]])", 2779ab76bc97SJung-uk Kim "", 2780ab76bc97SJung-uk Kim "", 2781ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SCAN_BYTES]],,", 2782ab76bc97SJung-uk Kim "[[", 2783ab76bc97SJung-uk Kim "%if-c-only", 2784ab76bc97SJung-uk Kim "/** Setup the input buffer state to scan the given bytes. The next call to yylex() will", 2785ab76bc97SJung-uk Kim " * scan from a @e copy of @a bytes.", 2786ab76bc97SJung-uk Kim " * @param yybytes the byte buffer to scan", 2787ab76bc97SJung-uk Kim " * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.", 2788ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2789ab76bc97SJung-uk Kim " * @return the newly allocated buffer state object.", 2790ab76bc97SJung-uk Kim " */", 27917e382390SJung-uk Kim "YY_BUFFER_STATE yy_scan_bytes YYFARGS2( const char *,yybytes, int ,_yybytes_len)", 2792ab76bc97SJung-uk Kim "{", 2793ab76bc97SJung-uk Kim " YY_BUFFER_STATE b;", 2794ab76bc97SJung-uk Kim " char *buf;", 2795ab76bc97SJung-uk Kim " yy_size_t n;", 27967e382390SJung-uk Kim " int i;", 2797ab76bc97SJung-uk Kim " m4_dnl M4_YY_DECL_GUTS_VAR();", 2798ab76bc97SJung-uk Kim "", 2799ab76bc97SJung-uk Kim " /* Get memory for full buffer, including space for trailing EOB's. */", 28007e382390SJung-uk Kim " n = (yy_size_t) (_yybytes_len + 2);", 2801ab76bc97SJung-uk Kim " buf = (char *) yyalloc( n M4_YY_CALL_LAST_ARG );", 2802ab76bc97SJung-uk Kim " if ( ! buf )", 2803ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"out of dynamic memory in yy_scan_bytes()\" );", 2804ab76bc97SJung-uk Kim "", 2805ab76bc97SJung-uk Kim " for ( i = 0; i < _yybytes_len; ++i )", 2806ab76bc97SJung-uk Kim " buf[i] = yybytes[i];", 2807ab76bc97SJung-uk Kim "", 2808ab76bc97SJung-uk Kim " buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;", 2809ab76bc97SJung-uk Kim "", 2810ab76bc97SJung-uk Kim " b = yy_scan_buffer( buf, n M4_YY_CALL_LAST_ARG);", 2811ab76bc97SJung-uk Kim " if ( ! b )", 2812ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"bad buffer in yy_scan_bytes()\" );", 2813ab76bc97SJung-uk Kim "", 2814ab76bc97SJung-uk Kim " /* It's okay to grow etc. this buffer, and we should throw it", 2815ab76bc97SJung-uk Kim " * away when we're done.", 2816ab76bc97SJung-uk Kim " */", 2817ab76bc97SJung-uk Kim " b->yy_is_our_buffer = 1;", 2818ab76bc97SJung-uk Kim "", 2819ab76bc97SJung-uk Kim " return b;", 2820ab76bc97SJung-uk Kim "}", 2821ab76bc97SJung-uk Kim "%endif", 2822ab76bc97SJung-uk Kim "]])", 2823ab76bc97SJung-uk Kim "", 2824ab76bc97SJung-uk Kim "", 2825ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_PUSH_STATE]],,", 2826ab76bc97SJung-uk Kim "[[", 2827ab76bc97SJung-uk Kim "%if-c-only", 28287e382390SJung-uk Kim " static void yy_push_state YYFARGS1( int ,_new_state)", 2829ab76bc97SJung-uk Kim "%endif", 2830ab76bc97SJung-uk Kim "%if-c++-only", 28317e382390SJung-uk Kim " void yyFlexLexer::yy_push_state( int _new_state )", 2832ab76bc97SJung-uk Kim "%endif", 2833ab76bc97SJung-uk Kim "{", 2834ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2835ab76bc97SJung-uk Kim " if ( YY_G(yy_start_stack_ptr) >= YY_G(yy_start_stack_depth) )", 2836ab76bc97SJung-uk Kim " {", 2837ab76bc97SJung-uk Kim " yy_size_t new_size;", 2838ab76bc97SJung-uk Kim "", 2839ab76bc97SJung-uk Kim " YY_G(yy_start_stack_depth) += YY_START_STACK_INCR;", 28407e382390SJung-uk Kim " new_size = (yy_size_t) YY_G(yy_start_stack_depth) * sizeof( int );", 2841ab76bc97SJung-uk Kim "", 2842ab76bc97SJung-uk Kim " if ( ! YY_G(yy_start_stack) )", 2843ab76bc97SJung-uk Kim " YY_G(yy_start_stack) = (int *) yyalloc( new_size M4_YY_CALL_LAST_ARG );", 2844ab76bc97SJung-uk Kim "", 2845ab76bc97SJung-uk Kim " else", 2846ab76bc97SJung-uk Kim " YY_G(yy_start_stack) = (int *) yyrealloc(", 2847ab76bc97SJung-uk Kim " (void *) YY_G(yy_start_stack), new_size M4_YY_CALL_LAST_ARG );", 2848ab76bc97SJung-uk Kim "", 2849ab76bc97SJung-uk Kim " if ( ! YY_G(yy_start_stack) )", 2850ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"out of memory expanding start-condition stack\" );", 2851ab76bc97SJung-uk Kim " }", 2852ab76bc97SJung-uk Kim "", 2853ab76bc97SJung-uk Kim " YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr)++] = YY_START;", 2854ab76bc97SJung-uk Kim "", 28557e382390SJung-uk Kim " BEGIN(_new_state);", 2856ab76bc97SJung-uk Kim "}", 2857ab76bc97SJung-uk Kim "]])", 2858ab76bc97SJung-uk Kim "", 2859ab76bc97SJung-uk Kim "", 2860ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_POP_STATE]],,", 2861ab76bc97SJung-uk Kim "[[", 2862ab76bc97SJung-uk Kim "%if-c-only", 28637e382390SJung-uk Kim " static void yy_pop_state (M4_YY_DEF_ONLY_ARG)", 2864ab76bc97SJung-uk Kim "%endif", 2865ab76bc97SJung-uk Kim "%if-c++-only", 2866ab76bc97SJung-uk Kim " void yyFlexLexer::yy_pop_state()", 2867ab76bc97SJung-uk Kim "%endif", 2868ab76bc97SJung-uk Kim "{", 2869ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2870ab76bc97SJung-uk Kim " if ( --YY_G(yy_start_stack_ptr) < 0 )", 2871ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"start-condition stack underflow\" );", 2872ab76bc97SJung-uk Kim "", 2873ab76bc97SJung-uk Kim " BEGIN(YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr)]);", 2874ab76bc97SJung-uk Kim "}", 2875ab76bc97SJung-uk Kim "]])", 2876ab76bc97SJung-uk Kim "", 2877ab76bc97SJung-uk Kim "", 2878ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_TOP_STATE]],,", 2879ab76bc97SJung-uk Kim "[[", 2880ab76bc97SJung-uk Kim "%if-c-only", 28817e382390SJung-uk Kim " static int yy_top_state (M4_YY_DEF_ONLY_ARG)", 2882ab76bc97SJung-uk Kim "%endif", 2883ab76bc97SJung-uk Kim "%if-c++-only", 2884ab76bc97SJung-uk Kim " int yyFlexLexer::yy_top_state()", 2885ab76bc97SJung-uk Kim "%endif", 2886ab76bc97SJung-uk Kim "{", 2887ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2888ab76bc97SJung-uk Kim " return YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr) - 1];", 2889ab76bc97SJung-uk Kim "}", 2890ab76bc97SJung-uk Kim "]])", 2891ab76bc97SJung-uk Kim "", 2892ab76bc97SJung-uk Kim "#ifndef YY_EXIT_FAILURE", 2893ab76bc97SJung-uk Kim "#define YY_EXIT_FAILURE 2", 2894ab76bc97SJung-uk Kim "#endif", 2895ab76bc97SJung-uk Kim "", 2896ab76bc97SJung-uk Kim "%if-c-only", 28977e382390SJung-uk Kim "static void yynoreturn yy_fatal_error YYFARGS1(const char*, msg)", 2898ab76bc97SJung-uk Kim "{", 28997e382390SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 29007e382390SJung-uk Kim " M4_YY_NOOP_GUTS_VAR();", 29017e382390SJung-uk Kim " fprintf( stderr, \"%s\\n\", msg );", 2902ab76bc97SJung-uk Kim " exit( YY_EXIT_FAILURE );", 2903ab76bc97SJung-uk Kim "}", 2904ab76bc97SJung-uk Kim "%endif", 2905ab76bc97SJung-uk Kim "%if-c++-only", 29067e382390SJung-uk Kim "void yyFlexLexer::LexerError( const char* msg )", 2907ab76bc97SJung-uk Kim "{", 2908ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2909ab76bc97SJung-uk Kim " std::cerr << msg << std::endl;", 2910ab76bc97SJung-uk Kim " exit( YY_EXIT_FAILURE );", 2911ab76bc97SJung-uk Kim "}", 2912ab76bc97SJung-uk Kim "%endif", 2913ab76bc97SJung-uk Kim "", 2914ab76bc97SJung-uk Kim "/* Redefine yyless() so it works in section 3 code. */", 2915ab76bc97SJung-uk Kim "", 2916ab76bc97SJung-uk Kim "#undef yyless", 2917ab76bc97SJung-uk Kim "#define yyless(n) \\", 2918ab76bc97SJung-uk Kim " do \\", 2919ab76bc97SJung-uk Kim " { \\", 2920ab76bc97SJung-uk Kim " /* Undo effects of setting up yytext. */ \\", 2921ab76bc97SJung-uk Kim " int yyless_macro_arg = (n); \\", 2922ab76bc97SJung-uk Kim " YY_LESS_LINENO(yyless_macro_arg);\\", 2923ab76bc97SJung-uk Kim " yytext[yyleng] = YY_G(yy_hold_char); \\", 2924ab76bc97SJung-uk Kim " YY_G(yy_c_buf_p) = yytext + yyless_macro_arg; \\", 2925ab76bc97SJung-uk Kim " YY_G(yy_hold_char) = *YY_G(yy_c_buf_p); \\", 2926ab76bc97SJung-uk Kim " *YY_G(yy_c_buf_p) = '\\0'; \\", 2927ab76bc97SJung-uk Kim " yyleng = yyless_macro_arg; \\", 2928ab76bc97SJung-uk Kim " } \\", 2929ab76bc97SJung-uk Kim " while ( 0 )", 2930ab76bc97SJung-uk Kim "", 2931ab76bc97SJung-uk Kim "", 2932ab76bc97SJung-uk Kim "", 2933ab76bc97SJung-uk Kim "/* Accessor methods (get/set functions) to struct members. */", 2934ab76bc97SJung-uk Kim "", 2935ab76bc97SJung-uk Kim "%if-c-only", 2936ab76bc97SJung-uk Kim "%if-reentrant", 2937ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_EXTRA]],,", 2938ab76bc97SJung-uk Kim "[[", 2939ab76bc97SJung-uk Kim "/** Get the user-defined data for this scanner.", 2940ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2941ab76bc97SJung-uk Kim " */", 29427e382390SJung-uk Kim "YY_EXTRA_TYPE yyget_extra (M4_YY_DEF_ONLY_ARG)", 2943ab76bc97SJung-uk Kim "{", 2944ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2945ab76bc97SJung-uk Kim " return yyextra;", 2946ab76bc97SJung-uk Kim "}", 2947ab76bc97SJung-uk Kim "]])", 2948ab76bc97SJung-uk Kim "%endif", 2949ab76bc97SJung-uk Kim "", 2950ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_LINENO]],,", 2951ab76bc97SJung-uk Kim "[[", 2952ab76bc97SJung-uk Kim "/** Get the current line number.", 2953ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2954ab76bc97SJung-uk Kim " */", 29557e382390SJung-uk Kim "int yyget_lineno (M4_YY_DEF_ONLY_ARG)", 2956ab76bc97SJung-uk Kim "{", 2957ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2958ab76bc97SJung-uk Kim "", 2959ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_REENTRANT]],", 2960ab76bc97SJung-uk Kim " [[", 2961ab76bc97SJung-uk Kim " if (! YY_CURRENT_BUFFER)", 2962ab76bc97SJung-uk Kim " return 0;", 2963ab76bc97SJung-uk Kim " ]])", 2964ab76bc97SJung-uk Kim " return yylineno;", 2965ab76bc97SJung-uk Kim "}", 2966ab76bc97SJung-uk Kim "]])", 2967ab76bc97SJung-uk Kim "", 2968ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_REENTRANT]],", 2969ab76bc97SJung-uk Kim "[[", 2970ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_COLUMN]],,", 2971ab76bc97SJung-uk Kim "[[", 2972ab76bc97SJung-uk Kim "/** Get the current column number.", 2973ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2974ab76bc97SJung-uk Kim " */", 29757e382390SJung-uk Kim "int yyget_column (M4_YY_DEF_ONLY_ARG)", 2976ab76bc97SJung-uk Kim "{", 2977ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2978ab76bc97SJung-uk Kim "", 2979ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_REENTRANT]],", 2980ab76bc97SJung-uk Kim " [[", 2981ab76bc97SJung-uk Kim " if (! YY_CURRENT_BUFFER)", 2982ab76bc97SJung-uk Kim " return 0;", 2983ab76bc97SJung-uk Kim " ]])", 2984ab76bc97SJung-uk Kim " return yycolumn;", 2985ab76bc97SJung-uk Kim "}", 2986ab76bc97SJung-uk Kim "]])", 2987ab76bc97SJung-uk Kim "]])", 2988ab76bc97SJung-uk Kim "", 2989ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_IN]],,", 2990ab76bc97SJung-uk Kim "[[", 2991ab76bc97SJung-uk Kim "/** Get the input stream.", 2992ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 2993ab76bc97SJung-uk Kim " */", 29947e382390SJung-uk Kim "FILE *yyget_in (M4_YY_DEF_ONLY_ARG)", 2995ab76bc97SJung-uk Kim "{", 2996ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 2997ab76bc97SJung-uk Kim " return yyin;", 2998ab76bc97SJung-uk Kim "}", 2999ab76bc97SJung-uk Kim "]])", 3000ab76bc97SJung-uk Kim "", 3001ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_OUT]],,", 3002ab76bc97SJung-uk Kim "[[", 3003ab76bc97SJung-uk Kim "/** Get the output stream.", 3004ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 3005ab76bc97SJung-uk Kim " */", 30067e382390SJung-uk Kim "FILE *yyget_out (M4_YY_DEF_ONLY_ARG)", 3007ab76bc97SJung-uk Kim "{", 3008ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 3009ab76bc97SJung-uk Kim " return yyout;", 3010ab76bc97SJung-uk Kim "}", 3011ab76bc97SJung-uk Kim "]])", 3012ab76bc97SJung-uk Kim "", 3013ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_LENG]],,", 3014ab76bc97SJung-uk Kim "[[", 3015ab76bc97SJung-uk Kim "/** Get the length of the current token.", 3016ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 3017ab76bc97SJung-uk Kim " */", 30187e382390SJung-uk Kim "int yyget_leng (M4_YY_DEF_ONLY_ARG)", 3019ab76bc97SJung-uk Kim "{", 3020ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 3021ab76bc97SJung-uk Kim " return yyleng;", 3022ab76bc97SJung-uk Kim "}", 3023ab76bc97SJung-uk Kim "]])", 3024ab76bc97SJung-uk Kim "", 3025ab76bc97SJung-uk Kim "/** Get the current token.", 3026ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 3027ab76bc97SJung-uk Kim " */", 3028ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_TEXT]],,", 3029ab76bc97SJung-uk Kim "[[", 30307e382390SJung-uk Kim "char *yyget_text (M4_YY_DEF_ONLY_ARG)", 3031ab76bc97SJung-uk Kim "{", 3032ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 3033ab76bc97SJung-uk Kim " return yytext;", 3034ab76bc97SJung-uk Kim "}", 3035ab76bc97SJung-uk Kim "]])", 3036ab76bc97SJung-uk Kim "", 3037ab76bc97SJung-uk Kim "%if-reentrant", 3038ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SET_EXTRA]],,", 3039ab76bc97SJung-uk Kim "[[", 3040ab76bc97SJung-uk Kim "/** Set the user-defined data. This data is never touched by the scanner.", 3041ab76bc97SJung-uk Kim " * @param user_defined The data to be associated with this scanner.", 3042ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 3043ab76bc97SJung-uk Kim " */", 3044ab76bc97SJung-uk Kim "void yyset_extra YYFARGS1( YY_EXTRA_TYPE ,user_defined)", 3045ab76bc97SJung-uk Kim "{", 3046ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 3047ab76bc97SJung-uk Kim " yyextra = user_defined ;", 3048ab76bc97SJung-uk Kim "}", 3049ab76bc97SJung-uk Kim "]])", 3050ab76bc97SJung-uk Kim "%endif", 3051ab76bc97SJung-uk Kim "", 3052ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SET_LINENO]],,", 3053ab76bc97SJung-uk Kim "[[", 3054ab76bc97SJung-uk Kim "/** Set the current line number.", 30557e382390SJung-uk Kim " * @param _line_number line number", 3056ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 3057ab76bc97SJung-uk Kim " */", 30587e382390SJung-uk Kim "void yyset_lineno YYFARGS1( int ,_line_number)", 3059ab76bc97SJung-uk Kim "{", 3060ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 3061ab76bc97SJung-uk Kim "", 3062ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_REENTRANT]],", 3063ab76bc97SJung-uk Kim " [[", 3064ab76bc97SJung-uk Kim " /* lineno is only valid if an input buffer exists. */", 3065ab76bc97SJung-uk Kim " if (! YY_CURRENT_BUFFER )", 3066ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"yyset_lineno called with no buffer\" );", 3067ab76bc97SJung-uk Kim " ]])", 30687e382390SJung-uk Kim " yylineno = _line_number;", 3069ab76bc97SJung-uk Kim "}", 3070ab76bc97SJung-uk Kim "]])", 3071ab76bc97SJung-uk Kim "", 3072ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_REENTRANT]],", 3073ab76bc97SJung-uk Kim "[[", 3074ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SET_COLUMN]],,", 3075ab76bc97SJung-uk Kim "[[", 3076ab76bc97SJung-uk Kim "/** Set the current column.", 30777e382390SJung-uk Kim " * @param _column_no column number", 3078ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 3079ab76bc97SJung-uk Kim " */", 30807e382390SJung-uk Kim "void yyset_column YYFARGS1( int , _column_no)", 3081ab76bc97SJung-uk Kim "{", 3082ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 3083ab76bc97SJung-uk Kim "", 3084ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_REENTRANT]],", 3085ab76bc97SJung-uk Kim " [[", 3086ab76bc97SJung-uk Kim " /* column is only valid if an input buffer exists. */", 3087ab76bc97SJung-uk Kim " if (! YY_CURRENT_BUFFER )", 3088ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"yyset_column called with no buffer\" );", 3089ab76bc97SJung-uk Kim " ]])", 30907e382390SJung-uk Kim " yycolumn = _column_no;", 3091ab76bc97SJung-uk Kim "}", 3092ab76bc97SJung-uk Kim "]])", 3093ab76bc97SJung-uk Kim "]])", 3094ab76bc97SJung-uk Kim "", 3095ab76bc97SJung-uk Kim "", 3096ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SET_IN]],,", 3097ab76bc97SJung-uk Kim "[[", 3098ab76bc97SJung-uk Kim "/** Set the input stream. This does not discard the current", 3099ab76bc97SJung-uk Kim " * input buffer.", 31007e382390SJung-uk Kim " * @param _in_str A readable stream.", 3101ab76bc97SJung-uk Kim " * M4_YY_DOC_PARAM", 3102ab76bc97SJung-uk Kim " * @see yy_switch_to_buffer", 3103ab76bc97SJung-uk Kim " */", 31047e382390SJung-uk Kim "void yyset_in YYFARGS1( FILE * ,_in_str)", 3105ab76bc97SJung-uk Kim "{", 3106ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 31077e382390SJung-uk Kim " yyin = _in_str ;", 3108ab76bc97SJung-uk Kim "}", 3109ab76bc97SJung-uk Kim "]])", 3110ab76bc97SJung-uk Kim "", 3111ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SET_OUT]],,", 3112ab76bc97SJung-uk Kim "[[", 31137e382390SJung-uk Kim "void yyset_out YYFARGS1( FILE * ,_out_str)", 3114ab76bc97SJung-uk Kim "{", 3115ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 31167e382390SJung-uk Kim " yyout = _out_str ;", 3117ab76bc97SJung-uk Kim "}", 3118ab76bc97SJung-uk Kim "]])", 3119ab76bc97SJung-uk Kim "", 3120ab76bc97SJung-uk Kim "", 3121ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_DEBUG]],,", 3122ab76bc97SJung-uk Kim "[[", 31237e382390SJung-uk Kim "int yyget_debug (M4_YY_DEF_ONLY_ARG)", 3124ab76bc97SJung-uk Kim "{", 3125ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 3126ab76bc97SJung-uk Kim " return yy_flex_debug;", 3127ab76bc97SJung-uk Kim "}", 3128ab76bc97SJung-uk Kim "]])", 3129ab76bc97SJung-uk Kim "", 3130ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SET_DEBUG]],,", 3131ab76bc97SJung-uk Kim "[[", 31327e382390SJung-uk Kim "void yyset_debug YYFARGS1( int ,_bdebug)", 3133ab76bc97SJung-uk Kim "{", 3134ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 31357e382390SJung-uk Kim " yy_flex_debug = _bdebug ;", 3136ab76bc97SJung-uk Kim "}", 3137ab76bc97SJung-uk Kim "]])", 3138ab76bc97SJung-uk Kim "%endif", 3139ab76bc97SJung-uk Kim "", 3140ab76bc97SJung-uk Kim "%if-reentrant", 3141ab76bc97SJung-uk Kim "/* Accessor methods for yylval and yylloc */", 3142ab76bc97SJung-uk Kim "", 3143ab76bc97SJung-uk Kim "%if-bison-bridge", 3144ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_GET_LVAL]],,", 3145ab76bc97SJung-uk Kim "[[", 31467e382390SJung-uk Kim "YYSTYPE * yyget_lval (M4_YY_DEF_ONLY_ARG)", 3147ab76bc97SJung-uk Kim "{", 3148ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 3149ab76bc97SJung-uk Kim " return yylval;", 3150ab76bc97SJung-uk Kim "}", 3151ab76bc97SJung-uk Kim "]])", 3152ab76bc97SJung-uk Kim "", 3153ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_SET_LVAL]],,", 3154ab76bc97SJung-uk Kim "[[", 3155ab76bc97SJung-uk Kim "void yyset_lval YYFARGS1( YYSTYPE * ,yylval_param)", 3156ab76bc97SJung-uk Kim "{", 3157ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 3158ab76bc97SJung-uk Kim " yylval = yylval_param;", 3159ab76bc97SJung-uk Kim "}", 3160ab76bc97SJung-uk Kim "]])", 3161ab76bc97SJung-uk Kim "", 3162ab76bc97SJung-uk Kim "m4_ifdef( [[<M4_YY_BISON_LLOC>]],", 3163ab76bc97SJung-uk Kim "[[", 3164ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_NO_GET_LLOC]],,", 3165ab76bc97SJung-uk Kim " [[", 31667e382390SJung-uk Kim "YYLTYPE *yyget_lloc (M4_YY_DEF_ONLY_ARG)", 3167ab76bc97SJung-uk Kim "{", 3168ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 3169ab76bc97SJung-uk Kim " return yylloc;", 3170ab76bc97SJung-uk Kim "}", 3171ab76bc97SJung-uk Kim " ]])", 3172ab76bc97SJung-uk Kim "", 3173ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_NO_SET_LLOC]],,", 3174ab76bc97SJung-uk Kim " [[", 3175ab76bc97SJung-uk Kim "void yyset_lloc YYFARGS1( YYLTYPE * ,yylloc_param)", 3176ab76bc97SJung-uk Kim "{", 3177ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 3178ab76bc97SJung-uk Kim " yylloc = yylloc_param;", 3179ab76bc97SJung-uk Kim "}", 3180ab76bc97SJung-uk Kim " ]])", 3181ab76bc97SJung-uk Kim "]])", 3182ab76bc97SJung-uk Kim "", 3183ab76bc97SJung-uk Kim "%endif", 3184ab76bc97SJung-uk Kim "", 3185ab76bc97SJung-uk Kim "", 3186ab76bc97SJung-uk Kim "/* User-visible API */", 3187ab76bc97SJung-uk Kim "", 3188ab76bc97SJung-uk Kim "/* yylex_init is special because it creates the scanner itself, so it is", 3189ab76bc97SJung-uk Kim " * the ONLY reentrant function that doesn't take the scanner as the last argument.", 3190ab76bc97SJung-uk Kim " * That's why we explicitly handle the declaration, instead of using our macros.", 3191ab76bc97SJung-uk Kim " */", 3192ab76bc97SJung-uk Kim "int yylex_init(yyscan_t* ptr_yy_globals)", 3193ab76bc97SJung-uk Kim "{", 3194ab76bc97SJung-uk Kim " if (ptr_yy_globals == NULL){", 3195ab76bc97SJung-uk Kim " errno = EINVAL;", 3196ab76bc97SJung-uk Kim " return 1;", 3197ab76bc97SJung-uk Kim " }", 3198ab76bc97SJung-uk Kim "", 3199ab76bc97SJung-uk Kim " *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );", 3200ab76bc97SJung-uk Kim "", 3201ab76bc97SJung-uk Kim " if (*ptr_yy_globals == NULL){", 3202ab76bc97SJung-uk Kim " errno = ENOMEM;", 3203ab76bc97SJung-uk Kim " return 1;", 3204ab76bc97SJung-uk Kim " }", 3205ab76bc97SJung-uk Kim "", 3206ab76bc97SJung-uk Kim " /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */", 3207ab76bc97SJung-uk Kim " memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));", 3208ab76bc97SJung-uk Kim "", 3209ab76bc97SJung-uk Kim " return yy_init_globals ( *ptr_yy_globals );", 3210ab76bc97SJung-uk Kim "}", 3211ab76bc97SJung-uk Kim "", 3212ab76bc97SJung-uk Kim "", 3213ab76bc97SJung-uk Kim "/* yylex_init_extra has the same functionality as yylex_init, but follows the", 3214ab76bc97SJung-uk Kim " * convention of taking the scanner as the last argument. Note however, that", 3215ab76bc97SJung-uk Kim " * this is a *pointer* to a scanner, as it will be allocated by this call (and", 3216ab76bc97SJung-uk Kim " * is the reason, too, why this function also must handle its own declaration).", 3217ab76bc97SJung-uk Kim " * The user defined value in the first argument will be available to yyalloc in", 3218ab76bc97SJung-uk Kim " * the yyextra field.", 3219ab76bc97SJung-uk Kim " */", 3220ab76bc97SJung-uk Kim "int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )", 3221ab76bc97SJung-uk Kim "{", 3222ab76bc97SJung-uk Kim " struct yyguts_t dummy_yyguts;", 3223ab76bc97SJung-uk Kim "", 3224ab76bc97SJung-uk Kim " yyset_extra (yy_user_defined, &dummy_yyguts);", 3225ab76bc97SJung-uk Kim "", 3226ab76bc97SJung-uk Kim " if (ptr_yy_globals == NULL){", 3227ab76bc97SJung-uk Kim " errno = EINVAL;", 3228ab76bc97SJung-uk Kim " return 1;", 3229ab76bc97SJung-uk Kim " }", 3230ab76bc97SJung-uk Kim "", 3231ab76bc97SJung-uk Kim " *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );", 3232ab76bc97SJung-uk Kim "", 3233ab76bc97SJung-uk Kim " if (*ptr_yy_globals == NULL){", 3234ab76bc97SJung-uk Kim " errno = ENOMEM;", 3235ab76bc97SJung-uk Kim " return 1;", 3236ab76bc97SJung-uk Kim " }", 3237ab76bc97SJung-uk Kim "", 3238ab76bc97SJung-uk Kim " /* By setting to 0xAA, we expose bugs in", 3239ab76bc97SJung-uk Kim " yy_init_globals. Leave at 0x00 for releases. */", 3240ab76bc97SJung-uk Kim " memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));", 3241ab76bc97SJung-uk Kim "", 3242ab76bc97SJung-uk Kim " yyset_extra (yy_user_defined, *ptr_yy_globals);", 3243ab76bc97SJung-uk Kim "", 3244ab76bc97SJung-uk Kim " return yy_init_globals ( *ptr_yy_globals );", 3245ab76bc97SJung-uk Kim "}", 3246ab76bc97SJung-uk Kim "", 3247ab76bc97SJung-uk Kim "%endif if-c-only", 3248ab76bc97SJung-uk Kim "", 3249ab76bc97SJung-uk Kim "%if-c-only", 32507e382390SJung-uk Kim "static int yy_init_globals (M4_YY_DEF_ONLY_ARG)", 3251ab76bc97SJung-uk Kim "{", 3252ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 3253ab76bc97SJung-uk Kim " /* Initialization is the same as for the non-reentrant scanner.", 3254ab76bc97SJung-uk Kim " * This function is called from yylex_destroy(), so don't allocate here.", 3255ab76bc97SJung-uk Kim " */", 3256ab76bc97SJung-uk Kim "", 3257ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_USE_LINENO]],", 3258ab76bc97SJung-uk Kim "[[", 3259ab76bc97SJung-uk Kim " m4_ifdef( [[M4_YY_NOT_REENTRANT]],", 3260ab76bc97SJung-uk Kim " [[", 3261ab76bc97SJung-uk Kim " /* We do not touch yylineno unless the option is enabled. */", 3262ab76bc97SJung-uk Kim " yylineno = 1;", 3263ab76bc97SJung-uk Kim " ]])", 3264ab76bc97SJung-uk Kim "]])", 32657e382390SJung-uk Kim " YY_G(yy_buffer_stack) = NULL;", 3266ab76bc97SJung-uk Kim " YY_G(yy_buffer_stack_top) = 0;", 3267ab76bc97SJung-uk Kim " YY_G(yy_buffer_stack_max) = 0;", 32687e382390SJung-uk Kim " YY_G(yy_c_buf_p) = NULL;", 3269ab76bc97SJung-uk Kim " YY_G(yy_init) = 0;", 3270ab76bc97SJung-uk Kim " YY_G(yy_start) = 0;", 3271ab76bc97SJung-uk Kim "", 3272ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_HAS_START_STACK_VARS]],", 3273ab76bc97SJung-uk Kim "[[", 3274ab76bc97SJung-uk Kim " YY_G(yy_start_stack_ptr) = 0;", 3275ab76bc97SJung-uk Kim " YY_G(yy_start_stack_depth) = 0;", 3276ab76bc97SJung-uk Kim " YY_G(yy_start_stack) = NULL;", 3277ab76bc97SJung-uk Kim "]])", 3278ab76bc97SJung-uk Kim "", 3279ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_USES_REJECT]],", 3280ab76bc97SJung-uk Kim "[[", 3281ab76bc97SJung-uk Kim " YY_G(yy_state_buf) = 0;", 3282ab76bc97SJung-uk Kim " YY_G(yy_state_ptr) = 0;", 3283ab76bc97SJung-uk Kim " YY_G(yy_full_match) = 0;", 3284ab76bc97SJung-uk Kim " YY_G(yy_lp) = 0;", 3285ab76bc97SJung-uk Kim "]])", 3286ab76bc97SJung-uk Kim "", 3287ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_TEXT_IS_ARRAY]],", 3288ab76bc97SJung-uk Kim "[[", 3289ab76bc97SJung-uk Kim " YY_G(yytext_ptr) = 0;", 3290ab76bc97SJung-uk Kim " YY_G(yy_more_offset) = 0;", 3291ab76bc97SJung-uk Kim " YY_G(yy_prev_more_offset) = 0;", 3292ab76bc97SJung-uk Kim "]])", 3293ab76bc97SJung-uk Kim "", 3294ab76bc97SJung-uk Kim "/* Defined in main.c */", 3295ab76bc97SJung-uk Kim "#ifdef YY_STDINIT", 3296ab76bc97SJung-uk Kim " yyin = stdin;", 3297ab76bc97SJung-uk Kim " yyout = stdout;", 3298ab76bc97SJung-uk Kim "#else", 32997e382390SJung-uk Kim " yyin = NULL;", 33007e382390SJung-uk Kim " yyout = NULL;", 3301ab76bc97SJung-uk Kim "#endif", 3302ab76bc97SJung-uk Kim "", 3303ab76bc97SJung-uk Kim " /* For future reference: Set errno on error, since we are called by", 3304ab76bc97SJung-uk Kim " * yylex_init()", 3305ab76bc97SJung-uk Kim " */", 3306ab76bc97SJung-uk Kim " return 0;", 3307ab76bc97SJung-uk Kim "}", 3308ab76bc97SJung-uk Kim "%endif", 3309ab76bc97SJung-uk Kim "", 3310ab76bc97SJung-uk Kim "", 3311ab76bc97SJung-uk Kim "%if-c-only SNIP! this currently causes conflicts with the c++ scanner", 3312ab76bc97SJung-uk Kim "/* yylex_destroy is for both reentrant and non-reentrant scanners. */", 33137e382390SJung-uk Kim "int yylex_destroy (M4_YY_DEF_ONLY_ARG)", 3314ab76bc97SJung-uk Kim "{", 3315ab76bc97SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 3316ab76bc97SJung-uk Kim "", 3317ab76bc97SJung-uk Kim " /* Pop the buffer stack, destroying each element. */", 3318ab76bc97SJung-uk Kim " while(YY_CURRENT_BUFFER){", 3319ab76bc97SJung-uk Kim " yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG );", 3320ab76bc97SJung-uk Kim " YY_CURRENT_BUFFER_LVALUE = NULL;", 3321ab76bc97SJung-uk Kim " yypop_buffer_state(M4_YY_CALL_ONLY_ARG);", 3322ab76bc97SJung-uk Kim " }", 3323ab76bc97SJung-uk Kim "", 3324ab76bc97SJung-uk Kim " /* Destroy the stack itself. */", 3325ab76bc97SJung-uk Kim " yyfree(YY_G(yy_buffer_stack) M4_YY_CALL_LAST_ARG);", 3326ab76bc97SJung-uk Kim " YY_G(yy_buffer_stack) = NULL;", 3327ab76bc97SJung-uk Kim "", 3328ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_HAS_START_STACK_VARS]],", 3329ab76bc97SJung-uk Kim "[[", 3330ab76bc97SJung-uk Kim " /* Destroy the start condition stack. */", 3331ab76bc97SJung-uk Kim " yyfree( YY_G(yy_start_stack) M4_YY_CALL_LAST_ARG );", 3332ab76bc97SJung-uk Kim " YY_G(yy_start_stack) = NULL;", 3333ab76bc97SJung-uk Kim "]])", 3334ab76bc97SJung-uk Kim "", 3335ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_USES_REJECT]],", 3336ab76bc97SJung-uk Kim "[[", 3337ab76bc97SJung-uk Kim " yyfree ( YY_G(yy_state_buf) M4_YY_CALL_LAST_ARG);", 3338ab76bc97SJung-uk Kim " YY_G(yy_state_buf) = NULL;", 3339ab76bc97SJung-uk Kim "]])", 3340ab76bc97SJung-uk Kim "", 3341ab76bc97SJung-uk Kim " /* Reset the globals. This is important in a non-reentrant scanner so the next time", 3342ab76bc97SJung-uk Kim " * yylex() is called, initialization will occur. */", 3343ab76bc97SJung-uk Kim " yy_init_globals( M4_YY_CALL_ONLY_ARG);", 3344ab76bc97SJung-uk Kim "", 3345ab76bc97SJung-uk Kim "%if-reentrant", 3346ab76bc97SJung-uk Kim " /* Destroy the main struct (reentrant only). */", 3347ab76bc97SJung-uk Kim " yyfree ( yyscanner M4_YY_CALL_LAST_ARG );", 3348ab76bc97SJung-uk Kim " yyscanner = NULL;", 3349ab76bc97SJung-uk Kim "%endif", 3350ab76bc97SJung-uk Kim " return 0;", 3351ab76bc97SJung-uk Kim "}", 3352ab76bc97SJung-uk Kim "%endif", 3353ab76bc97SJung-uk Kim "", 3354ab76bc97SJung-uk Kim "", 3355ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 3356ab76bc97SJung-uk Kim "[[", 3357ab76bc97SJung-uk Kim "/*", 3358ab76bc97SJung-uk Kim " * Internal utility routines.", 3359ab76bc97SJung-uk Kim " */", 3360ab76bc97SJung-uk Kim "]])", 3361ab76bc97SJung-uk Kim "", 3362ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 3363ab76bc97SJung-uk Kim "[[", 3364ab76bc97SJung-uk Kim "#ifndef yytext_ptr", 33657e382390SJung-uk Kim "static void yy_flex_strncpy YYFARGS3( char*,s1, const char *,s2, int,n)", 3366ab76bc97SJung-uk Kim "{", 33677e382390SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 33687e382390SJung-uk Kim " M4_YY_NOOP_GUTS_VAR();", 33697e382390SJung-uk Kim "", 3370ab76bc97SJung-uk Kim " int i;", 3371ab76bc97SJung-uk Kim " for ( i = 0; i < n; ++i )", 3372ab76bc97SJung-uk Kim " s1[i] = s2[i];", 3373ab76bc97SJung-uk Kim "}", 3374ab76bc97SJung-uk Kim "#endif", 3375ab76bc97SJung-uk Kim "]])", 3376ab76bc97SJung-uk Kim "", 3377ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],", 3378ab76bc97SJung-uk Kim "[[", 3379ab76bc97SJung-uk Kim "#ifdef YY_NEED_STRLEN", 33807e382390SJung-uk Kim "static int yy_flex_strlen YYFARGS1( const char *,s)", 3381ab76bc97SJung-uk Kim "{", 3382ab76bc97SJung-uk Kim " int n;", 3383ab76bc97SJung-uk Kim " for ( n = 0; s[n]; ++n )", 3384ab76bc97SJung-uk Kim " ;", 3385ab76bc97SJung-uk Kim "", 3386ab76bc97SJung-uk Kim " return n;", 3387ab76bc97SJung-uk Kim "}", 3388ab76bc97SJung-uk Kim "#endif", 3389ab76bc97SJung-uk Kim "]])", 3390ab76bc97SJung-uk Kim "", 3391ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_FLEX_ALLOC]],,", 3392ab76bc97SJung-uk Kim "[[", 3393ab76bc97SJung-uk Kim "void *yyalloc YYFARGS1( yy_size_t ,size)", 3394ab76bc97SJung-uk Kim "{", 33957e382390SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 33967e382390SJung-uk Kim " M4_YY_NOOP_GUTS_VAR();", 33977e382390SJung-uk Kim " return malloc(size);", 3398ab76bc97SJung-uk Kim "}", 3399ab76bc97SJung-uk Kim "]])", 3400ab76bc97SJung-uk Kim "", 3401ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_FLEX_REALLOC]],,", 3402ab76bc97SJung-uk Kim "[[", 3403ab76bc97SJung-uk Kim "void *yyrealloc YYFARGS2( void *,ptr, yy_size_t ,size)", 3404ab76bc97SJung-uk Kim "{", 34057e382390SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 34067e382390SJung-uk Kim " M4_YY_NOOP_GUTS_VAR();", 34077e382390SJung-uk Kim "", 3408ab76bc97SJung-uk Kim " /* The cast to (char *) in the following accommodates both", 3409ab76bc97SJung-uk Kim " * implementations that use char* generic pointers, and those", 3410ab76bc97SJung-uk Kim " * that use void* generic pointers. It works with the latter", 3411ab76bc97SJung-uk Kim " * because both ANSI C and C++ allow castless assignment from", 3412ab76bc97SJung-uk Kim " * any pointer type to void*, and deal with argument conversions", 3413ab76bc97SJung-uk Kim " * as though doing an assignment.", 3414ab76bc97SJung-uk Kim " */", 34157e382390SJung-uk Kim " return realloc(ptr, size);", 3416ab76bc97SJung-uk Kim "}", 3417ab76bc97SJung-uk Kim "]])", 3418ab76bc97SJung-uk Kim "", 3419ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_NO_FLEX_FREE]],,", 3420ab76bc97SJung-uk Kim "[[", 3421ab76bc97SJung-uk Kim "void yyfree YYFARGS1( void *,ptr)", 3422ab76bc97SJung-uk Kim "{", 34237e382390SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 34247e382390SJung-uk Kim " M4_YY_NOOP_GUTS_VAR();", 3425ab76bc97SJung-uk Kim " free( (char *) ptr ); /* see yyrealloc() for (char *) cast */", 3426ab76bc97SJung-uk Kim "}", 3427ab76bc97SJung-uk Kim "]])", 3428ab76bc97SJung-uk Kim "", 3429ab76bc97SJung-uk Kim "%if-tables-serialization definitions", 3430ab76bc97SJung-uk Kim "#ifdef FLEX_SCANNER", 3431ab76bc97SJung-uk Kim "/*", 3432ab76bc97SJung-uk Kim "dnl tables_shared.c - tables serialization code", 3433ab76bc97SJung-uk Kim "dnl ", 3434ab76bc97SJung-uk Kim "dnl Copyright (c) 1990 The Regents of the University of California.", 3435ab76bc97SJung-uk Kim "dnl All rights reserved.", 3436ab76bc97SJung-uk Kim "dnl ", 3437ab76bc97SJung-uk Kim "dnl This code is derived from software contributed to Berkeley by", 3438ab76bc97SJung-uk Kim "dnl Vern Paxson.", 3439ab76bc97SJung-uk Kim "dnl ", 3440ab76bc97SJung-uk Kim "dnl The United States Government has rights in this work pursuant", 3441ab76bc97SJung-uk Kim "dnl to contract no. DE-AC03-76SF00098 between the United States", 3442ab76bc97SJung-uk Kim "dnl Department of Energy and the University of California.", 3443ab76bc97SJung-uk Kim "dnl ", 3444ab76bc97SJung-uk Kim "dnl This file is part of flex.", 3445ab76bc97SJung-uk Kim "dnl ", 3446ab76bc97SJung-uk Kim "dnl Redistribution and use in source and binary forms, with or without", 3447ab76bc97SJung-uk Kim "dnl modification, are permitted provided that the following conditions", 3448ab76bc97SJung-uk Kim "dnl are met:", 3449ab76bc97SJung-uk Kim "dnl ", 3450ab76bc97SJung-uk Kim "dnl 1. Redistributions of source code must retain the above copyright", 3451ab76bc97SJung-uk Kim "dnl notice, this list of conditions and the following disclaimer.", 3452ab76bc97SJung-uk Kim "dnl 2. Redistributions in binary form must reproduce the above copyright", 3453ab76bc97SJung-uk Kim "dnl notice, this list of conditions and the following disclaimer in the", 3454ab76bc97SJung-uk Kim "dnl documentation and/or other materials provided with the distribution.", 3455ab76bc97SJung-uk Kim "dnl ", 3456ab76bc97SJung-uk Kim "dnl Neither the name of the University nor the names of its contributors", 3457ab76bc97SJung-uk Kim "dnl may be used to endorse or promote products derived from this software", 3458ab76bc97SJung-uk Kim "dnl without specific prior written permission.", 3459ab76bc97SJung-uk Kim "dnl ", 3460ab76bc97SJung-uk Kim "dnl THIS SOFTWARE IS PROVIDED `AS IS' AND WITHOUT ANY EXPRESS OR", 3461ab76bc97SJung-uk Kim "dnl IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED", 3462ab76bc97SJung-uk Kim "dnl WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR", 3463ab76bc97SJung-uk Kim "dnl PURPOSE.", 3464ab76bc97SJung-uk Kim "dnl ", 3465ab76bc97SJung-uk Kim "*/", 3466ab76bc97SJung-uk Kim "", 3467ab76bc97SJung-uk Kim "/* This file is meant to be included in both the skeleton and the actual", 3468ab76bc97SJung-uk Kim " * flex code (hence the name \"_shared\"). ", 3469ab76bc97SJung-uk Kim " */", 3470ab76bc97SJung-uk Kim "#ifndef yyskel_static", 3471ab76bc97SJung-uk Kim "#define yyskel_static static", 3472ab76bc97SJung-uk Kim "#endif", 3473ab76bc97SJung-uk Kim "#else", 3474ab76bc97SJung-uk Kim "#include \"flexdef.h\"", 3475ab76bc97SJung-uk Kim "#include \"tables.h\"", 3476ab76bc97SJung-uk Kim "#ifndef yyskel_static", 3477ab76bc97SJung-uk Kim "#define yyskel_static", 3478ab76bc97SJung-uk Kim "#endif", 3479ab76bc97SJung-uk Kim "#endif", 3480ab76bc97SJung-uk Kim "", 3481ab76bc97SJung-uk Kim "", 3482ab76bc97SJung-uk Kim "/** Get the number of integers in this table. This is NOT the", 3483ab76bc97SJung-uk Kim " * same thing as the number of elements.", 34847e382390SJung-uk Kim " * @param tbl the table", 3485ab76bc97SJung-uk Kim " * @return the number of integers in the table", 3486ab76bc97SJung-uk Kim " */", 3487ab76bc97SJung-uk Kim "yyskel_static flex_int32_t yytbl_calc_total_len (const struct yytbl_data *tbl)", 3488ab76bc97SJung-uk Kim "{", 34897e382390SJung-uk Kim " flex_uint32_t n;", 3490ab76bc97SJung-uk Kim "", 3491ab76bc97SJung-uk Kim " /* total number of ints */", 3492ab76bc97SJung-uk Kim " n = tbl->td_lolen;", 3493ab76bc97SJung-uk Kim " if (tbl->td_hilen > 0)", 3494ab76bc97SJung-uk Kim " n *= tbl->td_hilen;", 3495ab76bc97SJung-uk Kim "", 3496ab76bc97SJung-uk Kim " if (tbl->td_id == YYTD_ID_TRANSITION)", 3497ab76bc97SJung-uk Kim " n *= 2;", 34987e382390SJung-uk Kim " return (flex_int32_t) n;", 3499ab76bc97SJung-uk Kim "}", 3500ab76bc97SJung-uk Kim "", 3501ab76bc97SJung-uk Kim "", 3502ab76bc97SJung-uk Kim "static int yytbl_read8 (void *v, struct yytbl_reader * rd)", 3503ab76bc97SJung-uk Kim "{", 3504ab76bc97SJung-uk Kim " errno = 0;", 3505ab76bc97SJung-uk Kim " if (fread (v, sizeof (flex_uint8_t), 1, rd->fp) != 1){", 3506ab76bc97SJung-uk Kim " errno = EIO;", 3507ab76bc97SJung-uk Kim " return -1;", 3508ab76bc97SJung-uk Kim " }", 35097e382390SJung-uk Kim " rd->bread += (flex_uint32_t) sizeof(flex_uint8_t);", 3510ab76bc97SJung-uk Kim " return 0;", 3511ab76bc97SJung-uk Kim "}", 3512ab76bc97SJung-uk Kim "", 3513ab76bc97SJung-uk Kim "static int yytbl_read16 (void *v, struct yytbl_reader * rd)", 3514ab76bc97SJung-uk Kim "{", 3515ab76bc97SJung-uk Kim " errno = 0;", 3516ab76bc97SJung-uk Kim " if (fread (v, sizeof (flex_uint16_t), 1, rd->fp) != 1){", 3517ab76bc97SJung-uk Kim " errno = EIO;", 3518ab76bc97SJung-uk Kim " return -1;", 3519ab76bc97SJung-uk Kim " }", 3520ab76bc97SJung-uk Kim " *((flex_uint16_t *) v) = ntohs (*((flex_uint16_t *) v));", 35217e382390SJung-uk Kim " rd->bread += (flex_uint32_t) sizeof(flex_uint16_t);", 3522ab76bc97SJung-uk Kim " return 0;", 3523ab76bc97SJung-uk Kim "}", 3524ab76bc97SJung-uk Kim "", 3525ab76bc97SJung-uk Kim "static int yytbl_read32 (void *v, struct yytbl_reader * rd)", 3526ab76bc97SJung-uk Kim "{", 3527ab76bc97SJung-uk Kim " errno = 0;", 3528ab76bc97SJung-uk Kim " if (fread (v, sizeof (flex_uint32_t), 1, rd->fp) != 1){", 3529ab76bc97SJung-uk Kim " errno = EIO;", 3530ab76bc97SJung-uk Kim " return -1;", 3531ab76bc97SJung-uk Kim " }", 3532ab76bc97SJung-uk Kim " *((flex_uint32_t *) v) = ntohl (*((flex_uint32_t *) v));", 35337e382390SJung-uk Kim " rd->bread += (flex_uint32_t) sizeof(flex_uint32_t);", 3534ab76bc97SJung-uk Kim " return 0;", 3535ab76bc97SJung-uk Kim "}", 3536ab76bc97SJung-uk Kim "", 3537ab76bc97SJung-uk Kim "/** Read the header */", 3538ab76bc97SJung-uk Kim "static int yytbl_hdr_read YYFARGS2(struct yytbl_hdr *, th, struct yytbl_reader *, rd)", 3539ab76bc97SJung-uk Kim "{", 35407e382390SJung-uk Kim " size_t bytes;", 3541ab76bc97SJung-uk Kim " memset (th, 0, sizeof (struct yytbl_hdr));", 3542ab76bc97SJung-uk Kim "", 3543ab76bc97SJung-uk Kim " if (yytbl_read32 (&(th->th_magic), rd) != 0)", 3544ab76bc97SJung-uk Kim " return -1;", 3545ab76bc97SJung-uk Kim "", 3546ab76bc97SJung-uk Kim " if (th->th_magic != YYTBL_MAGIC){", 3547ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"bad magic number\" ); /* TODO: not fatal. */", 3548ab76bc97SJung-uk Kim " return -1;", 3549ab76bc97SJung-uk Kim " }", 3550ab76bc97SJung-uk Kim "", 3551ab76bc97SJung-uk Kim " if (yytbl_read32 (&(th->th_hsize), rd) != 0", 3552ab76bc97SJung-uk Kim " || yytbl_read32 (&(th->th_ssize), rd) != 0", 3553ab76bc97SJung-uk Kim " || yytbl_read16 (&(th->th_flags), rd) != 0)", 3554ab76bc97SJung-uk Kim " return -1;", 3555ab76bc97SJung-uk Kim "", 3556ab76bc97SJung-uk Kim " /* Sanity check on header size. Greater than 1k suggests some funny business. */", 3557ab76bc97SJung-uk Kim " if (th->th_hsize < 16 || th->th_hsize > 1024){", 3558ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"insane header size detected\" ); /* TODO: not fatal. */", 3559ab76bc97SJung-uk Kim " return -1;", 3560ab76bc97SJung-uk Kim " }", 3561ab76bc97SJung-uk Kim "", 3562ab76bc97SJung-uk Kim " /* Allocate enough space for the version and name fields */", 3563ab76bc97SJung-uk Kim " bytes = th->th_hsize - 14;", 3564ab76bc97SJung-uk Kim " th->th_version = (char *) yyalloc (bytes M4_YY_CALL_LAST_ARG);", 3565ab76bc97SJung-uk Kim " if ( ! th->th_version )", 3566ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"out of dynamic memory in yytbl_hdr_read()\" );", 3567ab76bc97SJung-uk Kim "", 3568ab76bc97SJung-uk Kim " /* we read it all into th_version, and point th_name into that data */", 3569ab76bc97SJung-uk Kim " if (fread (th->th_version, 1, bytes, rd->fp) != bytes){", 3570ab76bc97SJung-uk Kim " errno = EIO;", 3571ab76bc97SJung-uk Kim " yyfree(th->th_version M4_YY_CALL_LAST_ARG);", 3572ab76bc97SJung-uk Kim " th->th_version = NULL;", 3573ab76bc97SJung-uk Kim " return -1;", 3574ab76bc97SJung-uk Kim " }", 3575ab76bc97SJung-uk Kim " else", 35767e382390SJung-uk Kim " rd->bread += (flex_uint32_t) bytes;", 3577ab76bc97SJung-uk Kim "", 3578ab76bc97SJung-uk Kim " th->th_name = th->th_version + strlen (th->th_version) + 1;", 3579ab76bc97SJung-uk Kim " return 0;", 3580ab76bc97SJung-uk Kim "}", 3581ab76bc97SJung-uk Kim "", 3582ab76bc97SJung-uk Kim "/** lookup id in the dmap list.", 3583ab76bc97SJung-uk Kim " * @param dmap pointer to first element in list", 3584ab76bc97SJung-uk Kim " * @return NULL if not found.", 3585ab76bc97SJung-uk Kim " */", 3586ab76bc97SJung-uk Kim "static struct yytbl_dmap *yytbl_dmap_lookup YYFARGS2(struct yytbl_dmap *, dmap,", 3587ab76bc97SJung-uk Kim " int, id)", 3588ab76bc97SJung-uk Kim "{", 35897e382390SJung-uk Kim " M4_YY_DECL_GUTS_VAR();", 35907e382390SJung-uk Kim " M4_YY_NOOP_GUTS_VAR();", 35917e382390SJung-uk Kim "", 3592ab76bc97SJung-uk Kim " while (dmap->dm_id)", 35937e382390SJung-uk Kim " if ((int)(dmap->dm_id) == id)", 3594ab76bc97SJung-uk Kim " return dmap;", 3595ab76bc97SJung-uk Kim " else", 3596ab76bc97SJung-uk Kim " dmap++;", 3597ab76bc97SJung-uk Kim " return NULL;", 3598ab76bc97SJung-uk Kim "}", 3599ab76bc97SJung-uk Kim "", 3600ab76bc97SJung-uk Kim "/** Read a table while mapping its contents to the local array.", 3601ab76bc97SJung-uk Kim " * @param dmap used to performing mapping", 3602ab76bc97SJung-uk Kim " * @return 0 on success", 3603ab76bc97SJung-uk Kim " */", 3604ab76bc97SJung-uk Kim "static int yytbl_data_load YYFARGS2(struct yytbl_dmap *, dmap, struct yytbl_reader*, rd)", 3605ab76bc97SJung-uk Kim "{", 3606ab76bc97SJung-uk Kim " struct yytbl_data td;", 3607ab76bc97SJung-uk Kim " struct yytbl_dmap *transdmap=0;", 3608ab76bc97SJung-uk Kim " int len, i, rv, inner_loop_count;", 3609ab76bc97SJung-uk Kim " void *p=0;", 3610ab76bc97SJung-uk Kim "", 3611ab76bc97SJung-uk Kim " memset (&td, 0, sizeof (struct yytbl_data));", 3612ab76bc97SJung-uk Kim "", 3613ab76bc97SJung-uk Kim " if (yytbl_read16 (&td.td_id, rd) != 0", 3614ab76bc97SJung-uk Kim " || yytbl_read16 (&td.td_flags, rd) != 0", 3615ab76bc97SJung-uk Kim " || yytbl_read32 (&td.td_hilen, rd) != 0", 3616ab76bc97SJung-uk Kim " || yytbl_read32 (&td.td_lolen, rd) != 0)", 3617ab76bc97SJung-uk Kim " return -1;", 3618ab76bc97SJung-uk Kim "", 3619ab76bc97SJung-uk Kim " /* Lookup the map for the transition table so we have it in case we need it", 3620ab76bc97SJung-uk Kim " * inside the loop below. This scanner might not even have a transition", 3621ab76bc97SJung-uk Kim " * table, which is ok.", 3622ab76bc97SJung-uk Kim " */", 3623ab76bc97SJung-uk Kim " transdmap = yytbl_dmap_lookup (dmap, YYTD_ID_TRANSITION M4_YY_CALL_LAST_ARG);", 3624ab76bc97SJung-uk Kim "", 3625ab76bc97SJung-uk Kim " if ((dmap = yytbl_dmap_lookup (dmap, td.td_id M4_YY_CALL_LAST_ARG)) == NULL){", 3626ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"table id not found in map.\" ); /* TODO: not fatal. */", 3627ab76bc97SJung-uk Kim " return -1;", 3628ab76bc97SJung-uk Kim " }", 3629ab76bc97SJung-uk Kim "", 3630ab76bc97SJung-uk Kim " /* Allocate space for table.", 3631ab76bc97SJung-uk Kim " * The --full yy_transition table is a special case, since we", 3632ab76bc97SJung-uk Kim " * need the dmap.dm_sz entry to tell us the sizeof the individual", 3633ab76bc97SJung-uk Kim " * struct members.", 3634ab76bc97SJung-uk Kim " */", 3635ab76bc97SJung-uk Kim " {", 3636ab76bc97SJung-uk Kim " size_t bytes;", 3637ab76bc97SJung-uk Kim "", 3638ab76bc97SJung-uk Kim " if ((td.td_flags & YYTD_STRUCT))", 3639ab76bc97SJung-uk Kim " bytes = sizeof(struct yy_trans_info) * td.td_lolen * (td.td_hilen ? td.td_hilen : 1);", 3640ab76bc97SJung-uk Kim " else", 3641ab76bc97SJung-uk Kim " bytes = td.td_lolen * (td.td_hilen ? td.td_hilen : 1) * dmap->dm_sz;", 3642ab76bc97SJung-uk Kim "", 3643ab76bc97SJung-uk Kim " if(M4_YY_TABLES_VERIFY)", 3644ab76bc97SJung-uk Kim " /* We point to the array itself */", 3645ab76bc97SJung-uk Kim " p = dmap->dm_arr;", 3646ab76bc97SJung-uk Kim " else", 3647ab76bc97SJung-uk Kim " /* We point to the address of a pointer. */", 3648ab76bc97SJung-uk Kim " *dmap->dm_arr = p = (void *) yyalloc (bytes M4_YY_CALL_LAST_ARG);", 3649ab76bc97SJung-uk Kim " if ( ! p )", 3650ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"out of dynamic memory in yytbl_data_load()\" );", 3651ab76bc97SJung-uk Kim " }", 3652ab76bc97SJung-uk Kim "", 3653ab76bc97SJung-uk Kim " /* If it's a struct, we read 2 integers to get one element */", 3654ab76bc97SJung-uk Kim " if ((td.td_flags & YYTD_STRUCT) != 0)", 3655ab76bc97SJung-uk Kim " inner_loop_count = 2;", 3656ab76bc97SJung-uk Kim " else", 3657ab76bc97SJung-uk Kim " inner_loop_count = 1;", 3658ab76bc97SJung-uk Kim "", 3659ab76bc97SJung-uk Kim " /* read and map each element.", 3660ab76bc97SJung-uk Kim " * This loop iterates once for each element of the td_data array.", 3661ab76bc97SJung-uk Kim " * Notice that we increment 'i' in the inner loop.", 3662ab76bc97SJung-uk Kim " */", 3663ab76bc97SJung-uk Kim " len = yytbl_calc_total_len (&td);", 3664ab76bc97SJung-uk Kim " for (i = 0; i < len; ){", 3665ab76bc97SJung-uk Kim " int j;", 3666ab76bc97SJung-uk Kim "", 3667ab76bc97SJung-uk Kim "", 3668ab76bc97SJung-uk Kim " /* This loop really executes exactly 1 or 2 times.", 3669ab76bc97SJung-uk Kim " * The second time is to handle the second member of the", 3670ab76bc97SJung-uk Kim " * YYTD_STRUCT for the yy_transition array.", 3671ab76bc97SJung-uk Kim " */", 3672ab76bc97SJung-uk Kim " for (j = 0; j < inner_loop_count; j++, i++) {", 3673ab76bc97SJung-uk Kim " flex_int32_t t32;", 3674ab76bc97SJung-uk Kim "", 3675ab76bc97SJung-uk Kim " /* read into t32 no matter what the real size is. */", 3676ab76bc97SJung-uk Kim " {", 3677ab76bc97SJung-uk Kim " flex_int16_t t16;", 3678ab76bc97SJung-uk Kim " flex_int8_t t8;", 3679ab76bc97SJung-uk Kim "", 3680ab76bc97SJung-uk Kim " switch (YYTDFLAGS2BYTES (td.td_flags)) {", 3681ab76bc97SJung-uk Kim " case sizeof (flex_int32_t):", 3682ab76bc97SJung-uk Kim " rv = yytbl_read32 (&t32, rd);", 3683ab76bc97SJung-uk Kim " break;", 3684ab76bc97SJung-uk Kim " case sizeof (flex_int16_t):", 3685ab76bc97SJung-uk Kim " rv = yytbl_read16 (&t16, rd);", 3686ab76bc97SJung-uk Kim " t32 = t16;", 3687ab76bc97SJung-uk Kim " break;", 3688ab76bc97SJung-uk Kim " case sizeof (flex_int8_t):", 3689ab76bc97SJung-uk Kim " rv = yytbl_read8 (&t8, rd);", 3690ab76bc97SJung-uk Kim " t32 = t8;", 3691ab76bc97SJung-uk Kim " break;", 3692ab76bc97SJung-uk Kim " default:", 3693ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"invalid td_flags\" ); /* TODO: not fatal. */", 3694ab76bc97SJung-uk Kim " return -1;", 3695ab76bc97SJung-uk Kim " }", 3696ab76bc97SJung-uk Kim " }", 3697ab76bc97SJung-uk Kim " if (rv != 0)", 3698ab76bc97SJung-uk Kim " return -1;", 3699ab76bc97SJung-uk Kim "", 3700ab76bc97SJung-uk Kim " /* copy into the deserialized array... */", 3701ab76bc97SJung-uk Kim "", 3702ab76bc97SJung-uk Kim " if ((td.td_flags & YYTD_STRUCT)) {", 3703ab76bc97SJung-uk Kim " /* t32 is the j'th member of a two-element struct. */", 3704ab76bc97SJung-uk Kim " void *v;", 3705ab76bc97SJung-uk Kim "", 3706ab76bc97SJung-uk Kim " v = j == 0 ? &(((struct yy_trans_info *) p)->yy_verify)", 3707ab76bc97SJung-uk Kim " : &(((struct yy_trans_info *) p)->yy_nxt);", 3708ab76bc97SJung-uk Kim "", 3709ab76bc97SJung-uk Kim " switch (dmap->dm_sz) {", 3710ab76bc97SJung-uk Kim " case sizeof (flex_int32_t):", 3711ab76bc97SJung-uk Kim " if (M4_YY_TABLES_VERIFY){", 3712ab76bc97SJung-uk Kim " if( ((flex_int32_t *) v)[0] != (flex_int32_t) t32)", 3713ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"tables verification failed at YYTD_STRUCT flex_int32_t\" );", 3714ab76bc97SJung-uk Kim " }else", 3715ab76bc97SJung-uk Kim " ((flex_int32_t *) v)[0] = (flex_int32_t) t32;", 3716ab76bc97SJung-uk Kim " break;", 3717ab76bc97SJung-uk Kim " case sizeof (flex_int16_t):", 3718ab76bc97SJung-uk Kim " if (M4_YY_TABLES_VERIFY ){", 3719ab76bc97SJung-uk Kim " if(((flex_int16_t *) v)[0] != (flex_int16_t) t32)", 3720ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"tables verification failed at YYTD_STRUCT flex_int16_t\" );", 3721ab76bc97SJung-uk Kim " }else", 3722ab76bc97SJung-uk Kim " ((flex_int16_t *) v)[0] = (flex_int16_t) t32;", 3723ab76bc97SJung-uk Kim " break;", 3724ab76bc97SJung-uk Kim " case sizeof(flex_int8_t):", 3725ab76bc97SJung-uk Kim " if (M4_YY_TABLES_VERIFY ){", 3726ab76bc97SJung-uk Kim " if( ((flex_int8_t *) v)[0] != (flex_int8_t) t32)", 3727ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"tables verification failed at YYTD_STRUCT flex_int8_t\" );", 3728ab76bc97SJung-uk Kim " }else", 3729ab76bc97SJung-uk Kim " ((flex_int8_t *) v)[0] = (flex_int8_t) t32;", 3730ab76bc97SJung-uk Kim " break;", 3731ab76bc97SJung-uk Kim " default:", 3732ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"invalid dmap->dm_sz for struct\" ); /* TODO: not fatal. */", 3733ab76bc97SJung-uk Kim " return -1;", 3734ab76bc97SJung-uk Kim " }", 3735ab76bc97SJung-uk Kim "", 3736ab76bc97SJung-uk Kim " /* if we're done with j, increment p */", 3737ab76bc97SJung-uk Kim " if (j == 1)", 3738ab76bc97SJung-uk Kim " p = (struct yy_trans_info *) p + 1;", 3739ab76bc97SJung-uk Kim " }", 3740ab76bc97SJung-uk Kim " else if ((td.td_flags & YYTD_PTRANS)) {", 3741ab76bc97SJung-uk Kim " /* t32 is an index into the transition array. */", 3742ab76bc97SJung-uk Kim " struct yy_trans_info *v;", 3743ab76bc97SJung-uk Kim "", 3744ab76bc97SJung-uk Kim "", 3745ab76bc97SJung-uk Kim " if (!transdmap){", 3746ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"transition table not found\" ); /* TODO: not fatal. */", 3747ab76bc97SJung-uk Kim " return -1;", 3748ab76bc97SJung-uk Kim " }", 3749ab76bc97SJung-uk Kim "", 3750ab76bc97SJung-uk Kim " if( M4_YY_TABLES_VERIFY)", 3751ab76bc97SJung-uk Kim " v = &(((struct yy_trans_info *) (transdmap->dm_arr))[t32]);", 3752ab76bc97SJung-uk Kim " else", 3753ab76bc97SJung-uk Kim " v = &((*((struct yy_trans_info **) (transdmap->dm_arr)))[t32]);", 3754ab76bc97SJung-uk Kim "", 3755ab76bc97SJung-uk Kim " if(M4_YY_TABLES_VERIFY ){", 3756ab76bc97SJung-uk Kim " if( ((struct yy_trans_info **) p)[0] != v)", 3757ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"tables verification failed at YYTD_PTRANS\" );", 3758ab76bc97SJung-uk Kim " }else", 3759ab76bc97SJung-uk Kim " ((struct yy_trans_info **) p)[0] = v;", 3760ab76bc97SJung-uk Kim "", 3761ab76bc97SJung-uk Kim " /* increment p */", 3762ab76bc97SJung-uk Kim " p = (struct yy_trans_info **) p + 1;", 3763ab76bc97SJung-uk Kim " }", 3764ab76bc97SJung-uk Kim " else {", 3765ab76bc97SJung-uk Kim " /* t32 is a plain int. copy data, then incrememnt p. */", 3766ab76bc97SJung-uk Kim " switch (dmap->dm_sz) {", 3767ab76bc97SJung-uk Kim " case sizeof (flex_int32_t):", 3768ab76bc97SJung-uk Kim " if(M4_YY_TABLES_VERIFY ){", 3769ab76bc97SJung-uk Kim " if( ((flex_int32_t *) p)[0] != (flex_int32_t) t32)", 3770ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"tables verification failed at flex_int32_t\" );", 3771ab76bc97SJung-uk Kim " }else", 3772ab76bc97SJung-uk Kim " ((flex_int32_t *) p)[0] = (flex_int32_t) t32;", 3773ab76bc97SJung-uk Kim " p = ((flex_int32_t *) p) + 1;", 3774ab76bc97SJung-uk Kim " break;", 3775ab76bc97SJung-uk Kim " case sizeof (flex_int16_t):", 3776ab76bc97SJung-uk Kim " if(M4_YY_TABLES_VERIFY ){", 3777ab76bc97SJung-uk Kim " if( ((flex_int16_t *) p)[0] != (flex_int16_t) t32)", 3778ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"tables verification failed at flex_int16_t\" );", 3779ab76bc97SJung-uk Kim " }else", 3780ab76bc97SJung-uk Kim " ((flex_int16_t *) p)[0] = (flex_int16_t) t32;", 3781ab76bc97SJung-uk Kim " p = ((flex_int16_t *) p) + 1;", 3782ab76bc97SJung-uk Kim " break;", 3783ab76bc97SJung-uk Kim " case sizeof (flex_int8_t):", 3784ab76bc97SJung-uk Kim " if(M4_YY_TABLES_VERIFY ){", 3785ab76bc97SJung-uk Kim " if( ((flex_int8_t *) p)[0] != (flex_int8_t) t32)", 3786ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"tables verification failed at flex_int8_t\" );", 3787ab76bc97SJung-uk Kim " }else", 3788ab76bc97SJung-uk Kim " ((flex_int8_t *) p)[0] = (flex_int8_t) t32;", 3789ab76bc97SJung-uk Kim " p = ((flex_int8_t *) p) + 1;", 3790ab76bc97SJung-uk Kim " break;", 3791ab76bc97SJung-uk Kim " default:", 3792ab76bc97SJung-uk Kim " YY_FATAL_ERROR( \"invalid dmap->dm_sz for plain int\" ); /* TODO: not fatal. */", 3793ab76bc97SJung-uk Kim " return -1;", 3794ab76bc97SJung-uk Kim " }", 3795ab76bc97SJung-uk Kim " }", 3796ab76bc97SJung-uk Kim " }", 3797ab76bc97SJung-uk Kim "", 3798ab76bc97SJung-uk Kim " }", 3799ab76bc97SJung-uk Kim "", 3800ab76bc97SJung-uk Kim " /* Now eat padding. */", 3801ab76bc97SJung-uk Kim " {", 3802ab76bc97SJung-uk Kim " int pad;", 3803ab76bc97SJung-uk Kim " pad = yypad64(rd->bread);", 3804ab76bc97SJung-uk Kim " while(--pad >= 0){", 3805ab76bc97SJung-uk Kim " flex_int8_t t8;", 3806ab76bc97SJung-uk Kim " if(yytbl_read8(&t8,rd) != 0)", 3807ab76bc97SJung-uk Kim " return -1;", 3808ab76bc97SJung-uk Kim " }", 3809ab76bc97SJung-uk Kim " }", 3810ab76bc97SJung-uk Kim "", 3811ab76bc97SJung-uk Kim " return 0;", 3812ab76bc97SJung-uk Kim "}", 3813ab76bc97SJung-uk Kim "", 3814ab76bc97SJung-uk Kim "%define-yytables The name for this specific scanner's tables.", 3815ab76bc97SJung-uk Kim "", 3816ab76bc97SJung-uk Kim "/* Find the key and load the DFA tables from the given stream. */", 3817ab76bc97SJung-uk Kim "static int yytbl_fload YYFARGS2(FILE *, fp, const char *, key)", 3818ab76bc97SJung-uk Kim "{", 3819ab76bc97SJung-uk Kim " int rv=0;", 3820ab76bc97SJung-uk Kim " struct yytbl_hdr th;", 3821ab76bc97SJung-uk Kim " struct yytbl_reader rd;", 3822ab76bc97SJung-uk Kim "", 3823ab76bc97SJung-uk Kim " rd.fp = fp;", 3824ab76bc97SJung-uk Kim " th.th_version = NULL;", 3825ab76bc97SJung-uk Kim "", 3826ab76bc97SJung-uk Kim " /* Keep trying until we find the right set of tables or end of file. */", 3827ab76bc97SJung-uk Kim " while (!feof(rd.fp)) {", 3828ab76bc97SJung-uk Kim " rd.bread = 0;", 3829ab76bc97SJung-uk Kim " if (yytbl_hdr_read (&th, &rd M4_YY_CALL_LAST_ARG) != 0){", 3830ab76bc97SJung-uk Kim " rv = -1;", 3831ab76bc97SJung-uk Kim " goto return_rv;", 3832ab76bc97SJung-uk Kim " }", 3833ab76bc97SJung-uk Kim "", 3834ab76bc97SJung-uk Kim " /* A NULL key means choose the first set of tables. */", 3835ab76bc97SJung-uk Kim " if (key == NULL)", 3836ab76bc97SJung-uk Kim " break;", 3837ab76bc97SJung-uk Kim "", 3838ab76bc97SJung-uk Kim " if (strcmp(th.th_name,key) != 0){", 3839ab76bc97SJung-uk Kim " /* Skip ahead to next set */", 3840ab76bc97SJung-uk Kim " fseek(rd.fp, th.th_ssize - th.th_hsize, SEEK_CUR);", 3841ab76bc97SJung-uk Kim " yyfree(th.th_version M4_YY_CALL_LAST_ARG);", 3842ab76bc97SJung-uk Kim " th.th_version = NULL;", 3843ab76bc97SJung-uk Kim " }", 3844ab76bc97SJung-uk Kim " else", 3845ab76bc97SJung-uk Kim " break;", 3846ab76bc97SJung-uk Kim " }", 3847ab76bc97SJung-uk Kim "", 3848ab76bc97SJung-uk Kim " while (rd.bread < th.th_ssize){", 3849ab76bc97SJung-uk Kim " /* Load the data tables */", 3850ab76bc97SJung-uk Kim " if(yytbl_data_load (yydmap,&rd M4_YY_CALL_LAST_ARG) != 0){", 3851ab76bc97SJung-uk Kim " rv = -1;", 3852ab76bc97SJung-uk Kim " goto return_rv;", 3853ab76bc97SJung-uk Kim " }", 3854ab76bc97SJung-uk Kim " }", 3855ab76bc97SJung-uk Kim "", 3856ab76bc97SJung-uk Kim "return_rv:", 3857ab76bc97SJung-uk Kim " if(th.th_version){", 3858ab76bc97SJung-uk Kim " yyfree(th.th_version M4_YY_CALL_LAST_ARG);", 3859ab76bc97SJung-uk Kim " th.th_version = NULL;", 3860ab76bc97SJung-uk Kim " }", 3861ab76bc97SJung-uk Kim "", 3862ab76bc97SJung-uk Kim " return rv;", 3863ab76bc97SJung-uk Kim "}", 3864ab76bc97SJung-uk Kim "", 3865ab76bc97SJung-uk Kim "/** Load the DFA tables for this scanner from the given stream. */", 3866ab76bc97SJung-uk Kim "int yytables_fload YYFARGS1(FILE *, fp)", 3867ab76bc97SJung-uk Kim "{", 3868ab76bc97SJung-uk Kim "", 3869ab76bc97SJung-uk Kim " if( yytbl_fload(fp, YYTABLES_NAME M4_YY_CALL_LAST_ARG) != 0)", 3870ab76bc97SJung-uk Kim " return -1;", 3871ab76bc97SJung-uk Kim " return 0;", 3872ab76bc97SJung-uk Kim "}", 3873ab76bc97SJung-uk Kim "", 3874ab76bc97SJung-uk Kim "/** Destroy the loaded tables, freeing memory, etc.. */", 38757e382390SJung-uk Kim "int yytables_destroy (M4_YY_DEF_ONLY_ARG)", 3876ab76bc97SJung-uk Kim "{", 3877ab76bc97SJung-uk Kim " struct yytbl_dmap *dmap=0;", 3878ab76bc97SJung-uk Kim "", 3879ab76bc97SJung-uk Kim " if(!M4_YY_TABLES_VERIFY){", 3880ab76bc97SJung-uk Kim " /* Walk the dmap, freeing the pointers */", 3881ab76bc97SJung-uk Kim " for(dmap=yydmap; dmap->dm_id; dmap++) {", 3882ab76bc97SJung-uk Kim " void * v;", 3883ab76bc97SJung-uk Kim " v = dmap->dm_arr;", 3884ab76bc97SJung-uk Kim " if(v && *(char**)v){", 3885ab76bc97SJung-uk Kim " yyfree(*(char**)v M4_YY_CALL_LAST_ARG);", 3886ab76bc97SJung-uk Kim " *(char**)v = NULL;", 3887ab76bc97SJung-uk Kim " }", 3888ab76bc97SJung-uk Kim " }", 3889ab76bc97SJung-uk Kim " }", 3890ab76bc97SJung-uk Kim "", 3891ab76bc97SJung-uk Kim " return 0;", 3892ab76bc97SJung-uk Kim "}", 3893ab76bc97SJung-uk Kim "", 3894ab76bc97SJung-uk Kim "/* end table serialization code definitions */", 3895ab76bc97SJung-uk Kim "%endif", 3896ab76bc97SJung-uk Kim "", 3897ab76bc97SJung-uk Kim "", 3898ab76bc97SJung-uk Kim "m4_ifdef([[M4_YY_MAIN]], [[", 38997e382390SJung-uk Kim "int main (void);", 3900ab76bc97SJung-uk Kim "", 3901ab76bc97SJung-uk Kim "int main ()", 3902ab76bc97SJung-uk Kim "{", 3903ab76bc97SJung-uk Kim "", 3904ab76bc97SJung-uk Kim "%if-reentrant", 3905ab76bc97SJung-uk Kim " yyscan_t lexer;", 3906ab76bc97SJung-uk Kim " yylex_init(&lexer);", 3907ab76bc97SJung-uk Kim " yylex( lexer );", 3908ab76bc97SJung-uk Kim " yylex_destroy( lexer);", 3909ab76bc97SJung-uk Kim "", 3910ab76bc97SJung-uk Kim "%endif", 3911ab76bc97SJung-uk Kim "%if-not-reentrant", 3912ab76bc97SJung-uk Kim " yylex();", 3913ab76bc97SJung-uk Kim "%endif", 3914ab76bc97SJung-uk Kim "", 3915ab76bc97SJung-uk Kim " return 0;", 3916ab76bc97SJung-uk Kim "}", 3917ab76bc97SJung-uk Kim "]])", 3918ab76bc97SJung-uk Kim "", 3919ab76bc97SJung-uk Kim "%ok-for-header", 3920ab76bc97SJung-uk Kim "m4_ifdef( [[M4_YY_IN_HEADER]],", 3921ab76bc97SJung-uk Kim "[[", 3922ab76bc97SJung-uk Kim "#undef YY_NEW_FILE", 3923ab76bc97SJung-uk Kim "#undef YY_FLUSH_BUFFER", 3924ab76bc97SJung-uk Kim "#undef yy_set_bol", 3925ab76bc97SJung-uk Kim "#undef yy_new_buffer", 3926ab76bc97SJung-uk Kim "#undef yy_set_interactive", 3927ab76bc97SJung-uk Kim "#undef YY_DO_BEFORE_ACTION", 3928ab76bc97SJung-uk Kim "", 3929ab76bc97SJung-uk Kim "#ifdef YY_DECL_IS_OURS", 3930ab76bc97SJung-uk Kim "#undef YY_DECL_IS_OURS", 3931ab76bc97SJung-uk Kim "#undef YY_DECL", 3932ab76bc97SJung-uk Kim "#endif", 39337e382390SJung-uk Kim "", 39347e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[_create_buffer_ALREADY_DEFINED", 39357e382390SJung-uk Kim "#undef yy_create_buffer", 39367e382390SJung-uk Kim "#endif]]", 39377e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[_delete_buffer_ALREADY_DEFINED", 39387e382390SJung-uk Kim "#undef yy_delete_buffer", 39397e382390SJung-uk Kim "#endif]]", 39407e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[_scan_buffer_ALREADY_DEFINED", 39417e382390SJung-uk Kim "#undef yy_scan_buffer", 39427e382390SJung-uk Kim "#endif]]", 39437e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[_scan_string_ALREADY_DEFINED", 39447e382390SJung-uk Kim "#undef yy_scan_string", 39457e382390SJung-uk Kim "#endif]]", 39467e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[_scan_bytes_ALREADY_DEFINED", 39477e382390SJung-uk Kim "#undef yy_scan_bytes", 39487e382390SJung-uk Kim "#endif]]", 39497e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[_init_buffer_ALREADY_DEFINED", 39507e382390SJung-uk Kim "#undef yy_init_buffer", 39517e382390SJung-uk Kim "#endif]]", 39527e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[_flush_buffer_ALREADY_DEFINED", 39537e382390SJung-uk Kim "#undef yy_flush_buffer", 39547e382390SJung-uk Kim "#endif]]", 39557e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[_load_buffer_state_ALREADY_DEFINED", 39567e382390SJung-uk Kim "#undef yy_load_buffer_state", 39577e382390SJung-uk Kim "#endif]]", 39587e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[_switch_to_buffer_ALREADY_DEFINED", 39597e382390SJung-uk Kim "#undef yy_switch_to_buffer", 39607e382390SJung-uk Kim "#endif]]", 39617e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[push_buffer_state_ALREADY_DEFINED", 39627e382390SJung-uk Kim "#undef yypush_buffer_state", 39637e382390SJung-uk Kim "#endif]]", 39647e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[pop_buffer_state_ALREADY_DEFINED", 39657e382390SJung-uk Kim "#undef yypop_buffer_state", 39667e382390SJung-uk Kim "#endif]]", 39677e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[ensure_buffer_stack_ALREADY_DEFINED", 39687e382390SJung-uk Kim "#undef yyensure_buffer_stack", 39697e382390SJung-uk Kim "#endif]]", 39707e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[lex_ALREADY_DEFINED", 39717e382390SJung-uk Kim "#undef yylex", 39727e382390SJung-uk Kim "#endif]]", 39737e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[restart_ALREADY_DEFINED", 39747e382390SJung-uk Kim "#undef yyrestart", 39757e382390SJung-uk Kim "#endif]]", 39767e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[lex_init_ALREADY_DEFINED", 39777e382390SJung-uk Kim "#undef yylex_init", 39787e382390SJung-uk Kim "#endif]]", 39797e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[lex_init_extra_ALREADY_DEFINED", 39807e382390SJung-uk Kim "#undef yylex_init_extra", 39817e382390SJung-uk Kim "#endif]]", 39827e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[lex_destroy_ALREADY_DEFINED", 39837e382390SJung-uk Kim "#undef yylex_destroy", 39847e382390SJung-uk Kim "#endif]]", 39857e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[get_debug_ALREADY_DEFINED", 39867e382390SJung-uk Kim "#undef yyget_debug", 39877e382390SJung-uk Kim "#endif]]", 39887e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[set_debug_ALREADY_DEFINED", 39897e382390SJung-uk Kim "#undef yyset_debug", 39907e382390SJung-uk Kim "#endif]]", 39917e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[get_extra_ALREADY_DEFINED", 39927e382390SJung-uk Kim "#undef yyget_extra", 39937e382390SJung-uk Kim "#endif]]", 39947e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[set_extra_ALREADY_DEFINED", 39957e382390SJung-uk Kim "#undef yyset_extra", 39967e382390SJung-uk Kim "#endif]]", 39977e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[get_in_ALREADY_DEFINED", 39987e382390SJung-uk Kim "#undef yyget_in", 39997e382390SJung-uk Kim "#endif]]", 40007e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[set_in_ALREADY_DEFINED", 40017e382390SJung-uk Kim "#undef yyset_in", 40027e382390SJung-uk Kim "#endif]]", 40037e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[get_out_ALREADY_DEFINED", 40047e382390SJung-uk Kim "#undef yyget_out", 40057e382390SJung-uk Kim "#endif]]", 40067e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[set_out_ALREADY_DEFINED", 40077e382390SJung-uk Kim "#undef yyset_out", 40087e382390SJung-uk Kim "#endif]]", 40097e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[get_leng_ALREADY_DEFINED", 40107e382390SJung-uk Kim "#undef yyget_leng", 40117e382390SJung-uk Kim "#endif]]", 40127e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[get_text_ALREADY_DEFINED", 40137e382390SJung-uk Kim "#undef yyget_text", 40147e382390SJung-uk Kim "#endif]]", 40157e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[get_lineno_ALREADY_DEFINED", 40167e382390SJung-uk Kim "#undef yyget_lineno", 40177e382390SJung-uk Kim "#endif]]", 40187e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[set_lineno_ALREADY_DEFINED", 40197e382390SJung-uk Kim "#undef yyset_lineno", 40207e382390SJung-uk Kim "#endif]]", 40217e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[get_column_ALREADY_DEFINED", 40227e382390SJung-uk Kim "#undef yyget_column", 40237e382390SJung-uk Kim "#endif]]", 40247e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[set_column_ALREADY_DEFINED", 40257e382390SJung-uk Kim "#undef yyset_column", 40267e382390SJung-uk Kim "#endif]]", 40277e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[wrap_ALREADY_DEFINED", 40287e382390SJung-uk Kim "#undef yywrap", 40297e382390SJung-uk Kim "#endif]]", 40307e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[get_lval_ALREADY_DEFINED", 40317e382390SJung-uk Kim "#undef yyget_lval", 40327e382390SJung-uk Kim "#endif]]", 40337e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[set_lval_ALREADY_DEFINED", 40347e382390SJung-uk Kim "#undef yyset_lval", 40357e382390SJung-uk Kim "#endif]]", 40367e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[get_lloc_ALREADY_DEFINED", 40377e382390SJung-uk Kim "#undef yyget_lloc", 40387e382390SJung-uk Kim "#endif]]", 40397e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[set_lloc_ALREADY_DEFINED", 40407e382390SJung-uk Kim "#undef yyset_lloc", 40417e382390SJung-uk Kim "#endif]]", 40427e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[alloc_ALREADY_DEFINED", 40437e382390SJung-uk Kim "#undef yyalloc", 40447e382390SJung-uk Kim "#endif]]", 40457e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[realloc_ALREADY_DEFINED", 40467e382390SJung-uk Kim "#undef yyrealloc", 40477e382390SJung-uk Kim "#endif]]", 40487e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[free_ALREADY_DEFINED", 40497e382390SJung-uk Kim "#undef yyfree", 40507e382390SJung-uk Kim "#endif]]", 40517e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[text_ALREADY_DEFINED", 40527e382390SJung-uk Kim "#undef yytext", 40537e382390SJung-uk Kim "#endif]]", 40547e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[leng_ALREADY_DEFINED", 40557e382390SJung-uk Kim "#undef yyleng", 40567e382390SJung-uk Kim "#endif]]", 40577e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[in_ALREADY_DEFINED", 40587e382390SJung-uk Kim "#undef yyin", 40597e382390SJung-uk Kim "#endif]]", 40607e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[out_ALREADY_DEFINED", 40617e382390SJung-uk Kim "#undef yyout", 40627e382390SJung-uk Kim "#endif]]", 40637e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[_flex_debug_ALREADY_DEFINED", 40647e382390SJung-uk Kim "#undef yy_flex_debug", 40657e382390SJung-uk Kim "#endif]]", 40667e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[lineno_ALREADY_DEFINED", 40677e382390SJung-uk Kim "#undef yylineno", 40687e382390SJung-uk Kim "#endif]]", 40697e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[tables_fload_ALREADY_DEFINED", 40707e382390SJung-uk Kim "#undef yytables_fload", 40717e382390SJung-uk Kim "#endif]]", 40727e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[tables_destroy_ALREADY_DEFINED", 40737e382390SJung-uk Kim "#undef yytables_destroy", 40747e382390SJung-uk Kim "#endif]]", 40757e382390SJung-uk Kim "[[#ifndef ]]M4_YY_PREFIX[[TABLES_NAME_ALREADY_DEFINED", 40767e382390SJung-uk Kim "#undef yyTABLES_NAME", 40777e382390SJung-uk Kim "#endif]]", 4078ab76bc97SJung-uk Kim "]])", 4079ab76bc97SJung-uk Kim 0 4080ab76bc97SJung-uk Kim }; 4081