1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmDependsFortranLexer.cxx,v $
6 Date: $Date: 2009-06-12 14:46:02 $
7 Version: $Revision: 1.14 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #line 2 "cmDependsFortranLexer.cxx"
19 #line 4 "cmDependsFortranLexer.cxx"
21 #define YY_INT_ALIGNED short int
23 /* A lexical scanner generated by flex */
26 #define YY_FLEX_MAJOR_VERSION 2
27 #define YY_FLEX_MINOR_VERSION 5
28 #define YY_FLEX_SUBMINOR_VERSION 34
29 #if YY_FLEX_SUBMINOR_VERSION > 0
33 /* First, we deal with platform-specific or compiler-specific issues. */
35 /* begin standard C headers. */
41 /* end standard C headers. */
43 /* flex integer type definitions */
48 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
50 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
52 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
53 * if you want the limit (max/min) macros for int types.
55 #ifndef __STDC_LIMIT_MACROS
56 #define __STDC_LIMIT_MACROS 1
60 typedef int8_t flex_int8_t
;
61 typedef uint8_t flex_uint8_t
;
62 typedef int16_t flex_int16_t
;
63 typedef uint16_t flex_uint16_t
;
64 typedef int32_t flex_int32_t
;
65 typedef uint32_t flex_uint32_t
;
67 typedef signed char flex_int8_t
;
68 typedef short int flex_int16_t
;
69 typedef int flex_int32_t
;
70 typedef unsigned char flex_uint8_t
;
71 typedef unsigned short int flex_uint16_t
;
72 typedef unsigned int flex_uint32_t
;
75 /* Limits of integral types. */
77 #define INT8_MIN (-128)
80 #define INT16_MIN (-32767-1)
83 #define INT32_MIN (-2147483647-1)
86 #define INT8_MAX (127)
89 #define INT16_MAX (32767)
92 #define INT32_MAX (2147483647)
95 #define UINT8_MAX (255U)
98 #define UINT16_MAX (65535U)
101 #define UINT32_MAX (4294967295U)
104 #endif /* ! FLEXINT_H */
108 /* The "const" storage-class-modifier is valid. */
111 #else /* ! __cplusplus */
113 /* C99 requires __STDC__ to be defined as 1. */
114 #if defined (__STDC__)
118 #endif /* defined (__STDC__) */
119 #endif /* ! __cplusplus */
122 #define yyconst const
127 /* Returned upon end-of-file. */
130 /* Promotes a possibly negative, possibly signed char to an unsigned
131 * integer for use as an array index. If the signed char is negative,
132 * we want to instead treat it as an 8-bit unsigned char, hence the
135 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
137 /* An opaque pointer. */
138 #ifndef YY_TYPEDEF_YY_SCANNER_T
139 #define YY_TYPEDEF_YY_SCANNER_T
140 typedef void* yyscan_t
;
143 /* For convenience, these vars (plus the bison vars far below)
144 are macros in the reentrant scanner. */
145 #define yyin yyg->yyin_r
146 #define yyout yyg->yyout_r
147 #define yyextra yyg->yyextra_r
148 #define yyleng yyg->yyleng_r
149 #define yytext yyg->yytext_r
150 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
151 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
152 #define yy_flex_debug yyg->yy_flex_debug_r
154 /* Enter a start condition. This macro really ought to take a parameter,
155 * but we do it the disgusting crufty way forced on us by the ()-less
156 * definition of BEGIN.
158 #define BEGIN yyg->yy_start = 1 + 2 *
160 /* Translate the current start state into a value that can be later handed
161 * to BEGIN to return to the state. The YYSTATE alias is for lex
164 #define YY_START ((yyg->yy_start - 1) / 2)
165 #define YYSTATE YY_START
167 /* Action number for EOF rule of a given start state. */
168 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
170 /* Special action meaning "start processing a new file". */
171 #define YY_NEW_FILE cmDependsFortran_yyrestart(yyin ,yyscanner )
173 #define YY_END_OF_BUFFER_CHAR 0
175 /* Size of default input buffer. */
177 #define YY_BUF_SIZE 16384
180 /* The state buf must be large enough to hold one state per character in the main buffer.
182 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
184 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
185 #define YY_TYPEDEF_YY_BUFFER_STATE
186 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
189 #define EOB_ACT_CONTINUE_SCAN 0
190 #define EOB_ACT_END_OF_FILE 1
191 #define EOB_ACT_LAST_MATCH 2
193 #define YY_LESS_LINENO(n)
195 /* Return all but the first "n" matched characters back to the input stream. */
199 /* Undo effects of setting up yytext. */ \
200 int yyless_macro_arg = (n); \
201 YY_LESS_LINENO(yyless_macro_arg);\
202 *yy_cp = yyg->yy_hold_char; \
203 YY_RESTORE_YY_MORE_OFFSET \
204 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
205 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
209 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
211 /* The following is because we cannot portably get our hands on size_t
212 * (without autoconf's help, which isn't available because we want
213 * flex-generated scanners to compile on their own).
214 * Given that the standard has decreed that size_t exists since 1989,
215 * I guess we can afford to depend on it. Manoj.
218 #ifndef YY_TYPEDEF_YY_SIZE_T
219 #define YY_TYPEDEF_YY_SIZE_T
220 typedef size_t yy_size_t
;
223 #ifndef YY_STRUCT_YY_BUFFER_STATE
224 #define YY_STRUCT_YY_BUFFER_STATE
225 struct yy_buffer_state
229 char *yy_ch_buf
; /* input buffer */
230 char *yy_buf_pos
; /* current position in input buffer */
232 /* Size of input buffer in bytes, not including room for EOB
235 yy_size_t yy_buf_size
;
237 /* Number of characters read into yy_ch_buf, not including EOB
242 /* Whether we "own" the buffer - i.e., we know we created it,
243 * and can realloc() it to grow it, and should free() it to
246 int yy_is_our_buffer
;
248 /* Whether this is an "interactive" input source; if so, and
249 * if we're using stdio for input, then we want to use getc()
250 * instead of fread(), to make sure we stop fetching input after
253 int yy_is_interactive
;
255 /* Whether we're considered to be at the beginning of a line.
256 * If so, '^' rules will be active on the next match, otherwise
261 int yy_bs_lineno
; /**< The line count. */
262 int yy_bs_column
; /**< The column count. */
264 /* Whether to try to fill the input buffer when we reach the
269 int yy_buffer_status
;
271 #define YY_BUFFER_NEW 0
272 #define YY_BUFFER_NORMAL 1
273 /* When an EOF's been seen but there's still some text to process
274 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
275 * shouldn't try reading from the input source any more. We might
276 * still have a bunch of tokens to match, though, because of
277 * possible backing-up.
279 * When we actually see the EOF, we change the status to "new"
280 * (via cmDependsFortran_yyrestart()), so that the user can continue scanning by
281 * just pointing yyin at a new input file.
283 #define YY_BUFFER_EOF_PENDING 2
286 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
288 /* We provide macros for accessing buffer states in case in the
289 * future we want to put the buffer states in a more general
292 * Returns the top of the stack, or NULL.
294 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
295 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
298 /* Same as previous macro, but useful when we know that the buffer stack is not
299 * NULL or when we need an lvalue. For internal use only.
301 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
303 void cmDependsFortran_yyrestart (FILE *input_file
,yyscan_t yyscanner
);
304 void cmDependsFortran_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer
,yyscan_t yyscanner
);
305 YY_BUFFER_STATE
cmDependsFortran_yy_create_buffer (FILE *file
,int size
,yyscan_t yyscanner
);
306 void cmDependsFortran_yy_delete_buffer (YY_BUFFER_STATE b
,yyscan_t yyscanner
);
307 void cmDependsFortran_yy_flush_buffer (YY_BUFFER_STATE b
,yyscan_t yyscanner
);
308 void cmDependsFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer
,yyscan_t yyscanner
);
309 void cmDependsFortran_yypop_buffer_state (yyscan_t yyscanner
);
311 static void cmDependsFortran_yyensure_buffer_stack (yyscan_t yyscanner
);
312 static void cmDependsFortran_yy_load_buffer_state (yyscan_t yyscanner
);
313 static void cmDependsFortran_yy_init_buffer (YY_BUFFER_STATE b
,FILE *file
,yyscan_t yyscanner
);
315 #define YY_FLUSH_BUFFER cmDependsFortran_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
317 YY_BUFFER_STATE
cmDependsFortran_yy_scan_buffer (char *base
,yy_size_t size
,yyscan_t yyscanner
);
318 YY_BUFFER_STATE
cmDependsFortran_yy_scan_string (yyconst
char *yy_str
,yyscan_t yyscanner
);
319 YY_BUFFER_STATE
cmDependsFortran_yy_scan_bytes (yyconst
char *bytes
,int len
,yyscan_t yyscanner
);
321 void *cmDependsFortran_yyalloc (yy_size_t
,yyscan_t yyscanner
);
322 void *cmDependsFortran_yyrealloc (void *,yy_size_t
,yyscan_t yyscanner
);
323 void cmDependsFortran_yyfree (void * ,yyscan_t yyscanner
);
325 #define yy_new_buffer cmDependsFortran_yy_create_buffer
327 #define yy_set_interactive(is_interactive) \
329 if ( ! YY_CURRENT_BUFFER ){ \
330 cmDependsFortran_yyensure_buffer_stack (yyscanner); \
331 YY_CURRENT_BUFFER_LVALUE = \
332 cmDependsFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
334 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
337 #define yy_set_bol(at_bol) \
339 if ( ! YY_CURRENT_BUFFER ){\
340 cmDependsFortran_yyensure_buffer_stack (yyscanner); \
341 YY_CURRENT_BUFFER_LVALUE = \
342 cmDependsFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
344 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
347 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
349 /* Begin user sect3 */
351 #define cmDependsFortran_yywrap(n) 1
352 #define YY_SKIP_YYWRAP
354 typedef unsigned char YY_CHAR
;
356 typedef int yy_state_type
;
358 #define yytext_ptr yytext_r
360 static yy_state_type
yy_get_previous_state (yyscan_t yyscanner
);
361 static yy_state_type
yy_try_NUL_trans (yy_state_type current_state
,yyscan_t yyscanner
);
362 static int yy_get_next_buffer (yyscan_t yyscanner
);
363 static void yy_fatal_error (yyconst
char msg
[] ,yyscan_t yyscanner
);
365 /* Done after the current pattern has been matched and before the
366 * corresponding action - sets up yytext.
368 #define YY_DO_BEFORE_ACTION \
369 yyg->yytext_ptr = yy_bp; \
370 yyleng = (size_t) (yy_cp - yy_bp); \
371 yyg->yy_hold_char = *yy_cp; \
373 yyg->yy_c_buf_p = yy_cp;
375 #define YY_NUM_RULES 43
376 #define YY_END_OF_BUFFER 44
377 /* This struct is not used in this scanner,
378 but its presence is necessary. */
381 flex_int32_t yy_verify
;
384 static yyconst flex_int16_t yy_accept
[161] =
386 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
387 44, 38, 40, 39, 42, 1, 38, 31, 2, 33,
388 38, 39, 36, 38, 37, 38, 37, 40, 38, 39,
389 38, 37, 9, 8, 9, 4, 3, 38, 0, 10,
390 0, 0, 0, 0, 0, 31, 31, 32, 34, 36,
391 38, 37, 0, 41, 37, 0, 0, 0, 0, 0,
392 0, 0, 0, 38, 0, 11, 37, 0, 0, 5,
393 0, 0, 0, 27, 0, 0, 31, 31, 31, 31,
394 0, 0, 0, 0, 0, 21, 0, 0, 0, 0,
395 0, 6, 0, 0, 0, 0, 0, 0, 0, 0,
397 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
398 0, 0, 28, 29, 0, 0, 0, 0, 0, 0,
399 0, 22, 23, 0, 0, 0, 0, 0, 0, 0,
400 0, 30, 25, 0, 0, 18, 0, 0, 24, 19,
401 0, 0, 17, 0, 0, 16, 26, 0, 0, 15,
402 20, 0, 7, 35, 7, 13, 0, 12, 14, 0
405 static yyconst flex_int32_t yy_ec
[256] =
407 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
408 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
409 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410 1, 5, 6, 7, 8, 9, 1, 10, 11, 1,
411 1, 12, 1, 13, 1, 1, 1, 14, 14, 14,
412 14, 14, 14, 14, 14, 14, 14, 15, 16, 1,
413 17, 18, 19, 1, 20, 20, 21, 22, 23, 24,
414 20, 20, 25, 20, 20, 26, 20, 27, 20, 20,
415 20, 20, 28, 20, 29, 20, 20, 20, 20, 20,
416 1, 30, 1, 1, 31, 1, 20, 20, 32, 33,
418 34, 35, 20, 20, 36, 20, 20, 37, 20, 38,
419 20, 20, 20, 20, 39, 20, 40, 20, 20, 20,
420 20, 20, 1, 1, 1, 1, 1, 1, 1, 1,
421 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
422 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
423 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
425 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
431 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 static yyconst flex_int32_t yy_meta
[41] =
439 1, 2, 2, 3, 4, 3, 3, 1, 1, 3,
440 3, 1, 3, 5, 1, 3, 3, 1, 1, 6,
441 6, 6, 6, 6, 6, 6, 6, 6, 6, 1,
442 5, 6, 6, 6, 6, 6, 6, 6, 6, 6
445 static yyconst flex_int16_t yy_base
[169] =
447 0, 39, 0, 40, 184, 47, 43, 53, 55, 63,
448 186, 0, 476, 476, 164, 476, 79, 72, 476, 476,
449 143, 476, 130, 126, 0, 83, 119, 85, 149, 139,
450 189, 220, 476, 131, 89, 476, 476, 0, 132, 476,
451 259, 37, 69, 76, 34, 119, 137, 476, 0, 476,
452 121, 0, 150, 476, 0, 154, 298, 0, 75, 138,
453 142, 72, 127, 338, 94, 476, 0, 84, 158, 186,
454 81, 145, 108, 172, 147, 173, 260, 266, 284, 299,
455 272, 173, 178, 286, 245, 258, 285, 285, 78, 71,
456 207, 476, 288, 291, 296, 304, 310, 315, 317, 326,
458 330, 330, 335, 338, 338, 341, 343, 341, 348, 62,
459 52, 346, 476, 476, 353, 355, 357, 352, 359, 359,
460 359, 476, 476, 363, 365, 370, 366, 375, 46, 38,
461 378, 476, 476, 378, 381, 476, 376, 384, 476, 476,
462 384, 387, 476, 115, 0, 476, 476, 388, 393, 476,
463 476, 394, 476, 476, 476, 476, 398, 476, 476, 476,
464 432, 438, 443, 445, 451, 457, 463, 469
467 static yyconst flex_int16_t yy_def
[169] =
469 160, 1, 1, 1, 1, 1, 161, 161, 161, 161,
470 160, 162, 160, 160, 163, 160, 162, 160, 160, 160,
471 162, 160, 160, 162, 164, 162, 164, 160, 162, 160,
472 165, 160, 160, 160, 160, 160, 160, 162, 163, 160,
473 160, 160, 160, 160, 160, 160, 166, 160, 162, 160,
474 162, 164, 160, 160, 27, 160, 160, 57, 160, 160,
475 160, 160, 160, 165, 165, 160, 32, 160, 160, 160,
476 160, 160, 160, 160, 160, 160, 166, 166, 166, 166,
477 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
478 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
480 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
481 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
482 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
483 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
484 160, 160, 160, 167, 168, 160, 160, 160, 160, 160,
485 160, 160, 160, 160, 160, 160, 160, 160, 160, 0,
486 160, 160, 160, 160, 160, 160, 160, 160
489 static yyconst flex_int16_t yy_nxt
[517] =
491 12, 13, 14, 13, 13, 15, 16, 12, 17, 18,
492 19, 12, 20, 12, 21, 22, 23, 12, 24, 25,
493 25, 25, 25, 25, 25, 25, 25, 25, 25, 26,
494 27, 25, 25, 25, 25, 25, 25, 25, 25, 25,
495 28, 28, 145, 28, 28, 34, 29, 29, 28, 30,
496 144, 28, 35, 36, 29, 34, 130, 34, 31, 71,
497 76, 37, 35, 36, 35, 34, 129, 32, 32, 37,
498 71, 76, 35, 46, 46, 111, 46, 47, 32, 32,
499 41, 48, 110, 41, 53, 54, 56, 53, 90, 56,
500 69, 70, 57, 69, 72, 73, 66, 83, 88, 74,
502 42, 43, 75, 44, 93, 72, 73, 45, 83, 88,
503 74, 42, 43, 75, 44, 93, 154, 154, 45, 38,
504 46, 46, 81, 46, 47, 81, 38, 38, 48, 96,
505 38, 89, 55, 38, 40, 68, 38, 38, 78, 46,
506 96, 78, 79, 63, 51, 82, 80, 50, 38, 55,
507 58, 53, 54, 58, 53, 56, 82, 49, 56, 69,
508 70, 57, 69, 84, 85, 86, 40, 99, 87, 94,
509 59, 60, 95, 61, 84, 85, 86, 62, 99, 87,
510 94, 59, 60, 95, 61, 160, 30, 91, 62, 64,
511 91, 66, 160, 97, 100, 92, 64, 64, 98, 101,
513 64, 102, 64, 64, 97, 100, 64, 64, 91, 98,
514 101, 91, 102, 160, 160, 160, 92, 160, 64, 64,
515 65, 65, 66, 65, 65, 65, 65, 65, 65, 65,
516 65, 65, 65, 67, 65, 65, 65, 65, 65, 67,
517 67, 67, 67, 67, 67, 67, 67, 67, 67, 65,
518 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
519 41, 78, 46, 41, 78, 79, 105, 78, 46, 80,
520 78, 79, 160, 81, 160, 80, 81, 105, 160, 106,
521 42, 43, 160, 44, 107, 78, 46, 45, 78, 79,
522 106, 42, 43, 80, 44, 107, 82, 160, 45, 58,
524 78, 46, 58, 78, 79, 108, 109, 82, 80, 160,
525 103, 160, 112, 104, 113, 160, 108, 109, 114, 59,
526 60, 103, 61, 112, 104, 113, 62, 160, 115, 114,
527 59, 60, 116, 61, 160, 160, 117, 62, 64, 115,
528 66, 160, 118, 116, 160, 64, 64, 117, 119, 64,
529 120, 64, 64, 118, 121, 64, 64, 160, 122, 119,
530 123, 120, 124, 125, 126, 121, 127, 64, 64, 122,
531 128, 123, 131, 124, 125, 126, 132, 127, 133, 134,
532 135, 128, 136, 131, 137, 138, 139, 132, 140, 133,
533 134, 135, 141, 136, 142, 137, 138, 139, 143, 140,
535 146, 147, 148, 141, 149, 142, 150, 151, 152, 143,
536 156, 146, 147, 148, 157, 149, 158, 150, 151, 152,
537 159, 156, 160, 160, 160, 157, 160, 158, 160, 160,
538 160, 159, 33, 33, 33, 33, 33, 33, 38, 160,
539 160, 160, 38, 39, 39, 39, 39, 39, 39, 52,
540 52, 65, 65, 65, 65, 65, 65, 77, 77, 77,
541 77, 77, 77, 153, 153, 153, 160, 153, 153, 155,
542 160, 155, 160, 155, 155, 11, 160, 160, 160, 160,
543 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
544 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
546 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
547 160, 160, 160, 160, 160, 160
550 static yyconst flex_int16_t yy_chk
[517] =
552 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
553 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
554 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
555 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
556 2, 4, 130, 2, 4, 7, 2, 4, 6, 6,
557 129, 6, 7, 7, 6, 8, 111, 9, 6, 42,
558 45, 9, 8, 8, 9, 10, 110, 6, 6, 10,
559 42, 45, 10, 18, 18, 90, 18, 18, 6, 6,
560 17, 18, 89, 17, 26, 26, 28, 26, 68, 28,
561 35, 35, 28, 35, 43, 43, 65, 59, 62, 44,
563 17, 17, 44, 17, 71, 43, 43, 17, 59, 62,
564 44, 17, 17, 44, 17, 71, 144, 144, 17, 27,
565 46, 46, 51, 46, 46, 51, 27, 27, 46, 73,
566 27, 63, 27, 27, 39, 34, 27, 27, 47, 47,
567 73, 47, 47, 30, 24, 51, 47, 23, 27, 27,
568 29, 53, 53, 29, 53, 56, 51, 21, 56, 69,
569 69, 56, 69, 60, 60, 61, 15, 75, 61, 72,
570 29, 29, 72, 29, 60, 60, 61, 29, 75, 61,
571 72, 29, 29, 72, 29, 11, 5, 70, 29, 31,
572 70, 31, 0, 74, 76, 70, 31, 31, 74, 82,
574 31, 83, 31, 31, 74, 76, 31, 31, 91, 74,
575 82, 91, 83, 0, 0, 0, 91, 0, 31, 31,
576 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
577 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
578 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
579 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
580 41, 77, 77, 41, 77, 77, 85, 78, 78, 77,
581 78, 78, 0, 81, 0, 78, 81, 85, 0, 86,
582 41, 41, 0, 41, 86, 79, 79, 41, 79, 79,
583 86, 41, 41, 79, 41, 86, 81, 0, 41, 57,
585 80, 80, 57, 80, 80, 87, 88, 81, 80, 0,
586 84, 0, 93, 84, 94, 0, 87, 88, 95, 57,
587 57, 84, 57, 93, 84, 94, 57, 0, 96, 95,
588 57, 57, 97, 57, 0, 0, 98, 57, 64, 96,
589 64, 0, 99, 97, 0, 64, 64, 98, 100, 64,
590 101, 64, 64, 99, 102, 64, 64, 0, 103, 100,
591 104, 101, 105, 106, 107, 102, 108, 64, 64, 103,
592 109, 104, 112, 105, 106, 107, 115, 108, 116, 117,
593 118, 109, 119, 112, 120, 121, 124, 115, 125, 116,
594 117, 118, 126, 119, 127, 120, 121, 124, 128, 125,
596 131, 134, 135, 126, 137, 127, 138, 141, 142, 128,
597 148, 131, 134, 135, 149, 137, 152, 138, 141, 142,
598 157, 148, 0, 0, 0, 149, 0, 152, 0, 0,
599 0, 157, 161, 161, 161, 161, 161, 161, 162, 0,
600 0, 0, 162, 163, 163, 163, 163, 163, 163, 164,
601 164, 165, 165, 165, 165, 165, 165, 166, 166, 166,
602 166, 166, 166, 167, 167, 167, 0, 167, 167, 168,
603 0, 168, 0, 168, 168, 160, 160, 160, 160, 160,
604 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
605 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
607 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
608 160, 160, 160, 160, 160, 160
611 /* The intent behind this definition is that it'll catch
612 * any uses of REJECT which flex missed.
614 #define REJECT reject_used_but_not_detected
615 #define yymore() yymore_used_but_not_detected
616 #define YY_MORE_ADJ 0
617 #define YY_RESTORE_YY_MORE_OFFSET
618 #line 1 "cmDependsFortranLexer.in.l"
619 #line 2 "cmDependsFortranLexer.in.l"
620 /*=========================================================================
622 Program: CMake - Cross-Platform Makefile Generator
623 Module: $RCSfile: cmDependsFortranLexer.cxx,v $
625 Date: $Date: 2009-06-12 14:46:02 $
626 Version: $Revision: 1.14 $
628 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
629 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
631 This software is distributed WITHOUT ANY WARRANTY; without even
632 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
633 PURPOSE. See the above copyright notices for more information.
635 =========================================================================*/
636 /*-------------------------------------------------------------------------
637 Portions of this source have been derived from makedepf90 version 2.8.8,
639 Copyright (C) 2000--2006 Erik Edelmann <erik.edelmann@iki.fi>
641 The code was originally distributed under the GPL but permission
642 from the copyright holder has been obtained to distribute this
643 derived work under the CMake license.
644 -------------------------------------------------------------------------*/
648 This file must be translated to C and modified to build everywhere.
652 flex -i --prefix=cmDependsFortran_yy --header-file=cmDependsFortranLexer.h -ocmDependsFortranLexer.cxx cmDependsFortranLexer.in.l
654 Modify cmDependsFortranLexer.cxx:
656 - remove "yyscanner" argument from these methods:
657 yy_fatal_error, cmDependsFortran_yyalloc, cmDependsFortran_yyrealloc, cmDependsFortran_yyfree
658 - remove "yyscanner = NULL" from end of cmDependsFortran_yylex_destroy
659 - remove all YY_BREAK lines occurring right after return statements
660 - change while ( 1 ) to for(;;)
662 Modify cmDependsFortranLexer.h:
664 - remove the yy_init_globals function
665 - remove the block that includes unistd.h
666 - remove #line directives (avoids bogus warning on old Sun)
670 #include "cmStandardLexer.h"
672 #define cmDependsFortranLexer_cxx
673 #include "cmDependsFortranParser.h" /* Interface to parser object. */
675 /* Replace the lexer input function. */
677 #define YY_INPUT(buf, result, max_size) \
678 { result = cmDependsFortranParser_Input(yyextra, buf, max_size); }
680 /* Include the set of tokens from the parser. */
681 #include "cmDependsFortranParserTokens.h"
683 /*--------------------------------------------------------------------------*/
686 #line 670 "cmDependsFortranLexer.cxx"
694 #ifndef YY_NO_UNISTD_H
695 /* Special case for "unistd.h", since it is non-ANSI. We include it way
696 * down here because we want the user's section 1 to have been scanned first.
697 * The user has a chance to override it with an option.
702 #ifndef YY_EXTRA_TYPE
703 #define YY_EXTRA_TYPE void *
706 /* Holds the entire state of the reentrant scanner. */
710 /* User-defined. Not touched by flex. */
711 YY_EXTRA_TYPE yyextra_r
;
713 /* The rest are the same as the globals declared in the non-reentrant scanner. */
714 FILE *yyin_r
, *yyout_r
;
715 size_t yy_buffer_stack_top
; /**< index of top of stack. */
716 size_t yy_buffer_stack_max
; /**< capacity of stack. */
717 YY_BUFFER_STATE
* yy_buffer_stack
; /**< Stack as an array. */
724 int yy_did_buffer_switch_on_eof
;
725 int yy_start_stack_ptr
;
726 int yy_start_stack_depth
;
728 yy_state_type yy_last_accepting_state
;
729 char* yy_last_accepting_cpos
;
738 }; /* end struct yyguts_t */
740 static int yy_init_globals (yyscan_t yyscanner
);
742 int cmDependsFortran_yylex_init (yyscan_t
* scanner
);
744 int cmDependsFortran_yylex_init_extra (YY_EXTRA_TYPE user_defined
,yyscan_t
* scanner
);
746 /* Accessor methods to globals.
747 These are made visible to non-reentrant scanners for convenience. */
749 int cmDependsFortran_yylex_destroy (yyscan_t yyscanner
);
751 int cmDependsFortran_yyget_debug (yyscan_t yyscanner
);
753 void cmDependsFortran_yyset_debug (int debug_flag
,yyscan_t yyscanner
);
755 YY_EXTRA_TYPE
cmDependsFortran_yyget_extra (yyscan_t yyscanner
);
757 void cmDependsFortran_yyset_extra (YY_EXTRA_TYPE user_defined
,yyscan_t yyscanner
);
759 FILE *cmDependsFortran_yyget_in (yyscan_t yyscanner
);
761 void cmDependsFortran_yyset_in (FILE * in_str
,yyscan_t yyscanner
);
763 FILE *cmDependsFortran_yyget_out (yyscan_t yyscanner
);
765 void cmDependsFortran_yyset_out (FILE * out_str
,yyscan_t yyscanner
);
767 int cmDependsFortran_yyget_leng (yyscan_t yyscanner
);
769 char *cmDependsFortran_yyget_text (yyscan_t yyscanner
);
771 int cmDependsFortran_yyget_lineno (yyscan_t yyscanner
);
773 void cmDependsFortran_yyset_lineno (int line_number
,yyscan_t yyscanner
);
775 /* Macros after this point can all be overridden by user definitions in
779 #ifndef YY_SKIP_YYWRAP
781 extern "C" int cmDependsFortran_yywrap (yyscan_t yyscanner
);
783 extern int cmDependsFortran_yywrap (yyscan_t yyscanner
);
787 static void yyunput (int c
,char *buf_ptr
,yyscan_t yyscanner
);
790 static void yy_flex_strncpy (char *,yyconst
char *,int ,yyscan_t yyscanner
);
793 #ifdef YY_NEED_STRLEN
794 static int yy_flex_strlen (yyconst
char * ,yyscan_t yyscanner
);
800 static int yyinput (yyscan_t yyscanner
);
802 static int input (yyscan_t yyscanner
);
807 /* Amount of stuff to slurp up with each read. */
808 #ifndef YY_READ_BUF_SIZE
809 #define YY_READ_BUF_SIZE 8192
812 /* Copy whatever the last rule matched to the standard output. */
814 /* This used to be an fputs(), but since the string might contain NUL's,
815 * we now use fwrite().
817 #define ECHO fwrite( yytext, yyleng, 1, yyout )
820 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
821 * is returned in "result".
824 #define YY_INPUT(buf,result,max_size) \
825 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
829 for ( n = 0; n < max_size && \
830 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
833 buf[n++] = (char) c; \
834 if ( c == EOF && ferror( yyin ) ) \
835 YY_FATAL_ERROR( "input in flex scanner failed" ); \
841 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
843 if( errno != EINTR) \
845 YY_FATAL_ERROR( "input in flex scanner failed" ); \
856 /* No semi-colon after return; correct usage is to write "yyterminate();" -
857 * we don't want an extra ';' after the "return" because that will cause
858 * some compilers to complain about unreachable statements.
861 #define yyterminate() return YY_NULL
864 /* Number of entries by which start-condition stack grows. */
865 #ifndef YY_START_STACK_INCR
866 #define YY_START_STACK_INCR 25
869 /* Report a fatal error. */
870 #ifndef YY_FATAL_ERROR
871 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
874 /* end tables serialization structures and prototypes */
876 /* Default declaration of generated scanner - a define so the user can
877 * easily add parameters.
880 #define YY_DECL_IS_OURS 1
882 extern int cmDependsFortran_yylex (yyscan_t yyscanner
);
884 #define YY_DECL int cmDependsFortran_yylex (yyscan_t yyscanner)
885 #endif /* !YY_DECL */
887 /* Code executed at the beginning of each rule, after yytext and yyleng
890 #ifndef YY_USER_ACTION
891 #define YY_USER_ACTION
894 /* Code executed at the end of each rule. */
896 #define YY_BREAK break;
899 #define YY_RULE_SETUP \
901 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
902 (yytext[yyleng - 1] == '\n'); \
905 /** The main scanner function which does all the work.
909 register yy_state_type yy_current_state
;
910 register char *yy_cp
, *yy_bp
;
912 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
914 #line 75 "cmDependsFortranLexer.in.l"
917 #line 901 "cmDependsFortranLexer.cxx"
927 if ( ! yyg
->yy_start
)
928 yyg
->yy_start
= 1; /* first start state */
936 if ( ! YY_CURRENT_BUFFER
) {
937 cmDependsFortran_yyensure_buffer_stack (yyscanner
);
938 YY_CURRENT_BUFFER_LVALUE
=
939 cmDependsFortran_yy_create_buffer(yyin
,YY_BUF_SIZE
,yyscanner
);
942 cmDependsFortran_yy_load_buffer_state(yyscanner
);
945 for(;;) /* loops until end-of-file is reached */
947 yy_cp
= yyg
->yy_c_buf_p
;
949 /* Support of yytext. */
950 *yy_cp
= yyg
->yy_hold_char
;
952 /* yy_bp points to the position in yy_ch_buf of the start of
957 yy_current_state
= yyg
->yy_start
;
958 yy_current_state
+= YY_AT_BOL();
962 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
963 if ( yy_accept
[yy_current_state
] )
965 yyg
->yy_last_accepting_state
= yy_current_state
;
966 yyg
->yy_last_accepting_cpos
= yy_cp
;
968 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
970 yy_current_state
= (int) yy_def
[yy_current_state
];
971 if ( yy_current_state
>= 161 )
972 yy_c
= yy_meta
[(unsigned int) yy_c
];
974 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
977 while ( yy_base
[yy_current_state
] != 476 );
980 yy_act
= yy_accept
[yy_current_state
];
982 { /* have to back up */
983 yy_cp
= yyg
->yy_last_accepting_cpos
;
984 yy_current_state
= yyg
->yy_last_accepting_state
;
985 yy_act
= yy_accept
[yy_current_state
];
990 do_action
: /* This label is used only to access EOF actions. */
993 { /* beginning of action switch */
994 case 0: /* must back up */
995 /* undo the effects of YY_DO_BEFORE_ACTION */
996 *yy_cp
= yyg
->yy_hold_char
;
997 yy_cp
= yyg
->yy_last_accepting_cpos
;
998 yy_current_state
= yyg
->yy_last_accepting_state
;
1003 #line 77 "cmDependsFortranLexer.in.l"
1005 cmDependsFortranParser_StringStart(yyextra
);
1006 cmDependsFortranParser_SetOldStartcond(yyextra
, YY_START
);
1012 #line 83 "cmDependsFortranLexer.in.l"
1014 cmDependsFortranParser_StringStart(yyextra
);
1015 cmDependsFortranParser_SetOldStartcond(yyextra
, YY_START
);
1020 #line 90 "cmDependsFortranLexer.in.l"
1023 #line 90 "cmDependsFortranLexer.in.l"
1025 BEGIN(cmDependsFortranParser_GetOldStartcond(yyextra
) );
1026 yylvalp
->string
= strdup(cmDependsFortranParser_StringEnd(yyextra
));
1030 /* rule 5 can match eol */
1031 #line 97 "cmDependsFortranLexer.in.l"
1033 /* rule 6 can match eol */
1035 #line 97 "cmDependsFortranLexer.in.l"
1036 /* Ignore (continued strings, free fmt) */
1039 /* rule 7 can match eol */
1041 #line 99 "cmDependsFortranLexer.in.l"
1043 if (cmDependsFortranParser_GetOldStartcond(yyextra
) == fixed_fmt
)
1044 ; /* Ignore (cont. strings, fixed fmt) */
1047 unput(yytext
[strlen(yytext
)-1]);
1052 /* rule 8 can match eol */
1054 #line 109 "cmDependsFortranLexer.in.l"
1058 return UNTERMINATED_STRING
;
1062 #line 115 "cmDependsFortranLexer.in.l"
1064 cmDependsFortranParser_StringAppend(yyextra
, yytext
[0]);
1068 /* rule 10 can match eol */
1070 #line 119 "cmDependsFortranLexer.in.l"
1071 { return EOSTMT
; } /* Treat comments like */
1073 /* rule 11 can match eol */
1075 #line 120 "cmDependsFortranLexer.in.l"
1076 { return EOSTMT
; } /* empty lines */
1079 #line 122 "cmDependsFortranLexer.in.l"
1080 { return CPP_INCLUDE
; }
1083 #line 123 "cmDependsFortranLexer.in.l"
1084 { return F90PPR_INCLUDE
; }
1087 #line 124 "cmDependsFortranLexer.in.l"
1088 { return COCO_INCLUDE
; }
1091 #line 126 "cmDependsFortranLexer.in.l"
1092 { return CPP_DEFINE
; }
1095 #line 127 "cmDependsFortranLexer.in.l"
1096 { return F90PPR_DEFINE
; }
1099 #line 129 "cmDependsFortranLexer.in.l"
1100 { return CPP_UNDEF
; }
1103 #line 130 "cmDependsFortranLexer.in.l"
1104 { return F90PPR_UNDEF
; }
1107 #line 132 "cmDependsFortranLexer.in.l"
1108 { return CPP_IFDEF
; }
1111 #line 133 "cmDependsFortranLexer.in.l"
1112 { return CPP_IFNDEF
; }
1115 #line 134 "cmDependsFortranLexer.in.l"
1119 #line 135 "cmDependsFortranLexer.in.l"
1120 { return CPP_ELIF
; }
1123 #line 136 "cmDependsFortranLexer.in.l"
1124 { return CPP_ELSE
; }
1127 #line 137 "cmDependsFortranLexer.in.l"
1128 { return CPP_ENDIF
; }
1131 #line 139 "cmDependsFortranLexer.in.l"
1132 { return F90PPR_IFDEF
; }
1135 #line 140 "cmDependsFortranLexer.in.l"
1136 { return F90PPR_IFNDEF
; }
1139 #line 141 "cmDependsFortranLexer.in.l"
1140 { return F90PPR_IF
; }
1143 #line 142 "cmDependsFortranLexer.in.l"
1144 { return F90PPR_ELIF
; }
1147 #line 143 "cmDependsFortranLexer.in.l"
1148 { return F90PPR_ELSE
; }
1151 #line 144 "cmDependsFortranLexer.in.l"
1152 { return F90PPR_ENDIF
; }
1153 /* Line continuations, possible involving comments. */
1155 /* rule 31 can match eol */
1157 #line 147 "cmDependsFortranLexer.in.l"
1161 /* rule 32 can match eol */
1163 #line 148 "cmDependsFortranLexer.in.l"
1168 #line 150 "cmDependsFortranLexer.in.l"
1172 #line 152 "cmDependsFortranLexer.in.l"
1175 /* rule 35 can match eol */
1177 #line 154 "cmDependsFortranLexer.in.l"
1181 #line 156 "cmDependsFortranLexer.in.l"
1182 { return ASSIGNMENT_OP
; }
1185 #line 158 "cmDependsFortranLexer.in.l"
1187 yylvalp
->string
= strdup(yytext
);
1192 #line 163 "cmDependsFortranLexer.in.l"
1195 /* rule 39 can match eol */
1197 #line 165 "cmDependsFortranLexer.in.l"
1201 #line 168 "cmDependsFortranLexer.in.l"
1205 /* rule 41 can match eol */
1207 #line 169 "cmDependsFortranLexer.in.l"
1208 /* Ignore line-endings preceeded by \ */
1212 #line 171 "cmDependsFortranLexer.in.l"
1214 case YY_STATE_EOF(INITIAL
):
1215 case YY_STATE_EOF(free_fmt
):
1216 case YY_STATE_EOF(fixed_fmt
):
1217 case YY_STATE_EOF(str_sq
):
1218 case YY_STATE_EOF(str_dq
):
1219 #line 173 "cmDependsFortranLexer.in.l"
1221 if(!cmDependsFortranParser_FilePop(yyextra
) )
1229 #line 180 "cmDependsFortranLexer.in.l"
1232 #line 1247 "cmDependsFortranLexer.cxx"
1234 case YY_END_OF_BUFFER
:
1236 /* Amount of text matched not including the EOB char. */
1237 int yy_amount_of_matched_text
= (int) (yy_cp
- yyg
->yytext_ptr
) - 1;
1239 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1240 *yy_cp
= yyg
->yy_hold_char
;
1241 YY_RESTORE_YY_MORE_OFFSET
1243 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_NEW
)
1245 /* We're scanning a new file or input source. It's
1246 * possible that this happened because the user
1247 * just pointed yyin at a new source and called
1248 * cmDependsFortran_yylex(). If so, then we have to assure
1249 * consistency between YY_CURRENT_BUFFER and our
1250 * globals. Here is the right place to do so, because
1251 * this is the first action (other than possibly a
1252 * back-up) that will match for the new input source.
1254 yyg
->yy_n_chars
= YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
1255 YY_CURRENT_BUFFER_LVALUE
->yy_input_file
= yyin
;
1256 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
= YY_BUFFER_NORMAL
;
1259 /* Note that here we test for yy_c_buf_p "<=" to the position
1260 * of the first EOB in the buffer, since yy_c_buf_p will
1261 * already have been incremented past the NUL character
1262 * (since all states make transitions on EOB to the
1263 * end-of-buffer state). Contrast this with the test
1266 if ( yyg
->yy_c_buf_p
<= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
] )
1267 { /* This was really a NUL. */
1268 yy_state_type yy_next_state
;
1270 yyg
->yy_c_buf_p
= yyg
->yytext_ptr
+ yy_amount_of_matched_text
;
1272 yy_current_state
= yy_get_previous_state( yyscanner
);
1274 /* Okay, we're now positioned to make the NUL
1275 * transition. We couldn't have
1276 * yy_get_previous_state() go ahead and do it
1277 * for us because it doesn't know how to deal
1278 * with the possibility of jamming (and we don't
1279 * want to build jamming into it because then it
1280 * will run more slowly).
1283 yy_next_state
= yy_try_NUL_trans( yy_current_state
, yyscanner
);
1285 yy_bp
= yyg
->yytext_ptr
+ YY_MORE_ADJ
;
1287 if ( yy_next_state
)
1289 /* Consume the NUL. */
1290 yy_cp
= ++yyg
->yy_c_buf_p
;
1291 yy_current_state
= yy_next_state
;
1297 yy_cp
= yyg
->yy_c_buf_p
;
1298 goto yy_find_action
;
1302 else switch ( yy_get_next_buffer( yyscanner
) )
1304 case EOB_ACT_END_OF_FILE
:
1306 yyg
->yy_did_buffer_switch_on_eof
= 0;
1308 if ( cmDependsFortran_yywrap(yyscanner
) )
1310 /* Note: because we've taken care in
1311 * yy_get_next_buffer() to have set up
1312 * yytext, we can now set up
1313 * yy_c_buf_p so that if some total
1314 * hoser (like flex itself) wants to
1315 * call the scanner after we return the
1316 * YY_NULL, it'll still work - another
1317 * YY_NULL will get returned.
1319 yyg
->yy_c_buf_p
= yyg
->yytext_ptr
+ YY_MORE_ADJ
;
1321 yy_act
= YY_STATE_EOF(YY_START
);
1327 if ( ! yyg
->yy_did_buffer_switch_on_eof
)
1333 case EOB_ACT_CONTINUE_SCAN
:
1335 yyg
->yytext_ptr
+ yy_amount_of_matched_text
;
1337 yy_current_state
= yy_get_previous_state( yyscanner
);
1339 yy_cp
= yyg
->yy_c_buf_p
;
1340 yy_bp
= yyg
->yytext_ptr
+ YY_MORE_ADJ
;
1343 case EOB_ACT_LAST_MATCH
:
1345 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
];
1347 yy_current_state
= yy_get_previous_state( yyscanner
);
1349 yy_cp
= yyg
->yy_c_buf_p
;
1350 yy_bp
= yyg
->yytext_ptr
+ YY_MORE_ADJ
;
1351 goto yy_find_action
;
1358 "fatal flex scanner internal error--no action found" );
1359 } /* end of action switch */
1360 } /* end of scanning one token */
1361 } /* end of cmDependsFortran_yylex */
1363 /* yy_get_next_buffer - try to read in a new buffer
1365 * Returns a code representing an action:
1366 * EOB_ACT_LAST_MATCH -
1367 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1368 * EOB_ACT_END_OF_FILE - end of file
1370 static int yy_get_next_buffer (yyscan_t yyscanner
)
1372 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1373 register char *dest
= YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
;
1374 register char *source
= yyg
->yytext_ptr
;
1375 register int number_to_move
, i
;
1378 if ( yyg
->yy_c_buf_p
> &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
+ 1] )
1380 "fatal flex scanner internal error--end of buffer missed" );
1382 if ( YY_CURRENT_BUFFER_LVALUE
->yy_fill_buffer
== 0 )
1383 { /* Don't try to fill the buffer, so this is an EOF. */
1384 if ( yyg
->yy_c_buf_p
- yyg
->yytext_ptr
- YY_MORE_ADJ
== 1 )
1386 /* We matched a single character, the EOB, so
1387 * treat this as a final EOF.
1389 return EOB_ACT_END_OF_FILE
;
1394 /* We matched some text prior to the EOB, first
1397 return EOB_ACT_LAST_MATCH
;
1401 /* Try to read more data. */
1403 /* First move last chars to start of buffer. */
1404 number_to_move
= (int) (yyg
->yy_c_buf_p
- yyg
->yytext_ptr
) - 1;
1406 for ( i
= 0; i
< number_to_move
; ++i
)
1407 *(dest
++) = *(source
++);
1409 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
1410 /* don't do the read, it's not guaranteed to return an EOF,
1413 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= yyg
->yy_n_chars
= 0;
1418 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
- number_to_move
- 1;
1420 while ( num_to_read
<= 0 )
1421 { /* Not enough room in the buffer - grow it. */
1423 /* just a shorter name for the current buffer */
1424 YY_BUFFER_STATE b
= YY_CURRENT_BUFFER
;
1426 int yy_c_buf_p_offset
=
1427 (int) (yyg
->yy_c_buf_p
- b
->yy_ch_buf
);
1429 if ( b
->yy_is_our_buffer
)
1431 int new_size
= b
->yy_buf_size
* 2;
1433 if ( new_size
<= 0 )
1434 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
1436 b
->yy_buf_size
*= 2;
1438 b
->yy_ch_buf
= (char *)
1439 /* Include room in for 2 EOB chars. */
1440 cmDependsFortran_yyrealloc((void *) b
->yy_ch_buf
,b
->yy_buf_size
+ 2 ,yyscanner
);
1443 /* Can't grow it, we don't own it. */
1446 if ( ! b
->yy_ch_buf
)
1448 "fatal error - scanner input buffer overflow" );
1450 yyg
->yy_c_buf_p
= &b
->yy_ch_buf
[yy_c_buf_p_offset
];
1452 num_to_read
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
-
1457 if ( num_to_read
> YY_READ_BUF_SIZE
)
1458 num_to_read
= YY_READ_BUF_SIZE
;
1460 /* Read in more data. */
1461 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
]),
1462 yyg
->yy_n_chars
, (size_t) num_to_read
);
1464 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= yyg
->yy_n_chars
;
1467 if ( yyg
->yy_n_chars
== 0 )
1469 if ( number_to_move
== YY_MORE_ADJ
)
1471 ret_val
= EOB_ACT_END_OF_FILE
;
1472 cmDependsFortran_yyrestart(yyin
,yyscanner
);
1477 ret_val
= EOB_ACT_LAST_MATCH
;
1478 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
=
1479 YY_BUFFER_EOF_PENDING
;
1484 ret_val
= EOB_ACT_CONTINUE_SCAN
;
1486 if ((yy_size_t
) (yyg
->yy_n_chars
+ number_to_move
) > YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
) {
1487 /* Extend the array by 50%, plus the number we really need. */
1488 yy_size_t new_size
= yyg
->yy_n_chars
+ number_to_move
+ (yyg
->yy_n_chars
>> 1);
1489 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
= (char *) cmDependsFortran_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
,new_size
,yyscanner
);
1490 if ( ! YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
1491 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1494 yyg
->yy_n_chars
+= number_to_move
;
1495 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
] = YY_END_OF_BUFFER_CHAR
;
1496 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
+ 1] = YY_END_OF_BUFFER_CHAR
;
1498 yyg
->yytext_ptr
= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[0];
1503 /* yy_get_previous_state - get the state just before the EOB char was reached */
1505 static yy_state_type
yy_get_previous_state (yyscan_t yyscanner
)
1507 register yy_state_type yy_current_state
;
1508 register char *yy_cp
;
1509 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1511 yy_current_state
= yyg
->yy_start
;
1512 yy_current_state
+= YY_AT_BOL();
1514 for ( yy_cp
= yyg
->yytext_ptr
+ YY_MORE_ADJ
; yy_cp
< yyg
->yy_c_buf_p
; ++yy_cp
)
1516 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
1517 if ( yy_accept
[yy_current_state
] )
1519 yyg
->yy_last_accepting_state
= yy_current_state
;
1520 yyg
->yy_last_accepting_cpos
= yy_cp
;
1522 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1524 yy_current_state
= (int) yy_def
[yy_current_state
];
1525 if ( yy_current_state
>= 161 )
1526 yy_c
= yy_meta
[(unsigned int) yy_c
];
1528 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1531 return yy_current_state
;
1534 /* yy_try_NUL_trans - try to make a transition on the NUL character
1537 * next_state = yy_try_NUL_trans( current_state );
1539 static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state
, yyscan_t yyscanner
)
1541 register int yy_is_jam
;
1542 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
; /* This var may be unused depending upon options. */
1543 register char *yy_cp
= yyg
->yy_c_buf_p
;
1545 register YY_CHAR yy_c
= 1;
1546 if ( yy_accept
[yy_current_state
] )
1548 yyg
->yy_last_accepting_state
= yy_current_state
;
1549 yyg
->yy_last_accepting_cpos
= yy_cp
;
1551 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1553 yy_current_state
= (int) yy_def
[yy_current_state
];
1554 if ( yy_current_state
>= 161 )
1555 yy_c
= yy_meta
[(unsigned int) yy_c
];
1557 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1558 yy_is_jam
= (yy_current_state
== 160);
1560 return yy_is_jam
? 0 : yy_current_state
;
1563 static void yyunput (int c
, register char * yy_bp
, yyscan_t yyscanner
)
1565 register char *yy_cp
;
1566 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1568 yy_cp
= yyg
->yy_c_buf_p
;
1570 /* undo effects of setting up yytext */
1571 *yy_cp
= yyg
->yy_hold_char
;
1573 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
1574 { /* need to shift things up to make room */
1575 /* +2 for EOB chars. */
1576 register int number_to_move
= yyg
->yy_n_chars
+ 2;
1577 register char *dest
= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[
1578 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
+ 2];
1579 register char *source
=
1580 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
];
1582 while ( source
> YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
1583 *--dest
= *--source
;
1585 yy_cp
+= (int) (dest
- source
);
1586 yy_bp
+= (int) (dest
- source
);
1587 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
=
1588 yyg
->yy_n_chars
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
;
1590 if ( yy_cp
< YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
+ 2 )
1591 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1594 *--yy_cp
= (char) c
;
1596 yyg
->yytext_ptr
= yy_bp
;
1597 yyg
->yy_hold_char
= *yy_cp
;
1598 yyg
->yy_c_buf_p
= yy_cp
;
1603 static int yyinput (yyscan_t yyscanner
)
1605 static int input (yyscan_t yyscanner
)
1610 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1612 *yyg
->yy_c_buf_p
= yyg
->yy_hold_char
;
1614 if ( *yyg
->yy_c_buf_p
== YY_END_OF_BUFFER_CHAR
)
1616 /* yy_c_buf_p now points to the character we want to return.
1617 * If this occurs *before* the EOB characters, then it's a
1618 * valid NUL; if not, then we've hit the end of the buffer.
1620 if ( yyg
->yy_c_buf_p
< &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[yyg
->yy_n_chars
] )
1621 /* This was really a NUL. */
1622 *yyg
->yy_c_buf_p
= '\0';
1625 { /* need more input */
1626 int offset
= yyg
->yy_c_buf_p
- yyg
->yytext_ptr
;
1629 switch ( yy_get_next_buffer( yyscanner
) )
1631 case EOB_ACT_LAST_MATCH
:
1632 /* This happens because yy_g_n_b()
1633 * sees that we've accumulated a
1634 * token and flags that we need to
1635 * try matching the token before
1636 * proceeding. But for input(),
1637 * there's no matching to consider.
1638 * So convert the EOB_ACT_LAST_MATCH
1639 * to EOB_ACT_END_OF_FILE.
1642 /* Reset buffer status. */
1643 cmDependsFortran_yyrestart(yyin
,yyscanner
);
1647 case EOB_ACT_END_OF_FILE
:
1649 if ( cmDependsFortran_yywrap(yyscanner
) )
1652 if ( ! yyg
->yy_did_buffer_switch_on_eof
)
1655 return yyinput(yyscanner
);
1657 return input(yyscanner
);
1661 case EOB_ACT_CONTINUE_SCAN
:
1662 yyg
->yy_c_buf_p
= yyg
->yytext_ptr
+ offset
;
1668 c
= *(unsigned char *) yyg
->yy_c_buf_p
; /* cast for 8-bit char's */
1669 *yyg
->yy_c_buf_p
= '\0'; /* preserve yytext */
1670 yyg
->yy_hold_char
= *++yyg
->yy_c_buf_p
;
1672 YY_CURRENT_BUFFER_LVALUE
->yy_at_bol
= (c
== '\n');
1676 #endif /* ifndef YY_NO_INPUT */
1678 /** Immediately switch to a different input stream.
1679 * @param input_file A readable stream.
1680 * @param yyscanner The scanner object.
1681 * @note This function does not reset the start condition to @c INITIAL .
1683 void cmDependsFortran_yyrestart (FILE * input_file
, yyscan_t yyscanner
)
1685 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1687 if ( ! YY_CURRENT_BUFFER
){
1688 cmDependsFortran_yyensure_buffer_stack (yyscanner
);
1689 YY_CURRENT_BUFFER_LVALUE
=
1690 cmDependsFortran_yy_create_buffer(yyin
,YY_BUF_SIZE
,yyscanner
);
1693 cmDependsFortran_yy_init_buffer(YY_CURRENT_BUFFER
,input_file
,yyscanner
);
1694 cmDependsFortran_yy_load_buffer_state(yyscanner
);
1697 /** Switch to a different input buffer.
1698 * @param new_buffer The new input buffer.
1699 * @param yyscanner The scanner object.
1701 void cmDependsFortran_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer
, yyscan_t yyscanner
)
1703 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1705 /* TODO. We should be able to replace this entire function body
1707 * cmDependsFortran_yypop_buffer_state();
1708 * cmDependsFortran_yypush_buffer_state(new_buffer);
1710 cmDependsFortran_yyensure_buffer_stack (yyscanner
);
1711 if ( YY_CURRENT_BUFFER
== new_buffer
)
1714 if ( YY_CURRENT_BUFFER
)
1716 /* Flush out information for old buffer. */
1717 *yyg
->yy_c_buf_p
= yyg
->yy_hold_char
;
1718 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= yyg
->yy_c_buf_p
;
1719 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= yyg
->yy_n_chars
;
1722 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
1723 cmDependsFortran_yy_load_buffer_state(yyscanner
);
1725 /* We don't actually know whether we did this switch during
1726 * EOF (cmDependsFortran_yywrap()) processing, but the only time this flag
1727 * is looked at is after cmDependsFortran_yywrap() is called, so it's safe
1728 * to go ahead and always set it.
1730 yyg
->yy_did_buffer_switch_on_eof
= 1;
1733 static void cmDependsFortran_yy_load_buffer_state (yyscan_t yyscanner
)
1735 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1736 yyg
->yy_n_chars
= YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
1737 yyg
->yytext_ptr
= yyg
->yy_c_buf_p
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
;
1738 yyin
= YY_CURRENT_BUFFER_LVALUE
->yy_input_file
;
1739 yyg
->yy_hold_char
= *yyg
->yy_c_buf_p
;
1742 /** Allocate and initialize an input buffer state.
1743 * @param file A readable stream.
1744 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1745 * @param yyscanner The scanner object.
1746 * @return the allocated buffer state.
1748 YY_BUFFER_STATE
cmDependsFortran_yy_create_buffer (FILE * file
, int size
, yyscan_t yyscanner
)
1752 b
= (YY_BUFFER_STATE
) cmDependsFortran_yyalloc(sizeof( struct yy_buffer_state
) ,yyscanner
);
1754 YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yy_create_buffer()" );
1756 b
->yy_buf_size
= size
;
1758 /* yy_ch_buf has to be 2 characters longer than the size given because
1759 * we need to put in 2 end-of-buffer characters.
1761 b
->yy_ch_buf
= (char *) cmDependsFortran_yyalloc(b
->yy_buf_size
+ 2 ,yyscanner
);
1762 if ( ! b
->yy_ch_buf
)
1763 YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yy_create_buffer()" );
1765 b
->yy_is_our_buffer
= 1;
1767 cmDependsFortran_yy_init_buffer(b
,file
,yyscanner
);
1772 /** Destroy the buffer.
1773 * @param b a buffer created with cmDependsFortran_yy_create_buffer()
1774 * @param yyscanner The scanner object.
1776 void cmDependsFortran_yy_delete_buffer (YY_BUFFER_STATE b
, yyscan_t yyscanner
)
1778 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1783 if ( b
== YY_CURRENT_BUFFER
) /* Not sure if we should pop here. */
1784 YY_CURRENT_BUFFER_LVALUE
= (YY_BUFFER_STATE
) 0;
1786 if ( b
->yy_is_our_buffer
)
1787 cmDependsFortran_yyfree((void *) b
->yy_ch_buf
,yyscanner
);
1789 cmDependsFortran_yyfree((void *) b
,yyscanner
);
1793 extern int isatty (int );
1794 #endif /* __cplusplus */
1796 /* Initializes or reinitializes a buffer.
1797 * This function is sometimes called more than once on the same buffer,
1798 * such as during a cmDependsFortran_yyrestart() or at EOF.
1800 static void cmDependsFortran_yy_init_buffer (YY_BUFFER_STATE b
, FILE * file
, yyscan_t yyscanner
)
1804 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1806 cmDependsFortran_yy_flush_buffer(b
,yyscanner
);
1808 b
->yy_input_file
= file
;
1809 b
->yy_fill_buffer
= 1;
1811 /* If b is the current buffer, then cmDependsFortran_yy_init_buffer was _probably_
1812 * called from cmDependsFortran_yyrestart() or through yy_get_next_buffer.
1813 * In that case, we don't want to reset the lineno or column.
1815 if (b
!= YY_CURRENT_BUFFER
){
1816 b
->yy_bs_lineno
= 1;
1817 b
->yy_bs_column
= 0;
1820 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
1825 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1826 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1827 * @param yyscanner The scanner object.
1829 void cmDependsFortran_yy_flush_buffer (YY_BUFFER_STATE b
, yyscan_t yyscanner
)
1831 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1837 /* We always need two end-of-buffer characters. The first causes
1838 * a transition to the end-of-buffer state. The second causes
1839 * a jam in that state.
1841 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
1842 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
1844 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
1847 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1849 if ( b
== YY_CURRENT_BUFFER
)
1850 cmDependsFortran_yy_load_buffer_state(yyscanner
);
1853 /** Pushes the new state onto the stack. The new state becomes
1854 * the current state. This function will allocate the stack
1856 * @param new_buffer The new state.
1857 * @param yyscanner The scanner object.
1859 void cmDependsFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer
, yyscan_t yyscanner
)
1861 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1862 if (new_buffer
== NULL
)
1865 cmDependsFortran_yyensure_buffer_stack(yyscanner
);
1867 /* This block is copied from cmDependsFortran_yy_switch_to_buffer. */
1868 if ( YY_CURRENT_BUFFER
)
1870 /* Flush out information for old buffer. */
1871 *yyg
->yy_c_buf_p
= yyg
->yy_hold_char
;
1872 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= yyg
->yy_c_buf_p
;
1873 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= yyg
->yy_n_chars
;
1876 /* Only push if top exists. Otherwise, replace top. */
1877 if (YY_CURRENT_BUFFER
)
1878 yyg
->yy_buffer_stack_top
++;
1879 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
1881 /* copied from cmDependsFortran_yy_switch_to_buffer. */
1882 cmDependsFortran_yy_load_buffer_state(yyscanner
);
1883 yyg
->yy_did_buffer_switch_on_eof
= 1;
1886 /** Removes and deletes the top of the stack, if present.
1887 * The next element becomes the new top.
1888 * @param yyscanner The scanner object.
1890 void cmDependsFortran_yypop_buffer_state (yyscan_t yyscanner
)
1892 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1893 if (!YY_CURRENT_BUFFER
)
1896 cmDependsFortran_yy_delete_buffer(YY_CURRENT_BUFFER
,yyscanner
);
1897 YY_CURRENT_BUFFER_LVALUE
= NULL
;
1898 if (yyg
->yy_buffer_stack_top
> 0)
1899 --yyg
->yy_buffer_stack_top
;
1901 if (YY_CURRENT_BUFFER
) {
1902 cmDependsFortran_yy_load_buffer_state(yyscanner
);
1903 yyg
->yy_did_buffer_switch_on_eof
= 1;
1907 /* Allocates the stack if it does not exist.
1908 * Guarantees space for at least one push.
1910 static void cmDependsFortran_yyensure_buffer_stack (yyscan_t yyscanner
)
1913 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
1915 if (!yyg
->yy_buffer_stack
) {
1917 /* First allocation is just for 2 elements, since we don't know if this
1918 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1919 * immediate realloc on the next call.
1922 yyg
->yy_buffer_stack
= (struct yy_buffer_state
**)cmDependsFortran_yyalloc
1923 (num_to_alloc
* sizeof(struct yy_buffer_state
*)
1925 if ( ! yyg
->yy_buffer_stack
)
1926 YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yyensure_buffer_stack()" );
1928 memset(yyg
->yy_buffer_stack
, 0, num_to_alloc
* sizeof(struct yy_buffer_state
*));
1930 yyg
->yy_buffer_stack_max
= num_to_alloc
;
1931 yyg
->yy_buffer_stack_top
= 0;
1935 if (yyg
->yy_buffer_stack_top
>= (yyg
->yy_buffer_stack_max
) - 1){
1937 /* Increase the buffer to prepare for a possible push. */
1938 int grow_size
= 8 /* arbitrary grow size */;
1940 num_to_alloc
= yyg
->yy_buffer_stack_max
+ grow_size
;
1941 yyg
->yy_buffer_stack
= (struct yy_buffer_state
**)cmDependsFortran_yyrealloc
1942 (yyg
->yy_buffer_stack
,
1943 num_to_alloc
* sizeof(struct yy_buffer_state
*)
1945 if ( ! yyg
->yy_buffer_stack
)
1946 YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yyensure_buffer_stack()" );
1948 /* zero only the new slots.*/
1949 memset(yyg
->yy_buffer_stack
+ yyg
->yy_buffer_stack_max
, 0, grow_size
* sizeof(struct yy_buffer_state
*));
1950 yyg
->yy_buffer_stack_max
= num_to_alloc
;
1954 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1955 * @param base the character buffer
1956 * @param size the size in bytes of the character buffer
1957 * @param yyscanner The scanner object.
1958 * @return the newly allocated buffer state object.
1960 YY_BUFFER_STATE
cmDependsFortran_yy_scan_buffer (char * base
, yy_size_t size
, yyscan_t yyscanner
)
1965 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
1966 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
1967 /* They forgot to leave room for the EOB's. */
1970 b
= (YY_BUFFER_STATE
) cmDependsFortran_yyalloc(sizeof( struct yy_buffer_state
) ,yyscanner
);
1972 YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yy_scan_buffer()" );
1974 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
1975 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
1976 b
->yy_is_our_buffer
= 0;
1977 b
->yy_input_file
= 0;
1978 b
->yy_n_chars
= b
->yy_buf_size
;
1979 b
->yy_is_interactive
= 0;
1981 b
->yy_fill_buffer
= 0;
1982 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1984 cmDependsFortran_yy_switch_to_buffer(b
,yyscanner
);
1989 /** Setup the input buffer state to scan a string. The next call to cmDependsFortran_yylex() will
1990 * scan from a @e copy of @a str.
1991 * @param yystr a NUL-terminated string to scan
1992 * @param yyscanner The scanner object.
1993 * @return the newly allocated buffer state object.
1994 * @note If you want to scan bytes that may contain NUL values, then use
1995 * cmDependsFortran_yy_scan_bytes() instead.
1997 YY_BUFFER_STATE
cmDependsFortran_yy_scan_string (yyconst
char * yystr
, yyscan_t yyscanner
)
2000 return cmDependsFortran_yy_scan_bytes(yystr
,strlen(yystr
) ,yyscanner
);
2003 /** Setup the input buffer state to scan the given bytes. The next call to cmDependsFortran_yylex() will
2004 * scan from a @e copy of @a bytes.
2005 * @param bytes the byte buffer to scan
2006 * @param len the number of bytes in the buffer pointed to by @a bytes.
2007 * @param yyscanner The scanner object.
2008 * @return the newly allocated buffer state object.
2010 YY_BUFFER_STATE
cmDependsFortran_yy_scan_bytes (yyconst
char * yybytes
, int _yybytes_len
, yyscan_t yyscanner
)
2017 /* Get memory for full buffer, including space for trailing EOB's. */
2018 n
= _yybytes_len
+ 2;
2019 buf
= (char *) cmDependsFortran_yyalloc(n
,yyscanner
);
2021 YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yy_scan_bytes()" );
2023 for ( i
= 0; i
< _yybytes_len
; ++i
)
2024 buf
[i
] = yybytes
[i
];
2026 buf
[_yybytes_len
] = buf
[_yybytes_len
+1] = YY_END_OF_BUFFER_CHAR
;
2028 b
= cmDependsFortran_yy_scan_buffer(buf
,n
,yyscanner
);
2030 YY_FATAL_ERROR( "bad buffer in cmDependsFortran_yy_scan_bytes()" );
2032 /* It's okay to grow etc. this buffer, and we should throw it
2033 * away when we're done.
2035 b
->yy_is_our_buffer
= 1;
2040 #ifndef YY_EXIT_FAILURE
2041 #define YY_EXIT_FAILURE 2
2044 static void yy_fatal_error (yyconst
char* msg
, yyscan_t
)
2046 (void) fprintf( stderr
, "%s\n", msg
);
2047 exit( YY_EXIT_FAILURE
);
2050 /* Redefine yyless() so it works in section 3 code. */
2056 /* Undo effects of setting up yytext. */ \
2057 int yyless_macro_arg = (n); \
2058 YY_LESS_LINENO(yyless_macro_arg);\
2059 yytext[yyleng] = yyg->yy_hold_char; \
2060 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2061 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2062 *yyg->yy_c_buf_p = '\0'; \
2063 yyleng = yyless_macro_arg; \
2067 /* Accessor methods (get/set functions) to struct members. */
2069 /** Get the user-defined data for this scanner.
2070 * @param yyscanner The scanner object.
2072 YY_EXTRA_TYPE
cmDependsFortran_yyget_extra (yyscan_t yyscanner
)
2074 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2078 /** Get the current line number.
2079 * @param yyscanner The scanner object.
2081 int cmDependsFortran_yyget_lineno (yyscan_t yyscanner
)
2083 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2085 if (! YY_CURRENT_BUFFER
)
2091 /** Get the current column number.
2092 * @param yyscanner The scanner object.
2094 int cmDependsFortran_yyget_column (yyscan_t yyscanner
)
2096 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2098 if (! YY_CURRENT_BUFFER
)
2104 /** Get the input stream.
2105 * @param yyscanner The scanner object.
2107 FILE *cmDependsFortran_yyget_in (yyscan_t yyscanner
)
2109 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2113 /** Get the output stream.
2114 * @param yyscanner The scanner object.
2116 FILE *cmDependsFortran_yyget_out (yyscan_t yyscanner
)
2118 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2122 /** Get the length of the current token.
2123 * @param yyscanner The scanner object.
2125 int cmDependsFortran_yyget_leng (yyscan_t yyscanner
)
2127 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2131 /** Get the current token.
2132 * @param yyscanner The scanner object.
2135 char *cmDependsFortran_yyget_text (yyscan_t yyscanner
)
2137 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2141 /** Set the user-defined data. This data is never touched by the scanner.
2142 * @param user_defined The data to be associated with this scanner.
2143 * @param yyscanner The scanner object.
2145 void cmDependsFortran_yyset_extra (YY_EXTRA_TYPE user_defined
, yyscan_t yyscanner
)
2147 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2148 yyextra
= user_defined
;
2151 /** Set the current line number.
2152 * @param line_number
2153 * @param yyscanner The scanner object.
2155 void cmDependsFortran_yyset_lineno (int line_number
, yyscan_t yyscanner
)
2157 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2159 /* lineno is only valid if an input buffer exists. */
2160 if (! YY_CURRENT_BUFFER
)
2161 yy_fatal_error( "cmDependsFortran_yyset_lineno called with no buffer" , yyscanner
);
2163 yylineno
= line_number
;
2166 /** Set the current column.
2167 * @param line_number
2168 * @param yyscanner The scanner object.
2170 void cmDependsFortran_yyset_column (int column_no
, yyscan_t yyscanner
)
2172 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2174 /* column is only valid if an input buffer exists. */
2175 if (! YY_CURRENT_BUFFER
)
2176 yy_fatal_error( "cmDependsFortran_yyset_column called with no buffer" , yyscanner
);
2178 yycolumn
= column_no
;
2181 /** Set the input stream. This does not discard the current
2183 * @param in_str A readable stream.
2184 * @param yyscanner The scanner object.
2185 * @see cmDependsFortran_yy_switch_to_buffer
2187 void cmDependsFortran_yyset_in (FILE * in_str
, yyscan_t yyscanner
)
2189 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2193 void cmDependsFortran_yyset_out (FILE * out_str
, yyscan_t yyscanner
)
2195 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2199 int cmDependsFortran_yyget_debug (yyscan_t yyscanner
)
2201 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2202 return yy_flex_debug
;
2205 void cmDependsFortran_yyset_debug (int bdebug
, yyscan_t yyscanner
)
2207 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2208 yy_flex_debug
= bdebug
;
2211 /* Accessor methods for yylval and yylloc */
2213 /* User-visible API */
2215 /* cmDependsFortran_yylex_init is special because it creates the scanner itself, so it is
2216 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2217 * That's why we explicitly handle the declaration, instead of using our macros.
2220 int cmDependsFortran_yylex_init(yyscan_t
* ptr_yy_globals
)
2223 if (ptr_yy_globals
== NULL
){
2228 *ptr_yy_globals
= (yyscan_t
) cmDependsFortran_yyalloc ( sizeof( struct yyguts_t
), NULL
);
2230 if (*ptr_yy_globals
== NULL
){
2235 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2236 memset(*ptr_yy_globals
,0x00,sizeof(struct yyguts_t
));
2238 return yy_init_globals ( *ptr_yy_globals
);
2241 /* cmDependsFortran_yylex_init_extra has the same functionality as cmDependsFortran_yylex_init, but follows the
2242 * convention of taking the scanner as the last argument. Note however, that
2243 * this is a *pointer* to a scanner, as it will be allocated by this call (and
2244 * is the reason, too, why this function also must handle its own declaration).
2245 * The user defined value in the first argument will be available to cmDependsFortran_yyalloc in
2246 * the yyextra field.
2249 int cmDependsFortran_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined
,yyscan_t
* ptr_yy_globals
)
2252 struct yyguts_t dummy_yyguts
;
2254 cmDependsFortran_yyset_extra (yy_user_defined
, &dummy_yyguts
);
2256 if (ptr_yy_globals
== NULL
){
2261 *ptr_yy_globals
= (yyscan_t
) cmDependsFortran_yyalloc ( sizeof( struct yyguts_t
), &dummy_yyguts
);
2263 if (*ptr_yy_globals
== NULL
){
2268 /* By setting to 0xAA, we expose bugs in
2269 yy_init_globals. Leave at 0x00 for releases. */
2270 memset(*ptr_yy_globals
,0x00,sizeof(struct yyguts_t
));
2272 cmDependsFortran_yyset_extra (yy_user_defined
, *ptr_yy_globals
);
2274 return yy_init_globals ( *ptr_yy_globals
);
2277 static int yy_init_globals (yyscan_t yyscanner
)
2279 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2280 /* Initialization is the same as for the non-reentrant scanner.
2281 * This function is called from cmDependsFortran_yylex_destroy(), so don't allocate here.
2284 yyg
->yy_buffer_stack
= 0;
2285 yyg
->yy_buffer_stack_top
= 0;
2286 yyg
->yy_buffer_stack_max
= 0;
2287 yyg
->yy_c_buf_p
= (char *) 0;
2291 yyg
->yy_start_stack_ptr
= 0;
2292 yyg
->yy_start_stack_depth
= 0;
2293 yyg
->yy_start_stack
= NULL
;
2295 /* Defined in main.c */
2304 /* For future reference: Set errno on error, since we are called by
2305 * cmDependsFortran_yylex_init()
2310 /* cmDependsFortran_yylex_destroy is for both reentrant and non-reentrant scanners. */
2311 int cmDependsFortran_yylex_destroy (yyscan_t yyscanner
)
2313 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2315 /* Pop the buffer stack, destroying each element. */
2316 while(YY_CURRENT_BUFFER
){
2317 cmDependsFortran_yy_delete_buffer(YY_CURRENT_BUFFER
,yyscanner
);
2318 YY_CURRENT_BUFFER_LVALUE
= NULL
;
2319 cmDependsFortran_yypop_buffer_state(yyscanner
);
2322 /* Destroy the stack itself. */
2323 cmDependsFortran_yyfree(yyg
->yy_buffer_stack
,yyscanner
);
2324 yyg
->yy_buffer_stack
= NULL
;
2326 /* Destroy the start condition stack. */
2327 cmDependsFortran_yyfree(yyg
->yy_start_stack
,yyscanner
);
2328 yyg
->yy_start_stack
= NULL
;
2330 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2331 * cmDependsFortran_yylex() is called, initialization will occur. */
2332 yy_init_globals( yyscanner
);
2334 /* Destroy the main struct (reentrant only). */
2335 cmDependsFortran_yyfree ( yyscanner
, yyscanner
);
2340 * Internal utility routines.
2344 static void yy_flex_strncpy (char* s1
, yyconst
char * s2
, int n
, yyscan_t yyscanner
)
2347 for ( i
= 0; i
< n
; ++i
)
2352 #ifdef YY_NEED_STRLEN
2353 static int yy_flex_strlen (yyconst
char * s
, yyscan_t yyscanner
)
2356 for ( n
= 0; s
[n
]; ++n
)
2363 void *cmDependsFortran_yyalloc (yy_size_t size
, yyscan_t
)
2365 return (void *) malloc( size
);
2368 void *cmDependsFortran_yyrealloc (void * ptr
, yy_size_t size
, yyscan_t
)
2370 /* The cast to (char *) in the following accommodates both
2371 * implementations that use char* generic pointers, and those
2372 * that use void* generic pointers. It works with the latter
2373 * because both ANSI C and C++ allow castless assignment from
2374 * any pointer type to void*, and deal with argument conversions
2375 * as though doing an assignment.
2377 return (void *) realloc( (char *) ptr
, size
);
2380 void cmDependsFortran_yyfree (void * ptr
, yyscan_t
)
2382 free( (char *) ptr
); /* see cmDependsFortran_yyrealloc() for (char *) cast */
2385 #define YYTABLES_NAME "yytables"
2387 #line 180 "cmDependsFortranLexer.in.l"
2391 /*--------------------------------------------------------------------------*/
2392 YY_BUFFER_STATE
cmDependsFortranLexer_GetCurrentBuffer(yyscan_t yyscanner
)
2394 /* Hack into the internal flex-generated scanner to get the buffer. */
2395 struct yyguts_t
* yyg
= (struct yyguts_t
*)yyscanner
;
2396 return YY_CURRENT_BUFFER
;