1 /* File created from flex.skl via mkskel.sh */
6 "%# -*-C-*- vi: set ft=c:",
7 "%# This file is processed in several stages.",
8 "%# Here are the stages, as best as I can describe:",
10 "%# 1. flex.skl is processed through GNU m4 during the",
11 "%# pre-compilation stage of flex. Only macros starting",
12 "%# with `m4_' are processed, and quoting is normal.",
14 "%# 2. The preprocessed skeleton is translated verbatim into a",
15 "%# C array, saved as \"skel.c\" and compiled into the flex binary.",
17 "%# 3. At runtime, the skeleton is generated and filtered (again)",
18 "%# through m4. Macros beginning with `m4_' will be processed.",
19 "%# The quoting is \"[[\" and \"]]\" so we don't interfere with",
22 "%# All generate macros for the m4 stage contain the text \"m4\" or \"M4\"",
23 "%# in them. This is to distinguish them from CPP macros.",
24 "%# The exception to this rule is YY_G, which is an m4 macro, ",
25 "%# but it needs to be remain short because it is used everywhere.",
27 "/* A lexical scanner generated by flex */",
29 "%# Macros for preproc stage.",
32 "%# Macros for runtime processing stage.",
35 "m4_changequote([[, ]])",
38 "%# Lines in this skeleton starting with a \"%\" character are \"control lines\"",
39 "%# and affect the generation of the scanner. The possible control codes are",
40 "%# listed and processed in misc.c.",
42 "%# %# - A comment. The current line is omitted from the generated scanner.",
43 "%# %if-c++-only - The following lines are printed for C++ scanners ONLY.",
44 "%# %if-c-only - The following lines are NOT printed for C++ scanners.",
45 "%# %if-c-or-c++ - The following lines are printed in BOTH C and C++ scanners.",
46 "%# %if-reentrant - Print for reentrant scanners.(push)",
47 "%# %if-not-reentrant - Print for non-reentrant scanners. (push)",
48 "%# %if-bison-bridge - Print for bison-bridge. (push)",
49 "%# %if-not-bison-bridge - Print for non-bison-bridge. (push)",
50 "%# %endif - pop from the previous if code.",
51 "%# %% - A stop-point, where code is inserted by flex.",
52 "%# Each stop-point is numbered here and also in the code generator.",
53 "%# (See gen.c, etc. for details.)",
54 "%# %not-for-header - Begin code that should NOT appear in a \".h\" file.",
55 "%# %ok-for-header - %c and %e are used for building a header file.",
56 "%# %if-tables-serialization",
58 "%# All control-lines EXCEPT comment lines (\"%#\") will be inserted into",
59 "%# the generated scanner as a C-style comment. This is to aid those who",
60 "%# edit the skeleton.",
62 "#define FLEX_SCANNER",
63 "#define YY_FLEX_MAJOR_VERSION 2",
64 "#define YY_FLEX_MINOR_VERSION 5",
65 "#define YY_FLEX_SUBMINOR_VERSION 33",
66 "#if YY_FLEX_SUBMINOR_VERSION > 0",
70 "%# Some negated symbols",
71 "m4_ifdef( [[M4_YY_IN_HEADER]], , [[m4_define([[M4_YY_NOT_IN_HEADER]], [[]])]])",
72 "m4_ifdef( [[M4_YY_REENTRANT]], , [[m4_define([[M4_YY_NOT_REENTRANT]], [[]])]])",
74 "%# This is the m4 way to say \"(stack_used || is_reentrant)",
75 "m4_ifdef( [[M4_YY_STACK_USED]], [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]])",
76 "m4_ifdef( [[M4_YY_REENTRANT]], [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]])",
79 "%# The complexity here is necessary so that m4 preserves",
80 "%# the argument lists to each C function.",
83 "m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define([[M4_YY_PREFIX]], [[yy]])]])",
88 " /* The c++ scanner is a mess. The FlexLexer.h header file relies on the",
89 " * following macro. This is required in order to pass the c++-multiple-scanners",
90 " * test in the regression suite. We get reports that it breaks inheritance.",
91 " * We will address this in a future release of flex, or omit the C++ scanner",
94 " #define yyFlexLexer M4_YY_PREFIX[[FlexLexer]]",
98 " m4_define(yy[[_create_buffer]], [[M4_YY_PREFIX[[_create_buffer]]m4_ifelse($#,0,,[[($@)]])]])",
99 " m4_define(yy[[_delete_buffer]], [[M4_YY_PREFIX[[_delete_buffer]]m4_ifelse($#,0,,[[($@)]])]])",
100 " m4_define(yy[[_scan_buffer]], [[M4_YY_PREFIX[[_scan_buffer]]m4_ifelse($#,0,,[[($@)]])]])",
101 " m4_define(yy[[_scan_string]], [[M4_YY_PREFIX[[_scan_string]]m4_ifelse($#,0,,[[($@)]])]])",
102 " m4_define(yy[[_scan_bytes]], [[M4_YY_PREFIX[[_scan_bytes]]m4_ifelse($#,0,,[[($@)]])]])",
103 " m4_define(yy[[_init_buffer]], [[M4_YY_PREFIX[[_init_buffer]]m4_ifelse($#,0,,[[($@)]])]])",
104 " m4_define(yy[[_flush_buffer]], [[M4_YY_PREFIX[[_flush_buffer]]m4_ifelse($#,0,,[[($@)]])]])",
105 " m4_define(yy[[_load_buffer_state]], [[M4_YY_PREFIX[[_load_buffer_state]]m4_ifelse($#,0,,[[($@)]])]])",
106 " m4_define(yy[[_switch_to_buffer]], [[M4_YY_PREFIX[[_switch_to_buffer]]m4_ifelse($#,0,,[[($@)]])]])",
107 " m4_define(yy[[push_buffer_state]], [[M4_YY_PREFIX[[push_buffer_state]]m4_ifelse($#,0,,[[($@)]])]])",
108 " m4_define(yy[[pop_buffer_state]], [[M4_YY_PREFIX[[pop_buffer_state]]m4_ifelse($#,0,,[[($@)]])]])",
109 " m4_define(yy[[ensure_buffer_stack]], [[M4_YY_PREFIX[[ensure_buffer_stack]]m4_ifelse($#,0,,[[($@)]])]])",
110 " m4_define(yy[[lex]], [[M4_YY_PREFIX[[lex]]m4_ifelse($#,0,,[[($@)]])]])",
111 " m4_define(yy[[restart]], [[M4_YY_PREFIX[[restart]]m4_ifelse($#,0,,[[($@)]])]])",
112 " m4_define(yy[[lex_init]], [[M4_YY_PREFIX[[lex_init]]m4_ifelse($#,0,,[[($@)]])]])",
113 " m4_define(yy[[lex_destroy]], [[M4_YY_PREFIX[[lex_destroy]]m4_ifelse($#,0,,[[($@)]])]])",
114 " m4_define(yy[[get_debug]], [[M4_YY_PREFIX[[get_debug]]m4_ifelse($#,0,,[[($@)]])]])",
115 " m4_define(yy[[set_debug]], [[M4_YY_PREFIX[[set_debug]]m4_ifelse($#,0,,[[($@)]])]])",
116 " m4_define(yy[[get_extra]], [[M4_YY_PREFIX[[get_extra]]m4_ifelse($#,0,,[[($@)]])]])",
117 " m4_define(yy[[set_extra]], [[M4_YY_PREFIX[[set_extra]]m4_ifelse($#,0,,[[($@)]])]])",
118 " m4_define(yy[[get_in]], [[M4_YY_PREFIX[[get_in]]m4_ifelse($#,0,,[[($@)]])]])",
119 " m4_define(yy[[set_in]], [[M4_YY_PREFIX[[set_in]]m4_ifelse($#,0,,[[($@)]])]])",
120 " m4_define(yy[[get_out]], [[M4_YY_PREFIX[[get_out]]m4_ifelse($#,0,,[[($@)]])]])",
121 " m4_define(yy[[set_out]], [[M4_YY_PREFIX[[set_out]]m4_ifelse($#,0,,[[($@)]])]])",
122 " m4_define(yy[[get_leng]], [[M4_YY_PREFIX[[get_leng]]m4_ifelse($#,0,,[[($@)]])]])",
123 " m4_define(yy[[get_text]], [[M4_YY_PREFIX[[get_text]]m4_ifelse($#,0,,[[($@)]])]])",
124 " m4_define(yy[[get_lineno]], [[M4_YY_PREFIX[[get_lineno]]m4_ifelse($#,0,,[[($@)]])]])",
125 " m4_define(yy[[set_lineno]], [[M4_YY_PREFIX[[set_lineno]]m4_ifelse($#,0,,[[($@)]])]])",
126 " m4_ifdef( [[M4_YY_REENTRANT]],",
128 " m4_define(yy[[get_column]], [[M4_YY_PREFIX[[get_column]]m4_ifelse($#,0,,[[($@)]])]])",
129 " m4_define(yy[[set_column]], [[M4_YY_PREFIX[[set_column]]m4_ifelse($#,0,,[[($@)]])]])",
131 " m4_define(yy[[wrap]], [[M4_YY_PREFIX[[wrap]]m4_ifelse($#,0,,[[($@)]])]])",
134 "m4_ifdef( [[M4_YY_BISON_LVAL]],",
136 " m4_define(yy[[get_lval]], [[M4_YY_PREFIX[[get_lval]]m4_ifelse($#,0,,[[($@)]])]])",
137 " m4_define(yy[[set_lval]], [[M4_YY_PREFIX[[set_lval]]m4_ifelse($#,0,,[[($@)]])]])",
140 "m4_ifdef( [[<M4_YY_BISON_LLOC>]],",
142 " m4_define(yy[[get_lloc]], [[M4_YY_PREFIX[[get_lloc]]m4_ifelse($#,0,,[[($@)]])]])",
143 " m4_define(yy[[set_lloc]], [[M4_YY_PREFIX[[set_lloc]]m4_ifelse($#,0,,[[($@)]])]])",
147 " m4_define(yy[[alloc]], [[M4_YY_PREFIX[[alloc]]m4_ifelse($#,0,,[[($@)]])]])",
148 " m4_define(yy[[realloc]], [[M4_YY_PREFIX[[realloc]]m4_ifelse($#,0,,[[($@)]])]])",
149 " m4_define(yy[[free]], [[M4_YY_PREFIX[[free]]m4_ifelse($#,0,,[[($@)]])]])",
152 "m4_ifdef( [[M4_YY_NOT_REENTRANT]],",
154 " m4_define(yy[[text]], [[M4_YY_PREFIX[[text]]m4_ifelse($#,0,,[[($@)]])]])",
155 " m4_define(yy[[leng]], [[M4_YY_PREFIX[[leng]]m4_ifelse($#,0,,[[($@)]])]])",
156 " m4_define(yy[[in]], [[M4_YY_PREFIX[[in]]m4_ifelse($#,0,,[[($@)]])]])",
157 " m4_define(yy[[out]], [[M4_YY_PREFIX[[out]]m4_ifelse($#,0,,[[($@)]])]])",
158 " m4_define(yy[[_flex_debug]], [[M4_YY_PREFIX[[_flex_debug]]m4_ifelse($#,0,,[[($@)]])]])",
159 " m4_define(yy[[lineno]], [[M4_YY_PREFIX[[lineno]]m4_ifelse($#,0,,[[($@)]])]])",
164 "m4_ifdef( [[M4_YY_TABLES_EXTERNAL]],",
166 " m4_define(yy[[tables_fload]], [[M4_YY_PREFIX[[tables_fload]]m4_ifelse($#,0,,[[($@)]])]])",
167 " m4_define(yy[[tables_destroy]], [[M4_YY_PREFIX[[tables_destroy]]m4_ifelse($#,0,,[[($@)]])]])",
168 " m4_define(yy[[TABLES_NAME]], [[M4_YY_PREFIX[[TABLES_NAME]]m4_ifelse($#,0,,[[($@)]])]])",
171 "/* First, we deal with platform-specific or compiler-specific issues. */",
173 "/* begin standard C headers. */",
175 "#include <stdio.h>",
176 "#include <string.h>",
177 "#include <errno.h>",
178 "#include <stdlib.h>",
181 "%if-tables-serialization",
182 "#include <sys/types.h>",
183 "#include <netinet/in.h>",
185 "/* end standard C headers. */",
188 "/* flex integer type definitions */",
193 "/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */",
195 "#if __STDC_VERSION__ >= 199901L",
197 "/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,",
198 " * if you want the limit (max/min) macros for int types. ",
200 "#ifndef __STDC_LIMIT_MACROS",
201 "#define __STDC_LIMIT_MACROS 1",
204 "#include <inttypes.h>",
205 "typedef int8_t flex_int8_t;",
206 "typedef uint8_t flex_uint8_t;",
207 "typedef int16_t flex_int16_t;",
208 "typedef uint16_t flex_uint16_t;",
209 "typedef int32_t flex_int32_t;",
210 "typedef uint32_t flex_uint32_t;",
212 "typedef signed char flex_int8_t;",
213 "typedef short int flex_int16_t;",
214 "typedef int flex_int32_t;",
215 "typedef unsigned char flex_uint8_t; ",
216 "typedef unsigned short int flex_uint16_t;",
217 "typedef unsigned int flex_uint32_t;",
218 "#endif /* ! C99 */",
220 "/* Limits of integral types. */",
222 "#define INT8_MIN (-128)",
225 "#define INT16_MIN (-32767-1)",
228 "#define INT32_MIN (-2147483647-1)",
231 "#define INT8_MAX (127)",
234 "#define INT16_MAX (32767)",
237 "#define INT32_MAX (2147483647)",
240 "#define UINT8_MAX (255U)",
242 "#ifndef UINT16_MAX",
243 "#define UINT16_MAX (65535U)",
245 "#ifndef UINT32_MAX",
246 "#define UINT32_MAX (4294967295U)",
250 "#endif /* ! FLEXINT_H */",
255 "/* begin standard C++ headers. */",
256 "#include <iostream> ",
257 "#include <errno.h>",
258 "#include <cstdlib>",
259 "#include <cstring>",
260 "/* end standard C++ headers. */",
263 "#ifdef __cplusplus",
265 "/* The \"const\" storage-class-modifier is valid. */",
266 "#define YY_USE_CONST",
268 "#else /* ! __cplusplus */",
272 "#define YY_USE_CONST",
274 "#endif /* __STDC__ */",
275 "#endif /* ! __cplusplus */",
277 "#ifdef YY_USE_CONST",
278 "#define yyconst const",
283 "%# For compilers that can not handle prototypes.",
285 "%# The function prototype",
286 "%# int foo(int x, char* y);",
288 "%# ...should be written as",
289 "%# int foo M4_YY_PARAMS(int x, char* y);",
291 "%# ...which could possibly generate",
294 "m4_ifdef( [[M4_YY_NO_ANSI_FUNC_PROTOS]],",
296 " m4_define( [[M4_YY_PARAMS]], [[()]])",
299 " m4_define( [[M4_YY_PARAMS]], [[($*)]])",
303 "/* Returned upon end-of-file. */",
308 "/* Promotes a possibly negative, possibly signed char to an unsigned",
309 " * integer for use as an array index. If the signed char is negative,",
310 " * we want to instead treat it as an 8-bit unsigned char, hence the",
313 "#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)",
320 "/* An opaque pointer. */",
321 "#ifndef YY_TYPEDEF_YY_SCANNER_T",
322 "#define YY_TYPEDEF_YY_SCANNER_T",
323 "typedef void* yyscan_t;",
326 "%# Declare yyguts variable",
327 "m4_define( [[M4_YY_DECL_GUTS_VAR]], [[struct yyguts_t * yyg = (struct yyguts_t*)yyscanner]])",
328 "%# For use wherever a Global is accessed or assigned.",
329 "m4_define( [[YY_G]], [[yyg->$1]])",
331 "%# For use in function prototypes to append the additional argument.",
332 "m4_define( [[M4_YY_PROTO_LAST_ARG]], [[, yyscan_t yyscanner]])",
333 "m4_define( [[M4_YY_PROTO_ONLY_ARG]], [[yyscan_t yyscanner]])",
335 "%# For use in function definitions to append the additional argument.",
336 "m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],",
338 " m4_define( [[M4_YY_DEF_LAST_ARG]], [[, yyscanner]])",
339 " m4_define( [[M4_YY_DEF_ONLY_ARG]], [[yyscanner]])",
342 " m4_define( [[M4_YY_DEF_LAST_ARG]], [[, yyscan_t yyscanner]])",
343 " m4_define( [[M4_YY_DEF_ONLY_ARG]], [[yyscan_t yyscanner]])",
345 "m4_define( [[M4_YY_DECL_LAST_ARG]], [[yyscan_t yyscanner;]])",
347 "%# For use in function calls to pass the additional argument.",
348 "m4_define( [[M4_YY_CALL_LAST_ARG]], [[, yyscanner]])",
349 "m4_define( [[M4_YY_CALL_ONLY_ARG]], [[yyscanner]])",
351 "%# For use in function documentation to adjust for additional argument.",
352 "m4_define( [[M4_YY_DOC_PARAM]], [[@param yyscanner The scanner object.]])",
354 "/* For convenience, these vars (plus the bison vars far below)",
355 " are macros in the reentrant scanner. */",
356 "#define yyin YY_G(yyin_r)",
357 "#define yyout YY_G(yyout_r)",
358 "#define yyextra YY_G(yyextra_r)",
359 "#define yyleng YY_G(yyleng_r)",
360 "#define yytext YY_G(yytext_r)",
361 "#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)",
362 "#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)",
363 "#define yy_flex_debug YY_G(yy_flex_debug_r)",
365 "m4_define( [[M4_YY_INCR_LINENO]],",
372 "int yylex_init M4_YY_PARAMS(yyscan_t* scanner);",
379 "m4_define( [[M4_YY_INCR_LINENO]],",
384 "%# Define these macros to be no-ops.",
385 "m4_define( [[M4_YY_DECL_GUTS_VAR]], [[m4_dnl]])",
386 "m4_define( [[YY_G]], [[($1)]])",
387 "m4_define( [[M4_YY_PROTO_LAST_ARG]])",
388 "m4_define( [[M4_YY_PROTO_ONLY_ARG]], [[void]])",
389 "m4_define( [[M4_YY_DEF_LAST_ARG]])",
391 "m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],",
393 " m4_define( [[M4_YY_DEF_ONLY_ARG]])",
396 " m4_define( [[M4_YY_DEF_ONLY_ARG]], [[void]])",
398 "m4_define([[M4_YY_DECL_LAST_ARG]])",
399 "m4_define([[M4_YY_CALL_LAST_ARG]])",
400 "m4_define([[M4_YY_CALL_ONLY_ARG]])",
401 "m4_define( [[M4_YY_DOC_PARAM]], [[]])",
406 "m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],",
408 "%# For compilers that need traditional function definitions.",
410 "%# The function prototype taking 2 arguments",
411 "%# int foo (int x, char* y)",
413 "%# ...should be written as",
414 "%# int foo YYFARGS2(int,x, char*,y)",
416 "%# ...which could possibly generate",
417 "%# int foo (x,y,yyscanner)",
420 "%# yyscan_t yyscanner;",
422 "%# Generate traditional function defs",
423 " m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG) [[\\]]",
424 " M4_YY_DECL_LAST_ARG]])",
425 " m4_define( [[YYFARGS1]], [[($2 M4_YY_DEF_LAST_ARG) [[\\]]",
427 " M4_YY_DECL_LAST_ARG]])",
428 " m4_define( [[YYFARGS2]], [[($2,$4 M4_YY_DEF_LAST_ARG) [[\\]]",
431 " M4_YY_DECL_LAST_ARG]])",
432 " m4_define( [[YYFARGS3]], [[($2,$4,$6 M4_YY_DEF_LAST_ARG) [[\\]]",
436 " M4_YY_DECL_LAST_ARG]])",
439 "%# Generate C99 function defs.",
440 " m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG)]])",
441 " m4_define( [[YYFARGS1]], [[($1 $2 M4_YY_DEF_LAST_ARG)]])",
442 " m4_define( [[YYFARGS2]], [[($1 $2, $3 $4 M4_YY_DEF_LAST_ARG)]])",
443 " m4_define( [[YYFARGS3]], [[($1 $2, $3 $4, $5 $6 M4_YY_DEF_LAST_ARG)]])",
446 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
448 "/* Enter a start condition. This macro really ought to take a parameter,",
449 " * but we do it the disgusting crufty way forced on us by the ()-less",
450 " * definition of BEGIN.",
452 "#define BEGIN YY_G(yy_start) = 1 + 2 *",
455 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
457 "/* Translate the current start state into a value that can be later handed",
458 " * to BEGIN to return to the state. The YYSTATE alias is for lex",
461 "#define YY_START ((YY_G(yy_start) - 1) / 2)",
462 "#define YYSTATE YY_START",
465 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
467 "/* Action number for EOF rule of a given start state. */",
468 "#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)",
471 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
473 "/* Special action meaning \"start processing a new file\". */",
474 "#define YY_NEW_FILE yyrestart( yyin M4_YY_CALL_LAST_ARG )",
477 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
479 "#define YY_END_OF_BUFFER_CHAR 0",
482 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
484 "/* Size of default input buffer. */",
485 "#ifndef YY_BUF_SIZE",
486 "#define YY_BUF_SIZE 16384",
489 "/* The state buf must be large enough to hold one state per character in the main buffer.",
491 "#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))",
495 "#ifndef YY_TYPEDEF_YY_BUFFER_STATE",
496 "#define YY_TYPEDEF_YY_BUFFER_STATE",
497 "typedef struct yy_buffer_state *YY_BUFFER_STATE;",
501 "extern int yyleng;",
506 "extern FILE *yyin, *yyout;",
510 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
512 "#define EOB_ACT_CONTINUE_SCAN 0",
513 "#define EOB_ACT_END_OF_FILE 1",
514 "#define EOB_ACT_LAST_MATCH 2",
517 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
519 " m4_ifdef( [[M4_YY_USE_LINENO]],",
521 " /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires",
522 " * access to the local variable yy_act. Since yyless() is a macro, it would break",
523 " * existing scanners that call yyless() from OUTSIDE yylex. ",
524 " * One obvious solution it to make yy_act a global. I tried that, and saw",
525 " * a 5% performance hit in a non-yylineno scanner, because yy_act is",
526 " * normally declared as a register variable-- so it is not worth it.",
528 " #define YY_LESS_LINENO(n) \\",
531 " for ( yyl = n; yyl < yyleng; ++yyl )\\",
532 " if ( yytext[yyl] == '\\n' )\\",
537 " #define YY_LESS_LINENO(n)",
541 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
543 "/* Return all but the first \"n\" matched characters back to the input stream. */",
544 "#define yyless(n) \\",
547 " /* Undo effects of setting up yytext. */ \\",
548 " int yyless_macro_arg = (n); \\",
549 " YY_LESS_LINENO(yyless_macro_arg);\\",
550 " *yy_cp = YY_G(yy_hold_char); \\",
551 " YY_RESTORE_YY_MORE_OFFSET \\",
552 " YY_G(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \\",
553 " YY_DO_BEFORE_ACTION; /* set up yytext again */ \\",
558 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
560 "#define unput(c) yyunput( c, YY_G(yytext_ptr) M4_YY_CALL_LAST_ARG )",
563 "/* The following is because we cannot portably get our hands on size_t",
564 " * (without autoconf's help, which isn't available because we want",
565 " * flex-generated scanners to compile on their own).",
568 "#ifndef YY_TYPEDEF_YY_SIZE_T",
569 "#define YY_TYPEDEF_YY_SIZE_T",
570 "typedef unsigned int yy_size_t;",
573 "#ifndef YY_STRUCT_YY_BUFFER_STATE",
574 "#define YY_STRUCT_YY_BUFFER_STATE",
575 "struct yy_buffer_state",
578 " FILE *yy_input_file;",
582 " std::istream* yy_input_file;",
586 " char *yy_ch_buf; /* input buffer */",
587 " char *yy_buf_pos; /* current position in input buffer */",
589 " /* Size of input buffer in bytes, not including room for EOB",
592 " yy_size_t yy_buf_size;",
594 " /* Number of characters read into yy_ch_buf, not including EOB",
599 " /* Whether we \"own\" the buffer - i.e., we know we created it,",
600 " * and can realloc() it to grow it, and should free() it to",
603 " int yy_is_our_buffer;",
605 " /* Whether this is an \"interactive\" input source; if so, and",
606 " * if we're using stdio for input, then we want to use getc()",
607 " * instead of fread(), to make sure we stop fetching input after",
610 " int yy_is_interactive;",
612 " /* Whether we're considered to be at the beginning of a line.",
613 " * If so, '^' rules will be active on the next match, otherwise",
618 " int yy_bs_lineno; /**< The line count. */",
619 " int yy_bs_column; /**< The column count. */",
622 " /* Whether to try to fill the input buffer when we reach the",
625 " int yy_fill_buffer;",
627 " int yy_buffer_status;",
628 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
630 "#define YY_BUFFER_NEW 0",
631 "#define YY_BUFFER_NORMAL 1",
632 " /* When an EOF's been seen but there's still some text to process",
633 " * then we mark the buffer as YY_EOF_PENDING, to indicate that we",
634 " * shouldn't try reading from the input source any more. We might",
635 " * still have a bunch of tokens to match, though, because of",
636 " * possible backing-up.",
638 " * When we actually see the EOF, we change the status to \"new\"",
639 " * (via yyrestart()), so that the user can continue scanning by",
640 " * just pointing yyin at a new input file.",
642 "#define YY_BUFFER_EOF_PENDING 2",
645 "#endif /* !YY_STRUCT_YY_BUFFER_STATE */",
647 "%if-c-only Standard (non-C++) definition",
651 "/* Stack of input buffers. */",
652 "static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */",
653 "static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */",
654 "static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */",
659 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
661 "/* We provide macros for accessing buffer states in case in the",
662 " * future we want to put the buffer states in a more general",
663 " * \"scanner state\".",
665 " * Returns the top of the stack, or NULL.",
667 "#define YY_CURRENT_BUFFER ( YY_G(yy_buffer_stack) \\",
668 " ? YY_G(yy_buffer_stack)[YY_G(yy_buffer_stack_top)] \\",
672 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
674 "/* Same as previous macro, but useful when we know that the buffer stack is not",
675 " * NULL or when we need an lvalue. For internal use only.",
677 "#define YY_CURRENT_BUFFER_LVALUE YY_G(yy_buffer_stack)[YY_G(yy_buffer_stack_top)]",
680 "%if-c-only Standard (non-C++) definition",
684 "/* yy_hold_char holds the character lost when yytext is formed. */",
685 "static char yy_hold_char;",
686 "static int yy_n_chars; /* number of characters read into yy_ch_buf */",
689 "/* Points to current character in buffer. */",
690 "static char *yy_c_buf_p = (char *) 0;",
691 "static int yy_init = 0; /* whether we need to initialize */",
692 "static int yy_start = 0; /* start state number */",
694 "/* Flag which is used to allow yywrap()'s to do buffer switches",
695 " * instead of setting up a fresh yyin. A bit of a hack ...",
697 "static int yy_did_buffer_switch_on_eof;",
701 "void yyrestart M4_YY_PARAMS( FILE *input_file M4_YY_PROTO_LAST_ARG );",
702 "void yy_switch_to_buffer M4_YY_PARAMS( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG );",
703 "YY_BUFFER_STATE yy_create_buffer M4_YY_PARAMS( FILE *file, int size M4_YY_PROTO_LAST_ARG );",
704 "void yy_delete_buffer M4_YY_PARAMS( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG );",
705 "void yy_flush_buffer M4_YY_PARAMS( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG );",
706 "void yypush_buffer_state M4_YY_PARAMS( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG );",
707 "void yypop_buffer_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
709 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
711 "static void yyensure_buffer_stack M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
712 "static void yy_load_buffer_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
713 "static void yy_init_buffer M4_YY_PARAMS( YY_BUFFER_STATE b, FILE *file M4_YY_PROTO_LAST_ARG );",
716 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
718 "#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG)",
721 "YY_BUFFER_STATE yy_scan_buffer M4_YY_PARAMS( char *base, yy_size_t size M4_YY_PROTO_LAST_ARG );",
722 "YY_BUFFER_STATE yy_scan_string M4_YY_PARAMS( yyconst char *yy_str M4_YY_PROTO_LAST_ARG );",
723 "YY_BUFFER_STATE yy_scan_bytes M4_YY_PARAMS( yyconst char *bytes, int len M4_YY_PROTO_LAST_ARG );",
727 "void *yyalloc M4_YY_PARAMS( yy_size_t M4_YY_PROTO_LAST_ARG );",
728 "void *yyrealloc M4_YY_PARAMS( void *, yy_size_t M4_YY_PROTO_LAST_ARG );",
729 "void yyfree M4_YY_PARAMS( void * M4_YY_PROTO_LAST_ARG );",
731 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
733 "#define yy_new_buffer yy_create_buffer",
736 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
738 "#define yy_set_interactive(is_interactive) \\",
740 " if ( ! YY_CURRENT_BUFFER ){ \\",
741 " yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); \\",
742 " YY_CURRENT_BUFFER_LVALUE = \\",
743 " yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); \\",
745 " YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \\",
749 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
751 "#define yy_set_bol(at_bol) \\",
753 " if ( ! YY_CURRENT_BUFFER ){\\",
754 " yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); \\",
755 " YY_CURRENT_BUFFER_LVALUE = \\",
756 " yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); \\",
758 " YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \\",
762 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
764 "#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)",
767 "%% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here",
769 "%if-c-only Standard (non-C++) definition",
771 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
773 "static yy_state_type yy_get_previous_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
774 "static yy_state_type yy_try_NUL_trans M4_YY_PARAMS( yy_state_type current_state M4_YY_PROTO_LAST_ARG);",
775 "static int yy_get_next_buffer M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
776 "static void yy_fatal_error M4_YY_PARAMS( yyconst char msg[] M4_YY_PROTO_LAST_ARG );",
781 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
783 "/* Done after the current pattern has been matched and before the",
784 " * corresponding action - sets up yytext.",
786 "#define YY_DO_BEFORE_ACTION \\",
787 " YY_G(yytext_ptr) = yy_bp; \\",
788 "%% [2.0] code to fiddle yytext and yyleng for yymore() goes here \\",
789 " YY_G(yy_hold_char) = *yy_cp; \\",
790 " *yy_cp = '\\0'; \\",
791 "%% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \\",
792 " YY_G(yy_c_buf_p) = yy_cp;",
795 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
797 "%% [4.0] data tables for the DFA and the user's section 1 definitions go here",
800 "m4_ifdef( [[M4_YY_IN_HEADER]], [[#ifdef YY_HEADER_EXPORT_START_CONDITIONS]])",
802 "m4_ifdef( [[M4_YY_IN_HEADER]], [[#endif]])",
804 "m4_ifdef( [[M4_YY_NO_UNISTD_H]],,",
806 "#ifndef YY_NO_UNISTD_H",
807 "/* Special case for \"unistd.h\", since it is non-ANSI. We include it way",
808 " * down here because we want the user's section 1 to have been scanned first.",
809 " * The user has a chance to override it with an option.",
812 "#include <unistd.h>",
815 "#include <unistd.h>",
820 "#ifndef YY_EXTRA_TYPE",
821 "#define YY_EXTRA_TYPE void *",
824 "%if-c-only Reentrant structure and macros (non-C++).",
827 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
829 "/* Holds the entire state of the reentrant scanner. */",
833 " /* User-defined. Not touched by flex. */",
834 " YY_EXTRA_TYPE yyextra_r;",
836 " /* The rest are the same as the globals declared in the non-reentrant scanner. */",
837 " FILE *yyin_r, *yyout_r;",
838 " size_t yy_buffer_stack_top; /**< index of top of stack. */",
839 " size_t yy_buffer_stack_max; /**< capacity of stack. */",
840 " YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */",
841 " char yy_hold_char;",
844 " char *yy_c_buf_p;",
847 " int yy_did_buffer_switch_on_eof;",
848 " int yy_start_stack_ptr;",
849 " int yy_start_stack_depth;",
850 " int *yy_start_stack;",
851 " yy_state_type yy_last_accepting_state;",
852 " char* yy_last_accepting_cpos;",
855 " int yy_flex_debug_r;",
857 "m4_ifdef( [[M4_YY_USES_REJECT]],",
859 " yy_state_type *yy_state_buf;",
860 " yy_state_type *yy_state_ptr;",
861 " char *yy_full_match;",
865 "m4_ifdef( [[M4_YY_TEXT_IS_ARRAY]],",
867 " char yytext_r[YYLMAX];",
868 " char *yytext_ptr;",
869 " int yy_more_offset;",
870 " int yy_prev_more_offset;",
874 " int yy_more_flag;",
878 "m4_ifdef( [[M4_YY_BISON_LVAL]],",
880 " YYSTYPE * yylval_r;",
883 "m4_ifdef( [[<M4_YY_BISON_LLOC>]],",
885 " YYLTYPE * yylloc_r;",
888 " }; /* end struct yyguts_t */",
893 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
895 "static int yy_init_globals M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
901 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
903 " m4_ifdef( [[M4_YY_BISON_LVAL]],",
905 " /* This must go here because YYSTYPE and YYLTYPE are included",
906 " * from bison output in section 1.*/",
907 " # define yylval YY_G(yylval_r)",
910 " m4_ifdef( [[<M4_YY_BISON_LLOC>]],",
912 " # define yylloc YY_G(yylloc_r)",
918 "/* Accessor methods to globals.",
919 " These are made visible to non-reentrant scanners for convenience. */",
921 "m4_ifdef( [[M4_YY_NO_DESTROY]],,",
923 "int yylex_destroy M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
926 "m4_ifdef( [[M4_YY_NO_GET_DEBUG]],,",
928 "int yyget_debug M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
931 "m4_ifdef( [[M4_YY_NO_SET_DEBUG]],,",
933 "void yyset_debug M4_YY_PARAMS( int debug_flag M4_YY_PROTO_LAST_ARG );",
936 "m4_ifdef( [[M4_YY_NO_GET_EXTRA]],,",
938 "YY_EXTRA_TYPE yyget_extra M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
941 "m4_ifdef( [[M4_YY_NO_SET_EXTRA]],,",
943 "void yyset_extra M4_YY_PARAMS( YY_EXTRA_TYPE user_defined M4_YY_PROTO_LAST_ARG );",
946 "m4_ifdef( [[M4_YY_NO_GET_IN]],,",
948 "FILE *yyget_in M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
951 "m4_ifdef( [[M4_YY_NO_SET_IN]],,",
953 "void yyset_in M4_YY_PARAMS( FILE * in_str M4_YY_PROTO_LAST_ARG );",
956 "m4_ifdef( [[M4_YY_NO_GET_OUT]],,",
958 "FILE *yyget_out M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
961 "m4_ifdef( [[M4_YY_NO_SET_OUT]],,",
963 "void yyset_out M4_YY_PARAMS( FILE * out_str M4_YY_PROTO_LAST_ARG );",
966 "m4_ifdef( [[M4_YY_NO_GET_LENG]],,",
968 "int yyget_leng M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
971 "m4_ifdef( [[M4_YY_NO_GET_TEXT]],,",
973 "char *yyget_text M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
976 "m4_ifdef( [[M4_YY_NO_GET_LINENO]],,",
978 "int yyget_lineno M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
981 "m4_ifdef( [[M4_YY_NO_SET_LINENO]],,",
983 "void yyset_lineno M4_YY_PARAMS( int line_number M4_YY_PROTO_LAST_ARG );",
987 "m4_ifdef( [[M4_YY_NO_GET_LVAL]],,",
989 "YYSTYPE * yyget_lval M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
992 "void yyset_lval M4_YY_PARAMS( YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG );",
994 "m4_ifdef( [[<M4_YY_BISON_LLOC>]],",
996 " m4_ifdef( [[M4_YY_NO_GET_LLOC]],,",
998 " YYLTYPE *yyget_lloc M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
1001 " m4_ifdef( [[M4_YY_NO_SET_LLOC]],,",
1003 " void yyset_lloc M4_YY_PARAMS( YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG );",
1007 "%endif End reentrant structures and macros.",
1009 "/* Macros after this point can all be overridden by user definitions in",
1013 "#ifndef YY_SKIP_YYWRAP",
1014 "#ifdef __cplusplus",
1015 "extern \"C\" int yywrap M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
1017 "extern int yywrap M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
1022 " m4_ifdef( [[M4_YY_NO_UNPUT]],,",
1024 " static void yyunput M4_YY_PARAMS( int c, char *buf_ptr M4_YY_PROTO_LAST_ARG);",
1029 "#ifndef yytext_ptr",
1030 "static void yy_flex_strncpy M4_YY_PARAMS( char *, yyconst char *, int M4_YY_PROTO_LAST_ARG);",
1033 "#ifdef YY_NEED_STRLEN",
1034 "static int yy_flex_strlen M4_YY_PARAMS( yyconst char * M4_YY_PROTO_LAST_ARG);",
1037 "#ifndef YY_NO_INPUT",
1038 "%if-c-only Standard (non-C++) definition",
1040 "#ifdef __cplusplus",
1041 "static int yyinput M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
1043 "static int input M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
1051 "%# TODO: This is messy.",
1052 "m4_ifdef( [[M4_YY_STACK_USED]],",
1055 "m4_ifdef( [[M4_YY_NOT_REENTRANT]],",
1057 " m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
1059 " static int yy_start_stack_ptr = 0;",
1060 " static int yy_start_stack_depth = 0;",
1061 " static int *yy_start_stack = NULL;",
1065 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
1067 " m4_ifdef( [[M4_YY_NO_PUSH_STATE]],,",
1069 " static void yy_push_state M4_YY_PARAMS( int new_state M4_YY_PROTO_LAST_ARG);",
1071 " m4_ifdef( [[M4_YY_NO_POP_STATE]],,",
1073 " static void yy_pop_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
1075 " m4_ifdef( [[M4_YY_NO_TOP_STATE]],,",
1077 " static int yy_top_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );",
1083 "m4_define( [[M4_YY_NO_PUSH_STATE]])",
1084 "m4_define( [[M4_YY_NO_POP_STATE]])",
1085 "m4_define( [[M4_YY_NO_TOP_STATE]])",
1089 "/* Amount of stuff to slurp up with each read. */",
1090 "#ifndef YY_READ_BUF_SIZE",
1091 "#define YY_READ_BUF_SIZE 8192",
1094 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
1096 "/* Copy whatever the last rule matched to the standard output. */",
1098 "%if-c-only Standard (non-C++) definition",
1099 "/* This used to be an fputs(), but since the string might contain NUL's,",
1100 " * we now use fwrite().",
1102 "#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )",
1104 "%if-c++-only C++ definition",
1105 "#define ECHO LexerOutput( yytext, yyleng )",
1110 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
1112 "/* Gets input and stuffs it into \"buf\". number of characters read, or YY_NULL,",
1113 " * is returned in \"result\".",
1116 "#define YY_INPUT(buf,result,max_size) \\",
1117 "%% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \\",
1119 "%if-c++-only C++ definition \\",
1120 " if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \\",
1121 " YY_FATAL_ERROR( \"input in flex scanner failed\" );",
1127 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
1129 "/* No semi-colon after return; correct usage is to write \"yyterminate();\" -",
1130 " * we don't want an extra ';' after the \"return\" because that will cause",
1131 " * some compilers to complain about unreachable statements.",
1133 "#ifndef yyterminate",
1134 "#define yyterminate() return YY_NULL",
1138 "/* Number of entries by which start-condition stack grows. */",
1139 "#ifndef YY_START_STACK_INCR",
1140 "#define YY_START_STACK_INCR 25",
1143 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
1145 "/* Report a fatal error. */",
1146 "#ifndef YY_FATAL_ERROR",
1148 "#define YY_FATAL_ERROR(msg) yy_fatal_error( msg M4_YY_CALL_LAST_ARG)",
1151 "#define YY_FATAL_ERROR(msg) LexerError( msg )",
1156 "%if-tables-serialization structures and prototypes",
1157 "#ifdef FLEX_SCANNER",
1159 "dnl tables_shared.h - tables serialization header",
1161 "dnl Copyright (c) 1990 The Regents of the University of California.",
1162 "dnl All rights reserved.",
1164 "dnl This code is derived from software contributed to Berkeley by",
1167 "dnl The United States Government has rights in this work pursuant",
1168 "dnl to contract no. DE-AC03-76SF00098 between the United States",
1169 "dnl Department of Energy and the University of California.",
1171 "dnl This file is part of flex.",
1173 "dnl Redistribution and use in source and binary forms, with or without",
1174 "dnl modification, are permitted provided that the following conditions",
1177 "dnl 1. Redistributions of source code must retain the above copyright",
1178 "dnl notice, this list of conditions and the following disclaimer.",
1179 "dnl 2. Redistributions in binary form must reproduce the above copyright",
1180 "dnl notice, this list of conditions and the following disclaimer in the",
1181 "dnl documentation and/or other materials provided with the distribution.",
1183 "dnl Neither the name of the University nor the names of its contributors",
1184 "dnl may be used to endorse or promote products derived from this software",
1185 "dnl without specific prior written permission.",
1187 "dnl THIS SOFTWARE IS PROVIDED `AS IS' AND WITHOUT ANY EXPRESS OR",
1188 "dnl IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED",
1189 "dnl WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR",
1193 "dnl This file is meant to be included in both the skeleton and the actual",
1194 "dnl flex code (hence the name \"_shared\").",
1196 "#ifndef yyskel_static",
1197 "#define yyskel_static static",
1200 "#ifndef yyskel_static",
1201 "#define yyskel_static",
1205 "/* Structures and prototypes for serializing flex tables. The",
1206 " * binary format is documented in the manual.",
1208 " * Design considerations:",
1210 " * - The format allows many tables per file.",
1211 " * - The tables can be streamed.",
1212 " * - All data is stored in network byte order.",
1213 " * - We do not hinder future unicode support.",
1214 " * - We can lookup tables by name.",
1217 "/** Magic number for serialized format. */",
1218 "#ifndef YYTBL_MAGIC",
1219 "#define YYTBL_MAGIC 0xF13C57B1",
1222 "/** Calculate (0-7) = number bytes needed to pad n to next 64-bit boundary. */",
1224 "#define yypad64(n) ((8-((n)%8))%8)",
1228 "#ifndef YYTABLES_TYPES",
1229 "#define YYTABLES_TYPES",
1230 "/** Possible values for td_id field. Each one corresponds to a",
1231 " * scanner table of the same name.",
1234 " YYTD_ID_ACCEPT = 0x01, /**< 1-dim ints */",
1235 " YYTD_ID_BASE = 0x02, /**< 1-dim ints */",
1236 " YYTD_ID_CHK = 0x03, /**< 1-dim ints */",
1237 " YYTD_ID_DEF = 0x04, /**< 1-dim ints */",
1238 " YYTD_ID_EC = 0x05, /**< 1-dim ints */",
1239 " YYTD_ID_META = 0x06, /**< 1-dim ints */",
1240 " YYTD_ID_NUL_TRANS = 0x07, /**< 1-dim ints, maybe indices */",
1241 " YYTD_ID_NXT = 0x08, /**< may be 2 dimensional ints */",
1242 " YYTD_ID_RULE_CAN_MATCH_EOL = 0x09, /**< 1-dim ints */",
1243 " YYTD_ID_START_STATE_LIST = 0x0A, /**< 1-dim indices into trans tbl */",
1244 " YYTD_ID_TRANSITION = 0x0B, /**< structs */",
1245 " YYTD_ID_ACCLIST = 0x0C /**< 1-dim ints */",
1248 "/** bit flags for t_flags field of struct yytbl_data */",
1249 "enum yytbl_flags {",
1250 " /* These first three are mutually exclusive */",
1251 " YYTD_DATA8 = 0x01, /**< data is an array of type flex_int8_t */",
1252 " YYTD_DATA16 = 0x02, /**< data is an array of type flex_int16_t */",
1253 " YYTD_DATA32 = 0x04, /**< data is an array of type flex_int32_t */",
1255 " /* These two are mutually exclusive. */",
1256 " YYTD_PTRANS = 0x08, /**< data is a list of indexes of entries",
1257 " into the expanded yy_transition",
1258 " array. See notes in manual. */",
1259 " YYTD_STRUCT = 0x10 /**< data consists of yy_trans_info structs */",
1262 "/* The serialized tables header. */",
1263 "struct yytbl_hdr {",
1264 " flex_uint32_t th_magic; /**< Must be 0xF13C57B1 (comes from \"Flex Table\") */",
1265 " flex_uint32_t th_hsize; /**< Size of this header in bytes. */",
1266 " flex_uint32_t th_ssize; /**< Size of this dataset, in bytes, including header. */",
1267 " flex_uint16_t th_flags; /**< Currently unused, must be 0 */",
1268 " char *th_version; /**< Flex version string. NUL terminated. */",
1269 " char *th_name; /**< The name of this table set. NUL terminated. */",
1272 "/** A single serialized table */",
1273 "struct yytbl_data {",
1274 " flex_uint16_t td_id; /**< enum yytbl_id table identifier */",
1275 " flex_uint16_t td_flags; /**< how to interpret this data */",
1276 " flex_uint32_t td_hilen; /**< num elements in highest dimension array */",
1277 " flex_uint32_t td_lolen; /**< num elements in lowest dimension array */",
1278 " void *td_data; /**< table data */",
1282 "/** Extract corresponding data size_t from td_flags */",
1283 "#ifndef YYTDFLAGS2BYTES",
1284 "#define YYTDFLAGS2BYTES(td_flags)\\",
1285 " (((td_flags) & YYTD_DATA8)\\",
1286 " ? sizeof(flex_int8_t)\\",
1287 " :(((td_flags) & YYTD_DATA16)\\",
1288 " ? sizeof(flex_int16_t)\\",
1289 " :sizeof(flex_int32_t)))",
1292 "#ifdef FLEX_SCANNER",
1295 "yyskel_static flex_int32_t yytbl_calc_total_len (const struct yytbl_data *tbl);",
1296 "#ifdef FLEX_SCANNER",
1300 "/* vim:set noexpandtab cindent tabstop=8 softtabstop=0 shiftwidth=8 textwidth=0: */",
1303 "/* Load the DFA tables from the given stream. */",
1304 "int yytables_fload M4_YY_PARAMS(FILE * fp M4_YY_PROTO_LAST_ARG);",
1306 "/* Unload the tables from memory. */",
1307 "int yytables_destroy M4_YY_PARAMS(M4_YY_PROTO_ONLY_ARG);",
1310 "/** Describes a mapping from a serialized table id to its deserialized state in",
1311 " * this scanner. This is the bridge between our \"generic\" deserialization code",
1312 " * and the specifics of this scanner. ",
1314 "struct yytbl_dmap {",
1315 " enum yytbl_id dm_id;/**< table identifier */",
1316 " void **dm_arr; /**< address of pointer to store the deserialized table. */",
1317 " size_t dm_sz; /**< local sizeof() each element in table. */",
1320 "/** A {0,0,0}-terminated list of structs, forming the map */",
1321 "static struct yytbl_dmap yydmap[] =",
1323 "%tables-yydmap generated elements",
1327 "/** A tables-reader object to maintain some state in the read. */",
1328 "struct yytbl_reader {",
1329 " FILE * fp; /**< input stream */",
1330 " flex_uint32_t bread; /**< bytes read since beginning of current tableset */",
1334 "/* end tables serialization structures and prototypes */",
1338 "/* Default declaration of generated scanner - a define so the user can",
1339 " * easily add parameters.",
1342 "#define YY_DECL_IS_OURS 1",
1343 "%if-c-only Standard (non-C++) definition",
1346 "m4_define( [[M4_YY_LEX_PROTO]], [[M4_YY_PARAMS(M4_YY_PROTO_ONLY_ARG)]])",
1347 "m4_define( [[M4_YY_LEX_DECLARATION]], [[YYFARGS0(void)]])",
1349 "m4_ifdef( [[M4_YY_BISON_LVAL]],",
1351 " m4_dnl The bison pure parser is used. Redefine yylex to",
1352 " m4_dnl accept the lval parameter.",
1354 " m4_define( [[M4_YY_LEX_PROTO]],",
1355 " [[M4_YY_PARAMS(YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG)]])",
1356 " m4_define( [[M4_YY_LEX_DECLARATION]],",
1357 " [[YYFARGS1(YYSTYPE *,yylval_param)]])",
1360 "m4_ifdef( [[<M4_YY_BISON_LLOC>]],",
1362 " m4_dnl Locations are used. yylex should also accept the ylloc parameter.",
1364 " m4_define( [[M4_YY_LEX_PROTO]],",
1365 " [[M4_YY_PARAMS(YYSTYPE * yylval_param, YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG)]])",
1366 " m4_define( [[M4_YY_LEX_DECLARATION]],",
1367 " [[YYFARGS2(YYSTYPE *,yylval_param, YYLTYPE *,yylloc_param)]])",
1370 "extern int yylex M4_YY_LEX_PROTO;",
1372 "#define YY_DECL int yylex M4_YY_LEX_DECLARATION",
1374 "%if-c++-only C++ definition",
1375 "#define YY_DECL int yyFlexLexer::yylex()",
1377 "#endif /* !YY_DECL */",
1379 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
1381 "/* Code executed at the beginning of each rule, after yytext and yyleng",
1382 " * have been set up.",
1384 "#ifndef YY_USER_ACTION",
1385 "#define YY_USER_ACTION",
1389 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
1391 "/* Code executed at the end of each rule. */",
1393 "#define YY_BREAK break;",
1397 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
1399 "%% [6.0] YY_RULE_SETUP definition goes here",
1403 "/** The main scanner function which does all the work.",
1407 " register yy_state_type yy_current_state;",
1408 " register char *yy_cp, *yy_bp;",
1409 " register int yy_act;",
1410 " M4_YY_DECL_GUTS_VAR();",
1412 "m4_ifdef( [[M4_YY_NOT_REENTRANT]],",
1414 " m4_ifdef( [[M4_YY_BISON_LVAL]],",
1416 " YYSTYPE * yylval;",
1418 " m4_ifdef( [[<M4_YY_BISON_LLOC>]],",
1420 " YYLTYPE * yylloc;",
1424 "%% [7.0] user's declarations go here",
1426 "m4_ifdef( [[M4_YY_BISON_LVAL]],",
1428 " yylval = yylval_param;",
1431 "m4_ifdef( [[<M4_YY_BISON_LLOC>]],",
1433 " yylloc = yylloc_param;",
1436 " if ( !YY_G(yy_init) )",
1438 " YY_G(yy_init) = 1;",
1440 "#ifdef YY_USER_INIT",
1444 "m4_ifdef( [[M4_YY_USES_REJECT]],",
1446 " /* Create the reject buffer large enough to save one state per allowed character. */",
1447 " if ( ! YY_G(yy_state_buf) )",
1448 " YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE M4_YY_CALL_LAST_ARG);",
1451 " if ( ! YY_G(yy_start) )",
1452 " YY_G(yy_start) = 1; /* first start state */",
1459 " yyin = & std::cin;",
1467 " yyout = & std::cout;",
1470 " if ( ! YY_CURRENT_BUFFER ) {",
1471 " yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG);",
1472 " YY_CURRENT_BUFFER_LVALUE =",
1473 " yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG);",
1476 " yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );",
1479 " while ( 1 ) /* loops until end-of-file is reached */",
1481 "%% [8.0] yymore()-related code goes here",
1482 " yy_cp = YY_G(yy_c_buf_p);",
1484 " /* Support of yytext. */",
1485 " *yy_cp = YY_G(yy_hold_char);",
1487 " /* yy_bp points to the position in yy_ch_buf of the start of",
1488 " * the current run.",
1492 "%% [9.0] code to set up and find next match goes here",
1495 "%% [10.0] code to find the action number goes here",
1497 " YY_DO_BEFORE_ACTION;",
1499 "%% [11.0] code for yylineno update goes here",
1501 "do_action: /* This label is used only to access EOF actions. */",
1503 "%% [12.0] debug code goes here",
1505 " switch ( yy_act )",
1506 " { /* beginning of action switch */",
1507 "%% [13.0] actions go here",
1509 " case YY_END_OF_BUFFER:",
1511 " /* Amount of text matched not including the EOB char. */",
1512 " int yy_amount_of_matched_text = (int) (yy_cp - YY_G(yytext_ptr)) - 1;",
1514 " /* Undo the effects of YY_DO_BEFORE_ACTION. */",
1515 " *yy_cp = YY_G(yy_hold_char);",
1516 " YY_RESTORE_YY_MORE_OFFSET",
1518 " if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )",
1520 " /* We're scanning a new file or input source. It's",
1521 " * possible that this happened because the user",
1522 " * just pointed yyin at a new source and called",
1523 " * yylex(). If so, then we have to assure",
1524 " * consistency between YY_CURRENT_BUFFER and our",
1525 " * globals. Here is the right place to do so, because",
1526 " * this is the first action (other than possibly a",
1527 " * back-up) that will match for the new input source.",
1529 " YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;",
1530 " YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;",
1531 " YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;",
1534 " /* Note that here we test for yy_c_buf_p \"<=\" to the position",
1535 " * of the first EOB in the buffer, since yy_c_buf_p will",
1536 " * already have been incremented past the NUL character",
1537 " * (since all states make transitions on EOB to the",
1538 " * end-of-buffer state). Contrast this with the test",
1541 " if ( YY_G(yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] )",
1542 " { /* This was really a NUL. */",
1543 " yy_state_type yy_next_state;",
1545 " YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + yy_amount_of_matched_text;",
1547 " yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG );",
1549 " /* Okay, we're now positioned to make the NUL",
1550 " * transition. We couldn't have",
1551 " * yy_get_previous_state() go ahead and do it",
1552 " * for us because it doesn't know how to deal",
1553 " * with the possibility of jamming (and we don't",
1554 " * want to build jamming into it because then it",
1555 " * will run more slowly).",
1558 " yy_next_state = yy_try_NUL_trans( yy_current_state M4_YY_CALL_LAST_ARG);",
1560 " yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ;",
1562 " if ( yy_next_state )",
1564 " /* Consume the NUL. */",
1565 " yy_cp = ++YY_G(yy_c_buf_p);",
1566 " yy_current_state = yy_next_state;",
1572 "%% [14.0] code to do back-up for compressed tables and set up yy_cp goes here",
1573 " goto yy_find_action;",
1577 " else switch ( yy_get_next_buffer( M4_YY_CALL_ONLY_ARG ) )",
1579 " case EOB_ACT_END_OF_FILE:",
1581 " YY_G(yy_did_buffer_switch_on_eof) = 0;",
1583 " if ( yywrap( M4_YY_CALL_ONLY_ARG ) )",
1585 " /* Note: because we've taken care in",
1586 " * yy_get_next_buffer() to have set up",
1587 " * yytext, we can now set up",
1588 " * yy_c_buf_p so that if some total",
1589 " * hoser (like flex itself) wants to",
1590 " * call the scanner after we return the",
1591 " * YY_NULL, it'll still work - another",
1592 " * YY_NULL will get returned.",
1594 " YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + YY_MORE_ADJ;",
1596 " yy_act = YY_STATE_EOF(YY_START);",
1602 " if ( ! YY_G(yy_did_buffer_switch_on_eof) )",
1608 " case EOB_ACT_CONTINUE_SCAN:",
1609 " YY_G(yy_c_buf_p) =",
1610 " YY_G(yytext_ptr) + yy_amount_of_matched_text;",
1612 " yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG );",
1614 " yy_cp = YY_G(yy_c_buf_p);",
1615 " yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ;",
1618 " case EOB_ACT_LAST_MATCH:",
1619 " YY_G(yy_c_buf_p) =",
1620 " &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)];",
1622 " yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG );",
1624 " yy_cp = YY_G(yy_c_buf_p);",
1625 " yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ;",
1626 " goto yy_find_action;",
1633 " \"fatal flex scanner internal error--no action found\" );",
1634 " } /* end of action switch */",
1635 " } /* end of scanning one token */",
1636 "} /* end of yylex */",
1641 "yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )",
1643 " yyin = arg_yyin;",
1644 " yyout = arg_yyout;",
1648 " yy_flex_debug = 0;",
1649 " yylineno = 1; // this will only get updated if %option yylineno",
1651 " yy_did_buffer_switch_on_eof = 0;",
1653 " yy_looking_for_trail_begin = 0;",
1654 " yy_more_flag = 0;",
1655 " yy_more_len = 0;",
1656 " yy_more_offset = yy_prev_more_offset = 0;",
1658 " yy_start_stack_ptr = yy_start_stack_depth = 0;",
1659 " yy_start_stack = NULL;",
1661 " YY_G(yy_buffer_stack) = 0;",
1662 " YY_G(yy_buffer_stack_top) = 0;",
1663 " YY_G(yy_buffer_stack_max) = 0;",
1666 "m4_ifdef( [[M4_YY_USES_REJECT]],",
1668 " yy_state_buf = new yy_state_type[YY_STATE_BUF_SIZE];",
1671 " yy_state_buf = 0;",
1675 "yyFlexLexer::~yyFlexLexer()",
1677 " delete [] yy_state_buf;",
1678 " yyfree( yy_start_stack M4_YY_CALL_LAST_ARG );",
1679 " yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG);",
1682 "void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )",
1686 " yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG);",
1687 " yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE M4_YY_CALL_LAST_ARG) M4_YY_CALL_LAST_ARG);",
1691 " yyout = new_out;",
1694 "#ifdef YY_INTERACTIVE",
1695 "int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )",
1697 "int yyFlexLexer::LexerInput( char* buf, int max_size )",
1700 " if ( yyin->eof() || yyin->fail() )",
1703 "#ifdef YY_INTERACTIVE",
1704 " yyin->get( buf[0] );",
1706 " if ( yyin->eof() )",
1709 " if ( yyin->bad() )",
1715 " (void) yyin->read( buf, max_size );",
1717 " if ( yyin->bad() )",
1720 " return yyin->gcount();",
1724 "void yyFlexLexer::LexerOutput( const char* buf, int size )",
1726 " (void) yyout->write( buf, size );",
1731 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
1733 "/* yy_get_next_buffer - try to read in a new buffer",
1735 " * Returns a code representing an action:",
1736 " * EOB_ACT_LAST_MATCH -",
1737 " * EOB_ACT_CONTINUE_SCAN - continue scanning from current position",
1738 " * EOB_ACT_END_OF_FILE - end of file",
1741 "static int yy_get_next_buffer YYFARGS0(void)",
1744 "int yyFlexLexer::yy_get_next_buffer()",
1747 " M4_YY_DECL_GUTS_VAR();",
1748 " register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;",
1749 " register char *source = YY_G(yytext_ptr);",
1750 " register int number_to_move, i;",
1753 " if ( YY_G(yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] )",
1755 " \"fatal flex scanner internal error--end of buffer missed\" );",
1757 " if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )",
1758 " { /* Don't try to fill the buffer, so this is an EOF. */",
1759 " if ( YY_G(yy_c_buf_p) - YY_G(yytext_ptr) - YY_MORE_ADJ == 1 )",
1761 " /* We matched a single character, the EOB, so",
1762 " * treat this as a final EOF.",
1764 " return EOB_ACT_END_OF_FILE;",
1769 " /* We matched some text prior to the EOB, first",
1772 " return EOB_ACT_LAST_MATCH;",
1776 " /* Try to read more data. */",
1778 " /* First move last chars to start of buffer. */",
1779 " number_to_move = (int) (YY_G(yy_c_buf_p) - YY_G(yytext_ptr)) - 1;",
1781 " for ( i = 0; i < number_to_move; ++i )",
1782 " *(dest++) = *(source++);",
1784 " if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )",
1785 " /* don't do the read, it's not guaranteed to return an EOF,",
1786 " * just force an EOF",
1788 " YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars) = 0;",
1792 " int num_to_read =",
1793 " YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;",
1795 " while ( num_to_read <= 0 )",
1796 " { /* Not enough room in the buffer - grow it. */",
1797 "m4_ifdef( [[M4_YY_USES_REJECT]],",
1800 "\"input buffer overflow, can't enlarge buffer because scanner uses REJECT\" );",
1803 " /* just a shorter name for the current buffer */",
1804 " YY_BUFFER_STATE b = YY_CURRENT_BUFFER;",
1806 " int yy_c_buf_p_offset =",
1807 " (int) (YY_G(yy_c_buf_p) - b->yy_ch_buf);",
1809 " if ( b->yy_is_our_buffer )",
1811 " int new_size = b->yy_buf_size * 2;",
1813 " if ( new_size <= 0 )",
1814 " b->yy_buf_size += b->yy_buf_size / 8;",
1816 " b->yy_buf_size *= 2;",
1818 " b->yy_ch_buf = (char *)",
1819 " /* Include room in for 2 EOB chars. */",
1820 " yyrealloc( (void *) b->yy_ch_buf,",
1821 " b->yy_buf_size + 2 M4_YY_CALL_LAST_ARG );",
1824 " /* Can't grow it, we don't own it. */",
1825 " b->yy_ch_buf = 0;",
1827 " if ( ! b->yy_ch_buf )",
1829 " \"fatal error - scanner input buffer overflow\" );",
1831 " YY_G(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];",
1833 " num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -",
1834 " number_to_move - 1;",
1838 " if ( num_to_read > YY_READ_BUF_SIZE )",
1839 " num_to_read = YY_READ_BUF_SIZE;",
1841 " /* Read in more data. */",
1842 " YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),",
1843 " YY_G(yy_n_chars), num_to_read );",
1845 " YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars);",
1848 " if ( YY_G(yy_n_chars) == 0 )",
1850 " if ( number_to_move == YY_MORE_ADJ )",
1852 " ret_val = EOB_ACT_END_OF_FILE;",
1853 " yyrestart( yyin M4_YY_CALL_LAST_ARG);",
1858 " ret_val = EOB_ACT_LAST_MATCH;",
1859 " YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =",
1860 " YY_BUFFER_EOF_PENDING;",
1865 " ret_val = EOB_ACT_CONTINUE_SCAN;",
1867 " YY_G(yy_n_chars) += number_to_move;",
1868 " YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;",
1869 " YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;",
1871 " YY_G(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];",
1877 "/* yy_get_previous_state - get the state just before the EOB char was reached */",
1881 " static yy_state_type yy_get_previous_state YYFARGS0(void)",
1884 " yy_state_type yyFlexLexer::yy_get_previous_state()",
1887 " register yy_state_type yy_current_state;",
1888 " register char *yy_cp;",
1889 " M4_YY_DECL_GUTS_VAR();",
1891 "%% [15.0] code to get the start state into yy_current_state goes here",
1893 " for ( yy_cp = YY_G(yytext_ptr) + YY_MORE_ADJ; yy_cp < YY_G(yy_c_buf_p); ++yy_cp )",
1895 "%% [16.0] code to find the next state goes here",
1898 " return yy_current_state;",
1902 "/* yy_try_NUL_trans - try to make a transition on the NUL character",
1905 " * next_state = yy_try_NUL_trans( current_state );",
1908 " static yy_state_type yy_try_NUL_trans YYFARGS1( yy_state_type, yy_current_state)",
1911 " yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )",
1914 " register int yy_is_jam;",
1915 " M4_YY_DECL_GUTS_VAR(); /* This var may be unused depending upon options. */",
1916 "%% [17.0] code to find the next state, and perhaps do backing up, goes here",
1918 " return yy_is_jam ? 0 : yy_current_state;",
1923 "m4_ifdef( [[M4_YY_NO_UNPUT]],,",
1925 " static void yyunput YYFARGS2( int,c, register char *,yy_bp)",
1928 " void yyFlexLexer::yyunput( int c, register char* yy_bp)",
1931 " register char *yy_cp;",
1932 " M4_YY_DECL_GUTS_VAR();",
1934 " yy_cp = YY_G(yy_c_buf_p);",
1936 " /* undo effects of setting up yytext */",
1937 " *yy_cp = YY_G(yy_hold_char);",
1939 " if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )",
1940 " { /* need to shift things up to make room */",
1941 " /* +2 for EOB chars. */",
1942 " register int number_to_move = YY_G(yy_n_chars) + 2;",
1943 " register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[",
1944 " YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];",
1945 " register char *source =",
1946 " &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];",
1948 " while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )",
1949 " *--dest = *--source;",
1951 " yy_cp += (int) (dest - source);",
1952 " yy_bp += (int) (dest - source);",
1953 " YY_CURRENT_BUFFER_LVALUE->yy_n_chars =",
1954 " YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;",
1956 " if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )",
1957 " YY_FATAL_ERROR( \"flex scanner push-back overflow\" );",
1960 " *--yy_cp = (char) c;",
1962 "%% [18.0] update yylineno here",
1963 "m4_ifdef( [[M4_YY_USE_LINENO]],",
1965 " if ( c == '\\n' ){",
1970 " YY_G(yytext_ptr) = yy_bp;",
1971 " YY_G(yy_hold_char) = *yy_cp;",
1972 " YY_G(yy_c_buf_p) = yy_cp;",
1979 "#ifndef YY_NO_INPUT",
1980 "#ifdef __cplusplus",
1981 " static int yyinput YYFARGS0(void)",
1983 " static int input YYFARGS0(void)",
1988 " int yyFlexLexer::yyinput()",
1992 " M4_YY_DECL_GUTS_VAR();",
1994 " *YY_G(yy_c_buf_p) = YY_G(yy_hold_char);",
1996 " if ( *YY_G(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )",
1998 " /* yy_c_buf_p now points to the character we want to return.",
1999 " * If this occurs *before* the EOB characters, then it's a",
2000 " * valid NUL; if not, then we've hit the end of the buffer.",
2002 " if ( YY_G(yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] )",
2003 " /* This was really a NUL. */",
2004 " *YY_G(yy_c_buf_p) = '\\0';",
2007 " { /* need more input */",
2008 " int offset = YY_G(yy_c_buf_p) - YY_G(yytext_ptr);",
2009 " ++YY_G(yy_c_buf_p);",
2011 " switch ( yy_get_next_buffer( M4_YY_CALL_ONLY_ARG ) )",
2013 " case EOB_ACT_LAST_MATCH:",
2014 " /* This happens because yy_g_n_b()",
2015 " * sees that we've accumulated a",
2016 " * token and flags that we need to",
2017 " * try matching the token before",
2018 " * proceeding. But for input(),",
2019 " * there's no matching to consider.",
2020 " * So convert the EOB_ACT_LAST_MATCH",
2021 " * to EOB_ACT_END_OF_FILE.",
2024 " /* Reset buffer status. */",
2025 " yyrestart( yyin M4_YY_CALL_LAST_ARG);",
2029 " case EOB_ACT_END_OF_FILE:",
2031 " if ( yywrap( M4_YY_CALL_ONLY_ARG ) )",
2034 " if ( ! YY_G(yy_did_buffer_switch_on_eof) )",
2036 "#ifdef __cplusplus",
2037 " return yyinput(M4_YY_CALL_ONLY_ARG);",
2039 " return input(M4_YY_CALL_ONLY_ARG);",
2043 " case EOB_ACT_CONTINUE_SCAN:",
2044 " YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + offset;",
2050 " c = *(unsigned char *) YY_G(yy_c_buf_p); /* cast for 8-bit char's */",
2051 " *YY_G(yy_c_buf_p) = '\\0'; /* preserve yytext */",
2052 " YY_G(yy_hold_char) = *++YY_G(yy_c_buf_p);",
2054 "%% [19.0] update BOL and yylineno",
2059 "#endif /* ifndef YY_NO_INPUT */",
2062 "/** Immediately switch to a different input stream.",
2063 " * @param input_file A readable stream.",
2064 " * M4_YY_DOC_PARAM",
2065 " * @note This function does not reset the start condition to @c INITIAL .",
2068 " void yyrestart YYFARGS1( FILE *,input_file)",
2071 " void yyFlexLexer::yyrestart( std::istream* input_file )",
2074 " M4_YY_DECL_GUTS_VAR();",
2076 " if ( ! YY_CURRENT_BUFFER ){",
2077 " yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG);",
2078 " YY_CURRENT_BUFFER_LVALUE =",
2079 " yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG);",
2082 " yy_init_buffer( YY_CURRENT_BUFFER, input_file M4_YY_CALL_LAST_ARG);",
2083 " yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );",
2086 "/** Switch to a different input buffer.",
2087 " * @param new_buffer The new input buffer.",
2088 " * M4_YY_DOC_PARAM",
2091 " void yy_switch_to_buffer YYFARGS1( YY_BUFFER_STATE ,new_buffer)",
2094 " void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )",
2097 " M4_YY_DECL_GUTS_VAR();",
2099 " /* TODO. We should be able to replace this entire function body",
2101 " * yypop_buffer_state();",
2102 " * yypush_buffer_state(new_buffer);",
2104 " yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG);",
2105 " if ( YY_CURRENT_BUFFER == new_buffer )",
2108 " if ( YY_CURRENT_BUFFER )",
2110 " /* Flush out information for old buffer. */",
2111 " *YY_G(yy_c_buf_p) = YY_G(yy_hold_char);",
2112 " YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = YY_G(yy_c_buf_p);",
2113 " YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars);",
2116 " YY_CURRENT_BUFFER_LVALUE = new_buffer;",
2117 " yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );",
2119 " /* We don't actually know whether we did this switch during",
2120 " * EOF (yywrap()) processing, but the only time this flag",
2121 " * is looked at is after yywrap() is called, so it's safe",
2122 " * to go ahead and always set it.",
2124 " YY_G(yy_did_buffer_switch_on_eof) = 1;",
2129 "static void yy_load_buffer_state YYFARGS0(void)",
2132 " void yyFlexLexer::yy_load_buffer_state()",
2135 " M4_YY_DECL_GUTS_VAR();",
2136 " YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;",
2137 " YY_G(yytext_ptr) = YY_G(yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;",
2138 " yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;",
2139 " YY_G(yy_hold_char) = *YY_G(yy_c_buf_p);",
2142 "/** Allocate and initialize an input buffer state.",
2143 " * @param file A readable stream.",
2144 " * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.",
2145 " * M4_YY_DOC_PARAM",
2146 " * @return the allocated buffer state.",
2149 " YY_BUFFER_STATE yy_create_buffer YYFARGS2( FILE *,file, int ,size)",
2152 " YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )",
2155 " YY_BUFFER_STATE b;",
2156 " m4_dnl M4_YY_DECL_GUTS_VAR();",
2158 " b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) M4_YY_CALL_LAST_ARG );",
2160 " YY_FATAL_ERROR( \"out of dynamic memory in yy_create_buffer()\" );",
2162 " b->yy_buf_size = size;",
2164 " /* yy_ch_buf has to be 2 characters longer than the size given because",
2165 " * we need to put in 2 end-of-buffer characters.",
2167 " b->yy_ch_buf = (char *) yyalloc( b->yy_buf_size + 2 M4_YY_CALL_LAST_ARG );",
2168 " if ( ! b->yy_ch_buf )",
2169 " YY_FATAL_ERROR( \"out of dynamic memory in yy_create_buffer()\" );",
2171 " b->yy_is_our_buffer = 1;",
2173 " yy_init_buffer( b, file M4_YY_CALL_LAST_ARG);",
2178 "/** Destroy the buffer.",
2179 " * @param b a buffer created with yy_create_buffer()",
2180 " * M4_YY_DOC_PARAM",
2183 " void yy_delete_buffer YYFARGS1( YY_BUFFER_STATE ,b)",
2186 " void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )",
2189 " M4_YY_DECL_GUTS_VAR();",
2194 " if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */",
2195 " YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;",
2197 " if ( b->yy_is_our_buffer )",
2198 " yyfree( (void *) b->yy_ch_buf M4_YY_CALL_LAST_ARG );",
2200 " yyfree( (void *) b M4_YY_CALL_LAST_ARG );",
2205 "m4_ifdef( [[M4_YY_ALWAYS_INTERACTIVE]],,",
2207 " m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]],,",
2209 "#ifndef __cplusplus",
2210 "extern int isatty M4_YY_PARAMS( int );",
2211 "#endif /* __cplusplus */",
2217 "m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]],,",
2219 "extern \"C\" int isatty M4_YY_PARAMS( int );",
2223 "/* Initializes or reinitializes a buffer.",
2224 " * This function is sometimes called more than once on the same buffer,",
2225 " * such as during a yyrestart() or at EOF.",
2228 " static void yy_init_buffer YYFARGS2( YY_BUFFER_STATE ,b, FILE *,file)",
2231 " void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )",
2235 " int oerrno = errno;",
2236 " M4_YY_DECL_GUTS_VAR();",
2238 " yy_flush_buffer( b M4_YY_CALL_LAST_ARG);",
2240 " b->yy_input_file = file;",
2241 " b->yy_fill_buffer = 1;",
2243 " /* If b is the current buffer, then yy_init_buffer was _probably_",
2244 " * called from yyrestart() or through yy_get_next_buffer.",
2245 " * In that case, we don't want to reset the lineno or column.",
2247 " if (b != YY_CURRENT_BUFFER){",
2248 " b->yy_bs_lineno = 1;",
2249 " b->yy_bs_column = 0;",
2253 "m4_ifdef( [[M4_YY_ALWAYS_INTERACTIVE]],",
2255 " b->yy_is_interactive = 1;",
2258 " m4_ifdef( [[M4_YY_NEVER_INTERACTIVE]],",
2260 " b->yy_is_interactive = 0;",
2263 " b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;",
2268 " b->yy_is_interactive = 0;",
2273 "/** Discard all buffered characters. On the next scan, YY_INPUT will be called.",
2274 " * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.",
2275 " * M4_YY_DOC_PARAM",
2278 " void yy_flush_buffer YYFARGS1( YY_BUFFER_STATE ,b)",
2281 " void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )",
2284 " M4_YY_DECL_GUTS_VAR();",
2288 " b->yy_n_chars = 0;",
2290 " /* We always need two end-of-buffer characters. The first causes",
2291 " * a transition to the end-of-buffer state. The second causes",
2292 " * a jam in that state.",
2294 " b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;",
2295 " b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;",
2297 " b->yy_buf_pos = &b->yy_ch_buf[0];",
2299 " b->yy_at_bol = 1;",
2300 " b->yy_buffer_status = YY_BUFFER_NEW;",
2302 " if ( b == YY_CURRENT_BUFFER )",
2303 " yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );",
2307 "/** Pushes the new state onto the stack. The new state becomes",
2308 " * the current state. This function will allocate the stack",
2310 " * @param new_buffer The new state.",
2311 " * M4_YY_DOC_PARAM",
2314 "void yypush_buffer_state YYFARGS1(YY_BUFFER_STATE,new_buffer)",
2317 "void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)",
2320 " M4_YY_DECL_GUTS_VAR();",
2321 " if (new_buffer == NULL)",
2324 " yyensure_buffer_stack(M4_YY_CALL_ONLY_ARG);",
2326 " /* This block is copied from yy_switch_to_buffer. */",
2327 " if ( YY_CURRENT_BUFFER )",
2329 " /* Flush out information for old buffer. */",
2330 " *YY_G(yy_c_buf_p) = YY_G(yy_hold_char);",
2331 " YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = YY_G(yy_c_buf_p);",
2332 " YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars);",
2335 " /* Only push if top exists. Otherwise, replace top. */",
2336 " if (YY_CURRENT_BUFFER)",
2337 " YY_G(yy_buffer_stack_top)++;",
2338 " YY_CURRENT_BUFFER_LVALUE = new_buffer;",
2340 " /* copied from yy_switch_to_buffer. */",
2341 " yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );",
2342 " YY_G(yy_did_buffer_switch_on_eof) = 1;",
2348 "/** Removes and deletes the top of the stack, if present.",
2349 " * The next element becomes the new top.",
2350 " * M4_YY_DOC_PARAM",
2353 "void yypop_buffer_state YYFARGS0(void)",
2356 "void yyFlexLexer::yypop_buffer_state (void)",
2359 " M4_YY_DECL_GUTS_VAR();",
2360 " if (!YY_CURRENT_BUFFER)",
2363 " yy_delete_buffer(YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG);",
2364 " YY_CURRENT_BUFFER_LVALUE = NULL;",
2365 " if (YY_G(yy_buffer_stack_top) > 0)",
2366 " --YY_G(yy_buffer_stack_top);",
2368 " if (YY_CURRENT_BUFFER) {",
2369 " yy_load_buffer_state( M4_YY_CALL_ONLY_ARG );",
2370 " YY_G(yy_did_buffer_switch_on_eof) = 1;",
2377 "/* Allocates the stack if it does not exist.",
2378 " * Guarantees space for at least one push.",
2381 "static void yyensure_buffer_stack YYFARGS0(void)",
2384 "void yyFlexLexer::yyensure_buffer_stack(void)",
2387 " int num_to_alloc;",
2388 " M4_YY_DECL_GUTS_VAR();",
2390 " if (!YY_G(yy_buffer_stack)) {",
2392 " /* First allocation is just for 2 elements, since we don't know if this",
2393 " * scanner will even need a stack. We use 2 instead of 1 to avoid an",
2394 " * immediate realloc on the next call.",
2396 " num_to_alloc = 1;",
2397 " YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc",
2398 " (num_to_alloc * sizeof(struct yy_buffer_state*)",
2399 " M4_YY_CALL_LAST_ARG);",
2401 " memset(YY_G(yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));",
2403 " YY_G(yy_buffer_stack_max) = num_to_alloc;",
2404 " YY_G(yy_buffer_stack_top) = 0;",
2408 " if (YY_G(yy_buffer_stack_top) >= (YY_G(yy_buffer_stack_max)) - 1){",
2410 " /* Increase the buffer to prepare for a possible push. */",
2411 " int grow_size = 8 /* arbitrary grow size */;",
2413 " num_to_alloc = YY_G(yy_buffer_stack_max) + grow_size;",
2414 " YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc",
2415 " (YY_G(yy_buffer_stack),",
2416 " num_to_alloc * sizeof(struct yy_buffer_state*)",
2417 " M4_YY_CALL_LAST_ARG);",
2419 " /* zero only the new slots.*/",
2420 " memset(YY_G(yy_buffer_stack) + YY_G(yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));",
2421 " YY_G(yy_buffer_stack_max) = num_to_alloc;",
2429 "m4_ifdef( [[M4_YY_NO_SCAN_BUFFER]],,",
2432 "/** Setup the input buffer state to scan directly from a user-specified character buffer.",
2433 " * @param base the character buffer",
2434 " * @param size the size in bytes of the character buffer",
2435 " * M4_YY_DOC_PARAM",
2436 " * @return the newly allocated buffer state object. ",
2438 "YY_BUFFER_STATE yy_scan_buffer YYFARGS2( char *,base, yy_size_t ,size)",
2440 " YY_BUFFER_STATE b;",
2441 " m4_dnl M4_YY_DECL_GUTS_VAR();",
2443 " if ( size < 2 ||",
2444 " base[size-2] != YY_END_OF_BUFFER_CHAR ||",
2445 " base[size-1] != YY_END_OF_BUFFER_CHAR )",
2446 " /* They forgot to leave room for the EOB's. */",
2449 " b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) M4_YY_CALL_LAST_ARG );",
2451 " YY_FATAL_ERROR( \"out of dynamic memory in yy_scan_buffer()\" );",
2453 " b->yy_buf_size = size - 2; /* \"- 2\" to take care of EOB's */",
2454 " b->yy_buf_pos = b->yy_ch_buf = base;",
2455 " b->yy_is_our_buffer = 0;",
2456 " b->yy_input_file = 0;",
2457 " b->yy_n_chars = b->yy_buf_size;",
2458 " b->yy_is_interactive = 0;",
2459 " b->yy_at_bol = 1;",
2460 " b->yy_fill_buffer = 0;",
2461 " b->yy_buffer_status = YY_BUFFER_NEW;",
2463 " yy_switch_to_buffer( b M4_YY_CALL_LAST_ARG );",
2471 "m4_ifdef( [[M4_YY_NO_SCAN_STRING]],,",
2474 "/** Setup the input buffer state to scan a string. The next call to yylex() will",
2475 " * scan from a @e copy of @a str.",
2476 " * @param str a NUL-terminated string to scan",
2477 " * M4_YY_DOC_PARAM",
2478 " * @return the newly allocated buffer state object.",
2479 " * @note If you want to scan bytes that may contain NUL values, then use",
2480 " * yy_scan_bytes() instead.",
2482 "YY_BUFFER_STATE yy_scan_string YYFARGS1( yyconst char *, yystr)",
2484 " m4_dnl M4_YY_DECL_GUTS_VAR();",
2486 " return yy_scan_bytes( yystr, strlen(yystr) M4_YY_CALL_LAST_ARG);",
2492 "m4_ifdef( [[M4_YY_NO_SCAN_BYTES]],,",
2495 "/** Setup the input buffer state to scan the given bytes. The next call to yylex() will",
2496 " * scan from a @e copy of @a bytes.",
2497 " * @param bytes the byte buffer to scan",
2498 " * @param len the number of bytes in the buffer pointed to by @a bytes.",
2499 " * M4_YY_DOC_PARAM",
2500 " * @return the newly allocated buffer state object.",
2502 "YY_BUFFER_STATE yy_scan_bytes YYFARGS2( yyconst char *,yybytes, int ,_yybytes_len)",
2504 " YY_BUFFER_STATE b;",
2508 " m4_dnl M4_YY_DECL_GUTS_VAR();",
2510 " /* Get memory for full buffer, including space for trailing EOB's. */",
2511 " n = _yybytes_len + 2;",
2512 " buf = (char *) yyalloc( n M4_YY_CALL_LAST_ARG );",
2514 " YY_FATAL_ERROR( \"out of dynamic memory in yy_scan_bytes()\" );",
2516 " for ( i = 0; i < _yybytes_len; ++i )",
2517 " buf[i] = yybytes[i];",
2519 " buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;",
2521 " b = yy_scan_buffer( buf, n M4_YY_CALL_LAST_ARG);",
2523 " YY_FATAL_ERROR( \"bad buffer in yy_scan_bytes()\" );",
2525 " /* It's okay to grow etc. this buffer, and we should throw it",
2526 " * away when we're done.",
2528 " b->yy_is_our_buffer = 1;",
2536 "m4_ifdef( [[M4_YY_NO_PUSH_STATE]],,",
2539 " static void yy_push_state YYFARGS1( int ,new_state)",
2542 " void yyFlexLexer::yy_push_state( int new_state )",
2545 " M4_YY_DECL_GUTS_VAR();",
2546 " if ( YY_G(yy_start_stack_ptr) >= YY_G(yy_start_stack_depth) )",
2548 " yy_size_t new_size;",
2550 " YY_G(yy_start_stack_depth) += YY_START_STACK_INCR;",
2551 " new_size = YY_G(yy_start_stack_depth) * sizeof( int );",
2553 " if ( ! YY_G(yy_start_stack) )",
2554 " YY_G(yy_start_stack) = (int *) yyalloc( new_size M4_YY_CALL_LAST_ARG );",
2557 " YY_G(yy_start_stack) = (int *) yyrealloc(",
2558 " (void *) YY_G(yy_start_stack), new_size M4_YY_CALL_LAST_ARG );",
2560 " if ( ! YY_G(yy_start_stack) )",
2562 " \"out of memory expanding start-condition stack\" );",
2565 " YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr)++] = YY_START;",
2567 " BEGIN(new_state);",
2572 "m4_ifdef( [[M4_YY_NO_POP_STATE]],,",
2575 " static void yy_pop_state YYFARGS0(void)",
2578 " void yyFlexLexer::yy_pop_state()",
2581 " M4_YY_DECL_GUTS_VAR();",
2582 " if ( --YY_G(yy_start_stack_ptr) < 0 )",
2583 " YY_FATAL_ERROR( \"start-condition stack underflow\" );",
2585 " BEGIN(YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr)]);",
2590 "m4_ifdef( [[M4_YY_NO_TOP_STATE]],,",
2593 " static int yy_top_state YYFARGS0(void)",
2596 " int yyFlexLexer::yy_top_state()",
2599 " M4_YY_DECL_GUTS_VAR();",
2600 " return YY_G(yy_start_stack)[YY_G(yy_start_stack_ptr) - 1];",
2604 "#ifndef YY_EXIT_FAILURE",
2605 "#define YY_EXIT_FAILURE 2",
2609 "static void yy_fatal_error YYFARGS1(yyconst char*, msg)",
2611 " m4_dnl M4_YY_DECL_GUTS_VAR();",
2612 " (void) fprintf( stderr, \"%s\\n\", msg );",
2613 " exit( YY_EXIT_FAILURE );",
2617 "void yyFlexLexer::LexerError( yyconst char msg[] )",
2619 " M4_YY_DECL_GUTS_VAR();",
2620 " std::cerr << msg << std::endl;",
2621 " exit( YY_EXIT_FAILURE );",
2625 "/* Redefine yyless() so it works in section 3 code. */",
2628 "#define yyless(n) \\",
2631 " /* Undo effects of setting up yytext. */ \\",
2632 " int yyless_macro_arg = (n); \\",
2633 " YY_LESS_LINENO(yyless_macro_arg);\\",
2634 " yytext[yyleng] = YY_G(yy_hold_char); \\",
2635 " YY_G(yy_c_buf_p) = yytext + yyless_macro_arg; \\",
2636 " YY_G(yy_hold_char) = *YY_G(yy_c_buf_p); \\",
2637 " *YY_G(yy_c_buf_p) = '\\0'; \\",
2638 " yyleng = yyless_macro_arg; \\",
2644 "/* Accessor methods (get/set functions) to struct members. */",
2648 "m4_ifdef( [[M4_YY_NO_GET_EXTRA]],,",
2650 "/** Get the user-defined data for this scanner.",
2651 " * M4_YY_DOC_PARAM",
2653 "YY_EXTRA_TYPE yyget_extra YYFARGS0(void)",
2655 " M4_YY_DECL_GUTS_VAR();",
2661 "m4_ifdef( [[M4_YY_NO_GET_LINENO]],,",
2663 "/** Get the current line number.",
2664 " * M4_YY_DOC_PARAM",
2666 "int yyget_lineno YYFARGS0(void)",
2668 " M4_YY_DECL_GUTS_VAR();",
2670 " m4_ifdef( [[M4_YY_REENTRANT]],",
2672 " if (! YY_CURRENT_BUFFER)",
2675 " return yylineno;",
2679 "m4_ifdef( [[M4_YY_REENTRANT]],",
2681 "m4_ifdef( [[M4_YY_NO_GET_COLUMN]],,",
2683 "/** Get the current column number.",
2684 " * M4_YY_DOC_PARAM",
2686 "int yyget_column YYFARGS0(void)",
2688 " M4_YY_DECL_GUTS_VAR();",
2690 " m4_ifdef( [[M4_YY_REENTRANT]],",
2692 " if (! YY_CURRENT_BUFFER)",
2695 " return yycolumn;",
2700 "m4_ifdef( [[M4_YY_NO_GET_IN]],,",
2702 "/** Get the input stream.",
2703 " * M4_YY_DOC_PARAM",
2705 "FILE *yyget_in YYFARGS0(void)",
2707 " M4_YY_DECL_GUTS_VAR();",
2712 "m4_ifdef( [[M4_YY_NO_GET_OUT]],,",
2714 "/** Get the output stream.",
2715 " * M4_YY_DOC_PARAM",
2717 "FILE *yyget_out YYFARGS0(void)",
2719 " M4_YY_DECL_GUTS_VAR();",
2724 "m4_ifdef( [[M4_YY_NO_GET_LENG]],,",
2726 "/** Get the length of the current token.",
2727 " * M4_YY_DOC_PARAM",
2729 "int yyget_leng YYFARGS0(void)",
2731 " M4_YY_DECL_GUTS_VAR();",
2736 "/** Get the current token.",
2737 " * M4_YY_DOC_PARAM",
2739 "m4_ifdef( [[M4_YY_NO_GET_TEXT]],,",
2741 "char *yyget_text YYFARGS0(void)",
2743 " M4_YY_DECL_GUTS_VAR();",
2749 "m4_ifdef( [[M4_YY_NO_SET_EXTRA]],,",
2751 "/** Set the user-defined data. This data is never touched by the scanner.",
2752 " * @param user_defined The data to be associated with this scanner.",
2753 " * M4_YY_DOC_PARAM",
2755 "void yyset_extra YYFARGS1( YY_EXTRA_TYPE ,user_defined)",
2757 " M4_YY_DECL_GUTS_VAR();",
2758 " yyextra = user_defined ;",
2763 "m4_ifdef( [[M4_YY_NO_SET_LINENO]],,",
2765 "/** Set the current line number.",
2766 " * @param line_number",
2767 " * M4_YY_DOC_PARAM",
2769 "void yyset_lineno YYFARGS1( int ,line_number)",
2771 " M4_YY_DECL_GUTS_VAR();",
2773 " m4_ifdef( [[M4_YY_REENTRANT]],",
2775 " /* lineno is only valid if an input buffer exists. */",
2776 " if (! YY_CURRENT_BUFFER )",
2777 " yy_fatal_error( \"yyset_lineno called with no buffer\" M4_YY_CALL_LAST_ARG); ",
2779 " yylineno = line_number;",
2783 "m4_ifdef( [[M4_YY_REENTRANT]],",
2785 "m4_ifdef( [[M4_YY_NO_SET_COLUMN]],,",
2787 "/** Set the current column.",
2788 " * @param line_number",
2789 " * M4_YY_DOC_PARAM",
2791 "void yyset_column YYFARGS1( int , column_no)",
2793 " M4_YY_DECL_GUTS_VAR();",
2795 " m4_ifdef( [[M4_YY_REENTRANT]],",
2797 " /* column is only valid if an input buffer exists. */",
2798 " if (! YY_CURRENT_BUFFER )",
2799 " yy_fatal_error( \"yyset_column called with no buffer\" M4_YY_CALL_LAST_ARG); ",
2801 " yycolumn = column_no;",
2807 "m4_ifdef( [[M4_YY_NO_SET_IN]],,",
2809 "/** Set the input stream. This does not discard the current",
2811 " * @param in_str A readable stream.",
2812 " * M4_YY_DOC_PARAM",
2813 " * @see yy_switch_to_buffer",
2815 "void yyset_in YYFARGS1( FILE * ,in_str)",
2817 " M4_YY_DECL_GUTS_VAR();",
2822 "m4_ifdef( [[M4_YY_NO_SET_OUT]],,",
2824 "void yyset_out YYFARGS1( FILE * ,out_str)",
2826 " M4_YY_DECL_GUTS_VAR();",
2827 " yyout = out_str ;",
2832 "m4_ifdef( [[M4_YY_NO_GET_DEBUG]],,",
2834 "int yyget_debug YYFARGS0(void)",
2836 " M4_YY_DECL_GUTS_VAR();",
2837 " return yy_flex_debug;",
2841 "m4_ifdef( [[M4_YY_NO_SET_DEBUG]],,",
2843 "void yyset_debug YYFARGS1( int ,bdebug)",
2845 " M4_YY_DECL_GUTS_VAR();",
2846 " yy_flex_debug = bdebug ;",
2852 "/* Accessor methods for yylval and yylloc */",
2855 "m4_ifdef( [[M4_YY_NO_GET_LVAL]],,",
2857 "YYSTYPE * yyget_lval YYFARGS0(void)",
2859 " M4_YY_DECL_GUTS_VAR();",
2864 "m4_ifdef( [[M4_YY_NO_SET_LVAL]],,",
2866 "void yyset_lval YYFARGS1( YYSTYPE * ,yylval_param)",
2868 " M4_YY_DECL_GUTS_VAR();",
2869 " yylval = yylval_param;",
2873 "m4_ifdef( [[<M4_YY_BISON_LLOC>]],",
2875 " m4_ifdef( [[M4_YY_NO_GET_LLOC]],,",
2877 "YYLTYPE *yyget_lloc YYFARGS0(void)",
2879 " M4_YY_DECL_GUTS_VAR();",
2884 " m4_ifdef( [[M4_YY_NO_SET_LLOC]],,",
2886 "void yyset_lloc YYFARGS1( YYLTYPE * ,yylloc_param)",
2888 " M4_YY_DECL_GUTS_VAR();",
2889 " yylloc = yylloc_param;",
2897 "/* User-visible API */",
2899 "/* yylex_init is special because it creates the scanner itself, so it is",
2900 " * the ONLY reentrant function that doesn't take the scanner as the last argument.",
2901 " * That's why we explicitly handle the declaration, instead of using our macros.",
2903 "m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]],",
2905 "int yylex_init( ptr_yy_globals )",
2906 " yyscan_t* ptr_yy_globals;",
2909 "int yylex_init(yyscan_t* ptr_yy_globals)",
2912 " if (ptr_yy_globals == NULL){",
2917 " *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );",
2919 " if (*ptr_yy_globals == NULL){",
2924 " /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */",
2925 " memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));",
2927 " return yy_init_globals ( *ptr_yy_globals );",
2933 "static int yy_init_globals YYFARGS0(void)",
2935 " M4_YY_DECL_GUTS_VAR();",
2936 " /* Initialization is the same as for the non-reentrant scanner.",
2937 " * This function is called from yylex_destroy(), so don't allocate here.",
2940 "m4_ifdef( [[M4_YY_USE_LINENO]],",
2942 " m4_ifdef( [[M4_YY_NOT_REENTRANT]],",
2944 " /* We do not touch yylineno unless the option is enabled. */",
2948 " YY_G(yy_buffer_stack) = 0;",
2949 " YY_G(yy_buffer_stack_top) = 0;",
2950 " YY_G(yy_buffer_stack_max) = 0;",
2951 " YY_G(yy_c_buf_p) = (char *) 0;",
2952 " YY_G(yy_init) = 0;",
2953 " YY_G(yy_start) = 0;",
2955 "m4_ifdef( [[M4_YY_HAS_START_STACK_VARS]],",
2957 " YY_G(yy_start_stack_ptr) = 0;",
2958 " YY_G(yy_start_stack_depth) = 0;",
2959 " YY_G(yy_start_stack) = NULL;",
2962 "m4_ifdef( [[M4_YY_USES_REJECT]],",
2964 " YY_G(yy_state_buf) = 0;",
2965 " YY_G(yy_state_ptr) = 0;",
2966 " YY_G(yy_full_match) = 0;",
2967 " YY_G(yy_lp) = 0;",
2970 "m4_ifdef( [[M4_YY_TEXT_IS_ARRAY]],",
2972 " YY_G(yytext_ptr) = 0;",
2973 " YY_G(yy_more_offset) = 0;",
2974 " YY_G(yy_prev_more_offset) = 0;",
2977 "/* Defined in main.c */",
2978 "#ifdef YY_STDINIT",
2982 " yyin = (FILE *) 0;",
2983 " yyout = (FILE *) 0;",
2986 " /* For future reference: Set errno on error, since we are called by",
2994 "%if-c-only SNIP! this currently causes conflicts with the c++ scanner",
2995 "/* yylex_destroy is for both reentrant and non-reentrant scanners. */",
2996 "int yylex_destroy YYFARGS0(void)",
2998 " M4_YY_DECL_GUTS_VAR();",
3000 " /* Pop the buffer stack, destroying each element. */",
3001 " while(YY_CURRENT_BUFFER){",
3002 " yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG );",
3003 " YY_CURRENT_BUFFER_LVALUE = NULL;",
3004 " yypop_buffer_state(M4_YY_CALL_ONLY_ARG);",
3007 " /* Destroy the stack itself. */",
3008 " yyfree(YY_G(yy_buffer_stack) M4_YY_CALL_LAST_ARG);",
3009 " YY_G(yy_buffer_stack) = NULL;",
3011 "m4_ifdef( [[M4_YY_HAS_START_STACK_VARS]],",
3013 " /* Destroy the start condition stack. */",
3014 " yyfree( YY_G(yy_start_stack) M4_YY_CALL_LAST_ARG );",
3015 " YY_G(yy_start_stack) = NULL;",
3018 "m4_ifdef( [[M4_YY_USES_REJECT]],",
3020 " yyfree ( YY_G(yy_state_buf) M4_YY_CALL_LAST_ARG);",
3021 " YY_G(yy_state_buf) = NULL;",
3024 " /* Reset the globals. This is important in a non-reentrant scanner so the next time",
3025 " * yylex() is called, initialization will occur. */",
3026 " yy_init_globals( M4_YY_CALL_ONLY_ARG);",
3029 " /* Destroy the main struct (reentrant only). */",
3030 " yyfree ( yyscanner M4_YY_CALL_LAST_ARG );",
3031 " yyscanner = NULL;",
3038 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
3041 " * Internal utility routines.",
3045 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
3047 "#ifndef yytext_ptr",
3048 "static void yy_flex_strncpy YYFARGS3( char*,s1, yyconst char *,s2, int,n)",
3051 " for ( i = 0; i < n; ++i )",
3057 "m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
3059 "#ifdef YY_NEED_STRLEN",
3060 "static int yy_flex_strlen YYFARGS1( yyconst char *,s)",
3063 " for ( n = 0; s[n]; ++n )",
3071 "m4_ifdef( [[M4_YY_NO_FLEX_ALLOC]],,",
3073 "void *yyalloc YYFARGS1( yy_size_t ,size)",
3075 " return (void *) malloc( size );",
3079 "m4_ifdef( [[M4_YY_NO_FLEX_REALLOC]],,",
3081 "void *yyrealloc YYFARGS2( void *,ptr, yy_size_t ,size)",
3083 " /* The cast to (char *) in the following accommodates both",
3084 " * implementations that use char* generic pointers, and those",
3085 " * that use void* generic pointers. It works with the latter",
3086 " * because both ANSI C and C++ allow castless assignment from",
3087 " * any pointer type to void*, and deal with argument conversions",
3088 " * as though doing an assignment.",
3090 " return (void *) realloc( (char *) ptr, size );",
3094 "m4_ifdef( [[M4_YY_NO_FLEX_FREE]],,",
3096 "void yyfree YYFARGS1( void *,ptr)",
3098 " free( (char *) ptr ); /* see yyrealloc() for (char *) cast */",
3102 "%if-tables-serialization definitions",
3103 "#ifdef FLEX_SCANNER",
3105 "dnl tables_shared.c - tables serialization code",
3107 "dnl Copyright (c) 1990 The Regents of the University of California.",
3108 "dnl All rights reserved.",
3110 "dnl This code is derived from software contributed to Berkeley by",
3113 "dnl The United States Government has rights in this work pursuant",
3114 "dnl to contract no. DE-AC03-76SF00098 between the United States",
3115 "dnl Department of Energy and the University of California.",
3117 "dnl This file is part of flex.",
3119 "dnl Redistribution and use in source and binary forms, with or without",
3120 "dnl modification, are permitted provided that the following conditions",
3123 "dnl 1. Redistributions of source code must retain the above copyright",
3124 "dnl notice, this list of conditions and the following disclaimer.",
3125 "dnl 2. Redistributions in binary form must reproduce the above copyright",
3126 "dnl notice, this list of conditions and the following disclaimer in the",
3127 "dnl documentation and/or other materials provided with the distribution.",
3129 "dnl Neither the name of the University nor the names of its contributors",
3130 "dnl may be used to endorse or promote products derived from this software",
3131 "dnl without specific prior written permission.",
3133 "dnl THIS SOFTWARE IS PROVIDED `AS IS' AND WITHOUT ANY EXPRESS OR",
3134 "dnl IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED",
3135 "dnl WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR",
3140 "/* This file is meant to be included in both the skeleton and the actual",
3141 " * flex code (hence the name \"_shared\"). ",
3143 "#ifndef yyskel_static",
3144 "#define yyskel_static static",
3147 "#include \"flexdef.h\"",
3148 "#include \"tables.h\"",
3149 "#ifndef yyskel_static",
3150 "#define yyskel_static",
3155 "/** Get the number of integers in this table. This is NOT the",
3156 " * same thing as the number of elements.",
3157 " * @param td the table ",
3158 " * @return the number of integers in the table",
3160 "yyskel_static flex_int32_t yytbl_calc_total_len (const struct yytbl_data *tbl)",
3164 " /* total number of ints */",
3165 " n = tbl->td_lolen;",
3166 " if (tbl->td_hilen > 0)",
3167 " n *= tbl->td_hilen;",
3169 " if (tbl->td_id == YYTD_ID_TRANSITION)",
3175 "static int yytbl_read8 (void *v, struct yytbl_reader * rd)",
3178 " if (fread (v, sizeof (flex_uint8_t), 1, rd->fp) != 1){",
3182 " rd->bread += sizeof(flex_uint8_t);",
3186 "static int yytbl_read16 (void *v, struct yytbl_reader * rd)",
3189 " if (fread (v, sizeof (flex_uint16_t), 1, rd->fp) != 1){",
3193 " *((flex_uint16_t *) v) = ntohs (*((flex_uint16_t *) v));",
3194 " rd->bread += sizeof(flex_uint16_t);",
3198 "static int yytbl_read32 (void *v, struct yytbl_reader * rd)",
3201 " if (fread (v, sizeof (flex_uint32_t), 1, rd->fp) != 1){",
3205 " *((flex_uint32_t *) v) = ntohl (*((flex_uint32_t *) v));",
3206 " rd->bread += sizeof(flex_uint32_t);",
3210 "/** Read the header */",
3211 "static int yytbl_hdr_read YYFARGS2(struct yytbl_hdr *, th, struct yytbl_reader *, rd)",
3214 " memset (th, 0, sizeof (struct yytbl_hdr));",
3216 " if (yytbl_read32 (&(th->th_magic), rd) != 0)",
3219 " if (th->th_magic != YYTBL_MAGIC){",
3220 " yy_fatal_error(\"bad magic number\" /*TODO: not fatal.*/ M4_YY_CALL_LAST_ARG);",
3224 " if (yytbl_read32 (&(th->th_hsize), rd) != 0",
3225 " || yytbl_read32 (&(th->th_ssize), rd) != 0",
3226 " || yytbl_read16 (&(th->th_flags), rd) != 0)",
3229 " /* Sanity check on header size. Greater than 1k suggests some funny business. */",
3230 " if (th->th_hsize < 16 || th->th_hsize > 1024){",
3231 " yy_fatal_error(\"insane header size detected\" /*TODO: not fatal.*/ M4_YY_CALL_LAST_ARG);",
3235 " /* Allocate enough space for the version and name fields */",
3236 " bytes = th->th_hsize - 14;",
3237 " th->th_version = (char *) yyalloc (bytes M4_YY_CALL_LAST_ARG);",
3239 " /* we read it all into th_version, and point th_name into that data */",
3240 " if (fread (th->th_version, 1, bytes, rd->fp) != bytes){",
3242 " yyfree(th->th_version M4_YY_CALL_LAST_ARG);",
3243 " th->th_version = NULL;",
3247 " rd->bread += bytes;",
3249 " th->th_name = th->th_version + strlen (th->th_version) + 1;",
3253 "/** lookup id in the dmap list.",
3254 " * @param dmap pointer to first element in list",
3255 " * @return NULL if not found.",
3257 "static struct yytbl_dmap *yytbl_dmap_lookup YYFARGS2(struct yytbl_dmap *, dmap,",
3260 " while (dmap->dm_id)",
3261 " if (dmap->dm_id == id)",
3268 "/** Read a table while mapping its contents to the local array. ",
3269 " * @param dmap used to performing mapping",
3270 " * @return 0 on success",
3272 "static int yytbl_data_load YYFARGS2(struct yytbl_dmap *, dmap, struct yytbl_reader*, rd)",
3274 " struct yytbl_data td;",
3275 " struct yytbl_dmap *transdmap=0;",
3276 " int len, i, rv, inner_loop_count;",
3279 " memset (&td, 0, sizeof (struct yytbl_data));",
3281 " if (yytbl_read16 (&td.td_id, rd) != 0",
3282 " || yytbl_read16 (&td.td_flags, rd) != 0",
3283 " || yytbl_read32 (&td.td_hilen, rd) != 0",
3284 " || yytbl_read32 (&td.td_lolen, rd) != 0)",
3287 " /* Lookup the map for the transition table so we have it in case we need it",
3288 " * inside the loop below. This scanner might not even have a transition",
3289 " * table, which is ok.",
3291 " transdmap = yytbl_dmap_lookup (dmap, YYTD_ID_TRANSITION M4_YY_CALL_LAST_ARG);",
3293 " if ((dmap = yytbl_dmap_lookup (dmap, td.td_id M4_YY_CALL_LAST_ARG)) == NULL){",
3294 " yy_fatal_error(\"table id not found in map.\" /*TODO: not fatal.*/ M4_YY_CALL_LAST_ARG);",
3298 " /* Allocate space for table.",
3299 " * The --full yy_transition table is a special case, since we",
3300 " * need the dmap.dm_sz entry to tell us the sizeof the individual",
3301 " * struct members.",
3306 " if ((td.td_flags & YYTD_STRUCT))",
3307 " bytes = sizeof(struct yy_trans_info) * td.td_lolen * (td.td_hilen ? td.td_hilen : 1);",
3309 " bytes = td.td_lolen * (td.td_hilen ? td.td_hilen : 1) * dmap->dm_sz;",
3311 " if(M4_YY_TABLES_VERIFY)",
3312 " /* We point to the array itself */",
3313 " p = dmap->dm_arr; ",
3315 " /* We point to the address of a pointer. */",
3316 " *dmap->dm_arr = p = (void *) yyalloc (bytes M4_YY_CALL_LAST_ARG);",
3319 " /* If it's a struct, we read 2 integers to get one element */",
3320 " if ((td.td_flags & YYTD_STRUCT) != 0)",
3321 " inner_loop_count = 2;",
3323 " inner_loop_count = 1;",
3325 " /* read and map each element.",
3326 " * This loop iterates once for each element of the td_data array.",
3327 " * Notice that we increment 'i' in the inner loop.",
3329 " len = yytbl_calc_total_len (&td);",
3330 " for (i = 0; i < len; ){",
3334 " /* This loop really executes exactly 1 or 2 times.",
3335 " * The second time is to handle the second member of the",
3336 " * YYTD_STRUCT for the yy_transition array.",
3338 " for (j = 0; j < inner_loop_count; j++, i++) {",
3339 " flex_int32_t t32;",
3341 " /* read into t32 no matter what the real size is. */",
3343 " flex_int16_t t16;",
3346 " switch (YYTDFLAGS2BYTES (td.td_flags)) {",
3347 " case sizeof (flex_int32_t):",
3348 " rv = yytbl_read32 (&t32, rd);",
3350 " case sizeof (flex_int16_t):",
3351 " rv = yytbl_read16 (&t16, rd);",
3354 " case sizeof (flex_int8_t):",
3355 " rv = yytbl_read8 (&t8, rd);",
3359 " yy_fatal_error(\"invalid td_flags\" /*TODO: not fatal.*/ M4_YY_CALL_LAST_ARG);",
3366 " /* copy into the deserialized array... */",
3368 " if ((td.td_flags & YYTD_STRUCT)) {",
3369 " /* t32 is the j'th member of a two-element struct. */",
3372 " v = j == 0 ? &(((struct yy_trans_info *) p)->yy_verify)",
3373 " : &(((struct yy_trans_info *) p)->yy_nxt);",
3375 " switch (dmap->dm_sz) {",
3376 " case sizeof (flex_int32_t):",
3377 " if (M4_YY_TABLES_VERIFY){",
3378 " if( ((flex_int32_t *) v)[0] != (flex_int32_t) t32)",
3379 " yy_fatal_error(\"tables verification failed at YYTD_STRUCT flex_int32_t\" M4_YY_CALL_LAST_ARG);",
3381 " ((flex_int32_t *) v)[0] = (flex_int32_t) t32;",
3383 " case sizeof (flex_int16_t):",
3384 " if (M4_YY_TABLES_VERIFY ){",
3385 " if(((flex_int16_t *) v)[0] != (flex_int16_t) t32)",
3386 " yy_fatal_error(\"tables verification failed at YYTD_STRUCT flex_int16_t\" M4_YY_CALL_LAST_ARG);",
3388 " ((flex_int16_t *) v)[0] = (flex_int16_t) t32;",
3390 " case sizeof(flex_int8_t):",
3391 " if (M4_YY_TABLES_VERIFY ){",
3392 " if( ((flex_int8_t *) v)[0] != (flex_int8_t) t32)",
3393 " yy_fatal_error(\"tables verification failed at YYTD_STRUCT flex_int8_t\" M4_YY_CALL_LAST_ARG);",
3395 " ((flex_int8_t *) v)[0] = (flex_int8_t) t32;",
3398 " yy_fatal_error(\"invalid dmap->dm_sz for struct\" /*TODO: not fatal.*/ M4_YY_CALL_LAST_ARG);",
3402 " /* if we're done with j, increment p */",
3404 " p = (struct yy_trans_info *) p + 1;",
3406 " else if ((td.td_flags & YYTD_PTRANS)) {",
3407 " /* t32 is an index into the transition array. */",
3408 " struct yy_trans_info *v;",
3411 " if (!transdmap){",
3412 " yy_fatal_error(\"transition table not found\" /*TODO: not fatal.*/ M4_YY_CALL_LAST_ARG);",
3416 " if( M4_YY_TABLES_VERIFY)",
3417 " v = &(((struct yy_trans_info *) (transdmap->dm_arr))[t32]);",
3419 " v = &((*((struct yy_trans_info **) (transdmap->dm_arr)))[t32]);",
3421 " if(M4_YY_TABLES_VERIFY ){",
3422 " if( ((struct yy_trans_info **) p)[0] != v)",
3423 " yy_fatal_error(\"tables verification failed at YYTD_PTRANS\" M4_YY_CALL_LAST_ARG);",
3425 " ((struct yy_trans_info **) p)[0] = v;",
3427 " /* increment p */",
3428 " p = (struct yy_trans_info **) p + 1;",
3431 " /* t32 is a plain int. copy data, then incrememnt p. */",
3432 " switch (dmap->dm_sz) {",
3433 " case sizeof (flex_int32_t):",
3434 " if(M4_YY_TABLES_VERIFY ){",
3435 " if( ((flex_int32_t *) p)[0] != (flex_int32_t) t32)",
3436 " yy_fatal_error(\"tables verification failed at flex_int32_t\" M4_YY_CALL_LAST_ARG);",
3438 " ((flex_int32_t *) p)[0] = (flex_int32_t) t32;",
3439 " p = ((flex_int32_t *) p) + 1;",
3441 " case sizeof (flex_int16_t):",
3442 " if(M4_YY_TABLES_VERIFY ){",
3443 " if( ((flex_int16_t *) p)[0] != (flex_int16_t) t32)",
3444 " yy_fatal_error(\"tables verification failed at flex_int16_t\" M4_YY_CALL_LAST_ARG);",
3446 " ((flex_int16_t *) p)[0] = (flex_int16_t) t32;",
3447 " p = ((flex_int16_t *) p) + 1;",
3449 " case sizeof (flex_int8_t):",
3450 " if(M4_YY_TABLES_VERIFY ){",
3451 " if( ((flex_int8_t *) p)[0] != (flex_int8_t) t32)",
3452 " yy_fatal_error(\"tables verification failed at flex_int8_t\" M4_YY_CALL_LAST_ARG);",
3454 " ((flex_int8_t *) p)[0] = (flex_int8_t) t32;",
3455 " p = ((flex_int8_t *) p) + 1;",
3458 " yy_fatal_error(\"invalid dmap->dm_sz for plain int\" /*TODO: not fatal.*/ M4_YY_CALL_LAST_ARG);",
3466 " /* Now eat padding. */",
3469 " pad = yypad64(rd->bread);",
3470 " while(--pad >= 0){",
3472 " if(yytbl_read8(&t8,rd) != 0)",
3480 "%define-yytables The name for this specific scanner's tables.",
3482 "/* Find the key and load the DFA tables from the given stream. */",
3483 "static int yytbl_fload YYFARGS2(FILE *, fp, const char *, key)",
3486 " struct yytbl_hdr th;",
3487 " struct yytbl_reader rd;",
3490 " th.th_version = NULL;",
3492 " /* Keep trying until we find the right set of tables or end of file. */",
3493 " while (!feof(rd.fp)) {",
3495 " if (yytbl_hdr_read (&th, &rd M4_YY_CALL_LAST_ARG) != 0){",
3500 " /* A NULL key means choose the first set of tables. */",
3501 " if (key == NULL)",
3504 " if (strcmp(th.th_name,key) != 0){",
3505 " /* Skip ahead to next set */",
3506 " fseek(rd.fp, th.th_ssize - th.th_hsize, SEEK_CUR);",
3507 " yyfree(th.th_version M4_YY_CALL_LAST_ARG);",
3508 " th.th_version = NULL;",
3514 " while (rd.bread < th.th_ssize){",
3515 " /* Load the data tables */",
3516 " if(yytbl_data_load (yydmap,&rd M4_YY_CALL_LAST_ARG) != 0){",
3523 " if(th.th_version){",
3524 " yyfree(th.th_version M4_YY_CALL_LAST_ARG);",
3525 " th.th_version = NULL;",
3531 "/** Load the DFA tables for this scanner from the given stream. */",
3532 "int yytables_fload YYFARGS1(FILE *, fp)",
3535 " if( yytbl_fload(fp, YYTABLES_NAME M4_YY_CALL_LAST_ARG) != 0)",
3540 "/** Destroy the loaded tables, freeing memory, etc.. */",
3541 "int yytables_destroy YYFARGS0(void)",
3543 " struct yytbl_dmap *dmap=0;",
3545 " if(!M4_YY_TABLES_VERIFY){",
3546 " /* Walk the dmap, freeing the pointers */",
3547 " for(dmap=yydmap; dmap->dm_id; dmap++) {",
3549 " v = dmap->dm_arr;",
3550 " if(v && *(char**)v){",
3551 " yyfree(*(char**)v M4_YY_CALL_LAST_ARG);",
3552 " *(char**)v = NULL;",
3560 "/* end table serialization code definitions */",
3564 "m4_ifdef([[M4_YY_MAIN]], [[",
3565 "int main M4_YY_PARAMS(void);",
3572 " yylex_init(&lexer);",
3574 " yylex_destroy( lexer);",
3577 "%if-not-reentrant",
3586 "m4_ifdef( [[M4_YY_IN_HEADER]],",
3588 "#undef YY_NEW_FILE",
3589 "#undef YY_FLUSH_BUFFER",
3590 "#undef yy_set_bol",
3591 "#undef yy_new_buffer",
3592 "#undef yy_set_interactive",
3593 "#undef YY_DO_BEFORE_ACTION",
3595 "#ifdef YY_DECL_IS_OURS",
3596 "#undef YY_DECL_IS_OURS",