Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / cmDependsFortranLexer.cxx
blobdc8903b8c2a0dcacedf4545d33b74035148d070b
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmDependsFortranLexer.cxx,v $
5 Language: C++
6 Date: $Date: 2008-04-24 03:53:20 $
7 Version: $Revision: 1.13 $
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 */
25 #define FLEX_SCANNER
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
30 #define FLEX_BETA
31 #endif
33 /* First, we deal with platform-specific or compiler-specific issues. */
35 /* begin standard C headers. */
36 #include <stdio.h>
37 #include <string.h>
38 #include <errno.h>
39 #include <stdlib.h>
41 /* end standard C headers. */
43 /* flex integer type definitions */
45 #ifndef FLEXINT_H
46 #define FLEXINT_H
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
57 #endif
59 #include <inttypes.h>
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;
66 #else
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;
73 #endif /* ! C99 */
75 /* Limits of integral types. */
76 #ifndef INT8_MIN
77 #define INT8_MIN (-128)
78 #endif
79 #ifndef INT16_MIN
80 #define INT16_MIN (-32767-1)
81 #endif
82 #ifndef INT32_MIN
83 #define INT32_MIN (-2147483647-1)
84 #endif
85 #ifndef INT8_MAX
86 #define INT8_MAX (127)
87 #endif
88 #ifndef INT16_MAX
89 #define INT16_MAX (32767)
90 #endif
91 #ifndef INT32_MAX
92 #define INT32_MAX (2147483647)
93 #endif
94 #ifndef UINT8_MAX
95 #define UINT8_MAX (255U)
96 #endif
97 #ifndef UINT16_MAX
98 #define UINT16_MAX (65535U)
99 #endif
100 #ifndef UINT32_MAX
101 #define UINT32_MAX (4294967295U)
102 #endif
104 #endif /* ! FLEXINT_H */
106 #ifdef __cplusplus
108 /* The "const" storage-class-modifier is valid. */
109 #define YY_USE_CONST
111 #else /* ! __cplusplus */
113 /* C99 requires __STDC__ to be defined as 1. */
114 #if defined (__STDC__)
116 #define YY_USE_CONST
118 #endif /* defined (__STDC__) */
119 #endif /* ! __cplusplus */
121 #ifdef YY_USE_CONST
122 #define yyconst const
123 #else
124 #define yyconst
125 #endif
127 /* Returned upon end-of-file. */
128 #define YY_NULL 0
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
133 * double cast.
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;
141 #endif
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
162 * compatibility.
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. */
176 #ifndef YY_BUF_SIZE
177 #define YY_BUF_SIZE 16384
178 #endif
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;
187 #endif
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. */
196 #define yyless(n) \
197 do \
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 */ \
207 while ( 0 )
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;
221 #endif
223 #ifndef YY_STRUCT_YY_BUFFER_STATE
224 #define YY_STRUCT_YY_BUFFER_STATE
225 struct yy_buffer_state
227 FILE *yy_input_file;
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
233 * characters.
235 yy_size_t yy_buf_size;
237 /* Number of characters read into yy_ch_buf, not including EOB
238 * characters.
240 int yy_n_chars;
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
244 * delete it.
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
251 * each newline.
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
257 * not.
259 int yy_at_bol;
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
265 * end of it.
267 int yy_fill_buffer;
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
290 * "scanner state".
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] \
296 : NULL)
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; \
372 *yy_cp = '\0'; \
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. */
379 struct yy_trans_info
381 flex_int32_t yy_verify;
382 flex_int32_t yy_nxt;
384 static yyconst flex_int16_t yy_accept[161] =
385 { 0,
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] =
406 { 0,
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,
434 1, 1, 1, 1, 1
437 static yyconst flex_int32_t yy_meta[41] =
438 { 0,
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] =
446 { 0,
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] =
468 { 0,
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] =
490 { 0,
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] =
551 { 0,
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 $
624 Language: C++
625 Date: $Date: 2008-04-24 03:53:20 $
626 Version: $Revision: 1.13 $
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.
650 Run flex like this:
652 flex -i --prefix=cmDependsFortran_yy --header-file=cmDependsFortranLexer.h -ocmDependsFortranLexer.cxx cmDependsFortranLexer.in.l
654 Modify cmDependsFortranLexer.cxx:
655 - remove TABs
656 - remove "yyscanner" argument from these methods:
657 yy_fatal_error, cmDependsFortran_yyalloc, cmDependsFortran_yyrealloc, cmDependsFortran_yyfree
658 - remove all YY_BREAK lines occurring right after return statements
659 - change while ( 1 ) to for(;;)
661 Modify cmDependsFortranLexer.h:
662 - remove TABs
663 - remove the yy_init_globals function
664 - remove the block that includes unistd.h
665 - remove #line directives (avoids bogus warning on old Sun)
669 #include "cmStandardLexer.h"
671 #define cmDependsFortranLexer_cxx
672 #include "cmDependsFortranParser.h" /* Interface to parser object. */
674 /* Replace the lexer input function. */
675 #undef YY_INPUT
676 #define YY_INPUT(buf, result, max_size) \
677 { result = cmDependsFortranParser_Input(yyextra, buf, max_size); }
679 /* Include the set of tokens from the parser. */
680 #include "cmDependsFortranParserTokens.h"
682 /*--------------------------------------------------------------------------*/
685 #line 670 "cmDependsFortranLexer.cxx"
687 #define INITIAL 0
688 #define free_fmt 1
689 #define fixed_fmt 2
690 #define str_sq 3
691 #define str_dq 4
693 #ifndef YY_NO_UNISTD_H
694 /* Special case for "unistd.h", since it is non-ANSI. We include it way
695 * down here because we want the user's section 1 to have been scanned first.
696 * The user has a chance to override it with an option.
698 #include <unistd.h>
699 #endif
701 #ifndef YY_EXTRA_TYPE
702 #define YY_EXTRA_TYPE void *
703 #endif
705 /* Holds the entire state of the reentrant scanner. */
706 struct yyguts_t
709 /* User-defined. Not touched by flex. */
710 YY_EXTRA_TYPE yyextra_r;
712 /* The rest are the same as the globals declared in the non-reentrant scanner. */
713 FILE *yyin_r, *yyout_r;
714 size_t yy_buffer_stack_top; /**< index of top of stack. */
715 size_t yy_buffer_stack_max; /**< capacity of stack. */
716 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
717 char yy_hold_char;
718 int yy_n_chars;
719 int yyleng_r;
720 char *yy_c_buf_p;
721 int yy_init;
722 int yy_start;
723 int yy_did_buffer_switch_on_eof;
724 int yy_start_stack_ptr;
725 int yy_start_stack_depth;
726 int *yy_start_stack;
727 yy_state_type yy_last_accepting_state;
728 char* yy_last_accepting_cpos;
730 int yylineno_r;
731 int yy_flex_debug_r;
733 char *yytext_r;
734 int yy_more_flag;
735 int yy_more_len;
737 }; /* end struct yyguts_t */
739 static int yy_init_globals (yyscan_t yyscanner );
741 int cmDependsFortran_yylex_init (yyscan_t* scanner);
743 int cmDependsFortran_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
745 /* Accessor methods to globals.
746 These are made visible to non-reentrant scanners for convenience. */
748 int cmDependsFortran_yylex_destroy (yyscan_t yyscanner );
750 int cmDependsFortran_yyget_debug (yyscan_t yyscanner );
752 void cmDependsFortran_yyset_debug (int debug_flag ,yyscan_t yyscanner );
754 YY_EXTRA_TYPE cmDependsFortran_yyget_extra (yyscan_t yyscanner );
756 void cmDependsFortran_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
758 FILE *cmDependsFortran_yyget_in (yyscan_t yyscanner );
760 void cmDependsFortran_yyset_in (FILE * in_str ,yyscan_t yyscanner );
762 FILE *cmDependsFortran_yyget_out (yyscan_t yyscanner );
764 void cmDependsFortran_yyset_out (FILE * out_str ,yyscan_t yyscanner );
766 int cmDependsFortran_yyget_leng (yyscan_t yyscanner );
768 char *cmDependsFortran_yyget_text (yyscan_t yyscanner );
770 int cmDependsFortran_yyget_lineno (yyscan_t yyscanner );
772 void cmDependsFortran_yyset_lineno (int line_number ,yyscan_t yyscanner );
774 /* Macros after this point can all be overridden by user definitions in
775 * section 1.
778 #ifndef YY_SKIP_YYWRAP
779 #ifdef __cplusplus
780 extern "C" int cmDependsFortran_yywrap (yyscan_t yyscanner );
781 #else
782 extern int cmDependsFortran_yywrap (yyscan_t yyscanner );
783 #endif
784 #endif
786 static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
788 #ifndef yytext_ptr
789 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
790 #endif
792 #ifdef YY_NEED_STRLEN
793 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
794 #endif
796 #ifndef YY_NO_INPUT
798 #ifdef __cplusplus
799 static int yyinput (yyscan_t yyscanner );
800 #else
801 static int input (yyscan_t yyscanner );
802 #endif
804 #endif
806 /* Amount of stuff to slurp up with each read. */
807 #ifndef YY_READ_BUF_SIZE
808 #define YY_READ_BUF_SIZE 8192
809 #endif
811 /* Copy whatever the last rule matched to the standard output. */
812 #ifndef ECHO
813 /* This used to be an fputs(), but since the string might contain NUL's,
814 * we now use fwrite().
816 #define ECHO fwrite( yytext, yyleng, 1, yyout )
817 #endif
819 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
820 * is returned in "result".
822 #ifndef YY_INPUT
823 #define YY_INPUT(buf,result,max_size) \
824 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
826 int c = '*'; \
827 int n; \
828 for ( n = 0; n < max_size && \
829 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
830 buf[n] = (char) c; \
831 if ( c == '\n' ) \
832 buf[n++] = (char) c; \
833 if ( c == EOF && ferror( yyin ) ) \
834 YY_FATAL_ERROR( "input in flex scanner failed" ); \
835 result = n; \
837 else \
839 errno=0; \
840 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
842 if( errno != EINTR) \
844 YY_FATAL_ERROR( "input in flex scanner failed" ); \
845 break; \
847 errno=0; \
848 clearerr(yyin); \
853 #endif
855 /* No semi-colon after return; correct usage is to write "yyterminate();" -
856 * we don't want an extra ';' after the "return" because that will cause
857 * some compilers to complain about unreachable statements.
859 #ifndef yyterminate
860 #define yyterminate() return YY_NULL
861 #endif
863 /* Number of entries by which start-condition stack grows. */
864 #ifndef YY_START_STACK_INCR
865 #define YY_START_STACK_INCR 25
866 #endif
868 /* Report a fatal error. */
869 #ifndef YY_FATAL_ERROR
870 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
871 #endif
873 /* end tables serialization structures and prototypes */
875 /* Default declaration of generated scanner - a define so the user can
876 * easily add parameters.
878 #ifndef YY_DECL
879 #define YY_DECL_IS_OURS 1
881 extern int cmDependsFortran_yylex (yyscan_t yyscanner);
883 #define YY_DECL int cmDependsFortran_yylex (yyscan_t yyscanner)
884 #endif /* !YY_DECL */
886 /* Code executed at the beginning of each rule, after yytext and yyleng
887 * have been set up.
889 #ifndef YY_USER_ACTION
890 #define YY_USER_ACTION
891 #endif
893 /* Code executed at the end of each rule. */
894 #ifndef YY_BREAK
895 #define YY_BREAK break;
896 #endif
898 #define YY_RULE_SETUP \
899 if ( yyleng > 0 ) \
900 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
901 (yytext[yyleng - 1] == '\n'); \
902 YY_USER_ACTION
904 /** The main scanner function which does all the work.
906 YY_DECL
908 register yy_state_type yy_current_state;
909 register char *yy_cp, *yy_bp;
910 register int yy_act;
911 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
913 #line 75 "cmDependsFortranLexer.in.l"
916 #line 901 "cmDependsFortranLexer.cxx"
918 if ( !yyg->yy_init )
920 yyg->yy_init = 1;
922 #ifdef YY_USER_INIT
923 YY_USER_INIT;
924 #endif
926 if ( ! yyg->yy_start )
927 yyg->yy_start = 1; /* first start state */
929 if ( ! yyin )
930 yyin = stdin;
932 if ( ! yyout )
933 yyout = stdout;
935 if ( ! YY_CURRENT_BUFFER ) {
936 cmDependsFortran_yyensure_buffer_stack (yyscanner);
937 YY_CURRENT_BUFFER_LVALUE =
938 cmDependsFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
941 cmDependsFortran_yy_load_buffer_state(yyscanner );
944 for(;;) /* loops until end-of-file is reached */
946 yy_cp = yyg->yy_c_buf_p;
948 /* Support of yytext. */
949 *yy_cp = yyg->yy_hold_char;
951 /* yy_bp points to the position in yy_ch_buf of the start of
952 * the current run.
954 yy_bp = yy_cp;
956 yy_current_state = yyg->yy_start;
957 yy_current_state += YY_AT_BOL();
958 yy_match:
961 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
962 if ( yy_accept[yy_current_state] )
964 yyg->yy_last_accepting_state = yy_current_state;
965 yyg->yy_last_accepting_cpos = yy_cp;
967 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
969 yy_current_state = (int) yy_def[yy_current_state];
970 if ( yy_current_state >= 161 )
971 yy_c = yy_meta[(unsigned int) yy_c];
973 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
974 ++yy_cp;
976 while ( yy_base[yy_current_state] != 476 );
978 yy_find_action:
979 yy_act = yy_accept[yy_current_state];
980 if ( yy_act == 0 )
981 { /* have to back up */
982 yy_cp = yyg->yy_last_accepting_cpos;
983 yy_current_state = yyg->yy_last_accepting_state;
984 yy_act = yy_accept[yy_current_state];
987 YY_DO_BEFORE_ACTION;
989 do_action: /* This label is used only to access EOF actions. */
991 switch ( yy_act )
992 { /* beginning of action switch */
993 case 0: /* must back up */
994 /* undo the effects of YY_DO_BEFORE_ACTION */
995 *yy_cp = yyg->yy_hold_char;
996 yy_cp = yyg->yy_last_accepting_cpos;
997 yy_current_state = yyg->yy_last_accepting_state;
998 goto yy_find_action;
1000 case 1:
1001 YY_RULE_SETUP
1002 #line 77 "cmDependsFortranLexer.in.l"
1004 cmDependsFortranParser_StringStart(yyextra);
1005 cmDependsFortranParser_SetOldStartcond(yyextra, YY_START);
1006 BEGIN(str_dq);
1008 YY_BREAK
1009 case 2:
1010 YY_RULE_SETUP
1011 #line 83 "cmDependsFortranLexer.in.l"
1013 cmDependsFortranParser_StringStart(yyextra);
1014 cmDependsFortranParser_SetOldStartcond(yyextra, YY_START);
1015 BEGIN(str_sq);
1017 YY_BREAK
1018 case 3:
1019 #line 90 "cmDependsFortranLexer.in.l"
1020 case 4:
1021 YY_RULE_SETUP
1022 #line 90 "cmDependsFortranLexer.in.l"
1024 BEGIN(cmDependsFortranParser_GetOldStartcond(yyextra) );
1025 yylvalp->string = strdup(cmDependsFortranParser_StringEnd(yyextra));
1026 return STRING;
1028 case 5:
1029 /* rule 5 can match eol */
1030 #line 97 "cmDependsFortranLexer.in.l"
1031 case 6:
1032 /* rule 6 can match eol */
1033 YY_RULE_SETUP
1034 #line 97 "cmDependsFortranLexer.in.l"
1035 /* Ignore (continued strings, free fmt) */
1036 YY_BREAK
1037 case 7:
1038 /* rule 7 can match eol */
1039 YY_RULE_SETUP
1040 #line 99 "cmDependsFortranLexer.in.l"
1042 if (cmDependsFortranParser_GetOldStartcond(yyextra) == fixed_fmt)
1043 ; /* Ignore (cont. strings, fixed fmt) */
1044 else
1046 unput(yytext[strlen(yytext)-1]);
1049 YY_BREAK
1050 case 8:
1051 /* rule 8 can match eol */
1052 YY_RULE_SETUP
1053 #line 109 "cmDependsFortranLexer.in.l"
1055 unput ('\n');
1056 BEGIN(INITIAL);
1057 return UNTERMINATED_STRING;
1059 case 9:
1060 YY_RULE_SETUP
1061 #line 115 "cmDependsFortranLexer.in.l"
1063 cmDependsFortranParser_StringAppend(yyextra, yytext[0]);
1065 YY_BREAK
1066 case 10:
1067 /* rule 10 can match eol */
1068 YY_RULE_SETUP
1069 #line 119 "cmDependsFortranLexer.in.l"
1070 { return EOSTMT; } /* Treat comments like */
1071 case 11:
1072 /* rule 11 can match eol */
1073 YY_RULE_SETUP
1074 #line 120 "cmDependsFortranLexer.in.l"
1075 { return EOSTMT; } /* empty lines */
1076 case 12:
1077 YY_RULE_SETUP
1078 #line 122 "cmDependsFortranLexer.in.l"
1079 { return CPP_INCLUDE; }
1080 case 13:
1081 YY_RULE_SETUP
1082 #line 123 "cmDependsFortranLexer.in.l"
1083 { return F90PPR_INCLUDE; }
1084 case 14:
1085 YY_RULE_SETUP
1086 #line 124 "cmDependsFortranLexer.in.l"
1087 { return COCO_INCLUDE; }
1088 case 15:
1089 YY_RULE_SETUP
1090 #line 126 "cmDependsFortranLexer.in.l"
1091 { return CPP_DEFINE; }
1092 case 16:
1093 YY_RULE_SETUP
1094 #line 127 "cmDependsFortranLexer.in.l"
1095 { return F90PPR_DEFINE; }
1096 case 17:
1097 YY_RULE_SETUP
1098 #line 129 "cmDependsFortranLexer.in.l"
1099 { return CPP_UNDEF; }
1100 case 18:
1101 YY_RULE_SETUP
1102 #line 130 "cmDependsFortranLexer.in.l"
1103 { return F90PPR_UNDEF; }
1104 case 19:
1105 YY_RULE_SETUP
1106 #line 132 "cmDependsFortranLexer.in.l"
1107 { return CPP_IFDEF; }
1108 case 20:
1109 YY_RULE_SETUP
1110 #line 133 "cmDependsFortranLexer.in.l"
1111 { return CPP_IFNDEF; }
1112 case 21:
1113 YY_RULE_SETUP
1114 #line 134 "cmDependsFortranLexer.in.l"
1115 { return CPP_IF; }
1116 case 22:
1117 YY_RULE_SETUP
1118 #line 135 "cmDependsFortranLexer.in.l"
1119 { return CPP_ELIF; }
1120 case 23:
1121 YY_RULE_SETUP
1122 #line 136 "cmDependsFortranLexer.in.l"
1123 { return CPP_ELSE; }
1124 case 24:
1125 YY_RULE_SETUP
1126 #line 137 "cmDependsFortranLexer.in.l"
1127 { return CPP_ENDIF; }
1128 case 25:
1129 YY_RULE_SETUP
1130 #line 139 "cmDependsFortranLexer.in.l"
1131 { return F90PPR_IFDEF; }
1132 case 26:
1133 YY_RULE_SETUP
1134 #line 140 "cmDependsFortranLexer.in.l"
1135 { return F90PPR_IFNDEF; }
1136 case 27:
1137 YY_RULE_SETUP
1138 #line 141 "cmDependsFortranLexer.in.l"
1139 { return F90PPR_IF; }
1140 case 28:
1141 YY_RULE_SETUP
1142 #line 142 "cmDependsFortranLexer.in.l"
1143 { return F90PPR_ELIF; }
1144 case 29:
1145 YY_RULE_SETUP
1146 #line 143 "cmDependsFortranLexer.in.l"
1147 { return F90PPR_ELSE; }
1148 case 30:
1149 YY_RULE_SETUP
1150 #line 144 "cmDependsFortranLexer.in.l"
1151 { return F90PPR_ENDIF; }
1152 /* Line continuations, possible involving comments. */
1153 case 31:
1154 /* rule 31 can match eol */
1155 YY_RULE_SETUP
1156 #line 147 "cmDependsFortranLexer.in.l"
1158 YY_BREAK
1159 case 32:
1160 /* rule 32 can match eol */
1161 YY_RULE_SETUP
1162 #line 148 "cmDependsFortranLexer.in.l"
1164 YY_BREAK
1165 case 33:
1166 YY_RULE_SETUP
1167 #line 150 "cmDependsFortranLexer.in.l"
1168 { return COMMA; }
1169 case 34:
1170 YY_RULE_SETUP
1171 #line 152 "cmDependsFortranLexer.in.l"
1172 { return DCOLON; }
1173 case 35:
1174 /* rule 35 can match eol */
1175 YY_RULE_SETUP
1176 #line 154 "cmDependsFortranLexer.in.l"
1177 { return GARBAGE; }
1178 case 36:
1179 YY_RULE_SETUP
1180 #line 156 "cmDependsFortranLexer.in.l"
1181 { return ASSIGNMENT_OP; }
1182 case 37:
1183 YY_RULE_SETUP
1184 #line 158 "cmDependsFortranLexer.in.l"
1186 yylvalp->string = strdup(yytext);
1187 return WORD;
1189 case 38:
1190 YY_RULE_SETUP
1191 #line 163 "cmDependsFortranLexer.in.l"
1192 { return GARBAGE; }
1193 case 39:
1194 /* rule 39 can match eol */
1195 YY_RULE_SETUP
1196 #line 165 "cmDependsFortranLexer.in.l"
1197 { return EOSTMT; }
1198 case 40:
1199 YY_RULE_SETUP
1200 #line 168 "cmDependsFortranLexer.in.l"
1201 /* Ignore */
1202 YY_BREAK
1203 case 41:
1204 /* rule 41 can match eol */
1205 YY_RULE_SETUP
1206 #line 169 "cmDependsFortranLexer.in.l"
1207 /* Ignore line-endings preceeded by \ */
1208 YY_BREAK
1209 case 42:
1210 YY_RULE_SETUP
1211 #line 171 "cmDependsFortranLexer.in.l"
1212 { return *yytext; }
1213 case YY_STATE_EOF(INITIAL):
1214 case YY_STATE_EOF(free_fmt):
1215 case YY_STATE_EOF(fixed_fmt):
1216 case YY_STATE_EOF(str_sq):
1217 case YY_STATE_EOF(str_dq):
1218 #line 173 "cmDependsFortranLexer.in.l"
1220 if(!cmDependsFortranParser_FilePop(yyextra) )
1222 return YY_NULL;
1225 YY_BREAK
1226 case 43:
1227 YY_RULE_SETUP
1228 #line 180 "cmDependsFortranLexer.in.l"
1229 ECHO;
1230 YY_BREAK
1231 #line 1247 "cmDependsFortranLexer.cxx"
1233 case YY_END_OF_BUFFER:
1235 /* Amount of text matched not including the EOB char. */
1236 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1238 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1239 *yy_cp = yyg->yy_hold_char;
1240 YY_RESTORE_YY_MORE_OFFSET
1242 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1244 /* We're scanning a new file or input source. It's
1245 * possible that this happened because the user
1246 * just pointed yyin at a new source and called
1247 * cmDependsFortran_yylex(). If so, then we have to assure
1248 * consistency between YY_CURRENT_BUFFER and our
1249 * globals. Here is the right place to do so, because
1250 * this is the first action (other than possibly a
1251 * back-up) that will match for the new input source.
1253 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1254 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1255 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1258 /* Note that here we test for yy_c_buf_p "<=" to the position
1259 * of the first EOB in the buffer, since yy_c_buf_p will
1260 * already have been incremented past the NUL character
1261 * (since all states make transitions on EOB to the
1262 * end-of-buffer state). Contrast this with the test
1263 * in input().
1265 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1266 { /* This was really a NUL. */
1267 yy_state_type yy_next_state;
1269 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1271 yy_current_state = yy_get_previous_state( yyscanner );
1273 /* Okay, we're now positioned to make the NUL
1274 * transition. We couldn't have
1275 * yy_get_previous_state() go ahead and do it
1276 * for us because it doesn't know how to deal
1277 * with the possibility of jamming (and we don't
1278 * want to build jamming into it because then it
1279 * will run more slowly).
1282 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1284 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1286 if ( yy_next_state )
1288 /* Consume the NUL. */
1289 yy_cp = ++yyg->yy_c_buf_p;
1290 yy_current_state = yy_next_state;
1291 goto yy_match;
1294 else
1296 yy_cp = yyg->yy_c_buf_p;
1297 goto yy_find_action;
1301 else switch ( yy_get_next_buffer( yyscanner ) )
1303 case EOB_ACT_END_OF_FILE:
1305 yyg->yy_did_buffer_switch_on_eof = 0;
1307 if ( cmDependsFortran_yywrap(yyscanner ) )
1309 /* Note: because we've taken care in
1310 * yy_get_next_buffer() to have set up
1311 * yytext, we can now set up
1312 * yy_c_buf_p so that if some total
1313 * hoser (like flex itself) wants to
1314 * call the scanner after we return the
1315 * YY_NULL, it'll still work - another
1316 * YY_NULL will get returned.
1318 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1320 yy_act = YY_STATE_EOF(YY_START);
1321 goto do_action;
1324 else
1326 if ( ! yyg->yy_did_buffer_switch_on_eof )
1327 YY_NEW_FILE;
1329 break;
1332 case EOB_ACT_CONTINUE_SCAN:
1333 yyg->yy_c_buf_p =
1334 yyg->yytext_ptr + yy_amount_of_matched_text;
1336 yy_current_state = yy_get_previous_state( yyscanner );
1338 yy_cp = yyg->yy_c_buf_p;
1339 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1340 goto yy_match;
1342 case EOB_ACT_LAST_MATCH:
1343 yyg->yy_c_buf_p =
1344 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1346 yy_current_state = yy_get_previous_state( yyscanner );
1348 yy_cp = yyg->yy_c_buf_p;
1349 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1350 goto yy_find_action;
1352 break;
1355 default:
1356 YY_FATAL_ERROR(
1357 "fatal flex scanner internal error--no action found" );
1358 } /* end of action switch */
1359 } /* end of scanning one token */
1360 } /* end of cmDependsFortran_yylex */
1362 /* yy_get_next_buffer - try to read in a new buffer
1364 * Returns a code representing an action:
1365 * EOB_ACT_LAST_MATCH -
1366 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1367 * EOB_ACT_END_OF_FILE - end of file
1369 static int yy_get_next_buffer (yyscan_t yyscanner)
1371 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1372 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1373 register char *source = yyg->yytext_ptr;
1374 register int number_to_move, i;
1375 int ret_val;
1377 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1378 YY_FATAL_ERROR(
1379 "fatal flex scanner internal error--end of buffer missed" );
1381 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1382 { /* Don't try to fill the buffer, so this is an EOF. */
1383 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1385 /* We matched a single character, the EOB, so
1386 * treat this as a final EOF.
1388 return EOB_ACT_END_OF_FILE;
1391 else
1393 /* We matched some text prior to the EOB, first
1394 * process it.
1396 return EOB_ACT_LAST_MATCH;
1400 /* Try to read more data. */
1402 /* First move last chars to start of buffer. */
1403 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1405 for ( i = 0; i < number_to_move; ++i )
1406 *(dest++) = *(source++);
1408 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1409 /* don't do the read, it's not guaranteed to return an EOF,
1410 * just force an EOF
1412 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1414 else
1416 int num_to_read =
1417 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1419 while ( num_to_read <= 0 )
1420 { /* Not enough room in the buffer - grow it. */
1422 /* just a shorter name for the current buffer */
1423 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1425 int yy_c_buf_p_offset =
1426 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1428 if ( b->yy_is_our_buffer )
1430 int new_size = b->yy_buf_size * 2;
1432 if ( new_size <= 0 )
1433 b->yy_buf_size += b->yy_buf_size / 8;
1434 else
1435 b->yy_buf_size *= 2;
1437 b->yy_ch_buf = (char *)
1438 /* Include room in for 2 EOB chars. */
1439 cmDependsFortran_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1441 else
1442 /* Can't grow it, we don't own it. */
1443 b->yy_ch_buf = 0;
1445 if ( ! b->yy_ch_buf )
1446 YY_FATAL_ERROR(
1447 "fatal error - scanner input buffer overflow" );
1449 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1451 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1452 number_to_move - 1;
1456 if ( num_to_read > YY_READ_BUF_SIZE )
1457 num_to_read = YY_READ_BUF_SIZE;
1459 /* Read in more data. */
1460 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1461 yyg->yy_n_chars, (size_t) num_to_read );
1463 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1466 if ( yyg->yy_n_chars == 0 )
1468 if ( number_to_move == YY_MORE_ADJ )
1470 ret_val = EOB_ACT_END_OF_FILE;
1471 cmDependsFortran_yyrestart(yyin ,yyscanner);
1474 else
1476 ret_val = EOB_ACT_LAST_MATCH;
1477 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1478 YY_BUFFER_EOF_PENDING;
1482 else
1483 ret_val = EOB_ACT_CONTINUE_SCAN;
1485 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1486 /* Extend the array by 50%, plus the number we really need. */
1487 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1488 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmDependsFortran_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1489 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1490 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1493 yyg->yy_n_chars += number_to_move;
1494 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1495 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1497 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1499 return ret_val;
1502 /* yy_get_previous_state - get the state just before the EOB char was reached */
1504 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1506 register yy_state_type yy_current_state;
1507 register char *yy_cp;
1508 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1510 yy_current_state = yyg->yy_start;
1511 yy_current_state += YY_AT_BOL();
1513 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1515 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1516 if ( yy_accept[yy_current_state] )
1518 yyg->yy_last_accepting_state = yy_current_state;
1519 yyg->yy_last_accepting_cpos = yy_cp;
1521 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1523 yy_current_state = (int) yy_def[yy_current_state];
1524 if ( yy_current_state >= 161 )
1525 yy_c = yy_meta[(unsigned int) yy_c];
1527 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1530 return yy_current_state;
1533 /* yy_try_NUL_trans - try to make a transition on the NUL character
1535 * synopsis
1536 * next_state = yy_try_NUL_trans( current_state );
1538 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1540 register int yy_is_jam;
1541 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1542 register char *yy_cp = yyg->yy_c_buf_p;
1544 register YY_CHAR yy_c = 1;
1545 if ( yy_accept[yy_current_state] )
1547 yyg->yy_last_accepting_state = yy_current_state;
1548 yyg->yy_last_accepting_cpos = yy_cp;
1550 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1552 yy_current_state = (int) yy_def[yy_current_state];
1553 if ( yy_current_state >= 161 )
1554 yy_c = yy_meta[(unsigned int) yy_c];
1556 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1557 yy_is_jam = (yy_current_state == 160);
1559 return yy_is_jam ? 0 : yy_current_state;
1562 static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
1564 register char *yy_cp;
1565 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1567 yy_cp = yyg->yy_c_buf_p;
1569 /* undo effects of setting up yytext */
1570 *yy_cp = yyg->yy_hold_char;
1572 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1573 { /* need to shift things up to make room */
1574 /* +2 for EOB chars. */
1575 register int number_to_move = yyg->yy_n_chars + 2;
1576 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1577 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1578 register char *source =
1579 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1581 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1582 *--dest = *--source;
1584 yy_cp += (int) (dest - source);
1585 yy_bp += (int) (dest - source);
1586 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1587 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1589 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1590 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1593 *--yy_cp = (char) c;
1595 yyg->yytext_ptr = yy_bp;
1596 yyg->yy_hold_char = *yy_cp;
1597 yyg->yy_c_buf_p = yy_cp;
1600 #ifndef YY_NO_INPUT
1601 #ifdef __cplusplus
1602 static int yyinput (yyscan_t yyscanner)
1603 #else
1604 static int input (yyscan_t yyscanner)
1605 #endif
1608 int c;
1609 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1611 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1613 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1615 /* yy_c_buf_p now points to the character we want to return.
1616 * If this occurs *before* the EOB characters, then it's a
1617 * valid NUL; if not, then we've hit the end of the buffer.
1619 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1620 /* This was really a NUL. */
1621 *yyg->yy_c_buf_p = '\0';
1623 else
1624 { /* need more input */
1625 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1626 ++yyg->yy_c_buf_p;
1628 switch ( yy_get_next_buffer( yyscanner ) )
1630 case EOB_ACT_LAST_MATCH:
1631 /* This happens because yy_g_n_b()
1632 * sees that we've accumulated a
1633 * token and flags that we need to
1634 * try matching the token before
1635 * proceeding. But for input(),
1636 * there's no matching to consider.
1637 * So convert the EOB_ACT_LAST_MATCH
1638 * to EOB_ACT_END_OF_FILE.
1641 /* Reset buffer status. */
1642 cmDependsFortran_yyrestart(yyin ,yyscanner);
1644 /*FALLTHROUGH*/
1646 case EOB_ACT_END_OF_FILE:
1648 if ( cmDependsFortran_yywrap(yyscanner ) )
1649 return EOF;
1651 if ( ! yyg->yy_did_buffer_switch_on_eof )
1652 YY_NEW_FILE;
1653 #ifdef __cplusplus
1654 return yyinput(yyscanner);
1655 #else
1656 return input(yyscanner);
1657 #endif
1660 case EOB_ACT_CONTINUE_SCAN:
1661 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1662 break;
1667 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1668 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1669 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1671 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1673 return c;
1675 #endif /* ifndef YY_NO_INPUT */
1677 /** Immediately switch to a different input stream.
1678 * @param input_file A readable stream.
1679 * @param yyscanner The scanner object.
1680 * @note This function does not reset the start condition to @c INITIAL .
1682 void cmDependsFortran_yyrestart (FILE * input_file , yyscan_t yyscanner)
1684 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1686 if ( ! YY_CURRENT_BUFFER ){
1687 cmDependsFortran_yyensure_buffer_stack (yyscanner);
1688 YY_CURRENT_BUFFER_LVALUE =
1689 cmDependsFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1692 cmDependsFortran_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1693 cmDependsFortran_yy_load_buffer_state(yyscanner );
1696 /** Switch to a different input buffer.
1697 * @param new_buffer The new input buffer.
1698 * @param yyscanner The scanner object.
1700 void cmDependsFortran_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1702 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1704 /* TODO. We should be able to replace this entire function body
1705 * with
1706 * cmDependsFortran_yypop_buffer_state();
1707 * cmDependsFortran_yypush_buffer_state(new_buffer);
1709 cmDependsFortran_yyensure_buffer_stack (yyscanner);
1710 if ( YY_CURRENT_BUFFER == new_buffer )
1711 return;
1713 if ( YY_CURRENT_BUFFER )
1715 /* Flush out information for old buffer. */
1716 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1717 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1718 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1721 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1722 cmDependsFortran_yy_load_buffer_state(yyscanner );
1724 /* We don't actually know whether we did this switch during
1725 * EOF (cmDependsFortran_yywrap()) processing, but the only time this flag
1726 * is looked at is after cmDependsFortran_yywrap() is called, so it's safe
1727 * to go ahead and always set it.
1729 yyg->yy_did_buffer_switch_on_eof = 1;
1732 static void cmDependsFortran_yy_load_buffer_state (yyscan_t yyscanner)
1734 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1735 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1736 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1737 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1738 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1741 /** Allocate and initialize an input buffer state.
1742 * @param file A readable stream.
1743 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1744 * @param yyscanner The scanner object.
1745 * @return the allocated buffer state.
1747 YY_BUFFER_STATE cmDependsFortran_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
1749 YY_BUFFER_STATE b;
1751 b = (YY_BUFFER_STATE) cmDependsFortran_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1752 if ( ! b )
1753 YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yy_create_buffer()" );
1755 b->yy_buf_size = size;
1757 /* yy_ch_buf has to be 2 characters longer than the size given because
1758 * we need to put in 2 end-of-buffer characters.
1760 b->yy_ch_buf = (char *) cmDependsFortran_yyalloc(b->yy_buf_size + 2 ,yyscanner );
1761 if ( ! b->yy_ch_buf )
1762 YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yy_create_buffer()" );
1764 b->yy_is_our_buffer = 1;
1766 cmDependsFortran_yy_init_buffer(b,file ,yyscanner);
1768 return b;
1771 /** Destroy the buffer.
1772 * @param b a buffer created with cmDependsFortran_yy_create_buffer()
1773 * @param yyscanner The scanner object.
1775 void cmDependsFortran_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1777 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1779 if ( ! b )
1780 return;
1782 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1783 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1785 if ( b->yy_is_our_buffer )
1786 cmDependsFortran_yyfree((void *) b->yy_ch_buf ,yyscanner );
1788 cmDependsFortran_yyfree((void *) b ,yyscanner );
1791 #ifndef __cplusplus
1792 extern int isatty (int );
1793 #endif /* __cplusplus */
1795 /* Initializes or reinitializes a buffer.
1796 * This function is sometimes called more than once on the same buffer,
1797 * such as during a cmDependsFortran_yyrestart() or at EOF.
1799 static void cmDependsFortran_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1802 int oerrno = errno;
1803 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1805 cmDependsFortran_yy_flush_buffer(b ,yyscanner);
1807 b->yy_input_file = file;
1808 b->yy_fill_buffer = 1;
1810 /* If b is the current buffer, then cmDependsFortran_yy_init_buffer was _probably_
1811 * called from cmDependsFortran_yyrestart() or through yy_get_next_buffer.
1812 * In that case, we don't want to reset the lineno or column.
1814 if (b != YY_CURRENT_BUFFER){
1815 b->yy_bs_lineno = 1;
1816 b->yy_bs_column = 0;
1819 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1821 errno = oerrno;
1824 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1825 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1826 * @param yyscanner The scanner object.
1828 void cmDependsFortran_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1830 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1831 if ( ! b )
1832 return;
1834 b->yy_n_chars = 0;
1836 /* We always need two end-of-buffer characters. The first causes
1837 * a transition to the end-of-buffer state. The second causes
1838 * a jam in that state.
1840 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1841 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1843 b->yy_buf_pos = &b->yy_ch_buf[0];
1845 b->yy_at_bol = 1;
1846 b->yy_buffer_status = YY_BUFFER_NEW;
1848 if ( b == YY_CURRENT_BUFFER )
1849 cmDependsFortran_yy_load_buffer_state(yyscanner );
1852 /** Pushes the new state onto the stack. The new state becomes
1853 * the current state. This function will allocate the stack
1854 * if necessary.
1855 * @param new_buffer The new state.
1856 * @param yyscanner The scanner object.
1858 void cmDependsFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1860 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1861 if (new_buffer == NULL)
1862 return;
1864 cmDependsFortran_yyensure_buffer_stack(yyscanner);
1866 /* This block is copied from cmDependsFortran_yy_switch_to_buffer. */
1867 if ( YY_CURRENT_BUFFER )
1869 /* Flush out information for old buffer. */
1870 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1871 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1872 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1875 /* Only push if top exists. Otherwise, replace top. */
1876 if (YY_CURRENT_BUFFER)
1877 yyg->yy_buffer_stack_top++;
1878 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1880 /* copied from cmDependsFortran_yy_switch_to_buffer. */
1881 cmDependsFortran_yy_load_buffer_state(yyscanner );
1882 yyg->yy_did_buffer_switch_on_eof = 1;
1885 /** Removes and deletes the top of the stack, if present.
1886 * The next element becomes the new top.
1887 * @param yyscanner The scanner object.
1889 void cmDependsFortran_yypop_buffer_state (yyscan_t yyscanner)
1891 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1892 if (!YY_CURRENT_BUFFER)
1893 return;
1895 cmDependsFortran_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1896 YY_CURRENT_BUFFER_LVALUE = NULL;
1897 if (yyg->yy_buffer_stack_top > 0)
1898 --yyg->yy_buffer_stack_top;
1900 if (YY_CURRENT_BUFFER) {
1901 cmDependsFortran_yy_load_buffer_state(yyscanner );
1902 yyg->yy_did_buffer_switch_on_eof = 1;
1906 /* Allocates the stack if it does not exist.
1907 * Guarantees space for at least one push.
1909 static void cmDependsFortran_yyensure_buffer_stack (yyscan_t yyscanner)
1911 int num_to_alloc;
1912 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1914 if (!yyg->yy_buffer_stack) {
1916 /* First allocation is just for 2 elements, since we don't know if this
1917 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1918 * immediate realloc on the next call.
1920 num_to_alloc = 1;
1921 yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsFortran_yyalloc
1922 (num_to_alloc * sizeof(struct yy_buffer_state*)
1923 , yyscanner);
1924 if ( ! yyg->yy_buffer_stack )
1925 YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yyensure_buffer_stack()" );
1927 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1929 yyg->yy_buffer_stack_max = num_to_alloc;
1930 yyg->yy_buffer_stack_top = 0;
1931 return;
1934 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1936 /* Increase the buffer to prepare for a possible push. */
1937 int grow_size = 8 /* arbitrary grow size */;
1939 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1940 yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsFortran_yyrealloc
1941 (yyg->yy_buffer_stack,
1942 num_to_alloc * sizeof(struct yy_buffer_state*)
1943 , yyscanner);
1944 if ( ! yyg->yy_buffer_stack )
1945 YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yyensure_buffer_stack()" );
1947 /* zero only the new slots.*/
1948 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1949 yyg->yy_buffer_stack_max = num_to_alloc;
1953 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1954 * @param base the character buffer
1955 * @param size the size in bytes of the character buffer
1956 * @param yyscanner The scanner object.
1957 * @return the newly allocated buffer state object.
1959 YY_BUFFER_STATE cmDependsFortran_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
1961 YY_BUFFER_STATE b;
1963 if ( size < 2 ||
1964 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1965 base[size-1] != YY_END_OF_BUFFER_CHAR )
1966 /* They forgot to leave room for the EOB's. */
1967 return 0;
1969 b = (YY_BUFFER_STATE) cmDependsFortran_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1970 if ( ! b )
1971 YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yy_scan_buffer()" );
1973 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1974 b->yy_buf_pos = b->yy_ch_buf = base;
1975 b->yy_is_our_buffer = 0;
1976 b->yy_input_file = 0;
1977 b->yy_n_chars = b->yy_buf_size;
1978 b->yy_is_interactive = 0;
1979 b->yy_at_bol = 1;
1980 b->yy_fill_buffer = 0;
1981 b->yy_buffer_status = YY_BUFFER_NEW;
1983 cmDependsFortran_yy_switch_to_buffer(b ,yyscanner );
1985 return b;
1988 /** Setup the input buffer state to scan a string. The next call to cmDependsFortran_yylex() will
1989 * scan from a @e copy of @a str.
1990 * @param yystr a NUL-terminated string to scan
1991 * @param yyscanner The scanner object.
1992 * @return the newly allocated buffer state object.
1993 * @note If you want to scan bytes that may contain NUL values, then use
1994 * cmDependsFortran_yy_scan_bytes() instead.
1996 YY_BUFFER_STATE cmDependsFortran_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
1999 return cmDependsFortran_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
2002 /** Setup the input buffer state to scan the given bytes. The next call to cmDependsFortran_yylex() will
2003 * scan from a @e copy of @a bytes.
2004 * @param bytes the byte buffer to scan
2005 * @param len the number of bytes in the buffer pointed to by @a bytes.
2006 * @param yyscanner The scanner object.
2007 * @return the newly allocated buffer state object.
2009 YY_BUFFER_STATE cmDependsFortran_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
2011 YY_BUFFER_STATE b;
2012 char *buf;
2013 yy_size_t n;
2014 int i;
2016 /* Get memory for full buffer, including space for trailing EOB's. */
2017 n = _yybytes_len + 2;
2018 buf = (char *) cmDependsFortran_yyalloc(n ,yyscanner );
2019 if ( ! buf )
2020 YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yy_scan_bytes()" );
2022 for ( i = 0; i < _yybytes_len; ++i )
2023 buf[i] = yybytes[i];
2025 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2027 b = cmDependsFortran_yy_scan_buffer(buf,n ,yyscanner);
2028 if ( ! b )
2029 YY_FATAL_ERROR( "bad buffer in cmDependsFortran_yy_scan_bytes()" );
2031 /* It's okay to grow etc. this buffer, and we should throw it
2032 * away when we're done.
2034 b->yy_is_our_buffer = 1;
2036 return b;
2039 #ifndef YY_EXIT_FAILURE
2040 #define YY_EXIT_FAILURE 2
2041 #endif
2043 static void yy_fatal_error (yyconst char* msg , yyscan_t)
2045 (void) fprintf( stderr, "%s\n", msg );
2046 exit( YY_EXIT_FAILURE );
2049 /* Redefine yyless() so it works in section 3 code. */
2051 #undef yyless
2052 #define yyless(n) \
2053 do \
2055 /* Undo effects of setting up yytext. */ \
2056 int yyless_macro_arg = (n); \
2057 YY_LESS_LINENO(yyless_macro_arg);\
2058 yytext[yyleng] = yyg->yy_hold_char; \
2059 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2060 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2061 *yyg->yy_c_buf_p = '\0'; \
2062 yyleng = yyless_macro_arg; \
2064 while ( 0 )
2066 /* Accessor methods (get/set functions) to struct members. */
2068 /** Get the user-defined data for this scanner.
2069 * @param yyscanner The scanner object.
2071 YY_EXTRA_TYPE cmDependsFortran_yyget_extra (yyscan_t yyscanner)
2073 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2074 return yyextra;
2077 /** Get the current line number.
2078 * @param yyscanner The scanner object.
2080 int cmDependsFortran_yyget_lineno (yyscan_t yyscanner)
2082 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2084 if (! YY_CURRENT_BUFFER)
2085 return 0;
2087 return yylineno;
2090 /** Get the current column number.
2091 * @param yyscanner The scanner object.
2093 int cmDependsFortran_yyget_column (yyscan_t yyscanner)
2095 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2097 if (! YY_CURRENT_BUFFER)
2098 return 0;
2100 return yycolumn;
2103 /** Get the input stream.
2104 * @param yyscanner The scanner object.
2106 FILE *cmDependsFortran_yyget_in (yyscan_t yyscanner)
2108 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2109 return yyin;
2112 /** Get the output stream.
2113 * @param yyscanner The scanner object.
2115 FILE *cmDependsFortran_yyget_out (yyscan_t yyscanner)
2117 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2118 return yyout;
2121 /** Get the length of the current token.
2122 * @param yyscanner The scanner object.
2124 int cmDependsFortran_yyget_leng (yyscan_t yyscanner)
2126 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2127 return yyleng;
2130 /** Get the current token.
2131 * @param yyscanner The scanner object.
2134 char *cmDependsFortran_yyget_text (yyscan_t yyscanner)
2136 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2137 return yytext;
2140 /** Set the user-defined data. This data is never touched by the scanner.
2141 * @param user_defined The data to be associated with this scanner.
2142 * @param yyscanner The scanner object.
2144 void cmDependsFortran_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2146 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2147 yyextra = user_defined ;
2150 /** Set the current line number.
2151 * @param line_number
2152 * @param yyscanner The scanner object.
2154 void cmDependsFortran_yyset_lineno (int line_number , yyscan_t yyscanner)
2156 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2158 /* lineno is only valid if an input buffer exists. */
2159 if (! YY_CURRENT_BUFFER )
2160 yy_fatal_error( "cmDependsFortran_yyset_lineno called with no buffer" , yyscanner);
2162 yylineno = line_number;
2165 /** Set the current column.
2166 * @param line_number
2167 * @param yyscanner The scanner object.
2169 void cmDependsFortran_yyset_column (int column_no , yyscan_t yyscanner)
2171 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2173 /* column is only valid if an input buffer exists. */
2174 if (! YY_CURRENT_BUFFER )
2175 yy_fatal_error( "cmDependsFortran_yyset_column called with no buffer" , yyscanner);
2177 yycolumn = column_no;
2180 /** Set the input stream. This does not discard the current
2181 * input buffer.
2182 * @param in_str A readable stream.
2183 * @param yyscanner The scanner object.
2184 * @see cmDependsFortran_yy_switch_to_buffer
2186 void cmDependsFortran_yyset_in (FILE * in_str , yyscan_t yyscanner)
2188 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2189 yyin = in_str ;
2192 void cmDependsFortran_yyset_out (FILE * out_str , yyscan_t yyscanner)
2194 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2195 yyout = out_str ;
2198 int cmDependsFortran_yyget_debug (yyscan_t yyscanner)
2200 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2201 return yy_flex_debug;
2204 void cmDependsFortran_yyset_debug (int bdebug , yyscan_t yyscanner)
2206 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2207 yy_flex_debug = bdebug ;
2210 /* Accessor methods for yylval and yylloc */
2212 /* User-visible API */
2214 /* cmDependsFortran_yylex_init is special because it creates the scanner itself, so it is
2215 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2216 * That's why we explicitly handle the declaration, instead of using our macros.
2219 int cmDependsFortran_yylex_init(yyscan_t* ptr_yy_globals)
2222 if (ptr_yy_globals == NULL){
2223 errno = EINVAL;
2224 return 1;
2227 *ptr_yy_globals = (yyscan_t) cmDependsFortran_yyalloc ( sizeof( struct yyguts_t ), NULL );
2229 if (*ptr_yy_globals == NULL){
2230 errno = ENOMEM;
2231 return 1;
2234 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2235 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2237 return yy_init_globals ( *ptr_yy_globals );
2240 /* cmDependsFortran_yylex_init_extra has the same functionality as cmDependsFortran_yylex_init, but follows the
2241 * convention of taking the scanner as the last argument. Note however, that
2242 * this is a *pointer* to a scanner, as it will be allocated by this call (and
2243 * is the reason, too, why this function also must handle its own declaration).
2244 * The user defined value in the first argument will be available to cmDependsFortran_yyalloc in
2245 * the yyextra field.
2248 int cmDependsFortran_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2251 struct yyguts_t dummy_yyguts;
2253 cmDependsFortran_yyset_extra (yy_user_defined, &dummy_yyguts);
2255 if (ptr_yy_globals == NULL){
2256 errno = EINVAL;
2257 return 1;
2260 *ptr_yy_globals = (yyscan_t) cmDependsFortran_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2262 if (*ptr_yy_globals == NULL){
2263 errno = ENOMEM;
2264 return 1;
2267 /* By setting to 0xAA, we expose bugs in
2268 yy_init_globals. Leave at 0x00 for releases. */
2269 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2271 cmDependsFortran_yyset_extra (yy_user_defined, *ptr_yy_globals);
2273 return yy_init_globals ( *ptr_yy_globals );
2276 static int yy_init_globals (yyscan_t yyscanner)
2278 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2279 /* Initialization is the same as for the non-reentrant scanner.
2280 * This function is called from cmDependsFortran_yylex_destroy(), so don't allocate here.
2283 yyg->yy_buffer_stack = 0;
2284 yyg->yy_buffer_stack_top = 0;
2285 yyg->yy_buffer_stack_max = 0;
2286 yyg->yy_c_buf_p = (char *) 0;
2287 yyg->yy_init = 0;
2288 yyg->yy_start = 0;
2290 yyg->yy_start_stack_ptr = 0;
2291 yyg->yy_start_stack_depth = 0;
2292 yyg->yy_start_stack = NULL;
2294 /* Defined in main.c */
2295 #ifdef YY_STDINIT
2296 yyin = stdin;
2297 yyout = stdout;
2298 #else
2299 yyin = (FILE *) 0;
2300 yyout = (FILE *) 0;
2301 #endif
2303 /* For future reference: Set errno on error, since we are called by
2304 * cmDependsFortran_yylex_init()
2306 return 0;
2309 /* cmDependsFortran_yylex_destroy is for both reentrant and non-reentrant scanners. */
2310 int cmDependsFortran_yylex_destroy (yyscan_t yyscanner)
2312 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2314 /* Pop the buffer stack, destroying each element. */
2315 while(YY_CURRENT_BUFFER){
2316 cmDependsFortran_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2317 YY_CURRENT_BUFFER_LVALUE = NULL;
2318 cmDependsFortran_yypop_buffer_state(yyscanner);
2321 /* Destroy the stack itself. */
2322 cmDependsFortran_yyfree(yyg->yy_buffer_stack ,yyscanner);
2323 yyg->yy_buffer_stack = NULL;
2325 /* Destroy the start condition stack. */
2326 cmDependsFortran_yyfree(yyg->yy_start_stack ,yyscanner );
2327 yyg->yy_start_stack = NULL;
2329 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2330 * cmDependsFortran_yylex() is called, initialization will occur. */
2331 yy_init_globals( yyscanner);
2333 /* Destroy the main struct (reentrant only). */
2334 cmDependsFortran_yyfree ( yyscanner , yyscanner );
2335 yyscanner = NULL;
2336 return 0;
2340 * Internal utility routines.
2343 #ifndef yytext_ptr
2344 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2346 register int i;
2347 for ( i = 0; i < n; ++i )
2348 s1[i] = s2[i];
2350 #endif
2352 #ifdef YY_NEED_STRLEN
2353 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2355 register int n;
2356 for ( n = 0; s[n]; ++n )
2359 return n;
2361 #endif
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;