File: | src/sbin/wsconsctl/obj/map_scan.c |
Warning: | line 749, column 19 Array subscript is undefined |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
1 | #line 2 "map_scan.c" | |||
2 | ||||
3 | #line 4 "map_scan.c" | |||
4 | ||||
5 | #define YY_INT_ALIGNEDshort int short int | |||
6 | ||||
7 | /* $OpenBSD: flex.skl,v 1.18 2021/11/30 15:50:06 millert Exp $ */ | |||
8 | ||||
9 | /* A lexical scanner generated by flex */ | |||
10 | ||||
11 | #define FLEX_SCANNER | |||
12 | #define YY_FLEX_MAJOR_VERSION2 2 | |||
13 | #define YY_FLEX_MINOR_VERSION5 5 | |||
14 | #define YY_FLEX_SUBMINOR_VERSION39 39 | |||
15 | #if YY_FLEX_SUBMINOR_VERSION39 > 0 | |||
16 | #define FLEX_BETA | |||
17 | #endif | |||
18 | ||||
19 | /* First, we deal with platform-specific or compiler-specific issues. */ | |||
20 | ||||
21 | /* begin standard C headers. */ | |||
22 | #include <stdio.h> | |||
23 | #include <string.h> | |||
24 | #include <errno(*__errno()).h> | |||
25 | #include <stdlib.h> | |||
26 | ||||
27 | /* end standard C headers. */ | |||
28 | ||||
29 | /* $OpenBSD: flexint.h,v 1.1 2015/11/19 19:43:40 tedu Exp $ */ | |||
30 | ||||
31 | /* flex integer type definitions */ | |||
32 | ||||
33 | #ifndef FLEXINT_H | |||
34 | #define FLEXINT_H | |||
35 | ||||
36 | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ | |||
37 | ||||
38 | #if defined (__STDC_VERSION__201710L) && __STDC_VERSION__201710L >= 199901L | |||
39 | ||||
40 | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, | |||
41 | * if you want the limit (max/min) macros for int types. | |||
42 | */ | |||
43 | #ifndef __STDC_LIMIT_MACROS1 | |||
44 | #define __STDC_LIMIT_MACROS1 1 | |||
45 | #endif | |||
46 | ||||
47 | #include <inttypes.h> | |||
48 | typedef int8_t flex_int8_t; | |||
49 | typedef uint8_t flex_uint8_t; | |||
50 | typedef int16_t flex_int16_t; | |||
51 | typedef uint16_t flex_uint16_t; | |||
52 | typedef int32_t flex_int32_t; | |||
53 | typedef uint32_t flex_uint32_t; | |||
54 | #else | |||
55 | typedef signed char flex_int8_t; | |||
56 | typedef short int flex_int16_t; | |||
57 | typedef int flex_int32_t; | |||
58 | typedef unsigned char flex_uint8_t; | |||
59 | typedef unsigned short int flex_uint16_t; | |||
60 | typedef unsigned int flex_uint32_t; | |||
61 | ||||
62 | /* Limits of integral types. */ | |||
63 | #ifndef INT8_MIN(-0x7f - 1) | |||
64 | #define INT8_MIN(-0x7f - 1) (-128) | |||
65 | #endif | |||
66 | #ifndef INT16_MIN(-0x7fff - 1) | |||
67 | #define INT16_MIN(-0x7fff - 1) (-32767-1) | |||
68 | #endif | |||
69 | #ifndef INT32_MIN(-0x7fffffff - 1) | |||
70 | #define INT32_MIN(-0x7fffffff - 1) (-2147483647-1) | |||
71 | #endif | |||
72 | #ifndef INT8_MAX0x7f | |||
73 | #define INT8_MAX0x7f (127) | |||
74 | #endif | |||
75 | #ifndef INT16_MAX0x7fff | |||
76 | #define INT16_MAX0x7fff (32767) | |||
77 | #endif | |||
78 | #ifndef INT32_MAX0x7fffffff | |||
79 | #define INT32_MAX0x7fffffff (2147483647) | |||
80 | #endif | |||
81 | #ifndef UINT8_MAX0xff | |||
82 | #define UINT8_MAX0xff (255U) | |||
83 | #endif | |||
84 | #ifndef UINT16_MAX0xffff | |||
85 | #define UINT16_MAX0xffff (65535U) | |||
86 | #endif | |||
87 | #ifndef UINT32_MAX0xffffffffU | |||
88 | #define UINT32_MAX0xffffffffU (4294967295U) | |||
89 | #endif | |||
90 | ||||
91 | #endif /* ! C99 */ | |||
92 | ||||
93 | #endif /* ! FLEXINT_H */ | |||
94 | ||||
95 | #ifdef __cplusplus | |||
96 | ||||
97 | /* The "const" storage-class-modifier is valid. */ | |||
98 | #define YY_USE_CONST | |||
99 | ||||
100 | #else /* ! __cplusplus */ | |||
101 | ||||
102 | /* C99 requires __STDC__ to be defined as 1. */ | |||
103 | #if defined (__STDC__1) | |||
104 | ||||
105 | #define YY_USE_CONST | |||
106 | ||||
107 | #endif /* defined (__STDC__) */ | |||
108 | #endif /* ! __cplusplus */ | |||
109 | ||||
110 | #ifdef YY_USE_CONST | |||
111 | #define yyconstconst const | |||
112 | #else | |||
113 | #define yyconstconst | |||
114 | #endif | |||
115 | ||||
116 | /* Returned upon end-of-file. */ | |||
117 | #define YY_NULL0 0 | |||
118 | ||||
119 | /* Promotes a possibly negative, possibly signed char to an unsigned | |||
120 | * integer for use as an array index. If the signed char is negative, | |||
121 | * we want to instead treat it as an 8-bit unsigned char, hence the | |||
122 | * double cast. | |||
123 | */ | |||
124 | #define YY_SC_TO_UI(c)((unsigned int) (unsigned char) c) ((unsigned int) (unsigned char) c) | |||
125 | ||||
126 | /* Enter a start condition. This macro really ought to take a parameter, | |||
127 | * but we do it the disgusting crufty way forced on us by the ()-less | |||
128 | * definition of BEGIN. | |||
129 | */ | |||
130 | #define BEGIN(yy_start) = 1 + 2 * (yy_start) = 1 + 2 * | |||
131 | ||||
132 | /* Translate the current start state into a value that can be later handed | |||
133 | * to BEGIN to return to the state. The YYSTATE alias is for lex | |||
134 | * compatibility. | |||
135 | */ | |||
136 | #define YY_START(((yy_start) - 1) / 2) (((yy_start) - 1) / 2) | |||
137 | #define YYSTATE(((yy_start) - 1) / 2) YY_START(((yy_start) - 1) / 2) | |||
138 | ||||
139 | /* Action number for EOF rule of a given start state. */ | |||
140 | #define YY_STATE_EOF(state)(9 + state + 1) (YY_END_OF_BUFFER9 + state + 1) | |||
141 | ||||
142 | /* Special action meaning "start processing a new file". */ | |||
143 | #define YY_NEW_FILEyyrestart(yyin ) yyrestart(yyin ) | |||
144 | ||||
145 | #define YY_END_OF_BUFFER_CHAR0 0 | |||
146 | ||||
147 | /* Size of default input buffer. */ | |||
148 | #ifndef YY_BUF_SIZE16384 | |||
149 | #define YY_BUF_SIZE16384 16384 | |||
150 | #endif | |||
151 | ||||
152 | /* The state buf must be large enough to hold one state per character in the main buffer. | |||
153 | */ | |||
154 | #define YY_STATE_BUF_SIZE((16384 + 2) * sizeof(yy_state_type)) ((YY_BUF_SIZE16384 + 2) * sizeof(yy_state_type)) | |||
155 | ||||
156 | #ifndef YY_TYPEDEF_YY_BUFFER_STATE | |||
157 | #define YY_TYPEDEF_YY_BUFFER_STATE | |||
158 | typedef struct yy_buffer_state *YY_BUFFER_STATE; | |||
159 | #endif | |||
160 | ||||
161 | #ifndef YY_TYPEDEF_YY_SIZE_T | |||
162 | #define YY_TYPEDEF_YY_SIZE_T | |||
163 | typedef size_t yy_size_t; | |||
164 | #endif | |||
165 | ||||
166 | extern yy_size_t yyleng; | |||
167 | ||||
168 | extern FILE *yyin, *yyout; | |||
169 | ||||
170 | #define EOB_ACT_CONTINUE_SCAN0 0 | |||
171 | #define EOB_ACT_END_OF_FILE1 1 | |||
172 | #define EOB_ACT_LAST_MATCH2 2 | |||
173 | ||||
174 | #define YY_LESS_LINENO(n) | |||
175 | #define YY_LINENO_REWIND_TO(ptr) | |||
176 | ||||
177 | /* Return all but the first "n" matched characters back to the input stream. */ | |||
178 | #define yyless(n)do { int yyless_macro_arg = (n); ; yytext[yyleng] = (yy_hold_char ); (yy_c_buf_p) = yytext + yyless_macro_arg; (yy_hold_char) = *(yy_c_buf_p); *(yy_c_buf_p) = '\0'; yyleng = yyless_macro_arg ; } while ( 0 ) \ | |||
179 | do \ | |||
180 | { \ | |||
181 | /* Undo effects of setting up yytext. */ \ | |||
182 | int yyless_macro_arg = (n); \ | |||
183 | YY_LESS_LINENO(yyless_macro_arg);\ | |||
184 | *yy_cp = (yy_hold_char); \ | |||
185 | YY_RESTORE_YY_MORE_OFFSET \ | |||
186 | (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ0; \ | |||
187 | YY_DO_BEFORE_ACTION(yytext) = yy_bp; yyleng = (size_t) (yy_cp - yy_bp); (yy_hold_char ) = *yy_cp; *yy_cp = '\0'; (yy_c_buf_p) = yy_cp;; /* set up yytext again */ \ | |||
188 | } \ | |||
189 | while ( 0 ) | |||
190 | ||||
191 | #define unput(c)yyunput( c, (yytext) ) yyunput( c, (yytext_ptryytext) ) | |||
192 | ||||
193 | #ifndef YY_STRUCT_YY_BUFFER_STATE | |||
194 | #define YY_STRUCT_YY_BUFFER_STATE | |||
195 | struct yy_buffer_state | |||
196 | { | |||
197 | FILE *yy_input_file; | |||
198 | ||||
199 | char *yy_ch_buf; /* input buffer */ | |||
200 | char *yy_buf_pos; /* current position in input buffer */ | |||
201 | ||||
202 | /* Size of input buffer in bytes, not including room for EOB | |||
203 | * characters. | |||
204 | */ | |||
205 | yy_size_t yy_buf_size; | |||
206 | ||||
207 | /* Number of characters read into yy_ch_buf, not including EOB | |||
208 | * characters. | |||
209 | */ | |||
210 | yy_size_t yy_n_chars; | |||
211 | ||||
212 | /* Whether we "own" the buffer - i.e., we know we created it, | |||
213 | * and can realloc() it to grow it, and should free() it to | |||
214 | * delete it. | |||
215 | */ | |||
216 | int yy_is_our_buffer; | |||
217 | ||||
218 | /* Whether this is an "interactive" input source; if so, and | |||
219 | * if we're using stdio for input, then we want to use getc() | |||
220 | * instead of fread(), to make sure we stop fetching input after | |||
221 | * each newline. | |||
222 | */ | |||
223 | int yy_is_interactive; | |||
224 | ||||
225 | /* Whether we're considered to be at the beginning of a line. | |||
226 | * If so, '^' rules will be active on the next match, otherwise | |||
227 | * not. | |||
228 | */ | |||
229 | int yy_at_bol; | |||
230 | ||||
231 | int yy_bs_lineno; /**< The line count. */ | |||
232 | int yy_bs_column; /**< The column count. */ | |||
233 | ||||
234 | /* Whether to try to fill the input buffer when we reach the | |||
235 | * end of it. | |||
236 | */ | |||
237 | int yy_fill_buffer; | |||
238 | ||||
239 | int yy_buffer_status; | |||
240 | ||||
241 | #define YY_BUFFER_NEW0 0 | |||
242 | #define YY_BUFFER_NORMAL1 1 | |||
243 | /* When an EOF's been seen but there's still some text to process | |||
244 | * then we mark the buffer as YY_EOF_PENDING, to indicate that we | |||
245 | * shouldn't try reading from the input source any more. We might | |||
246 | * still have a bunch of tokens to match, though, because of | |||
247 | * possible backing-up. | |||
248 | * | |||
249 | * When we actually see the EOF, we change the status to "new" | |||
250 | * (via yyrestart()), so that the user can continue scanning by | |||
251 | * just pointing yyin at a new input file. | |||
252 | */ | |||
253 | #define YY_BUFFER_EOF_PENDING2 2 | |||
254 | ||||
255 | }; | |||
256 | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ | |||
257 | ||||
258 | /* Stack of input buffers. */ | |||
259 | static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ | |||
260 | static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ | |||
261 | static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ | |||
262 | ||||
263 | /* We provide macros for accessing buffer states in case in the | |||
264 | * future we want to put the buffer states in a more general | |||
265 | * "scanner state". | |||
266 | * | |||
267 | * Returns the top of the stack, or NULL. | |||
268 | */ | |||
269 | #define YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)) ( (yy_buffer_stack) \ | |||
270 | ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ | |||
271 | : NULL((void *)0)) | |||
272 | ||||
273 | /* Same as previous macro, but useful when we know that the buffer stack is not | |||
274 | * NULL or when we need an lvalue. For internal use only. | |||
275 | */ | |||
276 | #define YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] (yy_buffer_stack)[(yy_buffer_stack_top)] | |||
277 | ||||
278 | /* yy_hold_char holds the character lost when yytext is formed. */ | |||
279 | static char yy_hold_char; | |||
280 | static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ | |||
281 | yy_size_t yyleng; | |||
282 | ||||
283 | /* Points to current character in buffer. */ | |||
284 | static char *yy_c_buf_p = (char *) 0; | |||
285 | static int yy_init = 0; /* whether we need to initialize */ | |||
286 | static int yy_start = 0; /* start state number */ | |||
287 | ||||
288 | /* Flag which is used to allow yywrap()'s to do buffer switches | |||
289 | * instead of setting up a fresh yyin. A bit of a hack ... | |||
290 | */ | |||
291 | static int yy_did_buffer_switch_on_eof; | |||
292 | ||||
293 | void yyrestart (FILE *input_file ); | |||
294 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); | |||
295 | YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); | |||
296 | void yy_delete_buffer (YY_BUFFER_STATE b ); | |||
297 | void yy_flush_buffer (YY_BUFFER_STATE b ); | |||
298 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); | |||
299 | void yypop_buffer_state (void ); | |||
300 | ||||
301 | static void yyensure_buffer_stack (void ); | |||
302 | static void yy_load_buffer_state (void ); | |||
303 | static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); | |||
304 | ||||
305 | #define YY_FLUSH_BUFFERyy_flush_buffer(( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top )] : ((void *)0)) ) yy_flush_buffer(YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)) ) | |||
306 | ||||
307 | YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); | |||
308 | YY_BUFFER_STATE yy_scan_string (yyconstconst char *yy_str ); | |||
309 | YY_BUFFER_STATE yy_scan_bytes (yyconstconst char *bytes,yy_size_t len ); | |||
310 | ||||
311 | void *yyalloc (yy_size_t ); | |||
312 | void *yyrealloc (void *,yy_size_t ); | |||
313 | void yyfree (void * ); | |||
314 | ||||
315 | #define yy_new_bufferyy_create_buffer yy_create_buffer | |||
316 | ||||
317 | #define yy_set_interactive(is_interactive){ if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top )] : ((void *)0)) ){ yyensure_buffer_stack (); (yy_buffer_stack )[(yy_buffer_stack_top)] = yy_create_buffer(yyin,16384 ); } ( yy_buffer_stack)[(yy_buffer_stack_top)]->yy_is_interactive = is_interactive; } \ | |||
318 | { \ | |||
319 | if ( ! YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)) ){ \ | |||
320 | yyensure_buffer_stack (); \ | |||
321 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = \ | |||
322 | yy_create_buffer(yyin,YY_BUF_SIZE16384 ); \ | |||
323 | } \ | |||
324 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_is_interactive = is_interactive; \ | |||
325 | } | |||
326 | ||||
327 | #define yy_set_bol(at_bol){ if ( ! ( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top )] : ((void *)0)) ){ yyensure_buffer_stack (); (yy_buffer_stack )[(yy_buffer_stack_top)] = yy_create_buffer(yyin,16384 ); } ( yy_buffer_stack)[(yy_buffer_stack_top)]->yy_at_bol = at_bol ; } \ | |||
328 | { \ | |||
329 | if ( ! YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)) ){\ | |||
330 | yyensure_buffer_stack (); \ | |||
331 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = \ | |||
332 | yy_create_buffer(yyin,YY_BUF_SIZE16384 ); \ | |||
333 | } \ | |||
334 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_at_bol = at_bol; \ | |||
335 | } | |||
336 | ||||
337 | #define YY_AT_BOL()((yy_buffer_stack)[(yy_buffer_stack_top)]->yy_at_bol) (YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_at_bol) | |||
338 | ||||
339 | #define yywrap()1 1 | |||
340 | #define YY_SKIP_YYWRAP | |||
341 | ||||
342 | typedef unsigned char YY_CHAR; | |||
343 | ||||
344 | FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; | |||
345 | ||||
346 | typedef int yy_state_type; | |||
347 | ||||
348 | extern int yylineno; | |||
349 | ||||
350 | int yylineno = 1; | |||
351 | ||||
352 | extern char *yytext; | |||
353 | #define yytext_ptryytext yytext | |||
354 | ||||
355 | static yy_state_type yy_get_previous_state (void ); | |||
356 | static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); | |||
357 | static int yy_get_next_buffer (void ); | |||
358 | static void yy_fatal_error (yyconstconst char msg[] ); | |||
359 | ||||
360 | /* Done after the current pattern has been matched and before the | |||
361 | * corresponding action - sets up yytext. | |||
362 | */ | |||
363 | #define YY_DO_BEFORE_ACTION(yytext) = yy_bp; yyleng = (size_t) (yy_cp - yy_bp); (yy_hold_char ) = *yy_cp; *yy_cp = '\0'; (yy_c_buf_p) = yy_cp; \ | |||
364 | (yytext_ptryytext) = yy_bp; \ | |||
365 | yyleng = (size_t) (yy_cp - yy_bp); \ | |||
366 | (yy_hold_char) = *yy_cp; \ | |||
367 | *yy_cp = '\0'; \ | |||
368 | (yy_c_buf_p) = yy_cp; | |||
369 | ||||
370 | #define YY_NUM_RULES8 8 | |||
371 | #define YY_END_OF_BUFFER9 9 | |||
372 | /* This struct is not used in this scanner, | |||
373 | but its presence is necessary. */ | |||
374 | struct yy_trans_info | |||
375 | { | |||
376 | flex_int32_t yy_verify; | |||
377 | flex_int32_t yy_nxt; | |||
378 | }; | |||
379 | static yyconstconst flex_int16_t yy_accept[24] = | |||
380 | { 0, | |||
381 | 0, 0, 9, 7, 1, 1, 6, 2, 5, 5, | |||
382 | 1, 6, 5, 5, 5, 5, 5, 5, 5, 5, | |||
383 | 4, 3, 0 | |||
384 | } ; | |||
385 | ||||
386 | static yyconstconst flex_int32_t yy_ec[256] = | |||
387 | { 0, | |||
388 | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, | |||
389 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
390 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
391 | 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, | |||
392 | 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, | |||
393 | 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, | |||
394 | 5, 1, 1, 1, 6, 6, 6, 6, 6, 6, | |||
395 | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, | |||
396 | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, | |||
397 | 1, 1, 1, 1, 7, 1, 6, 6, 8, 9, | |||
398 | ||||
399 | 10, 6, 6, 6, 6, 6, 11, 6, 12, 6, | |||
400 | 13, 6, 6, 6, 14, 6, 6, 6, 6, 6, | |||
401 | 15, 6, 1, 1, 1, 1, 1, 1, 1, 1, | |||
402 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
403 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
404 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
405 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
406 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
407 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
408 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
409 | ||||
410 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
411 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
412 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
413 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
414 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
415 | 1, 1, 1, 1, 1 | |||
416 | } ; | |||
417 | ||||
418 | static yyconstconst flex_int32_t yy_meta[16] = | |||
419 | { 0, | |||
420 | 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, | |||
421 | 2, 2, 2, 2, 2 | |||
422 | } ; | |||
423 | ||||
424 | static yyconstconst flex_int16_t yy_base[25] = | |||
425 | { 0, | |||
426 | 0, 0, 34, 35, 14, 16, 29, 35, 0, 22, | |||
427 | 18, 27, 0, 15, 14, 16, 12, 17, 13, 14, | |||
428 | 0, 0, 35, 21 | |||
429 | } ; | |||
430 | ||||
431 | static yyconstconst flex_int16_t yy_def[25] = | |||
432 | { 0, | |||
433 | 23, 1, 23, 23, 23, 23, 23, 23, 24, 24, | |||
434 | 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, | |||
435 | 24, 24, 0, 23 | |||
436 | } ; | |||
437 | ||||
438 | static yyconstconst flex_int16_t yy_nxt[51] = | |||
439 | { 0, | |||
440 | 4, 5, 6, 7, 8, 9, 4, 9, 9, 9, | |||
441 | 10, 9, 9, 9, 9, 11, 11, 11, 11, 11, | |||
442 | 11, 16, 13, 22, 21, 20, 19, 17, 18, 15, | |||
443 | 12, 14, 12, 23, 3, 23, 23, 23, 23, 23, | |||
444 | 23, 23, 23, 23, 23, 23, 23, 23, 23, 23 | |||
445 | } ; | |||
446 | ||||
447 | static yyconstconst flex_int16_t yy_chk[51] = | |||
448 | { 0, | |||
449 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | |||
450 | 1, 1, 1, 1, 1, 5, 5, 6, 6, 11, | |||
451 | 11, 15, 24, 20, 19, 18, 17, 15, 16, 14, | |||
452 | 12, 10, 7, 3, 23, 23, 23, 23, 23, 23, | |||
453 | 23, 23, 23, 23, 23, 23, 23, 23, 23, 23 | |||
454 | } ; | |||
455 | ||||
456 | static yy_state_type yy_last_accepting_state; | |||
457 | static char *yy_last_accepting_cpos; | |||
458 | ||||
459 | extern int yy_flex_debug; | |||
460 | int yy_flex_debug = 0; | |||
461 | ||||
462 | /* The intent behind this definition is that it'll catch | |||
463 | * any uses of REJECT which flex missed. | |||
464 | */ | |||
465 | #define REJECTreject_used_but_not_detected reject_used_but_not_detected | |||
466 | #define yymore()yymore_used_but_not_detected yymore_used_but_not_detected | |||
467 | #define YY_MORE_ADJ0 0 | |||
468 | #define YY_RESTORE_YY_MORE_OFFSET | |||
469 | char *yytext; | |||
470 | #line 1 "/usr/src/sbin/wsconsctl/map_scan.l" | |||
471 | /* $OpenBSD: map_scan.l,v 1.8 2017/12/31 09:40:41 anton Exp $ */ | |||
472 | /* $NetBSD: map_scan.l 1.1 1998/12/28 14:01:17 hannken Exp $ */ | |||
473 | /*- | |||
474 | * Copyright (c) 1998 The NetBSD Foundation, Inc. | |||
475 | * All rights reserved. | |||
476 | * | |||
477 | * This code is derived from software contributed to The NetBSD Foundation | |||
478 | * by Juergen Hannken-Illjes. | |||
479 | * | |||
480 | * Redistribution and use in source and binary forms, with or without | |||
481 | * modification, are permitted provided that the following conditions | |||
482 | * are met: | |||
483 | * 1. Redistributions of source code must retain the above copyright | |||
484 | * notice, this list of conditions and the following disclaimer. | |||
485 | * 2. Redistributions in binary form must reproduce the above copyright | |||
486 | * notice, this list of conditions and the following disclaimer in the | |||
487 | * documentation and/or other materials provided with the distribution. | |||
488 | * | |||
489 | * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS | |||
490 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |||
491 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |||
492 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |||
493 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |||
494 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |||
495 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |||
496 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |||
497 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |||
498 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |||
499 | * POSSIBILITY OF SUCH DAMAGE. | |||
500 | */ | |||
501 | #define YY_NO_INPUT1 1 | |||
502 | #line 36 "/usr/src/sbin/wsconsctl/map_scan.l" | |||
503 | ||||
504 | #include <dev/wscons/wsksymdef.h> | |||
505 | #include <dev/wscons/wsksymvar.h> | |||
506 | #include <limits.h> | |||
507 | #include <err.h> | |||
508 | #include "wsconsctl.h" | |||
509 | #include "map_parse.h" | |||
510 | ||||
511 | void | |||
512 | map_scan_setinput(char *str) | |||
513 | { | |||
514 | yy_scan_string(str); | |||
515 | } | |||
516 | ||||
517 | #line 518 "map_scan.c" | |||
518 | ||||
519 | #define INITIAL0 0 | |||
520 | ||||
521 | #ifndef YY_NO_UNISTD_H | |||
522 | /* Special case for "unistd.h", since it is non-ANSI. We include it way | |||
523 | * down here because we want the user's section 1 to have been scanned first. | |||
524 | * The user has a chance to override it with an option. | |||
525 | */ | |||
526 | #include <unistd.h> | |||
527 | #endif | |||
528 | ||||
529 | #ifndef YY_EXTRA_TYPEvoid * | |||
530 | #define YY_EXTRA_TYPEvoid * void * | |||
531 | #endif | |||
532 | ||||
533 | static int yy_init_globals (void ); | |||
534 | ||||
535 | /* Accessor methods to globals. | |||
536 | These are made visible to non-reentrant scanners for convenience. */ | |||
537 | ||||
538 | int yylex_destroy (void ); | |||
539 | ||||
540 | int yyget_debug (void ); | |||
541 | ||||
542 | void yyset_debug (int debug_flag ); | |||
543 | ||||
544 | YY_EXTRA_TYPEvoid * yyget_extra (void ); | |||
545 | ||||
546 | void yyset_extra (YY_EXTRA_TYPEvoid * user_defined ); | |||
547 | ||||
548 | FILE *yyget_in (void ); | |||
549 | ||||
550 | void yyset_in (FILE * in_str ); | |||
551 | ||||
552 | FILE *yyget_out (void ); | |||
553 | ||||
554 | void yyset_out (FILE * out_str ); | |||
555 | ||||
556 | yy_size_t yyget_leng (void ); | |||
557 | ||||
558 | char *yyget_text (void ); | |||
559 | ||||
560 | int yyget_lineno (void ); | |||
561 | ||||
562 | void yyset_lineno (int line_number ); | |||
563 | ||||
564 | /* Macros after this point can all be overridden by user definitions in | |||
565 | * section 1. | |||
566 | */ | |||
567 | ||||
568 | #ifndef YY_SKIP_YYWRAP | |||
569 | #ifdef __cplusplus | |||
570 | extern "C" int yywrap (void ); | |||
571 | #else | |||
572 | extern int yywrap (void ); | |||
573 | #endif | |||
574 | #endif | |||
575 | ||||
576 | static void yyunput (int c,char *buf_ptr ); | |||
577 | ||||
578 | #ifndef yytext_ptryytext | |||
579 | static void yy_flex_strncpy (char *,yyconstconst char *,int ); | |||
580 | #endif | |||
581 | ||||
582 | #ifdef YY_NEED_STRLEN | |||
583 | static int yy_flex_strlen (yyconstconst char * ); | |||
584 | #endif | |||
585 | ||||
586 | #ifndef YY_NO_INPUT1 | |||
587 | ||||
588 | #ifdef __cplusplus | |||
589 | static int yyinput (void ); | |||
590 | #else | |||
591 | static int input (void ); | |||
592 | #endif | |||
593 | ||||
594 | #endif | |||
595 | ||||
596 | /* Amount of stuff to slurp up with each read. */ | |||
597 | #ifndef YY_READ_BUF_SIZE8192 | |||
598 | #define YY_READ_BUF_SIZE8192 8192 | |||
599 | #endif | |||
600 | ||||
601 | /* Copy whatever the last rule matched to the standard output. */ | |||
602 | #ifndef ECHOdo { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) | |||
603 | /* This used to be an fputs(), but since the string might contain NUL's, | |||
604 | * we now use fwrite(). | |||
605 | */ | |||
606 | #define ECHOdo { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) | |||
607 | #endif | |||
608 | ||||
609 | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, | |||
610 | * is returned in "result". | |||
611 | */ | |||
612 | #ifndef YY_INPUT | |||
613 | #define YY_INPUT(buf,result,max_size)if ( (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_is_interactive ) { int c = '*'; size_t n; for ( n = 0; n < max_size && (c = (!__isthreaded ? (--(yyin)->_r < 0 ? __srget(yyin ) : (int)(*(yyin)->_p++)) : (getc)(yyin))) != (-1) && c != '\n'; ++n ) buf[n] = (char) c; if ( c == '\n' ) buf[n++ ] = (char) c; if ( c == (-1) && (!__isthreaded ? (((yyin )->_flags & 0x0040) != 0) : (ferror)(yyin)) ) yy_fatal_error ( "input in flex scanner failed" ); result = n; } else { (*__errno ())=0; while ( (result = fread(buf, 1, max_size, yyin))==0 && (!__isthreaded ? (((yyin)->_flags & 0x0040) != 0) : ( ferror)(yyin))) { if( (*__errno()) != 4) { yy_fatal_error( "input in flex scanner failed" ); break; } (*__errno())=0; (!__isthreaded ? ((void)((yyin)-> _flags &= ~(0x0040|0x0020))) : (clearerr)(yyin)); } } \ | |||
614 | if ( YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_is_interactive ) \ | |||
615 | { \ | |||
616 | int c = '*'; \ | |||
617 | size_t n; \ | |||
618 | for ( n = 0; n < max_size && \ | |||
619 | (c = getc( yyin )(!__isthreaded ? (--(yyin)->_r < 0 ? __srget(yyin) : (int )(*(yyin)->_p++)) : (getc)(yyin))) != EOF(-1) && c != '\n'; ++n ) \ | |||
620 | buf[n] = (char) c; \ | |||
621 | if ( c == '\n' ) \ | |||
622 | buf[n++] = (char) c; \ | |||
623 | if ( c == EOF(-1) && ferror( yyin )(!__isthreaded ? (((yyin)->_flags & 0x0040) != 0) : (ferror )(yyin)) ) \ | |||
624 | YY_FATAL_ERROR( "input in flex scanner failed" )yy_fatal_error( "input in flex scanner failed" ); \ | |||
625 | result = n; \ | |||
626 | } \ | |||
627 | else \ | |||
628 | { \ | |||
629 | errno(*__errno())=0; \ | |||
630 | while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)(!__isthreaded ? (((yyin)->_flags & 0x0040) != 0) : (ferror )(yyin))) \ | |||
631 | { \ | |||
632 | if( errno(*__errno()) != EINTR4) \ | |||
633 | { \ | |||
634 | YY_FATAL_ERROR( "input in flex scanner failed" )yy_fatal_error( "input in flex scanner failed" ); \ | |||
635 | break; \ | |||
636 | } \ | |||
637 | errno(*__errno())=0; \ | |||
638 | clearerr(yyin)(!__isthreaded ? ((void)((yyin)->_flags &= ~(0x0040|0x0020 ))) : (clearerr)(yyin)); \ | |||
639 | } \ | |||
640 | }\ | |||
641 | \ | |||
642 | ||||
643 | #endif | |||
644 | ||||
645 | /* No semi-colon after return; correct usage is to write "yyterminate();" - | |||
646 | * we don't want an extra ';' after the "return" because that will cause | |||
647 | * some compilers to complain about unreachable statements. | |||
648 | */ | |||
649 | #ifndef yyterminate | |||
650 | #define yyterminate()return 0 return YY_NULL0 | |||
651 | #endif | |||
652 | ||||
653 | /* Number of entries by which start-condition stack grows. */ | |||
654 | #ifndef YY_START_STACK_INCR25 | |||
655 | #define YY_START_STACK_INCR25 25 | |||
656 | #endif | |||
657 | ||||
658 | /* Report a fatal error. */ | |||
659 | #ifndef YY_FATAL_ERROR | |||
660 | #define YY_FATAL_ERROR(msg)yy_fatal_error( msg ) yy_fatal_error( msg ) | |||
661 | #endif | |||
662 | ||||
663 | /* end tables serialization structures and prototypes */ | |||
664 | ||||
665 | /* Default declaration of generated scanner - a define so the user can | |||
666 | * easily add parameters. | |||
667 | */ | |||
668 | #ifndef YY_DECLint yylex (void) | |||
669 | #define YY_DECL_IS_OURS1 1 | |||
670 | ||||
671 | extern int yylex (void); | |||
672 | ||||
673 | #define YY_DECLint yylex (void) int yylex (void) | |||
674 | #endif /* !YY_DECL */ | |||
675 | ||||
676 | /* Code executed at the beginning of each rule, after yytext and yyleng | |||
677 | * have been set up. | |||
678 | */ | |||
679 | #ifndef YY_USER_ACTION | |||
680 | #define YY_USER_ACTION | |||
681 | #endif | |||
682 | ||||
683 | /* Code executed at the end of each rule. */ | |||
684 | #ifndef YY_BREAKbreak; | |||
685 | #define YY_BREAKbreak; break; | |||
686 | #endif | |||
687 | ||||
688 | #define YY_RULE_SETUP \ | |||
689 | YY_USER_ACTION | |||
690 | ||||
691 | /** The main scanner function which does all the work. | |||
692 | */ | |||
693 | YY_DECLint yylex (void) | |||
694 | { | |||
695 | yy_state_type yy_current_state; | |||
696 | char *yy_cp, *yy_bp; | |||
697 | int yy_act; | |||
698 | ||||
699 | if ( !(yy_init) ) | |||
| ||||
700 | { | |||
701 | (yy_init) = 1; | |||
702 | ||||
703 | #ifdef YY_USER_INIT | |||
704 | YY_USER_INIT; | |||
705 | #endif | |||
706 | ||||
707 | if ( ! (yy_start) ) | |||
708 | (yy_start) = 1; /* first start state */ | |||
709 | ||||
710 | if ( ! yyin ) { | |||
711 | yyin = stdin(&__sF[0]); | |||
712 | } | |||
713 | ||||
714 | if ( ! yyout ) { | |||
715 | yyout = stdout(&__sF[1]); | |||
716 | } | |||
717 | ||||
718 | if ( ! YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)) ) { | |||
719 | yyensure_buffer_stack (); | |||
720 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = | |||
721 | yy_create_buffer(yyin,YY_BUF_SIZE16384 ); | |||
722 | } | |||
723 | ||||
724 | yy_load_buffer_state( ); | |||
725 | } | |||
726 | ||||
727 | { | |||
728 | #line 52 "/usr/src/sbin/wsconsctl/map_scan.l" | |||
729 | ||||
730 | ||||
731 | #line 732 "map_scan.c" | |||
732 | ||||
733 | while ( 1 ) /* loops until end-of-file is reached */ | |||
734 | { | |||
735 | yy_cp = (yy_c_buf_p); | |||
736 | ||||
737 | /* Support of yytext. */ | |||
738 | *yy_cp = (yy_hold_char); | |||
739 | ||||
740 | /* yy_bp points to the position in yy_ch_buf of the start of | |||
741 | * the current run. | |||
742 | */ | |||
743 | yy_bp = yy_cp; | |||
744 | ||||
745 | yy_current_state = (yy_start); | |||
746 | yy_match: | |||
747 | do | |||
748 | { | |||
749 | YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)((unsigned int) (unsigned char) *yy_cp)] ; | |||
| ||||
750 | if ( yy_accept[yy_current_state] ) | |||
751 | { | |||
752 | (yy_last_accepting_state) = yy_current_state; | |||
753 | (yy_last_accepting_cpos) = yy_cp; | |||
754 | } | |||
755 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | |||
756 | { | |||
757 | yy_current_state = (int) yy_def[yy_current_state]; | |||
758 | if ( yy_current_state >= 24 ) | |||
759 | yy_c = yy_meta[(unsigned int) yy_c]; | |||
760 | } | |||
761 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | |||
762 | ++yy_cp; | |||
763 | } | |||
764 | while ( yy_base[yy_current_state] != 35 ); | |||
765 | ||||
766 | yy_find_action: | |||
767 | yy_act = yy_accept[yy_current_state]; | |||
768 | if ( yy_act == 0 ) | |||
769 | { /* have to back up */ | |||
770 | yy_cp = (yy_last_accepting_cpos); | |||
771 | yy_current_state = (yy_last_accepting_state); | |||
772 | yy_act = yy_accept[yy_current_state]; | |||
773 | } | |||
774 | ||||
775 | YY_DO_BEFORE_ACTION(yytext) = yy_bp; yyleng = (size_t) (yy_cp - yy_bp); (yy_hold_char ) = *yy_cp; *yy_cp = '\0'; (yy_c_buf_p) = yy_cp;; | |||
776 | ||||
777 | do_action: /* This label is used only to access EOF actions. */ | |||
778 | ||||
779 | switch ( yy_act ) | |||
780 | { /* beginning of action switch */ | |||
781 | case 0: /* must back up */ | |||
782 | /* undo the effects of YY_DO_BEFORE_ACTION */ | |||
783 | *yy_cp = (yy_hold_char); | |||
784 | yy_cp = (yy_last_accepting_cpos); | |||
785 | yy_current_state = (yy_last_accepting_state); | |||
786 | goto yy_find_action; | |||
787 | ||||
788 | case 1: | |||
789 | /* rule 1 can match eol */ | |||
790 | YY_RULE_SETUP | |||
791 | #line 54 "/usr/src/sbin/wsconsctl/map_scan.l" | |||
792 | { | |||
793 | /* ignore spaces and tabs */ | |||
794 | } | |||
795 | YY_BREAKbreak; | |||
796 | case 2: | |||
797 | YY_RULE_SETUP | |||
798 | #line 58 "/usr/src/sbin/wsconsctl/map_scan.l" | |||
799 | { | |||
800 | return('='); | |||
801 | } | |||
802 | YY_BREAKbreak; | |||
803 | case 3: | |||
804 | YY_RULE_SETUP | |||
805 | #line 62 "/usr/src/sbin/wsconsctl/map_scan.l" | |||
806 | { | |||
807 | return(T_KEYCODE258); | |||
808 | } | |||
809 | YY_BREAKbreak; | |||
810 | case 4: | |||
811 | YY_RULE_SETUP | |||
812 | #line 66 "/usr/src/sbin/wsconsctl/map_scan.l" | |||
813 | { | |||
814 | return(T_KEYSYM257); | |||
815 | } | |||
816 | YY_BREAKbreak; | |||
817 | case 5: | |||
818 | YY_RULE_SETUP | |||
819 | #line 70 "/usr/src/sbin/wsconsctl/map_scan.l" | |||
820 | { | |||
821 | int i; | |||
822 | ||||
823 | i = name2ksym(yytext); | |||
824 | if (i == -1) | |||
825 | errx(1, "%s: not a keysym", yytext); | |||
826 | yylval.kval = i; | |||
827 | if (KS_GROUP(i)((i) >= 0x0300 && (i) < 0x0370 ? 0xf801 : (((i) & 0xf000) == 0xe000 ? 0xf803 : (((i) & 0xf800) == 0xf000 ? ((i) & 0xff00) : 0xf802))) == KS_GROUP_Command0xf400 || | |||
828 | i == KS_Cmd0xf10d || i == KS_Cmd10xf10e || i == KS_Cmd20xf10f) | |||
829 | return(T_KEYSYM_CMD_VAR260); | |||
830 | else | |||
831 | return(T_KEYSYM_VAR259); | |||
832 | } | |||
833 | YY_BREAKbreak; | |||
834 | case 6: | |||
835 | YY_RULE_SETUP | |||
836 | #line 84 "/usr/src/sbin/wsconsctl/map_scan.l" | |||
837 | { | |||
838 | const char *errstr; | |||
839 | ||||
840 | yylval.ival = strtonum(yytext, 0, INT_MAX2147483647, &errstr); | |||
841 | if (errstr) | |||
842 | errx(1, "%s: %s", yytext, errstr); | |||
843 | return(T_NUMBER261); | |||
844 | } | |||
845 | YY_BREAKbreak; | |||
846 | case 7: | |||
847 | YY_RULE_SETUP | |||
848 | #line 93 "/usr/src/sbin/wsconsctl/map_scan.l" | |||
849 | { | |||
850 | if (yytext[0] >= ' ' && yytext[0] <= '~') | |||
851 | errx(1, "%c: illegal character in input", yytext[0]); | |||
852 | else | |||
853 | errx(1, "%03o: illegal character in input", yytext[0] & 255); | |||
854 | ||||
855 | /* To quiet the compiler */ | |||
856 | if (0) | |||
857 | unput(0)yyunput( 0, (yytext) ); | |||
858 | } | |||
859 | YY_BREAKbreak; | |||
860 | case 8: | |||
861 | YY_RULE_SETUP | |||
862 | #line 103 "/usr/src/sbin/wsconsctl/map_scan.l" | |||
863 | ECHOdo { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0); | |||
864 | YY_BREAKbreak; | |||
865 | #line 866 "map_scan.c" | |||
866 | case YY_STATE_EOF(INITIAL)(9 + 0 + 1): | |||
867 | yyterminate()return 0; | |||
868 | ||||
869 | case YY_END_OF_BUFFER9: | |||
870 | { | |||
871 | /* Amount of text matched not including the EOB char. */ | |||
872 | int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptryytext)) - 1; | |||
873 | ||||
874 | /* Undo the effects of YY_DO_BEFORE_ACTION. */ | |||
875 | *yy_cp = (yy_hold_char); | |||
876 | YY_RESTORE_YY_MORE_OFFSET | |||
877 | ||||
878 | if ( YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buffer_status == YY_BUFFER_NEW0 ) | |||
879 | { | |||
880 | /* We're scanning a new file or input source. It's | |||
881 | * possible that this happened because the user | |||
882 | * just pointed yyin at a new source and called | |||
883 | * yylex(). If so, then we have to assure | |||
884 | * consistency between YY_CURRENT_BUFFER and our | |||
885 | * globals. Here is the right place to do so, because | |||
886 | * this is the first action (other than possibly a | |||
887 | * back-up) that will match for the new input source. | |||
888 | */ | |||
889 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars; | |||
890 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_input_file = yyin; | |||
891 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buffer_status = YY_BUFFER_NORMAL1; | |||
892 | } | |||
893 | ||||
894 | /* Note that here we test for yy_c_buf_p "<=" to the position | |||
895 | * of the first EOB in the buffer, since yy_c_buf_p will | |||
896 | * already have been incremented past the NUL character | |||
897 | * (since all states make transitions on EOB to the | |||
898 | * end-of-buffer state). Contrast this with the test | |||
899 | * in input(). | |||
900 | */ | |||
901 | if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars)] ) | |||
902 | { /* This was really a NUL. */ | |||
903 | yy_state_type yy_next_state; | |||
904 | ||||
905 | (yy_c_buf_p) = (yytext_ptryytext) + yy_amount_of_matched_text; | |||
906 | ||||
907 | yy_current_state = yy_get_previous_state( ); | |||
908 | ||||
909 | /* Okay, we're now positioned to make the NUL | |||
910 | * transition. We couldn't have | |||
911 | * yy_get_previous_state() go ahead and do it | |||
912 | * for us because it doesn't know how to deal | |||
913 | * with the possibility of jamming (and we don't | |||
914 | * want to build jamming into it because then it | |||
915 | * will run more slowly). | |||
916 | */ | |||
917 | ||||
918 | yy_next_state = yy_try_NUL_trans( yy_current_state ); | |||
919 | ||||
920 | yy_bp = (yytext_ptryytext) + YY_MORE_ADJ0; | |||
921 | ||||
922 | if ( yy_next_state ) | |||
923 | { | |||
924 | /* Consume the NUL. */ | |||
925 | yy_cp = ++(yy_c_buf_p); | |||
926 | yy_current_state = yy_next_state; | |||
927 | goto yy_match; | |||
928 | } | |||
929 | ||||
930 | else | |||
931 | { | |||
932 | yy_cp = (yy_c_buf_p); | |||
933 | goto yy_find_action; | |||
934 | } | |||
935 | } | |||
936 | ||||
937 | else switch ( yy_get_next_buffer( ) ) | |||
938 | { | |||
939 | case EOB_ACT_END_OF_FILE1: | |||
940 | { | |||
941 | (yy_did_buffer_switch_on_eof) = 0; | |||
942 | ||||
943 | if ( yywrap( )1 ) | |||
944 | { | |||
945 | /* Note: because we've taken care in | |||
946 | * yy_get_next_buffer() to have set up | |||
947 | * yytext, we can now set up | |||
948 | * yy_c_buf_p so that if some total | |||
949 | * hoser (like flex itself) wants to | |||
950 | * call the scanner after we return the | |||
951 | * YY_NULL, it'll still work - another | |||
952 | * YY_NULL will get returned. | |||
953 | */ | |||
954 | (yy_c_buf_p) = (yytext_ptryytext) + YY_MORE_ADJ0; | |||
955 | ||||
956 | yy_act = YY_STATE_EOF(YY_START)(9 + (((yy_start) - 1) / 2) + 1); | |||
957 | goto do_action; | |||
958 | } | |||
959 | ||||
960 | else | |||
961 | { | |||
962 | if ( ! (yy_did_buffer_switch_on_eof) ) | |||
963 | YY_NEW_FILEyyrestart(yyin ); | |||
964 | } | |||
965 | break; | |||
966 | } | |||
967 | ||||
968 | case EOB_ACT_CONTINUE_SCAN0: | |||
969 | (yy_c_buf_p) = | |||
970 | (yytext_ptryytext) + yy_amount_of_matched_text; | |||
971 | ||||
972 | yy_current_state = yy_get_previous_state( ); | |||
973 | ||||
974 | yy_cp = (yy_c_buf_p); | |||
975 | yy_bp = (yytext_ptryytext) + YY_MORE_ADJ0; | |||
976 | goto yy_match; | |||
977 | ||||
978 | case EOB_ACT_LAST_MATCH2: | |||
979 | (yy_c_buf_p) = | |||
980 | &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars)]; | |||
981 | ||||
982 | yy_current_state = yy_get_previous_state( ); | |||
983 | ||||
984 | yy_cp = (yy_c_buf_p); | |||
985 | yy_bp = (yytext_ptryytext) + YY_MORE_ADJ0; | |||
986 | goto yy_find_action; | |||
987 | } | |||
988 | break; | |||
989 | } | |||
990 | ||||
991 | default: | |||
992 | YY_FATAL_ERROR(yy_fatal_error( "fatal flex scanner internal error--no action found" ) | |||
993 | "fatal flex scanner internal error--no action found" )yy_fatal_error( "fatal flex scanner internal error--no action found" ); | |||
994 | } /* end of action switch */ | |||
995 | } /* end of scanning one token */ | |||
996 | } /* end of user's declarations */ | |||
997 | } /* end of yylex */ | |||
998 | ||||
999 | /* yy_get_next_buffer - try to read in a new buffer | |||
1000 | * | |||
1001 | * Returns a code representing an action: | |||
1002 | * EOB_ACT_LAST_MATCH - | |||
1003 | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position | |||
1004 | * EOB_ACT_END_OF_FILE - end of file | |||
1005 | */ | |||
1006 | static int yy_get_next_buffer (void) | |||
1007 | { | |||
1008 | char *dest = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf; | |||
1009 | char *source = (yytext_ptryytext); | |||
1010 | int number_to_move, i; | |||
1011 | int ret_val; | |||
1012 | ||||
1013 | if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars) + 1] ) | |||
1014 | YY_FATAL_ERROR(yy_fatal_error( "fatal flex scanner internal error--end of buffer missed" ) | |||
1015 | "fatal flex scanner internal error--end of buffer missed" )yy_fatal_error( "fatal flex scanner internal error--end of buffer missed" ); | |||
1016 | ||||
1017 | if ( YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_fill_buffer == 0 ) | |||
1018 | { /* Don't try to fill the buffer, so this is an EOF. */ | |||
1019 | if ( (yy_c_buf_p) - (yytext_ptryytext) - YY_MORE_ADJ0 == 1 ) | |||
1020 | { | |||
1021 | /* We matched a single character, the EOB, so | |||
1022 | * treat this as a final EOF. | |||
1023 | */ | |||
1024 | return EOB_ACT_END_OF_FILE1; | |||
1025 | } | |||
1026 | ||||
1027 | else | |||
1028 | { | |||
1029 | /* We matched some text prior to the EOB, first | |||
1030 | * process it. | |||
1031 | */ | |||
1032 | return EOB_ACT_LAST_MATCH2; | |||
1033 | } | |||
1034 | } | |||
1035 | ||||
1036 | /* Try to read more data. */ | |||
1037 | ||||
1038 | /* First move last chars to start of buffer. */ | |||
1039 | number_to_move = (int) ((yy_c_buf_p) - (yytext_ptryytext)) - 1; | |||
1040 | ||||
1041 | for ( i = 0; i < number_to_move; ++i ) | |||
1042 | *(dest++) = *(source++); | |||
1043 | ||||
1044 | if ( YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buffer_status == YY_BUFFER_EOF_PENDING2 ) | |||
1045 | /* don't do the read, it's not guaranteed to return an EOF, | |||
1046 | * just force an EOF | |||
1047 | */ | |||
1048 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars = (yy_n_chars) = 0; | |||
1049 | ||||
1050 | else | |||
1051 | { | |||
1052 | yy_size_t num_to_read = | |||
1053 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_size - number_to_move - 1; | |||
1054 | ||||
1055 | while ( num_to_read <= 0 ) | |||
1056 | { /* Not enough room in the buffer - grow it. */ | |||
1057 | ||||
1058 | /* just a shorter name for the current buffer */ | |||
1059 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]; | |||
1060 | ||||
1061 | int yy_c_buf_p_offset = | |||
1062 | (int) ((yy_c_buf_p) - b->yy_ch_buf); | |||
1063 | ||||
1064 | if ( b->yy_is_our_buffer ) | |||
1065 | { | |||
1066 | yy_size_t new_size = b->yy_buf_size * 2; | |||
1067 | ||||
1068 | if ( new_size <= 0 ) | |||
1069 | b->yy_buf_size += b->yy_buf_size / 8; | |||
1070 | else | |||
1071 | b->yy_buf_size *= 2; | |||
1072 | ||||
1073 | b->yy_ch_buf = (char *) | |||
1074 | /* Include room in for 2 EOB chars. */ | |||
1075 | yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); | |||
1076 | } | |||
1077 | else | |||
1078 | /* Can't grow it, we don't own it. */ | |||
1079 | b->yy_ch_buf = 0; | |||
1080 | ||||
1081 | if ( ! b->yy_ch_buf ) | |||
1082 | YY_FATAL_ERROR(yy_fatal_error( "fatal error - scanner input buffer overflow" ) | |||
1083 | "fatal error - scanner input buffer overflow" )yy_fatal_error( "fatal error - scanner input buffer overflow" ); | |||
1084 | ||||
1085 | (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; | |||
1086 | ||||
1087 | num_to_read = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_size - | |||
1088 | number_to_move - 1; | |||
1089 | ||||
1090 | } | |||
1091 | ||||
1092 | if ( num_to_read > YY_READ_BUF_SIZE8192 ) | |||
1093 | num_to_read = YY_READ_BUF_SIZE8192; | |||
1094 | ||||
1095 | /* Read in more data. */ | |||
1096 | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),if ( (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_is_interactive ) { int c = '*'; size_t n; for ( n = 0; n < num_to_read && (c = (!__isthreaded ? (--(yyin)->_r < 0 ? __srget(yyin ) : (int)(*(yyin)->_p++)) : (getc)(yyin))) != (-1) && c != '\n'; ++n ) (&(yy_buffer_stack)[(yy_buffer_stack_top )]->yy_ch_buf[number_to_move])[n] = (char) c; if ( c == '\n' ) (&(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf [number_to_move])[n++] = (char) c; if ( c == (-1) && ( !__isthreaded ? (((yyin)->_flags & 0x0040) != 0) : (ferror )(yyin)) ) yy_fatal_error( "input in flex scanner failed" ); ( yy_n_chars) = n; } else { (*__errno())=0; while ( ((yy_n_chars ) = fread((&(yy_buffer_stack)[(yy_buffer_stack_top)]-> yy_ch_buf[number_to_move]), 1, num_to_read, yyin))==0 && (!__isthreaded ? (((yyin)->_flags & 0x0040) != 0) : ( ferror)(yyin))) { if( (*__errno()) != 4) { yy_fatal_error( "input in flex scanner failed" ); break; } (*__errno())=0; (!__isthreaded ? ((void)((yyin)-> _flags &= ~(0x0040|0x0020))) : (clearerr)(yyin)); } } | |||
1097 | (yy_n_chars), num_to_read )if ( (yy_buffer_stack)[(yy_buffer_stack_top)]->yy_is_interactive ) { int c = '*'; size_t n; for ( n = 0; n < num_to_read && (c = (!__isthreaded ? (--(yyin)->_r < 0 ? __srget(yyin ) : (int)(*(yyin)->_p++)) : (getc)(yyin))) != (-1) && c != '\n'; ++n ) (&(yy_buffer_stack)[(yy_buffer_stack_top )]->yy_ch_buf[number_to_move])[n] = (char) c; if ( c == '\n' ) (&(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf [number_to_move])[n++] = (char) c; if ( c == (-1) && ( !__isthreaded ? (((yyin)->_flags & 0x0040) != 0) : (ferror )(yyin)) ) yy_fatal_error( "input in flex scanner failed" ); ( yy_n_chars) = n; } else { (*__errno())=0; while ( ((yy_n_chars ) = fread((&(yy_buffer_stack)[(yy_buffer_stack_top)]-> yy_ch_buf[number_to_move]), 1, num_to_read, yyin))==0 && (!__isthreaded ? (((yyin)->_flags & 0x0040) != 0) : ( ferror)(yyin))) { if( (*__errno()) != 4) { yy_fatal_error( "input in flex scanner failed" ); break; } (*__errno())=0; (!__isthreaded ? ((void)((yyin)-> _flags &= ~(0x0040|0x0020))) : (clearerr)(yyin)); } }; | |||
1098 | ||||
1099 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars = (yy_n_chars); | |||
1100 | } | |||
1101 | ||||
1102 | if ( (yy_n_chars) == 0 ) | |||
1103 | { | |||
1104 | if ( number_to_move == YY_MORE_ADJ0 ) | |||
1105 | { | |||
1106 | ret_val = EOB_ACT_END_OF_FILE1; | |||
1107 | yyrestart(yyin ); | |||
1108 | } | |||
1109 | ||||
1110 | else | |||
1111 | { | |||
1112 | ret_val = EOB_ACT_LAST_MATCH2; | |||
1113 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buffer_status = | |||
1114 | YY_BUFFER_EOF_PENDING2; | |||
1115 | } | |||
1116 | } | |||
1117 | ||||
1118 | else | |||
1119 | ret_val = EOB_ACT_CONTINUE_SCAN0; | |||
1120 | ||||
1121 | if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_size) { | |||
1122 | /* Extend the array by 50%, plus the number we really need. */ | |||
1123 | yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); | |||
1124 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf,new_size ); | |||
1125 | if ( ! YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf ) | |||
1126 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" )yy_fatal_error( "out of dynamic memory in yy_get_next_buffer()" ); | |||
1127 | /* "- 2" to take care of EOB's */ | |||
1128 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_size = (int) (new_size - 2); | |||
1129 | } | |||
1130 | ||||
1131 | (yy_n_chars) += number_to_move; | |||
1132 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR0; | |||
1133 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR0; | |||
1134 | ||||
1135 | (yytext_ptryytext) = &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[0]; | |||
1136 | ||||
1137 | return ret_val; | |||
1138 | } | |||
1139 | ||||
1140 | /* yy_get_previous_state - get the state just before the EOB char was reached */ | |||
1141 | ||||
1142 | static yy_state_type yy_get_previous_state (void) | |||
1143 | { | |||
1144 | yy_state_type yy_current_state; | |||
1145 | char *yy_cp; | |||
1146 | ||||
1147 | yy_current_state = (yy_start); | |||
1148 | ||||
1149 | for ( yy_cp = (yytext_ptryytext) + YY_MORE_ADJ0; yy_cp < (yy_c_buf_p); ++yy_cp ) | |||
1150 | { | |||
1151 | YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)((unsigned int) (unsigned char) *yy_cp)] : 1); | |||
1152 | if ( yy_accept[yy_current_state] ) | |||
1153 | { | |||
1154 | (yy_last_accepting_state) = yy_current_state; | |||
1155 | (yy_last_accepting_cpos) = yy_cp; | |||
1156 | } | |||
1157 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | |||
1158 | { | |||
1159 | yy_current_state = (int) yy_def[yy_current_state]; | |||
1160 | if ( yy_current_state >= 24 ) | |||
1161 | yy_c = yy_meta[(unsigned int) yy_c]; | |||
1162 | } | |||
1163 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | |||
1164 | } | |||
1165 | ||||
1166 | return yy_current_state; | |||
1167 | } | |||
1168 | ||||
1169 | /* yy_try_NUL_trans - try to make a transition on the NUL character | |||
1170 | * | |||
1171 | * synopsis | |||
1172 | * next_state = yy_try_NUL_trans( current_state ); | |||
1173 | */ | |||
1174 | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) | |||
1175 | { | |||
1176 | int yy_is_jam; | |||
1177 | char *yy_cp = (yy_c_buf_p); | |||
1178 | ||||
1179 | YY_CHAR yy_c = 1; | |||
1180 | if ( yy_accept[yy_current_state] ) | |||
1181 | { | |||
1182 | (yy_last_accepting_state) = yy_current_state; | |||
1183 | (yy_last_accepting_cpos) = yy_cp; | |||
1184 | } | |||
1185 | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) | |||
1186 | { | |||
1187 | yy_current_state = (int) yy_def[yy_current_state]; | |||
1188 | if ( yy_current_state >= 24 ) | |||
1189 | yy_c = yy_meta[(unsigned int) yy_c]; | |||
1190 | } | |||
1191 | yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; | |||
1192 | yy_is_jam = (yy_current_state == 23); | |||
1193 | ||||
1194 | return yy_is_jam ? 0 : yy_current_state; | |||
1195 | } | |||
1196 | ||||
1197 | static void yyunput (int c, char * yy_bp ) | |||
1198 | { | |||
1199 | char *yy_cp; | |||
1200 | ||||
1201 | yy_cp = (yy_c_buf_p); | |||
1202 | ||||
1203 | /* undo effects of setting up yytext */ | |||
1204 | *yy_cp = (yy_hold_char); | |||
1205 | ||||
1206 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf + 2 ) | |||
1207 | { /* need to shift things up to make room */ | |||
1208 | /* +2 for EOB chars. */ | |||
1209 | yy_size_t number_to_move = (yy_n_chars) + 2; | |||
1210 | char *dest = &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[ | |||
1211 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_size + 2]; | |||
1212 | char *source = | |||
1213 | &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[number_to_move]; | |||
1214 | ||||
1215 | while ( source > YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf ) | |||
1216 | *--dest = *--source; | |||
1217 | ||||
1218 | yy_cp += (int) (dest - source); | |||
1219 | yy_bp += (int) (dest - source); | |||
1220 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars = | |||
1221 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_size; | |||
1222 | ||||
1223 | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf + 2 ) | |||
1224 | YY_FATAL_ERROR( "flex scanner push-back overflow" )yy_fatal_error( "flex scanner push-back overflow" ); | |||
1225 | } | |||
1226 | ||||
1227 | *--yy_cp = (char) c; | |||
1228 | ||||
1229 | (yytext_ptryytext) = yy_bp; | |||
1230 | (yy_hold_char) = *yy_cp; | |||
1231 | (yy_c_buf_p) = yy_cp; | |||
1232 | } | |||
1233 | ||||
1234 | #ifndef YY_NO_INPUT1 | |||
1235 | #ifdef __cplusplus | |||
1236 | static int yyinput (void) | |||
1237 | #else | |||
1238 | static int input (void) | |||
1239 | #endif | |||
1240 | ||||
1241 | { | |||
1242 | int c; | |||
1243 | ||||
1244 | *(yy_c_buf_p) = (yy_hold_char); | |||
1245 | ||||
1246 | if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR0 ) | |||
1247 | { | |||
1248 | /* yy_c_buf_p now points to the character we want to return. | |||
1249 | * If this occurs *before* the EOB characters, then it's a | |||
1250 | * valid NUL; if not, then we've hit the end of the buffer. | |||
1251 | */ | |||
1252 | if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_ch_buf[(yy_n_chars)] ) | |||
1253 | /* This was really a NUL. */ | |||
1254 | *(yy_c_buf_p) = '\0'; | |||
1255 | ||||
1256 | else | |||
1257 | { /* need more input */ | |||
1258 | yy_size_t offset = (yy_c_buf_p) - (yytext_ptryytext); | |||
1259 | ++(yy_c_buf_p); | |||
1260 | ||||
1261 | switch ( yy_get_next_buffer( ) ) | |||
1262 | { | |||
1263 | case EOB_ACT_LAST_MATCH2: | |||
1264 | /* This happens because yy_g_n_b() | |||
1265 | * sees that we've accumulated a | |||
1266 | * token and flags that we need to | |||
1267 | * try matching the token before | |||
1268 | * proceeding. But for input(), | |||
1269 | * there's no matching to consider. | |||
1270 | * So convert the EOB_ACT_LAST_MATCH | |||
1271 | * to EOB_ACT_END_OF_FILE. | |||
1272 | */ | |||
1273 | ||||
1274 | /* Reset buffer status. */ | |||
1275 | yyrestart(yyin ); | |||
1276 | ||||
1277 | /*FALLTHROUGH*/ | |||
1278 | ||||
1279 | case EOB_ACT_END_OF_FILE1: | |||
1280 | { | |||
1281 | if ( yywrap( )1 ) | |||
1282 | return EOF(-1); | |||
1283 | ||||
1284 | if ( ! (yy_did_buffer_switch_on_eof) ) | |||
1285 | YY_NEW_FILEyyrestart(yyin ); | |||
1286 | #ifdef __cplusplus | |||
1287 | return yyinput(); | |||
1288 | #else | |||
1289 | return input(); | |||
1290 | #endif | |||
1291 | } | |||
1292 | ||||
1293 | case EOB_ACT_CONTINUE_SCAN0: | |||
1294 | (yy_c_buf_p) = (yytext_ptryytext) + offset; | |||
1295 | break; | |||
1296 | } | |||
1297 | } | |||
1298 | } | |||
1299 | ||||
1300 | c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ | |||
1301 | *(yy_c_buf_p) = '\0'; /* preserve yytext */ | |||
1302 | (yy_hold_char) = *++(yy_c_buf_p); | |||
1303 | ||||
1304 | return c; | |||
1305 | } | |||
1306 | #endif /* ifndef YY_NO_INPUT */ | |||
1307 | ||||
1308 | /** Immediately switch to a different input stream. | |||
1309 | * @param input_file A readable stream. | |||
1310 | * | |||
1311 | * @note This function does not reset the start condition to @c INITIAL . | |||
1312 | */ | |||
1313 | void yyrestart (FILE * input_file ) | |||
1314 | { | |||
1315 | ||||
1316 | if ( ! YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)) ){ | |||
1317 | yyensure_buffer_stack (); | |||
1318 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = | |||
1319 | yy_create_buffer(yyin,YY_BUF_SIZE16384 ); | |||
1320 | } | |||
1321 | ||||
1322 | yy_init_buffer(YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)),input_file ); | |||
1323 | yy_load_buffer_state( ); | |||
1324 | } | |||
1325 | ||||
1326 | /** Switch to a different input buffer. | |||
1327 | * @param new_buffer The new input buffer. | |||
1328 | * | |||
1329 | */ | |||
1330 | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) | |||
1331 | { | |||
1332 | ||||
1333 | /* TODO. We should be able to replace this entire function body | |||
1334 | * with | |||
1335 | * yypop_buffer_state(); | |||
1336 | * yypush_buffer_state(new_buffer); | |||
1337 | */ | |||
1338 | yyensure_buffer_stack (); | |||
1339 | if ( YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)) == new_buffer ) | |||
1340 | return; | |||
1341 | ||||
1342 | if ( YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)) ) | |||
1343 | { | |||
1344 | /* Flush out information for old buffer. */ | |||
1345 | *(yy_c_buf_p) = (yy_hold_char); | |||
1346 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_pos = (yy_c_buf_p); | |||
1347 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars = (yy_n_chars); | |||
1348 | } | |||
1349 | ||||
1350 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = new_buffer; | |||
1351 | yy_load_buffer_state( ); | |||
1352 | ||||
1353 | /* We don't actually know whether we did this switch during | |||
1354 | * EOF (yywrap()) processing, but the only time this flag | |||
1355 | * is looked at is after yywrap() is called, so it's safe | |||
1356 | * to go ahead and always set it. | |||
1357 | */ | |||
1358 | (yy_did_buffer_switch_on_eof) = 1; | |||
1359 | } | |||
1360 | ||||
1361 | static void yy_load_buffer_state (void) | |||
1362 | { | |||
1363 | (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars; | |||
1364 | (yytext_ptryytext) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_pos; | |||
1365 | yyin = YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_input_file; | |||
1366 | (yy_hold_char) = *(yy_c_buf_p); | |||
1367 | } | |||
1368 | ||||
1369 | /** Allocate and initialize an input buffer state. | |||
1370 | * @param file A readable stream. | |||
1371 | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. | |||
1372 | * | |||
1373 | * @return the allocated buffer state. | |||
1374 | */ | |||
1375 | YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) | |||
1376 | { | |||
1377 | YY_BUFFER_STATE b; | |||
1378 | ||||
1379 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); | |||
1380 | if ( ! b ) | |||
1381 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" )yy_fatal_error( "out of dynamic memory in yy_create_buffer()" ); | |||
1382 | ||||
1383 | b->yy_buf_size = size; | |||
1384 | ||||
1385 | /* yy_ch_buf has to be 2 characters longer than the size given because | |||
1386 | * we need to put in 2 end-of-buffer characters. | |||
1387 | */ | |||
1388 | b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); | |||
1389 | if ( ! b->yy_ch_buf ) | |||
1390 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" )yy_fatal_error( "out of dynamic memory in yy_create_buffer()" ); | |||
1391 | ||||
1392 | b->yy_is_our_buffer = 1; | |||
1393 | ||||
1394 | yy_init_buffer(b,file ); | |||
1395 | ||||
1396 | return b; | |||
1397 | } | |||
1398 | ||||
1399 | /** Destroy the buffer. | |||
1400 | * @param b a buffer created with yy_create_buffer() | |||
1401 | * | |||
1402 | */ | |||
1403 | void yy_delete_buffer (YY_BUFFER_STATE b ) | |||
1404 | { | |||
1405 | ||||
1406 | if ( ! b ) | |||
1407 | return; | |||
1408 | ||||
1409 | if ( b == YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)) ) /* Not sure if we should pop here. */ | |||
1410 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = (YY_BUFFER_STATE) 0; | |||
1411 | ||||
1412 | if ( b->yy_is_our_buffer ) | |||
1413 | yyfree((void *) b->yy_ch_buf ); | |||
1414 | ||||
1415 | yyfree((void *) b ); | |||
1416 | } | |||
1417 | ||||
1418 | /* Initializes or reinitializes a buffer. | |||
1419 | * This function is sometimes called more than once on the same buffer, | |||
1420 | * such as during a yyrestart() or at EOF. | |||
1421 | */ | |||
1422 | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) | |||
1423 | ||||
1424 | { | |||
1425 | int oerrno = errno(*__errno()); | |||
1426 | ||||
1427 | yy_flush_buffer(b ); | |||
1428 | ||||
1429 | b->yy_input_file = file; | |||
1430 | b->yy_fill_buffer = 1; | |||
1431 | ||||
1432 | /* If b is the current buffer, then yy_init_buffer was _probably_ | |||
1433 | * called from yyrestart() or through yy_get_next_buffer. | |||
1434 | * In that case, we don't want to reset the lineno or column. | |||
1435 | */ | |||
1436 | if (b != YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0))){ | |||
1437 | b->yy_bs_lineno = 1; | |||
1438 | b->yy_bs_column = 0; | |||
1439 | } | |||
1440 | ||||
1441 | b->yy_is_interactive = file ? (isatty( fileno(file)(!__isthreaded ? ((file)->_file) : (fileno)(file)) ) > 0) : 0; | |||
1442 | ||||
1443 | errno(*__errno()) = oerrno; | |||
1444 | } | |||
1445 | ||||
1446 | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. | |||
1447 | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. | |||
1448 | * | |||
1449 | */ | |||
1450 | void yy_flush_buffer (YY_BUFFER_STATE b ) | |||
1451 | { | |||
1452 | if ( ! b ) | |||
1453 | return; | |||
1454 | ||||
1455 | b->yy_n_chars = 0; | |||
1456 | ||||
1457 | /* We always need two end-of-buffer characters. The first causes | |||
1458 | * a transition to the end-of-buffer state. The second causes | |||
1459 | * a jam in that state. | |||
1460 | */ | |||
1461 | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR0; | |||
1462 | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR0; | |||
1463 | ||||
1464 | b->yy_buf_pos = &b->yy_ch_buf[0]; | |||
1465 | ||||
1466 | b->yy_at_bol = 1; | |||
1467 | b->yy_buffer_status = YY_BUFFER_NEW0; | |||
1468 | ||||
1469 | if ( b == YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)) ) | |||
1470 | yy_load_buffer_state( ); | |||
1471 | } | |||
1472 | ||||
1473 | /** Pushes the new state onto the stack. The new state becomes | |||
1474 | * the current state. This function will allocate the stack | |||
1475 | * if necessary. | |||
1476 | * @param new_buffer The new state. | |||
1477 | * | |||
1478 | */ | |||
1479 | void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) | |||
1480 | { | |||
1481 | if (new_buffer == NULL((void *)0)) | |||
1482 | return; | |||
1483 | ||||
1484 | yyensure_buffer_stack(); | |||
1485 | ||||
1486 | /* This block is copied from yy_switch_to_buffer. */ | |||
1487 | if ( YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)) ) | |||
1488 | { | |||
1489 | /* Flush out information for old buffer. */ | |||
1490 | *(yy_c_buf_p) = (yy_hold_char); | |||
1491 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_buf_pos = (yy_c_buf_p); | |||
1492 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)]->yy_n_chars = (yy_n_chars); | |||
1493 | } | |||
1494 | ||||
1495 | /* Only push if top exists. Otherwise, replace top. */ | |||
1496 | if (YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0))) | |||
1497 | (yy_buffer_stack_top)++; | |||
1498 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = new_buffer; | |||
1499 | ||||
1500 | /* copied from yy_switch_to_buffer. */ | |||
1501 | yy_load_buffer_state( ); | |||
1502 | (yy_did_buffer_switch_on_eof) = 1; | |||
1503 | } | |||
1504 | ||||
1505 | /** Removes and deletes the top of the stack, if present. | |||
1506 | * The next element becomes the new top. | |||
1507 | * | |||
1508 | */ | |||
1509 | void yypop_buffer_state (void) | |||
1510 | { | |||
1511 | if (!YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0))) | |||
1512 | return; | |||
1513 | ||||
1514 | yy_delete_buffer(YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)) ); | |||
1515 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = NULL((void *)0); | |||
1516 | if ((yy_buffer_stack_top) > 0) | |||
1517 | --(yy_buffer_stack_top); | |||
1518 | ||||
1519 | if (YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0))) { | |||
1520 | yy_load_buffer_state( ); | |||
1521 | (yy_did_buffer_switch_on_eof) = 1; | |||
1522 | } | |||
1523 | } | |||
1524 | ||||
1525 | /* Allocates the stack if it does not exist. | |||
1526 | * Guarantees space for at least one push. | |||
1527 | */ | |||
1528 | static void yyensure_buffer_stack (void) | |||
1529 | { | |||
1530 | yy_size_t num_to_alloc; | |||
1531 | ||||
1532 | if (!(yy_buffer_stack)) { | |||
1533 | ||||
1534 | /* First allocation is just for 2 elements, since we don't know if this | |||
1535 | * scanner will even need a stack. We use 2 instead of 1 to avoid an | |||
1536 | * immediate realloc on the next call. | |||
1537 | */ | |||
1538 | num_to_alloc = 1; | |||
1539 | (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc | |||
1540 | (num_to_alloc * sizeof(struct yy_buffer_state*) | |||
1541 | ); | |||
1542 | if ( ! (yy_buffer_stack) ) | |||
1543 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" )yy_fatal_error( "out of dynamic memory in yyensure_buffer_stack()" ); | |||
1544 | ||||
1545 | memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); | |||
1546 | ||||
1547 | (yy_buffer_stack_max) = num_to_alloc; | |||
1548 | (yy_buffer_stack_top) = 0; | |||
1549 | return; | |||
1550 | } | |||
1551 | ||||
1552 | if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ | |||
1553 | ||||
1554 | /* Increase the buffer to prepare for a possible push. */ | |||
1555 | int grow_size = 8 /* arbitrary grow size */; | |||
1556 | ||||
1557 | num_to_alloc = (yy_buffer_stack_max) + grow_size; | |||
1558 | (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc | |||
1559 | ((yy_buffer_stack), | |||
1560 | num_to_alloc * sizeof(struct yy_buffer_state*) | |||
1561 | ); | |||
1562 | if ( ! (yy_buffer_stack) ) | |||
1563 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" )yy_fatal_error( "out of dynamic memory in yyensure_buffer_stack()" ); | |||
1564 | ||||
1565 | /* zero only the new slots.*/ | |||
1566 | memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); | |||
1567 | (yy_buffer_stack_max) = num_to_alloc; | |||
1568 | } | |||
1569 | } | |||
1570 | ||||
1571 | /** Setup the input buffer state to scan directly from a user-specified character buffer. | |||
1572 | * @param base the character buffer | |||
1573 | * @param size the size in bytes of the character buffer | |||
1574 | * | |||
1575 | * @return the newly allocated buffer state object. | |||
1576 | */ | |||
1577 | YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) | |||
1578 | { | |||
1579 | YY_BUFFER_STATE b; | |||
1580 | ||||
1581 | if ( size < 2 || | |||
1582 | base[size-2] != YY_END_OF_BUFFER_CHAR0 || | |||
1583 | base[size-1] != YY_END_OF_BUFFER_CHAR0 ) | |||
1584 | /* They forgot to leave room for the EOB's. */ | |||
1585 | return 0; | |||
1586 | ||||
1587 | b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); | |||
1588 | if ( ! b ) | |||
1589 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" )yy_fatal_error( "out of dynamic memory in yy_scan_buffer()" ); | |||
1590 | ||||
1591 | b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ | |||
1592 | b->yy_buf_pos = b->yy_ch_buf = base; | |||
1593 | b->yy_is_our_buffer = 0; | |||
1594 | b->yy_input_file = 0; | |||
1595 | b->yy_n_chars = b->yy_buf_size; | |||
1596 | b->yy_is_interactive = 0; | |||
1597 | b->yy_at_bol = 1; | |||
1598 | b->yy_fill_buffer = 0; | |||
1599 | b->yy_buffer_status = YY_BUFFER_NEW0; | |||
1600 | ||||
1601 | yy_switch_to_buffer(b ); | |||
1602 | ||||
1603 | return b; | |||
1604 | } | |||
1605 | ||||
1606 | /** Setup the input buffer state to scan a string. The next call to yylex() will | |||
1607 | * scan from a @e copy of @a str. | |||
1608 | * @param yystr a NUL-terminated string to scan | |||
1609 | * | |||
1610 | * @return the newly allocated buffer state object. | |||
1611 | * @note If you want to scan bytes that may contain NUL values, then use | |||
1612 | * yy_scan_bytes() instead. | |||
1613 | */ | |||
1614 | YY_BUFFER_STATE yy_scan_string (yyconstconst char * yystr ) | |||
1615 | { | |||
1616 | ||||
1617 | return yy_scan_bytes(yystr,strlen(yystr) ); | |||
1618 | } | |||
1619 | ||||
1620 | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will | |||
1621 | * scan from a @e copy of @a bytes. | |||
1622 | * @param yybytes the byte buffer to scan | |||
1623 | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. | |||
1624 | * | |||
1625 | * @return the newly allocated buffer state object. | |||
1626 | */ | |||
1627 | YY_BUFFER_STATE yy_scan_bytes (yyconstconst char * yybytes, yy_size_t _yybytes_len ) | |||
1628 | { | |||
1629 | YY_BUFFER_STATE b; | |||
1630 | char *buf; | |||
1631 | yy_size_t n; | |||
1632 | yy_size_t i; | |||
1633 | ||||
1634 | /* Get memory for full buffer, including space for trailing EOB's. */ | |||
1635 | n = _yybytes_len + 2; | |||
1636 | buf = (char *) yyalloc(n ); | |||
1637 | if ( ! buf ) | |||
1638 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" )yy_fatal_error( "out of dynamic memory in yy_scan_bytes()" ); | |||
1639 | ||||
1640 | for ( i = 0; i < _yybytes_len; ++i ) | |||
1641 | buf[i] = yybytes[i]; | |||
1642 | ||||
1643 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR0; | |||
1644 | ||||
1645 | b = yy_scan_buffer(buf,n ); | |||
1646 | if ( ! b ) | |||
1647 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" )yy_fatal_error( "bad buffer in yy_scan_bytes()" ); | |||
1648 | ||||
1649 | /* It's okay to grow etc. this buffer, and we should throw it | |||
1650 | * away when we're done. | |||
1651 | */ | |||
1652 | b->yy_is_our_buffer = 1; | |||
1653 | ||||
1654 | return b; | |||
1655 | } | |||
1656 | ||||
1657 | #ifndef YY_EXIT_FAILURE2 | |||
1658 | #define YY_EXIT_FAILURE2 2 | |||
1659 | #endif | |||
1660 | ||||
1661 | static void yy_fatal_error (yyconstconst char* msg ) | |||
1662 | { | |||
1663 | (void) fprintf( stderr(&__sF[2]), "%s\n", msg ); | |||
1664 | exit( YY_EXIT_FAILURE2 ); | |||
1665 | } | |||
1666 | ||||
1667 | /* Redefine yyless() so it works in section 3 code. */ | |||
1668 | ||||
1669 | #undef yyless | |||
1670 | #define yyless(n)do { int yyless_macro_arg = (n); ; yytext[yyleng] = (yy_hold_char ); (yy_c_buf_p) = yytext + yyless_macro_arg; (yy_hold_char) = *(yy_c_buf_p); *(yy_c_buf_p) = '\0'; yyleng = yyless_macro_arg ; } while ( 0 ) \ | |||
1671 | do \ | |||
1672 | { \ | |||
1673 | /* Undo effects of setting up yytext. */ \ | |||
1674 | int yyless_macro_arg = (n); \ | |||
1675 | YY_LESS_LINENO(yyless_macro_arg);\ | |||
1676 | yytext[yyleng] = (yy_hold_char); \ | |||
1677 | (yy_c_buf_p) = yytext + yyless_macro_arg; \ | |||
1678 | (yy_hold_char) = *(yy_c_buf_p); \ | |||
1679 | *(yy_c_buf_p) = '\0'; \ | |||
1680 | yyleng = yyless_macro_arg; \ | |||
1681 | } \ | |||
1682 | while ( 0 ) | |||
1683 | ||||
1684 | /* Accessor methods (get/set functions) to struct members. */ | |||
1685 | ||||
1686 | /** Get the current line number. | |||
1687 | * | |||
1688 | */ | |||
1689 | int yyget_lineno (void) | |||
1690 | { | |||
1691 | ||||
1692 | return yylineno; | |||
1693 | } | |||
1694 | ||||
1695 | /** Get the input stream. | |||
1696 | * | |||
1697 | */ | |||
1698 | FILE *yyget_in (void) | |||
1699 | { | |||
1700 | return yyin; | |||
1701 | } | |||
1702 | ||||
1703 | /** Get the output stream. | |||
1704 | * | |||
1705 | */ | |||
1706 | FILE *yyget_out (void) | |||
1707 | { | |||
1708 | return yyout; | |||
1709 | } | |||
1710 | ||||
1711 | /** Get the length of the current token. | |||
1712 | * | |||
1713 | */ | |||
1714 | yy_size_t yyget_leng (void) | |||
1715 | { | |||
1716 | return yyleng; | |||
1717 | } | |||
1718 | ||||
1719 | /** Get the current token. | |||
1720 | * | |||
1721 | */ | |||
1722 | ||||
1723 | char *yyget_text (void) | |||
1724 | { | |||
1725 | return yytext; | |||
1726 | } | |||
1727 | ||||
1728 | /** Set the current line number. | |||
1729 | * @param line_number | |||
1730 | * | |||
1731 | */ | |||
1732 | void yyset_lineno (int line_number ) | |||
1733 | { | |||
1734 | ||||
1735 | yylineno = line_number; | |||
1736 | } | |||
1737 | ||||
1738 | /** Set the input stream. This does not discard the current | |||
1739 | * input buffer. | |||
1740 | * @param in_str A readable stream. | |||
1741 | * | |||
1742 | * @see yy_switch_to_buffer | |||
1743 | */ | |||
1744 | void yyset_in (FILE * in_str ) | |||
1745 | { | |||
1746 | yyin = in_str ; | |||
1747 | } | |||
1748 | ||||
1749 | void yyset_out (FILE * out_str ) | |||
1750 | { | |||
1751 | yyout = out_str ; | |||
1752 | } | |||
1753 | ||||
1754 | int yyget_debug (void) | |||
1755 | { | |||
1756 | return yy_flex_debug; | |||
1757 | } | |||
1758 | ||||
1759 | void yyset_debug (int bdebug ) | |||
1760 | { | |||
1761 | yy_flex_debug = bdebug ; | |||
1762 | } | |||
1763 | ||||
1764 | static int yy_init_globals (void) | |||
1765 | { | |||
1766 | /* Initialization is the same as for the non-reentrant scanner. | |||
1767 | * This function is called from yylex_destroy(), so don't allocate here. | |||
1768 | */ | |||
1769 | ||||
1770 | (yy_buffer_stack) = 0; | |||
1771 | (yy_buffer_stack_top) = 0; | |||
1772 | (yy_buffer_stack_max) = 0; | |||
1773 | (yy_c_buf_p) = (char *) 0; | |||
1774 | (yy_init) = 0; | |||
1775 | (yy_start) = 0; | |||
1776 | ||||
1777 | /* Defined in main.c */ | |||
1778 | #ifdef YY_STDINIT | |||
1779 | yyin = stdin(&__sF[0]); | |||
1780 | yyout = stdout(&__sF[1]); | |||
1781 | #else | |||
1782 | yyin = (FILE *) 0; | |||
1783 | yyout = (FILE *) 0; | |||
1784 | #endif | |||
1785 | ||||
1786 | /* For future reference: Set errno on error, since we are called by | |||
1787 | * yylex_init() | |||
1788 | */ | |||
1789 | return 0; | |||
1790 | } | |||
1791 | ||||
1792 | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ | |||
1793 | int yylex_destroy (void) | |||
1794 | { | |||
1795 | ||||
1796 | /* Pop the buffer stack, destroying each element. */ | |||
1797 | while(YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0))){ | |||
1798 | yy_delete_buffer(YY_CURRENT_BUFFER( (yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top) ] : ((void *)0)) ); | |||
1799 | YY_CURRENT_BUFFER_LVALUE(yy_buffer_stack)[(yy_buffer_stack_top)] = NULL((void *)0); | |||
1800 | yypop_buffer_state(); | |||
1801 | } | |||
1802 | ||||
1803 | /* Destroy the stack itself. */ | |||
1804 | yyfree((yy_buffer_stack) ); | |||
1805 | (yy_buffer_stack) = NULL((void *)0); | |||
1806 | ||||
1807 | /* Reset the globals. This is important in a non-reentrant scanner so the next time | |||
1808 | * yylex() is called, initialization will occur. */ | |||
1809 | yy_init_globals( ); | |||
1810 | ||||
1811 | return 0; | |||
1812 | } | |||
1813 | ||||
1814 | /* | |||
1815 | * Internal utility routines. | |||
1816 | */ | |||
1817 | ||||
1818 | #ifndef yytext_ptryytext | |||
1819 | static void yy_flex_strncpy (char* s1, yyconstconst char * s2, int n ) | |||
1820 | { | |||
1821 | int i; | |||
1822 | for ( i = 0; i < n; ++i ) | |||
1823 | s1[i] = s2[i]; | |||
1824 | } | |||
1825 | #endif | |||
1826 | ||||
1827 | #ifdef YY_NEED_STRLEN | |||
1828 | static int yy_flex_strlen (yyconstconst char * s ) | |||
1829 | { | |||
1830 | int n; | |||
1831 | for ( n = 0; s[n]; ++n ) | |||
1832 | ; | |||
1833 | ||||
1834 | return n; | |||
1835 | } | |||
1836 | #endif | |||
1837 | ||||
1838 | void *yyalloc (yy_size_t size ) | |||
1839 | { | |||
1840 | return (void *) malloc( size ); | |||
1841 | } | |||
1842 | ||||
1843 | void *yyrealloc (void * ptr, yy_size_t size ) | |||
1844 | { | |||
1845 | /* The cast to (char *) in the following accommodates both | |||
1846 | * implementations that use char* generic pointers, and those | |||
1847 | * that use void* generic pointers. It works with the latter | |||
1848 | * because both ANSI C and C++ allow castless assignment from | |||
1849 | * any pointer type to void*, and deal with argument conversions | |||
1850 | * as though doing an assignment. | |||
1851 | */ | |||
1852 | return (void *) realloc( (char *) ptr, size ); | |||
1853 | } | |||
1854 | ||||
1855 | void yyfree (void * ptr ) | |||
1856 | { | |||
1857 | free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ | |||
1858 | } | |||
1859 | ||||
1860 | #define YYTABLES_NAME"yytables" "yytables" | |||
1861 | ||||
1862 | #line 103 "/usr/src/sbin/wsconsctl/map_scan.l" |