/src/CMake/Source/LexerParser/cmGccDepfileLexer.cxx
Line | Count | Source |
1 | | #include "cmStandardLexer.h" |
2 | | |
3 | | #define FLEXINT_H 1 |
4 | | #define YY_INT_ALIGNED short int |
5 | | |
6 | | /* A lexical scanner generated by flex */ |
7 | | |
8 | | #define FLEX_SCANNER |
9 | | #define YY_FLEX_MAJOR_VERSION 2 |
10 | | #define YY_FLEX_MINOR_VERSION 6 |
11 | | #define YY_FLEX_SUBMINOR_VERSION 4 |
12 | | #if YY_FLEX_SUBMINOR_VERSION > 0 |
13 | | #define FLEX_BETA |
14 | | #endif |
15 | | |
16 | | #ifdef yy_create_buffer |
17 | | #define cmGccDepfile_yy_create_buffer_ALREADY_DEFINED |
18 | | #else |
19 | 5.67k | #define yy_create_buffer cmGccDepfile_yy_create_buffer |
20 | | #endif |
21 | | |
22 | | #ifdef yy_delete_buffer |
23 | | #define cmGccDepfile_yy_delete_buffer_ALREADY_DEFINED |
24 | | #else |
25 | 5.67k | #define yy_delete_buffer cmGccDepfile_yy_delete_buffer |
26 | | #endif |
27 | | |
28 | | #ifdef yy_scan_buffer |
29 | | #define cmGccDepfile_yy_scan_buffer_ALREADY_DEFINED |
30 | | #else |
31 | 0 | #define yy_scan_buffer cmGccDepfile_yy_scan_buffer |
32 | | #endif |
33 | | |
34 | | #ifdef yy_scan_string |
35 | | #define cmGccDepfile_yy_scan_string_ALREADY_DEFINED |
36 | | #else |
37 | | #define yy_scan_string cmGccDepfile_yy_scan_string |
38 | | #endif |
39 | | |
40 | | #ifdef yy_scan_bytes |
41 | | #define cmGccDepfile_yy_scan_bytes_ALREADY_DEFINED |
42 | | #else |
43 | 0 | #define yy_scan_bytes cmGccDepfile_yy_scan_bytes |
44 | | #endif |
45 | | |
46 | | #ifdef yy_init_buffer |
47 | | #define cmGccDepfile_yy_init_buffer_ALREADY_DEFINED |
48 | | #else |
49 | 17.0k | #define yy_init_buffer cmGccDepfile_yy_init_buffer |
50 | | #endif |
51 | | |
52 | | #ifdef yy_flush_buffer |
53 | | #define cmGccDepfile_yy_flush_buffer_ALREADY_DEFINED |
54 | | #else |
55 | 17.0k | #define yy_flush_buffer cmGccDepfile_yy_flush_buffer |
56 | | #endif |
57 | | |
58 | | #ifdef yy_load_buffer_state |
59 | | #define cmGccDepfile_yy_load_buffer_state_ALREADY_DEFINED |
60 | | #else |
61 | 28.3k | #define yy_load_buffer_state cmGccDepfile_yy_load_buffer_state |
62 | | #endif |
63 | | |
64 | | #ifdef yy_switch_to_buffer |
65 | | #define cmGccDepfile_yy_switch_to_buffer_ALREADY_DEFINED |
66 | | #else |
67 | 0 | #define yy_switch_to_buffer cmGccDepfile_yy_switch_to_buffer |
68 | | #endif |
69 | | |
70 | | #ifdef yypush_buffer_state |
71 | | #define cmGccDepfile_yypush_buffer_state_ALREADY_DEFINED |
72 | | #else |
73 | | #define yypush_buffer_state cmGccDepfile_yypush_buffer_state |
74 | | #endif |
75 | | |
76 | | #ifdef yypop_buffer_state |
77 | | #define cmGccDepfile_yypop_buffer_state_ALREADY_DEFINED |
78 | | #else |
79 | 5.67k | #define yypop_buffer_state cmGccDepfile_yypop_buffer_state |
80 | | #endif |
81 | | |
82 | | #ifdef yyensure_buffer_stack |
83 | | #define cmGccDepfile_yyensure_buffer_stack_ALREADY_DEFINED |
84 | | #else |
85 | 5.67k | #define yyensure_buffer_stack cmGccDepfile_yyensure_buffer_stack |
86 | | #endif |
87 | | |
88 | | #ifdef yylex |
89 | | #define cmGccDepfile_yylex_ALREADY_DEFINED |
90 | | #else |
91 | | #define yylex cmGccDepfile_yylex |
92 | | #endif |
93 | | |
94 | | #ifdef yyrestart |
95 | | #define cmGccDepfile_yyrestart_ALREADY_DEFINED |
96 | | #else |
97 | 5.67k | #define yyrestart cmGccDepfile_yyrestart |
98 | | #endif |
99 | | |
100 | | #ifdef yylex_init |
101 | | #define cmGccDepfile_yylex_init_ALREADY_DEFINED |
102 | | #else |
103 | | #define yylex_init cmGccDepfile_yylex_init |
104 | | #endif |
105 | | |
106 | | #ifdef yylex_init_extra |
107 | | #define cmGccDepfile_yylex_init_extra_ALREADY_DEFINED |
108 | | #else |
109 | | #define yylex_init_extra cmGccDepfile_yylex_init_extra |
110 | | #endif |
111 | | |
112 | | #ifdef yylex_destroy |
113 | | #define cmGccDepfile_yylex_destroy_ALREADY_DEFINED |
114 | | #else |
115 | | #define yylex_destroy cmGccDepfile_yylex_destroy |
116 | | #endif |
117 | | |
118 | | #ifdef yyget_debug |
119 | | #define cmGccDepfile_yyget_debug_ALREADY_DEFINED |
120 | | #else |
121 | | #define yyget_debug cmGccDepfile_yyget_debug |
122 | | #endif |
123 | | |
124 | | #ifdef yyset_debug |
125 | | #define cmGccDepfile_yyset_debug_ALREADY_DEFINED |
126 | | #else |
127 | | #define yyset_debug cmGccDepfile_yyset_debug |
128 | | #endif |
129 | | |
130 | | #ifdef yyget_extra |
131 | | #define cmGccDepfile_yyget_extra_ALREADY_DEFINED |
132 | | #else |
133 | | #define yyget_extra cmGccDepfile_yyget_extra |
134 | | #endif |
135 | | |
136 | | #ifdef yyset_extra |
137 | | #define cmGccDepfile_yyset_extra_ALREADY_DEFINED |
138 | | #else |
139 | 0 | #define yyset_extra cmGccDepfile_yyset_extra |
140 | | #endif |
141 | | |
142 | | #ifdef yyget_in |
143 | | #define cmGccDepfile_yyget_in_ALREADY_DEFINED |
144 | | #else |
145 | | #define yyget_in cmGccDepfile_yyget_in |
146 | | #endif |
147 | | |
148 | | #ifdef yyset_in |
149 | | #define cmGccDepfile_yyset_in_ALREADY_DEFINED |
150 | | #else |
151 | | #define yyset_in cmGccDepfile_yyset_in |
152 | | #endif |
153 | | |
154 | | #ifdef yyget_out |
155 | | #define cmGccDepfile_yyget_out_ALREADY_DEFINED |
156 | | #else |
157 | | #define yyget_out cmGccDepfile_yyget_out |
158 | | #endif |
159 | | |
160 | | #ifdef yyset_out |
161 | | #define cmGccDepfile_yyset_out_ALREADY_DEFINED |
162 | | #else |
163 | | #define yyset_out cmGccDepfile_yyset_out |
164 | | #endif |
165 | | |
166 | | #ifdef yyget_leng |
167 | | #define cmGccDepfile_yyget_leng_ALREADY_DEFINED |
168 | | #else |
169 | | #define yyget_leng cmGccDepfile_yyget_leng |
170 | | #endif |
171 | | |
172 | | #ifdef yyget_text |
173 | | #define cmGccDepfile_yyget_text_ALREADY_DEFINED |
174 | | #else |
175 | | #define yyget_text cmGccDepfile_yyget_text |
176 | | #endif |
177 | | |
178 | | #ifdef yyget_lineno |
179 | | #define cmGccDepfile_yyget_lineno_ALREADY_DEFINED |
180 | | #else |
181 | | #define yyget_lineno cmGccDepfile_yyget_lineno |
182 | | #endif |
183 | | |
184 | | #ifdef yyset_lineno |
185 | | #define cmGccDepfile_yyset_lineno_ALREADY_DEFINED |
186 | | #else |
187 | | #define yyset_lineno cmGccDepfile_yyset_lineno |
188 | | #endif |
189 | | |
190 | | #ifdef yyget_column |
191 | | #define cmGccDepfile_yyget_column_ALREADY_DEFINED |
192 | | #else |
193 | | #define yyget_column cmGccDepfile_yyget_column |
194 | | #endif |
195 | | |
196 | | #ifdef yyset_column |
197 | | #define cmGccDepfile_yyset_column_ALREADY_DEFINED |
198 | | #else |
199 | | #define yyset_column cmGccDepfile_yyset_column |
200 | | #endif |
201 | | |
202 | | #ifdef yywrap |
203 | | #define cmGccDepfile_yywrap_ALREADY_DEFINED |
204 | | #else |
205 | 5.67k | #define yywrap cmGccDepfile_yywrap |
206 | | #endif |
207 | | |
208 | | #ifdef yyalloc |
209 | | #define cmGccDepfile_yyalloc_ALREADY_DEFINED |
210 | | #else |
211 | 22.6k | #define yyalloc cmGccDepfile_yyalloc |
212 | | #endif |
213 | | |
214 | | #ifdef yyrealloc |
215 | | #define cmGccDepfile_yyrealloc_ALREADY_DEFINED |
216 | | #else |
217 | 324 | #define yyrealloc cmGccDepfile_yyrealloc |
218 | | #endif |
219 | | |
220 | | #ifdef yyfree |
221 | | #define cmGccDepfile_yyfree_ALREADY_DEFINED |
222 | | #else |
223 | 28.3k | #define yyfree cmGccDepfile_yyfree |
224 | | #endif |
225 | | |
226 | | /* First, we deal with platform-specific or compiler-specific issues. */ |
227 | | |
228 | | /* begin standard C headers. */ |
229 | | #include <stdio.h> |
230 | | #include <string.h> |
231 | | #include <errno.h> |
232 | | #include <stdlib.h> |
233 | | |
234 | | /* end standard C headers. */ |
235 | | |
236 | | /* flex integer type definitions */ |
237 | | |
238 | | #ifndef FLEXINT_H |
239 | | #define FLEXINT_H |
240 | | |
241 | | /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ |
242 | | |
243 | | #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
244 | | |
245 | | /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, |
246 | | * if you want the limit (max/min) macros for int types. |
247 | | */ |
248 | | #ifndef __STDC_LIMIT_MACROS |
249 | | #define __STDC_LIMIT_MACROS 1 |
250 | | #endif |
251 | | |
252 | | #include <inttypes.h> |
253 | | typedef int8_t flex_int8_t; |
254 | | typedef uint8_t flex_uint8_t; |
255 | | typedef int16_t flex_int16_t; |
256 | | typedef uint16_t flex_uint16_t; |
257 | | typedef int32_t flex_int32_t; |
258 | | typedef uint32_t flex_uint32_t; |
259 | | #else |
260 | | typedef signed char flex_int8_t; |
261 | | typedef short int flex_int16_t; |
262 | | typedef int flex_int32_t; |
263 | | typedef unsigned char flex_uint8_t; |
264 | | typedef unsigned short int flex_uint16_t; |
265 | | typedef unsigned int flex_uint32_t; |
266 | | |
267 | | /* Limits of integral types. */ |
268 | | #ifndef INT8_MIN |
269 | | #define INT8_MIN (-128) |
270 | | #endif |
271 | | #ifndef INT16_MIN |
272 | | #define INT16_MIN (-32767-1) |
273 | | #endif |
274 | | #ifndef INT32_MIN |
275 | | #define INT32_MIN (-2147483647-1) |
276 | | #endif |
277 | | #ifndef INT8_MAX |
278 | | #define INT8_MAX (127) |
279 | | #endif |
280 | | #ifndef INT16_MAX |
281 | | #define INT16_MAX (32767) |
282 | | #endif |
283 | | #ifndef INT32_MAX |
284 | | #define INT32_MAX (2147483647) |
285 | | #endif |
286 | | #ifndef UINT8_MAX |
287 | | #define UINT8_MAX (255U) |
288 | | #endif |
289 | | #ifndef UINT16_MAX |
290 | | #define UINT16_MAX (65535U) |
291 | | #endif |
292 | | #ifndef UINT32_MAX |
293 | | #define UINT32_MAX (4294967295U) |
294 | | #endif |
295 | | |
296 | | #ifndef SIZE_MAX |
297 | | #define SIZE_MAX (~(size_t)0) |
298 | | #endif |
299 | | |
300 | | #endif /* ! C99 */ |
301 | | |
302 | | #endif /* ! FLEXINT_H */ |
303 | | |
304 | | /* begin standard C++ headers. */ |
305 | | |
306 | | /* TODO: this is always defined, so inline it */ |
307 | | #define yyconst const |
308 | | |
309 | | #if defined(__GNUC__) && __GNUC__ >= 3 |
310 | | #define yynoreturn __attribute__((__noreturn__)) |
311 | | #else |
312 | | #define yynoreturn |
313 | | #endif |
314 | | |
315 | | /* Returned upon end-of-file. */ |
316 | 5.67k | #define YY_NULL 0 |
317 | | |
318 | | /* Promotes a possibly negative, possibly signed char to an |
319 | | * integer in range [0..255] for use as an array index. |
320 | | */ |
321 | 613M | #define YY_SC_TO_UI(c) ((YY_CHAR) (c)) |
322 | | |
323 | | /* An opaque pointer. */ |
324 | | #ifndef YY_TYPEDEF_YY_SCANNER_T |
325 | | #define YY_TYPEDEF_YY_SCANNER_T |
326 | | typedef void* yyscan_t; |
327 | | #endif |
328 | | |
329 | | /* For convenience, these vars (plus the bison vars far below) |
330 | | are macros in the reentrant scanner. */ |
331 | 83.9k | #define yyin yyg->yyin_r |
332 | 22.6k | #define yyout yyg->yyout_r |
333 | 7.90M | #define yyextra yyg->yyextra_r |
334 | 9.42M | #define yyleng yyg->yyleng_r |
335 | 5.54M | #define yytext yyg->yytext_r |
336 | 0 | #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) |
337 | 0 | #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) |
338 | 0 | #define yy_flex_debug yyg->yy_flex_debug_r |
339 | | |
340 | | /* Enter a start condition. This macro really ought to take a parameter, |
341 | | * but we do it the disgusting crufty way forced on us by the ()-less |
342 | | * definition of BEGIN. |
343 | | */ |
344 | | #define BEGIN yyg->yy_start = 1 + 2 * |
345 | | /* Translate the current start state into a value that can be later handed |
346 | | * to BEGIN to return to the state. The YYSTATE alias is for lex |
347 | | * compatibility. |
348 | | */ |
349 | | #define YY_START ((yyg->yy_start - 1) / 2) |
350 | | #define YYSTATE YY_START |
351 | | /* Action number for EOF rule of a given start state. */ |
352 | 11.3k | #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
353 | | /* Special action meaning "start processing a new file". */ |
354 | 0 | #define YY_NEW_FILE yyrestart( yyin , yyscanner ) |
355 | 177k | #define YY_END_OF_BUFFER_CHAR 0 |
356 | | |
357 | | /* Size of default input buffer. */ |
358 | | #ifndef YY_BUF_SIZE |
359 | | #ifdef __ia64__ |
360 | | /* On IA-64, the buffer size is 16k, not 8k. |
361 | | * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. |
362 | | * Ditto for the __ia64__ case accordingly. |
363 | | */ |
364 | | #define YY_BUF_SIZE 32768 |
365 | | #else |
366 | 5.67k | #define YY_BUF_SIZE 16384 |
367 | | #endif /* __ia64__ */ |
368 | | #endif |
369 | | |
370 | | /* The state buf must be large enough to hold one state per character in the main buffer. |
371 | | */ |
372 | | #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
373 | | |
374 | | #ifndef YY_TYPEDEF_YY_BUFFER_STATE |
375 | | #define YY_TYPEDEF_YY_BUFFER_STATE |
376 | | typedef struct yy_buffer_state *YY_BUFFER_STATE; |
377 | | #endif |
378 | | |
379 | | #ifndef YY_TYPEDEF_YY_SIZE_T |
380 | | #define YY_TYPEDEF_YY_SIZE_T |
381 | | typedef size_t yy_size_t; |
382 | | #endif |
383 | | |
384 | 20.4k | #define EOB_ACT_CONTINUE_SCAN 0 |
385 | 11.3k | #define EOB_ACT_END_OF_FILE 1 |
386 | 111k | #define EOB_ACT_LAST_MATCH 2 |
387 | | |
388 | | #define YY_LESS_LINENO(n) |
389 | | #define YY_LINENO_REWIND_TO(ptr) |
390 | | |
391 | | /* Return all but the first "n" matched characters back to the input stream. */ |
392 | | #define yyless(n) \ |
393 | | do \ |
394 | | { \ |
395 | | /* Undo effects of setting up yytext. */ \ |
396 | | int yyless_macro_arg = (n); \ |
397 | | YY_LESS_LINENO(yyless_macro_arg);\ |
398 | | *yy_cp = yyg->yy_hold_char; \ |
399 | | YY_RESTORE_YY_MORE_OFFSET \ |
400 | | yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ |
401 | | YY_DO_BEFORE_ACTION; /* set up yytext again */ \ |
402 | | } \ |
403 | | while ( 0 ) |
404 | | #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) |
405 | | |
406 | | #ifndef YY_STRUCT_YY_BUFFER_STATE |
407 | | #define YY_STRUCT_YY_BUFFER_STATE |
408 | | struct yy_buffer_state |
409 | | { |
410 | | FILE *yy_input_file; |
411 | | |
412 | | char *yy_ch_buf; /* input buffer */ |
413 | | char *yy_buf_pos; /* current position in input buffer */ |
414 | | |
415 | | /* Size of input buffer in bytes, not including room for EOB |
416 | | * characters. |
417 | | */ |
418 | | int yy_buf_size; |
419 | | |
420 | | /* Number of characters read into yy_ch_buf, not including EOB |
421 | | * characters. |
422 | | */ |
423 | | int yy_n_chars; |
424 | | |
425 | | /* Whether we "own" the buffer - i.e., we know we created it, |
426 | | * and can realloc() it to grow it, and should free() it to |
427 | | * delete it. |
428 | | */ |
429 | | int yy_is_our_buffer; |
430 | | |
431 | | /* Whether this is an "interactive" input source; if so, and |
432 | | * if we're using stdio for input, then we want to use getc() |
433 | | * instead of fread(), to make sure we stop fetching input after |
434 | | * each newline. |
435 | | */ |
436 | | int yy_is_interactive; |
437 | | |
438 | | /* Whether we're considered to be at the beginning of a line. |
439 | | * If so, '^' rules will be active on the next match, otherwise |
440 | | * not. |
441 | | */ |
442 | | int yy_at_bol; |
443 | | |
444 | | int yy_bs_lineno; /**< The line count. */ |
445 | | int yy_bs_column; /**< The column count. */ |
446 | | |
447 | | /* Whether to try to fill the input buffer when we reach the |
448 | | * end of it. |
449 | | */ |
450 | | int yy_fill_buffer; |
451 | | |
452 | | int yy_buffer_status; |
453 | | |
454 | 1.62M | #define YY_BUFFER_NEW 0 |
455 | 5.67k | #define YY_BUFFER_NORMAL 1 |
456 | | /* When an EOF's been seen but there's still some text to process |
457 | | * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
458 | | * shouldn't try reading from the input source any more. We might |
459 | | * still have a bunch of tokens to match, though, because of |
460 | | * possible backing-up. |
461 | | * |
462 | | * When we actually see the EOF, we change the status to "new" |
463 | | * (via yyrestart()), so that the user can continue scanning by |
464 | | * just pointing yyin at a new input file. |
465 | | */ |
466 | 127k | #define YY_BUFFER_EOF_PENDING 2 |
467 | | |
468 | | }; |
469 | | #endif /* !YY_STRUCT_YY_BUFFER_STATE */ |
470 | | |
471 | | /* We provide macros for accessing buffer states in case in the |
472 | | * future we want to put the buffer states in a more general |
473 | | * "scanner state". |
474 | | * |
475 | | * Returns the top of the stack, or NULL. |
476 | | */ |
477 | 90.7k | #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ |
478 | 90.7k | ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ |
479 | 90.7k | : NULL) |
480 | | /* Same as previous macro, but useful when we know that the buffer stack is not |
481 | | * NULL or when we need an lvalue. For internal use only. |
482 | | */ |
483 | 4.11M | #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] |
484 | | |
485 | | void yyrestart ( FILE *input_file , yyscan_t yyscanner ); |
486 | | void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
487 | | YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner ); |
488 | | void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
489 | | void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner ); |
490 | | void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner ); |
491 | | void yypop_buffer_state ( yyscan_t yyscanner ); |
492 | | |
493 | | static void yyensure_buffer_stack ( yyscan_t yyscanner ); |
494 | | static void yy_load_buffer_state ( yyscan_t yyscanner ); |
495 | | static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner ); |
496 | | #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner) |
497 | | |
498 | | YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); |
499 | | YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); |
500 | | YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); |
501 | | |
502 | | void *yyalloc ( yy_size_t , yyscan_t yyscanner ); |
503 | | void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner ); |
504 | | void yyfree ( void * , yyscan_t yyscanner ); |
505 | | |
506 | | #define yy_new_buffer yy_create_buffer |
507 | | #define yy_set_interactive(is_interactive) \ |
508 | | { \ |
509 | | if ( ! YY_CURRENT_BUFFER ){ \ |
510 | | yyensure_buffer_stack (yyscanner); \ |
511 | | YY_CURRENT_BUFFER_LVALUE = \ |
512 | | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
513 | | } \ |
514 | | YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ |
515 | | } |
516 | | #define yy_set_bol(at_bol) \ |
517 | | { \ |
518 | | if ( ! YY_CURRENT_BUFFER ){\ |
519 | | yyensure_buffer_stack (yyscanner); \ |
520 | | YY_CURRENT_BUFFER_LVALUE = \ |
521 | | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \ |
522 | | } \ |
523 | | YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ |
524 | | } |
525 | | #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
526 | | |
527 | | /* Begin user sect3 */ |
528 | | |
529 | 5.67k | #define cmGccDepfile_yywrap(yyscanner) (/*CONSTCOND*/1) |
530 | | #define YY_SKIP_YYWRAP |
531 | | typedef flex_uint8_t YY_CHAR; |
532 | | |
533 | | typedef int yy_state_type; |
534 | | |
535 | 16.0M | #define yytext_ptr yytext_r |
536 | | |
537 | | static yy_state_type yy_get_previous_state ( yyscan_t yyscanner ); |
538 | | static yy_state_type yy_try_NUL_trans ( yy_state_type current_state , yyscan_t yyscanner); |
539 | | static int yy_get_next_buffer ( yyscan_t yyscanner ); |
540 | | static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); |
541 | | |
542 | | /* Done after the current pattern has been matched and before the |
543 | | * corresponding action - sets up yytext. |
544 | | */ |
545 | | #define YY_DO_BEFORE_ACTION \ |
546 | 9.42M | yyg->yytext_ptr = yy_bp; \ |
547 | 9.42M | yyleng = (int) (yy_cp - yy_bp); \ |
548 | 9.42M | yyg->yy_hold_char = *yy_cp; \ |
549 | 9.42M | *yy_cp = '\0'; \ |
550 | 9.42M | yyg->yy_c_buf_p = yy_cp; |
551 | | #define YY_NUM_RULES 13 |
552 | 1.61M | #define YY_END_OF_BUFFER 14 |
553 | | /* This struct is not used in this scanner, |
554 | | but its presence is necessary. */ |
555 | | struct yy_trans_info |
556 | | { |
557 | | flex_int32_t yy_verify; |
558 | | flex_int32_t yy_nxt; |
559 | | }; |
560 | | static const flex_int16_t yy_accept[32] = |
561 | | { 0, |
562 | | 0, 0, 14, 12, 10, 7, 12, 11, 12, 12, |
563 | | 12, 10, 0, 7, 11, 1, 9, 8, 0, 0, |
564 | | 6, 0, 4, 2, 3, 0, 9, 0, 5, 0, |
565 | | 0 |
566 | | } ; |
567 | | |
568 | | static const YY_CHAR yy_ec[256] = |
569 | | { 0, |
570 | | 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, |
571 | | 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, |
572 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
573 | | 1, 5, 6, 1, 7, 8, 6, 1, 1, 6, |
574 | | 6, 1, 6, 6, 6, 6, 6, 6, 6, 6, |
575 | | 6, 6, 6, 6, 6, 6, 6, 9, 1, 1, |
576 | | 6, 1, 1, 6, 6, 6, 6, 6, 6, 6, |
577 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
578 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
579 | | 6, 10, 6, 1, 6, 1, 6, 6, 6, 6, |
580 | | |
581 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
582 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
583 | | 6, 6, 6, 1, 6, 6, 1, 6, 6, 6, |
584 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
585 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
586 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
587 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
588 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
589 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
590 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
591 | | |
592 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
593 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
594 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
595 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
596 | | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
597 | | 6, 6, 6, 6, 6 |
598 | | } ; |
599 | | |
600 | | static const YY_CHAR yy_meta[11] = |
601 | | { 0, |
602 | | 1, 2, 1, 1, 2, 1, 1, 1, 1, 3 |
603 | | } ; |
604 | | |
605 | | static const flex_int16_t yy_base[34] = |
606 | | { 0, |
607 | | 0, 0, 39, 46, 26, 46, 32, 28, 25, 9, |
608 | | 17, 15, 25, 46, 17, 46, 0, 46, 15, 27, |
609 | | 46, 14, 46, 46, 46, 27, 46, 13, 46, 33, |
610 | | 46, 42, 13 |
611 | | } ; |
612 | | |
613 | | static const flex_int16_t yy_def[34] = |
614 | | { 0, |
615 | | 31, 1, 31, 31, 32, 31, 31, 31, 31, 31, |
616 | | 31, 32, 31, 31, 31, 31, 33, 31, 31, 31, |
617 | | 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, |
618 | | 0, 31, 31 |
619 | | } ; |
620 | | |
621 | | static const flex_int16_t yy_nxt[57] = |
622 | | { 0, |
623 | | 4, 5, 6, 7, 5, 8, 4, 9, 10, 11, |
624 | | 17, 18, 19, 17, 17, 27, 21, 18, 20, 21, |
625 | | 22, 23, 15, 24, 13, 25, 26, 21, 22, 27, |
626 | | 28, 29, 16, 15, 14, 13, 30, 23, 31, 31, |
627 | | 31, 31, 26, 12, 12, 3, 31, 31, 31, 31, |
628 | | 31, 31, 31, 31, 31, 31 |
629 | | } ; |
630 | | |
631 | | static const flex_int16_t yy_chk[57] = |
632 | | { 0, |
633 | | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
634 | | 10, 10, 10, 10, 33, 28, 22, 19, 10, 11, |
635 | | 11, 11, 15, 11, 12, 11, 11, 13, 13, 20, |
636 | | 20, 26, 9, 8, 7, 5, 26, 30, 3, 0, |
637 | | 0, 0, 30, 32, 32, 31, 31, 31, 31, 31, |
638 | | 31, 31, 31, 31, 31, 31 |
639 | | } ; |
640 | | |
641 | | /* The intent behind this definition is that it'll catch |
642 | | * any uses of REJECT which flex missed. |
643 | | */ |
644 | | #define REJECT reject_used_but_not_detected |
645 | | #define yymore() yymore_used_but_not_detected |
646 | 3.26M | #define YY_MORE_ADJ 0 |
647 | | #define YY_RESTORE_YY_MORE_OFFSET |
648 | | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
649 | | file LICENSE.rst or https://cmake.org/licensing for details. */ |
650 | | |
651 | | /* IWYU pragma: no_forward_declare yyguts_t */ |
652 | | |
653 | | #ifndef __clang_analyzer__ /* Suppress clang-analyzer warnings */ |
654 | | |
655 | | #include <cmGccDepfileLexerHelper.h> |
656 | | #include <string> |
657 | | |
658 | | #define INITIAL 0 |
659 | | |
660 | | #ifndef YY_EXTRA_TYPE |
661 | | #define YY_EXTRA_TYPE void * |
662 | | #endif |
663 | | |
664 | | /* Holds the entire state of the reentrant scanner. */ |
665 | | struct yyguts_t |
666 | | { |
667 | | |
668 | | /* User-defined. Not touched by flex. */ |
669 | | YY_EXTRA_TYPE yyextra_r; |
670 | | |
671 | | /* The rest are the same as the globals declared in the non-reentrant scanner. */ |
672 | | FILE *yyin_r, *yyout_r; |
673 | | size_t yy_buffer_stack_top; /**< index of top of stack. */ |
674 | | size_t yy_buffer_stack_max; /**< capacity of stack. */ |
675 | | YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ |
676 | | char yy_hold_char; |
677 | | int yy_n_chars; |
678 | | int yyleng_r; |
679 | | char *yy_c_buf_p; |
680 | | int yy_init; |
681 | | int yy_start; |
682 | | int yy_did_buffer_switch_on_eof; |
683 | | int yy_start_stack_ptr; |
684 | | int yy_start_stack_depth; |
685 | | int *yy_start_stack; |
686 | | yy_state_type yy_last_accepting_state; |
687 | | char* yy_last_accepting_cpos; |
688 | | |
689 | | int yylineno_r; |
690 | | int yy_flex_debug_r; |
691 | | |
692 | | char *yytext_r; |
693 | | int yy_more_flag; |
694 | | int yy_more_len; |
695 | | |
696 | | }; /* end struct yyguts_t */ |
697 | | |
698 | | static int yy_init_globals ( yyscan_t yyscanner ); |
699 | | |
700 | | int yylex_init (yyscan_t* scanner); |
701 | | |
702 | | int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner); |
703 | | |
704 | | /* Accessor methods to globals. |
705 | | These are made visible to non-reentrant scanners for convenience. */ |
706 | | |
707 | | int yylex_destroy ( yyscan_t yyscanner ); |
708 | | |
709 | | int yyget_debug ( yyscan_t yyscanner ); |
710 | | |
711 | | void yyset_debug ( int debug_flag , yyscan_t yyscanner ); |
712 | | |
713 | | YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner ); |
714 | | |
715 | | void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner ); |
716 | | |
717 | | FILE *yyget_in ( yyscan_t yyscanner ); |
718 | | |
719 | | void yyset_in ( FILE * _in_str , yyscan_t yyscanner ); |
720 | | |
721 | | FILE *yyget_out ( yyscan_t yyscanner ); |
722 | | |
723 | | void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); |
724 | | |
725 | | int yyget_leng ( yyscan_t yyscanner ); |
726 | | |
727 | | char *yyget_text ( yyscan_t yyscanner ); |
728 | | |
729 | | int yyget_lineno ( yyscan_t yyscanner ); |
730 | | |
731 | | void yyset_lineno ( int _line_number , yyscan_t yyscanner ); |
732 | | |
733 | | int yyget_column ( yyscan_t yyscanner ); |
734 | | |
735 | | void yyset_column ( int _column_no , yyscan_t yyscanner ); |
736 | | |
737 | | /* Macros after this point can all be overridden by user definitions in |
738 | | * section 1. |
739 | | */ |
740 | | |
741 | | #ifndef YY_SKIP_YYWRAP |
742 | | #ifdef __cplusplus |
743 | | extern "C" int yywrap ( yyscan_t yyscanner ); |
744 | | #else |
745 | | extern int yywrap ( yyscan_t yyscanner ); |
746 | | #endif |
747 | | #endif |
748 | | |
749 | | #ifndef YY_NO_UNPUT |
750 | | |
751 | | static void yyunput ( int c, char *buf_ptr , yyscan_t yyscanner); |
752 | | |
753 | | #endif |
754 | | |
755 | | #ifndef yytext_ptr |
756 | | static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner); |
757 | | #endif |
758 | | |
759 | | #ifdef YY_NEED_STRLEN |
760 | | static int yy_flex_strlen ( const char * , yyscan_t yyscanner); |
761 | | #endif |
762 | | |
763 | | #ifndef YY_NO_INPUT |
764 | | #ifdef __cplusplus |
765 | | static int yyinput ( yyscan_t yyscanner ); |
766 | | #else |
767 | | static int input ( yyscan_t yyscanner ); |
768 | | #endif |
769 | | |
770 | | #endif |
771 | | |
772 | | /* Amount of stuff to slurp up with each read. */ |
773 | | #ifndef YY_READ_BUF_SIZE |
774 | | #ifdef __ia64__ |
775 | | /* On IA-64, the buffer size is 16k, not 8k */ |
776 | | #define YY_READ_BUF_SIZE 16384 |
777 | | #else |
778 | 31.1k | #define YY_READ_BUF_SIZE 8192 |
779 | | #endif /* __ia64__ */ |
780 | | #endif |
781 | | |
782 | | /* Copy whatever the last rule matched to the standard output. */ |
783 | | #ifndef ECHO |
784 | | /* This used to be an fputs(), but since the string might contain NUL's, |
785 | | * we now use fwrite(). |
786 | | */ |
787 | | #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) |
788 | | #endif |
789 | | |
790 | | /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
791 | | * is returned in "result". |
792 | | */ |
793 | | #ifndef YY_INPUT |
794 | | #define YY_INPUT(buf,result,max_size) \ |
795 | 15.8k | if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ |
796 | 15.8k | { \ |
797 | 0 | int c = '*'; \ |
798 | 0 | int n; \ |
799 | 0 | for ( n = 0; n < max_size && \ |
800 | 0 | (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ |
801 | 0 | buf[n] = (char) c; \ |
802 | 0 | if ( c == '\n' ) \ |
803 | 0 | buf[n++] = (char) c; \ |
804 | 0 | if ( c == EOF && ferror( yyin ) ) \ |
805 | 0 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
806 | 0 | result = n; \ |
807 | 0 | } \ |
808 | 15.8k | else \ |
809 | 15.8k | { \ |
810 | 15.8k | errno=0; \ |
811 | 15.8k | while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ |
812 | 15.8k | { \ |
813 | 0 | if( errno != EINTR) \ |
814 | 0 | { \ |
815 | 0 | YY_FATAL_ERROR( "input in flex scanner failed" ); \ |
816 | 0 | break; \ |
817 | 0 | } \ |
818 | 0 | errno=0; \ |
819 | 0 | clearerr(yyin); \ |
820 | 0 | } \ |
821 | 15.8k | }\ |
822 | | \ |
823 | | |
824 | | #endif |
825 | | |
826 | | /* No semi-colon after return; correct usage is to write "yyterminate();" - |
827 | | * we don't want an extra ';' after the "return" because that will cause |
828 | | * some compilers to complain about unreachable statements. |
829 | | */ |
830 | | #ifndef yyterminate |
831 | 5.67k | #define yyterminate() return YY_NULL |
832 | | #endif |
833 | | |
834 | | /* Number of entries by which start-condition stack grows. */ |
835 | | #ifndef YY_START_STACK_INCR |
836 | | #define YY_START_STACK_INCR 25 |
837 | | #endif |
838 | | |
839 | | /* Report a fatal error. */ |
840 | | #ifndef YY_FATAL_ERROR |
841 | 0 | #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) |
842 | | #endif |
843 | | |
844 | | /* end tables serialization structures and prototypes */ |
845 | | |
846 | | /* Default declaration of generated scanner - a define so the user can |
847 | | * easily add parameters. |
848 | | */ |
849 | | #ifndef YY_DECL |
850 | | #define YY_DECL_IS_OURS 1 |
851 | | |
852 | | extern int yylex (yyscan_t yyscanner); |
853 | | |
854 | | #define YY_DECL int yylex (yyscan_t yyscanner) |
855 | | #endif /* !YY_DECL */ |
856 | | |
857 | | /* Code executed at the beginning of each rule, after yytext and yyleng |
858 | | * have been set up. |
859 | | */ |
860 | | #ifndef YY_USER_ACTION |
861 | | #define YY_USER_ACTION |
862 | | #endif |
863 | | |
864 | | /* Code executed at the end of each rule. */ |
865 | | #ifndef YY_BREAK |
866 | 7.82M | #define YY_BREAK /*LINTED*/break; |
867 | | #endif |
868 | | |
869 | | #define YY_RULE_SETUP \ |
870 | | YY_USER_ACTION |
871 | | |
872 | | /** The main scanner function which does all the work. |
873 | | */ |
874 | | YY_DECL |
875 | 5.67k | { |
876 | 5.67k | yy_state_type yy_current_state; |
877 | 5.67k | char *yy_cp, *yy_bp; |
878 | 5.67k | int yy_act; |
879 | 5.67k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
880 | | |
881 | 5.67k | if ( !yyg->yy_init ) |
882 | 5.67k | { |
883 | 5.67k | yyg->yy_init = 1; |
884 | | |
885 | | #ifdef YY_USER_INIT |
886 | | YY_USER_INIT; |
887 | | #endif |
888 | | |
889 | 5.67k | if ( ! yyg->yy_start ) |
890 | 5.67k | yyg->yy_start = 1; /* first start state */ |
891 | | |
892 | 5.67k | if ( ! yyin ) |
893 | 0 | yyin = stdin; |
894 | | |
895 | 5.67k | if ( ! yyout ) |
896 | 5.67k | yyout = stdout; |
897 | | |
898 | 5.67k | if ( ! YY_CURRENT_BUFFER ) { |
899 | 0 | yyensure_buffer_stack (yyscanner); |
900 | 0 | YY_CURRENT_BUFFER_LVALUE = |
901 | 0 | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
902 | 0 | } |
903 | | |
904 | 5.67k | yy_load_buffer_state( yyscanner ); |
905 | 5.67k | } |
906 | | |
907 | 5.67k | { |
908 | | |
909 | 7.82M | while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ |
910 | 7.82M | { |
911 | 7.82M | yy_cp = yyg->yy_c_buf_p; |
912 | | |
913 | | /* Support of yytext. */ |
914 | 7.82M | *yy_cp = yyg->yy_hold_char; |
915 | | |
916 | | /* yy_bp points to the position in yy_ch_buf of the start of |
917 | | * the current run. |
918 | | */ |
919 | 7.82M | yy_bp = yy_cp; |
920 | | |
921 | 7.82M | yy_current_state = yyg->yy_start; |
922 | 8.60M | yy_match: |
923 | 8.60M | do |
924 | 325M | { |
925 | 325M | YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; |
926 | 325M | if ( yy_accept[yy_current_state] ) |
927 | 36.7M | { |
928 | 36.7M | yyg->yy_last_accepting_state = yy_current_state; |
929 | 36.7M | yyg->yy_last_accepting_cpos = yy_cp; |
930 | 36.7M | } |
931 | 333M | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
932 | 8.27M | { |
933 | 8.27M | yy_current_state = (int) yy_def[yy_current_state]; |
934 | 8.27M | if ( yy_current_state >= 32 ) |
935 | 3.05M | yy_c = yy_meta[yy_c]; |
936 | 8.27M | } |
937 | 325M | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
938 | 325M | ++yy_cp; |
939 | 325M | } |
940 | 325M | while ( yy_base[yy_current_state] != 46 ); |
941 | | |
942 | 9.42M | yy_find_action: |
943 | 9.42M | yy_act = yy_accept[yy_current_state]; |
944 | 9.42M | if ( yy_act == 0 ) |
945 | 5.25M | { /* have to back up */ |
946 | 5.25M | yy_cp = yyg->yy_last_accepting_cpos; |
947 | 5.25M | yy_current_state = yyg->yy_last_accepting_state; |
948 | 5.25M | yy_act = yy_accept[yy_current_state]; |
949 | 5.25M | } |
950 | | |
951 | 9.42M | YY_DO_BEFORE_ACTION; |
952 | | |
953 | 9.43M | do_action: /* This label is used only to access EOF actions. */ |
954 | | |
955 | 9.43M | switch ( yy_act ) |
956 | 9.43M | { /* beginning of action switch */ |
957 | 0 | case 0: /* must back up */ |
958 | | /* undo the effects of YY_DO_BEFORE_ACTION */ |
959 | 0 | *yy_cp = yyg->yy_hold_char; |
960 | 0 | yy_cp = yyg->yy_last_accepting_cpos; |
961 | 0 | yy_current_state = yyg->yy_last_accepting_state; |
962 | 0 | goto yy_find_action; |
963 | | |
964 | 2.78k | case 1: |
965 | 2.78k | YY_RULE_SETUP |
966 | 2.78k | { |
967 | | // Unescape the dollar sign. |
968 | 2.78k | yyextra->addToCurrentPath("$"); |
969 | 2.78k | } |
970 | 2.78k | YY_BREAK |
971 | 885 | case 2: |
972 | 885 | YY_RULE_SETUP |
973 | 885 | { |
974 | | // Unescape the hash. |
975 | 885 | yyextra->addToCurrentPath("#"); |
976 | 885 | } |
977 | 885 | YY_BREAK |
978 | 927 | case 3: |
979 | 927 | YY_RULE_SETUP |
980 | 927 | { |
981 | | // Unescape the colon. |
982 | 927 | yyextra->addToCurrentPath(":"); |
983 | 927 | } |
984 | 927 | YY_BREAK |
985 | 12.1k | case 4: |
986 | 12.1k | YY_RULE_SETUP |
987 | 12.1k | { |
988 | | // 2N+1 backslashes plus space -> N backslashes plus space. |
989 | 12.1k | size_t c = (strlen(yytext) - 1) / 2; |
990 | 12.1k | std::string s(c, '\\'); |
991 | 12.1k | s.push_back(' '); |
992 | 12.1k | yyextra->addToCurrentPath(s.c_str()); |
993 | 12.1k | } |
994 | 12.1k | YY_BREAK |
995 | 8.50k | case 5: |
996 | 8.50k | YY_RULE_SETUP |
997 | 8.50k | { |
998 | | // 2N backslashes plus space -> 2N backslashes, end of filename. |
999 | 8.50k | yytext[strlen(yytext) - 1] = 0; |
1000 | 8.50k | yyextra->addToCurrentPath(yytext); |
1001 | 8.50k | yyextra->newDependency(); |
1002 | 8.50k | } |
1003 | 8.50k | YY_BREAK |
1004 | 2.17k | case 6: |
1005 | | /* rule 6 can match eol */ |
1006 | 2.17k | YY_RULE_SETUP |
1007 | 2.17k | { |
1008 | | // A line continuation ends the current file name. |
1009 | 2.17k | yyextra->newRuleOrDependency(); |
1010 | 2.17k | } |
1011 | 2.17k | YY_BREAK |
1012 | 34.4k | case 7: |
1013 | | /* rule 7 can match eol */ |
1014 | 34.4k | YY_RULE_SETUP |
1015 | 34.4k | { |
1016 | | // A newline ends the current file name and the current rule. |
1017 | 34.4k | yyextra->newEntry(); |
1018 | 34.4k | } |
1019 | 34.4k | YY_BREAK |
1020 | 71.3k | case 8: |
1021 | | /* rule 8 can match eol */ |
1022 | 71.3k | YY_RULE_SETUP |
1023 | 71.3k | { |
1024 | | // A colon ends the rules |
1025 | 71.3k | yyextra->newDependency(); |
1026 | | // A newline after colon terminates current rule. |
1027 | 71.3k | yyextra->newEntry(); |
1028 | 71.3k | } |
1029 | 71.3k | YY_BREAK |
1030 | 64.8k | case 9: |
1031 | | /* rule 9 can match eol */ |
1032 | 64.8k | YY_RULE_SETUP |
1033 | 64.8k | { |
1034 | | // A colon followed by space or line continuation ends the rules |
1035 | | // and starts a new dependency. |
1036 | 64.8k | yyextra->newDependency(); |
1037 | 64.8k | } |
1038 | 64.8k | YY_BREAK |
1039 | 2.11M | case 10: |
1040 | 2.11M | YY_RULE_SETUP |
1041 | 2.11M | { |
1042 | | // Rules and dependencies are separated by blocks of whitespace. |
1043 | 2.11M | yyextra->newRuleOrDependency(); |
1044 | 2.11M | } |
1045 | 2.11M | YY_BREAK |
1046 | 701k | case 11: |
1047 | 701k | YY_RULE_SETUP |
1048 | 701k | { |
1049 | | // Got a span of plain text. |
1050 | 701k | yyextra->addToCurrentPath(yytext); |
1051 | 701k | } |
1052 | 701k | YY_BREAK |
1053 | 4.80M | case 12: |
1054 | 4.80M | YY_RULE_SETUP |
1055 | 4.80M | { |
1056 | | // Got an otherwise unmatched character. |
1057 | 4.80M | yyextra->addToCurrentPath(yytext); |
1058 | 4.80M | } |
1059 | 4.80M | YY_BREAK |
1060 | 0 | case 13: |
1061 | 0 | YY_RULE_SETUP |
1062 | 0 | ECHO; |
1063 | 0 | YY_BREAK |
1064 | 5.67k | case YY_STATE_EOF(INITIAL): |
1065 | 5.67k | yyterminate(); |
1066 | | |
1067 | 1.60M | case YY_END_OF_BUFFER: |
1068 | 1.60M | { |
1069 | | /* Amount of text matched not including the EOB char. */ |
1070 | 1.60M | int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; |
1071 | | |
1072 | | /* Undo the effects of YY_DO_BEFORE_ACTION. */ |
1073 | 1.60M | *yy_cp = yyg->yy_hold_char; |
1074 | 1.60M | YY_RESTORE_YY_MORE_OFFSET |
1075 | | |
1076 | 1.60M | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) |
1077 | 5.67k | { |
1078 | | /* We're scanning a new file or input source. It's |
1079 | | * possible that this happened because the user |
1080 | | * just pointed yyin at a new source and called |
1081 | | * yylex(). If so, then we have to assure |
1082 | | * consistency between YY_CURRENT_BUFFER and our |
1083 | | * globals. Here is the right place to do so, because |
1084 | | * this is the first action (other than possibly a |
1085 | | * back-up) that will match for the new input source. |
1086 | | */ |
1087 | 5.67k | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
1088 | 5.67k | YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; |
1089 | 5.67k | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; |
1090 | 5.67k | } |
1091 | | |
1092 | | /* Note that here we test for yy_c_buf_p "<=" to the position |
1093 | | * of the first EOB in the buffer, since yy_c_buf_p will |
1094 | | * already have been incremented past the NUL character |
1095 | | * (since all states make transitions on EOB to the |
1096 | | * end-of-buffer state). Contrast this with the test |
1097 | | * in input(). |
1098 | | */ |
1099 | 1.60M | if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
1100 | 1.53M | { /* This was really a NUL. */ |
1101 | 1.53M | yy_state_type yy_next_state; |
1102 | | |
1103 | 1.53M | yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; |
1104 | | |
1105 | 1.53M | yy_current_state = yy_get_previous_state( yyscanner ); |
1106 | | |
1107 | | /* Okay, we're now positioned to make the NUL |
1108 | | * transition. We couldn't have |
1109 | | * yy_get_previous_state() go ahead and do it |
1110 | | * for us because it doesn't know how to deal |
1111 | | * with the possibility of jamming (and we don't |
1112 | | * want to build jamming into it because then it |
1113 | | * will run more slowly). |
1114 | | */ |
1115 | | |
1116 | 1.53M | yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); |
1117 | | |
1118 | 1.53M | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
1119 | | |
1120 | 1.53M | if ( yy_next_state ) |
1121 | 761k | { |
1122 | | /* Consume the NUL. */ |
1123 | 761k | yy_cp = ++yyg->yy_c_buf_p; |
1124 | 761k | yy_current_state = yy_next_state; |
1125 | 761k | goto yy_match; |
1126 | 761k | } |
1127 | | |
1128 | 772k | else |
1129 | 772k | { |
1130 | 772k | yy_cp = yyg->yy_c_buf_p; |
1131 | 772k | goto yy_find_action; |
1132 | 772k | } |
1133 | 1.53M | } |
1134 | | |
1135 | 71.5k | else switch ( yy_get_next_buffer( yyscanner ) ) |
1136 | 71.5k | { |
1137 | 5.67k | case EOB_ACT_END_OF_FILE: |
1138 | 5.67k | { |
1139 | 5.67k | yyg->yy_did_buffer_switch_on_eof = 0; |
1140 | | |
1141 | 5.67k | if ( yywrap( yyscanner ) ) |
1142 | 5.67k | { |
1143 | | /* Note: because we've taken care in |
1144 | | * yy_get_next_buffer() to have set up |
1145 | | * yytext, we can now set up |
1146 | | * yy_c_buf_p so that if some total |
1147 | | * hoser (like flex itself) wants to |
1148 | | * call the scanner after we return the |
1149 | | * YY_NULL, it'll still work - another |
1150 | | * YY_NULL will get returned. |
1151 | | */ |
1152 | 5.67k | yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; |
1153 | | |
1154 | 5.67k | yy_act = YY_STATE_EOF(YY_START); |
1155 | 5.67k | goto do_action; |
1156 | 5.67k | } |
1157 | | |
1158 | 0 | else |
1159 | 0 | { |
1160 | 0 | if ( ! yyg->yy_did_buffer_switch_on_eof ) |
1161 | 0 | YY_NEW_FILE; |
1162 | 0 | } |
1163 | 0 | break; |
1164 | 5.67k | } |
1165 | | |
1166 | 10.2k | case EOB_ACT_CONTINUE_SCAN: |
1167 | 10.2k | yyg->yy_c_buf_p = |
1168 | 10.2k | yyg->yytext_ptr + yy_amount_of_matched_text; |
1169 | | |
1170 | 10.2k | yy_current_state = yy_get_previous_state( yyscanner ); |
1171 | | |
1172 | 10.2k | yy_cp = yyg->yy_c_buf_p; |
1173 | 10.2k | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
1174 | 10.2k | goto yy_match; |
1175 | | |
1176 | 55.6k | case EOB_ACT_LAST_MATCH: |
1177 | 55.6k | yyg->yy_c_buf_p = |
1178 | 55.6k | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; |
1179 | | |
1180 | 55.6k | yy_current_state = yy_get_previous_state( yyscanner ); |
1181 | | |
1182 | 55.6k | yy_cp = yyg->yy_c_buf_p; |
1183 | 55.6k | yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; |
1184 | 55.6k | goto yy_find_action; |
1185 | 71.5k | } |
1186 | 0 | break; |
1187 | 1.60M | } |
1188 | | |
1189 | 0 | default: |
1190 | 0 | YY_FATAL_ERROR( |
1191 | 9.43M | "fatal flex scanner internal error--no action found" ); |
1192 | 9.43M | } /* end of action switch */ |
1193 | 9.43M | } /* end of scanning one token */ |
1194 | 5.67k | } /* end of user's declarations */ |
1195 | 5.67k | } /* end of yylex */ |
1196 | | |
1197 | | /* yy_get_next_buffer - try to read in a new buffer |
1198 | | * |
1199 | | * Returns a code representing an action: |
1200 | | * EOB_ACT_LAST_MATCH - |
1201 | | * EOB_ACT_CONTINUE_SCAN - continue scanning from current position |
1202 | | * EOB_ACT_END_OF_FILE - end of file |
1203 | | */ |
1204 | | static int yy_get_next_buffer (yyscan_t yyscanner) |
1205 | 71.5k | { |
1206 | 71.5k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1207 | 71.5k | char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; |
1208 | 71.5k | char *source = yyg->yytext_ptr; |
1209 | 71.5k | int number_to_move, i; |
1210 | 71.5k | int ret_val; |
1211 | | |
1212 | 71.5k | if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) |
1213 | 0 | YY_FATAL_ERROR( |
1214 | 71.5k | "fatal flex scanner internal error--end of buffer missed" ); |
1215 | | |
1216 | 71.5k | if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) |
1217 | 0 | { /* Don't try to fill the buffer, so this is an EOF. */ |
1218 | 0 | if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) |
1219 | 0 | { |
1220 | | /* We matched a single character, the EOB, so |
1221 | | * treat this as a final EOF. |
1222 | | */ |
1223 | 0 | return EOB_ACT_END_OF_FILE; |
1224 | 0 | } |
1225 | | |
1226 | 0 | else |
1227 | 0 | { |
1228 | | /* We matched some text prior to the EOB, first |
1229 | | * process it. |
1230 | | */ |
1231 | 0 | return EOB_ACT_LAST_MATCH; |
1232 | 0 | } |
1233 | 0 | } |
1234 | | |
1235 | | /* Try to read more data. */ |
1236 | | |
1237 | | /* First move last chars to start of buffer. */ |
1238 | 71.5k | number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1); |
1239 | | |
1240 | 237M | for ( i = 0; i < number_to_move; ++i ) |
1241 | 237M | *(dest++) = *(source++); |
1242 | | |
1243 | 71.5k | if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) |
1244 | | /* don't do the read, it's not guaranteed to return an EOF, |
1245 | | * just force an EOF |
1246 | | */ |
1247 | 55.6k | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; |
1248 | | |
1249 | 15.8k | else |
1250 | 15.8k | { |
1251 | 15.8k | int num_to_read = |
1252 | 15.8k | YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; |
1253 | | |
1254 | 16.2k | while ( num_to_read <= 0 ) |
1255 | 324 | { /* Not enough room in the buffer - grow it. */ |
1256 | | |
1257 | | /* just a shorter name for the current buffer */ |
1258 | 324 | YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; |
1259 | | |
1260 | 324 | int yy_c_buf_p_offset = |
1261 | 324 | (int) (yyg->yy_c_buf_p - b->yy_ch_buf); |
1262 | | |
1263 | 324 | if ( b->yy_is_our_buffer ) |
1264 | 324 | { |
1265 | 324 | int new_size = b->yy_buf_size * 2; |
1266 | | |
1267 | 324 | if ( new_size <= 0 ) |
1268 | 0 | b->yy_buf_size += b->yy_buf_size / 8; |
1269 | 324 | else |
1270 | 324 | b->yy_buf_size *= 2; |
1271 | | |
1272 | 324 | b->yy_ch_buf = (char *) |
1273 | | /* Include room in for 2 EOB chars. */ |
1274 | 324 | yyrealloc( (void *) b->yy_ch_buf, |
1275 | 324 | (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
1276 | 324 | } |
1277 | 0 | else |
1278 | | /* Can't grow it, we don't own it. */ |
1279 | 0 | b->yy_ch_buf = NULL; |
1280 | | |
1281 | 324 | if ( ! b->yy_ch_buf ) |
1282 | 0 | YY_FATAL_ERROR( |
1283 | 324 | "fatal error - scanner input buffer overflow" ); |
1284 | | |
1285 | 324 | yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; |
1286 | | |
1287 | 324 | num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - |
1288 | 324 | number_to_move - 1; |
1289 | | |
1290 | 324 | } |
1291 | | |
1292 | 15.8k | if ( num_to_read > YY_READ_BUF_SIZE ) |
1293 | 15.2k | num_to_read = YY_READ_BUF_SIZE; |
1294 | | |
1295 | | /* Read in more data. */ |
1296 | 15.8k | YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), |
1297 | 15.8k | yyg->yy_n_chars, num_to_read ); |
1298 | | |
1299 | 15.8k | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
1300 | 15.8k | } |
1301 | | |
1302 | 71.5k | if ( yyg->yy_n_chars == 0 ) |
1303 | 61.3k | { |
1304 | 61.3k | if ( number_to_move == YY_MORE_ADJ ) |
1305 | 5.67k | { |
1306 | 5.67k | ret_val = EOB_ACT_END_OF_FILE; |
1307 | 5.67k | yyrestart( yyin , yyscanner); |
1308 | 5.67k | } |
1309 | | |
1310 | 55.6k | else |
1311 | 55.6k | { |
1312 | 55.6k | ret_val = EOB_ACT_LAST_MATCH; |
1313 | 55.6k | YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = |
1314 | 55.6k | YY_BUFFER_EOF_PENDING; |
1315 | 55.6k | } |
1316 | 61.3k | } |
1317 | | |
1318 | 10.2k | else |
1319 | 10.2k | ret_val = EOB_ACT_CONTINUE_SCAN; |
1320 | | |
1321 | 71.5k | if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { |
1322 | | /* Extend the array by 50%, plus the number we really need. */ |
1323 | 0 | int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); |
1324 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( |
1325 | 0 | (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); |
1326 | 0 | if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
1327 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); |
1328 | | /* "- 2" to take care of EOB's */ |
1329 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); |
1330 | 0 | } |
1331 | | |
1332 | 71.5k | yyg->yy_n_chars += number_to_move; |
1333 | 71.5k | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; |
1334 | 71.5k | YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; |
1335 | | |
1336 | 71.5k | yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; |
1337 | | |
1338 | 71.5k | return ret_val; |
1339 | 71.5k | } |
1340 | | |
1341 | | /* yy_get_previous_state - get the state just before the EOB char was reached */ |
1342 | | |
1343 | | static yy_state_type yy_get_previous_state (yyscan_t yyscanner) |
1344 | 1.59M | { |
1345 | 1.59M | yy_state_type yy_current_state; |
1346 | 1.59M | char *yy_cp; |
1347 | 1.59M | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1348 | | |
1349 | 1.59M | yy_current_state = yyg->yy_start; |
1350 | | |
1351 | 290M | for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) |
1352 | 288M | { |
1353 | 288M | YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); |
1354 | 288M | if ( yy_accept[yy_current_state] ) |
1355 | 64.9M | { |
1356 | 64.9M | yyg->yy_last_accepting_state = yy_current_state; |
1357 | 64.9M | yyg->yy_last_accepting_cpos = yy_cp; |
1358 | 64.9M | } |
1359 | 295M | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1360 | 7.34M | { |
1361 | 7.34M | yy_current_state = (int) yy_def[yy_current_state]; |
1362 | 7.34M | if ( yy_current_state >= 32 ) |
1363 | 7.34M | yy_c = yy_meta[yy_c]; |
1364 | 7.34M | } |
1365 | 288M | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
1366 | 288M | } |
1367 | | |
1368 | 1.59M | return yy_current_state; |
1369 | 1.59M | } |
1370 | | |
1371 | | /* yy_try_NUL_trans - try to make a transition on the NUL character |
1372 | | * |
1373 | | * synopsis |
1374 | | * next_state = yy_try_NUL_trans( current_state ); |
1375 | | */ |
1376 | | static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) |
1377 | 1.53M | { |
1378 | 1.53M | int yy_is_jam; |
1379 | 1.53M | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ |
1380 | 1.53M | char *yy_cp = yyg->yy_c_buf_p; |
1381 | | |
1382 | 1.53M | YY_CHAR yy_c = 1; |
1383 | 1.53M | if ( yy_accept[yy_current_state] ) |
1384 | 756k | { |
1385 | 756k | yyg->yy_last_accepting_state = yy_current_state; |
1386 | 756k | yyg->yy_last_accepting_cpos = yy_cp; |
1387 | 756k | } |
1388 | 2.31M | while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) |
1389 | 776k | { |
1390 | 776k | yy_current_state = (int) yy_def[yy_current_state]; |
1391 | 776k | if ( yy_current_state >= 32 ) |
1392 | 4.10k | yy_c = yy_meta[yy_c]; |
1393 | 776k | } |
1394 | 1.53M | yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; |
1395 | 1.53M | yy_is_jam = (yy_current_state == 31); |
1396 | | |
1397 | 1.53M | (void)yyg; |
1398 | 1.53M | return yy_is_jam ? 0 : yy_current_state; |
1399 | 1.53M | } |
1400 | | |
1401 | | #ifndef YY_NO_UNPUT |
1402 | | |
1403 | | static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) |
1404 | | { |
1405 | | char *yy_cp; |
1406 | | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1407 | | |
1408 | | yy_cp = yyg->yy_c_buf_p; |
1409 | | |
1410 | | /* undo effects of setting up yytext */ |
1411 | | *yy_cp = yyg->yy_hold_char; |
1412 | | |
1413 | | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
1414 | | { /* need to shift things up to make room */ |
1415 | | /* +2 for EOB chars. */ |
1416 | | int number_to_move = yyg->yy_n_chars + 2; |
1417 | | char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ |
1418 | | YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; |
1419 | | char *source = |
1420 | | &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; |
1421 | | |
1422 | | while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) |
1423 | | *--dest = *--source; |
1424 | | |
1425 | | yy_cp += (int) (dest - source); |
1426 | | yy_bp += (int) (dest - source); |
1427 | | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = |
1428 | | yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; |
1429 | | |
1430 | | if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) |
1431 | | YY_FATAL_ERROR( "flex scanner push-back overflow" ); |
1432 | | } |
1433 | | |
1434 | | *--yy_cp = (char) c; |
1435 | | |
1436 | | yyg->yytext_ptr = yy_bp; |
1437 | | yyg->yy_hold_char = *yy_cp; |
1438 | | yyg->yy_c_buf_p = yy_cp; |
1439 | | } |
1440 | | |
1441 | | #endif |
1442 | | |
1443 | | #ifndef YY_NO_INPUT |
1444 | | #ifdef __cplusplus |
1445 | | static int yyinput (yyscan_t yyscanner) |
1446 | | #else |
1447 | | static int input (yyscan_t yyscanner) |
1448 | | #endif |
1449 | | |
1450 | | { |
1451 | | int c; |
1452 | | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1453 | | |
1454 | | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
1455 | | |
1456 | | if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) |
1457 | | { |
1458 | | /* yy_c_buf_p now points to the character we want to return. |
1459 | | * If this occurs *before* the EOB characters, then it's a |
1460 | | * valid NUL; if not, then we've hit the end of the buffer. |
1461 | | */ |
1462 | | if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) |
1463 | | /* This was really a NUL. */ |
1464 | | *yyg->yy_c_buf_p = '\0'; |
1465 | | |
1466 | | else |
1467 | | { /* need more input */ |
1468 | | int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); |
1469 | | ++yyg->yy_c_buf_p; |
1470 | | |
1471 | | switch ( yy_get_next_buffer( yyscanner ) ) |
1472 | | { |
1473 | | case EOB_ACT_LAST_MATCH: |
1474 | | /* This happens because yy_g_n_b() |
1475 | | * sees that we've accumulated a |
1476 | | * token and flags that we need to |
1477 | | * try matching the token before |
1478 | | * proceeding. But for input(), |
1479 | | * there's no matching to consider. |
1480 | | * So convert the EOB_ACT_LAST_MATCH |
1481 | | * to EOB_ACT_END_OF_FILE. |
1482 | | */ |
1483 | | |
1484 | | /* Reset buffer status. */ |
1485 | | yyrestart( yyin , yyscanner); |
1486 | | |
1487 | | /*FALLTHROUGH*/ |
1488 | | |
1489 | | case EOB_ACT_END_OF_FILE: |
1490 | | { |
1491 | | if ( yywrap( yyscanner ) ) |
1492 | | return 0; |
1493 | | |
1494 | | if ( ! yyg->yy_did_buffer_switch_on_eof ) |
1495 | | YY_NEW_FILE; |
1496 | | #ifdef __cplusplus |
1497 | | return yyinput(yyscanner); |
1498 | | #else |
1499 | | return input(yyscanner); |
1500 | | #endif |
1501 | | } |
1502 | | |
1503 | | case EOB_ACT_CONTINUE_SCAN: |
1504 | | yyg->yy_c_buf_p = yyg->yytext_ptr + offset; |
1505 | | break; |
1506 | | } |
1507 | | } |
1508 | | } |
1509 | | |
1510 | | c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ |
1511 | | *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ |
1512 | | yyg->yy_hold_char = *++yyg->yy_c_buf_p; |
1513 | | |
1514 | | return c; |
1515 | | } |
1516 | | #endif /* ifndef YY_NO_INPUT */ |
1517 | | |
1518 | | /** Immediately switch to a different input stream. |
1519 | | * @param input_file A readable stream. |
1520 | | * @param yyscanner The scanner object. |
1521 | | * @note This function does not reset the start condition to @c INITIAL . |
1522 | | */ |
1523 | | void yyrestart (FILE * input_file , yyscan_t yyscanner) |
1524 | 11.3k | { |
1525 | 11.3k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1526 | | |
1527 | 11.3k | if ( ! YY_CURRENT_BUFFER ){ |
1528 | 5.67k | yyensure_buffer_stack (yyscanner); |
1529 | 5.67k | YY_CURRENT_BUFFER_LVALUE = |
1530 | 5.67k | yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); |
1531 | 5.67k | } |
1532 | | |
1533 | 11.3k | yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner); |
1534 | 11.3k | yy_load_buffer_state( yyscanner ); |
1535 | 11.3k | } |
1536 | | |
1537 | | /** Switch to a different input buffer. |
1538 | | * @param new_buffer The new input buffer. |
1539 | | * @param yyscanner The scanner object. |
1540 | | */ |
1541 | | void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
1542 | 0 | { |
1543 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1544 | | |
1545 | | /* TODO. We should be able to replace this entire function body |
1546 | | * with |
1547 | | * yypop_buffer_state(); |
1548 | | * yypush_buffer_state(new_buffer); |
1549 | | */ |
1550 | 0 | yyensure_buffer_stack (yyscanner); |
1551 | 0 | if ( YY_CURRENT_BUFFER == new_buffer ) |
1552 | 0 | return; |
1553 | | |
1554 | 0 | if ( YY_CURRENT_BUFFER ) |
1555 | 0 | { |
1556 | | /* Flush out information for old buffer. */ |
1557 | 0 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
1558 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
1559 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
1560 | 0 | } |
1561 | |
|
1562 | 0 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
1563 | 0 | yy_load_buffer_state( yyscanner ); |
1564 | | |
1565 | | /* We don't actually know whether we did this switch during |
1566 | | * EOF (yywrap()) processing, but the only time this flag |
1567 | | * is looked at is after yywrap() is called, so it's safe |
1568 | | * to go ahead and always set it. |
1569 | | */ |
1570 | 0 | yyg->yy_did_buffer_switch_on_eof = 1; |
1571 | 0 | } |
1572 | | |
1573 | | static void yy_load_buffer_state (yyscan_t yyscanner) |
1574 | 28.3k | { |
1575 | 28.3k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1576 | 28.3k | yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; |
1577 | 28.3k | yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; |
1578 | 28.3k | yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; |
1579 | 28.3k | yyg->yy_hold_char = *yyg->yy_c_buf_p; |
1580 | 28.3k | } |
1581 | | |
1582 | | /** Allocate and initialize an input buffer state. |
1583 | | * @param file A readable stream. |
1584 | | * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. |
1585 | | * @param yyscanner The scanner object. |
1586 | | * @return the allocated buffer state. |
1587 | | */ |
1588 | | YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) |
1589 | 5.67k | { |
1590 | 5.67k | YY_BUFFER_STATE b; |
1591 | | |
1592 | 5.67k | b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
1593 | 5.67k | if ( ! b ) |
1594 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
1595 | | |
1596 | 5.67k | b->yy_buf_size = size; |
1597 | | |
1598 | | /* yy_ch_buf has to be 2 characters longer than the size given because |
1599 | | * we need to put in 2 end-of-buffer characters. |
1600 | | */ |
1601 | 5.67k | b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner ); |
1602 | 5.67k | if ( ! b->yy_ch_buf ) |
1603 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); |
1604 | | |
1605 | 5.67k | b->yy_is_our_buffer = 1; |
1606 | | |
1607 | 5.67k | yy_init_buffer( b, file , yyscanner); |
1608 | | |
1609 | 5.67k | return b; |
1610 | 5.67k | } |
1611 | | |
1612 | | /** Destroy the buffer. |
1613 | | * @param b a buffer created with yy_create_buffer() |
1614 | | * @param yyscanner The scanner object. |
1615 | | */ |
1616 | | void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
1617 | 5.67k | { |
1618 | 5.67k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1619 | | |
1620 | 5.67k | if ( ! b ) |
1621 | 0 | return; |
1622 | | |
1623 | 5.67k | if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ |
1624 | 5.67k | YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; |
1625 | | |
1626 | 5.67k | if ( b->yy_is_our_buffer ) |
1627 | 5.67k | yyfree( (void *) b->yy_ch_buf , yyscanner ); |
1628 | | |
1629 | 5.67k | yyfree( (void *) b , yyscanner ); |
1630 | 5.67k | } |
1631 | | |
1632 | | /* Initializes or reinitializes a buffer. |
1633 | | * This function is sometimes called more than once on the same buffer, |
1634 | | * such as during a yyrestart() or at EOF. |
1635 | | */ |
1636 | | static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) |
1637 | | |
1638 | 17.0k | { |
1639 | 17.0k | int oerrno = errno; |
1640 | 17.0k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1641 | | |
1642 | 17.0k | yy_flush_buffer( b , yyscanner); |
1643 | | |
1644 | 17.0k | b->yy_input_file = file; |
1645 | 17.0k | b->yy_fill_buffer = 1; |
1646 | | |
1647 | | /* If b is the current buffer, then yy_init_buffer was _probably_ |
1648 | | * called from yyrestart() or through yy_get_next_buffer. |
1649 | | * In that case, we don't want to reset the lineno or column. |
1650 | | */ |
1651 | 17.0k | if (b != YY_CURRENT_BUFFER){ |
1652 | 5.67k | b->yy_bs_lineno = 1; |
1653 | 5.67k | b->yy_bs_column = 0; |
1654 | 5.67k | } |
1655 | | |
1656 | 17.0k | b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; |
1657 | | |
1658 | 17.0k | errno = oerrno; |
1659 | 17.0k | } |
1660 | | |
1661 | | /** Discard all buffered characters. On the next scan, YY_INPUT will be called. |
1662 | | * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. |
1663 | | * @param yyscanner The scanner object. |
1664 | | */ |
1665 | | void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) |
1666 | 17.0k | { |
1667 | 17.0k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1668 | 17.0k | if ( ! b ) |
1669 | 0 | return; |
1670 | | |
1671 | 17.0k | b->yy_n_chars = 0; |
1672 | | |
1673 | | /* We always need two end-of-buffer characters. The first causes |
1674 | | * a transition to the end-of-buffer state. The second causes |
1675 | | * a jam in that state. |
1676 | | */ |
1677 | 17.0k | b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; |
1678 | 17.0k | b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; |
1679 | | |
1680 | 17.0k | b->yy_buf_pos = &b->yy_ch_buf[0]; |
1681 | | |
1682 | 17.0k | b->yy_at_bol = 1; |
1683 | 17.0k | b->yy_buffer_status = YY_BUFFER_NEW; |
1684 | | |
1685 | 17.0k | if ( b == YY_CURRENT_BUFFER ) |
1686 | 11.3k | yy_load_buffer_state( yyscanner ); |
1687 | 17.0k | } |
1688 | | |
1689 | | /** Pushes the new state onto the stack. The new state becomes |
1690 | | * the current state. This function will allocate the stack |
1691 | | * if necessary. |
1692 | | * @param new_buffer The new state. |
1693 | | * @param yyscanner The scanner object. |
1694 | | */ |
1695 | | void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) |
1696 | 0 | { |
1697 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1698 | 0 | if (new_buffer == NULL) |
1699 | 0 | return; |
1700 | | |
1701 | 0 | yyensure_buffer_stack(yyscanner); |
1702 | | |
1703 | | /* This block is copied from yy_switch_to_buffer. */ |
1704 | 0 | if ( YY_CURRENT_BUFFER ) |
1705 | 0 | { |
1706 | | /* Flush out information for old buffer. */ |
1707 | 0 | *yyg->yy_c_buf_p = yyg->yy_hold_char; |
1708 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; |
1709 | 0 | YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; |
1710 | 0 | } |
1711 | | |
1712 | | /* Only push if top exists. Otherwise, replace top. */ |
1713 | 0 | if (YY_CURRENT_BUFFER) |
1714 | 0 | yyg->yy_buffer_stack_top++; |
1715 | 0 | YY_CURRENT_BUFFER_LVALUE = new_buffer; |
1716 | | |
1717 | | /* copied from yy_switch_to_buffer. */ |
1718 | 0 | yy_load_buffer_state( yyscanner ); |
1719 | 0 | yyg->yy_did_buffer_switch_on_eof = 1; |
1720 | 0 | } |
1721 | | |
1722 | | /** Removes and deletes the top of the stack, if present. |
1723 | | * The next element becomes the new top. |
1724 | | * @param yyscanner The scanner object. |
1725 | | */ |
1726 | | void yypop_buffer_state (yyscan_t yyscanner) |
1727 | 5.67k | { |
1728 | 5.67k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1729 | 5.67k | if (!YY_CURRENT_BUFFER) |
1730 | 5.67k | return; |
1731 | | |
1732 | 0 | yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner); |
1733 | 0 | YY_CURRENT_BUFFER_LVALUE = NULL; |
1734 | 0 | if (yyg->yy_buffer_stack_top > 0) |
1735 | 0 | --yyg->yy_buffer_stack_top; |
1736 | |
|
1737 | 0 | if (YY_CURRENT_BUFFER) { |
1738 | 0 | yy_load_buffer_state( yyscanner ); |
1739 | 0 | yyg->yy_did_buffer_switch_on_eof = 1; |
1740 | 0 | } |
1741 | 0 | } |
1742 | | |
1743 | | /* Allocates the stack if it does not exist. |
1744 | | * Guarantees space for at least one push. |
1745 | | */ |
1746 | | static void yyensure_buffer_stack (yyscan_t yyscanner) |
1747 | 5.67k | { |
1748 | 5.67k | yy_size_t num_to_alloc; |
1749 | 5.67k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1750 | | |
1751 | 5.67k | if (!yyg->yy_buffer_stack) { |
1752 | | |
1753 | | /* First allocation is just for 2 elements, since we don't know if this |
1754 | | * scanner will even need a stack. We use 2 instead of 1 to avoid an |
1755 | | * immediate realloc on the next call. |
1756 | | */ |
1757 | 5.67k | num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ |
1758 | 5.67k | yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc |
1759 | 5.67k | (num_to_alloc * sizeof(struct yy_buffer_state*) |
1760 | 5.67k | , yyscanner); |
1761 | 5.67k | if ( ! yyg->yy_buffer_stack ) |
1762 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
1763 | | |
1764 | 5.67k | memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); |
1765 | | |
1766 | 5.67k | yyg->yy_buffer_stack_max = num_to_alloc; |
1767 | 5.67k | yyg->yy_buffer_stack_top = 0; |
1768 | 5.67k | return; |
1769 | 5.67k | } |
1770 | | |
1771 | 0 | if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ |
1772 | | |
1773 | | /* Increase the buffer to prepare for a possible push. */ |
1774 | 0 | yy_size_t grow_size = 8 /* arbitrary grow size */; |
1775 | |
|
1776 | 0 | num_to_alloc = yyg->yy_buffer_stack_max + grow_size; |
1777 | 0 | yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc |
1778 | 0 | (yyg->yy_buffer_stack, |
1779 | 0 | num_to_alloc * sizeof(struct yy_buffer_state*) |
1780 | 0 | , yyscanner); |
1781 | 0 | if ( ! yyg->yy_buffer_stack ) |
1782 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); |
1783 | | |
1784 | | /* zero only the new slots.*/ |
1785 | 0 | memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); |
1786 | 0 | yyg->yy_buffer_stack_max = num_to_alloc; |
1787 | 0 | } |
1788 | 0 | } |
1789 | | |
1790 | | /** Setup the input buffer state to scan directly from a user-specified character buffer. |
1791 | | * @param base the character buffer |
1792 | | * @param size the size in bytes of the character buffer |
1793 | | * @param yyscanner The scanner object. |
1794 | | * @return the newly allocated buffer state object. |
1795 | | */ |
1796 | | YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) |
1797 | 0 | { |
1798 | 0 | YY_BUFFER_STATE b; |
1799 | |
|
1800 | 0 | if ( size < 2 || |
1801 | 0 | base[size-2] != YY_END_OF_BUFFER_CHAR || |
1802 | 0 | base[size-1] != YY_END_OF_BUFFER_CHAR ) |
1803 | | /* They forgot to leave room for the EOB's. */ |
1804 | 0 | return NULL; |
1805 | | |
1806 | 0 | b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner ); |
1807 | 0 | if ( ! b ) |
1808 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); |
1809 | | |
1810 | 0 | b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ |
1811 | 0 | b->yy_buf_pos = b->yy_ch_buf = base; |
1812 | 0 | b->yy_is_our_buffer = 0; |
1813 | 0 | b->yy_input_file = NULL; |
1814 | 0 | b->yy_n_chars = b->yy_buf_size; |
1815 | 0 | b->yy_is_interactive = 0; |
1816 | 0 | b->yy_at_bol = 1; |
1817 | 0 | b->yy_fill_buffer = 0; |
1818 | 0 | b->yy_buffer_status = YY_BUFFER_NEW; |
1819 | |
|
1820 | 0 | yy_switch_to_buffer( b , yyscanner ); |
1821 | |
|
1822 | 0 | return b; |
1823 | 0 | } |
1824 | | |
1825 | | /** Setup the input buffer state to scan a string. The next call to yylex() will |
1826 | | * scan from a @e copy of @a str. |
1827 | | * @param yystr a NUL-terminated string to scan |
1828 | | * @param yyscanner The scanner object. |
1829 | | * @return the newly allocated buffer state object. |
1830 | | * @note If you want to scan bytes that may contain NUL values, then use |
1831 | | * yy_scan_bytes() instead. |
1832 | | */ |
1833 | | YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) |
1834 | 0 | { |
1835 | |
|
1836 | 0 | return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner); |
1837 | 0 | } |
1838 | | |
1839 | | /** Setup the input buffer state to scan the given bytes. The next call to yylex() will |
1840 | | * scan from a @e copy of @a bytes. |
1841 | | * @param yybytes the byte buffer to scan |
1842 | | * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. |
1843 | | * @param yyscanner The scanner object. |
1844 | | * @return the newly allocated buffer state object. |
1845 | | */ |
1846 | | YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) |
1847 | 0 | { |
1848 | 0 | YY_BUFFER_STATE b; |
1849 | 0 | char *buf; |
1850 | 0 | yy_size_t n; |
1851 | 0 | int i; |
1852 | | |
1853 | | /* Get memory for full buffer, including space for trailing EOB's. */ |
1854 | 0 | n = (yy_size_t) (_yybytes_len + 2); |
1855 | 0 | buf = (char *) yyalloc( n , yyscanner ); |
1856 | 0 | if ( ! buf ) |
1857 | 0 | YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); |
1858 | | |
1859 | 0 | for ( i = 0; i < _yybytes_len; ++i ) |
1860 | 0 | buf[i] = yybytes[i]; |
1861 | |
|
1862 | 0 | buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; |
1863 | |
|
1864 | 0 | b = yy_scan_buffer( buf, n , yyscanner); |
1865 | 0 | if ( ! b ) |
1866 | 0 | YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); |
1867 | | |
1868 | | /* It's okay to grow etc. this buffer, and we should throw it |
1869 | | * away when we're done. |
1870 | | */ |
1871 | 0 | b->yy_is_our_buffer = 1; |
1872 | |
|
1873 | 0 | return b; |
1874 | 0 | } |
1875 | | |
1876 | | #ifndef YY_EXIT_FAILURE |
1877 | 0 | #define YY_EXIT_FAILURE 2 |
1878 | | #endif |
1879 | | |
1880 | | static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) |
1881 | 0 | { |
1882 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1883 | 0 | (void)yyg; |
1884 | 0 | fprintf( stderr, "%s\n", msg ); |
1885 | 0 | exit( YY_EXIT_FAILURE ); |
1886 | 0 | } |
1887 | | |
1888 | | /* Redefine yyless() so it works in section 3 code. */ |
1889 | | |
1890 | | #undef yyless |
1891 | | #define yyless(n) \ |
1892 | | do \ |
1893 | | { \ |
1894 | | /* Undo effects of setting up yytext. */ \ |
1895 | | int yyless_macro_arg = (n); \ |
1896 | | YY_LESS_LINENO(yyless_macro_arg);\ |
1897 | | yytext[yyleng] = yyg->yy_hold_char; \ |
1898 | | yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ |
1899 | | yyg->yy_hold_char = *yyg->yy_c_buf_p; \ |
1900 | | *yyg->yy_c_buf_p = '\0'; \ |
1901 | | yyleng = yyless_macro_arg; \ |
1902 | | } \ |
1903 | | while ( 0 ) |
1904 | | |
1905 | | /* Accessor methods (get/set functions) to struct members. */ |
1906 | | |
1907 | | /** Get the user-defined data for this scanner. |
1908 | | * @param yyscanner The scanner object. |
1909 | | */ |
1910 | | YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner) |
1911 | 0 | { |
1912 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1913 | 0 | return yyextra; |
1914 | 0 | } |
1915 | | |
1916 | | /** Get the current line number. |
1917 | | * @param yyscanner The scanner object. |
1918 | | */ |
1919 | | int yyget_lineno (yyscan_t yyscanner) |
1920 | 0 | { |
1921 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1922 | |
|
1923 | 0 | if (! YY_CURRENT_BUFFER) |
1924 | 0 | return 0; |
1925 | | |
1926 | 0 | return yylineno; |
1927 | 0 | } |
1928 | | |
1929 | | /** Get the current column number. |
1930 | | * @param yyscanner The scanner object. |
1931 | | */ |
1932 | | int yyget_column (yyscan_t yyscanner) |
1933 | 0 | { |
1934 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1935 | |
|
1936 | 0 | if (! YY_CURRENT_BUFFER) |
1937 | 0 | return 0; |
1938 | | |
1939 | 0 | return yycolumn; |
1940 | 0 | } |
1941 | | |
1942 | | /** Get the input stream. |
1943 | | * @param yyscanner The scanner object. |
1944 | | */ |
1945 | | FILE *yyget_in (yyscan_t yyscanner) |
1946 | 0 | { |
1947 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1948 | 0 | return yyin; |
1949 | 0 | } |
1950 | | |
1951 | | /** Get the output stream. |
1952 | | * @param yyscanner The scanner object. |
1953 | | */ |
1954 | | FILE *yyget_out (yyscan_t yyscanner) |
1955 | 0 | { |
1956 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1957 | 0 | return yyout; |
1958 | 0 | } |
1959 | | |
1960 | | /** Get the length of the current token. |
1961 | | * @param yyscanner The scanner object. |
1962 | | */ |
1963 | | int yyget_leng (yyscan_t yyscanner) |
1964 | 0 | { |
1965 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1966 | 0 | return yyleng; |
1967 | 0 | } |
1968 | | |
1969 | | /** Get the current token. |
1970 | | * @param yyscanner The scanner object. |
1971 | | */ |
1972 | | |
1973 | | char *yyget_text (yyscan_t yyscanner) |
1974 | 0 | { |
1975 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1976 | 0 | return yytext; |
1977 | 0 | } |
1978 | | |
1979 | | /** Set the user-defined data. This data is never touched by the scanner. |
1980 | | * @param user_defined The data to be associated with this scanner. |
1981 | | * @param yyscanner The scanner object. |
1982 | | */ |
1983 | | void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) |
1984 | 5.67k | { |
1985 | 5.67k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1986 | 5.67k | yyextra = user_defined ; |
1987 | 5.67k | } |
1988 | | |
1989 | | /** Set the current line number. |
1990 | | * @param _line_number line number |
1991 | | * @param yyscanner The scanner object. |
1992 | | */ |
1993 | | void yyset_lineno (int _line_number , yyscan_t yyscanner) |
1994 | 0 | { |
1995 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
1996 | | |
1997 | | /* lineno is only valid if an input buffer exists. */ |
1998 | 0 | if (! YY_CURRENT_BUFFER ) |
1999 | 0 | YY_FATAL_ERROR( "yyset_lineno called with no buffer" ); |
2000 | | |
2001 | 0 | yylineno = _line_number; |
2002 | 0 | } |
2003 | | |
2004 | | /** Set the current column. |
2005 | | * @param _column_no column number |
2006 | | * @param yyscanner The scanner object. |
2007 | | */ |
2008 | | void yyset_column (int _column_no , yyscan_t yyscanner) |
2009 | 0 | { |
2010 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2011 | | |
2012 | | /* column is only valid if an input buffer exists. */ |
2013 | 0 | if (! YY_CURRENT_BUFFER ) |
2014 | 0 | YY_FATAL_ERROR( "yyset_column called with no buffer" ); |
2015 | | |
2016 | 0 | yycolumn = _column_no; |
2017 | 0 | } |
2018 | | |
2019 | | /** Set the input stream. This does not discard the current |
2020 | | * input buffer. |
2021 | | * @param _in_str A readable stream. |
2022 | | * @param yyscanner The scanner object. |
2023 | | * @see yy_switch_to_buffer |
2024 | | */ |
2025 | | void yyset_in (FILE * _in_str , yyscan_t yyscanner) |
2026 | 0 | { |
2027 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2028 | 0 | yyin = _in_str ; |
2029 | 0 | } |
2030 | | |
2031 | | void yyset_out (FILE * _out_str , yyscan_t yyscanner) |
2032 | 0 | { |
2033 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2034 | 0 | yyout = _out_str ; |
2035 | 0 | } |
2036 | | |
2037 | | int yyget_debug (yyscan_t yyscanner) |
2038 | 0 | { |
2039 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2040 | 0 | return yy_flex_debug; |
2041 | 0 | } |
2042 | | |
2043 | | void yyset_debug (int _bdebug , yyscan_t yyscanner) |
2044 | 0 | { |
2045 | 0 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2046 | 0 | yy_flex_debug = _bdebug ; |
2047 | 0 | } |
2048 | | |
2049 | | /* Accessor methods for yylval and yylloc */ |
2050 | | |
2051 | | /* User-visible API */ |
2052 | | |
2053 | | /* yylex_init is special because it creates the scanner itself, so it is |
2054 | | * the ONLY reentrant function that doesn't take the scanner as the last argument. |
2055 | | * That's why we explicitly handle the declaration, instead of using our macros. |
2056 | | */ |
2057 | | int yylex_init(yyscan_t* ptr_yy_globals) |
2058 | 5.67k | { |
2059 | 5.67k | if (ptr_yy_globals == NULL){ |
2060 | 0 | errno = EINVAL; |
2061 | 0 | return 1; |
2062 | 0 | } |
2063 | | |
2064 | 5.67k | *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); |
2065 | | |
2066 | 5.67k | if (*ptr_yy_globals == NULL){ |
2067 | 0 | errno = ENOMEM; |
2068 | 0 | return 1; |
2069 | 0 | } |
2070 | | |
2071 | | /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ |
2072 | 5.67k | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
2073 | | |
2074 | 5.67k | return yy_init_globals ( *ptr_yy_globals ); |
2075 | 5.67k | } |
2076 | | |
2077 | | /* yylex_init_extra has the same functionality as yylex_init, but follows the |
2078 | | * convention of taking the scanner as the last argument. Note however, that |
2079 | | * this is a *pointer* to a scanner, as it will be allocated by this call (and |
2080 | | * is the reason, too, why this function also must handle its own declaration). |
2081 | | * The user defined value in the first argument will be available to yyalloc in |
2082 | | * the yyextra field. |
2083 | | */ |
2084 | | int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals ) |
2085 | 0 | { |
2086 | 0 | struct yyguts_t dummy_yyguts; |
2087 | |
|
2088 | 0 | yyset_extra (yy_user_defined, &dummy_yyguts); |
2089 | |
|
2090 | 0 | if (ptr_yy_globals == NULL){ |
2091 | 0 | errno = EINVAL; |
2092 | 0 | return 1; |
2093 | 0 | } |
2094 | | |
2095 | 0 | *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); |
2096 | |
|
2097 | 0 | if (*ptr_yy_globals == NULL){ |
2098 | 0 | errno = ENOMEM; |
2099 | 0 | return 1; |
2100 | 0 | } |
2101 | | |
2102 | | /* By setting to 0xAA, we expose bugs in |
2103 | | yy_init_globals. Leave at 0x00 for releases. */ |
2104 | 0 | memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); |
2105 | |
|
2106 | 0 | yyset_extra (yy_user_defined, *ptr_yy_globals); |
2107 | |
|
2108 | 0 | return yy_init_globals ( *ptr_yy_globals ); |
2109 | 0 | } |
2110 | | |
2111 | | static int yy_init_globals (yyscan_t yyscanner) |
2112 | 11.3k | { |
2113 | 11.3k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2114 | | /* Initialization is the same as for the non-reentrant scanner. |
2115 | | * This function is called from yylex_destroy(), so don't allocate here. |
2116 | | */ |
2117 | | |
2118 | 11.3k | yyg->yy_buffer_stack = NULL; |
2119 | 11.3k | yyg->yy_buffer_stack_top = 0; |
2120 | 11.3k | yyg->yy_buffer_stack_max = 0; |
2121 | 11.3k | yyg->yy_c_buf_p = NULL; |
2122 | 11.3k | yyg->yy_init = 0; |
2123 | 11.3k | yyg->yy_start = 0; |
2124 | | |
2125 | 11.3k | yyg->yy_start_stack_ptr = 0; |
2126 | 11.3k | yyg->yy_start_stack_depth = 0; |
2127 | 11.3k | yyg->yy_start_stack = NULL; |
2128 | | |
2129 | | /* Defined in main.c */ |
2130 | | #ifdef YY_STDINIT |
2131 | | yyin = stdin; |
2132 | | yyout = stdout; |
2133 | | #else |
2134 | 11.3k | yyin = NULL; |
2135 | 11.3k | yyout = NULL; |
2136 | 11.3k | #endif |
2137 | | |
2138 | | /* For future reference: Set errno on error, since we are called by |
2139 | | * yylex_init() |
2140 | | */ |
2141 | 11.3k | return 0; |
2142 | 11.3k | } |
2143 | | |
2144 | | /* yylex_destroy is for both reentrant and non-reentrant scanners. */ |
2145 | | int yylex_destroy (yyscan_t yyscanner) |
2146 | 5.67k | { |
2147 | 5.67k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2148 | | |
2149 | | /* Pop the buffer stack, destroying each element. */ |
2150 | 11.3k | while(YY_CURRENT_BUFFER){ |
2151 | 5.67k | yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner ); |
2152 | 5.67k | YY_CURRENT_BUFFER_LVALUE = NULL; |
2153 | 5.67k | yypop_buffer_state(yyscanner); |
2154 | 5.67k | } |
2155 | | |
2156 | | /* Destroy the stack itself. */ |
2157 | 5.67k | yyfree(yyg->yy_buffer_stack , yyscanner); |
2158 | 5.67k | yyg->yy_buffer_stack = NULL; |
2159 | | |
2160 | | /* Destroy the start condition stack. */ |
2161 | 5.67k | yyfree( yyg->yy_start_stack , yyscanner ); |
2162 | 5.67k | yyg->yy_start_stack = NULL; |
2163 | | |
2164 | | /* Reset the globals. This is important in a non-reentrant scanner so the next time |
2165 | | * yylex() is called, initialization will occur. */ |
2166 | 5.67k | yy_init_globals( yyscanner); |
2167 | | |
2168 | | /* Destroy the main struct (reentrant only). */ |
2169 | 5.67k | yyfree ( yyscanner , yyscanner ); |
2170 | 5.67k | yyscanner = NULL; |
2171 | 5.67k | return 0; |
2172 | 5.67k | } |
2173 | | |
2174 | | /* |
2175 | | * Internal utility routines. |
2176 | | */ |
2177 | | |
2178 | | #ifndef yytext_ptr |
2179 | | static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner) |
2180 | | { |
2181 | | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2182 | | (void)yyg; |
2183 | | |
2184 | | int i; |
2185 | | for ( i = 0; i < n; ++i ) |
2186 | | s1[i] = s2[i]; |
2187 | | } |
2188 | | #endif |
2189 | | |
2190 | | #ifdef YY_NEED_STRLEN |
2191 | | static int yy_flex_strlen (const char * s , yyscan_t yyscanner) |
2192 | | { |
2193 | | int n; |
2194 | | for ( n = 0; s[n]; ++n ) |
2195 | | ; |
2196 | | |
2197 | | return n; |
2198 | | } |
2199 | | #endif |
2200 | | |
2201 | | void *yyalloc (yy_size_t size , yyscan_t yyscanner) |
2202 | 22.6k | { |
2203 | 22.6k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2204 | 22.6k | (void)yyg; |
2205 | 22.6k | return malloc(size); |
2206 | 22.6k | } |
2207 | | |
2208 | | void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) |
2209 | 324 | { |
2210 | 324 | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2211 | 324 | (void)yyg; |
2212 | | |
2213 | | /* The cast to (char *) in the following accommodates both |
2214 | | * implementations that use char* generic pointers, and those |
2215 | | * that use void* generic pointers. It works with the latter |
2216 | | * because both ANSI C and C++ allow castless assignment from |
2217 | | * any pointer type to void*, and deal with argument conversions |
2218 | | * as though doing an assignment. |
2219 | | */ |
2220 | 324 | return realloc(ptr, size); |
2221 | 324 | } |
2222 | | |
2223 | | void yyfree (void * ptr , yyscan_t yyscanner) |
2224 | 28.3k | { |
2225 | 28.3k | struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; |
2226 | 28.3k | (void)yyg; |
2227 | 28.3k | free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ |
2228 | 28.3k | } |
2229 | | |
2230 | | #define YYTABLES_NAME "yytables" |
2231 | | |
2232 | | /*--------------------------------------------------------------------------*/ |
2233 | | |
2234 | | #endif /* __clang_analyzer__ */ |