| @@ -1,1737 +1,1740 @@ | | | @@ -1,1737 +1,1740 @@ |
1 | %# -*-C-*- vi: set ft=c: | | 1 | %# -*-C-*- vi: set ft=c: |
2 | %# This file is processed in several stages. | | 2 | %# This file is processed in several stages. |
3 | %# Here are the stages, as best as I can describe: | | 3 | %# Here are the stages, as best as I can describe: |
4 | %# | | 4 | %# |
5 | %# 1. flex.skl is processed through GNU m4 during the | | 5 | %# 1. flex.skl is processed through GNU m4 during the |
6 | %# pre-compilation stage of flex. Only macros starting | | 6 | %# pre-compilation stage of flex. Only macros starting |
7 | %# with `m4preproc_' are processed, and quoting is normal. | | 7 | %# with `m4preproc_' are processed, and quoting is normal. |
8 | %# | | 8 | %# |
9 | %# 2. The preprocessed skeleton is translated verbatim into a | | 9 | %# 2. The preprocessed skeleton is translated verbatim into a |
10 | %# C array, saved as "skel.c" and compiled into the flex binary. | | 10 | %# C array, saved as "skel.c" and compiled into the flex binary. |
11 | %# | | 11 | %# |
12 | %# 3. At runtime, the skeleton is generated and filtered (again) | | 12 | %# 3. At runtime, the skeleton is generated and filtered (again) |
13 | %# through m4. Macros beginning with `m4_' will be processed. | | 13 | %# through m4. Macros beginning with `m4_' will be processed. |
14 | %# The quoting is "[[" and "]]" so we don't interfere with | | 14 | %# The quoting is "[[" and "]]" so we don't interfere with |
15 | %# user code. | | 15 | %# user code. |
16 | %# | | 16 | %# |
17 | %# All generate macros for the m4 stage contain the text "m4" or "M4" | | 17 | %# All generate macros for the m4 stage contain the text "m4" or "M4" |
18 | %# in them. This is to distinguish them from CPP macros. | | 18 | %# in them. This is to distinguish them from CPP macros. |
19 | %# The exception to this rule is YY_G, which is an m4 macro, | | 19 | %# The exception to this rule is YY_G, which is an m4 macro, |
20 | %# but it needs to be remain short because it is used everywhere. | | 20 | %# but it needs to be remain short because it is used everywhere. |
21 | %# | | 21 | %# |
22 | /* A lexical scanner generated by flex */ | | 22 | /* A lexical scanner generated by flex */ |
23 | | | 23 | |
24 | %# Macros for preproc stage. | | 24 | %# Macros for preproc stage. |
25 | m4preproc_changecom | | 25 | m4preproc_changecom |
26 | | | 26 | |
27 | %# Macros for runtime processing stage. | | 27 | %# Macros for runtime processing stage. |
28 | m4_changecom | | 28 | m4_changecom |
29 | m4_changequote | | 29 | m4_changequote |
30 | m4_changequote([[, ]]) | | 30 | m4_changequote([[, ]]) |
31 | | | 31 | |
32 | %# | | 32 | %# |
33 | %# Lines in this skeleton starting with a "%" character are "control lines" | | 33 | %# Lines in this skeleton starting with a "%" character are "control lines" |
34 | %# and affect the generation of the scanner. The possible control codes are | | 34 | %# and affect the generation of the scanner. The possible control codes are |
35 | %# listed and processed in misc.c. | | 35 | %# listed and processed in misc.c. |
36 | %# | | 36 | %# |
37 | %# %# - A comment. The current line is omitted from the generated scanner. | | 37 | %# %# - A comment. The current line is omitted from the generated scanner. |
38 | %# %if-c++-only - The following lines are printed for C++ scanners ONLY. | | 38 | %# %if-c++-only - The following lines are printed for C++ scanners ONLY. |
39 | %# %if-c-only - The following lines are NOT printed for C++ scanners. | | 39 | %# %if-c-only - The following lines are NOT printed for C++ scanners. |
40 | %# %if-c-or-c++ - The following lines are printed in BOTH C and C++ scanners. | | 40 | %# %if-c-or-c++ - The following lines are printed in BOTH C and C++ scanners. |
41 | %# %if-reentrant - Print for reentrant scanners.(push) | | 41 | %# %if-reentrant - Print for reentrant scanners.(push) |
42 | %# %if-not-reentrant - Print for non-reentrant scanners. (push) | | 42 | %# %if-not-reentrant - Print for non-reentrant scanners. (push) |
43 | %# %if-bison-bridge - Print for bison-bridge. (push) | | 43 | %# %if-bison-bridge - Print for bison-bridge. (push) |
44 | %# %if-not-bison-bridge - Print for non-bison-bridge. (push) | | 44 | %# %if-not-bison-bridge - Print for non-bison-bridge. (push) |
45 | %# %endif - pop from the previous if code. | | 45 | %# %endif - pop from the previous if code. |
46 | %# %% - A stop-point, where code is inserted by flex. | | 46 | %# %% - A stop-point, where code is inserted by flex. |
47 | %# Each stop-point is numbered here and also in the code generator. | | 47 | %# Each stop-point is numbered here and also in the code generator. |
48 | %# (See gen.c, etc. for details.) | | 48 | %# (See gen.c, etc. for details.) |
49 | %# %not-for-header - Begin code that should NOT appear in a ".h" file. | | 49 | %# %not-for-header - Begin code that should NOT appear in a ".h" file. |
50 | %# %ok-for-header - %c and %e are used for building a header file. | | 50 | %# %ok-for-header - %c and %e are used for building a header file. |
51 | %# %if-tables-serialization | | 51 | %# %if-tables-serialization |
52 | %# | | 52 | %# |
53 | %# All control-lines EXCEPT comment lines ("%#") will be inserted into | | 53 | %# All control-lines EXCEPT comment lines ("%#") will be inserted into |
54 | %# the generated scanner as a C-style comment. This is to aid those who | | 54 | %# the generated scanner as a C-style comment. This is to aid those who |
55 | %# edit the skeleton. | | 55 | %# edit the skeleton. |
56 | %# | | 56 | %# |
57 | | | 57 | |
58 | %not-for-header | | 58 | %not-for-header |
59 | %if-c-only | | 59 | %if-c-only |
60 | %if-not-reentrant | | 60 | %if-not-reentrant |
61 | m4_ifelse(M4_YY_PREFIX,yy,, | | 61 | m4_ifelse(M4_YY_PREFIX,yy,, |
62 | #define yy_create_buffer M4_YY_PREFIX[[_create_buffer]] | | 62 | #define yy_create_buffer M4_YY_PREFIX[[_create_buffer]] |
63 | #define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]] | | 63 | #define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]] |
64 | #define yy_flex_debug M4_YY_PREFIX[[_flex_debug]] | | 64 | #define yy_flex_debug M4_YY_PREFIX[[_flex_debug]] |
65 | #define yy_init_buffer M4_YY_PREFIX[[_init_buffer]] | | 65 | #define yy_init_buffer M4_YY_PREFIX[[_init_buffer]] |
66 | #define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]] | | 66 | #define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]] |
67 | #define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]] | | 67 | #define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]] |
68 | #define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]] | | 68 | #define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]] |
69 | #define yyin M4_YY_PREFIX[[in]] | | 69 | #define yyin M4_YY_PREFIX[[in]] |
70 | #define yyleng M4_YY_PREFIX[[leng]] | | 70 | #define yyleng M4_YY_PREFIX[[leng]] |
71 | #define yylex M4_YY_PREFIX[[lex]] | | 71 | #define yylex M4_YY_PREFIX[[lex]] |
72 | #define yylineno M4_YY_PREFIX[[lineno]] | | 72 | #define yylineno M4_YY_PREFIX[[lineno]] |
73 | #define yyout M4_YY_PREFIX[[out]] | | 73 | #define yyout M4_YY_PREFIX[[out]] |
74 | #define yyrestart M4_YY_PREFIX[[restart]] | | 74 | #define yyrestart M4_YY_PREFIX[[restart]] |
75 | #define yytext M4_YY_PREFIX[[text]] | | 75 | #define yytext M4_YY_PREFIX[[text]] |
76 | #define yywrap M4_YY_PREFIX[[wrap]] | | 76 | #define yywrap M4_YY_PREFIX[[wrap]] |
77 | #define yyalloc M4_YY_PREFIX[[alloc]] | | 77 | #define yyalloc M4_YY_PREFIX[[alloc]] |
78 | #define yyrealloc M4_YY_PREFIX[[realloc]] | | 78 | #define yyrealloc M4_YY_PREFIX[[realloc]] |
79 | #define yyfree M4_YY_PREFIX[[free]] | | 79 | #define yyfree M4_YY_PREFIX[[free]] |
80 | ) | | 80 | ) |
81 | %endif | | 81 | %endif |
82 | %endif | | 82 | %endif |
83 | %ok-for-header | | 83 | %ok-for-header |
84 | | | 84 | |
85 | #define FLEX_SCANNER | | 85 | #define FLEX_SCANNER |
86 | #define YY_FLEX_MAJOR_VERSION FLEX_MAJOR_VERSION | | 86 | #define YY_FLEX_MAJOR_VERSION FLEX_MAJOR_VERSION |
87 | #define YY_FLEX_MINOR_VERSION FLEX_MINOR_VERSION | | 87 | #define YY_FLEX_MINOR_VERSION FLEX_MINOR_VERSION |
88 | #define YY_FLEX_SUBMINOR_VERSION FLEX_SUBMINOR_VERSION | | 88 | #define YY_FLEX_SUBMINOR_VERSION FLEX_SUBMINOR_VERSION |
89 | #if YY_FLEX_SUBMINOR_VERSION > 0 | | 89 | #if YY_FLEX_SUBMINOR_VERSION > 0 |
90 | #define FLEX_BETA | | 90 | #define FLEX_BETA |
91 | #endif | | 91 | #endif |
92 | | | 92 | |
93 | %# Some negated symbols | | 93 | %# Some negated symbols |
94 | m4_ifdef( [[M4_YY_IN_HEADER]], , [[m4_define([[M4_YY_NOT_IN_HEADER]], [[]])]]) | | 94 | m4_ifdef( [[M4_YY_IN_HEADER]], , [[m4_define([[M4_YY_NOT_IN_HEADER]], [[]])]]) |
95 | m4_ifdef( [[M4_YY_REENTRANT]], , [[m4_define([[M4_YY_NOT_REENTRANT]], [[]])]]) | | 95 | m4_ifdef( [[M4_YY_REENTRANT]], , [[m4_define([[M4_YY_NOT_REENTRANT]], [[]])]]) |
96 | | | 96 | |
97 | %# This is the m4 way to say "(stack_used || is_reentrant) | | 97 | %# This is the m4 way to say "(stack_used || is_reentrant) |
98 | m4_ifdef( [[M4_YY_STACK_USED]], [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]]) | | 98 | m4_ifdef( [[M4_YY_STACK_USED]], [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]]) |
99 | m4_ifdef( [[M4_YY_REENTRANT]], [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]]) | | 99 | m4_ifdef( [[M4_YY_REENTRANT]], [[m4_define([[M4_YY_HAS_START_STACK_VARS]])]]) |
100 | | | 100 | |
101 | %# Prefixes. | | 101 | %# Prefixes. |
102 | %# The complexity here is necessary so that m4 preserves | | 102 | %# The complexity here is necessary so that m4 preserves |
103 | %# the argument lists to each C function. | | 103 | %# the argument lists to each C function. |
104 | | | 104 | |
105 | | | 105 | |
106 | m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define([[M4_YY_PREFIX]], [[yy]])]]) | | 106 | m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define([[M4_YY_PREFIX]], [[yy]])]]) |
107 | | | 107 | |
108 | m4preproc_define(`M4_GEN_PREFIX', | | 108 | m4preproc_define(`M4_GEN_PREFIX', |
109 | ``m4_define(yy[[$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') | | 109 | ``m4_define(yy[[$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') |
110 | | | 110 | |
111 | %if-c++-only | | 111 | %if-c++-only |
112 | /* The c++ scanner is a mess. The FlexLexer.h header file relies on the | | 112 | /* The c++ scanner is a mess. The FlexLexer.h header file relies on the |
113 | * following macro. This is required in order to pass the c++-multiple-scanners | | 113 | * following macro. This is required in order to pass the c++-multiple-scanners |
114 | * test in the regression suite. We get reports that it breaks inheritance. | | 114 | * test in the regression suite. We get reports that it breaks inheritance. |
115 | * We will address this in a future release of flex, or omit the C++ scanner | | 115 | * We will address this in a future release of flex, or omit the C++ scanner |
116 | * altogether. | | 116 | * altogether. |
117 | */ | | 117 | */ |
118 | #define yyFlexLexer M4_YY_PREFIX[[FlexLexer]] | | 118 | #define yyFlexLexer M4_YY_PREFIX[[FlexLexer]] |
119 | %endif | | 119 | %endif |
120 | | | 120 | |
121 | %if-c-only | | 121 | %if-c-only |
122 | M4_GEN_PREFIX(`_create_buffer') | | 122 | M4_GEN_PREFIX(`_create_buffer') |
123 | M4_GEN_PREFIX(`_delete_buffer') | | 123 | M4_GEN_PREFIX(`_delete_buffer') |
124 | M4_GEN_PREFIX(`_scan_buffer') | | 124 | M4_GEN_PREFIX(`_scan_buffer') |
125 | M4_GEN_PREFIX(`_scan_string') | | 125 | M4_GEN_PREFIX(`_scan_string') |
126 | M4_GEN_PREFIX(`_scan_bytes') | | 126 | M4_GEN_PREFIX(`_scan_bytes') |
127 | M4_GEN_PREFIX(`_init_buffer') | | 127 | M4_GEN_PREFIX(`_init_buffer') |
128 | M4_GEN_PREFIX(`_flush_buffer') | | 128 | M4_GEN_PREFIX(`_flush_buffer') |
129 | M4_GEN_PREFIX(`_load_buffer_state') | | 129 | M4_GEN_PREFIX(`_load_buffer_state') |
130 | M4_GEN_PREFIX(`_switch_to_buffer') | | 130 | M4_GEN_PREFIX(`_switch_to_buffer') |
131 | M4_GEN_PREFIX(`push_buffer_state') | | 131 | M4_GEN_PREFIX(`push_buffer_state') |
132 | M4_GEN_PREFIX(`pop_buffer_state') | | 132 | M4_GEN_PREFIX(`pop_buffer_state') |
133 | M4_GEN_PREFIX(`ensure_buffer_stack') | | 133 | M4_GEN_PREFIX(`ensure_buffer_stack') |
134 | M4_GEN_PREFIX(`lex') | | 134 | M4_GEN_PREFIX(`lex') |
135 | M4_GEN_PREFIX(`restart') | | 135 | M4_GEN_PREFIX(`restart') |
136 | M4_GEN_PREFIX(`lex_init') | | 136 | M4_GEN_PREFIX(`lex_init') |
137 | M4_GEN_PREFIX(`lex_init_extra') | | 137 | M4_GEN_PREFIX(`lex_init_extra') |
138 | M4_GEN_PREFIX(`lex_destroy') | | 138 | M4_GEN_PREFIX(`lex_destroy') |
139 | M4_GEN_PREFIX(`get_debug') | | 139 | M4_GEN_PREFIX(`get_debug') |
140 | M4_GEN_PREFIX(`set_debug') | | 140 | M4_GEN_PREFIX(`set_debug') |
141 | M4_GEN_PREFIX(`get_extra') | | 141 | M4_GEN_PREFIX(`get_extra') |
142 | M4_GEN_PREFIX(`set_extra') | | 142 | M4_GEN_PREFIX(`set_extra') |
143 | M4_GEN_PREFIX(`get_in') | | 143 | M4_GEN_PREFIX(`get_in') |
144 | M4_GEN_PREFIX(`set_in') | | 144 | M4_GEN_PREFIX(`set_in') |
145 | M4_GEN_PREFIX(`get_out') | | 145 | M4_GEN_PREFIX(`get_out') |
146 | M4_GEN_PREFIX(`set_out') | | 146 | M4_GEN_PREFIX(`set_out') |
147 | M4_GEN_PREFIX(`get_leng') | | 147 | M4_GEN_PREFIX(`get_leng') |
148 | M4_GEN_PREFIX(`get_text') | | 148 | M4_GEN_PREFIX(`get_text') |
149 | M4_GEN_PREFIX(`get_lineno') | | 149 | M4_GEN_PREFIX(`get_lineno') |
150 | M4_GEN_PREFIX(`set_lineno') | | 150 | M4_GEN_PREFIX(`set_lineno') |
151 | m4_ifdef( [[M4_YY_REENTRANT]], | | 151 | m4_ifdef( [[M4_YY_REENTRANT]], |
152 | [[ | | 152 | [[ |
153 | M4_GEN_PREFIX(`get_column') | | 153 | M4_GEN_PREFIX(`get_column') |
154 | M4_GEN_PREFIX(`set_column') | | 154 | M4_GEN_PREFIX(`set_column') |
155 | ]]) | | 155 | ]]) |
156 | M4_GEN_PREFIX(`wrap') | | 156 | M4_GEN_PREFIX(`wrap') |
157 | %endif | | 157 | %endif |
158 | | | 158 | |
159 | m4_ifdef( [[M4_YY_BISON_LVAL]], | | 159 | m4_ifdef( [[M4_YY_BISON_LVAL]], |
160 | [[ | | 160 | [[ |
161 | M4_GEN_PREFIX(`get_lval') | | 161 | M4_GEN_PREFIX(`get_lval') |
162 | M4_GEN_PREFIX(`set_lval') | | 162 | M4_GEN_PREFIX(`set_lval') |
163 | ]]) | | 163 | ]]) |
164 | | | 164 | |
165 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], | | 165 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], |
166 | [[ | | 166 | [[ |
167 | M4_GEN_PREFIX(`get_lloc') | | 167 | M4_GEN_PREFIX(`get_lloc') |
168 | M4_GEN_PREFIX(`set_lloc') | | 168 | M4_GEN_PREFIX(`set_lloc') |
169 | ]]) | | 169 | ]]) |
170 | | | 170 | |
171 | | | 171 | |
172 | M4_GEN_PREFIX(`alloc') | | 172 | M4_GEN_PREFIX(`alloc') |
173 | M4_GEN_PREFIX(`realloc') | | 173 | M4_GEN_PREFIX(`realloc') |
174 | M4_GEN_PREFIX(`free') | | 174 | M4_GEN_PREFIX(`free') |
175 | | | 175 | |
176 | %if-c-only | | 176 | %if-c-only |
177 | m4_ifdef( [[M4_YY_NOT_REENTRANT]], | | 177 | m4_ifdef( [[M4_YY_NOT_REENTRANT]], |
178 | [[ | | 178 | [[ |
179 | M4_GEN_PREFIX(`text') | | 179 | M4_GEN_PREFIX(`text') |
180 | M4_GEN_PREFIX(`leng') | | 180 | M4_GEN_PREFIX(`leng') |
181 | M4_GEN_PREFIX(`in') | | 181 | M4_GEN_PREFIX(`in') |
182 | M4_GEN_PREFIX(`out') | | 182 | M4_GEN_PREFIX(`out') |
183 | M4_GEN_PREFIX(`_flex_debug') | | 183 | M4_GEN_PREFIX(`_flex_debug') |
184 | M4_GEN_PREFIX(`lineno') | | 184 | M4_GEN_PREFIX(`lineno') |
185 | ]]) | | 185 | ]]) |
186 | %endif | | 186 | %endif |
187 | | | 187 | |
188 | | | 188 | |
189 | m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], | | 189 | m4_ifdef( [[M4_YY_TABLES_EXTERNAL]], |
190 | [[ | | 190 | [[ |
191 | M4_GEN_PREFIX(`tables_fload') | | 191 | M4_GEN_PREFIX(`tables_fload') |
192 | M4_GEN_PREFIX(`tables_destroy') | | 192 | M4_GEN_PREFIX(`tables_destroy') |
193 | M4_GEN_PREFIX(`TABLES_NAME') | | 193 | M4_GEN_PREFIX(`TABLES_NAME') |
194 | ]]) | | 194 | ]]) |
195 | | | 195 | |
196 | /* First, we deal with platform-specific or compiler-specific issues. */ | | 196 | /* First, we deal with platform-specific or compiler-specific issues. */ |
197 | | | 197 | |
198 | /* begin standard C headers. */ | | 198 | /* begin standard C headers. */ |
199 | %if-c-only | | 199 | %if-c-only |
200 | #ifdef _LIBC | | 200 | #ifdef _LIBC |
201 | #include "namespace.h" | | 201 | #include "namespace.h" |
202 | #endif | | 202 | #endif |
203 | #include <stdio.h> | | 203 | #include <stdio.h> |
204 | #include <string.h> | | 204 | #include <string.h> |
205 | #include <errno.h> | | 205 | #include <errno.h> |
206 | #include <stdlib.h> | | 206 | #include <stdlib.h> |
207 | %endif | | 207 | %endif |
208 | | | 208 | |
209 | %if-tables-serialization | | 209 | %if-tables-serialization |
210 | #include <sys/types.h> | | 210 | #include <sys/types.h> |
211 | #include <netinet/in.h> | | 211 | #include <netinet/in.h> |
212 | %endif | | 212 | %endif |
213 | /* end standard C headers. */ | | 213 | /* end standard C headers. */ |
214 | | | 214 | |
215 | %if-c-or-c++ | | 215 | %if-c-or-c++ |
216 | m4preproc_include(`flexint.h') | | 216 | m4preproc_include(`flexint.h') |
217 | %endif | | 217 | %endif |
218 | | | 218 | |
219 | %if-c++-only | | 219 | %if-c++-only |
220 | /* begin standard C++ headers. */ | | 220 | /* begin standard C++ headers. */ |
221 | #ifdef _LIBC | | 221 | #ifdef _LIBC |
222 | #include "namespace.h" | | 222 | #include "namespace.h" |
223 | #endif | | 223 | #endif |
224 | #include <iostream> | | 224 | #include <iostream> |
225 | #include <errno.h> | | 225 | #include <errno.h> |
226 | #include <cstdlib> | | 226 | #include <cstdlib> |
227 | #include <cstring> | | 227 | #include <cstring> |
228 | /* end standard C++ headers. */ | | 228 | /* end standard C++ headers. */ |
229 | %endif | | 229 | %endif |
230 | | | 230 | |
231 | #ifdef __cplusplus | | 231 | #ifdef __cplusplus |
232 | | | 232 | |
233 | /* The "const" storage-class-modifier is valid. */ | | 233 | /* The "const" storage-class-modifier is valid. */ |
234 | #define YY_USE_CONST | | 234 | #define YY_USE_CONST |
235 | | | 235 | |
236 | #else /* ! __cplusplus */ | | 236 | #else /* ! __cplusplus */ |
237 | | | 237 | |
238 | /* C99 requires __STDC__ to be defined as 1. */ | | 238 | /* C99 requires __STDC__ to be defined as 1. */ |
239 | #if defined (__STDC__) | | 239 | #if defined (__STDC__) |
240 | | | 240 | |
241 | #define YY_USE_CONST | | 241 | #define YY_USE_CONST |
242 | | | 242 | |
243 | #endif /* defined (__STDC__) */ | | 243 | #endif /* defined (__STDC__) */ |
244 | #endif /* ! __cplusplus */ | | 244 | #endif /* ! __cplusplus */ |
245 | | | 245 | |
246 | #ifdef YY_USE_CONST | | 246 | #ifdef YY_USE_CONST |
247 | #define yyconst const | | 247 | #define yyconst const |
248 | #else | | 248 | #else |
249 | #define yyconst | | 249 | #define yyconst |
250 | #endif | | 250 | #endif |
251 | | | 251 | |
252 | %# For compilers that can not handle prototypes. | | 252 | %# For compilers that can not handle prototypes. |
253 | %# e.g., | | 253 | %# e.g., |
254 | %# The function prototype | | 254 | %# The function prototype |
255 | %# int foo(int x, char* y); | | 255 | %# int foo(int x, char* y); |
256 | %# | | 256 | %# |
257 | %# ...should be written as | | 257 | %# ...should be written as |
258 | %# int foo M4_YY_PARAMS(int x, char* y); | | 258 | %# int foo M4_YY_PARAMS(int x, char* y); |
259 | %# | | 259 | %# |
260 | %# ...which could possibly generate | | 260 | %# ...which could possibly generate |
261 | %# int foo (); | | 261 | %# int foo (); |
262 | %# | | 262 | %# |
263 | m4_ifdef( [[M4_YY_NO_ANSI_FUNC_PROTOS]], | | 263 | m4_ifdef( [[M4_YY_NO_ANSI_FUNC_PROTOS]], |
264 | [[ | | 264 | [[ |
265 | m4_define( [[M4_YY_PARAMS]], [[()]]) | | 265 | m4_define( [[M4_YY_PARAMS]], [[()]]) |
266 | ]], | | 266 | ]], |
267 | [[ | | 267 | [[ |
268 | m4_define( [[M4_YY_PARAMS]], [[($*)]]) | | 268 | m4_define( [[M4_YY_PARAMS]], [[($*)]]) |
269 | ]]) | | 269 | ]]) |
270 | | | 270 | |
271 | %not-for-header | | 271 | %not-for-header |
272 | /* Returned upon end-of-file. */ | | 272 | /* Returned upon end-of-file. */ |
273 | #define YY_NULL 0 | | 273 | #define YY_NULL 0 |
274 | %ok-for-header | | 274 | %ok-for-header |
275 | | | 275 | |
276 | %not-for-header | | 276 | %not-for-header |
277 | /* Promotes a possibly negative, possibly signed char to an unsigned | | 277 | /* Promotes a possibly negative, possibly signed char to an unsigned |
278 | * integer for use as an array index. If the signed char is negative, | | 278 | * integer for use as an array index. If the signed char is negative, |
279 | * we want to instead treat it as an 8-bit unsigned char, hence the | | 279 | * we want to instead treat it as an 8-bit unsigned char, hence the |
280 | * double cast. | | 280 | * double cast. |
281 | */ | | 281 | */ |
282 | #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) | | 282 | #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
283 | %ok-for-header | | 283 | %ok-for-header |
284 | | | 284 | |
285 | | | 285 | |
286 | | | 286 | |
287 | %if-reentrant | | 287 | %if-reentrant |
288 | | | 288 | |
289 | /* An opaque pointer. */ | | 289 | /* An opaque pointer. */ |
290 | #ifndef YY_TYPEDEF_YY_SCANNER_T | | 290 | #ifndef YY_TYPEDEF_YY_SCANNER_T |
291 | #define YY_TYPEDEF_YY_SCANNER_T | | 291 | #define YY_TYPEDEF_YY_SCANNER_T |
292 | typedef void* yyscan_t; | | 292 | typedef void* yyscan_t; |
293 | #endif | | 293 | #endif |
294 | | | 294 | |
295 | %# Declare yyguts variable | | 295 | %# Declare yyguts variable |
296 | m4_define( [[M4_YY_DECL_GUTS_VAR]], [[struct yyguts_t * yyg = (struct yyguts_t*)yyscanner]]) | | 296 | m4_define( [[M4_YY_DECL_GUTS_VAR]], [[struct yyguts_t * yyg = (struct yyguts_t*)yyscanner]]) |
297 | %# For use wherever a Global is accessed or assigned. | | 297 | %# For use wherever a Global is accessed or assigned. |
298 | m4_define( [[YY_G]], [[yyg->$1]]) | | 298 | m4_define( [[YY_G]], [[yyg->$1]]) |
299 | | | 299 | |
300 | %# For use in function prototypes to append the additional argument. | | 300 | %# For use in function prototypes to append the additional argument. |
301 | m4_define( [[M4_YY_PROTO_LAST_ARG]], [[, yyscan_t yyscanner]]) | | 301 | m4_define( [[M4_YY_PROTO_LAST_ARG]], [[, yyscan_t yyscanner]]) |
302 | m4_define( [[M4_YY_PROTO_ONLY_ARG]], [[yyscan_t yyscanner]]) | | 302 | m4_define( [[M4_YY_PROTO_ONLY_ARG]], [[yyscan_t yyscanner]]) |
303 | | | 303 | |
304 | %# For use in function definitions to append the additional argument. | | 304 | %# For use in function definitions to append the additional argument. |
305 | m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]], | | 305 | m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]], |
306 | [[ | | 306 | [[ |
307 | m4_define( [[M4_YY_DEF_LAST_ARG]], [[, yyscanner]]) | | 307 | m4_define( [[M4_YY_DEF_LAST_ARG]], [[, yyscanner]]) |
308 | m4_define( [[M4_YY_DEF_ONLY_ARG]], [[yyscanner]]) | | 308 | m4_define( [[M4_YY_DEF_ONLY_ARG]], [[yyscanner]]) |
309 | ]], | | 309 | ]], |
310 | [[ | | 310 | [[ |
311 | m4_define( [[M4_YY_DEF_LAST_ARG]], [[, yyscan_t yyscanner]]) | | 311 | m4_define( [[M4_YY_DEF_LAST_ARG]], [[, yyscan_t yyscanner]]) |
312 | m4_define( [[M4_YY_DEF_ONLY_ARG]], [[yyscan_t yyscanner]]) | | 312 | m4_define( [[M4_YY_DEF_ONLY_ARG]], [[yyscan_t yyscanner]]) |
313 | ]]) | | 313 | ]]) |
314 | m4_define( [[M4_YY_DECL_LAST_ARG]], [[yyscan_t yyscanner;]]) | | 314 | m4_define( [[M4_YY_DECL_LAST_ARG]], [[yyscan_t yyscanner;]]) |
315 | | | 315 | |
316 | %# For use in function calls to pass the additional argument. | | 316 | %# For use in function calls to pass the additional argument. |
317 | m4_define( [[M4_YY_CALL_LAST_ARG]], [[, yyscanner]]) | | 317 | m4_define( [[M4_YY_CALL_LAST_ARG]], [[, yyscanner]]) |
318 | m4_define( [[M4_YY_CALL_ONLY_ARG]], [[yyscanner]]) | | 318 | m4_define( [[M4_YY_CALL_ONLY_ARG]], [[yyscanner]]) |
319 | | | 319 | |
320 | %# For use in function documentation to adjust for additional argument. | | 320 | %# For use in function documentation to adjust for additional argument. |
321 | m4_define( [[M4_YY_DOC_PARAM]], [[@param yyscanner The scanner object.]]) | | 321 | m4_define( [[M4_YY_DOC_PARAM]], [[@param yyscanner The scanner object.]]) |
322 | | | 322 | |
323 | /* For convenience, these vars (plus the bison vars far below) | | 323 | /* For convenience, these vars (plus the bison vars far below) |
324 | are macros in the reentrant scanner. */ | | 324 | are macros in the reentrant scanner. */ |
325 | #define yyin YY_G(yyin_r) | | 325 | #define yyin YY_G(yyin_r) |
326 | #define yyout YY_G(yyout_r) | | 326 | #define yyout YY_G(yyout_r) |
327 | #define yyextra YY_G(yyextra_r) | | 327 | #define yyextra YY_G(yyextra_r) |
328 | #define yyleng YY_G(yyleng_r) | | 328 | #define yyleng YY_G(yyleng_r) |
329 | #define yytext YY_G(yytext_r) | | 329 | #define yytext YY_G(yytext_r) |
330 | #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) | | 330 | #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) |
331 | #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) | | 331 | #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) |
332 | #define yy_flex_debug YY_G(yy_flex_debug_r) | | 332 | #define yy_flex_debug YY_G(yy_flex_debug_r) |
333 | | | 333 | |
334 | m4_define( [[M4_YY_INCR_LINENO]], | | 334 | m4_define( [[M4_YY_INCR_LINENO]], |
335 | [[ | | 335 | [[ |
336 | do{ yylineno++; | | 336 | do{ yylineno++; |
337 | yycolumn=0; | | 337 | yycolumn=0; |
338 | }while(0) | | 338 | }while(0) |
339 | ]]) | | 339 | ]]) |
340 | | | 340 | |
341 | %endif | | 341 | %endif |
342 | | | 342 | |
343 | | | 343 | |
344 | | | 344 | |
345 | %if-not-reentrant | | 345 | %if-not-reentrant |
346 | | | 346 | |
347 | m4_define( [[M4_YY_INCR_LINENO]], | | 347 | m4_define( [[M4_YY_INCR_LINENO]], |
348 | [[ | | 348 | [[ |
349 | yylineno++; | | 349 | yylineno++; |
350 | ]]) | | 350 | ]]) |
351 | | | 351 | |
352 | %# Define these macros to be no-ops. | | 352 | %# Define these macros to be no-ops. |
353 | m4_define( [[M4_YY_DECL_GUTS_VAR]], [[m4_dnl]]) | | 353 | m4_define( [[M4_YY_DECL_GUTS_VAR]], [[m4_dnl]]) |
354 | m4_define( [[YY_G]], [[($1)]]) | | 354 | m4_define( [[YY_G]], [[($1)]]) |
355 | m4_define( [[M4_YY_PROTO_LAST_ARG]]) | | 355 | m4_define( [[M4_YY_PROTO_LAST_ARG]]) |
356 | m4_define( [[M4_YY_PROTO_ONLY_ARG]], [[void]]) | | 356 | m4_define( [[M4_YY_PROTO_ONLY_ARG]], [[void]]) |
357 | m4_define( [[M4_YY_DEF_LAST_ARG]]) | | 357 | m4_define( [[M4_YY_DEF_LAST_ARG]]) |
358 | | | 358 | |
359 | m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]], | | 359 | m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]], |
360 | [[ | | 360 | [[ |
361 | m4_define( [[M4_YY_DEF_ONLY_ARG]]) | | 361 | m4_define( [[M4_YY_DEF_ONLY_ARG]]) |
362 | ]], | | 362 | ]], |
363 | [[ | | 363 | [[ |
364 | m4_define( [[M4_YY_DEF_ONLY_ARG]], [[void]]) | | 364 | m4_define( [[M4_YY_DEF_ONLY_ARG]], [[void]]) |
365 | ]]) | | 365 | ]]) |
366 | m4_define([[M4_YY_DECL_LAST_ARG]]) | | 366 | m4_define([[M4_YY_DECL_LAST_ARG]]) |
367 | m4_define([[M4_YY_CALL_LAST_ARG]]) | | 367 | m4_define([[M4_YY_CALL_LAST_ARG]]) |
368 | m4_define([[M4_YY_CALL_ONLY_ARG]]) | | 368 | m4_define([[M4_YY_CALL_ONLY_ARG]]) |
369 | m4_define( [[M4_YY_DOC_PARAM]], [[]]) | | 369 | m4_define( [[M4_YY_DOC_PARAM]], [[]]) |
370 | | | 370 | |
371 | %endif | | 371 | %endif |
372 | | | 372 | |
373 | | | 373 | |
374 | m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]], | | 374 | m4_ifdef( [[M4_YY_NO_ANSI_FUNC_DEFS]], |
375 | [[ | | 375 | [[ |
376 | %# For compilers that need traditional function definitions. | | 376 | %# For compilers that need traditional function definitions. |
377 | %# e.g., | | 377 | %# e.g., |
378 | %# The function prototype taking 2 arguments | | 378 | %# The function prototype taking 2 arguments |
379 | %# int foo (int x, char* y) | | 379 | %# int foo (int x, char* y) |
380 | %# | | 380 | %# |
381 | %# ...should be written as | | 381 | %# ...should be written as |
382 | %# int foo YYFARGS2(int,x, char*,y) | | 382 | %# int foo YYFARGS2(int,x, char*,y) |
383 | %# | | 383 | %# |
384 | %# ...which could possibly generate | | 384 | %# ...which could possibly generate |
385 | %# int foo (x,y,yyscanner) | | 385 | %# int foo (x,y,yyscanner) |
386 | %# int x; | | 386 | %# int x; |
387 | %# char * y; | | 387 | %# char * y; |
388 | %# yyscan_t yyscanner; | | 388 | %# yyscan_t yyscanner; |
389 | %# | | 389 | %# |
390 | %# Generate traditional function defs | | 390 | %# Generate traditional function defs |
391 | m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG) [[\]] | | 391 | m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG) [[\]] |
392 | M4_YY_DECL_LAST_ARG]]) | | 392 | M4_YY_DECL_LAST_ARG]]) |
393 | m4_define( [[YYFARGS1]], [[($2 M4_YY_DEF_LAST_ARG) [[\]] | | 393 | m4_define( [[YYFARGS1]], [[($2 M4_YY_DEF_LAST_ARG) [[\]] |
394 | $1 $2; [[\]] | | 394 | $1 $2; [[\]] |
395 | M4_YY_DECL_LAST_ARG]]) | | 395 | M4_YY_DECL_LAST_ARG]]) |
396 | m4_define( [[YYFARGS2]], [[($2,$4 M4_YY_DEF_LAST_ARG) [[\]] | | 396 | m4_define( [[YYFARGS2]], [[($2,$4 M4_YY_DEF_LAST_ARG) [[\]] |
397 | $1 $2; [[\]] | | 397 | $1 $2; [[\]] |
398 | $3 $4; [[\]] | | 398 | $3 $4; [[\]] |
399 | M4_YY_DECL_LAST_ARG]]) | | 399 | M4_YY_DECL_LAST_ARG]]) |
400 | m4_define( [[YYFARGS3]], [[($2,$4,$6 M4_YY_DEF_LAST_ARG) [[\]] | | 400 | m4_define( [[YYFARGS3]], [[($2,$4,$6 M4_YY_DEF_LAST_ARG) [[\]] |
401 | $1 $2; [[\]] | | 401 | $1 $2; [[\]] |
402 | $3 $4; [[\]] | | 402 | $3 $4; [[\]] |
403 | $5 $6; [[\]] | | 403 | $5 $6; [[\]] |
404 | M4_YY_DECL_LAST_ARG]]) | | 404 | M4_YY_DECL_LAST_ARG]]) |
405 | ]], | | 405 | ]], |
406 | [[ | | 406 | [[ |
407 | %# Generate C99 function defs. | | 407 | %# Generate C99 function defs. |
408 | m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG)]]) | | 408 | m4_define( [[YYFARGS0]], [[(M4_YY_DEF_ONLY_ARG)]]) |
409 | m4_define( [[YYFARGS1]], [[($1 $2 M4_YY_DEF_LAST_ARG)]]) | | 409 | m4_define( [[YYFARGS1]], [[($1 $2 M4_YY_DEF_LAST_ARG)]]) |
410 | m4_define( [[YYFARGS2]], [[($1 $2, $3 $4 M4_YY_DEF_LAST_ARG)]]) | | 410 | m4_define( [[YYFARGS2]], [[($1 $2, $3 $4 M4_YY_DEF_LAST_ARG)]]) |
411 | m4_define( [[YYFARGS3]], [[($1 $2, $3 $4, $5 $6 M4_YY_DEF_LAST_ARG)]]) | | 411 | m4_define( [[YYFARGS3]], [[($1 $2, $3 $4, $5 $6 M4_YY_DEF_LAST_ARG)]]) |
412 | ]]) | | 412 | ]]) |
413 | | | 413 | |
414 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 414 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
415 | [[ | | 415 | [[ |
416 | /* Enter a start condition. This macro really ought to take a parameter, | | 416 | /* Enter a start condition. This macro really ought to take a parameter, |
417 | * but we do it the disgusting crufty way forced on us by the ()-less | | 417 | * but we do it the disgusting crufty way forced on us by the ()-less |
418 | * definition of BEGIN. | | 418 | * definition of BEGIN. |
419 | */ | | 419 | */ |
420 | #define BEGIN YY_G(yy_start) = 1 + 2 * | | 420 | #define BEGIN YY_G(yy_start) = 1 + 2 * |
421 | ]]) | | 421 | ]]) |
422 | | | 422 | |
423 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 423 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
424 | [[ | | 424 | [[ |
425 | /* Translate the current start state into a value that can be later handed | | 425 | /* Translate the current start state into a value that can be later handed |
426 | * to BEGIN to return to the state. The YYSTATE alias is for lex | | 426 | * to BEGIN to return to the state. The YYSTATE alias is for lex |
427 | * compatibility. | | 427 | * compatibility. |
428 | */ | | 428 | */ |
429 | #define YY_START ((YY_G(yy_start) - 1) / 2) | | 429 | #define YY_START ((YY_G(yy_start) - 1) / 2) |
430 | #define YYSTATE YY_START | | 430 | #define YYSTATE YY_START |
431 | ]]) | | 431 | ]]) |
432 | | | 432 | |
433 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 433 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
434 | [[ | | 434 | [[ |
435 | /* Action number for EOF rule of a given start state. */ | | 435 | /* Action number for EOF rule of a given start state. */ |
436 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) | | 436 | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
437 | ]]) | | 437 | ]]) |
438 | | | 438 | |
439 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 439 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
440 | [[ | | 440 | [[ |
441 | /* Special action meaning "start processing a new file". */ | | 441 | /* Special action meaning "start processing a new file". */ |
442 | #define YY_NEW_FILE yyrestart( yyin M4_YY_CALL_LAST_ARG ) | | 442 | #define YY_NEW_FILE yyrestart( yyin M4_YY_CALL_LAST_ARG ) |
443 | ]]) | | 443 | ]]) |
444 | | | 444 | |
445 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 445 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
446 | [[ | | 446 | [[ |
447 | #define YY_END_OF_BUFFER_CHAR 0 | | 447 | #define YY_END_OF_BUFFER_CHAR 0 |
448 | ]]) | | 448 | ]]) |
449 | | | 449 | |
450 | /* Size of default input buffer. */ | | 450 | /* Size of default input buffer. */ |
451 | #ifndef YY_BUF_SIZE | | 451 | #ifndef YY_BUF_SIZE |
452 | #define YY_BUF_SIZE 16384 | | 452 | #define YY_BUF_SIZE 16384 |
453 | #endif | | 453 | #endif |
454 | | | 454 | |
455 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 455 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
456 | [[ | | 456 | [[ |
457 | /* The state buf must be large enough to hold one state per character in the main buffer. | | 457 | /* The state buf must be large enough to hold one state per character in the main buffer. |
458 | */ | | 458 | */ |
459 | #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) | | 459 | #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
460 | ]]) | | 460 | ]]) |
461 | | | 461 | |
462 | | | 462 | |
463 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE | | 463 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE |
464 | #define YY_TYPEDEF_YY_BUFFER_STATE | | 464 | #define YY_TYPEDEF_YY_BUFFER_STATE |
465 | typedef struct yy_buffer_state *YY_BUFFER_STATE; | | 465 | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
466 | #endif | | 466 | #endif |
467 | | | 467 | |
468 | %if-not-reentrant | | 468 | %if-not-reentrant |
469 | extern int yyleng; | | 469 | extern int yyleng; |
470 | %endif | | 470 | %endif |
471 | | | 471 | |
472 | %if-c-only | | 472 | %if-c-only |
473 | %if-not-reentrant | | 473 | %if-not-reentrant |
474 | extern FILE *yyin, *yyout; | | 474 | extern FILE *yyin, *yyout; |
475 | %endif | | 475 | %endif |
476 | %endif | | 476 | %endif |
477 | | | 477 | |
478 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 478 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
479 | [[ | | 479 | [[ |
480 | #define EOB_ACT_CONTINUE_SCAN 0 | | 480 | #define EOB_ACT_CONTINUE_SCAN 0 |
481 | #define EOB_ACT_END_OF_FILE 1 | | 481 | #define EOB_ACT_END_OF_FILE 1 |
482 | #define EOB_ACT_LAST_MATCH 2 | | 482 | #define EOB_ACT_LAST_MATCH 2 |
483 | ]]) | | 483 | ]]) |
484 | | | 484 | |
485 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 485 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
486 | [[ | | 486 | [[ |
487 | m4_ifdef( [[M4_YY_USE_LINENO]], | | 487 | m4_ifdef( [[M4_YY_USE_LINENO]], |
488 | [[ | | 488 | [[ |
489 | /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires | | 489 | /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires |
490 | * access to the local variable yy_act. Since yyless() is a macro, it would break | | 490 | * access to the local variable yy_act. Since yyless() is a macro, it would break |
491 | * existing scanners that call yyless() from OUTSIDE yylex. | | 491 | * existing scanners that call yyless() from OUTSIDE yylex. |
492 | * One obvious solution it to make yy_act a global. I tried that, and saw | | 492 | * One obvious solution it to make yy_act a global. I tried that, and saw |
493 | * a 5% performance hit in a non-yylineno scanner, because yy_act is | | 493 | * a 5% performance hit in a non-yylineno scanner, because yy_act is |
494 | * normally declared as a register variable-- so it is not worth it. | | 494 | * normally declared as a register variable-- so it is not worth it. |
495 | */ | | 495 | */ |
496 | #define YY_LESS_LINENO(n) \ | | 496 | #define YY_LESS_LINENO(n) \ |
497 | do { \ | | 497 | do { \ |
498 | int yyl;\ | | 498 | int yyl;\ |
499 | for ( yyl = n; yyl < yyleng; ++yyl )\ | | 499 | for ( yyl = n; yyl < yyleng; ++yyl )\ |
500 | if ( yytext[yyl] == '\n' )\ | | 500 | if ( yytext[yyl] == '\n' )\ |
501 | --yylineno;\ | | 501 | --yylineno;\ |
502 | }while(0) | | 502 | }while(0) |
503 | ]], | | 503 | ]], |
504 | [[ | | 504 | [[ |
505 | #define YY_LESS_LINENO(n) | | 505 | #define YY_LESS_LINENO(n) |
506 | ]]) | | 506 | ]]) |
507 | ]]) | | 507 | ]]) |
508 | | | 508 | |
509 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 509 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
510 | [[ | | 510 | [[ |
511 | /* Return all but the first "n" matched characters back to the input stream. */ | | 511 | /* Return all but the first "n" matched characters back to the input stream. */ |
512 | #define yyless(n) \ | | 512 | #define yyless(n) \ |
513 | do \ | | 513 | do \ |
514 | { \ | | 514 | { \ |
515 | /* Undo effects of setting up yytext. */ \ | | 515 | /* Undo effects of setting up yytext. */ \ |
516 | int yyless_macro_arg = (n); \ | | 516 | int yyless_macro_arg = (n); \ |
517 | YY_LESS_LINENO(yyless_macro_arg);\ | | 517 | YY_LESS_LINENO(yyless_macro_arg);\ |
518 | *yy_cp = YY_G(yy_hold_char); \ | | 518 | *yy_cp = YY_G(yy_hold_char); \ |
519 | YY_RESTORE_YY_MORE_OFFSET \ | | 519 | YY_RESTORE_YY_MORE_OFFSET \ |
520 | YY_G(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ | | 520 | YY_G(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
521 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ | | 521 | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
522 | } \ | | 522 | } \ |
523 | while ( 0 ) | | 523 | while ( 0 ) |
524 | ]]) | | 524 | ]]) |
525 | | | 525 | |
526 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 526 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
527 | [[ | | 527 | [[ |
528 | #define unput(c) yyunput( c, YY_G(yytext_ptr) M4_YY_CALL_LAST_ARG ) | | 528 | #define unput(c) yyunput( c, YY_G(yytext_ptr) M4_YY_CALL_LAST_ARG ) |
529 | ]]) | | 529 | ]]) |
530 | | | 530 | |
531 | #ifndef YY_TYPEDEF_YY_SIZE_T | | 531 | #ifndef YY_TYPEDEF_YY_SIZE_T |
532 | #define YY_TYPEDEF_YY_SIZE_T | | 532 | #define YY_TYPEDEF_YY_SIZE_T |
533 | typedef size_t yy_size_t; | | 533 | typedef size_t yy_size_t; |
534 | #endif | | 534 | #endif |
535 | | | 535 | |
536 | #ifndef YY_STRUCT_YY_BUFFER_STATE | | 536 | #ifndef YY_STRUCT_YY_BUFFER_STATE |
537 | #define YY_STRUCT_YY_BUFFER_STATE | | 537 | #define YY_STRUCT_YY_BUFFER_STATE |
538 | struct yy_buffer_state | | 538 | struct yy_buffer_state |
539 | { | | 539 | { |
540 | %if-c-only | | 540 | %if-c-only |
541 | FILE *yy_input_file; | | 541 | FILE *yy_input_file; |
542 | %endif | | 542 | %endif |
543 | | | 543 | |
544 | %if-c++-only | | 544 | %if-c++-only |
545 | std::istream* yy_input_file; | | 545 | std::istream* yy_input_file; |
546 | %endif | | 546 | %endif |
547 | | | 547 | |
548 | | | 548 | |
549 | char *yy_ch_buf; /* input buffer */ | | 549 | char *yy_ch_buf; /* input buffer */ |
550 | char *yy_buf_pos; /* current position in input buffer */ | | 550 | char *yy_buf_pos; /* current position in input buffer */ |
551 | | | 551 | |
552 | /* Size of input buffer in bytes, not including room for EOB | | 552 | /* Size of input buffer in bytes, not including room for EOB |
553 | * characters. | | 553 | * characters. |
554 | */ | | 554 | */ |
555 | yy_size_t yy_buf_size; | | 555 | yy_size_t yy_buf_size; |
556 | | | 556 | |
557 | /* Number of characters read into yy_ch_buf, not including EOB | | 557 | /* Number of characters read into yy_ch_buf, not including EOB |
558 | * characters. | | 558 | * characters. |
559 | */ | | 559 | */ |
560 | int yy_n_chars; | | 560 | int yy_n_chars; |
561 | | | 561 | |
562 | /* Whether we "own" the buffer - i.e., we know we created it, | | 562 | /* Whether we "own" the buffer - i.e., we know we created it, |
563 | * and can realloc() it to grow it, and should free() it to | | 563 | * and can realloc() it to grow it, and should free() it to |
564 | * delete it. | | 564 | * delete it. |
565 | */ | | 565 | */ |
566 | int yy_is_our_buffer; | | 566 | int yy_is_our_buffer; |
567 | | | 567 | |
568 | /* Whether this is an "interactive" input source; if so, and | | 568 | /* Whether this is an "interactive" input source; if so, and |
569 | * if we're using stdio for input, then we want to use getc() | | 569 | * if we're using stdio for input, then we want to use getc() |
570 | * instead of fread(), to make sure we stop fetching input after | | 570 | * instead of fread(), to make sure we stop fetching input after |
571 | * each newline. | | 571 | * each newline. |
572 | */ | | 572 | */ |
573 | int yy_is_interactive; | | 573 | int yy_is_interactive; |
574 | | | 574 | |
575 | /* Whether we're considered to be at the beginning of a line. | | 575 | /* Whether we're considered to be at the beginning of a line. |
576 | * If so, '^' rules will be active on the next match, otherwise | | 576 | * If so, '^' rules will be active on the next match, otherwise |
577 | * not. | | 577 | * not. |
578 | */ | | 578 | */ |
579 | int yy_at_bol; | | 579 | int yy_at_bol; |
580 | | | 580 | |
581 | int yy_bs_lineno; /**< The line count. */ | | 581 | int yy_bs_lineno; /**< The line count. */ |
582 | int yy_bs_column; /**< The column count. */ | | 582 | int yy_bs_column; /**< The column count. */ |
583 | | | 583 | |
584 | | | 584 | |
585 | /* Whether to try to fill the input buffer when we reach the | | 585 | /* Whether to try to fill the input buffer when we reach the |
586 | * end of it. | | 586 | * end of it. |
587 | */ | | 587 | */ |
588 | int yy_fill_buffer; | | 588 | int yy_fill_buffer; |
589 | | | 589 | |
590 | int yy_buffer_status; | | 590 | int yy_buffer_status; |
591 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 591 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
592 | [[ | | 592 | [[ |
593 | #define YY_BUFFER_NEW 0 | | 593 | #define YY_BUFFER_NEW 0 |
594 | #define YY_BUFFER_NORMAL 1 | | 594 | #define YY_BUFFER_NORMAL 1 |
595 | /* When an EOF's been seen but there's still some text to process | | 595 | /* When an EOF's been seen but there's still some text to process |
596 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we | | 596 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
597 | * shouldn't try reading from the input source any more. We might | | 597 | * shouldn't try reading from the input source any more. We might |
598 | * still have a bunch of tokens to match, though, because of | | 598 | * still have a bunch of tokens to match, though, because of |
599 | * possible backing-up. | | 599 | * possible backing-up. |
600 | * | | 600 | * |
601 | * When we actually see the EOF, we change the status to "new" | | 601 | * When we actually see the EOF, we change the status to "new" |
602 | * (via yyrestart()), so that the user can continue scanning by | | 602 | * (via yyrestart()), so that the user can continue scanning by |
603 | * just pointing yyin at a new input file. | | 603 | * just pointing yyin at a new input file. |
604 | */ | | 604 | */ |
605 | #define YY_BUFFER_EOF_PENDING 2 | | 605 | #define YY_BUFFER_EOF_PENDING 2 |
606 | ]]) | | 606 | ]]) |
607 | }; | | 607 | }; |
608 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ | | 608 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
609 | | | 609 | |
610 | %if-c-only Standard (non-C++) definition | | 610 | %if-c-only Standard (non-C++) definition |
611 | %not-for-header | | 611 | %not-for-header |
612 | %if-not-reentrant | | 612 | %if-not-reentrant |
613 | | | 613 | |
614 | /* Stack of input buffers. */ | | 614 | /* Stack of input buffers. */ |
615 | static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ | | 615 | static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ |
616 | static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ | | 616 | static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ |
617 | static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ | | 617 | static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ |
618 | %endif | | 618 | %endif |
619 | %ok-for-header | | 619 | %ok-for-header |
620 | %endif | | 620 | %endif |
621 | | | 621 | |
622 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 622 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
623 | [[ | | 623 | [[ |
624 | /* We provide macros for accessing buffer states in case in the | | 624 | /* We provide macros for accessing buffer states in case in the |
625 | * future we want to put the buffer states in a more general | | 625 | * future we want to put the buffer states in a more general |
626 | * "scanner state". | | 626 | * "scanner state". |
627 | * | | 627 | * |
628 | * Returns the top of the stack, or NULL. | | 628 | * Returns the top of the stack, or NULL. |
629 | */ | | 629 | */ |
630 | #define YY_CURRENT_BUFFER ( YY_G(yy_buffer_stack) \ | | 630 | #define YY_CURRENT_BUFFER ( YY_G(yy_buffer_stack) \ |
631 | ? YY_G(yy_buffer_stack)[YY_G(yy_buffer_stack_top)] \ | | 631 | ? YY_G(yy_buffer_stack)[YY_G(yy_buffer_stack_top)] \ |
632 | : NULL) | | 632 | : NULL) |
633 | ]]) | | 633 | ]]) |
634 | | | 634 | |
635 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 635 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
636 | [[ | | 636 | [[ |
637 | /* Same as previous macro, but useful when we know that the buffer stack is not | | 637 | /* Same as previous macro, but useful when we know that the buffer stack is not |
638 | * NULL or when we need an lvalue. For internal use only. | | 638 | * NULL or when we need an lvalue. For internal use only. |
639 | */ | | 639 | */ |
640 | #define YY_CURRENT_BUFFER_LVALUE YY_G(yy_buffer_stack)[YY_G(yy_buffer_stack_top)] | | 640 | #define YY_CURRENT_BUFFER_LVALUE YY_G(yy_buffer_stack)[YY_G(yy_buffer_stack_top)] |
641 | ]]) | | 641 | ]]) |
642 | | | 642 | |
643 | %if-c-only Standard (non-C++) definition | | 643 | %if-c-only Standard (non-C++) definition |
644 | | | 644 | |
645 | %if-not-reentrant | | 645 | %if-not-reentrant |
646 | %not-for-header | | 646 | %not-for-header |
647 | /* yy_hold_char holds the character lost when yytext is formed. */ | | 647 | /* yy_hold_char holds the character lost when yytext is formed. */ |
648 | static char yy_hold_char; | | 648 | static char yy_hold_char; |
649 | static int yy_n_chars; /* number of characters read into yy_ch_buf */ | | 649 | static int yy_n_chars; /* number of characters read into yy_ch_buf */ |
650 | int yyleng; | | 650 | int yyleng; |
651 | | | 651 | |
652 | /* Points to current character in buffer. */ | | 652 | /* Points to current character in buffer. */ |
653 | static char *yy_c_buf_p = (char *) 0; | | 653 | static char *yy_c_buf_p = (char *) 0; |
654 | static int yy_init = 0; /* whether we need to initialize */ | | 654 | static int yy_init = 0; /* whether we need to initialize */ |
655 | static int yy_start = 0; /* start state number */ | | 655 | static int yy_start = 0; /* start state number */ |
656 | | | 656 | |
657 | /* Flag which is used to allow yywrap()'s to do buffer switches | | 657 | /* Flag which is used to allow yywrap()'s to do buffer switches |
658 | * instead of setting up a fresh yyin. A bit of a hack ... | | 658 | * instead of setting up a fresh yyin. A bit of a hack ... |
659 | */ | | 659 | */ |
660 | static int yy_did_buffer_switch_on_eof; | | 660 | static int yy_did_buffer_switch_on_eof; |
661 | %ok-for-header | | 661 | %ok-for-header |
662 | %endif | | 662 | %endif |
663 | | | 663 | |
664 | void yyrestart M4_YY_PARAMS( FILE *input_file M4_YY_PROTO_LAST_ARG ); | | 664 | void yyrestart M4_YY_PARAMS( FILE *input_file M4_YY_PROTO_LAST_ARG ); |
665 | void yy_switch_to_buffer M4_YY_PARAMS( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG ); | | 665 | void yy_switch_to_buffer M4_YY_PARAMS( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG ); |
666 | YY_BUFFER_STATE yy_create_buffer M4_YY_PARAMS( FILE *file, int size M4_YY_PROTO_LAST_ARG ); | | 666 | YY_BUFFER_STATE yy_create_buffer M4_YY_PARAMS( FILE *file, int size M4_YY_PROTO_LAST_ARG ); |
667 | void yy_delete_buffer M4_YY_PARAMS( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG ); | | 667 | void yy_delete_buffer M4_YY_PARAMS( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG ); |
668 | void yy_flush_buffer M4_YY_PARAMS( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG ); | | 668 | void yy_flush_buffer M4_YY_PARAMS( YY_BUFFER_STATE b M4_YY_PROTO_LAST_ARG ); |
669 | void yypush_buffer_state M4_YY_PARAMS( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG ); | | 669 | void yypush_buffer_state M4_YY_PARAMS( YY_BUFFER_STATE new_buffer M4_YY_PROTO_LAST_ARG ); |
670 | void yypop_buffer_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 670 | void yypop_buffer_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
671 | | | 671 | |
672 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 672 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
673 | [[ | | 673 | [[ |
674 | static void yyensure_buffer_stack M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 674 | static void yyensure_buffer_stack M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
675 | static void yy_load_buffer_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 675 | static void yy_load_buffer_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
676 | static void yy_init_buffer M4_YY_PARAMS( YY_BUFFER_STATE b, FILE *file M4_YY_PROTO_LAST_ARG ); | | 676 | static void yy_init_buffer M4_YY_PARAMS( YY_BUFFER_STATE b, FILE *file M4_YY_PROTO_LAST_ARG ); |
677 | ]]) | | 677 | ]]) |
678 | | | 678 | |
679 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 679 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
680 | [[ | | 680 | [[ |
681 | #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG) | | 681 | #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG) |
682 | ]]) | | 682 | ]]) |
683 | | | 683 | |
684 | YY_BUFFER_STATE yy_scan_buffer M4_YY_PARAMS( char *base, yy_size_t size M4_YY_PROTO_LAST_ARG ); | | 684 | YY_BUFFER_STATE yy_scan_buffer M4_YY_PARAMS( char *base, yy_size_t size M4_YY_PROTO_LAST_ARG ); |
685 | YY_BUFFER_STATE yy_scan_string M4_YY_PARAMS( yyconst char *yy_str M4_YY_PROTO_LAST_ARG ); | | 685 | YY_BUFFER_STATE yy_scan_string M4_YY_PARAMS( yyconst char *yy_str M4_YY_PROTO_LAST_ARG ); |
686 | YY_BUFFER_STATE yy_scan_bytes M4_YY_PARAMS( yyconst char *bytes, int len M4_YY_PROTO_LAST_ARG ); | | 686 | YY_BUFFER_STATE yy_scan_bytes M4_YY_PARAMS( yyconst char *bytes, int len M4_YY_PROTO_LAST_ARG ); |
687 | | | 687 | |
688 | %endif | | 688 | %endif |
689 | | | 689 | |
690 | void *yyalloc M4_YY_PARAMS( yy_size_t M4_YY_PROTO_LAST_ARG ); | | 690 | void *yyalloc M4_YY_PARAMS( yy_size_t M4_YY_PROTO_LAST_ARG ); |
691 | void *yyrealloc M4_YY_PARAMS( void *, yy_size_t M4_YY_PROTO_LAST_ARG ); | | 691 | void *yyrealloc M4_YY_PARAMS( void *, yy_size_t M4_YY_PROTO_LAST_ARG ); |
692 | void yyfree M4_YY_PARAMS( void * M4_YY_PROTO_LAST_ARG ); | | 692 | void yyfree M4_YY_PARAMS( void * M4_YY_PROTO_LAST_ARG ); |
693 | | | 693 | |
694 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 694 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
695 | [[ | | 695 | [[ |
696 | #define yy_new_buffer yy_create_buffer | | 696 | #define yy_new_buffer yy_create_buffer |
697 | ]]) | | 697 | ]]) |
698 | | | 698 | |
699 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 699 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
700 | [[ | | 700 | [[ |
701 | #define yy_set_interactive(is_interactive) \ | | 701 | #define yy_set_interactive(is_interactive) \ |
702 | { \ | | 702 | { \ |
703 | if ( ! YY_CURRENT_BUFFER ){ \ | | 703 | if ( ! YY_CURRENT_BUFFER ){ \ |
704 | yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); \ | | 704 | yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); \ |
705 | YY_CURRENT_BUFFER_LVALUE = \ | | 705 | YY_CURRENT_BUFFER_LVALUE = \ |
706 | yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); \ | | 706 | yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); \ |
707 | } \ | | 707 | } \ |
708 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ | | 708 | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
709 | } | | 709 | } |
710 | ]]) | | 710 | ]]) |
711 | | | 711 | |
712 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 712 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
713 | [[ | | 713 | [[ |
714 | #define yy_set_bol(at_bol) \ | | 714 | #define yy_set_bol(at_bol) \ |
715 | { \ | | 715 | { \ |
716 | if ( ! YY_CURRENT_BUFFER ){\ | | 716 | if ( ! YY_CURRENT_BUFFER ){\ |
717 | yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); \ | | 717 | yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); \ |
718 | YY_CURRENT_BUFFER_LVALUE = \ | | 718 | YY_CURRENT_BUFFER_LVALUE = \ |
719 | yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); \ | | 719 | yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); \ |
720 | } \ | | 720 | } \ |
721 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ | | 721 | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
722 | } | | 722 | } |
723 | ]]) | | 723 | ]]) |
724 | | | 724 | |
725 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 725 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
726 | [[ | | 726 | [[ |
727 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) | | 727 | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
728 | ]]) | | 728 | ]]) |
729 | | | 729 | |
730 | %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here | | 730 | %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here |
731 | | | 731 | |
732 | %if-c-only Standard (non-C++) definition | | 732 | %if-c-only Standard (non-C++) definition |
733 | | | 733 | |
734 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 734 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
735 | [[ | | 735 | [[ |
736 | static yy_state_type yy_get_previous_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 736 | static yy_state_type yy_get_previous_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
737 | static yy_state_type yy_try_NUL_trans M4_YY_PARAMS( yy_state_type current_state M4_YY_PROTO_LAST_ARG); | | 737 | static yy_state_type yy_try_NUL_trans M4_YY_PARAMS( yy_state_type current_state M4_YY_PROTO_LAST_ARG); |
738 | static int yy_get_next_buffer M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 738 | static int yy_get_next_buffer M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
| | | 739 | #if defined(__GNUC__) && __GNUC__ >= 3 |
| | | 740 | __attribute__((__noreturn__)) |
| | | 741 | #endif |
739 | static void yy_fatal_error M4_YY_PARAMS( yyconst char msg[] M4_YY_PROTO_LAST_ARG ); | | 742 | static void yy_fatal_error M4_YY_PARAMS( yyconst char msg[] M4_YY_PROTO_LAST_ARG ); |
740 | ]]) | | 743 | ]]) |
741 | | | 744 | |
742 | %endif | | 745 | %endif |
743 | | | 746 | |
744 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 747 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
745 | [[ | | 748 | [[ |
746 | /* Done after the current pattern has been matched and before the | | 749 | /* Done after the current pattern has been matched and before the |
747 | * corresponding action - sets up yytext. | | 750 | * corresponding action - sets up yytext. |
748 | */ | | 751 | */ |
749 | #define YY_DO_BEFORE_ACTION \ | | 752 | #define YY_DO_BEFORE_ACTION \ |
750 | YY_G(yytext_ptr) = yy_bp; \ | | 753 | YY_G(yytext_ptr) = yy_bp; \ |
751 | %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ | | 754 | %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ |
752 | YY_G(yy_hold_char) = *yy_cp; \ | | 755 | YY_G(yy_hold_char) = *yy_cp; \ |
753 | *yy_cp = '\0'; \ | | 756 | *yy_cp = '\0'; \ |
754 | %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ | | 757 | %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ |
755 | YY_G(yy_c_buf_p) = yy_cp; | | 758 | YY_G(yy_c_buf_p) = yy_cp; |
756 | ]]) | | 759 | ]]) |
757 | | | 760 | |
758 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 761 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
759 | [[ | | 762 | [[ |
760 | %% [4.0] data tables for the DFA and the user's section 1 definitions go here | | 763 | %% [4.0] data tables for the DFA and the user's section 1 definitions go here |
761 | ]]) | | 764 | ]]) |
762 | | | 765 | |
763 | m4_ifdef( [[M4_YY_IN_HEADER]], [[#ifdef YY_HEADER_EXPORT_START_CONDITIONS]]) | | 766 | m4_ifdef( [[M4_YY_IN_HEADER]], [[#ifdef YY_HEADER_EXPORT_START_CONDITIONS]]) |
764 | M4_YY_SC_DEFS | | 767 | M4_YY_SC_DEFS |
765 | m4_ifdef( [[M4_YY_IN_HEADER]], [[#endif]]) | | 768 | m4_ifdef( [[M4_YY_IN_HEADER]], [[#endif]]) |
766 | | | 769 | |
767 | m4_ifdef( [[M4_YY_NO_UNISTD_H]],, | | 770 | m4_ifdef( [[M4_YY_NO_UNISTD_H]],, |
768 | [[ | | 771 | [[ |
769 | #ifndef YY_NO_UNISTD_H | | 772 | #ifndef YY_NO_UNISTD_H |
770 | /* Special case for "unistd.h", since it is non-ANSI. We include it way | | 773 | /* Special case for "unistd.h", since it is non-ANSI. We include it way |
771 | * down here because we want the user's section 1 to have been scanned first. | | 774 | * down here because we want the user's section 1 to have been scanned first. |
772 | * The user has a chance to override it with an option. | | 775 | * The user has a chance to override it with an option. |
773 | */ | | 776 | */ |
774 | %if-c-only | | 777 | %if-c-only |
775 | #include <unistd.h> | | 778 | #include <unistd.h> |
776 | %endif | | 779 | %endif |
777 | %if-c++-only | | 780 | %if-c++-only |
778 | #include <unistd.h> | | 781 | #include <unistd.h> |
779 | %endif | | 782 | %endif |
780 | #endif | | 783 | #endif |
781 | ]]) | | 784 | ]]) |
782 | | | 785 | |
783 | m4_ifdef( [[M4_EXTRA_TYPE_DEFS]], | | 786 | m4_ifdef( [[M4_EXTRA_TYPE_DEFS]], |
784 | [[ | | 787 | [[ |
785 | #define YY_EXTRA_TYPE M4_EXTRA_TYPE_DEFS | | 788 | #define YY_EXTRA_TYPE M4_EXTRA_TYPE_DEFS |
786 | ]], | | 789 | ]], |
787 | [[ | | 790 | [[ |
788 | #ifndef YY_EXTRA_TYPE | | 791 | #ifndef YY_EXTRA_TYPE |
789 | #define YY_EXTRA_TYPE void * | | 792 | #define YY_EXTRA_TYPE void * |
790 | #endif | | 793 | #endif |
791 | ]] | | 794 | ]] |
792 | ) | | 795 | ) |
793 | | | 796 | |
794 | %if-c-only Reentrant structure and macros (non-C++). | | 797 | %if-c-only Reentrant structure and macros (non-C++). |
795 | %if-reentrant | | 798 | %if-reentrant |
796 | | | 799 | |
797 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 800 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
798 | [[ | | 801 | [[ |
799 | /* Holds the entire state of the reentrant scanner. */ | | 802 | /* Holds the entire state of the reentrant scanner. */ |
800 | struct yyguts_t | | 803 | struct yyguts_t |
801 | { | | 804 | { |
802 | | | 805 | |
803 | /* User-defined. Not touched by flex. */ | | 806 | /* User-defined. Not touched by flex. */ |
804 | YY_EXTRA_TYPE yyextra_r; | | 807 | YY_EXTRA_TYPE yyextra_r; |
805 | | | 808 | |
806 | /* The rest are the same as the globals declared in the non-reentrant scanner. */ | | 809 | /* The rest are the same as the globals declared in the non-reentrant scanner. */ |
807 | FILE *yyin_r, *yyout_r; | | 810 | FILE *yyin_r, *yyout_r; |
808 | size_t yy_buffer_stack_top; /**< index of top of stack. */ | | 811 | size_t yy_buffer_stack_top; /**< index of top of stack. */ |
809 | size_t yy_buffer_stack_max; /**< capacity of stack. */ | | 812 | size_t yy_buffer_stack_max; /**< capacity of stack. */ |
810 | YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ | | 813 | YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ |
811 | char yy_hold_char; | | 814 | char yy_hold_char; |
812 | int yy_n_chars; | | 815 | int yy_n_chars; |
813 | int yyleng_r; | | 816 | int yyleng_r; |
814 | char *yy_c_buf_p; | | 817 | char *yy_c_buf_p; |
815 | int yy_init; | | 818 | int yy_init; |
816 | int yy_start; | | 819 | int yy_start; |
817 | int yy_did_buffer_switch_on_eof; | | 820 | int yy_did_buffer_switch_on_eof; |
818 | int yy_start_stack_ptr; | | 821 | int yy_start_stack_ptr; |
819 | int yy_start_stack_depth; | | 822 | int yy_start_stack_depth; |
820 | int *yy_start_stack; | | 823 | int *yy_start_stack; |
821 | yy_state_type yy_last_accepting_state; | | 824 | yy_state_type yy_last_accepting_state; |
822 | char* yy_last_accepting_cpos; | | 825 | char* yy_last_accepting_cpos; |
823 | | | 826 | |
824 | int yylineno_r; | | 827 | int yylineno_r; |
825 | int yy_flex_debug_r; | | 828 | int yy_flex_debug_r; |
826 | | | 829 | |
827 | m4_ifdef( [[M4_YY_USES_REJECT]], | | 830 | m4_ifdef( [[M4_YY_USES_REJECT]], |
828 | [[ | | 831 | [[ |
829 | yy_state_type *yy_state_buf; | | 832 | yy_state_type *yy_state_buf; |
830 | yy_state_type *yy_state_ptr; | | 833 | yy_state_type *yy_state_ptr; |
831 | char *yy_full_match; | | 834 | char *yy_full_match; |
832 | int yy_lp; | | 835 | int yy_lp; |
833 | | | 836 | |
834 | /* These are only needed for trailing context rules, | | 837 | /* These are only needed for trailing context rules, |
835 | * but there's no conditional variable for that yet. */ | | 838 | * but there's no conditional variable for that yet. */ |
836 | int yy_looking_for_trail_begin; | | 839 | int yy_looking_for_trail_begin; |
837 | int yy_full_lp; | | 840 | int yy_full_lp; |
838 | int *yy_full_state; | | 841 | int *yy_full_state; |
839 | ]]) | | 842 | ]]) |
840 | | | 843 | |
841 | m4_ifdef( [[M4_YY_TEXT_IS_ARRAY]], | | 844 | m4_ifdef( [[M4_YY_TEXT_IS_ARRAY]], |
842 | [[ | | 845 | [[ |
843 | char yytext_r[YYLMAX]; | | 846 | char yytext_r[YYLMAX]; |
844 | char *yytext_ptr; | | 847 | char *yytext_ptr; |
845 | int yy_more_offset; | | 848 | int yy_more_offset; |
846 | int yy_prev_more_offset; | | 849 | int yy_prev_more_offset; |
847 | ]], | | 850 | ]], |
848 | [[ | | 851 | [[ |
849 | char *yytext_r; | | 852 | char *yytext_r; |
850 | int yy_more_flag; | | 853 | int yy_more_flag; |
851 | int yy_more_len; | | 854 | int yy_more_len; |
852 | ]]) | | 855 | ]]) |
853 | | | 856 | |
854 | m4_ifdef( [[M4_YY_BISON_LVAL]], | | 857 | m4_ifdef( [[M4_YY_BISON_LVAL]], |
855 | [[ | | 858 | [[ |
856 | YYSTYPE * yylval_r; | | 859 | YYSTYPE * yylval_r; |
857 | ]]) | | 860 | ]]) |
858 | | | 861 | |
859 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], | | 862 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], |
860 | [[ | | 863 | [[ |
861 | YYLTYPE * yylloc_r; | | 864 | YYLTYPE * yylloc_r; |
862 | ]]) | | 865 | ]]) |
863 | | | 866 | |
864 | }; /* end struct yyguts_t */ | | 867 | }; /* end struct yyguts_t */ |
865 | ]]) | | 868 | ]]) |
866 | | | 869 | |
867 | | | 870 | |
868 | %if-c-only | | 871 | %if-c-only |
869 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 872 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
870 | [[ | | 873 | [[ |
871 | static int yy_init_globals M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 874 | static int yy_init_globals M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
872 | ]]) | | 875 | ]]) |
873 | %endif | | 876 | %endif |
874 | | | 877 | |
875 | %if-reentrant | | 878 | %if-reentrant |
876 | | | 879 | |
877 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 880 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
878 | [[ | | 881 | [[ |
879 | m4_ifdef( [[M4_YY_BISON_LVAL]], | | 882 | m4_ifdef( [[M4_YY_BISON_LVAL]], |
880 | [[ | | 883 | [[ |
881 | /* This must go here because YYSTYPE and YYLTYPE are included | | 884 | /* This must go here because YYSTYPE and YYLTYPE are included |
882 | * from bison output in section 1.*/ | | 885 | * from bison output in section 1.*/ |
883 | # define yylval YY_G(yylval_r) | | 886 | # define yylval YY_G(yylval_r) |
884 | ]]) | | 887 | ]]) |
885 | | | 888 | |
886 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], | | 889 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], |
887 | [[ | | 890 | [[ |
888 | # define yylloc YY_G(yylloc_r) | | 891 | # define yylloc YY_G(yylloc_r) |
889 | ]]) | | 892 | ]]) |
890 | ]]) | | 893 | ]]) |
891 | | | 894 | |
892 | int yylex_init M4_YY_PARAMS(yyscan_t* scanner); | | 895 | int yylex_init M4_YY_PARAMS(yyscan_t* scanner); |
893 | | | 896 | |
894 | int yylex_init_extra M4_YY_PARAMS( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); | | 897 | int yylex_init_extra M4_YY_PARAMS( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); |
895 | | | 898 | |
896 | %endif | | 899 | %endif |
897 | | | 900 | |
898 | %endif End reentrant structures and macros. | | 901 | %endif End reentrant structures and macros. |
899 | | | 902 | |
900 | /* Accessor methods to globals. | | 903 | /* Accessor methods to globals. |
901 | These are made visible to non-reentrant scanners for convenience. */ | | 904 | These are made visible to non-reentrant scanners for convenience. */ |
902 | | | 905 | |
903 | m4_ifdef( [[M4_YY_NO_DESTROY]],, | | 906 | m4_ifdef( [[M4_YY_NO_DESTROY]],, |
904 | [[ | | 907 | [[ |
905 | int yylex_destroy M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 908 | int yylex_destroy M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
906 | ]]) | | 909 | ]]) |
907 | | | 910 | |
908 | m4_ifdef( [[M4_YY_NO_GET_DEBUG]],, | | 911 | m4_ifdef( [[M4_YY_NO_GET_DEBUG]],, |
909 | [[ | | 912 | [[ |
910 | int yyget_debug M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 913 | int yyget_debug M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
911 | ]]) | | 914 | ]]) |
912 | | | 915 | |
913 | m4_ifdef( [[M4_YY_NO_SET_DEBUG]],, | | 916 | m4_ifdef( [[M4_YY_NO_SET_DEBUG]],, |
914 | [[ | | 917 | [[ |
915 | void yyset_debug M4_YY_PARAMS( int debug_flag M4_YY_PROTO_LAST_ARG ); | | 918 | void yyset_debug M4_YY_PARAMS( int debug_flag M4_YY_PROTO_LAST_ARG ); |
916 | ]]) | | 919 | ]]) |
917 | | | 920 | |
918 | m4_ifdef( [[M4_YY_NO_GET_EXTRA]],, | | 921 | m4_ifdef( [[M4_YY_NO_GET_EXTRA]],, |
919 | [[ | | 922 | [[ |
920 | YY_EXTRA_TYPE yyget_extra M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 923 | YY_EXTRA_TYPE yyget_extra M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
921 | ]]) | | 924 | ]]) |
922 | | | 925 | |
923 | m4_ifdef( [[M4_YY_NO_SET_EXTRA]],, | | 926 | m4_ifdef( [[M4_YY_NO_SET_EXTRA]],, |
924 | [[ | | 927 | [[ |
925 | void yyset_extra M4_YY_PARAMS( YY_EXTRA_TYPE user_defined M4_YY_PROTO_LAST_ARG ); | | 928 | void yyset_extra M4_YY_PARAMS( YY_EXTRA_TYPE user_defined M4_YY_PROTO_LAST_ARG ); |
926 | ]]) | | 929 | ]]) |
927 | | | 930 | |
928 | m4_ifdef( [[M4_YY_NO_GET_IN]],, | | 931 | m4_ifdef( [[M4_YY_NO_GET_IN]],, |
929 | [[ | | 932 | [[ |
930 | FILE *yyget_in M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 933 | FILE *yyget_in M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
931 | ]]) | | 934 | ]]) |
932 | | | 935 | |
933 | m4_ifdef( [[M4_YY_NO_SET_IN]],, | | 936 | m4_ifdef( [[M4_YY_NO_SET_IN]],, |
934 | [[ | | 937 | [[ |
935 | void yyset_in M4_YY_PARAMS( FILE * _in_str M4_YY_PROTO_LAST_ARG ); | | 938 | void yyset_in M4_YY_PARAMS( FILE * _in_str M4_YY_PROTO_LAST_ARG ); |
936 | ]]) | | 939 | ]]) |
937 | | | 940 | |
938 | m4_ifdef( [[M4_YY_NO_GET_OUT]],, | | 941 | m4_ifdef( [[M4_YY_NO_GET_OUT]],, |
939 | [[ | | 942 | [[ |
940 | FILE *yyget_out M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 943 | FILE *yyget_out M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
941 | ]]) | | 944 | ]]) |
942 | | | 945 | |
943 | m4_ifdef( [[M4_YY_NO_SET_OUT]],, | | 946 | m4_ifdef( [[M4_YY_NO_SET_OUT]],, |
944 | [[ | | 947 | [[ |
945 | void yyset_out M4_YY_PARAMS( FILE * _out_str M4_YY_PROTO_LAST_ARG ); | | 948 | void yyset_out M4_YY_PARAMS( FILE * _out_str M4_YY_PROTO_LAST_ARG ); |
946 | ]]) | | 949 | ]]) |
947 | | | 950 | |
948 | m4_ifdef( [[M4_YY_NO_GET_LENG]],, | | 951 | m4_ifdef( [[M4_YY_NO_GET_LENG]],, |
949 | [[ | | 952 | [[ |
950 | int yyget_leng M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 953 | int yyget_leng M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
951 | ]]) | | 954 | ]]) |
952 | | | 955 | |
953 | m4_ifdef( [[M4_YY_NO_GET_TEXT]],, | | 956 | m4_ifdef( [[M4_YY_NO_GET_TEXT]],, |
954 | [[ | | 957 | [[ |
955 | char *yyget_text M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 958 | char *yyget_text M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
956 | ]]) | | 959 | ]]) |
957 | | | 960 | |
958 | m4_ifdef( [[M4_YY_NO_GET_LINENO]],, | | 961 | m4_ifdef( [[M4_YY_NO_GET_LINENO]],, |
959 | [[ | | 962 | [[ |
960 | int yyget_lineno M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 963 | int yyget_lineno M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
961 | ]]) | | 964 | ]]) |
962 | | | 965 | |
963 | m4_ifdef( [[M4_YY_NO_SET_LINENO]],, | | 966 | m4_ifdef( [[M4_YY_NO_SET_LINENO]],, |
964 | [[ | | 967 | [[ |
965 | void yyset_lineno M4_YY_PARAMS( int _line_number M4_YY_PROTO_LAST_ARG ); | | 968 | void yyset_lineno M4_YY_PARAMS( int _line_number M4_YY_PROTO_LAST_ARG ); |
966 | ]]) | | 969 | ]]) |
967 | | | 970 | |
968 | %if-bison-bridge | | 971 | %if-bison-bridge |
969 | m4_ifdef( [[M4_YY_NO_GET_LVAL]],, | | 972 | m4_ifdef( [[M4_YY_NO_GET_LVAL]],, |
970 | [[ | | 973 | [[ |
971 | YYSTYPE * yyget_lval M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 974 | YYSTYPE * yyget_lval M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
972 | ]]) | | 975 | ]]) |
973 | | | 976 | |
974 | void yyset_lval M4_YY_PARAMS( YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG ); | | 977 | void yyset_lval M4_YY_PARAMS( YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG ); |
975 | | | 978 | |
976 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], | | 979 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], |
977 | [[ | | 980 | [[ |
978 | m4_ifdef( [[M4_YY_NO_GET_LLOC]],, | | 981 | m4_ifdef( [[M4_YY_NO_GET_LLOC]],, |
979 | [[ | | 982 | [[ |
980 | YYLTYPE *yyget_lloc M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 983 | YYLTYPE *yyget_lloc M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
981 | ]]) | | 984 | ]]) |
982 | | | 985 | |
983 | m4_ifdef( [[M4_YY_NO_SET_LLOC]],, | | 986 | m4_ifdef( [[M4_YY_NO_SET_LLOC]],, |
984 | [[ | | 987 | [[ |
985 | void yyset_lloc M4_YY_PARAMS( YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG ); | | 988 | void yyset_lloc M4_YY_PARAMS( YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG ); |
986 | ]]) | | 989 | ]]) |
987 | ]]) | | 990 | ]]) |
988 | %endif | | 991 | %endif |
989 | | | 992 | |
990 | /* Macros after this point can all be overridden by user definitions in | | 993 | /* Macros after this point can all be overridden by user definitions in |
991 | * section 1. | | 994 | * section 1. |
992 | */ | | 995 | */ |
993 | | | 996 | |
994 | #ifndef YY_SKIP_YYWRAP | | 997 | #ifndef YY_SKIP_YYWRAP |
995 | #ifdef __cplusplus | | 998 | #ifdef __cplusplus |
996 | extern "C" int yywrap M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 999 | extern "C" int yywrap M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
997 | #else | | 1000 | #else |
998 | extern int yywrap M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 1001 | extern int yywrap M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
999 | #endif | | 1002 | #endif |
1000 | #endif | | 1003 | #endif |
1001 | | | 1004 | |
1002 | %not-for-header | | 1005 | %not-for-header |
1003 | #ifndef YY_NO_UNPUT | | 1006 | #ifndef YY_NO_UNPUT |
1004 | m4_ifdef( [[M4_YY_NO_UNPUT]],, | | 1007 | m4_ifdef( [[M4_YY_NO_UNPUT]],, |
1005 | [[ | | 1008 | [[ |
1006 | static void yyunput M4_YY_PARAMS( int c, char *buf_ptr M4_YY_PROTO_LAST_ARG); | | 1009 | static void yyunput M4_YY_PARAMS( int c, char *buf_ptr M4_YY_PROTO_LAST_ARG); |
1007 | ]]) | | 1010 | ]]) |
1008 | #endif | | 1011 | #endif |
1009 | %ok-for-header | | 1012 | %ok-for-header |
1010 | %endif | | 1013 | %endif |
1011 | | | 1014 | |
1012 | #ifndef yytext_ptr | | 1015 | #ifndef yytext_ptr |
1013 | static void yy_flex_strncpy M4_YY_PARAMS( char *, yyconst char *, int M4_YY_PROTO_LAST_ARG); | | 1016 | static void yy_flex_strncpy M4_YY_PARAMS( char *, yyconst char *, int M4_YY_PROTO_LAST_ARG); |
1014 | #endif | | 1017 | #endif |
1015 | | | 1018 | |
1016 | #ifdef YY_NEED_STRLEN | | 1019 | #ifdef YY_NEED_STRLEN |
1017 | static int yy_flex_strlen M4_YY_PARAMS( yyconst char * M4_YY_PROTO_LAST_ARG); | | 1020 | static int yy_flex_strlen M4_YY_PARAMS( yyconst char * M4_YY_PROTO_LAST_ARG); |
1018 | #endif | | 1021 | #endif |
1019 | | | 1022 | |
1020 | #ifndef YY_NO_INPUT | | 1023 | #ifndef YY_NO_INPUT |
1021 | %if-c-only Standard (non-C++) definition | | 1024 | %if-c-only Standard (non-C++) definition |
1022 | %not-for-header | | 1025 | %not-for-header |
1023 | #ifdef __cplusplus | | 1026 | #ifdef __cplusplus |
1024 | static int yyinput M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 1027 | static int yyinput M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
1025 | #else | | 1028 | #else |
1026 | static int input M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 1029 | static int input M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
1027 | #endif | | 1030 | #endif |
1028 | %ok-for-header | | 1031 | %ok-for-header |
1029 | %endif | | 1032 | %endif |
1030 | #endif | | 1033 | #endif |
1031 | | | 1034 | |
1032 | | | 1035 | |
1033 | %if-c-only | | 1036 | %if-c-only |
1034 | %# TODO: This is messy. | | 1037 | %# TODO: This is messy. |
1035 | m4_ifdef( [[M4_YY_STACK_USED]], | | 1038 | m4_ifdef( [[M4_YY_STACK_USED]], |
1036 | [[ | | 1039 | [[ |
1037 | | | 1040 | |
1038 | m4_ifdef( [[M4_YY_NOT_REENTRANT]], | | 1041 | m4_ifdef( [[M4_YY_NOT_REENTRANT]], |
1039 | [[ | | 1042 | [[ |
1040 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 1043 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
1041 | [[ | | 1044 | [[ |
1042 | static int yy_start_stack_ptr = 0; | | 1045 | static int yy_start_stack_ptr = 0; |
1043 | static int yy_start_stack_depth = 0; | | 1046 | static int yy_start_stack_depth = 0; |
1044 | static int *yy_start_stack = NULL; | | 1047 | static int *yy_start_stack = NULL; |
1045 | ]]) | | 1048 | ]]) |
1046 | ]]) | | 1049 | ]]) |
1047 | | | 1050 | |
1048 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 1051 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
1049 | [[ | | 1052 | [[ |
1050 | m4_ifdef( [[M4_YY_NO_PUSH_STATE]],, | | 1053 | m4_ifdef( [[M4_YY_NO_PUSH_STATE]],, |
1051 | [[ | | 1054 | [[ |
1052 | static void yy_push_state M4_YY_PARAMS( int _new_state M4_YY_PROTO_LAST_ARG); | | 1055 | static void yy_push_state M4_YY_PARAMS( int _new_state M4_YY_PROTO_LAST_ARG); |
1053 | ]]) | | 1056 | ]]) |
1054 | m4_ifdef( [[M4_YY_NO_POP_STATE]],, | | 1057 | m4_ifdef( [[M4_YY_NO_POP_STATE]],, |
1055 | [[ | | 1058 | [[ |
1056 | static void yy_pop_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 1059 | static void yy_pop_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
1057 | ]]) | | 1060 | ]]) |
1058 | m4_ifdef( [[M4_YY_NO_TOP_STATE]],, | | 1061 | m4_ifdef( [[M4_YY_NO_TOP_STATE]],, |
1059 | [[ | | 1062 | [[ |
1060 | static int yy_top_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); | | 1063 | static int yy_top_state M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG ); |
1061 | ]]) | | 1064 | ]]) |
1062 | ]]) | | 1065 | ]]) |
1063 | | | 1066 | |
1064 | ]], | | 1067 | ]], |
1065 | [[ | | 1068 | [[ |
1066 | m4_define( [[M4_YY_NO_PUSH_STATE]]) | | 1069 | m4_define( [[M4_YY_NO_PUSH_STATE]]) |
1067 | m4_define( [[M4_YY_NO_POP_STATE]]) | | 1070 | m4_define( [[M4_YY_NO_POP_STATE]]) |
1068 | m4_define( [[M4_YY_NO_TOP_STATE]]) | | 1071 | m4_define( [[M4_YY_NO_TOP_STATE]]) |
1069 | ]]) | | 1072 | ]]) |
1070 | %endif | | 1073 | %endif |
1071 | | | 1074 | |
1072 | /* Amount of stuff to slurp up with each read. */ | | 1075 | /* Amount of stuff to slurp up with each read. */ |
1073 | #ifndef YY_READ_BUF_SIZE | | 1076 | #ifndef YY_READ_BUF_SIZE |
1074 | #define YY_READ_BUF_SIZE 8192 | | 1077 | #define YY_READ_BUF_SIZE 8192 |
1075 | #endif | | 1078 | #endif |
1076 | | | 1079 | |
1077 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 1080 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
1078 | [[ | | 1081 | [[ |
1079 | /* Copy whatever the last rule matched to the standard output. */ | | 1082 | /* Copy whatever the last rule matched to the standard output. */ |
1080 | #ifndef ECHO | | 1083 | #ifndef ECHO |
1081 | %if-c-only Standard (non-C++) definition | | 1084 | %if-c-only Standard (non-C++) definition |
1082 | /* This used to be an fputs(), but since the string might contain NUL's, | | 1085 | /* This used to be an fputs(), but since the string might contain NUL's, |
1083 | * we now use fwrite(). | | 1086 | * we now use fwrite(). |
1084 | */ | | 1087 | */ |
1085 | #define ECHO fwrite( yytext, yyleng, 1, yyout ) | | 1088 | #define ECHO fwrite( yytext, yyleng, 1, yyout ) |
1086 | %endif | | 1089 | %endif |
1087 | %if-c++-only C++ definition | | 1090 | %if-c++-only C++ definition |
1088 | #define ECHO LexerOutput( yytext, yyleng ) | | 1091 | #define ECHO LexerOutput( yytext, yyleng ) |
1089 | %endif | | 1092 | %endif |
1090 | #endif | | 1093 | #endif |
1091 | ]]) | | 1094 | ]]) |
1092 | | | 1095 | |
1093 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 1096 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
1094 | [[ | | 1097 | [[ |
1095 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, | | 1098 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
1096 | * is returned in "result". | | 1099 | * is returned in "result". |
1097 | */ | | 1100 | */ |
1098 | #ifndef YY_INPUT | | 1101 | #ifndef YY_INPUT |
1099 | #define YY_INPUT(buf,result,max_size) \ | | 1102 | #define YY_INPUT(buf,result,max_size) \ |
1100 | %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ | | 1103 | %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ |
1101 | \ | | 1104 | \ |
1102 | %if-c++-only C++ definition \ | | 1105 | %if-c++-only C++ definition \ |
1103 | if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \ | | 1106 | if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \ |
1104 | YY_FATAL_ERROR( "input in flex scanner failed" ); | | 1107 | YY_FATAL_ERROR( "input in flex scanner failed" ); |
1105 | %endif | | 1108 | %endif |
1106 | | | 1109 | |
1107 | #endif | | 1110 | #endif |
1108 | ]]) | | 1111 | ]]) |
1109 | | | 1112 | |
1110 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 1113 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
1111 | [[ | | 1114 | [[ |
1112 | /* No semi-colon after return; correct usage is to write "yyterminate();" - | | 1115 | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
1113 | * we don't want an extra ';' after the "return" because that will cause | | 1116 | * we don't want an extra ';' after the "return" because that will cause |
1114 | * some compilers to complain about unreachable statements. | | 1117 | * some compilers to complain about unreachable statements. |
1115 | */ | | 1118 | */ |
1116 | #ifndef yyterminate | | 1119 | #ifndef yyterminate |
1117 | #define yyterminate() return YY_NULL | | 1120 | #define yyterminate() return YY_NULL |
1118 | #endif | | 1121 | #endif |
1119 | ]]) | | 1122 | ]]) |
1120 | | | 1123 | |
1121 | /* Number of entries by which start-condition stack grows. */ | | 1124 | /* Number of entries by which start-condition stack grows. */ |
1122 | #ifndef YY_START_STACK_INCR | | 1125 | #ifndef YY_START_STACK_INCR |
1123 | #define YY_START_STACK_INCR 25 | | 1126 | #define YY_START_STACK_INCR 25 |
1124 | #endif | | 1127 | #endif |
1125 | | | 1128 | |
1126 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 1129 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
1127 | [[ | | 1130 | [[ |
1128 | /* Report a fatal error. */ | | 1131 | /* Report a fatal error. */ |
1129 | #ifndef YY_FATAL_ERROR | | 1132 | #ifndef YY_FATAL_ERROR |
1130 | %if-c-only | | 1133 | %if-c-only |
1131 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg M4_YY_CALL_LAST_ARG) | | 1134 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg M4_YY_CALL_LAST_ARG) |
1132 | %endif | | 1135 | %endif |
1133 | %if-c++-only | | 1136 | %if-c++-only |
1134 | #define YY_FATAL_ERROR(msg) LexerError( msg ) | | 1137 | #define YY_FATAL_ERROR(msg) LexerError( msg ) |
1135 | %endif | | 1138 | %endif |
1136 | #endif | | 1139 | #endif |
1137 | ]]) | | 1140 | ]]) |
1138 | | | 1141 | |
1139 | %if-tables-serialization structures and prototypes | | 1142 | %if-tables-serialization structures and prototypes |
1140 | m4preproc_include(`tables_shared.h') | | 1143 | m4preproc_include(`tables_shared.h') |
1141 | | | 1144 | |
1142 | /* Load the DFA tables from the given stream. */ | | 1145 | /* Load the DFA tables from the given stream. */ |
1143 | int yytables_fload M4_YY_PARAMS(FILE * fp M4_YY_PROTO_LAST_ARG); | | 1146 | int yytables_fload M4_YY_PARAMS(FILE * fp M4_YY_PROTO_LAST_ARG); |
1144 | | | 1147 | |
1145 | /* Unload the tables from memory. */ | | 1148 | /* Unload the tables from memory. */ |
1146 | int yytables_destroy M4_YY_PARAMS(M4_YY_PROTO_ONLY_ARG); | | 1149 | int yytables_destroy M4_YY_PARAMS(M4_YY_PROTO_ONLY_ARG); |
1147 | %not-for-header | | 1150 | %not-for-header |
1148 | | | 1151 | |
1149 | /** Describes a mapping from a serialized table id to its deserialized state in | | 1152 | /** Describes a mapping from a serialized table id to its deserialized state in |
1150 | * this scanner. This is the bridge between our "generic" deserialization code | | 1153 | * this scanner. This is the bridge between our "generic" deserialization code |
1151 | * and the specifics of this scanner. | | 1154 | * and the specifics of this scanner. |
1152 | */ | | 1155 | */ |
1153 | struct yytbl_dmap { | | 1156 | struct yytbl_dmap { |
1154 | enum yytbl_id dm_id;/**< table identifier */ | | 1157 | enum yytbl_id dm_id;/**< table identifier */ |
1155 | void **dm_arr; /**< address of pointer to store the deserialized table. */ | | 1158 | void **dm_arr; /**< address of pointer to store the deserialized table. */ |
1156 | size_t dm_sz; /**< local sizeof() each element in table. */ | | 1159 | size_t dm_sz; /**< local sizeof() each element in table. */ |
1157 | }; | | 1160 | }; |
1158 | | | 1161 | |
1159 | /** A {0,0,0}-terminated list of structs, forming the map */ | | 1162 | /** A {0,0,0}-terminated list of structs, forming the map */ |
1160 | static struct yytbl_dmap yydmap[] = | | 1163 | static struct yytbl_dmap yydmap[] = |
1161 | { | | 1164 | { |
1162 | %tables-yydmap generated elements | | 1165 | %tables-yydmap generated elements |
1163 | {0,0,0} | | 1166 | {0,0,0} |
1164 | }; | | 1167 | }; |
1165 | | | 1168 | |
1166 | /** A tables-reader object to maintain some state in the read. */ | | 1169 | /** A tables-reader object to maintain some state in the read. */ |
1167 | struct yytbl_reader { | | 1170 | struct yytbl_reader { |
1168 | FILE * fp; /**< input stream */ | | 1171 | FILE * fp; /**< input stream */ |
1169 | flex_uint32_t bread; /**< bytes read since beginning of current tableset */ | | 1172 | flex_uint32_t bread; /**< bytes read since beginning of current tableset */ |
1170 | }; | | 1173 | }; |
1171 | | | 1174 | |
1172 | %endif | | 1175 | %endif |
1173 | /* end tables serialization structures and prototypes */ | | 1176 | /* end tables serialization structures and prototypes */ |
1174 | | | 1177 | |
1175 | %ok-for-header | | 1178 | %ok-for-header |
1176 | | | 1179 | |
1177 | /* Default declaration of generated scanner - a define so the user can | | 1180 | /* Default declaration of generated scanner - a define so the user can |
1178 | * easily add parameters. | | 1181 | * easily add parameters. |
1179 | */ | | 1182 | */ |
1180 | #ifndef YY_DECL | | 1183 | #ifndef YY_DECL |
1181 | #define YY_DECL_IS_OURS 1 | | 1184 | #define YY_DECL_IS_OURS 1 |
1182 | %if-c-only Standard (non-C++) definition | | 1185 | %if-c-only Standard (non-C++) definition |
1183 | | | 1186 | |
1184 | | | 1187 | |
1185 | m4_define( [[M4_YY_LEX_PROTO]], [[M4_YY_PARAMS(M4_YY_PROTO_ONLY_ARG)]]) | | 1188 | m4_define( [[M4_YY_LEX_PROTO]], [[M4_YY_PARAMS(M4_YY_PROTO_ONLY_ARG)]]) |
1186 | m4_define( [[M4_YY_LEX_DECLARATION]], [[YYFARGS0(void)]]) | | 1189 | m4_define( [[M4_YY_LEX_DECLARATION]], [[YYFARGS0(void)]]) |
1187 | | | 1190 | |
1188 | m4_ifdef( [[M4_YY_BISON_LVAL]], | | 1191 | m4_ifdef( [[M4_YY_BISON_LVAL]], |
1189 | [[ | | 1192 | [[ |
1190 | m4_dnl The bison pure parser is used. Redefine yylex to | | 1193 | m4_dnl The bison pure parser is used. Redefine yylex to |
1191 | m4_dnl accept the lval parameter. | | 1194 | m4_dnl accept the lval parameter. |
1192 | | | 1195 | |
1193 | m4_define( [[M4_YY_LEX_PROTO]], [[\]] | | 1196 | m4_define( [[M4_YY_LEX_PROTO]], [[\]] |
1194 | [[M4_YY_PARAMS(YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG)]]) | | 1197 | [[M4_YY_PARAMS(YYSTYPE * yylval_param M4_YY_PROTO_LAST_ARG)]]) |
1195 | m4_define( [[M4_YY_LEX_DECLARATION]], [[\]] | | 1198 | m4_define( [[M4_YY_LEX_DECLARATION]], [[\]] |
1196 | [[YYFARGS1(YYSTYPE *,yylval_param)]]) | | 1199 | [[YYFARGS1(YYSTYPE *,yylval_param)]]) |
1197 | ]]) | | 1200 | ]]) |
1198 | | | 1201 | |
1199 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], | | 1202 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], |
1200 | [[ | | 1203 | [[ |
1201 | m4_dnl Locations are used. yylex should also accept the ylloc parameter. | | 1204 | m4_dnl Locations are used. yylex should also accept the ylloc parameter. |
1202 | | | 1205 | |
1203 | m4_define( [[M4_YY_LEX_PROTO]], [[\]] | | 1206 | m4_define( [[M4_YY_LEX_PROTO]], [[\]] |
1204 | [[M4_YY_PARAMS(YYSTYPE * yylval_param, YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG)]]) | | 1207 | [[M4_YY_PARAMS(YYSTYPE * yylval_param, YYLTYPE * yylloc_param M4_YY_PROTO_LAST_ARG)]]) |
1205 | m4_define( [[M4_YY_LEX_DECLARATION]], [[\]] | | 1208 | m4_define( [[M4_YY_LEX_DECLARATION]], [[\]] |
1206 | [[YYFARGS2(YYSTYPE *,yylval_param, YYLTYPE *,yylloc_param)]]) | | 1209 | [[YYFARGS2(YYSTYPE *,yylval_param, YYLTYPE *,yylloc_param)]]) |
1207 | ]]) | | 1210 | ]]) |
1208 | | | 1211 | |
1209 | extern int yylex M4_YY_LEX_PROTO; | | 1212 | extern int yylex M4_YY_LEX_PROTO; |
1210 | | | 1213 | |
1211 | #define YY_DECL int yylex M4_YY_LEX_DECLARATION | | 1214 | #define YY_DECL int yylex M4_YY_LEX_DECLARATION |
1212 | %endif | | 1215 | %endif |
1213 | %if-c++-only C++ definition | | 1216 | %if-c++-only C++ definition |
1214 | #define YY_DECL int yyFlexLexer::yylex() | | 1217 | #define YY_DECL int yyFlexLexer::yylex() |
1215 | %endif | | 1218 | %endif |
1216 | #endif /* !YY_DECL */ | | 1219 | #endif /* !YY_DECL */ |
1217 | | | 1220 | |
1218 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 1221 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
1219 | [[ | | 1222 | [[ |
1220 | /* Code executed at the beginning of each rule, after yytext and yyleng | | 1223 | /* Code executed at the beginning of each rule, after yytext and yyleng |
1221 | * have been set up. | | 1224 | * have been set up. |
1222 | */ | | 1225 | */ |
1223 | #ifndef YY_USER_ACTION | | 1226 | #ifndef YY_USER_ACTION |
1224 | #define YY_USER_ACTION | | 1227 | #define YY_USER_ACTION |
1225 | #endif | | 1228 | #endif |
1226 | ]]) | | 1229 | ]]) |
1227 | | | 1230 | |
1228 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 1231 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
1229 | [[ | | 1232 | [[ |
1230 | /* Code executed at the end of each rule. */ | | 1233 | /* Code executed at the end of each rule. */ |
1231 | #ifndef YY_BREAK | | 1234 | #ifndef YY_BREAK |
1232 | #define YY_BREAK break; | | 1235 | #define YY_BREAK break; |
1233 | #endif | | 1236 | #endif |
1234 | ]]) | | 1237 | ]]) |
1235 | | | 1238 | |
1236 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 1239 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
1237 | [[ | | 1240 | [[ |
1238 | %% [6.0] YY_RULE_SETUP definition goes here | | 1241 | %% [6.0] YY_RULE_SETUP definition goes here |
1239 | ]]) | | 1242 | ]]) |
1240 | | | 1243 | |
1241 | %not-for-header | | 1244 | %not-for-header |
1242 | /** The main scanner function which does all the work. | | 1245 | /** The main scanner function which does all the work. |
1243 | */ | | 1246 | */ |
1244 | YY_DECL | | 1247 | YY_DECL |
1245 | { | | 1248 | { |
1246 | register yy_state_type yy_current_state; | | 1249 | register yy_state_type yy_current_state; |
1247 | register char *yy_cp, *yy_bp; | | 1250 | register char *yy_cp, *yy_bp; |
1248 | register int yy_act; | | 1251 | register int yy_act; |
1249 | M4_YY_DECL_GUTS_VAR(); | | 1252 | M4_YY_DECL_GUTS_VAR(); |
1250 | | | 1253 | |
1251 | m4_ifdef( [[M4_YY_NOT_REENTRANT]], | | 1254 | m4_ifdef( [[M4_YY_NOT_REENTRANT]], |
1252 | [[ | | 1255 | [[ |
1253 | m4_ifdef( [[M4_YY_BISON_LVAL]], | | 1256 | m4_ifdef( [[M4_YY_BISON_LVAL]], |
1254 | [[ | | 1257 | [[ |
1255 | YYSTYPE * yylval; | | 1258 | YYSTYPE * yylval; |
1256 | ]]) | | 1259 | ]]) |
1257 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], | | 1260 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], |
1258 | [[ | | 1261 | [[ |
1259 | YYLTYPE * yylloc; | | 1262 | YYLTYPE * yylloc; |
1260 | ]]) | | 1263 | ]]) |
1261 | ]]) | | 1264 | ]]) |
1262 | | | 1265 | |
1263 | %% [7.0] user's declarations go here | | 1266 | %% [7.0] user's declarations go here |
1264 | | | 1267 | |
1265 | m4_ifdef( [[M4_YY_BISON_LVAL]], | | 1268 | m4_ifdef( [[M4_YY_BISON_LVAL]], |
1266 | [[ | | 1269 | [[ |
1267 | yylval = yylval_param; | | 1270 | yylval = yylval_param; |
1268 | ]]) | | 1271 | ]]) |
1269 | | | 1272 | |
1270 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], | | 1273 | m4_ifdef( [[<M4_YY_BISON_LLOC>]], |
1271 | [[ | | 1274 | [[ |
1272 | yylloc = yylloc_param; | | 1275 | yylloc = yylloc_param; |
1273 | ]]) | | 1276 | ]]) |
1274 | | | 1277 | |
1275 | if ( !YY_G(yy_init) ) | | 1278 | if ( !YY_G(yy_init) ) |
1276 | { | | 1279 | { |
1277 | YY_G(yy_init) = 1; | | 1280 | YY_G(yy_init) = 1; |
1278 | | | 1281 | |
1279 | #ifdef YY_USER_INIT | | 1282 | #ifdef YY_USER_INIT |
1280 | YY_USER_INIT; | | 1283 | YY_USER_INIT; |
1281 | #endif | | 1284 | #endif |
1282 | | | 1285 | |
1283 | m4_ifdef( [[M4_YY_USES_REJECT]], | | 1286 | m4_ifdef( [[M4_YY_USES_REJECT]], |
1284 | [[ | | 1287 | [[ |
1285 | /* Create the reject buffer large enough to save one state per allowed character. */ | | 1288 | /* Create the reject buffer large enough to save one state per allowed character. */ |
1286 | if ( ! YY_G(yy_state_buf) ) | | 1289 | if ( ! YY_G(yy_state_buf) ) |
1287 | YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE M4_YY_CALL_LAST_ARG); | | 1290 | YY_G(yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE M4_YY_CALL_LAST_ARG); |
1288 | if ( ! YY_G(yy_state_buf) ) | | 1291 | if ( ! YY_G(yy_state_buf) ) |
1289 | YY_FATAL_ERROR( "out of dynamic memory in yylex()" ); | | 1292 | YY_FATAL_ERROR( "out of dynamic memory in yylex()" ); |
1290 | ]]) | | 1293 | ]]) |
1291 | | | 1294 | |
1292 | if ( ! YY_G(yy_start) ) | | 1295 | if ( ! YY_G(yy_start) ) |
1293 | YY_G(yy_start) = 1; /* first start state */ | | 1296 | YY_G(yy_start) = 1; /* first start state */ |
1294 | | | 1297 | |
1295 | if ( ! yyin ) | | 1298 | if ( ! yyin ) |
1296 | %if-c-only | | 1299 | %if-c-only |
1297 | yyin = stdin; | | 1300 | yyin = stdin; |
1298 | %endif | | 1301 | %endif |
1299 | %if-c++-only | | 1302 | %if-c++-only |
1300 | yyin = & std::cin; | | 1303 | yyin = & std::cin; |
1301 | %endif | | 1304 | %endif |
1302 | | | 1305 | |
1303 | if ( ! yyout ) | | 1306 | if ( ! yyout ) |
1304 | %if-c-only | | 1307 | %if-c-only |
1305 | yyout = stdout; | | 1308 | yyout = stdout; |
1306 | %endif | | 1309 | %endif |
1307 | %if-c++-only | | 1310 | %if-c++-only |
1308 | yyout = & std::cout; | | 1311 | yyout = & std::cout; |
1309 | %endif | | 1312 | %endif |
1310 | | | 1313 | |
1311 | if ( ! YY_CURRENT_BUFFER ) { | | 1314 | if ( ! YY_CURRENT_BUFFER ) { |
1312 | yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); | | 1315 | yyensure_buffer_stack (M4_YY_CALL_ONLY_ARG); |
1313 | YY_CURRENT_BUFFER_LVALUE = | | 1316 | YY_CURRENT_BUFFER_LVALUE = |
1314 | yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); | | 1317 | yy_create_buffer( yyin, YY_BUF_SIZE M4_YY_CALL_LAST_ARG); |
1315 | } | | 1318 | } |
1316 | | | 1319 | |
1317 | yy_load_buffer_state( M4_YY_CALL_ONLY_ARG ); | | 1320 | yy_load_buffer_state( M4_YY_CALL_ONLY_ARG ); |
1318 | } | | 1321 | } |
1319 | | | 1322 | |
1320 | while ( 1 ) /* loops until end-of-file is reached */ | | 1323 | while ( 1 ) /* loops until end-of-file is reached */ |
1321 | { | | 1324 | { |
1322 | %% [8.0] yymore()-related code goes here | | 1325 | %% [8.0] yymore()-related code goes here |
1323 | yy_cp = YY_G(yy_c_buf_p); | | 1326 | yy_cp = YY_G(yy_c_buf_p); |
1324 | | | 1327 | |
1325 | /* Support of yytext. */ | | 1328 | /* Support of yytext. */ |
1326 | *yy_cp = YY_G(yy_hold_char); | | 1329 | *yy_cp = YY_G(yy_hold_char); |
1327 | | | 1330 | |
1328 | /* yy_bp points to the position in yy_ch_buf of the start of | | 1331 | /* yy_bp points to the position in yy_ch_buf of the start of |
1329 | * the current run. | | 1332 | * the current run. |
1330 | */ | | 1333 | */ |
1331 | yy_bp = yy_cp; | | 1334 | yy_bp = yy_cp; |
1332 | | | 1335 | |
1333 | %% [9.0] code to set up and find next match goes here | | 1336 | %% [9.0] code to set up and find next match goes here |
1334 | | | 1337 | |
1335 | yy_find_action: | | 1338 | yy_find_action: |
1336 | %% [10.0] code to find the action number goes here | | 1339 | %% [10.0] code to find the action number goes here |
1337 | | | 1340 | |
1338 | YY_DO_BEFORE_ACTION; | | 1341 | YY_DO_BEFORE_ACTION; |
1339 | | | 1342 | |
1340 | %% [11.0] code for yylineno update goes here | | 1343 | %% [11.0] code for yylineno update goes here |
1341 | | | 1344 | |
1342 | do_action: /* This label is used only to access EOF actions. */ | | 1345 | do_action: /* This label is used only to access EOF actions. */ |
1343 | | | 1346 | |
1344 | %% [12.0] debug code goes here | | 1347 | %% [12.0] debug code goes here |
1345 | | | 1348 | |
1346 | switch ( yy_act ) | | 1349 | switch ( yy_act ) |
1347 | { /* beginning of action switch */ | | 1350 | { /* beginning of action switch */ |
1348 | %% [13.0] actions go here | | 1351 | %% [13.0] actions go here |
1349 | | | 1352 | |
1350 | case YY_END_OF_BUFFER: | | 1353 | case YY_END_OF_BUFFER: |
1351 | { | | 1354 | { |
1352 | /* Amount of text matched not including the EOB char. */ | | 1355 | /* Amount of text matched not including the EOB char. */ |
1353 | int yy_amount_of_matched_text = (int) (yy_cp - YY_G(yytext_ptr)) - 1; | | 1356 | int yy_amount_of_matched_text = (int) (yy_cp - YY_G(yytext_ptr)) - 1; |
1354 | | | 1357 | |
1355 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ | | 1358 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
1356 | *yy_cp = YY_G(yy_hold_char); | | 1359 | *yy_cp = YY_G(yy_hold_char); |
1357 | YY_RESTORE_YY_MORE_OFFSET | | 1360 | YY_RESTORE_YY_MORE_OFFSET |
1358 | | | 1361 | |
1359 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) | | 1362 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
1360 | { | | 1363 | { |
1361 | /* We're scanning a new file or input source. It's | | 1364 | /* We're scanning a new file or input source. It's |
1362 | * possible that this happened because the user | | 1365 | * possible that this happened because the user |
1363 | * just pointed yyin at a new source and called | | 1366 | * just pointed yyin at a new source and called |
1364 | * yylex(). If so, then we have to assure | | 1367 | * yylex(). If so, then we have to assure |
1365 | * consistency between YY_CURRENT_BUFFER and our | | 1368 | * consistency between YY_CURRENT_BUFFER and our |
1366 | * globals. Here is the right place to do so, because | | 1369 | * globals. Here is the right place to do so, because |
1367 | * this is the first action (other than possibly a | | 1370 | * this is the first action (other than possibly a |
1368 | * back-up) that will match for the new input source. | | 1371 | * back-up) that will match for the new input source. |
1369 | */ | | 1372 | */ |
1370 | YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; | | 1373 | YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
1371 | YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; | | 1374 | YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
1372 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; | | 1375 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
1373 | } | | 1376 | } |
1374 | | | 1377 | |
1375 | /* Note that here we test for yy_c_buf_p "<=" to the position | | 1378 | /* Note that here we test for yy_c_buf_p "<=" to the position |
1376 | * of the first EOB in the buffer, since yy_c_buf_p will | | 1379 | * of the first EOB in the buffer, since yy_c_buf_p will |
1377 | * already have been incremented past the NUL character | | 1380 | * already have been incremented past the NUL character |
1378 | * (since all states make transitions on EOB to the | | 1381 | * (since all states make transitions on EOB to the |
1379 | * end-of-buffer state). Contrast this with the test | | 1382 | * end-of-buffer state). Contrast this with the test |
1380 | * in input(). | | 1383 | * in input(). |
1381 | */ | | 1384 | */ |
1382 | if ( YY_G(yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] ) | | 1385 | if ( YY_G(yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] ) |
1383 | { /* This was really a NUL. */ | | 1386 | { /* This was really a NUL. */ |
1384 | yy_state_type yy_next_state; | | 1387 | yy_state_type yy_next_state; |
1385 | | | 1388 | |
1386 | YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + yy_amount_of_matched_text; | | 1389 | YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + yy_amount_of_matched_text; |
1387 | | | 1390 | |
1388 | yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG ); | | 1391 | yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG ); |
1389 | | | 1392 | |
1390 | /* Okay, we're now positioned to make the NUL | | 1393 | /* Okay, we're now positioned to make the NUL |
1391 | * transition. We couldn't have | | 1394 | * transition. We couldn't have |
1392 | * yy_get_previous_state() go ahead and do it | | 1395 | * yy_get_previous_state() go ahead and do it |
1393 | * for us because it doesn't know how to deal | | 1396 | * for us because it doesn't know how to deal |
1394 | * with the possibility of jamming (and we don't | | 1397 | * with the possibility of jamming (and we don't |
1395 | * want to build jamming into it because then it | | 1398 | * want to build jamming into it because then it |
1396 | * will run more slowly). | | 1399 | * will run more slowly). |
1397 | */ | | 1400 | */ |
1398 | | | 1401 | |
1399 | yy_next_state = yy_try_NUL_trans( yy_current_state M4_YY_CALL_LAST_ARG); | | 1402 | yy_next_state = yy_try_NUL_trans( yy_current_state M4_YY_CALL_LAST_ARG); |
1400 | | | 1403 | |
1401 | yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ; | | 1404 | yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ; |
1402 | | | 1405 | |
1403 | if ( yy_next_state ) | | 1406 | if ( yy_next_state ) |
1404 | { | | 1407 | { |
1405 | /* Consume the NUL. */ | | 1408 | /* Consume the NUL. */ |
1406 | yy_cp = ++YY_G(yy_c_buf_p); | | 1409 | yy_cp = ++YY_G(yy_c_buf_p); |
1407 | yy_current_state = yy_next_state; | | 1410 | yy_current_state = yy_next_state; |
1408 | goto yy_match; | | 1411 | goto yy_match; |
1409 | } | | 1412 | } |
1410 | | | 1413 | |
1411 | else | | 1414 | else |
1412 | { | | 1415 | { |
1413 | %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here | | 1416 | %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here |
1414 | goto yy_find_action; | | 1417 | goto yy_find_action; |
1415 | } | | 1418 | } |
1416 | } | | 1419 | } |
1417 | | | 1420 | |
1418 | else switch ( yy_get_next_buffer( M4_YY_CALL_ONLY_ARG ) ) | | 1421 | else switch ( yy_get_next_buffer( M4_YY_CALL_ONLY_ARG ) ) |
1419 | { | | 1422 | { |
1420 | case EOB_ACT_END_OF_FILE: | | 1423 | case EOB_ACT_END_OF_FILE: |
1421 | { | | 1424 | { |
1422 | YY_G(yy_did_buffer_switch_on_eof) = 0; | | 1425 | YY_G(yy_did_buffer_switch_on_eof) = 0; |
1423 | | | 1426 | |
1424 | if ( yywrap( M4_YY_CALL_ONLY_ARG ) ) | | 1427 | if ( yywrap( M4_YY_CALL_ONLY_ARG ) ) |
1425 | { | | 1428 | { |
1426 | /* Note: because we've taken care in | | 1429 | /* Note: because we've taken care in |
1427 | * yy_get_next_buffer() to have set up | | 1430 | * yy_get_next_buffer() to have set up |
1428 | * yytext, we can now set up | | 1431 | * yytext, we can now set up |
1429 | * yy_c_buf_p so that if some total | | 1432 | * yy_c_buf_p so that if some total |
1430 | * hoser (like flex itself) wants to | | 1433 | * hoser (like flex itself) wants to |
1431 | * call the scanner after we return the | | 1434 | * call the scanner after we return the |
1432 | * YY_NULL, it'll still work - another | | 1435 | * YY_NULL, it'll still work - another |
1433 | * YY_NULL will get returned. | | 1436 | * YY_NULL will get returned. |
1434 | */ | | 1437 | */ |
1435 | YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + YY_MORE_ADJ; | | 1438 | YY_G(yy_c_buf_p) = YY_G(yytext_ptr) + YY_MORE_ADJ; |
1436 | | | 1439 | |
1437 | yy_act = YY_STATE_EOF(YY_START); | | 1440 | yy_act = YY_STATE_EOF(YY_START); |
1438 | goto do_action; | | 1441 | goto do_action; |
1439 | } | | 1442 | } |
1440 | | | 1443 | |
1441 | else | | 1444 | else |
1442 | { | | 1445 | { |
1443 | if ( ! YY_G(yy_did_buffer_switch_on_eof) ) | | 1446 | if ( ! YY_G(yy_did_buffer_switch_on_eof) ) |
1444 | YY_NEW_FILE; | | 1447 | YY_NEW_FILE; |
1445 | } | | 1448 | } |
1446 | break; | | 1449 | break; |
1447 | } | | 1450 | } |
1448 | | | 1451 | |
1449 | case EOB_ACT_CONTINUE_SCAN: | | 1452 | case EOB_ACT_CONTINUE_SCAN: |
1450 | YY_G(yy_c_buf_p) = | | 1453 | YY_G(yy_c_buf_p) = |
1451 | YY_G(yytext_ptr) + yy_amount_of_matched_text; | | 1454 | YY_G(yytext_ptr) + yy_amount_of_matched_text; |
1452 | | | 1455 | |
1453 | yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG ); | | 1456 | yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG ); |
1454 | | | 1457 | |
1455 | yy_cp = YY_G(yy_c_buf_p); | | 1458 | yy_cp = YY_G(yy_c_buf_p); |
1456 | yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ; | | 1459 | yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ; |
1457 | goto yy_match; | | 1460 | goto yy_match; |
1458 | | | 1461 | |
1459 | case EOB_ACT_LAST_MATCH: | | 1462 | case EOB_ACT_LAST_MATCH: |
1460 | YY_G(yy_c_buf_p) = | | 1463 | YY_G(yy_c_buf_p) = |
1461 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)]; | | 1464 | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)]; |
1462 | | | 1465 | |
1463 | yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG ); | | 1466 | yy_current_state = yy_get_previous_state( M4_YY_CALL_ONLY_ARG ); |
1464 | | | 1467 | |
1465 | yy_cp = YY_G(yy_c_buf_p); | | 1468 | yy_cp = YY_G(yy_c_buf_p); |
1466 | yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ; | | 1469 | yy_bp = YY_G(yytext_ptr) + YY_MORE_ADJ; |
1467 | goto yy_find_action; | | 1470 | goto yy_find_action; |
1468 | } | | 1471 | } |
1469 | break; | | 1472 | break; |
1470 | } | | 1473 | } |
1471 | | | 1474 | |
1472 | default: | | 1475 | default: |
1473 | YY_FATAL_ERROR( | | 1476 | YY_FATAL_ERROR( |
1474 | "fatal flex scanner internal error--no action found" ); | | 1477 | "fatal flex scanner internal error--no action found" ); |
1475 | } /* end of action switch */ | | 1478 | } /* end of action switch */ |
1476 | } /* end of scanning one token */ | | 1479 | } /* end of scanning one token */ |
1477 | } /* end of yylex */ | | 1480 | } /* end of yylex */ |
1478 | %ok-for-header | | 1481 | %ok-for-header |
1479 | | | 1482 | |
1480 | %if-c++-only | | 1483 | %if-c++-only |
1481 | %not-for-header | | 1484 | %not-for-header |
1482 | /* The contents of this function are C++ specific, so the YY_G macro is not used. | | 1485 | /* The contents of this function are C++ specific, so the YY_G macro is not used. |
1483 | */ | | 1486 | */ |
1484 | yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ) | | 1487 | yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout ) |
1485 | { | | 1488 | { |
1486 | yyin = arg_yyin; | | 1489 | yyin = arg_yyin; |
1487 | yyout = arg_yyout; | | 1490 | yyout = arg_yyout; |
1488 | yy_c_buf_p = 0; | | 1491 | yy_c_buf_p = 0; |
1489 | yy_init = 0; | | 1492 | yy_init = 0; |
1490 | yy_start = 0; | | 1493 | yy_start = 0; |
1491 | yy_flex_debug = 0; | | 1494 | yy_flex_debug = 0; |
1492 | yylineno = 1; // this will only get updated if %option yylineno | | 1495 | yylineno = 1; // this will only get updated if %option yylineno |
1493 | | | 1496 | |
1494 | yy_did_buffer_switch_on_eof = 0; | | 1497 | yy_did_buffer_switch_on_eof = 0; |
1495 | | | 1498 | |
1496 | yy_looking_for_trail_begin = 0; | | 1499 | yy_looking_for_trail_begin = 0; |
1497 | yy_more_flag = 0; | | 1500 | yy_more_flag = 0; |
1498 | yy_more_len = 0; | | 1501 | yy_more_len = 0; |
1499 | yy_more_offset = yy_prev_more_offset = 0; | | 1502 | yy_more_offset = yy_prev_more_offset = 0; |
1500 | | | 1503 | |
1501 | yy_start_stack_ptr = yy_start_stack_depth = 0; | | 1504 | yy_start_stack_ptr = yy_start_stack_depth = 0; |
1502 | yy_start_stack = NULL; | | 1505 | yy_start_stack = NULL; |
1503 | | | 1506 | |
1504 | yy_buffer_stack = 0; | | 1507 | yy_buffer_stack = 0; |
1505 | yy_buffer_stack_top = 0; | | 1508 | yy_buffer_stack_top = 0; |
1506 | yy_buffer_stack_max = 0; | | 1509 | yy_buffer_stack_max = 0; |
1507 | | | 1510 | |
1508 | | | 1511 | |
1509 | m4_ifdef( [[M4_YY_USES_REJECT]], | | 1512 | m4_ifdef( [[M4_YY_USES_REJECT]], |
1510 | [[ | | 1513 | [[ |
1511 | yy_state_buf = new yy_state_type[YY_STATE_BUF_SIZE]; | | 1514 | yy_state_buf = new yy_state_type[YY_STATE_BUF_SIZE]; |
1512 | ]], | | 1515 | ]], |
1513 | [[ | | 1516 | [[ |
1514 | yy_state_buf = 0; | | 1517 | yy_state_buf = 0; |
1515 | ]]) | | 1518 | ]]) |
1516 | } | | 1519 | } |
1517 | | | 1520 | |
1518 | /* The contents of this function are C++ specific, so the YY_G macro is not used. | | 1521 | /* The contents of this function are C++ specific, so the YY_G macro is not used. |
1519 | */ | | 1522 | */ |
1520 | yyFlexLexer::~yyFlexLexer() | | 1523 | yyFlexLexer::~yyFlexLexer() |
1521 | { | | 1524 | { |
1522 | delete [] yy_state_buf; | | 1525 | delete [] yy_state_buf; |
1523 | yyfree( yy_start_stack M4_YY_CALL_LAST_ARG ); | | 1526 | yyfree( yy_start_stack M4_YY_CALL_LAST_ARG ); |
1524 | yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG); | | 1527 | yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG); |
1525 | yyfree( yy_buffer_stack M4_YY_CALL_LAST_ARG ); | | 1528 | yyfree( yy_buffer_stack M4_YY_CALL_LAST_ARG ); |
1526 | } | | 1529 | } |
1527 | | | 1530 | |
1528 | /* The contents of this function are C++ specific, so the YY_G macro is not used. | | 1531 | /* The contents of this function are C++ specific, so the YY_G macro is not used. |
1529 | */ | | 1532 | */ |
1530 | void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out ) | | 1533 | void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out ) |
1531 | { | | 1534 | { |
1532 | if ( new_in ) | | 1535 | if ( new_in ) |
1533 | { | | 1536 | { |
1534 | yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG); | | 1537 | yy_delete_buffer( YY_CURRENT_BUFFER M4_YY_CALL_LAST_ARG); |
1535 | yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE M4_YY_CALL_LAST_ARG) M4_YY_CALL_LAST_ARG); | | 1538 | yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE M4_YY_CALL_LAST_ARG) M4_YY_CALL_LAST_ARG); |
1536 | } | | 1539 | } |
1537 | | | 1540 | |
1538 | if ( new_out ) | | 1541 | if ( new_out ) |
1539 | yyout = new_out; | | 1542 | yyout = new_out; |
1540 | } | | 1543 | } |
1541 | | | 1544 | |
1542 | #ifdef YY_INTERACTIVE | | 1545 | #ifdef YY_INTERACTIVE |
1543 | int yyFlexLexer::LexerInput( char* buf, int /* max_size */ ) | | 1546 | int yyFlexLexer::LexerInput( char* buf, int /* max_size */ ) |
1544 | #else | | 1547 | #else |
1545 | int yyFlexLexer::LexerInput( char* buf, int max_size ) | | 1548 | int yyFlexLexer::LexerInput( char* buf, int max_size ) |
1546 | #endif | | 1549 | #endif |
1547 | { | | 1550 | { |
1548 | if ( yyin->eof() || yyin->fail() ) | | 1551 | if ( yyin->eof() || yyin->fail() ) |
1549 | return 0; | | 1552 | return 0; |
1550 | | | 1553 | |
1551 | #ifdef YY_INTERACTIVE | | 1554 | #ifdef YY_INTERACTIVE |
1552 | yyin->get( buf[0] ); | | 1555 | yyin->get( buf[0] ); |
1553 | | | 1556 | |
1554 | if ( yyin->eof() ) | | 1557 | if ( yyin->eof() ) |
1555 | return 0; | | 1558 | return 0; |
1556 | | | 1559 | |
1557 | if ( yyin->bad() ) | | 1560 | if ( yyin->bad() ) |
1558 | return -1; | | 1561 | return -1; |
1559 | | | 1562 | |
1560 | return 1; | | 1563 | return 1; |
1561 | | | 1564 | |
1562 | #else | | 1565 | #else |
1563 | (void) yyin->read( buf, max_size ); | | 1566 | (void) yyin->read( buf, max_size ); |
1564 | | | 1567 | |
1565 | if ( yyin->bad() ) | | 1568 | if ( yyin->bad() ) |
1566 | return -1; | | 1569 | return -1; |
1567 | else | | 1570 | else |
1568 | return yyin->gcount(); | | 1571 | return yyin->gcount(); |
1569 | #endif | | 1572 | #endif |
1570 | } | | 1573 | } |
1571 | | | 1574 | |
1572 | void yyFlexLexer::LexerOutput( const char* buf, int size ) | | 1575 | void yyFlexLexer::LexerOutput( const char* buf, int size ) |
1573 | { | | 1576 | { |
1574 | (void) yyout->write( buf, size ); | | 1577 | (void) yyout->write( buf, size ); |
1575 | } | | 1578 | } |
1576 | %ok-for-header | | 1579 | %ok-for-header |
1577 | %endif | | 1580 | %endif |
1578 | | | 1581 | |
1579 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], | | 1582 | m4_ifdef( [[M4_YY_NOT_IN_HEADER]], |
1580 | [[ | | 1583 | [[ |
1581 | /* yy_get_next_buffer - try to read in a new buffer | | 1584 | /* yy_get_next_buffer - try to read in a new buffer |
1582 | * | | 1585 | * |
1583 | * Returns a code representing an action: | | 1586 | * Returns a code representing an action: |
1584 | * EOB_ACT_LAST_MATCH - | | 1587 | * EOB_ACT_LAST_MATCH - |
1585 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position | | 1588 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
1586 | * EOB_ACT_END_OF_FILE - end of file | | 1589 | * EOB_ACT_END_OF_FILE - end of file |
1587 | */ | | 1590 | */ |
1588 | %if-c-only | | 1591 | %if-c-only |
1589 | static int yy_get_next_buffer YYFARGS0(void) | | 1592 | static int yy_get_next_buffer YYFARGS0(void) |
1590 | %endif | | 1593 | %endif |
1591 | %if-c++-only | | 1594 | %if-c++-only |
1592 | int yyFlexLexer::yy_get_next_buffer() | | 1595 | int yyFlexLexer::yy_get_next_buffer() |
1593 | %endif | | 1596 | %endif |
1594 | { | | 1597 | { |
1595 | M4_YY_DECL_GUTS_VAR(); | | 1598 | M4_YY_DECL_GUTS_VAR(); |
1596 | register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; | | 1599 | register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
1597 | register char *source = YY_G(yytext_ptr); | | 1600 | register char *source = YY_G(yytext_ptr); |
1598 | register int number_to_move, i; | | 1601 | register int number_to_move, i; |
1599 | int ret_val; | | 1602 | int ret_val; |
1600 | | | 1603 | |
1601 | if ( YY_G(yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] ) | | 1604 | if ( YY_G(yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] ) |
1602 | YY_FATAL_ERROR( | | 1605 | YY_FATAL_ERROR( |
1603 | "fatal flex scanner internal error--end of buffer missed" ); | | 1606 | "fatal flex scanner internal error--end of buffer missed" ); |
1604 | | | 1607 | |
1605 | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) | | 1608 | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
1606 | { /* Don't try to fill the buffer, so this is an EOF. */ | | 1609 | { /* Don't try to fill the buffer, so this is an EOF. */ |
1607 | if ( YY_G(yy_c_buf_p) - YY_G(yytext_ptr) - YY_MORE_ADJ == 1 ) | | 1610 | if ( YY_G(yy_c_buf_p) - YY_G(yytext_ptr) - YY_MORE_ADJ == 1 ) |
1608 | { | | 1611 | { |
1609 | /* We matched a single character, the EOB, so | | 1612 | /* We matched a single character, the EOB, so |
1610 | * treat this as a final EOF. | | 1613 | * treat this as a final EOF. |
1611 | */ | | 1614 | */ |
1612 | return EOB_ACT_END_OF_FILE; | | 1615 | return EOB_ACT_END_OF_FILE; |
1613 | } | | 1616 | } |
1614 | | | 1617 | |
1615 | else | | 1618 | else |
1616 | { | | 1619 | { |
1617 | /* We matched some text prior to the EOB, first | | 1620 | /* We matched some text prior to the EOB, first |
1618 | * process it. | | 1621 | * process it. |
1619 | */ | | 1622 | */ |
1620 | return EOB_ACT_LAST_MATCH; | | 1623 | return EOB_ACT_LAST_MATCH; |
1621 | } | | 1624 | } |
1622 | } | | 1625 | } |
1623 | | | 1626 | |
1624 | /* Try to read more data. */ | | 1627 | /* Try to read more data. */ |
1625 | | | 1628 | |
1626 | /* First move last chars to start of buffer. */ | | 1629 | /* First move last chars to start of buffer. */ |
1627 | number_to_move = (int) (YY_G(yy_c_buf_p) - YY_G(yytext_ptr)) - 1; | | 1630 | number_to_move = (int) (YY_G(yy_c_buf_p) - YY_G(yytext_ptr)) - 1; |
1628 | | | 1631 | |
1629 | for ( i = 0; i < number_to_move; ++i ) | | 1632 | for ( i = 0; i < number_to_move; ++i ) |
1630 | *(dest++) = *(source++); | | 1633 | *(dest++) = *(source++); |
1631 | | | 1634 | |
1632 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) | | 1635 | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
1633 | /* don't do the read, it's not guaranteed to return an EOF, | | 1636 | /* don't do the read, it's not guaranteed to return an EOF, |
1634 | * just force an EOF | | 1637 | * just force an EOF |
1635 | */ | | 1638 | */ |
1636 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars) = 0; | | 1639 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars) = 0; |
1637 | | | 1640 | |
1638 | else | | 1641 | else |
1639 | { | | 1642 | { |
1640 | int num_to_read = | | 1643 | int num_to_read = |
1641 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; | | 1644 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
1642 | | | 1645 | |
1643 | while ( num_to_read <= 0 ) | | 1646 | while ( num_to_read <= 0 ) |
1644 | { /* Not enough room in the buffer - grow it. */ | | 1647 | { /* Not enough room in the buffer - grow it. */ |
1645 | m4_ifdef( [[M4_YY_USES_REJECT]], | | 1648 | m4_ifdef( [[M4_YY_USES_REJECT]], |
1646 | [[ | | 1649 | [[ |
1647 | YY_FATAL_ERROR( | | 1650 | YY_FATAL_ERROR( |
1648 | "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); | | 1651 | "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); |
1649 | ]], | | 1652 | ]], |
1650 | [[ | | 1653 | [[ |
1651 | /* just a shorter name for the current buffer */ | | 1654 | /* just a shorter name for the current buffer */ |
1652 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER; | | 1655 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER; |
1653 | | | 1656 | |
1654 | int yy_c_buf_p_offset = | | 1657 | int yy_c_buf_p_offset = |
1655 | (int) (YY_G(yy_c_buf_p) - b->yy_ch_buf); | | 1658 | (int) (YY_G(yy_c_buf_p) - b->yy_ch_buf); |
1656 | | | 1659 | |
1657 | if ( b->yy_is_our_buffer ) | | 1660 | if ( b->yy_is_our_buffer ) |
1658 | { | | 1661 | { |
1659 | int new_size = b->yy_buf_size * 2; | | 1662 | int new_size = b->yy_buf_size * 2; |
1660 | | | 1663 | |
1661 | if ( new_size <= 0 ) | | 1664 | if ( new_size <= 0 ) |
1662 | b->yy_buf_size += b->yy_buf_size / 8; | | 1665 | b->yy_buf_size += b->yy_buf_size / 8; |
1663 | else | | 1666 | else |
1664 | b->yy_buf_size *= 2; | | 1667 | b->yy_buf_size *= 2; |
1665 | | | 1668 | |
1666 | b->yy_ch_buf = (char *) | | 1669 | b->yy_ch_buf = (char *) |
1667 | /* Include room in for 2 EOB chars. */ | | 1670 | /* Include room in for 2 EOB chars. */ |
1668 | yyrealloc( (void *) b->yy_ch_buf, | | 1671 | yyrealloc( (void *) b->yy_ch_buf, |
1669 | b->yy_buf_size + 2 M4_YY_CALL_LAST_ARG ); | | 1672 | b->yy_buf_size + 2 M4_YY_CALL_LAST_ARG ); |
1670 | } | | 1673 | } |
1671 | else | | 1674 | else |
1672 | /* Can't grow it, we don't own it. */ | | 1675 | /* Can't grow it, we don't own it. */ |
1673 | b->yy_ch_buf = 0; | | 1676 | b->yy_ch_buf = 0; |
1674 | | | 1677 | |
1675 | if ( ! b->yy_ch_buf ) | | 1678 | if ( ! b->yy_ch_buf ) |
1676 | YY_FATAL_ERROR( | | 1679 | YY_FATAL_ERROR( |
1677 | "fatal error - scanner input buffer overflow" ); | | 1680 | "fatal error - scanner input buffer overflow" ); |
1678 | | | 1681 | |
1679 | YY_G(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; | | 1682 | YY_G(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; |
1680 | | | 1683 | |
1681 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - | | 1684 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
1682 | number_to_move - 1; | | 1685 | number_to_move - 1; |
1683 | ]]) | | 1686 | ]]) |
1684 | } | | 1687 | } |
1685 | | | 1688 | |
1686 | if ( num_to_read > YY_READ_BUF_SIZE ) | | 1689 | if ( num_to_read > YY_READ_BUF_SIZE ) |
1687 | num_to_read = YY_READ_BUF_SIZE; | | 1690 | num_to_read = YY_READ_BUF_SIZE; |
1688 | | | 1691 | |
1689 | /* Read in more data. */ | | 1692 | /* Read in more data. */ |
1690 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), | | 1693 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
1691 | YY_G(yy_n_chars), (size_t) num_to_read ); | | 1694 | YY_G(yy_n_chars), (size_t) num_to_read ); |
1692 | | | 1695 | |
1693 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars); | | 1696 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = YY_G(yy_n_chars); |
1694 | } | | 1697 | } |
1695 | | | 1698 | |
1696 | if ( YY_G(yy_n_chars) == 0 ) | | 1699 | if ( YY_G(yy_n_chars) == 0 ) |
1697 | { | | 1700 | { |
1698 | if ( number_to_move == YY_MORE_ADJ ) | | 1701 | if ( number_to_move == YY_MORE_ADJ ) |
1699 | { | | 1702 | { |
1700 | ret_val = EOB_ACT_END_OF_FILE; | | 1703 | ret_val = EOB_ACT_END_OF_FILE; |
1701 | yyrestart( yyin M4_YY_CALL_LAST_ARG); | | 1704 | yyrestart( yyin M4_YY_CALL_LAST_ARG); |
1702 | } | | 1705 | } |
1703 | | | 1706 | |
1704 | else | | 1707 | else |
1705 | { | | 1708 | { |
1706 | ret_val = EOB_ACT_LAST_MATCH; | | 1709 | ret_val = EOB_ACT_LAST_MATCH; |
1707 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = | | 1710 | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
1708 | YY_BUFFER_EOF_PENDING; | | 1711 | YY_BUFFER_EOF_PENDING; |
1709 | } | | 1712 | } |
1710 | } | | 1713 | } |
1711 | | | 1714 | |
1712 | else | | 1715 | else |
1713 | ret_val = EOB_ACT_CONTINUE_SCAN; | | 1716 | ret_val = EOB_ACT_CONTINUE_SCAN; |
1714 | | | 1717 | |
1715 | if ((yy_size_t) (YY_G(yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { | | 1718 | if ((yy_size_t) (YY_G(yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
1716 | /* Extend the array by 50%, plus the number we really need. */ | | 1719 | /* Extend the array by 50%, plus the number we really need. */ |
1717 | yy_size_t new_size = YY_G(yy_n_chars) + number_to_move + (YY_G(yy_n_chars) >> 1); | | 1720 | yy_size_t new_size = YY_G(yy_n_chars) + number_to_move + (YY_G(yy_n_chars) >> 1); |
1718 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( | | 1721 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( |
1719 | (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, new_size M4_YY_CALL_LAST_ARG ); | | 1722 | (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, new_size M4_YY_CALL_LAST_ARG ); |
1720 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) | | 1723 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
1721 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); | | 1724 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
1722 | } | | 1725 | } |
1723 | | | 1726 | |
1724 | YY_G(yy_n_chars) += number_to_move; | | 1727 | YY_G(yy_n_chars) += number_to_move; |
1725 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; | | 1728 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; |
1726 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; | | 1729 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; |
1727 | | | 1730 | |
1728 | YY_G(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; | | 1731 | YY_G(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
1729 | | | 1732 | |
1730 | return ret_val; | | 1733 | return ret_val; |
1731 | } | | 1734 | } |
1732 | ]]) | | 1735 | ]]) |
1733 | | | 1736 | |
1734 | /* yy_get_previous_state - get the state just before the EOB char was reached */ | | 1737 | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
1735 | | | 1738 | |
1736 | %if-c-only | | 1739 | %if-c-only |
1737 | %not-for-header | | 1740 | %not-for-header |