1 #include "cmStandardLexer.h"
4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
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
16 #ifdef yy_create_buffer
17 #define cmFortran_yy_create_buffer_ALREADY_DEFINED
19 #define yy_create_buffer cmFortran_yy_create_buffer
22 #ifdef yy_delete_buffer
23 #define cmFortran_yy_delete_buffer_ALREADY_DEFINED
25 #define yy_delete_buffer cmFortran_yy_delete_buffer
29 #define cmFortran_yy_scan_buffer_ALREADY_DEFINED
31 #define yy_scan_buffer cmFortran_yy_scan_buffer
35 #define cmFortran_yy_scan_string_ALREADY_DEFINED
37 #define yy_scan_string cmFortran_yy_scan_string
41 #define cmFortran_yy_scan_bytes_ALREADY_DEFINED
43 #define yy_scan_bytes cmFortran_yy_scan_bytes
47 #define cmFortran_yy_init_buffer_ALREADY_DEFINED
49 #define yy_init_buffer cmFortran_yy_init_buffer
52 #ifdef yy_flush_buffer
53 #define cmFortran_yy_flush_buffer_ALREADY_DEFINED
55 #define yy_flush_buffer cmFortran_yy_flush_buffer
58 #ifdef yy_load_buffer_state
59 #define cmFortran_yy_load_buffer_state_ALREADY_DEFINED
61 #define yy_load_buffer_state cmFortran_yy_load_buffer_state
64 #ifdef yy_switch_to_buffer
65 #define cmFortran_yy_switch_to_buffer_ALREADY_DEFINED
67 #define yy_switch_to_buffer cmFortran_yy_switch_to_buffer
70 #ifdef yypush_buffer_state
71 #define cmFortran_yypush_buffer_state_ALREADY_DEFINED
73 #define yypush_buffer_state cmFortran_yypush_buffer_state
76 #ifdef yypop_buffer_state
77 #define cmFortran_yypop_buffer_state_ALREADY_DEFINED
79 #define yypop_buffer_state cmFortran_yypop_buffer_state
82 #ifdef yyensure_buffer_stack
83 #define cmFortran_yyensure_buffer_stack_ALREADY_DEFINED
85 #define yyensure_buffer_stack cmFortran_yyensure_buffer_stack
89 #define cmFortran_yylex_ALREADY_DEFINED
91 #define yylex cmFortran_yylex
95 #define cmFortran_yyrestart_ALREADY_DEFINED
97 #define yyrestart cmFortran_yyrestart
101 #define cmFortran_yylex_init_ALREADY_DEFINED
103 #define yylex_init cmFortran_yylex_init
106 #ifdef yylex_init_extra
107 #define cmFortran_yylex_init_extra_ALREADY_DEFINED
109 #define yylex_init_extra cmFortran_yylex_init_extra
113 #define cmFortran_yylex_destroy_ALREADY_DEFINED
115 #define yylex_destroy cmFortran_yylex_destroy
119 #define cmFortran_yyget_debug_ALREADY_DEFINED
121 #define yyget_debug cmFortran_yyget_debug
125 #define cmFortran_yyset_debug_ALREADY_DEFINED
127 #define yyset_debug cmFortran_yyset_debug
131 #define cmFortran_yyget_extra_ALREADY_DEFINED
133 #define yyget_extra cmFortran_yyget_extra
137 #define cmFortran_yyset_extra_ALREADY_DEFINED
139 #define yyset_extra cmFortran_yyset_extra
143 #define cmFortran_yyget_in_ALREADY_DEFINED
145 #define yyget_in cmFortran_yyget_in
149 #define cmFortran_yyset_in_ALREADY_DEFINED
151 #define yyset_in cmFortran_yyset_in
155 #define cmFortran_yyget_out_ALREADY_DEFINED
157 #define yyget_out cmFortran_yyget_out
161 #define cmFortran_yyset_out_ALREADY_DEFINED
163 #define yyset_out cmFortran_yyset_out
167 #define cmFortran_yyget_leng_ALREADY_DEFINED
169 #define yyget_leng cmFortran_yyget_leng
173 #define cmFortran_yyget_text_ALREADY_DEFINED
175 #define yyget_text cmFortran_yyget_text
179 #define cmFortran_yyget_lineno_ALREADY_DEFINED
181 #define yyget_lineno cmFortran_yyget_lineno
185 #define cmFortran_yyset_lineno_ALREADY_DEFINED
187 #define yyset_lineno cmFortran_yyset_lineno
191 #define cmFortran_yyget_column_ALREADY_DEFINED
193 #define yyget_column cmFortran_yyget_column
197 #define cmFortran_yyset_column_ALREADY_DEFINED
199 #define yyset_column cmFortran_yyset_column
203 #define cmFortran_yywrap_ALREADY_DEFINED
205 #define yywrap cmFortran_yywrap
209 #define cmFortran_yyalloc_ALREADY_DEFINED
211 #define yyalloc cmFortran_yyalloc
215 #define cmFortran_yyrealloc_ALREADY_DEFINED
217 #define yyrealloc cmFortran_yyrealloc
221 #define cmFortran_yyfree_ALREADY_DEFINED
223 #define yyfree cmFortran_yyfree
226 /* First, we deal with platform-specific or compiler-specific issues. */
228 /* begin standard C headers. */
234 /* end standard C headers. */
236 /* flex integer type definitions */
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
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;
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. */
269 #define INT8_MIN (-128)
272 #define INT16_MIN (-32767-1)
275 #define INT32_MIN (-2147483647-1)
278 #define INT8_MAX (127)
281 #define INT16_MAX (32767)
284 #define INT32_MAX (2147483647)
287 #define UINT8_MAX (255U)
290 #define UINT16_MAX (65535U)
293 #define UINT32_MAX (4294967295U)
297 #define SIZE_MAX (~(size_t)0)
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__))
315 /* Returned upon end-of-file. */
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;
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
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. */
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
366 #define YY_BUF_SIZE 16384
367 #endif /* __ia64__ */
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;
379 #ifndef YY_TYPEDEF_YY_SIZE_T
380 #define YY_TYPEDEF_YY_SIZE_T
381 typedef size_t yy_size_t;
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. */
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 */ \
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
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
420 /* Number of characters read into yy_ch_buf, not including EOB
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
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
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
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
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
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] \
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 cmFortran_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; \
550 yyg->yy_c_buf_p = yy_cp;
551 #define YY_NUM_RULES 54
552 #define YY_END_OF_BUFFER 55
553 /* This struct is not used in this scanner,
554 but its presence is necessary. */
557 flex_int32_t yy_verify;
560 static const flex_int16_t yy_accept[210] =
562 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
563 55, 49, 51, 50, 53, 1, 49, 33, 2, 47,
564 48, 35, 37, 50, 39, 49, 46, 46, 46, 46,
565 46, 46, 49, 46, 51, 49, 50, 49, 46, 9,
566 8, 9, 4, 3, 49, 0, 10, 0, 0, 0,
567 0, 0, 33, 33, 34, 36, 39, 49, 46, 46,
568 46, 46, 46, 46, 0, 52, 46, 0, 0, 0,
569 12, 0, 0, 0, 0, 0, 0, 49, 0, 11,
570 46, 0, 0, 5, 0, 0, 0, 0, 29, 0,
571 33, 33, 33, 33, 0, 0, 40, 46, 46, 46,
573 46, 45, 12, 12, 0, 0, 0, 23, 0, 0,
574 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
575 0, 0, 0, 0, 46, 46, 46, 46, 0, 0,
576 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
577 0, 30, 31, 0, 0, 0, 0, 0, 46, 46,
578 46, 46, 0, 24, 25, 0, 0, 0, 0, 0,
579 0, 0, 0, 0, 20, 32, 27, 0, 0, 0,
580 46, 46, 43, 46, 0, 26, 21, 0, 0, 0,
581 19, 0, 0, 18, 28, 0, 0, 41, 46, 46,
582 17, 22, 0, 7, 38, 7, 15, 0, 46, 46,
584 14, 16, 42, 44, 0, 0, 0, 13, 0
587 static const YY_CHAR yy_ec[256] =
589 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
590 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
591 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
592 1, 5, 6, 7, 8, 9, 1, 10, 11, 12,
593 13, 14, 1, 15, 1, 1, 1, 16, 16, 16,
594 16, 16, 16, 16, 16, 16, 16, 17, 18, 19,
595 20, 21, 22, 1, 23, 24, 25, 26, 27, 28,
596 29, 29, 30, 29, 29, 31, 32, 33, 34, 29,
597 29, 35, 36, 37, 38, 29, 29, 29, 29, 29,
598 1, 39, 1, 1, 40, 1, 23, 24, 41, 42,
600 43, 44, 29, 29, 45, 29, 29, 46, 32, 47,
601 34, 29, 29, 35, 48, 37, 49, 29, 29, 29,
602 29, 29, 1, 1, 1, 1, 1, 1, 1, 1,
603 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
604 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
605 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
606 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
607 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
608 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
609 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
611 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
612 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
613 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
614 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
615 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
619 static const YY_CHAR yy_meta[50] =
621 1, 2, 2, 3, 4, 3, 3, 1, 1, 3,
622 3, 3, 3, 1, 3, 5, 3, 3, 1, 3,
623 6, 1, 7, 7, 7, 7, 7, 7, 7, 7,
624 7, 7, 7, 7, 7, 7, 7, 7, 1, 5,
625 7, 7, 7, 7, 7, 7, 7, 7, 7
628 static const flex_int16_t yy_base[219] =
630 0, 48, 0, 49, 464, 56, 52, 57, 62, 68,
631 466, 0, 468, 468, 462, 468, 74, 81, 468, 468,
632 468, 468, 447, 468, 442, 440, 0, 19, 41, 427,
633 47, 41, 90, 119, 97, 158, 455, 207, 247, 468,
634 454, 101, 468, 468, 0, 455, 468, 105, 430, 423,
635 62, 67, 119, 151, 468, 468, 468, 121, 0, 90,
636 93, 110, 431, 112, 142, 468, 0, 160, 295, 0,
637 162, 411, 123, 102, 408, 405, 446, 344, 447, 468,
638 0, 444, 170, 174, 420, 421, 132, 404, 95, 404,
639 180, 186, 192, 228, 297, 397, 0, 168, 144, 52,
641 411, 0, 204, 217, 397, 179, 390, 170, 389, 378,
642 364, 390, 389, 230, 468, 363, 355, 337, 337, 334,
643 335, 335, 330, 334, 187, 339, 267, 339, 327, 327,
644 327, 324, 325, 325, 318, 319, 318, 354, 352, 323,
645 327, 468, 468, 310, 307, 305, 297, 297, 275, 275,
646 277, 279, 287, 468, 468, 286, 283, 273, 196, 307,
647 200, 238, 234, 210, 468, 468, 468, 174, 171, 162,
648 279, 182, 0, 269, 150, 468, 468, 137, 109, 323,
649 468, 239, 0, 468, 468, 72, 71, 0, 283, 283,
650 468, 468, 51, 468, 468, 468, 468, 37, 283, 288,
652 330, 468, 0, 0, 331, 0, 52, 468, 468, 384,
653 391, 397, 400, 407, 414, 421, 428, 435
656 static const flex_int16_t yy_def[219] =
658 209, 1, 1, 1, 1, 1, 210, 210, 210, 210,
659 209, 211, 209, 209, 212, 209, 211, 209, 209, 209,
660 209, 209, 209, 209, 209, 211, 213, 213, 213, 213,
661 213, 213, 211, 213, 209, 211, 209, 214, 209, 209,
662 209, 209, 209, 209, 211, 212, 209, 209, 209, 209,
663 209, 209, 209, 215, 209, 209, 209, 211, 213, 213,
664 213, 213, 213, 213, 209, 209, 34, 209, 209, 69,
665 211, 209, 209, 209, 209, 209, 209, 214, 214, 209,
666 39, 209, 209, 209, 209, 209, 209, 209, 209, 209,
667 215, 215, 215, 215, 209, 209, 213, 213, 213, 213,
669 213, 213, 209, 209, 209, 209, 209, 209, 209, 209,
670 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
671 209, 209, 209, 209, 213, 213, 213, 213, 209, 209,
672 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
673 209, 209, 209, 209, 209, 209, 209, 209, 213, 213,
674 213, 213, 209, 209, 209, 209, 209, 209, 209, 209,
675 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
676 213, 213, 213, 213, 209, 209, 209, 209, 209, 209,
677 209, 216, 217, 209, 209, 209, 209, 213, 213, 213,
678 209, 209, 209, 209, 209, 209, 209, 209, 213, 213,
680 209, 209, 213, 213, 209, 218, 218, 209, 0, 209,
681 209, 209, 209, 209, 209, 209, 209, 209
684 static const flex_int16_t yy_nxt[518] =
686 12, 13, 14, 13, 13, 15, 16, 12, 17, 18,
687 19, 20, 21, 12, 22, 12, 23, 24, 12, 25,
688 12, 26, 27, 27, 27, 27, 28, 27, 27, 29,
689 27, 30, 27, 27, 27, 31, 27, 32, 33, 34,
690 27, 27, 28, 27, 29, 27, 27, 31, 32, 35,
691 35, 60, 35, 35, 41, 36, 36, 35, 37, 41,
692 35, 42, 43, 36, 41, 60, 42, 43, 44, 38,
693 41, 42, 208, 61, 44, 48, 64, 42, 48, 202,
694 39, 39, 53, 53, 63, 53, 54, 61, 64, 127,
695 55, 65, 66, 201, 65, 63, 39, 39, 68, 49,
697 127, 68, 83, 84, 69, 83, 48, 87, 88, 48,
698 89, 50, 198, 90, 197, 97, 51, 98, 52, 45,
699 53, 53, 95, 53, 54, 95, 45, 45, 55, 99,
700 49, 97, 45, 98, 67, 100, 121, 45, 102, 45,
701 45, 122, 50, 65, 66, 108, 65, 51, 109, 52,
702 193, 100, 92, 53, 102, 92, 93, 45, 67, 70,
703 94, 68, 70, 104, 68, 96, 104, 69, 106, 107,
704 126, 83, 84, 71, 83, 114, 118, 71, 114, 119,
705 192, 92, 53, 115, 92, 93, 126, 92, 53, 94,
706 92, 93, 191, 92, 53, 94, 92, 93, 125, 72,
708 73, 94, 74, 75, 189, 104, 76, 78, 104, 80,
709 187, 133, 186, 125, 78, 78, 134, 185, 104, 103,
710 78, 104, 78, 130, 149, 78, 131, 78, 78, 92,
711 53, 114, 92, 93, 114, 149, 184, 94, 183, 115,
712 195, 195, 182, 181, 179, 78, 78, 79, 79, 80,
713 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
714 79, 79, 81, 79, 79, 79, 79, 79, 79, 81,
715 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
716 81, 81, 81, 81, 81, 79, 81, 81, 81, 81,
717 81, 81, 81, 81, 81, 81, 70, 151, 95, 70,
719 171, 95, 172, 173, 174, 188, 190, 199, 180, 203,
720 103, 180, 151, 200, 204, 178, 171, 190, 172, 173,
721 174, 188, 103, 199, 180, 203, 177, 180, 200, 176,
722 204, 205, 205, 175, 205, 205, 72, 73, 103, 74,
723 75, 96, 170, 76, 78, 169, 80, 168, 206, 206,
724 167, 78, 78, 166, 165, 164, 163, 78, 162, 78,
725 161, 160, 78, 159, 78, 78, 158, 157, 156, 155,
726 154, 153, 152, 150, 148, 147, 146, 145, 144, 143,
727 142, 141, 78, 78, 40, 40, 40, 40, 40, 40,
728 40, 45, 140, 139, 138, 45, 45, 46, 46, 46,
730 46, 46, 46, 46, 59, 137, 59, 79, 79, 79,
731 79, 79, 79, 79, 91, 91, 91, 91, 91, 91,
732 91, 194, 194, 194, 136, 194, 194, 194, 196, 135,
733 196, 132, 196, 196, 196, 207, 207, 207, 207, 207,
734 129, 207, 128, 124, 123, 120, 117, 116, 113, 80,
735 112, 111, 110, 105, 101, 86, 85, 47, 82, 77,
736 62, 58, 57, 56, 47, 209, 37, 11, 209, 209,
737 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
738 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
739 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
741 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
742 209, 209, 209, 209, 209, 209, 209
745 static const flex_int16_t yy_chk[518] =
747 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
748 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
749 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
750 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
751 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
752 4, 28, 2, 4, 7, 2, 4, 6, 6, 8,
753 6, 7, 7, 6, 9, 28, 8, 8, 9, 6,
754 10, 9, 207, 29, 10, 17, 32, 10, 17, 198,
755 6, 6, 18, 18, 31, 18, 18, 29, 32, 100,
756 18, 33, 33, 193, 33, 31, 6, 6, 35, 17,
758 100, 35, 42, 42, 35, 42, 48, 51, 51, 48,
759 52, 17, 187, 52, 186, 60, 17, 61, 17, 34,
760 53, 53, 58, 53, 53, 58, 34, 34, 53, 61,
761 48, 60, 34, 61, 34, 62, 89, 34, 64, 34,
762 34, 89, 48, 65, 65, 74, 65, 48, 74, 48,
763 179, 62, 54, 54, 64, 54, 54, 34, 34, 36,
764 54, 68, 36, 71, 68, 58, 71, 68, 73, 73,
765 99, 83, 83, 36, 83, 84, 87, 71, 84, 87,
766 178, 91, 91, 84, 91, 91, 99, 92, 92, 91,
767 92, 92, 175, 93, 93, 92, 93, 93, 98, 36,
769 36, 93, 36, 36, 172, 103, 36, 38, 103, 38,
770 170, 108, 169, 98, 38, 38, 108, 168, 104, 103,
771 38, 104, 38, 106, 125, 38, 106, 38, 38, 94,
772 94, 114, 94, 94, 114, 125, 164, 94, 163, 114,
773 182, 182, 162, 161, 159, 38, 38, 39, 39, 39,
774 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
775 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
776 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
777 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
778 39, 39, 39, 39, 39, 39, 69, 127, 95, 69,
780 149, 95, 150, 151, 152, 171, 174, 189, 160, 199,
781 69, 160, 127, 190, 200, 158, 149, 174, 150, 151,
782 152, 171, 160, 189, 180, 199, 157, 180, 190, 156,
783 200, 201, 205, 153, 201, 205, 69, 69, 180, 69,
784 69, 95, 148, 69, 78, 147, 78, 146, 201, 205,
785 145, 78, 78, 144, 141, 140, 139, 78, 138, 78,
786 137, 136, 78, 135, 78, 78, 134, 133, 132, 131,
787 130, 129, 128, 126, 124, 123, 122, 121, 120, 119,
788 118, 117, 78, 78, 210, 210, 210, 210, 210, 210,
789 210, 211, 116, 113, 112, 211, 211, 212, 212, 212,
791 212, 212, 212, 212, 213, 111, 213, 214, 214, 214,
792 214, 214, 214, 214, 215, 215, 215, 215, 215, 215,
793 215, 216, 216, 216, 110, 216, 216, 216, 217, 109,
794 217, 107, 217, 217, 217, 218, 218, 218, 218, 218,
795 105, 218, 101, 96, 90, 88, 86, 85, 82, 79,
796 77, 76, 75, 72, 63, 50, 49, 46, 41, 37,
797 30, 26, 25, 23, 15, 11, 5, 209, 209, 209,
798 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
799 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
800 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
802 209, 209, 209, 209, 209, 209, 209, 209, 209, 209,
803 209, 209, 209, 209, 209, 209, 209
806 /* The intent behind this definition is that it'll catch
807 * any uses of REJECT which flex missed.
809 #define REJECT reject_used_but_not_detected
810 #define yymore() yymore_used_but_not_detected
811 #define YY_MORE_ADJ 0
812 #define YY_RESTORE_YY_MORE_OFFSET
813 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
814 file Copyright.txt or https://cmake.org/licensing for details. */
815 /*-------------------------------------------------------------------------
816 Portions of this source have been derived from makedepf90 version 2.8.8,
818 Copyright (C) 2000--2006 Erik Edelmann <erik.edelmann@iki.fi>
820 The code was originally distributed under the GPL but permission
821 from the copyright holder has been obtained to distribute this
822 derived work under the CMake license.
823 -------------------------------------------------------------------------*/
827 This file must be translated to C++ and modified to build everywhere.
829 Run flex >= 2.6 like this:
831 flex -i --nounistd -DFLEXINT_H --noline --header-file=cmFortranLexer.h -ocmFortranLexer.cxx cmFortranLexer.in.l
833 Modify cmFortranLexer.cxx:
834 - remove trailing whitespace: sed -i 's/\s*$//' cmFortranLexer.h cmFortranLexer.cxx
835 - remove blank lines at end of file: sed -i '${/^$/d;}' cmFortranLexer.h cmFortranLexer.cxx
836 - #include "cmStandardLexer.h" at the top: sed -i '1i#include "cmStandardLexer.h"' cmFortranLexer.cxx
839 /* IWYU pragma: no_forward_declare yyguts_t */
841 #ifndef __clang_analyzer__ /* Suppress clang-analyzer warnings */
845 #define cmFortranLexer_cxx
846 #include "cmFortranParser.h" /* Interface to parser object. */
848 /* Replace the lexer input function. */
850 #define YY_INPUT(buf, result, max_size) \
851 do { result = cmFortranParser_Input(yyextra, buf, max_size); } while (0)
853 /* Include the set of tokens from the parser. */
854 #include "cmFortranParserTokens.h"
856 /*--------------------------------------------------------------------------*/
864 #ifndef YY_EXTRA_TYPE
865 #define YY_EXTRA_TYPE void *
868 /* Holds the entire state of the reentrant scanner. */
872 /* User-defined. Not touched by flex. */
873 YY_EXTRA_TYPE yyextra_r;
875 /* The rest are the same as the globals declared in the non-reentrant scanner. */
876 FILE *yyin_r, *yyout_r;
877 size_t yy_buffer_stack_top; /**< index of top of stack. */
878 size_t yy_buffer_stack_max; /**< capacity of stack. */
879 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
886 int yy_did_buffer_switch_on_eof;
887 int yy_start_stack_ptr;
888 int yy_start_stack_depth;
890 yy_state_type yy_last_accepting_state;
891 char* yy_last_accepting_cpos;
900 }; /* end struct yyguts_t */
902 static int yy_init_globals ( yyscan_t yyscanner );
904 int yylex_init (yyscan_t* scanner);
906 int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
908 /* Accessor methods to globals.
909 These are made visible to non-reentrant scanners for convenience. */
911 int yylex_destroy ( yyscan_t yyscanner );
913 int yyget_debug ( yyscan_t yyscanner );
915 void yyset_debug ( int debug_flag , yyscan_t yyscanner );
917 YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
919 void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
921 FILE *yyget_in ( yyscan_t yyscanner );
923 void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
925 FILE *yyget_out ( yyscan_t yyscanner );
927 void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
929 int yyget_leng ( yyscan_t yyscanner );
931 char *yyget_text ( yyscan_t yyscanner );
933 int yyget_lineno ( yyscan_t yyscanner );
935 void yyset_lineno ( int _line_number , yyscan_t yyscanner );
937 int yyget_column ( yyscan_t yyscanner );
939 void yyset_column ( int _column_no , yyscan_t yyscanner );
941 /* Macros after this point can all be overridden by user definitions in
945 #ifndef YY_SKIP_YYWRAP
947 extern "C" int yywrap ( yyscan_t yyscanner );
949 extern int yywrap ( yyscan_t yyscanner );
955 static void yyunput ( int c, char *buf_ptr , yyscan_t yyscanner);
960 static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
963 #ifdef YY_NEED_STRLEN
964 static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
969 static int yyinput ( yyscan_t yyscanner );
971 static int input ( yyscan_t yyscanner );
976 /* Amount of stuff to slurp up with each read. */
977 #ifndef YY_READ_BUF_SIZE
979 /* On IA-64, the buffer size is 16k, not 8k */
980 #define YY_READ_BUF_SIZE 16384
982 #define YY_READ_BUF_SIZE 8192
983 #endif /* __ia64__ */
986 /* Copy whatever the last rule matched to the standard output. */
988 /* This used to be an fputs(), but since the string might contain NUL's,
989 * we now use fwrite().
991 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
994 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
995 * is returned in "result".
998 #define YY_INPUT(buf,result,max_size) \
999 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1003 for ( n = 0; n < max_size && \
1004 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1005 buf[n] = (char) c; \
1007 buf[n++] = (char) c; \
1008 if ( c == EOF && ferror( yyin ) ) \
1009 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1015 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1017 if( errno != EINTR) \
1019 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1030 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1031 * we don't want an extra ';' after the "return" because that will cause
1032 * some compilers to complain about unreachable statements.
1035 #define yyterminate() return YY_NULL
1038 /* Number of entries by which start-condition stack grows. */
1039 #ifndef YY_START_STACK_INCR
1040 #define YY_START_STACK_INCR 25
1043 /* Report a fatal error. */
1044 #ifndef YY_FATAL_ERROR
1045 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
1048 /* end tables serialization structures and prototypes */
1050 /* Default declaration of generated scanner - a define so the user can
1051 * easily add parameters.
1054 #define YY_DECL_IS_OURS 1
1056 extern int yylex (yyscan_t yyscanner);
1058 #define YY_DECL int yylex (yyscan_t yyscanner)
1059 #endif /* !YY_DECL */
1061 /* Code executed at the beginning of each rule, after yytext and yyleng
1064 #ifndef YY_USER_ACTION
1065 #define YY_USER_ACTION
1068 /* Code executed at the end of each rule. */
1070 #define YY_BREAK /*LINTED*/break;
1073 #define YY_RULE_SETUP \
1075 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1076 (yytext[yyleng - 1] == '\n'); \
1079 /** The main scanner function which does all the work.
1083 yy_state_type yy_current_state;
1084 char *yy_cp, *yy_bp;
1086 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1088 if ( !yyg->yy_init )
1096 if ( ! yyg->yy_start )
1097 yyg->yy_start = 1; /* first start state */
1105 if ( ! YY_CURRENT_BUFFER ) {
1106 yyensure_buffer_stack (yyscanner);
1107 YY_CURRENT_BUFFER_LVALUE =
1108 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1111 yy_load_buffer_state( yyscanner );
1116 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1118 yy_cp = yyg->yy_c_buf_p;
1120 /* Support of yytext. */
1121 *yy_cp = yyg->yy_hold_char;
1123 /* yy_bp points to the position in yy_ch_buf of the start of
1128 yy_current_state = yyg->yy_start;
1129 yy_current_state += YY_AT_BOL();
1133 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1134 if ( yy_accept[yy_current_state] )
1136 yyg->yy_last_accepting_state = yy_current_state;
1137 yyg->yy_last_accepting_cpos = yy_cp;
1139 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1141 yy_current_state = (int) yy_def[yy_current_state];
1142 if ( yy_current_state >= 210 )
1143 yy_c = yy_meta[yy_c];
1145 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1148 while ( yy_base[yy_current_state] != 468 );
1151 yy_act = yy_accept[yy_current_state];
1153 { /* have to back up */
1154 yy_cp = yyg->yy_last_accepting_cpos;
1155 yy_current_state = yyg->yy_last_accepting_state;
1156 yy_act = yy_accept[yy_current_state];
1159 YY_DO_BEFORE_ACTION;
1161 do_action: /* This label is used only to access EOF actions. */
1164 { /* beginning of action switch */
1165 case 0: /* must back up */
1166 /* undo the effects of YY_DO_BEFORE_ACTION */
1167 *yy_cp = yyg->yy_hold_char;
1168 yy_cp = yyg->yy_last_accepting_cpos;
1169 yy_current_state = yyg->yy_last_accepting_state;
1170 goto yy_find_action;
1175 cmFortranParser_StringStart(yyextra);
1176 cmFortranParser_SetOldStartcond(yyextra, YY_START);
1183 cmFortranParser_StringStart(yyextra);
1184 cmFortranParser_SetOldStartcond(yyextra, YY_START);
1192 BEGIN(cmFortranParser_GetOldStartcond(yyextra) );
1193 yylvalp->string = strdup(cmFortranParser_StringEnd(yyextra));
1198 /* rule 5 can match eol */
1200 /* rule 6 can match eol */
1202 /* Ignore (continued strings, free fmt) */
1205 /* rule 7 can match eol */
1208 if (cmFortranParser_GetOldStartcond(yyextra) == fixed_fmt)
1209 ; /* Ignore (cont. strings, fixed fmt) */
1212 unput(yytext[strlen(yytext)-1]);
1217 /* rule 8 can match eol */
1222 return UNTERMINATED_STRING;
1228 cmFortranParser_StringAppend(yyextra, yytext[0]);
1232 /* rule 10 can match eol */
1234 { return EOSTMT; } /* Treat comments like */
1237 /* rule 11 can match eol */
1239 { return EOSTMT; } /* empty lines */
1243 { return CPP_LINE_DIRECTIVE; }
1246 /* rule 13 can match eol */
1249 yytext[yyleng-1] = 0;
1250 yylvalp->string = strdup(strchr(yytext, '<')+1);
1251 return CPP_INCLUDE_ANGLE;
1256 { return CPP_INCLUDE; }
1260 { return F90PPR_INCLUDE; }
1264 { return COCO_INCLUDE; }
1268 { return CPP_DEFINE; }
1272 { return F90PPR_DEFINE; }
1276 { return CPP_UNDEF; }
1280 { return F90PPR_UNDEF; }
1284 { return CPP_IFDEF; }
1288 { return CPP_IFNDEF; }
1296 { return CPP_ELIF; }
1300 { return CPP_ELSE; }
1304 { return CPP_ENDIF; }
1308 { return F90PPR_IFDEF; }
1312 { return F90PPR_IFNDEF; }
1316 { return F90PPR_IF; }
1320 { return F90PPR_ELIF; }
1324 { return F90PPR_ELSE; }
1328 { return F90PPR_ENDIF; }
1330 /* Line continuations, possible involving comments. */
1332 /* rule 33 can match eol */
1337 /* rule 34 can match eol */
1354 /* rule 38 can match eol */
1360 { return ASSIGNMENT_OP; }
1372 { return INTERFACE; }
1380 { return SUBMODULE; }
1389 yylvalp->string = strdup(yytext);
1406 /* rule 50 can match eol */
1415 /* rule 52 can match eol */
1417 /* Ignore line-endings preceded by \ */
1423 case YY_STATE_EOF(INITIAL):
1424 case YY_STATE_EOF(free_fmt):
1425 case YY_STATE_EOF(fixed_fmt):
1426 case YY_STATE_EOF(str_sq):
1427 case YY_STATE_EOF(str_dq):
1429 if(!cmFortranParser_FilePop(yyextra) )
1440 case YY_END_OF_BUFFER:
1442 /* Amount of text matched not including the EOB char. */
1443 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1445 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1446 *yy_cp = yyg->yy_hold_char;
1447 YY_RESTORE_YY_MORE_OFFSET
1449 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1451 /* We're scanning a new file or input source. It's
1452 * possible that this happened because the user
1453 * just pointed yyin at a new source and called
1454 * yylex(). If so, then we have to assure
1455 * consistency between YY_CURRENT_BUFFER and our
1456 * globals. Here is the right place to do so, because
1457 * this is the first action (other than possibly a
1458 * back-up) that will match for the new input source.
1460 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1461 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1462 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1465 /* Note that here we test for yy_c_buf_p "<=" to the position
1466 * of the first EOB in the buffer, since yy_c_buf_p will
1467 * already have been incremented past the NUL character
1468 * (since all states make transitions on EOB to the
1469 * end-of-buffer state). Contrast this with the test
1472 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1473 { /* This was really a NUL. */
1474 yy_state_type yy_next_state;
1476 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1478 yy_current_state = yy_get_previous_state( yyscanner );
1480 /* Okay, we're now positioned to make the NUL
1481 * transition. We couldn't have
1482 * yy_get_previous_state() go ahead and do it
1483 * for us because it doesn't know how to deal
1484 * with the possibility of jamming (and we don't
1485 * want to build jamming into it because then it
1486 * will run more slowly).
1489 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1491 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1493 if ( yy_next_state )
1495 /* Consume the NUL. */
1496 yy_cp = ++yyg->yy_c_buf_p;
1497 yy_current_state = yy_next_state;
1503 yy_cp = yyg->yy_c_buf_p;
1504 goto yy_find_action;
1508 else switch ( yy_get_next_buffer( yyscanner ) )
1510 case EOB_ACT_END_OF_FILE:
1512 yyg->yy_did_buffer_switch_on_eof = 0;
1514 if ( yywrap( yyscanner ) )
1516 /* Note: because we've taken care in
1517 * yy_get_next_buffer() to have set up
1518 * yytext, we can now set up
1519 * yy_c_buf_p so that if some total
1520 * hoser (like flex itself) wants to
1521 * call the scanner after we return the
1522 * YY_NULL, it'll still work - another
1523 * YY_NULL will get returned.
1525 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1527 yy_act = YY_STATE_EOF(YY_START);
1533 if ( ! yyg->yy_did_buffer_switch_on_eof )
1539 case EOB_ACT_CONTINUE_SCAN:
1541 yyg->yytext_ptr + yy_amount_of_matched_text;
1543 yy_current_state = yy_get_previous_state( yyscanner );
1545 yy_cp = yyg->yy_c_buf_p;
1546 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1549 case EOB_ACT_LAST_MATCH:
1551 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1553 yy_current_state = yy_get_previous_state( yyscanner );
1555 yy_cp = yyg->yy_c_buf_p;
1556 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1557 goto yy_find_action;
1564 "fatal flex scanner internal error--no action found" );
1565 } /* end of action switch */
1566 } /* end of scanning one token */
1567 } /* end of user's declarations */
1568 } /* end of yylex */
1570 /* yy_get_next_buffer - try to read in a new buffer
1572 * Returns a code representing an action:
1573 * EOB_ACT_LAST_MATCH -
1574 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1575 * EOB_ACT_END_OF_FILE - end of file
1577 static int yy_get_next_buffer (yyscan_t yyscanner)
1579 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1580 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1581 char *source = yyg->yytext_ptr;
1582 int number_to_move, i;
1585 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1587 "fatal flex scanner internal error--end of buffer missed" );
1589 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1590 { /* Don't try to fill the buffer, so this is an EOF. */
1591 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1593 /* We matched a single character, the EOB, so
1594 * treat this as a final EOF.
1596 return EOB_ACT_END_OF_FILE;
1601 /* We matched some text prior to the EOB, first
1604 return EOB_ACT_LAST_MATCH;
1608 /* Try to read more data. */
1610 /* First move last chars to start of buffer. */
1611 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr - 1);
1613 for ( i = 0; i < number_to_move; ++i )
1614 *(dest++) = *(source++);
1616 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1617 /* don't do the read, it's not guaranteed to return an EOF,
1620 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1625 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1627 while ( num_to_read <= 0 )
1628 { /* Not enough room in the buffer - grow it. */
1630 /* just a shorter name for the current buffer */
1631 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1633 int yy_c_buf_p_offset =
1634 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1636 if ( b->yy_is_our_buffer )
1638 int new_size = b->yy_buf_size * 2;
1640 if ( new_size <= 0 )
1641 b->yy_buf_size += b->yy_buf_size / 8;
1643 b->yy_buf_size *= 2;
1645 b->yy_ch_buf = (char *)
1646 /* Include room in for 2 EOB chars. */
1647 yyrealloc( (void *) b->yy_ch_buf,
1648 (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1651 /* Can't grow it, we don't own it. */
1652 b->yy_ch_buf = NULL;
1654 if ( ! b->yy_ch_buf )
1656 "fatal error - scanner input buffer overflow" );
1658 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1660 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1665 if ( num_to_read > YY_READ_BUF_SIZE )
1666 num_to_read = YY_READ_BUF_SIZE;
1668 /* Read in more data. */
1669 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1670 yyg->yy_n_chars, num_to_read );
1672 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1675 if ( yyg->yy_n_chars == 0 )
1677 if ( number_to_move == YY_MORE_ADJ )
1679 ret_val = EOB_ACT_END_OF_FILE;
1680 yyrestart( yyin , yyscanner);
1685 ret_val = EOB_ACT_LAST_MATCH;
1686 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1687 YY_BUFFER_EOF_PENDING;
1692 ret_val = EOB_ACT_CONTINUE_SCAN;
1694 if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1695 /* Extend the array by 50%, plus the number we really need. */
1696 int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1697 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
1698 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner );
1699 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1700 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1701 /* "- 2" to take care of EOB's */
1702 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
1705 yyg->yy_n_chars += number_to_move;
1706 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1707 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1709 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1714 /* yy_get_previous_state - get the state just before the EOB char was reached */
1716 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1718 yy_state_type yy_current_state;
1720 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1722 yy_current_state = yyg->yy_start;
1723 yy_current_state += YY_AT_BOL();
1725 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1727 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1728 if ( yy_accept[yy_current_state] )
1730 yyg->yy_last_accepting_state = yy_current_state;
1731 yyg->yy_last_accepting_cpos = yy_cp;
1733 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1735 yy_current_state = (int) yy_def[yy_current_state];
1736 if ( yy_current_state >= 210 )
1737 yy_c = yy_meta[yy_c];
1739 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1742 return yy_current_state;
1745 /* yy_try_NUL_trans - try to make a transition on the NUL character
1748 * next_state = yy_try_NUL_trans( current_state );
1750 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1753 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1754 char *yy_cp = yyg->yy_c_buf_p;
1757 if ( yy_accept[yy_current_state] )
1759 yyg->yy_last_accepting_state = yy_current_state;
1760 yyg->yy_last_accepting_cpos = yy_cp;
1762 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1764 yy_current_state = (int) yy_def[yy_current_state];
1765 if ( yy_current_state >= 210 )
1766 yy_c = yy_meta[yy_c];
1768 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1769 yy_is_jam = (yy_current_state == 209);
1772 return yy_is_jam ? 0 : yy_current_state;
1777 static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)
1780 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1782 yy_cp = yyg->yy_c_buf_p;
1784 /* undo effects of setting up yytext */
1785 *yy_cp = yyg->yy_hold_char;
1787 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1788 { /* need to shift things up to make room */
1789 /* +2 for EOB chars. */
1790 int number_to_move = yyg->yy_n_chars + 2;
1791 char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1792 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1794 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1796 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1797 *--dest = *--source;
1799 yy_cp += (int) (dest - source);
1800 yy_bp += (int) (dest - source);
1801 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1802 yyg->yy_n_chars = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1804 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1805 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1808 *--yy_cp = (char) c;
1810 yyg->yytext_ptr = yy_bp;
1811 yyg->yy_hold_char = *yy_cp;
1812 yyg->yy_c_buf_p = yy_cp;
1819 static int yyinput (yyscan_t yyscanner)
1821 static int input (yyscan_t yyscanner)
1826 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1828 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1830 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1832 /* yy_c_buf_p now points to the character we want to return.
1833 * If this occurs *before* the EOB characters, then it's a
1834 * valid NUL; if not, then we've hit the end of the buffer.
1836 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1837 /* This was really a NUL. */
1838 *yyg->yy_c_buf_p = '\0';
1841 { /* need more input */
1842 int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr);
1845 switch ( yy_get_next_buffer( yyscanner ) )
1847 case EOB_ACT_LAST_MATCH:
1848 /* This happens because yy_g_n_b()
1849 * sees that we've accumulated a
1850 * token and flags that we need to
1851 * try matching the token before
1852 * proceeding. But for input(),
1853 * there's no matching to consider.
1854 * So convert the EOB_ACT_LAST_MATCH
1855 * to EOB_ACT_END_OF_FILE.
1858 /* Reset buffer status. */
1859 yyrestart( yyin , yyscanner);
1863 case EOB_ACT_END_OF_FILE:
1865 if ( yywrap( yyscanner ) )
1868 if ( ! yyg->yy_did_buffer_switch_on_eof )
1871 return yyinput(yyscanner);
1873 return input(yyscanner);
1877 case EOB_ACT_CONTINUE_SCAN:
1878 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1884 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1885 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1886 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1888 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1892 #endif /* ifndef YY_NO_INPUT */
1894 /** Immediately switch to a different input stream.
1895 * @param input_file A readable stream.
1896 * @param yyscanner The scanner object.
1897 * @note This function does not reset the start condition to @c INITIAL .
1899 void yyrestart (FILE * input_file , yyscan_t yyscanner)
1901 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1903 if ( ! YY_CURRENT_BUFFER ){
1904 yyensure_buffer_stack (yyscanner);
1905 YY_CURRENT_BUFFER_LVALUE =
1906 yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
1909 yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
1910 yy_load_buffer_state( yyscanner );
1913 /** Switch to a different input buffer.
1914 * @param new_buffer The new input buffer.
1915 * @param yyscanner The scanner object.
1917 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1919 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1921 /* TODO. We should be able to replace this entire function body
1923 * yypop_buffer_state();
1924 * yypush_buffer_state(new_buffer);
1926 yyensure_buffer_stack (yyscanner);
1927 if ( YY_CURRENT_BUFFER == new_buffer )
1930 if ( YY_CURRENT_BUFFER )
1932 /* Flush out information for old buffer. */
1933 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1934 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1935 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1938 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1939 yy_load_buffer_state( yyscanner );
1941 /* We don't actually know whether we did this switch during
1942 * EOF (yywrap()) processing, but the only time this flag
1943 * is looked at is after yywrap() is called, so it's safe
1944 * to go ahead and always set it.
1946 yyg->yy_did_buffer_switch_on_eof = 1;
1949 static void yy_load_buffer_state (yyscan_t yyscanner)
1951 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1952 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1953 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1954 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1955 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1958 /** Allocate and initialize an input buffer state.
1959 * @param file A readable stream.
1960 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1961 * @param yyscanner The scanner object.
1962 * @return the allocated buffer state.
1964 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
1968 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
1970 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1972 b->yy_buf_size = size;
1974 /* yy_ch_buf has to be 2 characters longer than the size given because
1975 * we need to put in 2 end-of-buffer characters.
1977 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
1978 if ( ! b->yy_ch_buf )
1979 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1981 b->yy_is_our_buffer = 1;
1983 yy_init_buffer( b, file , yyscanner);
1988 /** Destroy the buffer.
1989 * @param b a buffer created with yy_create_buffer()
1990 * @param yyscanner The scanner object.
1992 void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1994 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1999 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2000 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2002 if ( b->yy_is_our_buffer )
2003 yyfree( (void *) b->yy_ch_buf , yyscanner );
2005 yyfree( (void *) b , yyscanner );
2008 /* Initializes or reinitializes a buffer.
2009 * This function is sometimes called more than once on the same buffer,
2010 * such as during a yyrestart() or at EOF.
2012 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2016 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2018 yy_flush_buffer( b , yyscanner);
2020 b->yy_input_file = file;
2021 b->yy_fill_buffer = 1;
2023 /* If b is the current buffer, then yy_init_buffer was _probably_
2024 * called from yyrestart() or through yy_get_next_buffer.
2025 * In that case, we don't want to reset the lineno or column.
2027 if (b != YY_CURRENT_BUFFER){
2028 b->yy_bs_lineno = 1;
2029 b->yy_bs_column = 0;
2032 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2037 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2038 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2039 * @param yyscanner The scanner object.
2041 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2043 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2049 /* We always need two end-of-buffer characters. The first causes
2050 * a transition to the end-of-buffer state. The second causes
2051 * a jam in that state.
2053 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2054 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2056 b->yy_buf_pos = &b->yy_ch_buf[0];
2059 b->yy_buffer_status = YY_BUFFER_NEW;
2061 if ( b == YY_CURRENT_BUFFER )
2062 yy_load_buffer_state( yyscanner );
2065 /** Pushes the new state onto the stack. The new state becomes
2066 * the current state. This function will allocate the stack
2068 * @param new_buffer The new state.
2069 * @param yyscanner The scanner object.
2071 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2073 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2074 if (new_buffer == NULL)
2077 yyensure_buffer_stack(yyscanner);
2079 /* This block is copied from yy_switch_to_buffer. */
2080 if ( YY_CURRENT_BUFFER )
2082 /* Flush out information for old buffer. */
2083 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2084 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2085 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2088 /* Only push if top exists. Otherwise, replace top. */
2089 if (YY_CURRENT_BUFFER)
2090 yyg->yy_buffer_stack_top++;
2091 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2093 /* copied from yy_switch_to_buffer. */
2094 yy_load_buffer_state( yyscanner );
2095 yyg->yy_did_buffer_switch_on_eof = 1;
2098 /** Removes and deletes the top of the stack, if present.
2099 * The next element becomes the new top.
2100 * @param yyscanner The scanner object.
2102 void yypop_buffer_state (yyscan_t yyscanner)
2104 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2105 if (!YY_CURRENT_BUFFER)
2108 yy_delete_buffer(YY_CURRENT_BUFFER , yyscanner);
2109 YY_CURRENT_BUFFER_LVALUE = NULL;
2110 if (yyg->yy_buffer_stack_top > 0)
2111 --yyg->yy_buffer_stack_top;
2113 if (YY_CURRENT_BUFFER) {
2114 yy_load_buffer_state( yyscanner );
2115 yyg->yy_did_buffer_switch_on_eof = 1;
2119 /* Allocates the stack if it does not exist.
2120 * Guarantees space for at least one push.
2122 static void yyensure_buffer_stack (yyscan_t yyscanner)
2124 yy_size_t num_to_alloc;
2125 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2127 if (!yyg->yy_buffer_stack) {
2129 /* First allocation is just for 2 elements, since we don't know if this
2130 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2131 * immediate realloc on the next call.
2133 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2134 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
2135 (num_to_alloc * sizeof(struct yy_buffer_state*)
2137 if ( ! yyg->yy_buffer_stack )
2138 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2140 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2142 yyg->yy_buffer_stack_max = num_to_alloc;
2143 yyg->yy_buffer_stack_top = 0;
2147 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2149 /* Increase the buffer to prepare for a possible push. */
2150 yy_size_t grow_size = 8 /* arbitrary grow size */;
2152 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2153 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
2154 (yyg->yy_buffer_stack,
2155 num_to_alloc * sizeof(struct yy_buffer_state*)
2157 if ( ! yyg->yy_buffer_stack )
2158 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2160 /* zero only the new slots.*/
2161 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2162 yyg->yy_buffer_stack_max = num_to_alloc;
2166 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2167 * @param base the character buffer
2168 * @param size the size in bytes of the character buffer
2169 * @param yyscanner The scanner object.
2170 * @return the newly allocated buffer state object.
2172 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
2177 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2178 base[size-1] != YY_END_OF_BUFFER_CHAR )
2179 /* They forgot to leave room for the EOB's. */
2182 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) , yyscanner );
2184 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2186 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2187 b->yy_buf_pos = b->yy_ch_buf = base;
2188 b->yy_is_our_buffer = 0;
2189 b->yy_input_file = NULL;
2190 b->yy_n_chars = b->yy_buf_size;
2191 b->yy_is_interactive = 0;
2193 b->yy_fill_buffer = 0;
2194 b->yy_buffer_status = YY_BUFFER_NEW;
2196 yy_switch_to_buffer( b , yyscanner );
2201 /** Setup the input buffer state to scan a string. The next call to yylex() will
2202 * scan from a @e copy of @a str.
2203 * @param yystr a NUL-terminated string to scan
2204 * @param yyscanner The scanner object.
2205 * @return the newly allocated buffer state object.
2206 * @note If you want to scan bytes that may contain NUL values, then use
2207 * yy_scan_bytes() instead.
2209 YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner)
2212 return yy_scan_bytes( yystr, (int) strlen(yystr) , yyscanner);
2215 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2216 * scan from a @e copy of @a bytes.
2217 * @param yybytes the byte buffer to scan
2218 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2219 * @param yyscanner The scanner object.
2220 * @return the newly allocated buffer state object.
2222 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner)
2229 /* Get memory for full buffer, including space for trailing EOB's. */
2230 n = (yy_size_t) (_yybytes_len + 2);
2231 buf = (char *) yyalloc( n , yyscanner );
2233 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2235 for ( i = 0; i < _yybytes_len; ++i )
2236 buf[i] = yybytes[i];
2238 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2240 b = yy_scan_buffer( buf, n , yyscanner);
2242 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2244 /* It's okay to grow etc. this buffer, and we should throw it
2245 * away when we're done.
2247 b->yy_is_our_buffer = 1;
2252 #ifndef YY_EXIT_FAILURE
2253 #define YY_EXIT_FAILURE 2
2256 static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
2258 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2260 fprintf( stderr, "%s\n", msg );
2261 exit( YY_EXIT_FAILURE );
2264 /* Redefine yyless() so it works in section 3 code. */
2270 /* Undo effects of setting up yytext. */ \
2271 int yyless_macro_arg = (n); \
2272 YY_LESS_LINENO(yyless_macro_arg);\
2273 yytext[yyleng] = yyg->yy_hold_char; \
2274 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2275 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2276 *yyg->yy_c_buf_p = '\0'; \
2277 yyleng = yyless_macro_arg; \
2281 /* Accessor methods (get/set functions) to struct members. */
2283 /** Get the user-defined data for this scanner.
2284 * @param yyscanner The scanner object.
2286 YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
2288 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2292 /** Get the current line number.
2293 * @param yyscanner The scanner object.
2295 int yyget_lineno (yyscan_t yyscanner)
2297 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2299 if (! YY_CURRENT_BUFFER)
2305 /** Get the current column number.
2306 * @param yyscanner The scanner object.
2308 int yyget_column (yyscan_t yyscanner)
2310 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2312 if (! YY_CURRENT_BUFFER)
2318 /** Get the input stream.
2319 * @param yyscanner The scanner object.
2321 FILE *yyget_in (yyscan_t yyscanner)
2323 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2327 /** Get the output stream.
2328 * @param yyscanner The scanner object.
2330 FILE *yyget_out (yyscan_t yyscanner)
2332 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2336 /** Get the length of the current token.
2337 * @param yyscanner The scanner object.
2339 int yyget_leng (yyscan_t yyscanner)
2341 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2345 /** Get the current token.
2346 * @param yyscanner The scanner object.
2349 char *yyget_text (yyscan_t yyscanner)
2351 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2355 /** Set the user-defined data. This data is never touched by the scanner.
2356 * @param user_defined The data to be associated with this scanner.
2357 * @param yyscanner The scanner object.
2359 void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2361 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2362 yyextra = user_defined ;
2365 /** Set the current line number.
2366 * @param _line_number line number
2367 * @param yyscanner The scanner object.
2369 void yyset_lineno (int _line_number , yyscan_t yyscanner)
2371 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2373 /* lineno is only valid if an input buffer exists. */
2374 if (! YY_CURRENT_BUFFER )
2375 YY_FATAL_ERROR( "yyset_lineno called with no buffer" );
2377 yylineno = _line_number;
2380 /** Set the current column.
2381 * @param _column_no column number
2382 * @param yyscanner The scanner object.
2384 void yyset_column (int _column_no , yyscan_t yyscanner)
2386 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2388 /* column is only valid if an input buffer exists. */
2389 if (! YY_CURRENT_BUFFER )
2390 YY_FATAL_ERROR( "yyset_column called with no buffer" );
2392 yycolumn = _column_no;
2395 /** Set the input stream. This does not discard the current
2397 * @param _in_str A readable stream.
2398 * @param yyscanner The scanner object.
2399 * @see yy_switch_to_buffer
2401 void yyset_in (FILE * _in_str , yyscan_t yyscanner)
2403 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2407 void yyset_out (FILE * _out_str , yyscan_t yyscanner)
2409 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2413 int yyget_debug (yyscan_t yyscanner)
2415 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2416 return yy_flex_debug;
2419 void yyset_debug (int _bdebug , yyscan_t yyscanner)
2421 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2422 yy_flex_debug = _bdebug ;
2425 /* Accessor methods for yylval and yylloc */
2427 /* User-visible API */
2429 /* yylex_init is special because it creates the scanner itself, so it is
2430 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2431 * That's why we explicitly handle the declaration, instead of using our macros.
2433 int yylex_init(yyscan_t* ptr_yy_globals)
2435 if (ptr_yy_globals == NULL){
2440 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
2442 if (*ptr_yy_globals == NULL){
2447 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2448 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2450 return yy_init_globals ( *ptr_yy_globals );
2453 /* yylex_init_extra has the same functionality as yylex_init, but follows the
2454 * convention of taking the scanner as the last argument. Note however, that
2455 * this is a *pointer* to a scanner, as it will be allocated by this call (and
2456 * is the reason, too, why this function also must handle its own declaration).
2457 * The user defined value in the first argument will be available to yyalloc in
2458 * the yyextra field.
2460 int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
2462 struct yyguts_t dummy_yyguts;
2464 yyset_extra (yy_user_defined, &dummy_yyguts);
2466 if (ptr_yy_globals == NULL){
2471 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2473 if (*ptr_yy_globals == NULL){
2478 /* By setting to 0xAA, we expose bugs in
2479 yy_init_globals. Leave at 0x00 for releases. */
2480 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2482 yyset_extra (yy_user_defined, *ptr_yy_globals);
2484 return yy_init_globals ( *ptr_yy_globals );
2487 static int yy_init_globals (yyscan_t yyscanner)
2489 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2490 /* Initialization is the same as for the non-reentrant scanner.
2491 * This function is called from yylex_destroy(), so don't allocate here.
2494 yyg->yy_buffer_stack = NULL;
2495 yyg->yy_buffer_stack_top = 0;
2496 yyg->yy_buffer_stack_max = 0;
2497 yyg->yy_c_buf_p = NULL;
2501 yyg->yy_start_stack_ptr = 0;
2502 yyg->yy_start_stack_depth = 0;
2503 yyg->yy_start_stack = NULL;
2505 /* Defined in main.c */
2514 /* For future reference: Set errno on error, since we are called by
2520 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2521 int yylex_destroy (yyscan_t yyscanner)
2523 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2525 /* Pop the buffer stack, destroying each element. */
2526 while(YY_CURRENT_BUFFER){
2527 yy_delete_buffer( YY_CURRENT_BUFFER , yyscanner );
2528 YY_CURRENT_BUFFER_LVALUE = NULL;
2529 yypop_buffer_state(yyscanner);
2532 /* Destroy the stack itself. */
2533 yyfree(yyg->yy_buffer_stack , yyscanner);
2534 yyg->yy_buffer_stack = NULL;
2536 /* Destroy the start condition stack. */
2537 yyfree( yyg->yy_start_stack , yyscanner );
2538 yyg->yy_start_stack = NULL;
2540 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2541 * yylex() is called, initialization will occur. */
2542 yy_init_globals( yyscanner);
2544 /* Destroy the main struct (reentrant only). */
2545 yyfree ( yyscanner , yyscanner );
2551 * Internal utility routines.
2555 static void yy_flex_strncpy (char* s1, const char * s2, int n , yyscan_t yyscanner)
2557 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2561 for ( i = 0; i < n; ++i )
2566 #ifdef YY_NEED_STRLEN
2567 static int yy_flex_strlen (const char * s , yyscan_t yyscanner)
2570 for ( n = 0; s[n]; ++n )
2577 void *yyalloc (yy_size_t size , yyscan_t yyscanner)
2579 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2581 return malloc(size);
2584 void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2586 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2589 /* The cast to (char *) in the following accommodates both
2590 * implementations that use char* generic pointers, and those
2591 * that use void* generic pointers. It works with the latter
2592 * because both ANSI C and C++ allow castless assignment from
2593 * any pointer type to void*, and deal with argument conversions
2594 * as though doing an assignment.
2596 return realloc(ptr, size);
2599 void yyfree (void * ptr , yyscan_t yyscanner)
2601 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2603 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2606 #define YYTABLES_NAME "yytables"
2608 /*--------------------------------------------------------------------------*/
2609 YY_BUFFER_STATE cmFortranLexer_GetCurrentBuffer(yyscan_t yyscanner)
2611 /* Hack into the internal flex-generated scanner to get the buffer. */
2612 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2613 return YY_CURRENT_BUFFER;
2616 #endif /* __clang_analyzer__ */