CMake Nightly Date Stamp
[kiteware-cmake.git] / Source / LexerParser / cmDependsJavaLexer.cxx
blobbfe7e64f0c394bcb4edb4a3082210889a1087809
1 #include "cmStandardLexer.h"
3 #define FLEXINT_H 1
4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
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
16 #ifdef yy_create_buffer
17 #define cmDependsJava_yy_create_buffer_ALREADY_DEFINED
18 #else
19 #define yy_create_buffer cmDependsJava_yy_create_buffer
20 #endif
22 #ifdef yy_delete_buffer
23 #define cmDependsJava_yy_delete_buffer_ALREADY_DEFINED
24 #else
25 #define yy_delete_buffer cmDependsJava_yy_delete_buffer
26 #endif
28 #ifdef yy_scan_buffer
29 #define cmDependsJava_yy_scan_buffer_ALREADY_DEFINED
30 #else
31 #define yy_scan_buffer cmDependsJava_yy_scan_buffer
32 #endif
34 #ifdef yy_scan_string
35 #define cmDependsJava_yy_scan_string_ALREADY_DEFINED
36 #else
37 #define yy_scan_string cmDependsJava_yy_scan_string
38 #endif
40 #ifdef yy_scan_bytes
41 #define cmDependsJava_yy_scan_bytes_ALREADY_DEFINED
42 #else
43 #define yy_scan_bytes cmDependsJava_yy_scan_bytes
44 #endif
46 #ifdef yy_init_buffer
47 #define cmDependsJava_yy_init_buffer_ALREADY_DEFINED
48 #else
49 #define yy_init_buffer cmDependsJava_yy_init_buffer
50 #endif
52 #ifdef yy_flush_buffer
53 #define cmDependsJava_yy_flush_buffer_ALREADY_DEFINED
54 #else
55 #define yy_flush_buffer cmDependsJava_yy_flush_buffer
56 #endif
58 #ifdef yy_load_buffer_state
59 #define cmDependsJava_yy_load_buffer_state_ALREADY_DEFINED
60 #else
61 #define yy_load_buffer_state cmDependsJava_yy_load_buffer_state
62 #endif
64 #ifdef yy_switch_to_buffer
65 #define cmDependsJava_yy_switch_to_buffer_ALREADY_DEFINED
66 #else
67 #define yy_switch_to_buffer cmDependsJava_yy_switch_to_buffer
68 #endif
70 #ifdef yypush_buffer_state
71 #define cmDependsJava_yypush_buffer_state_ALREADY_DEFINED
72 #else
73 #define yypush_buffer_state cmDependsJava_yypush_buffer_state
74 #endif
76 #ifdef yypop_buffer_state
77 #define cmDependsJava_yypop_buffer_state_ALREADY_DEFINED
78 #else
79 #define yypop_buffer_state cmDependsJava_yypop_buffer_state
80 #endif
82 #ifdef yyensure_buffer_stack
83 #define cmDependsJava_yyensure_buffer_stack_ALREADY_DEFINED
84 #else
85 #define yyensure_buffer_stack cmDependsJava_yyensure_buffer_stack
86 #endif
88 #ifdef yylex
89 #define cmDependsJava_yylex_ALREADY_DEFINED
90 #else
91 #define yylex cmDependsJava_yylex
92 #endif
94 #ifdef yyrestart
95 #define cmDependsJava_yyrestart_ALREADY_DEFINED
96 #else
97 #define yyrestart cmDependsJava_yyrestart
98 #endif
100 #ifdef yylex_init
101 #define cmDependsJava_yylex_init_ALREADY_DEFINED
102 #else
103 #define yylex_init cmDependsJava_yylex_init
104 #endif
106 #ifdef yylex_init_extra
107 #define cmDependsJava_yylex_init_extra_ALREADY_DEFINED
108 #else
109 #define yylex_init_extra cmDependsJava_yylex_init_extra
110 #endif
112 #ifdef yylex_destroy
113 #define cmDependsJava_yylex_destroy_ALREADY_DEFINED
114 #else
115 #define yylex_destroy cmDependsJava_yylex_destroy
116 #endif
118 #ifdef yyget_debug
119 #define cmDependsJava_yyget_debug_ALREADY_DEFINED
120 #else
121 #define yyget_debug cmDependsJava_yyget_debug
122 #endif
124 #ifdef yyset_debug
125 #define cmDependsJava_yyset_debug_ALREADY_DEFINED
126 #else
127 #define yyset_debug cmDependsJava_yyset_debug
128 #endif
130 #ifdef yyget_extra
131 #define cmDependsJava_yyget_extra_ALREADY_DEFINED
132 #else
133 #define yyget_extra cmDependsJava_yyget_extra
134 #endif
136 #ifdef yyset_extra
137 #define cmDependsJava_yyset_extra_ALREADY_DEFINED
138 #else
139 #define yyset_extra cmDependsJava_yyset_extra
140 #endif
142 #ifdef yyget_in
143 #define cmDependsJava_yyget_in_ALREADY_DEFINED
144 #else
145 #define yyget_in cmDependsJava_yyget_in
146 #endif
148 #ifdef yyset_in
149 #define cmDependsJava_yyset_in_ALREADY_DEFINED
150 #else
151 #define yyset_in cmDependsJava_yyset_in
152 #endif
154 #ifdef yyget_out
155 #define cmDependsJava_yyget_out_ALREADY_DEFINED
156 #else
157 #define yyget_out cmDependsJava_yyget_out
158 #endif
160 #ifdef yyset_out
161 #define cmDependsJava_yyset_out_ALREADY_DEFINED
162 #else
163 #define yyset_out cmDependsJava_yyset_out
164 #endif
166 #ifdef yyget_leng
167 #define cmDependsJava_yyget_leng_ALREADY_DEFINED
168 #else
169 #define yyget_leng cmDependsJava_yyget_leng
170 #endif
172 #ifdef yyget_text
173 #define cmDependsJava_yyget_text_ALREADY_DEFINED
174 #else
175 #define yyget_text cmDependsJava_yyget_text
176 #endif
178 #ifdef yyget_lineno
179 #define cmDependsJava_yyget_lineno_ALREADY_DEFINED
180 #else
181 #define yyget_lineno cmDependsJava_yyget_lineno
182 #endif
184 #ifdef yyset_lineno
185 #define cmDependsJava_yyset_lineno_ALREADY_DEFINED
186 #else
187 #define yyset_lineno cmDependsJava_yyset_lineno
188 #endif
190 #ifdef yyget_column
191 #define cmDependsJava_yyget_column_ALREADY_DEFINED
192 #else
193 #define yyget_column cmDependsJava_yyget_column
194 #endif
196 #ifdef yyset_column
197 #define cmDependsJava_yyset_column_ALREADY_DEFINED
198 #else
199 #define yyset_column cmDependsJava_yyset_column
200 #endif
202 #ifdef yywrap
203 #define cmDependsJava_yywrap_ALREADY_DEFINED
204 #else
205 #define yywrap cmDependsJava_yywrap
206 #endif
208 #ifdef yyalloc
209 #define cmDependsJava_yyalloc_ALREADY_DEFINED
210 #else
211 #define yyalloc cmDependsJava_yyalloc
212 #endif
214 #ifdef yyrealloc
215 #define cmDependsJava_yyrealloc_ALREADY_DEFINED
216 #else
217 #define yyrealloc cmDependsJava_yyrealloc
218 #endif
220 #ifdef yyfree
221 #define cmDependsJava_yyfree_ALREADY_DEFINED
222 #else
223 #define yyfree cmDependsJava_yyfree
224 #endif
226 /* First, we deal with platform-specific or compiler-specific issues. */
228 /* begin standard C headers. */
229 #include <stdio.h>
230 #include <string.h>
231 #include <errno.h>
232 #include <stdlib.h>
234 /* end standard C headers. */
236 /* flex integer type definitions */
238 #ifndef FLEXINT_H
239 #define FLEXINT_H
241 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
243 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
245 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
246 * if you want the limit (max/min) macros for int types.
248 #ifndef __STDC_LIMIT_MACROS
249 #define __STDC_LIMIT_MACROS 1
250 #endif
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;
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
296 #ifndef SIZE_MAX
297 #define SIZE_MAX (~(size_t)0)
298 #endif
300 #endif /* ! C99 */
302 #endif /* ! FLEXINT_H */
304 /* begin standard C++ headers. */
306 /* TODO: this is always defined, so inline it */
307 #define yyconst const
309 #if defined(__GNUC__) && __GNUC__ >= 3
310 #define yynoreturn __attribute__((__noreturn__))
311 #else
312 #define yynoreturn
313 #endif
315 /* Returned upon end-of-file. */
316 #define YY_NULL 0
318 /* Promotes a possibly negative, possibly signed char to an
319 * integer in range [0..255] for use as an array index.
321 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
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
329 /* For convenience, these vars (plus the bison vars far below)
330 are macros in the reentrant scanner. */
331 #define yyin yyg->yyin_r
332 #define yyout yyg->yyout_r
333 #define yyextra yyg->yyextra_r
334 #define yyleng yyg->yyleng_r
335 #define yytext yyg->yytext_r
336 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
337 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
338 #define yy_flex_debug yyg->yy_flex_debug_r
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.
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.
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 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
353 /* Special action meaning "start processing a new file". */
354 #define YY_NEW_FILE yyrestart( yyin , yyscanner )
355 #define YY_END_OF_BUFFER_CHAR 0
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.
364 #define YY_BUF_SIZE 32768
365 #else
366 #define YY_BUF_SIZE 16384
367 #endif /* __ia64__ */
368 #endif
370 /* The state buf must be large enough to hold one state per character in the main buffer.
372 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
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
379 #ifndef YY_TYPEDEF_YY_SIZE_T
380 #define YY_TYPEDEF_YY_SIZE_T
381 typedef size_t yy_size_t;
382 #endif
384 #define EOB_ACT_CONTINUE_SCAN 0
385 #define EOB_ACT_END_OF_FILE 1
386 #define EOB_ACT_LAST_MATCH 2
388 #define YY_LESS_LINENO(n)
389 #define YY_LINENO_REWIND_TO(ptr)
391 /* Return all but the first "n" matched characters back to the input stream. */
392 #define yyless(n) \
393 do \
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 */ \
403 while ( 0 )
404 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
406 #ifndef YY_STRUCT_YY_BUFFER_STATE
407 #define YY_STRUCT_YY_BUFFER_STATE
408 struct yy_buffer_state
410 FILE *yy_input_file;
412 char *yy_ch_buf; /* input buffer */
413 char *yy_buf_pos; /* current position in input buffer */
415 /* Size of input buffer in bytes, not including room for EOB
416 * characters.
418 int yy_buf_size;
420 /* Number of characters read into yy_ch_buf, not including EOB
421 * characters.
423 int yy_n_chars;
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.
429 int yy_is_our_buffer;
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.
436 int yy_is_interactive;
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.
442 int yy_at_bol;
444 int yy_bs_lineno; /**< The line count. */
445 int yy_bs_column; /**< The column count. */
447 /* Whether to try to fill the input buffer when we reach the
448 * end of it.
450 int yy_fill_buffer;
452 int yy_buffer_status;
454 #define YY_BUFFER_NEW 0
455 #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.
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.
466 #define YY_BUFFER_EOF_PENDING 2
469 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
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".
475 * Returns the top of the stack, or NULL.
477 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
478 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
479 : 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.
483 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
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 );
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)
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 );
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 );
506 #define yy_new_buffer yy_create_buffer
507 #define yy_set_interactive(is_interactive) \
509 if ( ! YY_CURRENT_BUFFER ){ \
510 yyensure_buffer_stack (yyscanner); \
511 YY_CURRENT_BUFFER_LVALUE = \
512 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
514 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
516 #define yy_set_bol(at_bol) \
518 if ( ! YY_CURRENT_BUFFER ){\
519 yyensure_buffer_stack (yyscanner); \
520 YY_CURRENT_BUFFER_LVALUE = \
521 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
523 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
525 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
527 /* Begin user sect3 */
529 #define cmDependsJava_yywrap(yyscanner) (/*CONSTCOND*/1)
530 #define YY_SKIP_YYWRAP
531 typedef flex_uint8_t YY_CHAR;
533 typedef int yy_state_type;
535 #define yytext_ptr yytext_r
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 );
542 /* Done after the current pattern has been matched and before the
543 * corresponding action - sets up yytext.
545 #define YY_DO_BEFORE_ACTION \
546 yyg->yytext_ptr = yy_bp; \
547 yyleng = (int) (yy_cp - yy_bp); \
548 yyg->yy_hold_char = *yy_cp; \
549 *yy_cp = '\0'; \
550 yyg->yy_c_buf_p = yy_cp;
551 #define YY_NUM_RULES 111
552 #define YY_END_OF_BUFFER 112
553 /* This struct is not used in this scanner,
554 but its presence is necessary. */
555 struct yy_trans_info
557 flex_int32_t yy_verify;
558 flex_int32_t yy_nxt;
560 static const flex_int16_t yy_accept[327] =
561 { 0,
562 0, 0, 0, 0, 0, 0, 112, 110, 109, 109,
563 77, 4, 73, 94, 60, 110, 93, 92, 105, 99,
564 68, 89, 74, 71, 56, 56, 67, 103, 86, 75,
565 79, 102, 107, 64, 63, 65, 107, 107, 107, 107,
566 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
567 107, 70, 96, 69, 104, 3, 3, 6, 111, 5,
568 78, 95, 61, 62, 0, 0, 106, 101, 100, 91,
569 90, 57, 1, 0, 72, 57, 56, 57, 0, 56,
570 0, 88, 87, 76, 80, 81, 107, 66, 107, 107,
571 107, 107, 107, 107, 107, 107, 107, 107, 18, 107,
573 107, 107, 107, 107, 107, 26, 107, 107, 107, 107,
574 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
575 107, 107, 107, 107, 107, 97, 98, 2, 55, 55,
576 0, 0, 0, 108, 57, 0, 57, 58, 85, 82,
577 83, 107, 107, 107, 107, 107, 107, 107, 107, 107,
578 107, 107, 107, 107, 107, 107, 107, 107, 25, 107,
579 107, 30, 107, 107, 34, 107, 107, 107, 107, 107,
580 107, 107, 107, 107, 107, 107, 107, 107, 107, 107,
581 107, 50, 107, 107, 107, 0, 0, 58, 84, 107,
582 107, 107, 107, 11, 12, 107, 14, 107, 107, 107,
584 107, 20, 107, 107, 107, 107, 107, 107, 107, 107,
585 32, 107, 59, 107, 107, 107, 107, 107, 107, 107,
586 107, 107, 107, 107, 46, 107, 107, 54, 51, 107,
587 107, 107, 107, 107, 10, 13, 15, 107, 107, 107,
588 107, 22, 24, 107, 107, 107, 107, 107, 107, 107,
589 107, 107, 107, 40, 107, 107, 43, 107, 107, 47,
590 107, 107, 53, 107, 8, 107, 107, 107, 19, 107,
591 107, 107, 28, 107, 107, 33, 107, 107, 107, 38,
592 39, 41, 107, 44, 107, 48, 107, 107, 107, 9,
593 107, 17, 21, 23, 107, 107, 107, 35, 36, 107,
595 107, 107, 107, 107, 7, 16, 107, 107, 107, 107,
596 42, 107, 107, 52, 107, 107, 31, 37, 107, 49,
597 27, 29, 107, 107, 45, 0
600 static const YY_CHAR yy_ec[256] =
601 { 0,
602 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
603 1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
604 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
605 1, 2, 4, 5, 1, 6, 7, 8, 9, 10,
606 11, 12, 13, 14, 15, 16, 17, 18, 19, 19,
607 19, 19, 19, 19, 19, 20, 20, 21, 22, 23,
608 24, 25, 26, 1, 27, 27, 27, 28, 29, 28,
609 30, 30, 30, 30, 30, 31, 30, 30, 30, 30,
610 30, 30, 30, 30, 30, 30, 30, 32, 30, 30,
611 33, 34, 35, 36, 30, 1, 37, 38, 39, 40,
613 41, 42, 43, 44, 45, 30, 46, 47, 48, 49,
614 50, 51, 30, 52, 53, 54, 55, 56, 57, 58,
615 59, 60, 61, 62, 63, 64, 1, 1, 1, 1,
616 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
617 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
618 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
619 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
620 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
621 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
622 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
624 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
625 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
626 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
627 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
628 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
629 1, 1, 1, 1, 1
632 static const YY_CHAR yy_meta[65] =
633 { 0,
634 1, 1, 1, 1, 1, 1, 1, 1, 2, 1,
635 1, 1, 1, 1, 1, 1, 1, 3, 3, 3,
636 1, 1, 1, 1, 1, 1, 3, 3, 3, 4,
637 4, 4, 1, 1, 1, 1, 3, 3, 3, 3,
638 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
639 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
640 1, 1, 1, 1
643 static const flex_int16_t yy_base[334] =
644 { 0,
645 0, 0, 401, 400, 62, 63, 411, 414, 414, 414,
646 386, 414, 414, 385, 61, 374, 414, 414, 383, 57,
647 414, 56, 54, 65, 74, 43, 414, 414, 55, 382,
648 59, 414, 0, 414, 414, 381, 38, 36, 60, 46,
649 51, 75, 69, 354, 82, 76, 362, 85, 56, 352,
650 357, 414, 100, 414, 414, 414, 383, 414, 414, 414,
651 414, 414, 414, 414, 390, 127, 414, 414, 414, 414,
652 414, 129, 414, 395, 414, 132, 95, 414, 165, 414,
653 0, 373, 414, 414, 414, 109, 0, 414, 343, 342,
654 344, 352, 338, 101, 354, 353, 340, 346, 332, 333,
656 331, 337, 334, 332, 329, 0, 329, 110, 330, 324,
657 320, 329, 336, 93, 336, 319, 322, 89, 320, 325,
658 320, 114, 131, 120, 323, 414, 414, 414, 414, 358,
659 170, 357, 362, 414, 173, 157, 176, 150, 414, 414,
660 340, 309, 321, 314, 323, 318, 317, 318, 304, 302,
661 300, 316, 314, 310, 309, 296, 311, 310, 0, 153,
662 292, 304, 301, 298, 0, 295, 295, 284, 285, 291,
663 282, 284, 281, 289, 292, 278, 292, 277, 279, 279,
664 286, 0, 286, 288, 277, 189, 314, 414, 414, 270,
665 269, 279, 273, 0, 0, 274, 0, 264, 271, 260,
667 267, 0, 264, 271, 264, 256, 268, 256, 270, 254,
668 0, 249, 0, 267, 266, 261, 256, 248, 245, 253,
669 258, 244, 256, 250, 0, 236, 239, 0, 0, 237,
670 249, 252, 234, 250, 0, 0, 0, 237, 238, 243,
671 243, 235, 0, 233, 226, 230, 236, 236, 233, 221,
672 235, 234, 223, 0, 232, 216, 0, 225, 216, 214,
673 221, 220, 0, 225, 0, 214, 207, 207, 0, 207,
674 200, 217, 0, 218, 219, 0, 214, 213, 199, 0,
675 0, 0, 210, 0, 201, 0, 209, 202, 194, 0,
676 206, 0, 0, 0, 197, 204, 205, 0, 0, 202,
678 191, 192, 191, 198, 0, 0, 163, 162, 170, 170,
679 0, 164, 152, 0, 152, 157, 0, 0, 127, 0,
680 0, 0, 115, 95, 0, 414, 218, 222, 226, 228,
681 232, 96, 235
684 static const flex_int16_t yy_def[334] =
685 { 0,
686 326, 1, 327, 327, 328, 328, 326, 326, 326, 326,
687 326, 326, 326, 326, 326, 329, 326, 326, 326, 326,
688 326, 326, 326, 326, 326, 25, 326, 326, 326, 326,
689 326, 326, 330, 326, 326, 326, 330, 330, 330, 330,
690 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
691 330, 326, 326, 326, 326, 326, 326, 326, 326, 326,
692 326, 326, 326, 326, 326, 329, 326, 326, 326, 326,
693 326, 326, 326, 331, 326, 326, 25, 326, 326, 326,
694 332, 326, 326, 326, 326, 326, 330, 326, 330, 330,
695 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
697 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
698 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
699 330, 330, 330, 330, 330, 326, 326, 326, 326, 326,
700 326, 333, 331, 326, 326, 326, 326, 332, 326, 326,
701 326, 330, 330, 330, 330, 330, 330, 330, 330, 330,
702 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
703 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
704 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
705 330, 330, 330, 330, 330, 326, 333, 326, 326, 330,
706 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
708 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
709 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
710 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
711 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
712 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
713 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
714 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
715 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
716 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
717 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
719 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
720 330, 330, 330, 330, 330, 330, 330, 330, 330, 330,
721 330, 330, 330, 330, 330, 0, 326, 326, 326, 326,
722 326, 326, 326
725 static const flex_int16_t yy_nxt[479] =
726 { 0,
727 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
728 18, 19, 20, 21, 22, 23, 24, 25, 26, 26,
729 27, 28, 29, 30, 31, 32, 33, 33, 33, 33,
730 33, 33, 34, 8, 35, 36, 37, 38, 39, 40,
731 41, 42, 33, 33, 43, 33, 44, 33, 45, 33,
732 46, 47, 48, 49, 33, 50, 51, 33, 33, 33,
733 52, 53, 54, 55, 59, 59, 60, 60, 63, 68,
734 70, 72, 72, 72, 326, 89, 73, 82, 83, 71,
735 69, 74, 85, 86, 64, 91, 98, 92, 75, 76,
736 90, 77, 77, 77, 93, 99, 94, 100, 138, 122,
738 326, 78, 79, 95, 80, 81, 96, 123, 101, 97,
739 106, 102, 113, 78, 79, 78, 107, 108, 110, 103,
740 80, 104, 111, 126, 105, 173, 326, 114, 117, 326,
741 115, 81, 140, 141, 325, 130, 112, 168, 118, 119,
742 174, 120, 169, 121, 131, 131, 72, 72, 72, 135,
743 135, 135, 326, 147, 148, 324, 78, 79, 178, 78,
744 79, 127, 161, 162, 183, 179, 184, 180, 78, 79,
745 78, 78, 79, 78, 137, 137, 137, 136, 129, 136,
746 188, 132, 137, 137, 137, 181, 323, 186, 186, 182,
747 135, 135, 135, 137, 137, 137, 188, 129, 322, 207,
749 78, 79, 208, 78, 321, 320, 186, 186, 319, 318,
750 317, 316, 78, 79, 78, 78, 315, 78, 56, 56,
751 56, 56, 58, 58, 58, 58, 65, 65, 65, 65,
752 87, 87, 133, 133, 133, 133, 187, 187, 314, 313,
753 312, 311, 310, 309, 308, 307, 306, 305, 304, 303,
754 302, 301, 300, 299, 298, 297, 296, 295, 294, 293,
755 292, 291, 290, 289, 288, 287, 286, 285, 284, 283,
756 282, 281, 280, 279, 278, 277, 276, 275, 274, 273,
757 272, 271, 270, 269, 268, 267, 266, 265, 264, 263,
758 262, 261, 260, 259, 258, 257, 256, 255, 254, 253,
760 252, 251, 250, 249, 248, 247, 246, 245, 244, 243,
761 242, 228, 241, 240, 239, 238, 237, 236, 235, 234,
762 233, 232, 129, 231, 230, 229, 228, 227, 226, 225,
763 224, 223, 222, 221, 220, 219, 218, 217, 216, 215,
764 214, 213, 212, 211, 210, 209, 206, 205, 204, 203,
765 202, 201, 200, 199, 198, 197, 196, 195, 194, 193,
766 192, 191, 190, 189, 134, 129, 129, 185, 177, 176,
767 175, 172, 171, 170, 167, 166, 165, 164, 163, 160,
768 159, 158, 157, 156, 155, 154, 153, 152, 151, 150,
769 149, 146, 145, 144, 143, 142, 139, 134, 129, 128,
771 125, 124, 116, 109, 88, 84, 67, 66, 62, 61,
772 326, 57, 57, 7, 326, 326, 326, 326, 326, 326,
773 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
774 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
775 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
776 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
777 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
778 326, 326, 326, 326, 326, 326, 326, 326
781 static const flex_int16_t yy_chk[479] =
782 { 0,
783 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
784 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
785 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
786 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
787 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
788 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
789 1, 1, 1, 1, 5, 6, 5, 6, 15, 20,
790 22, 23, 23, 23, 26, 37, 24, 29, 29, 22,
791 20, 24, 31, 31, 15, 38, 40, 38, 24, 25,
792 37, 25, 25, 25, 38, 40, 39, 41, 332, 49,
794 26, 25, 25, 39, 25, 25, 39, 49, 41, 39,
795 43, 42, 46, 25, 25, 25, 43, 43, 45, 42,
796 25, 42, 45, 53, 42, 118, 77, 46, 48, 66,
797 46, 25, 86, 86, 324, 66, 45, 114, 48, 48,
798 118, 48, 114, 48, 66, 66, 72, 72, 72, 76,
799 76, 76, 77, 94, 94, 323, 72, 72, 122, 76,
800 76, 53, 108, 108, 124, 122, 124, 123, 72, 72,
801 72, 76, 76, 76, 136, 136, 136, 79, 131, 79,
802 138, 66, 79, 79, 79, 123, 319, 131, 131, 123,
803 135, 135, 135, 137, 137, 137, 138, 186, 316, 160,
805 135, 135, 160, 137, 315, 313, 186, 186, 312, 310,
806 309, 308, 135, 135, 135, 137, 307, 137, 327, 327,
807 327, 327, 328, 328, 328, 328, 329, 329, 329, 329,
808 330, 330, 331, 331, 331, 331, 333, 333, 304, 303,
809 302, 301, 300, 297, 296, 295, 291, 289, 288, 287,
810 285, 283, 279, 278, 277, 275, 274, 272, 271, 270,
811 268, 267, 266, 264, 262, 261, 260, 259, 258, 256,
812 255, 253, 252, 251, 250, 249, 248, 247, 246, 245,
813 244, 242, 241, 240, 239, 238, 234, 233, 232, 231,
814 230, 227, 226, 224, 223, 222, 221, 220, 219, 218,
816 217, 216, 215, 214, 212, 210, 209, 208, 207, 206,
817 205, 204, 203, 201, 200, 199, 198, 196, 193, 192,
818 191, 190, 187, 185, 184, 183, 181, 180, 179, 178,
819 177, 176, 175, 174, 173, 172, 171, 170, 169, 168,
820 167, 166, 164, 163, 162, 161, 158, 157, 156, 155,
821 154, 153, 152, 151, 150, 149, 148, 147, 146, 145,
822 144, 143, 142, 141, 133, 132, 130, 125, 121, 120,
823 119, 117, 116, 115, 113, 112, 111, 110, 109, 107,
824 105, 104, 103, 102, 101, 100, 99, 98, 97, 96,
825 95, 93, 92, 91, 90, 89, 82, 74, 65, 57,
827 51, 50, 47, 44, 36, 30, 19, 16, 14, 11,
828 7, 4, 3, 326, 326, 326, 326, 326, 326, 326,
829 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
830 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
831 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
832 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
833 326, 326, 326, 326, 326, 326, 326, 326, 326, 326,
834 326, 326, 326, 326, 326, 326, 326, 326
837 /* The intent behind this definition is that it'll catch
838 * any uses of REJECT which flex missed.
840 #define REJECT reject_used_but_not_detected
841 #define yymore() yymore_used_but_not_detected
842 #define YY_MORE_ADJ 0
843 #define YY_RESTORE_YY_MORE_OFFSET
844 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
845 file Copyright.txt or https://cmake.org/licensing for details. */
848 This file must be translated to C++ and modified to build everywhere.
850 Run flex >= 2.6 like this:
852 flex --nounistd -DFLEXINT_H --noline --header-file=cmDependsJavaLexer.h -ocmDependsJavaLexer.cxx cmDependsJavaLexer.in.l
854 Modify cmDependsJavaLexer.cxx:
855 - remove trailing whitespace: sed -i 's/\s*$//' cmDependsJavaLexer.h cmDependsJavaLexer.cxx
856 - remove blank lines at end of file: sed -i '${/^$/d;}' cmDependsJavaLexer.h cmDependsJavaLexer.cxx
857 - #include "cmStandardLexer.h" at the top: sed -i '1i#include "cmStandardLexer.h"' cmDependsJavaLexer.cxx
861 /* IWYU pragma: no_forward_declare yyguts_t */
863 #ifndef __clang_analyzer__ /* Suppress clang-analyzer warnings */
865 #include <iostream>
867 #include "cmDependsJavaParserHelper.h"
869 /* Replace the lexer input function. */
870 #undef YY_INPUT
871 #define YY_INPUT(buf, result, max_size) \
872 do { result = yyextra->LexInput(buf, max_size); } while (0)
874 /* Include the set of tokens from the parser. */
875 #include "cmDependsJavaParserTokens.h"
877 #define KEYWORD yylvalp->str = 0
878 #define SYMBOL yylvalp->str = 0
879 #define PRIMITIVE yylvalp->str = 0
881 /*--------------------------------------------------------------------------*/
883 #define INITIAL 0
884 #define comment 1
885 #define string 2
887 #ifndef YY_EXTRA_TYPE
888 #define YY_EXTRA_TYPE void *
889 #endif
891 /* Holds the entire state of the reentrant scanner. */
892 struct yyguts_t
895 /* User-defined. Not touched by flex. */
896 YY_EXTRA_TYPE yyextra_r;
898 /* The rest are the same as the globals declared in the non-reentrant scanner. */
899 FILE *yyin_r, *yyout_r;
900 size_t yy_buffer_stack_top; /**< index of top of stack. */
901 size_t yy_buffer_stack_max; /**< capacity of stack. */
902 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
903 char yy_hold_char;
904 int yy_n_chars;
905 int yyleng_r;
906 char *yy_c_buf_p;
907 int yy_init;
908 int yy_start;
909 int yy_did_buffer_switch_on_eof;
910 int yy_start_stack_ptr;
911 int yy_start_stack_depth;
912 int *yy_start_stack;
913 yy_state_type yy_last_accepting_state;
914 char* yy_last_accepting_cpos;
916 int yylineno_r;
917 int yy_flex_debug_r;
919 char *yytext_r;
920 int yy_more_flag;
921 int yy_more_len;
923 }; /* end struct yyguts_t */
925 static int yy_init_globals ( yyscan_t yyscanner );
927 int yylex_init (yyscan_t* scanner);
929 int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
931 /* Accessor methods to globals.
932 These are made visible to non-reentrant scanners for convenience. */
934 int yylex_destroy ( yyscan_t yyscanner );
936 int yyget_debug ( yyscan_t yyscanner );
938 void yyset_debug ( int debug_flag , yyscan_t yyscanner );
940 YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
942 void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
944 FILE *yyget_in ( yyscan_t yyscanner );
946 void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
948 FILE *yyget_out ( yyscan_t yyscanner );
950 void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
952 int yyget_leng ( yyscan_t yyscanner );
954 char *yyget_text ( yyscan_t yyscanner );
956 int yyget_lineno ( yyscan_t yyscanner );
958 void yyset_lineno ( int _line_number , yyscan_t yyscanner );
960 int yyget_column ( yyscan_t yyscanner );
962 void yyset_column ( int _column_no , yyscan_t yyscanner );
964 /* Macros after this point can all be overridden by user definitions in
965 * section 1.
968 #ifndef YY_SKIP_YYWRAP
969 #ifdef __cplusplus
970 extern "C" int yywrap ( yyscan_t yyscanner );
971 #else
972 extern int yywrap ( yyscan_t yyscanner );
973 #endif
974 #endif
976 #ifndef YY_NO_UNPUT
978 static void yyunput ( int c, char *buf_ptr , yyscan_t yyscanner);
980 #endif
982 #ifndef yytext_ptr
983 static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
984 #endif
986 #ifdef YY_NEED_STRLEN
987 static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
988 #endif
990 #ifndef YY_NO_INPUT
991 #ifdef __cplusplus
992 static int yyinput ( yyscan_t yyscanner );
993 #else
994 static int input ( yyscan_t yyscanner );
995 #endif
997 #endif
999 /* Amount of stuff to slurp up with each read. */
1000 #ifndef YY_READ_BUF_SIZE
1001 #ifdef __ia64__
1002 /* On IA-64, the buffer size is 16k, not 8k */
1003 #define YY_READ_BUF_SIZE 16384
1004 #else
1005 #define YY_READ_BUF_SIZE 8192
1006 #endif /* __ia64__ */
1007 #endif
1009 /* Copy whatever the last rule matched to the standard output. */
1010 #ifndef ECHO
1011 /* This used to be an fputs(), but since the string might contain NUL's,
1012 * we now use fwrite().
1014 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1015 #endif
1017 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1018 * is returned in "result".
1020 #ifndef YY_INPUT
1021 #define YY_INPUT(buf,result,max_size) \
1022 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1024 int c = '*'; \
1025 int n; \
1026 for ( n = 0; n < max_size && \
1027 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1028 buf[n] = (char) c; \
1029 if ( c == '\n' ) \
1030 buf[n++] = (char) c; \
1031 if ( c == EOF && ferror( yyin ) ) \
1032 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1033 result = n; \
1035 else \
1037 errno=0; \
1038 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1040 if( errno != EINTR) \
1042 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1043 break; \
1045 errno=0; \
1046 clearerr(yyin); \
1051 #endif
1053 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1054 * we don't want an extra ';' after the "return" because that will cause
1055 * some compilers to complain about unreachable statements.
1057 #ifndef yyterminate
1058 #define yyterminate() return YY_NULL
1059 #endif
1061 /* Number of entries by which start-condition stack grows. */
1062 #ifndef YY_START_STACK_INCR
1063 #define YY_START_STACK_INCR 25
1064 #endif
1066 /* Report a fatal error. */
1067 #ifndef YY_FATAL_ERROR
1068 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1069 #endif
1071 /* end tables serialization structures and prototypes */
1073 /* Default declaration of generated scanner - a define so the user can
1074 * easily add parameters.
1076 #ifndef YY_DECL
1077 #define YY_DECL_IS_OURS 1
1079 extern int yylex (yyscan_t yyscanner);
1081 #define YY_DECL int yylex (yyscan_t yyscanner)
1082 #endif /* !YY_DECL */
1084 /* Code executed at the beginning of each rule, after yytext and yyleng
1085 * have been set up.
1087 #ifndef YY_USER_ACTION
1088 #define YY_USER_ACTION
1089 #endif
1091 /* Code executed at the end of each rule. */
1092 #ifndef YY_BREAK
1093 #define YY_BREAK /*LINTED*/break;
1094 #endif
1096 #define YY_RULE_SETUP \
1097 YY_USER_ACTION
1099 /** The main scanner function which does all the work.
1101 YY_DECL
1103 yy_state_type yy_current_state;
1104 char *yy_cp, *yy_bp;
1105 int yy_act;
1106 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1108 if ( !yyg->yy_init )
1110 yyg->yy_init = 1;
1112 #ifdef YY_USER_INIT
1113 YY_USER_INIT;
1114 #endif
1116 if ( ! yyg->yy_start )
1117 yyg->yy_start = 1; /* first start state */
1119 if ( ! yyin )
1120 yyin = stdin;
1122 if ( ! yyout )
1123 yyout = stdout;
1125 if ( ! YY_CURRENT_BUFFER ) {
1126 yyensure_buffer_stack (yyscanner);
1127 YY_CURRENT_BUFFER_LVALUE =
1128 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1131 yy_load_buffer_state( yyscanner );
1136 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1138 yy_cp = yyg->yy_c_buf_p;
1140 /* Support of yytext. */
1141 *yy_cp = yyg->yy_hold_char;
1143 /* yy_bp points to the position in yy_ch_buf of the start of
1144 * the current run.
1146 yy_bp = yy_cp;
1148 yy_current_state = yyg->yy_start;
1149 yy_match:
1152 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1153 if ( yy_accept[yy_current_state] )
1155 yyg->yy_last_accepting_state = yy_current_state;
1156 yyg->yy_last_accepting_cpos = yy_cp;
1158 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1160 yy_current_state = (int) yy_def[yy_current_state];
1161 if ( yy_current_state >= 327 )
1162 yy_c = yy_meta[yy_c];
1164 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1165 ++yy_cp;
1167 while ( yy_base[yy_current_state] != 414 );
1169 yy_find_action:
1170 yy_act = yy_accept[yy_current_state];
1171 if ( yy_act == 0 )
1172 { /* have to back up */
1173 yy_cp = yyg->yy_last_accepting_cpos;
1174 yy_current_state = yyg->yy_last_accepting_state;
1175 yy_act = yy_accept[yy_current_state];
1178 YY_DO_BEFORE_ACTION;
1180 do_action: /* This label is used only to access EOF actions. */
1182 switch ( yy_act )
1183 { /* beginning of action switch */
1184 case 0: /* must back up */
1185 /* undo the effects of YY_DO_BEFORE_ACTION */
1186 *yy_cp = yyg->yy_hold_char;
1187 yy_cp = yyg->yy_last_accepting_cpos;
1188 yy_current_state = yyg->yy_last_accepting_state;
1189 goto yy_find_action;
1191 case 1:
1192 YY_RULE_SETUP
1193 { BEGIN(comment); }
1194 YY_BREAK
1195 case 2:
1196 YY_RULE_SETUP
1197 { BEGIN(INITIAL); }
1198 YY_BREAK
1199 case 3:
1200 /* rule 3 can match eol */
1201 YY_RULE_SETUP
1203 YY_BREAK
1204 case 4:
1205 YY_RULE_SETUP
1206 { BEGIN(string); }
1207 YY_BREAK
1208 case 5:
1209 YY_RULE_SETUP
1210 { BEGIN(INITIAL); return jp_STRINGLITERAL; }
1211 YY_BREAK
1212 case 6:
1213 YY_RULE_SETUP
1215 YY_BREAK
1216 case 7:
1217 YY_RULE_SETUP
1218 { KEYWORD; return jp_ABSTRACT; }
1219 YY_BREAK
1220 case 8:
1221 YY_RULE_SETUP
1222 { KEYWORD; return jp_ASSERT; }
1223 YY_BREAK
1224 case 9:
1225 YY_RULE_SETUP
1226 { KEYWORD; return jp_BOOLEAN_TYPE; }
1227 YY_BREAK
1228 case 10:
1229 YY_RULE_SETUP
1230 { KEYWORD; return jp_BREAK; }
1231 YY_BREAK
1232 case 11:
1233 YY_RULE_SETUP
1234 { KEYWORD; return jp_BYTE_TYPE; }
1235 YY_BREAK
1236 case 12:
1237 YY_RULE_SETUP
1238 { KEYWORD; return jp_CASE; }
1239 YY_BREAK
1240 case 13:
1241 YY_RULE_SETUP
1242 { KEYWORD; return jp_CATCH; }
1243 YY_BREAK
1244 case 14:
1245 YY_RULE_SETUP
1246 { KEYWORD; return jp_CHAR_TYPE; }
1247 YY_BREAK
1248 case 15:
1249 YY_RULE_SETUP
1250 { KEYWORD; return jp_CLASS; }
1251 YY_BREAK
1252 case 16:
1253 YY_RULE_SETUP
1254 { KEYWORD; return jp_CONTINUE; }
1255 YY_BREAK
1256 case 17:
1257 YY_RULE_SETUP
1258 { KEYWORD; return jp_DEFAULT; }
1259 YY_BREAK
1260 case 18:
1261 YY_RULE_SETUP
1262 { KEYWORD; return jp_DO; }
1263 YY_BREAK
1264 case 19:
1265 YY_RULE_SETUP
1266 { KEYWORD; return jp_DOUBLE_TYPE; }
1267 YY_BREAK
1268 case 20:
1269 YY_RULE_SETUP
1270 { KEYWORD; return jp_ELSE; }
1271 YY_BREAK
1272 case 21:
1273 YY_RULE_SETUP
1274 { KEYWORD; return jp_EXTENDS; }
1275 YY_BREAK
1276 case 22:
1277 YY_RULE_SETUP
1278 { KEYWORD; return jp_FINAL; }
1279 YY_BREAK
1280 case 23:
1281 YY_RULE_SETUP
1282 { KEYWORD; return jp_FINALLY; }
1283 YY_BREAK
1284 case 24:
1285 YY_RULE_SETUP
1286 { KEYWORD; return jp_FLOAT_TYPE; }
1287 YY_BREAK
1288 case 25:
1289 YY_RULE_SETUP
1290 { KEYWORD; return jp_FOR; }
1291 YY_BREAK
1292 case 26:
1293 YY_RULE_SETUP
1294 { KEYWORD; return jp_IF; }
1295 YY_BREAK
1296 case 27:
1297 YY_RULE_SETUP
1298 { KEYWORD; return jp_IMPLEMENTS; }
1299 YY_BREAK
1300 case 28:
1301 YY_RULE_SETUP
1302 { KEYWORD; return jp_IMPORT; }
1303 YY_BREAK
1304 case 29:
1305 YY_RULE_SETUP
1306 { KEYWORD; return jp_INSTANCEOF; }
1307 YY_BREAK
1308 case 30:
1309 YY_RULE_SETUP
1310 { KEYWORD; return jp_INT_TYPE; }
1311 YY_BREAK
1312 case 31:
1313 YY_RULE_SETUP
1314 { KEYWORD; return jp_INTERFACE; }
1315 YY_BREAK
1316 case 32:
1317 YY_RULE_SETUP
1318 { KEYWORD; return jp_LONG_TYPE; }
1319 YY_BREAK
1320 case 33:
1321 YY_RULE_SETUP
1322 { KEYWORD; return jp_NATIVE; }
1323 YY_BREAK
1324 case 34:
1325 YY_RULE_SETUP
1326 { KEYWORD; return jp_NEW; }
1327 YY_BREAK
1328 case 35:
1329 YY_RULE_SETUP
1330 { KEYWORD; return jp_PACKAGE; }
1331 YY_BREAK
1332 case 36:
1333 YY_RULE_SETUP
1334 { KEYWORD; return jp_PRIVATE; }
1335 YY_BREAK
1336 case 37:
1337 YY_RULE_SETUP
1338 { KEYWORD; return jp_PROTECTED; }
1339 YY_BREAK
1340 case 38:
1341 YY_RULE_SETUP
1342 { KEYWORD; return jp_PUBLIC; }
1343 YY_BREAK
1344 case 39:
1345 YY_RULE_SETUP
1346 { KEYWORD; return jp_RETURN; }
1347 YY_BREAK
1348 case 40:
1349 YY_RULE_SETUP
1350 { KEYWORD; return jp_SHORT_TYPE; }
1351 YY_BREAK
1352 case 41:
1353 YY_RULE_SETUP
1354 { KEYWORD; return jp_STATIC; }
1355 YY_BREAK
1356 case 42:
1357 YY_RULE_SETUP
1358 { KEYWORD; return jp_STRICTFP; }
1359 YY_BREAK
1360 case 43:
1361 YY_RULE_SETUP
1362 { KEYWORD; return jp_SUPER; }
1363 YY_BREAK
1364 case 44:
1365 YY_RULE_SETUP
1366 { KEYWORD; return jp_SWITCH; }
1367 YY_BREAK
1368 case 45:
1369 YY_RULE_SETUP
1370 { KEYWORD; return jp_SYNCHRONIZED; }
1371 YY_BREAK
1372 case 46:
1373 YY_RULE_SETUP
1374 { KEYWORD; return jp_THIS; }
1375 YY_BREAK
1376 case 47:
1377 YY_RULE_SETUP
1378 { KEYWORD; return jp_THROW; }
1379 YY_BREAK
1380 case 48:
1381 YY_RULE_SETUP
1382 { KEYWORD; return jp_THROWS; }
1383 YY_BREAK
1384 case 49:
1385 YY_RULE_SETUP
1386 { KEYWORD; return jp_TRANSIENT; }
1387 YY_BREAK
1388 case 50:
1389 YY_RULE_SETUP
1390 { KEYWORD; return jp_TRY; }
1391 YY_BREAK
1392 case 51:
1393 YY_RULE_SETUP
1394 { KEYWORD; return jp_VOID; }
1395 YY_BREAK
1396 case 52:
1397 YY_RULE_SETUP
1398 { KEYWORD; return jp_VOLATILE; }
1399 YY_BREAK
1400 case 53:
1401 YY_RULE_SETUP
1402 { KEYWORD; return jp_WHILE; }
1403 YY_BREAK
1404 case 54:
1405 YY_RULE_SETUP
1406 { PRIMITIVE; return jp_BOOLEANLITERAL; }
1407 YY_BREAK
1408 case 55:
1409 /* rule 55 can match eol */
1410 YY_RULE_SETUP
1411 { PRIMITIVE; return jp_CHARACTERLITERAL; }
1412 YY_BREAK
1413 case 56:
1414 YY_RULE_SETUP
1415 { PRIMITIVE; return jp_DECIMALINTEGERLITERAL; }
1416 YY_BREAK
1417 case 57:
1418 YY_RULE_SETUP
1419 { PRIMITIVE; return jp_FLOATINGPOINTLITERAL; }
1420 YY_BREAK
1421 case 58:
1422 YY_RULE_SETUP
1423 { PRIMITIVE; return jp_HEXINTEGERLITERAL; }
1424 YY_BREAK
1425 case 59:
1426 YY_RULE_SETUP
1427 { PRIMITIVE; return jp_NULLLITERAL; }
1428 YY_BREAK
1429 case 60:
1430 YY_RULE_SETUP
1431 { SYMBOL; return jp_AND; }
1432 YY_BREAK
1433 case 61:
1434 YY_RULE_SETUP
1435 { SYMBOL; return jp_ANDAND; }
1436 YY_BREAK
1437 case 62:
1438 YY_RULE_SETUP
1439 { SYMBOL; return jp_ANDEQUALS; }
1440 YY_BREAK
1441 case 63:
1442 YY_RULE_SETUP
1443 { SYMBOL; return jp_BRACKETEND; }
1444 YY_BREAK
1445 case 64:
1446 YY_RULE_SETUP
1447 { SYMBOL; return jp_BRACKETSTART; }
1448 YY_BREAK
1449 case 65:
1450 YY_RULE_SETUP
1451 { SYMBOL; return jp_CARROT; }
1452 YY_BREAK
1453 case 66:
1454 YY_RULE_SETUP
1455 { SYMBOL; return jp_CARROTEQUALS; }
1456 YY_BREAK
1457 case 67:
1458 YY_RULE_SETUP
1459 { SYMBOL; return jp_COLON; }
1460 YY_BREAK
1461 case 68:
1462 YY_RULE_SETUP
1463 { SYMBOL; return jp_COMMA; }
1464 YY_BREAK
1465 case 69:
1466 YY_RULE_SETUP
1467 { SYMBOL; return jp_CURLYEND; }
1468 YY_BREAK
1469 case 70:
1470 YY_RULE_SETUP
1471 { SYMBOL; return jp_CURLYSTART; }
1472 YY_BREAK
1473 case 71:
1474 YY_RULE_SETUP
1475 { SYMBOL; return jp_DIVIDE; }
1476 YY_BREAK
1477 case 72:
1478 YY_RULE_SETUP
1479 { SYMBOL; return jp_DIVIDEEQUALS; }
1480 YY_BREAK
1481 case 73:
1482 YY_RULE_SETUP
1483 { SYMBOL; return jp_DOLLAR; }
1484 YY_BREAK
1485 case 74:
1486 YY_RULE_SETUP
1487 { SYMBOL; return jp_DOT; }
1488 YY_BREAK
1489 case 75:
1490 YY_RULE_SETUP
1491 { SYMBOL; return jp_EQUALS; }
1492 YY_BREAK
1493 case 76:
1494 YY_RULE_SETUP
1495 { SYMBOL; return jp_EQUALSEQUALS; }
1496 YY_BREAK
1497 case 77:
1498 YY_RULE_SETUP
1499 { SYMBOL; return jp_EXCLAMATION; }
1500 YY_BREAK
1501 case 78:
1502 YY_RULE_SETUP
1503 { SYMBOL; return jp_EXCLAMATIONEQUALS; }
1504 YY_BREAK
1505 case 79:
1506 YY_RULE_SETUP
1507 { SYMBOL; return jp_GREATER; }
1508 YY_BREAK
1509 case 80:
1510 YY_RULE_SETUP
1511 { SYMBOL; return jp_GTEQUALS; }
1512 YY_BREAK
1513 case 81:
1514 YY_RULE_SETUP
1515 { SYMBOL; return jp_GTGT; }
1516 YY_BREAK
1517 case 82:
1518 YY_RULE_SETUP
1519 { SYMBOL; return jp_GTGTEQUALS; }
1520 YY_BREAK
1521 case 83:
1522 YY_RULE_SETUP
1523 { SYMBOL; return jp_GTGTGT; }
1524 YY_BREAK
1525 case 84:
1526 YY_RULE_SETUP
1527 { SYMBOL; return jp_GTGTGTEQUALS; }
1528 YY_BREAK
1529 case 85:
1530 YY_RULE_SETUP
1531 { SYMBOL; return jp_LESLESEQUALS; }
1532 YY_BREAK
1533 case 86:
1534 YY_RULE_SETUP
1535 { SYMBOL; return jp_LESSTHAN; }
1536 YY_BREAK
1537 case 87:
1538 YY_RULE_SETUP
1539 { SYMBOL; return jp_LTEQUALS; }
1540 YY_BREAK
1541 case 88:
1542 YY_RULE_SETUP
1543 { SYMBOL; return jp_LTLT; }
1544 YY_BREAK
1545 case 89:
1546 YY_RULE_SETUP
1547 { SYMBOL; return jp_MINUS; }
1548 YY_BREAK
1549 case 90:
1550 YY_RULE_SETUP
1551 { SYMBOL; return jp_MINUSEQUALS; }
1552 YY_BREAK
1553 case 91:
1554 YY_RULE_SETUP
1555 { SYMBOL; return jp_MINUSMINUS; }
1556 YY_BREAK
1557 case 92:
1558 YY_RULE_SETUP
1559 { SYMBOL; return jp_PAREEND; }
1560 YY_BREAK
1561 case 93:
1562 YY_RULE_SETUP
1563 { SYMBOL; return jp_PARESTART; }
1564 YY_BREAK
1565 case 94:
1566 YY_RULE_SETUP
1567 { SYMBOL; return jp_PERCENT; }
1568 YY_BREAK
1569 case 95:
1570 YY_RULE_SETUP
1571 { SYMBOL; return jp_PERCENTEQUALS; }
1572 YY_BREAK
1573 case 96:
1574 YY_RULE_SETUP
1575 { SYMBOL; return jp_PIPE; }
1576 YY_BREAK
1577 case 97:
1578 YY_RULE_SETUP
1579 { SYMBOL; return jp_PIPEEQUALS; }
1580 YY_BREAK
1581 case 98:
1582 YY_RULE_SETUP
1583 { SYMBOL; return jp_PIPEPIPE; }
1584 YY_BREAK
1585 case 99:
1586 YY_RULE_SETUP
1587 { SYMBOL; return jp_PLUS; }
1588 YY_BREAK
1589 case 100:
1590 YY_RULE_SETUP
1591 { SYMBOL; return jp_PLUSEQUALS; }
1592 YY_BREAK
1593 case 101:
1594 YY_RULE_SETUP
1595 { SYMBOL; return jp_PLUSPLUS; }
1596 YY_BREAK
1597 case 102:
1598 YY_RULE_SETUP
1599 { SYMBOL; return jp_QUESTION; }
1600 YY_BREAK
1601 case 103:
1602 YY_RULE_SETUP
1603 { SYMBOL; return jp_SEMICOL; }
1604 YY_BREAK
1605 case 104:
1606 YY_RULE_SETUP
1607 { SYMBOL; return jp_TILDE; }
1608 YY_BREAK
1609 case 105:
1610 YY_RULE_SETUP
1611 { SYMBOL; return jp_TIMES; }
1612 YY_BREAK
1613 case 106:
1614 YY_RULE_SETUP
1615 { SYMBOL; return jp_TIMESEQUALS; }
1616 YY_BREAK
1617 case 107:
1618 YY_RULE_SETUP
1620 yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
1621 return jp_NAME;
1623 YY_BREAK
1624 case 108:
1625 /* rule 108 can match eol */
1626 YY_RULE_SETUP
1628 YY_BREAK
1629 case 109:
1630 /* rule 109 can match eol */
1631 YY_RULE_SETUP
1633 YY_BREAK
1634 case 110:
1635 YY_RULE_SETUP
1637 std::cerr << "Unknown character: " << yytext[0]
1638 << " (" << (int)yytext[0] << ")" << std::endl;
1639 yyextra->Error("Unknown character");
1640 return jp_ERROR;
1642 YY_BREAK
1643 case 111:
1644 YY_RULE_SETUP
1645 ECHO;
1646 YY_BREAK
1647 case YY_STATE_EOF(INITIAL):
1648 case YY_STATE_EOF(comment):
1649 case YY_STATE_EOF(string):
1650 yyterminate();
1652 case YY_END_OF_BUFFER:
1654 /* Amount of text matched not including the EOB char. */
1655 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1657 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1658 *yy_cp = yyg->yy_hold_char;
1659 YY_RESTORE_YY_MORE_OFFSET
1661 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1663 /* We're scanning a new file or input source. It's
1664 * possible that this happened because the user
1665 * just pointed yyin at a new source and called
1666 * yylex(). If so, then we have to assure
1667 * consistency between YY_CURRENT_BUFFER and our
1668 * globals. Here is the right place to do so, because
1669 * this is the first action (other than possibly a
1670 * back-up) that will match for the new input source.
1672 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1673 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1674 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1677 /* Note that here we test for yy_c_buf_p "<=" to the position
1678 * of the first EOB in the buffer, since yy_c_buf_p will
1679 * already have been incremented past the NUL character
1680 * (since all states make transitions on EOB to the
1681 * end-of-buffer state). Contrast this with the test
1682 * in input().
1684 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1685 { /* This was really a NUL. */
1686 yy_state_type yy_next_state;
1688 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1690 yy_current_state = yy_get_previous_state( yyscanner );
1692 /* Okay, we're now positioned to make the NUL
1693 * transition. We couldn't have
1694 * yy_get_previous_state() go ahead and do it
1695 * for us because it doesn't know how to deal
1696 * with the possibility of jamming (and we don't
1697 * want to build jamming into it because then it
1698 * will run more slowly).
1701 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1703 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1705 if ( yy_next_state )
1707 /* Consume the NUL. */
1708 yy_cp = ++yyg->yy_c_buf_p;
1709 yy_current_state = yy_next_state;
1710 goto yy_match;
1713 else
1715 yy_cp = yyg->yy_c_buf_p;
1716 goto yy_find_action;
1720 else switch ( yy_get_next_buffer( yyscanner ) )
1722 case EOB_ACT_END_OF_FILE:
1724 yyg->yy_did_buffer_switch_on_eof = 0;
1726 if ( yywrap( yyscanner ) )
1728 /* Note: because we've taken care in
1729 * yy_get_next_buffer() to have set up
1730 * yytext, we can now set up
1731 * yy_c_buf_p so that if some total
1732 * hoser (like flex itself) wants to
1733 * call the scanner after we return the
1734 * YY_NULL, it'll still work - another
1735 * YY_NULL will get returned.
1737 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1739 yy_act = YY_STATE_EOF(YY_START);
1740 goto do_action;
1743 else
1745 if ( ! yyg->yy_did_buffer_switch_on_eof )
1746 YY_NEW_FILE;
1748 break;
1751 case EOB_ACT_CONTINUE_SCAN:
1752 yyg->yy_c_buf_p =
1753 yyg->yytext_ptr + yy_amount_of_matched_text;
1755 yy_current_state = yy_get_previous_state( yyscanner );
1757 yy_cp = yyg->yy_c_buf_p;
1758 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1759 goto yy_match;
1761 case EOB_ACT_LAST_MATCH:
1762 yyg->yy_c_buf_p =
1763 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1765 yy_current_state = yy_get_previous_state( yyscanner );
1767 yy_cp = yyg->yy_c_buf_p;
1768 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1769 goto yy_find_action;
1771 break;
1774 default:
1775 YY_FATAL_ERROR(
1776 "fatal flex scanner internal error--no action found" );
1777 } /* end of action switch */
1778 } /* end of scanning one token */
1779 } /* end of user's declarations */
1780 } /* end of yylex */
1782 /* yy_get_next_buffer - try to read in a new buffer
1784 * Returns a code representing an action:
1785 * EOB_ACT_LAST_MATCH -
1786 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1787 * EOB_ACT_END_OF_FILE - end of file
1789 static int yy_get_next_buffer (yyscan_t yyscanner)
1791 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1792 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1793 char *source = yyg->yytext_ptr;
1794 int number_to_move, i;
1795 int ret_val;
1797 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1798 YY_FATAL_ERROR(
1799 "fatal flex scanner internal error--end of buffer missed" );
1801 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1802 { /* Don't try to fill the buffer, so this is an EOF. */
1803 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1805 /* We matched a single character, the EOB, so
1806 * treat this as a final EOF.
1808 return EOB_ACT_END_OF_FILE;
1811 else
1813 /* We matched some text prior to the EOB, first
1814 * process it.
1816 return EOB_ACT_LAST_MATCH;
1820 /* Try to read more data. */
1822 /* First move last chars to start of buffer. */
1823 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
1825 for ( i = 0; i < number_to_move; ++i )
1826 *(dest++) = *(source++);
1828 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1829 /* don't do the read, it's not guaranteed to return an EOF,
1830 * just force an EOF
1832 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1834 else
1836 int num_to_read =
1837 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1839 while ( num_to_read <= 0 )
1840 { /* Not enough room in the buffer - grow it. */
1842 /* just a shorter name for the current buffer */
1843 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1845 int yy_c_buf_p_offset =
1846 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1848 if ( b->yy_is_our_buffer )
1850 int new_size = b->yy_buf_size * 2;
1852 if ( new_size <= 0 )
1853 b->yy_buf_size += b->yy_buf_size / 8;
1854 else
1855 b->yy_buf_size *= 2;
1857 b->yy_ch_buf = (char *)
1858 /* Include room in for 2 EOB chars. */
1859 yyrealloc( (void *) b->yy_ch_buf,
1860 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1862 else
1863 /* Can't grow it, we don't own it. */
1864 b->yy_ch_buf = NULL;
1866 if ( ! b->yy_ch_buf )
1867 YY_FATAL_ERROR(
1868 "fatal error - scanner input buffer overflow" );
1870 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1872 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1873 number_to_move - 1;
1877 if ( num_to_read > YY_READ_BUF_SIZE )
1878 num_to_read = YY_READ_BUF_SIZE;
1880 /* Read in more data. */
1881 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1882 yyg->yy_n_chars, num_to_read );
1884 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1887 if ( yyg->yy_n_chars == 0 )
1889 if ( number_to_move == YY_MORE_ADJ )
1891 ret_val = EOB_ACT_END_OF_FILE;
1892 yyrestart( yyin , yyscanner);
1895 else
1897 ret_val = EOB_ACT_LAST_MATCH;
1898 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1899 YY_BUFFER_EOF_PENDING;
1903 else
1904 ret_val = EOB_ACT_CONTINUE_SCAN;
1906 if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1907 /* Extend the array by 50%, plus the number we really need. */
1908 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1909 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1910 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
1911 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1912 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1913 /* "- 2" to take care of EOB's */
1914 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1917 yyg->yy_n_chars += number_to_move;
1918 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1919 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1921 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1923 return ret_val;
1926 /* yy_get_previous_state - get the state just before the EOB char was reached */
1928 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1930 yy_state_type yy_current_state;
1931 char *yy_cp;
1932 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1934 yy_current_state = yyg->yy_start;
1936 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1938 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1939 if ( yy_accept[yy_current_state] )
1941 yyg->yy_last_accepting_state = yy_current_state;
1942 yyg->yy_last_accepting_cpos = yy_cp;
1944 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1946 yy_current_state = (int) yy_def[yy_current_state];
1947 if ( yy_current_state >= 327 )
1948 yy_c = yy_meta[yy_c];
1950 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1953 return yy_current_state;
1956 /* yy_try_NUL_trans - try to make a transition on the NUL character
1958 * synopsis
1959 * next_state = yy_try_NUL_trans( current_state );
1961 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1963 int yy_is_jam;
1964 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1965 char *yy_cp = yyg->yy_c_buf_p;
1967 YY_CHAR yy_c = 1;
1968 if ( yy_accept[yy_current_state] )
1970 yyg->yy_last_accepting_state = yy_current_state;
1971 yyg->yy_last_accepting_cpos = yy_cp;
1973 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1975 yy_current_state = (int) yy_def[yy_current_state];
1976 if ( yy_current_state >= 327 )
1977 yy_c = yy_meta[yy_c];
1979 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1980 yy_is_jam = (yy_current_state == 326);
1982 (void)yyg;
1983 return yy_is_jam ? 0 : yy_current_state;
1986 #ifndef YY_NO_UNPUT
1988 static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)
1990 char *yy_cp;
1991 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1993 yy_cp = yyg->yy_c_buf_p;
1995 /* undo effects of setting up yytext */
1996 *yy_cp = yyg->yy_hold_char;
1998 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1999 { /* need to shift things up to make room */
2000 /* +2 for EOB chars. */
2001 int number_to_move = yyg->yy_n_chars + 2;
2002 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2003 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2004 char *source =
2005 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2007 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2008 *--dest = *--source;
2010 yy_cp += (int) (dest - source);
2011 yy_bp += (int) (dest - source);
2012 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2013 yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2015 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2016 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2019 *--yy_cp = (char) c;
2021 yyg->yytext_ptr = yy_bp;
2022 yyg->yy_hold_char = *yy_cp;
2023 yyg->yy_c_buf_p = yy_cp;
2026 #endif
2028 #ifndef YY_NO_INPUT
2029 #ifdef __cplusplus
2030 static int yyinput (yyscan_t yyscanner)
2031 #else
2032 static int input (yyscan_t yyscanner)
2033 #endif
2036 int c;
2037 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2039 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2041 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2043 /* yy_c_buf_p now points to the character we want to return.
2044 * If this occurs *before* the EOB characters, then it's a
2045 * valid NUL; if not, then we've hit the end of the buffer.
2047 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2048 /* This was really a NUL. */
2049 *yyg->yy_c_buf_p = '\0';
2051 else
2052 { /* need more input */
2053 int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
2054 ++yyg->yy_c_buf_p;
2056 switch ( yy_get_next_buffer( yyscanner ) )
2058 case EOB_ACT_LAST_MATCH:
2059 /* This happens because yy_g_n_b()
2060 * sees that we've accumulated a
2061 * token and flags that we need to
2062 * try matching the token before
2063 * proceeding. But for input(),
2064 * there's no matching to consider.
2065 * So convert the EOB_ACT_LAST_MATCH
2066 * to EOB_ACT_END_OF_FILE.
2069 /* Reset buffer status. */
2070 yyrestart( yyin , yyscanner);
2072 /*FALLTHROUGH*/
2074 case EOB_ACT_END_OF_FILE:
2076 if ( yywrap( yyscanner ) )
2077 return 0;
2079 if ( ! yyg->yy_did_buffer_switch_on_eof )
2080 YY_NEW_FILE;
2081 #ifdef __cplusplus
2082 return yyinput(yyscanner);
2083 #else
2084 return input(yyscanner);
2085 #endif
2088 case EOB_ACT_CONTINUE_SCAN:
2089 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2090 break;
2095 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2096 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
2097 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2099 return c;
2101 #endif /* ifndef YY_NO_INPUT */
2103 /** Immediately switch to a different input stream.
2104 * @param input_file A readable stream.
2105 * @param yyscanner The scanner object.
2106 * @note This function does not reset the start condition to @c INITIAL .
2108 void yyrestart (FILE * input_file , yyscan_t yyscanner)
2110 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2112 if ( ! YY_CURRENT_BUFFER ){
2113 yyensure_buffer_stack (yyscanner);
2114 YY_CURRENT_BUFFER_LVALUE =
2115 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
2118 yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
2119 yy_load_buffer_state( yyscanner );
2122 /** Switch to a different input buffer.
2123 * @param new_buffer The new input buffer.
2124 * @param yyscanner The scanner object.
2126 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2128 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2130 /* TODO. We should be able to replace this entire function body
2131 * with
2132 * yypop_buffer_state();
2133 * yypush_buffer_state(new_buffer);
2135 yyensure_buffer_stack (yyscanner);
2136 if ( YY_CURRENT_BUFFER == new_buffer )
2137 return;
2139 if ( YY_CURRENT_BUFFER )
2141 /* Flush out information for old buffer. */
2142 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2143 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2144 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2147 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2148 yy_load_buffer_state( yyscanner );
2150 /* We don't actually know whether we did this switch during
2151 * EOF (yywrap()) processing, but the only time this flag
2152 * is looked at is after yywrap() is called, so it's safe
2153 * to go ahead and always set it.
2155 yyg->yy_did_buffer_switch_on_eof = 1;
2158 static void yy_load_buffer_state (yyscan_t yyscanner)
2160 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2161 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2162 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2163 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2164 yyg->yy_hold_char = *yyg->yy_c_buf_p;
2167 /** Allocate and initialize an input buffer state.
2168 * @param file A readable stream.
2169 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2170 * @param yyscanner The scanner object.
2171 * @return the allocated buffer state.
2173 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
2175 YY_BUFFER_STATE b;
2177 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2178 if ( ! b )
2179 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2181 b->yy_buf_size = size;
2183 /* yy_ch_buf has to be 2 characters longer than the size given because
2184 * we need to put in 2 end-of-buffer characters.
2186 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
2187 if ( ! b->yy_ch_buf )
2188 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2190 b->yy_is_our_buffer = 1;
2192 yy_init_buffer( b, file , yyscanner);
2194 return b;
2197 /** Destroy the buffer.
2198 * @param b a buffer created with yy_create_buffer()
2199 * @param yyscanner The scanner object.
2201 void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2203 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2205 if ( ! b )
2206 return;
2208 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2209 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2211 if ( b->yy_is_our_buffer )
2212 yyfree( (void *) b->yy_ch_buf , yyscanner );
2214 yyfree( (void *) b , yyscanner );
2217 /* Initializes or reinitializes a buffer.
2218 * This function is sometimes called more than once on the same buffer,
2219 * such as during a yyrestart() or at EOF.
2221 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2224 int oerrno = errno;
2225 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2227 yy_flush_buffer( b , yyscanner);
2229 b->yy_input_file = file;
2230 b->yy_fill_buffer = 1;
2232 /* If b is the current buffer, then yy_init_buffer was _probably_
2233 * called from yyrestart() or through yy_get_next_buffer.
2234 * In that case, we don't want to reset the lineno or column.
2236 if (b != YY_CURRENT_BUFFER){
2237 b->yy_bs_lineno = 1;
2238 b->yy_bs_column = 0;
2241 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2243 errno = oerrno;
2246 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2247 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2248 * @param yyscanner The scanner object.
2250 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2252 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2253 if ( ! b )
2254 return;
2256 b->yy_n_chars = 0;
2258 /* We always need two end-of-buffer characters. The first causes
2259 * a transition to the end-of-buffer state. The second causes
2260 * a jam in that state.
2262 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2263 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2265 b->yy_buf_pos = &b->yy_ch_buf[0];
2267 b->yy_at_bol = 1;
2268 b->yy_buffer_status = YY_BUFFER_NEW;
2270 if ( b == YY_CURRENT_BUFFER )
2271 yy_load_buffer_state( yyscanner );
2274 /** Pushes the new state onto the stack. The new state becomes
2275 * the current state. This function will allocate the stack
2276 * if necessary.
2277 * @param new_buffer The new state.
2278 * @param yyscanner The scanner object.
2280 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2282 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2283 if (new_buffer == NULL)
2284 return;
2286 yyensure_buffer_stack(yyscanner);
2288 /* This block is copied from yy_switch_to_buffer. */
2289 if ( YY_CURRENT_BUFFER )
2291 /* Flush out information for old buffer. */
2292 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2293 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2294 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2297 /* Only push if top exists. Otherwise, replace top. */
2298 if (YY_CURRENT_BUFFER)
2299 yyg->yy_buffer_stack_top++;
2300 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2302 /* copied from yy_switch_to_buffer. */
2303 yy_load_buffer_state( yyscanner );
2304 yyg->yy_did_buffer_switch_on_eof = 1;
2307 /** Removes and deletes the top of the stack, if present.
2308 * The next element becomes the new top.
2309 * @param yyscanner The scanner object.
2311 void yypop_buffer_state (yyscan_t yyscanner)
2313 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2314 if (!YY_CURRENT_BUFFER)
2315 return;
2317 yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
2318 YY_CURRENT_BUFFER_LVALUE = NULL;
2319 if (yyg->yy_buffer_stack_top > 0)
2320 --yyg->yy_buffer_stack_top;
2322 if (YY_CURRENT_BUFFER) {
2323 yy_load_buffer_state( yyscanner );
2324 yyg->yy_did_buffer_switch_on_eof = 1;
2328 /* Allocates the stack if it does not exist.
2329 * Guarantees space for at least one push.
2331 static void yyensure_buffer_stack (yyscan_t yyscanner)
2333 yy_size_t num_to_alloc;
2334 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2336 if (!yyg->yy_buffer_stack) {
2338 /* First allocation is just for 2 elements, since we don't know if this
2339 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2340 * immediate realloc on the next call.
2342 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2343 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
2344 (num_to_alloc * sizeof(struct yy_buffer_state*)
2345 , yyscanner);
2346 if ( ! yyg->yy_buffer_stack )
2347 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2349 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2351 yyg->yy_buffer_stack_max = num_to_alloc;
2352 yyg->yy_buffer_stack_top = 0;
2353 return;
2356 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2358 /* Increase the buffer to prepare for a possible push. */
2359 yy_size_t grow_size = 8 /* arbitrary grow size */;
2361 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2362 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
2363 (yyg->yy_buffer_stack,
2364 num_to_alloc * sizeof(struct yy_buffer_state*)
2365 , yyscanner);
2366 if ( ! yyg->yy_buffer_stack )
2367 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2369 /* zero only the new slots.*/
2370 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2371 yyg->yy_buffer_stack_max = num_to_alloc;
2375 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2376 * @param base the character buffer
2377 * @param size the size in bytes of the character buffer
2378 * @param yyscanner The scanner object.
2379 * @return the newly allocated buffer state object.
2381 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
2383 YY_BUFFER_STATE b;
2385 if ( size < 2 ||
2386 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2387 base[size-1] != YY_END_OF_BUFFER_CHAR )
2388 /* They forgot to leave room for the EOB's. */
2389 return NULL;
2391 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2392 if ( ! b )
2393 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2395 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2396 b->yy_buf_pos = b->yy_ch_buf = base;
2397 b->yy_is_our_buffer = 0;
2398 b->yy_input_file = NULL;
2399 b->yy_n_chars = b->yy_buf_size;
2400 b->yy_is_interactive = 0;
2401 b->yy_at_bol = 1;
2402 b->yy_fill_buffer = 0;
2403 b->yy_buffer_status = YY_BUFFER_NEW;
2405 yy_switch_to_buffer( b , yyscanner );
2407 return b;
2410 /** Setup the input buffer state to scan a string. The next call to yylex() will
2411 * scan from a @e copy of @a str.
2412 * @param yystr a NUL-terminated string to scan
2413 * @param yyscanner The scanner object.
2414 * @return the newly allocated buffer state object.
2415 * @note If you want to scan bytes that may contain NUL values, then use
2416 * yy_scan_bytes() instead.
2418 YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
2421 return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
2424 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2425 * scan from a @e copy of @a bytes.
2426 * @param yybytes the byte buffer to scan
2427 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2428 * @param yyscanner The scanner object.
2429 * @return the newly allocated buffer state object.
2431 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
2433 YY_BUFFER_STATE b;
2434 char *buf;
2435 yy_size_t n;
2436 int i;
2438 /* Get memory for full buffer, including space for trailing EOB's. */
2439 n = (yy_size_t) (_yybytes_len + 2);
2440 buf = (char *) yyalloc( n , yyscanner );
2441 if ( ! buf )
2442 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2444 for ( i = 0; i < _yybytes_len; ++i )
2445 buf[i] = yybytes[i];
2447 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2449 b = yy_scan_buffer( buf, n , yyscanner);
2450 if ( ! b )
2451 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2453 /* It's okay to grow etc. this buffer, and we should throw it
2454 * away when we're done.
2456 b->yy_is_our_buffer = 1;
2458 return b;
2461 #ifndef YY_EXIT_FAILURE
2462 #define YY_EXIT_FAILURE 2
2463 #endif
2465 static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
2467 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2468 (void)yyg;
2469 fprintf( stderr, "%s\n", msg );
2470 exit( YY_EXIT_FAILURE );
2473 /* Redefine yyless() so it works in section 3 code. */
2475 #undef yyless
2476 #define yyless(n) \
2477 do \
2479 /* Undo effects of setting up yytext. */ \
2480 int yyless_macro_arg = (n); \
2481 YY_LESS_LINENO(yyless_macro_arg);\
2482 yytext[yyleng] = yyg->yy_hold_char; \
2483 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2484 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2485 *yyg->yy_c_buf_p = '\0'; \
2486 yyleng = yyless_macro_arg; \
2488 while ( 0 )
2490 /* Accessor methods (get/set functions) to struct members. */
2492 /** Get the user-defined data for this scanner.
2493 * @param yyscanner The scanner object.
2495 YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
2497 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2498 return yyextra;
2501 /** Get the current line number.
2502 * @param yyscanner The scanner object.
2504 int yyget_lineno (yyscan_t yyscanner)
2506 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2508 if (! YY_CURRENT_BUFFER)
2509 return 0;
2511 return yylineno;
2514 /** Get the current column number.
2515 * @param yyscanner The scanner object.
2517 int yyget_column (yyscan_t yyscanner)
2519 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2521 if (! YY_CURRENT_BUFFER)
2522 return 0;
2524 return yycolumn;
2527 /** Get the input stream.
2528 * @param yyscanner The scanner object.
2530 FILE *yyget_in (yyscan_t yyscanner)
2532 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2533 return yyin;
2536 /** Get the output stream.
2537 * @param yyscanner The scanner object.
2539 FILE *yyget_out (yyscan_t yyscanner)
2541 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2542 return yyout;
2545 /** Get the length of the current token.
2546 * @param yyscanner The scanner object.
2548 int yyget_leng (yyscan_t yyscanner)
2550 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2551 return yyleng;
2554 /** Get the current token.
2555 * @param yyscanner The scanner object.
2558 char *yyget_text (yyscan_t yyscanner)
2560 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2561 return yytext;
2564 /** Set the user-defined data. This data is never touched by the scanner.
2565 * @param user_defined The data to be associated with this scanner.
2566 * @param yyscanner The scanner object.
2568 void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2570 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2571 yyextra = user_defined ;
2574 /** Set the current line number.
2575 * @param _line_number line number
2576 * @param yyscanner The scanner object.
2578 void yyset_lineno (int _line_number , yyscan_t yyscanner)
2580 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2582 /* lineno is only valid if an input buffer exists. */
2583 if (! YY_CURRENT_BUFFER )
2584 YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
2586 yylineno = _line_number;
2589 /** Set the current column.
2590 * @param _column_no column number
2591 * @param yyscanner The scanner object.
2593 void yyset_column (int _column_no , yyscan_t yyscanner)
2595 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2597 /* column is only valid if an input buffer exists. */
2598 if (! YY_CURRENT_BUFFER )
2599 YY_FATAL_ERROR( "yyset_column called with no buffer" );
2601 yycolumn = _column_no;
2604 /** Set the input stream. This does not discard the current
2605 * input buffer.
2606 * @param _in_str A readable stream.
2607 * @param yyscanner The scanner object.
2608 * @see yy_switch_to_buffer
2610 void yyset_in (FILE * _in_str , yyscan_t yyscanner)
2612 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2613 yyin = _in_str ;
2616 void yyset_out (FILE * _out_str , yyscan_t yyscanner)
2618 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2619 yyout = _out_str ;
2622 int yyget_debug (yyscan_t yyscanner)
2624 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2625 return yy_flex_debug;
2628 void yyset_debug (int _bdebug , yyscan_t yyscanner)
2630 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2631 yy_flex_debug = _bdebug ;
2634 /* Accessor methods for yylval and yylloc */
2636 /* User-visible API */
2638 /* yylex_init is special because it creates the scanner itself, so it is
2639 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2640 * That's why we explicitly handle the declaration, instead of using our macros.
2642 int yylex_init(yyscan_t* ptr_yy_globals)
2644 if (ptr_yy_globals == NULL){
2645 errno = EINVAL;
2646 return 1;
2649 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
2651 if (*ptr_yy_globals == NULL){
2652 errno = ENOMEM;
2653 return 1;
2656 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2657 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2659 return yy_init_globals ( *ptr_yy_globals );
2662 /* yylex_init_extra has the same functionality as yylex_init, but follows the
2663 * convention of taking the scanner as the last argument. Note however, that
2664 * this is a *pointer* to a scanner, as it will be allocated by this call (and
2665 * is the reason, too, why this function also must handle its own declaration).
2666 * The user defined value in the first argument will be available to yyalloc in
2667 * the yyextra field.
2669 int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
2671 struct yyguts_t dummy_yyguts;
2673 yyset_extra (yy_user_defined, &dummy_yyguts);
2675 if (ptr_yy_globals == NULL){
2676 errno = EINVAL;
2677 return 1;
2680 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2682 if (*ptr_yy_globals == NULL){
2683 errno = ENOMEM;
2684 return 1;
2687 /* By setting to 0xAA, we expose bugs in
2688 yy_init_globals. Leave at 0x00 for releases. */
2689 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2691 yyset_extra (yy_user_defined, *ptr_yy_globals);
2693 return yy_init_globals ( *ptr_yy_globals );
2696 static int yy_init_globals (yyscan_t yyscanner)
2698 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2699 /* Initialization is the same as for the non-reentrant scanner.
2700 * This function is called from yylex_destroy(), so don't allocate here.
2703 yyg->yy_buffer_stack = NULL;
2704 yyg->yy_buffer_stack_top = 0;
2705 yyg->yy_buffer_stack_max = 0;
2706 yyg->yy_c_buf_p = NULL;
2707 yyg->yy_init = 0;
2708 yyg->yy_start = 0;
2710 yyg->yy_start_stack_ptr = 0;
2711 yyg->yy_start_stack_depth = 0;
2712 yyg->yy_start_stack = NULL;
2714 /* Defined in main.c */
2715 #ifdef YY_STDINIT
2716 yyin = stdin;
2717 yyout = stdout;
2718 #else
2719 yyin = NULL;
2720 yyout = NULL;
2721 #endif
2723 /* For future reference: Set errno on error, since we are called by
2724 * yylex_init()
2726 return 0;
2729 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2730 int yylex_destroy (yyscan_t yyscanner)
2732 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2734 /* Pop the buffer stack, destroying each element. */
2735 while(YY_CURRENT_BUFFER){
2736 yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
2737 YY_CURRENT_BUFFER_LVALUE = NULL;
2738 yypop_buffer_state(yyscanner);
2741 /* Destroy the stack itself. */
2742 yyfree(yyg->yy_buffer_stack , yyscanner);
2743 yyg->yy_buffer_stack = NULL;
2745 /* Destroy the start condition stack. */
2746 yyfree( yyg->yy_start_stack , yyscanner );
2747 yyg->yy_start_stack = NULL;
2749 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2750 * yylex() is called, initialization will occur. */
2751 yy_init_globals( yyscanner);
2753 /* Destroy the main struct (reentrant only). */
2754 yyfree ( yyscanner , yyscanner );
2755 yyscanner = NULL;
2756 return 0;
2760 * Internal utility routines.
2763 #ifndef yytext_ptr
2764 static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
2766 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2767 (void)yyg;
2769 int i;
2770 for ( i = 0; i < n; ++i )
2771 s1[i] = s2[i];
2773 #endif
2775 #ifdef YY_NEED_STRLEN
2776 static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
2778 int n;
2779 for ( n = 0; s[n]; ++n )
2782 return n;
2784 #endif
2786 void *yyalloc (yy_size_t size , yyscan_t yyscanner)
2788 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2789 (void)yyg;
2790 return malloc(size);
2793 void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2795 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2796 (void)yyg;
2798 /* The cast to (char *) in the following accommodates both
2799 * implementations that use char* generic pointers, and those
2800 * that use void* generic pointers. It works with the latter
2801 * because both ANSI C and C++ allow castless assignment from
2802 * any pointer type to void*, and deal with argument conversions
2803 * as though doing an assignment.
2805 return realloc(ptr, size);
2808 void yyfree (void * ptr , yyscan_t yyscanner)
2810 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2811 (void)yyg;
2812 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2815 #define YYTABLES_NAME "yytables"
2817 /*--------------------------------------------------------------------------*/
2819 #endif /* __clang_analyzer__ */