FrontISTR  5.2.0
Large-scale structural analysis program with finit element method
hecmw_ctrllex.c
Go to the documentation of this file.
1 #line 3 "<stdout>"
2 
3 #define YY_INT_ALIGNED short int
4 
5 /* A lexical scanner generated by flex */
6 
7 #define yy_create_buffer HECMW_ctrl_create_buffer
8 #define yy_delete_buffer HECMW_ctrl_delete_buffer
9 #define yy_flex_debug HECMW_ctrl_flex_debug
10 #define yy_init_buffer HECMW_ctrl_init_buffer
11 #define yy_flush_buffer HECMW_ctrl_flush_buffer
12 #define yy_load_buffer_state HECMW_ctrl_load_buffer_state
13 #define yy_switch_to_buffer HECMW_ctrl_switch_to_buffer
14 #define yyin HECMW_ctrlin
15 #define yyleng HECMW_ctrlleng
16 #define yylex HECMW_ctrllex
17 #define yylineno HECMW_ctrllineno
18 #define yyout HECMW_ctrlout
19 #define yyrestart HECMW_ctrlrestart
20 #define yytext HECMW_ctrltext
21 #define yywrap HECMW_ctrlwrap
22 #define yyalloc HECMW_ctrlalloc
23 #define yyrealloc HECMW_ctrlrealloc
24 #define yyfree HECMW_ctrlfree
25 
26 #define FLEX_SCANNER
27 #define YY_FLEX_MAJOR_VERSION 2
28 #define YY_FLEX_MINOR_VERSION 5
29 #define YY_FLEX_SUBMINOR_VERSION 35
30 #if YY_FLEX_SUBMINOR_VERSION > 0
31 #define FLEX_BETA
32 #endif
33 
34 /* First, we deal with platform-specific or compiler-specific issues. */
35 
36 /* begin standard C headers. */
37 #include <stdio.h>
38 #include <string.h>
39 #include <errno.h>
40 #include <stdlib.h>
41 
42 /* end standard C headers. */
43 
44 /* flex integer type definitions */
45 
46 #ifndef FLEXINT_H
47 #define FLEXINT_H
48 
49 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
50 
51 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
52 
53 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
54  * if you want the limit (max/min) macros for int types.
55  */
56 #ifndef __STDC_LIMIT_MACROS
57 #define __STDC_LIMIT_MACROS 1
58 #endif
59 
60 #include <inttypes.h>
61 typedef int8_t flex_int8_t;
62 typedef uint8_t flex_uint8_t;
63 typedef int16_t flex_int16_t;
64 typedef uint16_t flex_uint16_t;
65 typedef int32_t flex_int32_t;
66 typedef uint32_t flex_uint32_t;
67 typedef uint64_t flex_uint64_t;
68 #else
69 typedef signed char flex_int8_t;
70 typedef short int flex_int16_t;
71 typedef int flex_int32_t;
72 typedef unsigned char flex_uint8_t;
73 typedef unsigned short int flex_uint16_t;
74 typedef unsigned int flex_uint32_t;
75 #endif /* ! C99 */
76 
77 /* Limits of integral types. */
78 #ifndef INT8_MIN
79 #define INT8_MIN (-128)
80 #endif
81 #ifndef INT16_MIN
82 #define INT16_MIN (-32767 - 1)
83 #endif
84 #ifndef INT32_MIN
85 #define INT32_MIN (-2147483647 - 1)
86 #endif
87 #ifndef INT8_MAX
88 #define INT8_MAX (127)
89 #endif
90 #ifndef INT16_MAX
91 #define INT16_MAX (32767)
92 #endif
93 #ifndef INT32_MAX
94 #define INT32_MAX (2147483647)
95 #endif
96 #ifndef UINT8_MAX
97 #define UINT8_MAX (255U)
98 #endif
99 #ifndef UINT16_MAX
100 #define UINT16_MAX (65535U)
101 #endif
102 #ifndef UINT32_MAX
103 #define UINT32_MAX (4294967295U)
104 #endif
105 
106 #endif /* ! FLEXINT_H */
107 
108 #ifdef __cplusplus
109 
110 /* The "const" storage-class-modifier is valid. */
111 #define YY_USE_CONST
112 
113 #else /* ! __cplusplus */
114 
115 /* C99 requires __STDC__ to be defined as 1. */
116 #if defined(__STDC__)
117 
118 #define YY_USE_CONST
119 
120 #endif /* defined (__STDC__) */
121 #endif /* ! __cplusplus */
122 
123 #ifdef YY_USE_CONST
124 #define yyconst const
125 #else
126 #define yyconst
127 #endif
128 
129 /* Returned upon end-of-file. */
130 #define YY_NULL 0
131 
132 /* Promotes a possibly negative, possibly signed char to an unsigned
133  * integer for use as an array index. If the signed char is negative,
134  * we want to instead treat it as an 8-bit unsigned char, hence the
135  * double cast.
136  */
137 #define YY_SC_TO_UI(c) ((unsigned int)(unsigned char)c)
138 
139 /* Enter a start condition. This macro really ought to take a parameter,
140  * but we do it the disgusting crufty way forced on us by the ()-less
141  * definition of BEGIN.
142  */
143 #define BEGIN (yy_start) = 1 + 2 *
144 
145 /* Translate the current start state into a value that can be later handed
146  * to BEGIN to return to the state. The YYSTATE alias is for lex
147  * compatibility.
148  */
149 #define YY_START (((yy_start)-1) / 2)
150 #define YYSTATE YY_START
151 
152 /* Action number for EOF rule of a given start state. */
153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
154 
155 /* Special action meaning "start processing a new file". */
156 #define YY_NEW_FILE HECMW_ctrlrestart(HECMW_ctrlin)
157 
158 #define YY_END_OF_BUFFER_CHAR 0
159 
160 /* Size of default input buffer. */
161 #ifndef YY_BUF_SIZE
162 #define YY_BUF_SIZE 16384
163 #endif
164 
165 /* The state buf must be large enough to hold one state per character in the
166  * main buffer.
167  */
168 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
169 
170 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
171 #define YY_TYPEDEF_YY_BUFFER_STATE
173 #endif
174 
175 #ifndef YY_TYPEDEF_YY_SIZE_T
176 #define YY_TYPEDEF_YY_SIZE_T
177 typedef size_t yy_size_t;
178 #endif
179 
181 
183 
184 #define EOB_ACT_CONTINUE_SCAN 0
185 #define EOB_ACT_END_OF_FILE 1
186 #define EOB_ACT_LAST_MATCH 2
187 
188 #define YY_LESS_LINENO(n)
189 
190 /* Return all but the first "n" matched characters back to the input stream. */
191 #define yyless(n) \
192  do { \
193  /* Undo effects of setting up HECMW_ctrltext. */ \
194  int yyless_macro_arg = (n); \
195  YY_LESS_LINENO(yyless_macro_arg); \
196  *yy_cp = (yy_hold_char); \
197  YY_RESTORE_YY_MORE_OFFSET(yy_c_buf_p) = yy_cp = \
198  yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
199  YY_DO_BEFORE_ACTION; /* set up HECMW_ctrltext again */ \
200  } while (0)
201 
202 #define unput(c) yyunput(c, (yytext_ptr))
203 
204 #ifndef YY_STRUCT_YY_BUFFER_STATE
205 #define YY_STRUCT_YY_BUFFER_STATE
206 struct yy_buffer_state {
207  FILE *yy_input_file;
208 
209  char *yy_ch_buf; /* input buffer */
210  char *yy_buf_pos; /* current position in input buffer */
211 
212  /* Size of input buffer in bytes, not including room for EOB
213  * characters.
214  */
216 
217  /* Number of characters read into yy_ch_buf, not including EOB
218  * characters.
219  */
221 
222  /* Whether we "own" the buffer - i.e., we know we created it,
223  * and can realloc() it to grow it, and should free() it to
224  * delete it.
225  */
226  int yy_is_our_buffer;
227 
228  /* Whether this is an "interactive" input source; if so, and
229  * if we're using stdio for input, then we want to use getc()
230  * instead of fread(), to make sure we stop fetching input after
231  * each newline.
232  */
233  int yy_is_interactive;
234 
235  /* Whether we're considered to be at the beginning of a line.
236  * If so, '^' rules will be active on the next match, otherwise
237  * not.
238  */
239  int yy_at_bol;
240 
241  int yy_bs_lineno;
242  int yy_bs_column;
244  /* Whether to try to fill the input buffer when we reach the
245  * end of it.
246  */
247  int yy_fill_buffer;
248 
249  int yy_buffer_status;
250 
251 #define YY_BUFFER_NEW 0
252 #define YY_BUFFER_NORMAL 1
253 /* When an EOF's been seen but there's still some text to process
254  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
255  * shouldn't try reading from the input source any more. We might
256  * still have a bunch of tokens to match, though, because of
257  * possible backing-up.
258  *
259  * When we actually see the EOF, we change the status to "new"
260  * (via HECMW_ctrlrestart()), so that the user can continue scanning by
261  * just pointing HECMW_ctrlin at a new input file.
262  */
263 #define YY_BUFFER_EOF_PENDING 2
264 };
265 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
266 
267 /* Stack of input buffers. */
268 static size_t yy_buffer_stack_top = 0;
269 static size_t yy_buffer_stack_max = 0;
270 static YY_BUFFER_STATE *yy_buffer_stack = 0;
272 /* We provide macros for accessing buffer states in case in the
273  * future we want to put the buffer states in a more general
274  * "scanner state".
275  *
276  * Returns the top of the stack, or NULL.
277  */
278 #define YY_CURRENT_BUFFER \
279  ((yy_buffer_stack) ? (yy_buffer_stack)[(yy_buffer_stack_top)] : NULL)
280 
281 /* Same as previous macro, but useful when we know that the buffer stack is not
282  * NULL or when we need an lvalue. For internal use only.
283  */
284 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
285 
286 /* yy_hold_char holds the character lost when HECMW_ctrltext is formed. */
287 static char yy_hold_char;
288 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
290 
291 /* Points to current character in buffer. */
292 static char *yy_c_buf_p = (char *)0;
293 static int yy_init = 0; /* whether we need to initialize */
294 static int yy_start = 0; /* start state number */
295 
296 /* Flag which is used to allow HECMW_ctrlwrap()'s to do buffer switches
297  * instead of setting up a fresh HECMW_ctrlin. A bit of a hack ...
298  */
299 static int yy_did_buffer_switch_on_eof;
300 
301 void HECMW_ctrlrestart(FILE *input_file);
303 YY_BUFFER_STATE HECMW_ctrl_create_buffer(FILE *file, int size);
307 void HECMW_ctrlpop_buffer_state(void);
308 
309 static void HECMW_ctrlensure_buffer_stack(void);
310 static void HECMW_ctrl_load_buffer_state(void);
311 static void HECMW_ctrl_init_buffer(YY_BUFFER_STATE b, FILE *file);
312 
313 #define YY_FLUSH_BUFFER HECMW_ctrl_flush_buffer(YY_CURRENT_BUFFER)
314 
318 
320 void *HECMW_ctrlrealloc(void *, yy_size_t);
321 void HECMW_ctrlfree(void *);
322 
323 #define yy_new_buffer HECMW_ctrl_create_buffer
324 
325 #define yy_set_interactive(is_interactive) \
326  { \
327  if (!YY_CURRENT_BUFFER) { \
328  HECMW_ctrlensure_buffer_stack(); \
329  YY_CURRENT_BUFFER_LVALUE = \
330  HECMW_ctrl_create_buffer(HECMW_ctrlin, YY_BUF_SIZE); \
331  } \
332  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
333  }
334 
335 #define yy_set_bol(at_bol) \
336  { \
337  if (!YY_CURRENT_BUFFER) { \
338  HECMW_ctrlensure_buffer_stack(); \
339  YY_CURRENT_BUFFER_LVALUE = \
340  HECMW_ctrl_create_buffer(HECMW_ctrlin, YY_BUF_SIZE); \
341  } \
342  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
343  }
344 
345 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
346 
347 /* Begin user sect3 */
348 
349 typedef unsigned char YY_CHAR;
350 
351 FILE *HECMW_ctrlin = (FILE *)0, *HECMW_ctrlout = (FILE *)0;
352 
353 typedef int yy_state_type;
354 
355 extern int HECMW_ctrllineno;
356 
358 
359 extern char *HECMW_ctrltext;
360 #define yytext_ptr HECMW_ctrltext
361 
362 static yy_state_type yy_get_previous_state(void);
363 static yy_state_type yy_try_NUL_trans(yy_state_type current_state);
364 static int yy_get_next_buffer(void);
365 static void yy_fatal_error(yyconst char msg[]);
366 
367 /* Done after the current pattern has been matched and before the
368  * corresponding action - sets up HECMW_ctrltext.
369  */
370 #define YY_DO_BEFORE_ACTION \
371  (yytext_ptr) = yy_bp; \
372  HECMW_ctrlleng = (yy_size_t)(yy_cp - yy_bp); \
373  (yy_hold_char) = *yy_cp; \
374  *yy_cp = '\0'; \
375  (yy_c_buf_p) = yy_cp;
376 
377 #define YY_NUM_RULES 40
378 #define YY_END_OF_BUFFER 41
379 /* This struct is not used in this scanner,
380  but its presence is necessary. */
381 struct yy_trans_info {
384 };
385 static yyconst flex_int16_t yy_accept[181] = {
386  0, 0, 0, 41, 39, 2, 3, 39, 39, 39, 34, 38, 36, 38, 35, 33, 37,
387  37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 39, 39, 2, 3, 0,
388  0, 0, 0, 36, 35, 38, 36, 35, 36, 38, 37, 0, 37, 37, 37, 37, 37,
389  22, 24, 37, 37, 37, 28, 37, 37, 37, 0, 0, 0, 0, 0, 0, 1, 0,
390  0, 0, 0, 0, 36, 0, 0, 38, 36, 38, 37, 17, 37, 37, 37, 37, 37,
391  37, 37, 29, 30, 37, 37, 0, 0, 0, 0, 0, 0, 0, 0, 36, 37,
392 
393  37, 37, 37, 37, 37, 26, 37, 37, 32, 0, 0, 0, 0, 0, 7, 0, 0,
394  0, 37, 18, 37, 37, 23, 25, 37, 37, 0, 6, 0, 0, 0, 0, 0, 0,
395  0, 0, 0, 16, 19, 37, 37, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
396  11, 15, 37, 37, 27, 0, 0, 0, 10, 14, 5, 0, 13, 37, 37, 4, 0,
397  12, 0, 37, 37, 0, 9, 20, 37, 8, 37, 21, 0};
398 
399 static yyconst flex_int32_t yy_ec[256] = {
400  0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1,
401  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 6, 1, 7, 1, 1,
402  1, 1, 1, 1, 1, 8, 9, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13,
403  13, 14, 1, 1, 15, 1, 1, 1, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25,
404  26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 25, 36, 25, 37, 25, 1, 12, 1, 1,
405  38, 1, 25, 25, 25, 25,
406 
407  39, 25, 25, 25, 25, 25, 25, 25, 25, 25, 40, 25, 25, 25, 25, 25, 25, 25, 25,
408  25, 25, 25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412  1, 1, 1, 1, 1,
413 
414  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
415  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
416  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
417 
418 static yyconst flex_int32_t yy_meta[41] = {
419  0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2, 2,
420  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2};
421 
422 static yyconst flex_int16_t yy_base[185] = {
423  0, 0, 35, 397, 486, 41, 486, 392, 26, 34, 486, 37, 36, 0, 41,
424  486, 49, 53, 57, 62, 66, 72, 79, 85, 90, 99, 103, 107, 114, 106,
425  84, 93, 486, 362, 367, 365, 339, 109, 44, 0, 117, 59, 122, 133, 138,
426  147, 151, 157, 161, 165, 169, 179, 183, 187, 192, 199, 204, 210, 215, 219,
427  128, 343, 347, 339, 322, 150, 486, 231, 324, 312, 310, 324, 127, 199, 324,
428  320, 314, 309, 226, 231, 236, 242, 247, 253, 257, 264, 268, 275, 279, 283,
429  289, 293, 284, 280, 293, 270, 273, 238, 273, 272, 294,
430 
431  300, 304, 308, 314, 320, 324, 328, 335, 339, 249, 254, 264, 251, 234, 57,
432  246, 234, 231, 344, 350, 354, 359, 364, 368, 372, 378, 219, 195, 230, 215,
433  215, 203, 206, 191, 170, 162, 160, 382, 388, 392, 396, 402, 157, 162, 150,
434  146, 140, 138, 138, 126, 117, 486, 486, 406, 411, 415, 119, 107, 82, 486,
435  486, 486, 68, 486, 420, 424, 486, 65, 486, 64, 429, 433, 59, 486, 437,
436  448, 486, 453, 457, 486, 83, 479, 482, 49};
437 
438 static yyconst flex_int16_t yy_def[185] = {
439  0, 180, 1, 180, 180, 180, 180, 180, 180, 180, 180, 181, 181, 181, 181,
440  180, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 180,
441  183, 180, 180, 180, 180, 180, 180, 180, 180, 181, 181, 181, 181, 181, 182,
442  184, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
443  183, 180, 180, 180, 180, 183, 180, 183, 180, 180, 180, 180, 180, 180, 180,
444  181, 181, 181, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182, 182,
445  182, 180, 180, 180, 180, 180, 180, 180, 180, 180, 182,
446 
447  182, 182, 182, 182, 182, 182, 182, 182, 182, 180, 180, 180, 180, 180, 180,
448  180, 180, 180, 182, 182, 182, 182, 182, 182, 182, 182, 180, 180, 180, 180,
449  180, 180, 180, 180, 180, 180, 180, 182, 182, 182, 182, 182, 180, 180, 180,
450  180, 180, 180, 180, 180, 180, 180, 180, 182, 182, 182, 180, 180, 180, 180,
451  180, 180, 180, 180, 182, 182, 180, 180, 180, 180, 182, 182, 180, 180, 182,
452  182, 180, 182, 182, 0, 180, 180, 180, 180};
453 
454 static yyconst flex_int16_t yy_nxt[527] = {
455  0, 4, 5, 6, 7, 5, 8, 4, 9, 10, 11, 12, 13, 14, 4,
456  15, 16, 17, 17, 18, 17, 19, 20, 21, 22, 17, 23, 17, 24, 25,
457  17, 17, 26, 17, 27, 17, 17, 17, 28, 17, 17, 29, 30, 31, 33,
458  37, 31, 38, 40, 42, 41, 77, 40, 34, 41, 37, 43, 38, 35, 36,
459  39, 39, 133, 45, 39, 39, 46, 45, 39, 39, 40, 45, 41, 39, 39,
460  43, 45, 39, 39, 134, 45, 47, 48, 39, 39, 39, 45, 66, 67, 177,
461  39, 39, 50, 45, 174, 31, 39, 39, 31, 45, 173,
462 
463  39, 39, 170, 45, 49, 54, 51, 52, 53, 39, 39, 60, 45, 39, 39,
464  169, 45, 39, 39, 55, 45, 72, 58, 61, 39, 39, 56, 180, 73, 42,
465  66, 67, 62, 57, 42, 168, 43, 63, 64, 72, 74, 43, 75, 59, 167,
466  76, 73, 73, 39, 39, 164, 180, 66, 67, 163, 43, 39, 39, 39, 39,
467  43, 39, 39, 162, 180, 73, 78, 39, 39, 161, 180, 39, 39, 160, 180,
468  39, 39, 159, 180, 39, 39, 158, 180, 145, 39, 157, 82, 80, 79, 39,
469  39, 153, 180, 39, 39, 152, 180, 39, 39, 144,
470 
471  180, 151, 39, 39, 81, 180, 74, 83, 74, 39, 39, 99, 180, 84, 39,
472  39, 145, 180, 85, 87, 39, 39, 150, 180, 86, 39, 39, 134, 180, 39,
473  39, 149, 180, 66, 67, 89, 39, 39, 148, 180, 147, 39, 39, 88, 180,
474  146, 39, 39, 90, 180, 143, 101, 39, 39, 137, 180, 100, 39, 39, 136,
475  180, 135, 102, 39, 39, 132, 180, 39, 39, 131, 180, 116, 117, 103, 39,
476  39, 128, 180, 39, 39, 105, 180, 127, 106, 99, 39, 39, 104, 180, 39,
477  39, 118, 180, 39, 39, 115, 180, 129, 130, 39,
478 
479  39, 107, 180, 114, 39, 39, 108, 180, 109, 113, 39, 39, 112, 180, 39,
480  39, 111, 180, 39, 39, 110, 180, 45, 121, 39, 39, 76, 180, 119, 120,
481  39, 39, 76, 180, 39, 39, 99, 180, 39, 39, 98, 180, 97, 122, 96,
482  39, 39, 123, 180, 39, 39, 95, 180, 124, 39, 39, 94, 180, 93, 125,
483  39, 39, 126, 180, 39, 39, 92, 180, 140, 39, 39, 91, 180, 71, 39,
484  39, 138, 180, 39, 39, 139, 180, 39, 39, 70, 180, 69, 141, 39, 39,
485  68, 180, 39, 39, 32, 180, 180, 142, 39, 39,
486 
487  180, 180, 39, 39, 180, 180, 39, 39, 180, 180, 154, 155, 39, 39, 180,
488  180, 39, 39, 180, 180, 180, 39, 39, 156, 180, 39, 39, 180, 180, 165,
489  39, 39, 180, 180, 39, 39, 180, 180, 166, 39, 39, 180, 180, 39, 39,
490  180, 180, 39, 39, 180, 180, 180, 171, 180, 180, 180, 176, 172, 39, 39,
491  180, 180, 175, 39, 39, 180, 180, 39, 39, 180, 180, 180, 179, 180, 180,
492  180, 180, 180, 180, 178, 44, 44, 65, 65, 65, 3, 180, 180, 180, 180,
493  180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
494 
495  180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
496  180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180};
497 
498 static yyconst flex_int16_t yy_chk[527] = {
499  0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
500  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
501  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 5, 8,
502  9, 5, 9, 11, 12, 11, 184, 14, 8, 14, 38, 12, 38, 8, 8,
503  16, 16, 115, 16, 17, 17, 16, 17, 18, 18, 41, 18, 41, 19, 19,
504  12, 19, 20, 20, 115, 20, 18, 19, 21, 21, 181, 21, 30, 30, 173,
505  22, 22, 21, 22, 170, 31, 23, 23, 31, 23, 168,
506 
507  24, 24, 163, 24, 20, 24, 22, 22, 23, 25, 25, 29, 25, 26, 26,
508  159, 26, 27, 27, 25, 27, 37, 26, 29, 28, 28, 25, 28, 37, 40,
509  60, 60, 29, 25, 42, 158, 40, 29, 29, 72, 43, 42, 43, 27, 157,
510  43, 72, 37, 44, 44, 151, 44, 65, 65, 150, 40, 45, 45, 45, 45,
511  42, 46, 46, 149, 46, 72, 46, 47, 47, 148, 47, 48, 48, 147, 48,
512  49, 49, 146, 49, 50, 50, 145, 50, 144, 45, 143, 50, 48, 47, 51,
513  51, 137, 51, 52, 52, 136, 52, 53, 53, 128,
514 
515  53, 135, 54, 54, 49, 54, 73, 51, 73, 55, 55, 73, 55, 53, 56,
516  56, 128, 56, 54, 55, 57, 57, 134, 57, 54, 58, 58, 133, 58, 59,
517  59, 132, 59, 67, 67, 58, 78, 78, 131, 78, 130, 79, 79, 57, 79,
518  129, 80, 80, 59, 80, 127, 80, 81, 81, 118, 81, 78, 82, 82, 117,
519  82, 116, 81, 83, 83, 114, 83, 84, 84, 113, 84, 97, 97, 82, 85,
520  85, 111, 85, 86, 86, 84, 86, 110, 85, 99, 87, 87, 83, 87, 88,
521  88, 98, 88, 89, 89, 96, 89, 112, 112, 90,
522 
523  90, 86, 90, 95, 100, 100, 89, 100, 90, 94, 101, 101, 93, 101, 102,
524  102, 92, 102, 103, 103, 91, 103, 77, 102, 104, 104, 76, 104, 100, 101,
525  105, 105, 75, 105, 106, 106, 74, 106, 107, 107, 71, 107, 70, 103, 69,
526  108, 108, 104, 108, 109, 109, 68, 109, 105, 119, 119, 64, 119, 63, 107,
527  120, 120, 108, 120, 121, 121, 62, 121, 122, 122, 122, 61, 122, 36, 123,
528  123, 119, 123, 124, 124, 121, 124, 125, 125, 35, 125, 34, 125, 126, 126,
529  33, 126, 138, 138, 7, 138, 3, 126, 139, 139,
530 
531  0, 139, 140, 140, 0, 140, 141, 141, 0, 141, 140, 140, 142, 142, 0,
532  142, 154, 154, 0, 154, 0, 155, 155, 141, 155, 156, 156, 0, 156, 154,
533  165, 165, 0, 165, 166, 166, 0, 166, 155, 171, 171, 0, 171, 172, 172,
534  0, 172, 175, 175, 0, 175, 0, 165, 0, 0, 0, 172, 166, 176, 176,
535  0, 176, 171, 178, 178, 0, 178, 179, 179, 0, 179, 0, 178, 0, 0,
536  0, 0, 0, 0, 176, 182, 182, 183, 183, 183, 180, 180, 180, 180, 180,
537  180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
538 
539  180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180,
540  180, 180, 180, 180, 180, 180, 180, 180, 180, 180, 180};
541 
542 static yy_state_type yy_last_accepting_state;
543 static char *yy_last_accepting_cpos;
544 
545 extern int HECMW_ctrl_flex_debug;
547 
548 /* The intent behind this definition is that it'll catch
549  * any uses of REJECT which flex missed.
550  */
551 #define REJECT reject_used_but_not_detected
552 #define yymore() yymore_used_but_not_detected
553 #define YY_MORE_ADJ 0
554 #define YY_RESTORE_YY_MORE_OFFSET
556 #line 1 "../src/common/hecmw_ctrllex.l"
557 #line 2 "../src/common/hecmw_ctrllex.l"
558 #include <string.h>
559 #include <errno.h>
560 #include "hecmw_ctrllex.h"
561 #include "hecmw_util.h"
562 
563 typedef union {
564  double dval;
565  char *str;
566 } YYSTYPE;
567 
568 static YYSTYPE yylval;
569 static int lineno;
570 static int flag_header;
571 
572 static void set_flag_header(int flag);
573 #line 658 "<stdout>"
574 
575 #define INITIAL 0
576 
577 #ifndef YY_NO_UNISTD_H
578 /* Special case for "unistd.h", since it is non-ANSI. We include it way
579  * down here because we want the user's section 1 to have been scanned first.
580  * The user has a chance to override it with an option.
581  */
582 #include <unistd.h>
583 #endif
584 
585 #ifndef YY_EXTRA_TYPE
586 #define YY_EXTRA_TYPE void *
587 #endif
588 
589 static int yy_init_globals(void);
590 
591 /* Accessor methods to globals.
592  These are made visible to non-reentrant scanners for convenience. */
593 
594 int HECMW_ctrllex_destroy(void);
595 
596 int HECMW_ctrlget_debug(void);
597 
598 void HECMW_ctrlset_debug(int debug_flag);
599 
601 
603 
604 FILE *HECMW_ctrlget_in(void);
605 
606 void HECMW_ctrlset_in(FILE *in_str);
607 
608 FILE *HECMW_ctrlget_out(void);
609 
610 void HECMW_ctrlset_out(FILE *out_str);
611 
613 
614 char *HECMW_ctrlget_text(void);
615 
616 int HECMW_ctrlget_lineno(void);
617 
618 void HECMW_ctrlset_lineno(int line_number);
619 
620 /* Macros after this point can all be overridden by user definitions in
621  * section 1.
622  */
623 
624 #ifndef YY_SKIP_YYWRAP
625 #ifdef __cplusplus
626 extern "C" int HECMW_ctrlwrap(void);
627 #else
628 extern int HECMW_ctrlwrap(void);
629 #endif
630 #endif
631 
632 #ifndef yytext_ptr
633 static void yy_flex_strncpy(char *, yyconst char *, int);
634 #endif
635 
636 #ifdef YY_NEED_STRLEN
637 static int yy_flex_strlen(yyconst char *);
638 #endif
639 
640 #ifndef YY_NO_INPUT
641 
642 #ifdef __cplusplus
643 static int yyinput(void);
644 #else
645 static int input(void);
646 #endif
647 
648 #endif
649 
650 /* Amount of stuff to slurp up with each read. */
651 #ifndef YY_READ_BUF_SIZE
652 #define YY_READ_BUF_SIZE 8192
653 #endif
654 
655 /* Copy whatever the last rule matched to the standard output. */
656 #ifndef ECHO
657 /* This used to be an fputs(), but since the string might contain NUL's,
658  * we now use fwrite().
659  */
660 #define ECHO fwrite(HECMW_ctrltext, HECMW_ctrlleng, 1, HECMW_ctrlout)
661 #endif
662 
663 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
664  * is returned in "result".
665  */
666 #ifndef YY_INPUT
667 #define YY_INPUT(buf, result, max_size) \
668  if (YY_CURRENT_BUFFER_LVALUE->yy_is_interactive) { \
669  int c = '*'; \
670  yy_size_t n; \
671  for (n = 0; n < max_size && (c = getc(HECMW_ctrlin)) != EOF && c != '\n'; \
672  ++n) \
673  buf[n] = (char)c; \
674  if (c == '\n') buf[n++] = (char)c; \
675  if (c == EOF && ferror(HECMW_ctrlin)) \
676  YY_FATAL_ERROR("input in flex scanner failed"); \
677  result = n; \
678  } else { \
679  errno = 0; \
680  while ((result = fread(buf, 1, max_size, HECMW_ctrlin)) == 0 && \
681  ferror(HECMW_ctrlin)) { \
682  if (errno != EINTR) { \
683  YY_FATAL_ERROR("input in flex scanner failed"); \
684  break; \
685  } \
686  errno = 0; \
687  clearerr(HECMW_ctrlin); \
688  } \
689  }
690 
691 #endif
692 
693 /* No semi-colon after return; correct usage is to write "yyterminate();" -
694  * we don't want an extra ';' after the "return" because that will cause
695  * some compilers to complain about unreachable statements.
696  */
697 #ifndef yyterminate
698 #define yyterminate() return YY_NULL
699 #endif
700 
701 /* Number of entries by which start-condition stack grows. */
702 #ifndef YY_START_STACK_INCR
703 #define YY_START_STACK_INCR 25
704 #endif
705 
706 /* Report a fatal error. */
707 #ifndef YY_FATAL_ERROR
708 #define YY_FATAL_ERROR(msg) yy_fatal_error(msg)
709 #endif
710 
711 /* end tables serialization structures and prototypes */
712 
713 /* Default declaration of generated scanner - a define so the user can
714  * easily add parameters.
715  */
716 #ifndef YY_DECL
717 #define YY_DECL_IS_OURS 1
718 
719 extern int HECMW_ctrllex(void);
720 
721 #define YY_DECL int HECMW_ctrllex(void)
722 #endif /* !YY_DECL */
723 
724 /* Code executed at the beginning of each rule, after HECMW_ctrltext and
725  * HECMW_ctrlleng
726  * have been set up.
727  */
728 #ifndef YY_USER_ACTION
729 #define YY_USER_ACTION
730 #endif
731 
732 /* Code executed at the end of each rule. */
733 #ifndef YY_BREAK
734 #define YY_BREAK break;
735 #endif
736 
737 #define YY_RULE_SETUP \
738  if (HECMW_ctrlleng > 0) \
739  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
740  (HECMW_ctrltext[HECMW_ctrlleng - 1] == '\n'); \
741  YY_USER_ACTION
742 
746  register yy_state_type yy_current_state;
747  register char *yy_cp, *yy_bp;
748  register int yy_act;
749 
750 #line 30 "../src/common/hecmw_ctrllex.l"
751 
752 #line 844 "<stdout>"
753 
754  if (!(yy_init)) {
755  (yy_init) = 1;
756 #ifdef YY_USER_INIT
757  YY_USER_INIT;
758 #endif
759 
760  if (!(yy_start)) (yy_start) = 1; /* first start state */
761 
762  if (!HECMW_ctrlin) HECMW_ctrlin = stdin;
763 
764  if (!HECMW_ctrlout) HECMW_ctrlout = stdout;
765 
766  if (!YY_CURRENT_BUFFER) {
767  HECMW_ctrlensure_buffer_stack();
770  }
771 
772  HECMW_ctrl_load_buffer_state();
773  }
774 
775  while (1) { /* loops until end-of-file is reached */
776  yy_cp = (yy_c_buf_p);
777  /* Support of HECMW_ctrltext. */
778  *yy_cp = (yy_hold_char);
779  /* yy_bp points to the position in yy_ch_buf of the start of
780  * the current run.
781  */
782  yy_bp = yy_cp;
783  yy_current_state = (yy_start);
784  yy_current_state += YY_AT_BOL();
785  yy_match:
786 
787  do {
788  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
789 
790  if (yy_accept[yy_current_state]) {
791  (yy_last_accepting_state) = yy_current_state;
792  (yy_last_accepting_cpos) = yy_cp;
793  }
794 
795  while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) {
796  yy_current_state = (int)yy_def[yy_current_state];
797 
798  if (yy_current_state >= 181) yy_c = yy_meta[(unsigned int)yy_c];
799  }
800 
801  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c];
802  ++yy_cp;
803  } while (yy_base[yy_current_state] != 486);
804 
805  yy_find_action:
806  yy_act = yy_accept[yy_current_state];
807 
808  if (yy_act == 0) {
809  /* have to back up */
810  yy_cp = (yy_last_accepting_cpos);
811  yy_current_state = (yy_last_accepting_state);
812  yy_act = yy_accept[yy_current_state];
813  }
814 
816  do_action: /* This label is used only to access EOF actions. */
817 
818  switch (yy_act) {
819  /* beginning of action switch */
820  case 0: /* must back up */
821  /* undo the effects of YY_DO_BEFORE_ACTION */
822  *yy_cp = (yy_hold_char);
823  yy_cp = (yy_last_accepting_cpos);
824  yy_current_state = (yy_last_accepting_state);
825  goto yy_find_action;
826 
827  case 1:
828  /* rule 1 can match eol */
830 #line 32 "../src/common/hecmw_ctrllex.l"
831  {
832  lineno++;
833  set_flag_header(0);
834  }
835  YY_BREAK
836 
837  case 2:
839 #line 33 "../src/common/hecmw_ctrllex.l"
840  {
841  set_flag_header(0);
842  }
843  YY_BREAK
844 
845  case 3:
846  /* rule 3 can match eol */
848 #line 34 "../src/common/hecmw_ctrllex.l"
849  {
850  lineno++;
851  set_flag_header(0);
852  return HECMW_CTRLLEX_NL;
853  }
854  YY_BREAK
855 
856  case 4:
858 #line 36 "../src/common/hecmw_ctrllex.l"
859  {
860  set_flag_header(1);
862  }
863  YY_BREAK
864 
865  case 5:
867 #line 37 "../src/common/hecmw_ctrllex.l"
868  {
869  return flag_header ? HECMW_CTRLLEX_H_CONTROL : ' ';
870  }
871  YY_BREAK
872 
873  case 6:
875 #line 38 "../src/common/hecmw_ctrllex.l"
876  {
877  set_flag_header(1);
878  return HECMW_CTRLLEX_H_MESH;
879  }
880  YY_BREAK
881 
882  case 7:
884 #line 39 "../src/common/hecmw_ctrllex.l"
885  {
886  return flag_header ? HECMW_CTRLLEX_H_MESH : ' ';
887  }
888  YY_BREAK
889 
890  case 8:
892 #line 40 "../src/common/hecmw_ctrllex.l"
893  {
894  set_flag_header(1);
896  }
897  YY_BREAK
898 
899  case 9:
901 #line 41 "../src/common/hecmw_ctrllex.l"
902  {
903  return flag_header ? HECMW_CTRLLEX_H_MESH_GROUP : ' ';
904  }
905  YY_BREAK
906 
907  case 10:
909 #line 42 "../src/common/hecmw_ctrllex.l"
910  {
911  set_flag_header(1);
912  return HECMW_CTRLLEX_H_RESULT;
913  }
914  YY_BREAK
915 
916  case 11:
918 #line 43 "../src/common/hecmw_ctrllex.l"
919  {
920  return flag_header ? HECMW_CTRLLEX_H_RESULT : ' ';
921  }
922  YY_BREAK
923 
924  case 12:
926 #line 44 "../src/common/hecmw_ctrllex.l"
927  {
928  set_flag_header(1);
930  }
931  YY_BREAK
932 
933  case 13:
935 #line 45 "../src/common/hecmw_ctrllex.l"
936  {
937  return flag_header ? HECMW_CTRLLEX_H_RESTART : ' ';
938  }
939  YY_BREAK
940 
941  case 14:
943 #line 46 "../src/common/hecmw_ctrllex.l"
944  {
945  set_flag_header(1);
946  return HECMW_CTRLLEX_H_SUBDIR;
947  }
948  YY_BREAK
949 
950  case 15:
952 #line 47 "../src/common/hecmw_ctrllex.l"
953  {
954  return flag_header ? HECMW_CTRLLEX_H_SUBDIR : ' ';
955  }
956  YY_BREAK
957 
958  case 16:
960 #line 49 "../src/common/hecmw_ctrllex.l"
961  {
962  set_flag_header(0);
963  return HECMW_CTRLLEX_K_ABAQUS;
964  }
965  YY_BREAK
966 
967  case 17:
969 #line 50 "../src/common/hecmw_ctrllex.l"
970  {
971  set_flag_header(0);
972  return HECMW_CTRLLEX_K_DIR;
973  }
974  YY_BREAK
975 
976  case 18:
978 #line 51 "../src/common/hecmw_ctrllex.l"
979  {
980  set_flag_header(0);
981  return HECMW_CTRLLEX_K_FEMAP;
982  }
983  YY_BREAK
984 
985  case 19:
987 #line 52 "../src/common/hecmw_ctrllex.l"
988  {
989  set_flag_header(0);
990  return HECMW_CTRLLEX_K_GEOFEM;
991  }
992  YY_BREAK
993 
994  case 20:
996 #line 53 "../src/common/hecmw_ctrllex.l"
997  {
998  set_flag_header(0);
1000  }
1001  YY_BREAK
1002 
1003  case 21:
1005 #line 54 "../src/common/hecmw_ctrllex.l"
1006  {
1007  set_flag_header(0);
1009  }
1010  YY_BREAK
1011 
1012  case 22:
1014 #line 55 "../src/common/hecmw_ctrllex.l"
1015  {
1016  set_flag_header(0);
1017  return HECMW_CTRLLEX_K_IN;
1018  }
1019  YY_BREAK
1020 
1021  case 23:
1023 #line 56 "../src/common/hecmw_ctrllex.l"
1024  {
1025  set_flag_header(0);
1026  return HECMW_CTRLLEX_K_INOUT;
1027  }
1028  YY_BREAK
1029 
1030  case 24:
1032 #line 57 "../src/common/hecmw_ctrllex.l"
1033  {
1034  set_flag_header(0);
1035  return HECMW_CTRLLEX_K_IO;
1036  }
1037  YY_BREAK
1038 
1039  case 25:
1041 #line 58 "../src/common/hecmw_ctrllex.l"
1042  {
1043  set_flag_header(0);
1044  return HECMW_CTRLLEX_K_LIMIT;
1045  }
1046  YY_BREAK
1047 
1048  case 26:
1050 #line 59 "../src/common/hecmw_ctrllex.l"
1051  {
1052  set_flag_header(0);
1053  return HECMW_CTRLLEX_K_NAME;
1054  }
1055  YY_BREAK
1056 
1057  case 27:
1059 #line 60 "../src/common/hecmw_ctrllex.l"
1060  {
1061  set_flag_header(0);
1062  return HECMW_CTRLLEX_K_NASTRAN;
1063  }
1064  YY_BREAK
1065 
1066  case 28:
1068 #line 61 "../src/common/hecmw_ctrllex.l"
1069  {
1070  set_flag_header(0);
1071  return HECMW_CTRLLEX_K_ON;
1072  }
1073  YY_BREAK
1074 
1075  case 29:
1077 #line 62 "../src/common/hecmw_ctrllex.l"
1078  {
1079  set_flag_header(0);
1080  return HECMW_CTRLLEX_K_OFF;
1081  }
1082  YY_BREAK
1083 
1084  case 30:
1086 #line 63 "../src/common/hecmw_ctrllex.l"
1087  {
1088  set_flag_header(0);
1089  return HECMW_CTRLLEX_K_OUT;
1090  }
1091  YY_BREAK
1092 
1093  case 31:
1095 #line 64 "../src/common/hecmw_ctrllex.l"
1096  {
1097  set_flag_header(0);
1098  return HECMW_CTRLLEX_K_REFINE;
1099  }
1100  YY_BREAK
1101 
1102  case 32:
1104 #line 65 "../src/common/hecmw_ctrllex.l"
1105  {
1106  set_flag_header(0);
1107  return HECMW_CTRLLEX_K_TYPE;
1108  }
1109  YY_BREAK
1110 
1111  case 33:
1113 #line 68 "../src/common/hecmw_ctrllex.l"
1114  {
1115  set_flag_header(0);
1116  return '=';
1117  }
1118  YY_BREAK
1119 
1120  case 34:
1122 #line 69 "../src/common/hecmw_ctrllex.l"
1123  {
1124  set_flag_header(0);
1125  return ',';
1126  }
1127  YY_BREAK
1128 
1129  case 35:
1131 #line 71 "../src/common/hecmw_ctrllex.l"
1132  {
1133  yylval.dval = atof(HECMW_ctrltext);
1134  set_flag_header(0);
1135  return HECMW_CTRLLEX_INT;
1136  }
1137  YY_BREAK
1138 
1139  case 36:
1141 #line 76 "../src/common/hecmw_ctrllex.l"
1142  {
1143  yylval.dval = atof(HECMW_ctrltext);
1144  set_flag_header(0);
1145  return HECMW_CTRLLEX_DOUBLE;
1146  }
1147  YY_BREAK
1148 
1149  case 37:
1151 #line 81 "../src/common/hecmw_ctrllex.l"
1152  {
1153  yylval.str = HECMW_ctrltext;
1154  set_flag_header(0);
1155  return HECMW_CTRLLEX_NAME;
1156  }
1157  YY_BREAK
1158 
1159  case 38:
1161 #line 86 "../src/common/hecmw_ctrllex.l"
1162  {
1163  yylval.str = HECMW_ctrltext;
1164  set_flag_header(0);
1165  return HECMW_CTRLLEX_FILENAME;
1166  }
1167  YY_BREAK
1168 
1169  case 39:
1171 #line 91 "../src/common/hecmw_ctrllex.l"
1172  {
1173  set_flag_header(0);
1174  return HECMW_ctrltext[0];
1175  }
1176  YY_BREAK
1177 
1178  case YY_STATE_EOF(INITIAL):
1179 #line 92 "../src/common/hecmw_ctrllex.l"
1180  {
1181  return 0;
1182  }
1183 
1184  YY_BREAK
1185 
1186  case 40:
1188 #line 94 "../src/common/hecmw_ctrllex.l"
1189  ECHO;
1190  YY_BREAK
1191 #line 1150 "<stdout>"
1192 
1193  case YY_END_OF_BUFFER: {
1194  /* Amount of text matched not including the EOB char. */
1195  int yy_amount_of_matched_text = (int)(yy_cp - (yytext_ptr)) - 1;
1196  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1197  *yy_cp = (yy_hold_char);
1199 
1200  if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW) {
1201  /* We're scanning a new file or input source. It's
1202  * possible that this happened because the user
1203  * just pointed HECMW_ctrlin at a new source and called
1204  * HECMW_ctrllex(). If so, then we have to assure
1205  * consistency between YY_CURRENT_BUFFER and our
1206  * globals. Here is the right place to do so, because
1207  * this is the first action (other than possibly a
1208  * back-up) that will match for the new input source.
1209  */
1210  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1211  YY_CURRENT_BUFFER_LVALUE->yy_input_file = HECMW_ctrlin;
1212  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1213  }
1214 
1215  /* Note that here we test for yy_c_buf_p "<=" to the position
1216  * of the first EOB in the buffer, since yy_c_buf_p will
1217  * already have been incremented past the NUL character
1218  * (since all states make transitions on EOB to the
1219  * end-of-buffer state). Contrast this with the test
1220  * in input().
1221  */
1222  if ((yy_c_buf_p) <=
1223  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]) {
1224  /* This was really a NUL. */
1225  yy_state_type yy_next_state;
1226  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1227  yy_current_state = yy_get_previous_state();
1228  /* Okay, we're now positioned to make the NUL
1229  * transition. We couldn't have
1230  * yy_get_previous_state() go ahead and do it
1231  * for us because it doesn't know how to deal
1232  * with the possibility of jamming (and we don't
1233  * want to build jamming into it because then it
1234  * will run more slowly).
1235  */
1236  yy_next_state = yy_try_NUL_trans(yy_current_state);
1238 
1239  if (yy_next_state) {
1240  /* Consume the NUL. */
1241  yy_cp = ++(yy_c_buf_p);
1242  yy_current_state = yy_next_state;
1243  goto yy_match;
1244 
1245  } else {
1246  yy_cp = (yy_c_buf_p);
1247  goto yy_find_action;
1248  }
1249 
1250  } else
1251  switch (yy_get_next_buffer()) {
1252  case EOB_ACT_END_OF_FILE: {
1253  (yy_did_buffer_switch_on_eof) = 0;
1254 
1255  if (HECMW_ctrlwrap()) {
1256  /* Note: because we've taken care in
1257  * yy_get_next_buffer() to have set up
1258  * HECMW_ctrltext, we can now set up
1259  * yy_c_buf_p so that if some total
1260  * hoser (like flex itself) wants to
1261  * call the scanner after we return the
1262  * YY_NULL, it'll still work - another
1263  * YY_NULL will get returned.
1264  */
1265  (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1267  goto do_action;
1268 
1269  } else {
1270  if (!(yy_did_buffer_switch_on_eof)) YY_NEW_FILE;
1271  }
1272 
1273  break;
1274  }
1275 
1276  case EOB_ACT_CONTINUE_SCAN:
1277  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1278  yy_current_state = yy_get_previous_state();
1279  yy_cp = (yy_c_buf_p);
1281  goto yy_match;
1282 
1283  case EOB_ACT_LAST_MATCH:
1284  (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1285  yy_current_state = yy_get_previous_state();
1286  yy_cp = (yy_c_buf_p);
1288  goto yy_find_action;
1289  }
1290 
1291  break;
1292  }
1293 
1294  default:
1295  YY_FATAL_ERROR("fatal flex scanner internal error--no action found");
1296  } /* end of action switch */
1297  } /* end of scanning one token */
1298 } /* end of HECMW_ctrllex */
1299 
1300 /* yy_get_next_buffer - try to read in a new buffer
1301  *
1302  * Returns a code representing an action:
1303  * EOB_ACT_LAST_MATCH -
1304  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1305  * EOB_ACT_END_OF_FILE - end of file
1306  */
1307 static int yy_get_next_buffer(void) {
1308  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1309  register char *source = (yytext_ptr);
1310  register int number_to_move, i;
1311  int ret_val;
1312 
1313  if ((yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1])
1314  YY_FATAL_ERROR("fatal flex scanner internal error--end of buffer missed");
1315 
1316  if (YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0) {
1317  /* Don't try to fill the buffer, so this is an EOF. */
1318  if ((yy_c_buf_p) - (yytext_ptr)-YY_MORE_ADJ == 1) {
1319  /* We matched a single character, the EOB, so
1320  * treat this as a final EOF.
1321  */
1322  return EOB_ACT_END_OF_FILE;
1323 
1324  } else {
1325  /* We matched some text prior to the EOB, first
1326  * process it.
1327  */
1328  return EOB_ACT_LAST_MATCH;
1329  }
1330  }
1331 
1332  /* Try to read more data. */
1333  /* First move last chars to start of buffer. */
1334  number_to_move = (int)((yy_c_buf_p) - (yytext_ptr)) - 1;
1335 
1336  for (i = 0; i < number_to_move; ++i) *(dest++) = *(source++);
1337 
1338  if (YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING)
1339  /* don't do the read, it's not guaranteed to return an EOF,
1340  * just force an EOF
1341  */
1342  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1343 
1344  else {
1345  yy_size_t num_to_read =
1346  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1347 
1348  while (num_to_read <= 0) {
1349  /* Not enough room in the buffer - grow it. */
1350  /* just a shorter name for the current buffer */
1352  int yy_c_buf_p_offset = (int)((yy_c_buf_p)-b->yy_ch_buf);
1353 
1354  if (b->yy_is_our_buffer) {
1355  yy_size_t new_size = b->yy_buf_size * 2;
1356 
1357  if (new_size <= 0)
1358  b->yy_buf_size += b->yy_buf_size / 8;
1359 
1360  else
1361  b->yy_buf_size *= 2;
1362 
1363  b->yy_ch_buf = (char *)
1364  /* Include room in for 2 EOB chars. */
1365  HECMW_ctrlrealloc((void *)b->yy_ch_buf, b->yy_buf_size + 2);
1366 
1367  } else
1368  /* Can't grow it, we don't own it. */
1369  b->yy_ch_buf = 0;
1370 
1371  if (!b->yy_ch_buf)
1372  YY_FATAL_ERROR("fatal error - scanner input buffer overflow");
1373 
1374  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1375  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1376  }
1377 
1378  if (num_to_read > YY_READ_BUF_SIZE) num_to_read = YY_READ_BUF_SIZE;
1379 
1380  /* Read in more data. */
1381  YY_INPUT((&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1382  (yy_n_chars), num_to_read);
1383  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1384  }
1385 
1386  if ((yy_n_chars) == 0) {
1387  if (number_to_move == YY_MORE_ADJ) {
1388  ret_val = EOB_ACT_END_OF_FILE;
1390 
1391  } else {
1392  ret_val = EOB_ACT_LAST_MATCH;
1393  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING;
1394  }
1395 
1396  } else
1397  ret_val = EOB_ACT_CONTINUE_SCAN;
1398 
1399  if ((yy_size_t)((yy_n_chars) + number_to_move) >
1400  YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1401  /* Extend the array by 50%, plus the number we really need. */
1402  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1403  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *)HECMW_ctrlrealloc(
1404  (void *)YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, new_size);
1405 
1406  if (!YY_CURRENT_BUFFER_LVALUE->yy_ch_buf)
1407  YY_FATAL_ERROR("out of dynamic memory in yy_get_next_buffer()");
1408  }
1409 
1410  (yy_n_chars) += number_to_move;
1411  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1412  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1413  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1414  return ret_val;
1415 }
1416 
1417 /* yy_get_previous_state - get the state just before the EOB char was reached */
1418 
1419 static yy_state_type yy_get_previous_state(void) {
1420  register yy_state_type yy_current_state;
1421  register char *yy_cp;
1422  yy_current_state = (yy_start);
1423  yy_current_state += YY_AT_BOL();
1424 
1425  for (yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp) {
1426  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1427 
1428  if (yy_accept[yy_current_state]) {
1429  (yy_last_accepting_state) = yy_current_state;
1430  (yy_last_accepting_cpos) = yy_cp;
1431  }
1432 
1433  while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) {
1434  yy_current_state = (int)yy_def[yy_current_state];
1435 
1436  if (yy_current_state >= 181) yy_c = yy_meta[(unsigned int)yy_c];
1437  }
1438 
1439  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c];
1440  }
1441 
1442  return yy_current_state;
1443 }
1444 
1445 /* yy_try_NUL_trans - try to make a transition on the NUL character
1446  *
1447  * synopsis
1448  * next_state = yy_try_NUL_trans( current_state );
1449  */
1450 static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state) {
1451  register int yy_is_jam;
1452  register char *yy_cp = (yy_c_buf_p);
1453  register YY_CHAR yy_c = 1;
1454 
1455  if (yy_accept[yy_current_state]) {
1456  (yy_last_accepting_state) = yy_current_state;
1457  (yy_last_accepting_cpos) = yy_cp;
1458  }
1459 
1460  while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) {
1461  yy_current_state = (int)yy_def[yy_current_state];
1462 
1463  if (yy_current_state >= 181) yy_c = yy_meta[(unsigned int)yy_c];
1464  }
1465 
1466  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c];
1467  yy_is_jam = (yy_current_state == 180);
1468  return yy_is_jam ? 0 : yy_current_state;
1469 }
1470 
1471 #ifndef YY_NO_INPUT
1472 #ifdef __cplusplus
1473 static int yyinput(void)
1474 #else
1475 static int input(void)
1476 #endif
1477 
1478 {
1479  int c;
1480  *(yy_c_buf_p) = (yy_hold_char);
1481 
1482  if (*(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR) {
1483  /* yy_c_buf_p now points to the character we want to return.
1484  * If this occurs *before* the EOB characters, then it's a
1485  * valid NUL; if not, then we've hit the end of the buffer.
1486  */
1487  if ((yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)])
1488  /* This was really a NUL. */
1489  *(yy_c_buf_p) = '\0';
1490 
1491  else {
1492  /* need more input */
1493  yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1494  ++(yy_c_buf_p);
1495 
1496  switch (yy_get_next_buffer()) {
1497  case EOB_ACT_LAST_MATCH:
1498  /* This happens because yy_g_n_b()
1499  * sees that we've accumulated a
1500  * token and flags that we need to
1501  * try matching the token before
1502  * proceeding. But for input(),
1503  * there's no matching to consider.
1504  * So convert the EOB_ACT_LAST_MATCH
1505  * to EOB_ACT_END_OF_FILE.
1506  */
1507  /* Reset buffer status. */
1509 
1510  /*FALLTHROUGH*/
1511 
1512  case EOB_ACT_END_OF_FILE: {
1513  if (HECMW_ctrlwrap()) return 0;
1514 
1515  if (!(yy_did_buffer_switch_on_eof)) YY_NEW_FILE;
1516 
1517 #ifdef __cplusplus
1518  return yyinput();
1519 #else
1520  return input();
1521 #endif
1522  }
1523 
1524  case EOB_ACT_CONTINUE_SCAN:
1525  (yy_c_buf_p) = (yytext_ptr) + offset;
1526  break;
1527  }
1528  }
1529  }
1530 
1531  c = *(unsigned char *)(yy_c_buf_p); /* cast for 8-bit char's */
1532  *(yy_c_buf_p) = '\0'; /* preserve HECMW_ctrltext */
1533  (yy_hold_char) = *++(yy_c_buf_p);
1534  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1535  return c;
1536 }
1537 #endif /* ifndef YY_NO_INPUT */
1538 
1544 void HECMW_ctrlrestart(FILE *input_file) {
1545  if (!YY_CURRENT_BUFFER) {
1546  HECMW_ctrlensure_buffer_stack();
1549  }
1550 
1551  HECMW_ctrl_init_buffer(YY_CURRENT_BUFFER, input_file);
1552  HECMW_ctrl_load_buffer_state();
1553 }
1554 
1560  /* TODO. We should be able to replace this entire function body
1561  * with
1562  * HECMW_ctrlpop_buffer_state();
1563  * HECMW_ctrlpush_buffer_state(new_buffer);
1564  */
1565  HECMW_ctrlensure_buffer_stack();
1566 
1567  if (YY_CURRENT_BUFFER == new_buffer) return;
1568 
1569  if (YY_CURRENT_BUFFER) {
1570  /* Flush out information for old buffer. */
1571  *(yy_c_buf_p) = (yy_hold_char);
1572  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1573  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1574  }
1575 
1576  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1577  HECMW_ctrl_load_buffer_state();
1578  /* We don't actually know whether we did this switch during
1579  * EOF (HECMW_ctrlwrap()) processing, but the only time this flag
1580  * is looked at is after HECMW_ctrlwrap() is called, so it's safe
1581  * to go ahead and always set it.
1582  */
1583  (yy_did_buffer_switch_on_eof) = 1;
1584 }
1585 
1586 static void HECMW_ctrl_load_buffer_state(void) {
1587  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1588  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1589  HECMW_ctrlin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1590  (yy_hold_char) = *(yy_c_buf_p);
1591 }
1592 
1601  YY_BUFFER_STATE b;
1602  b = (YY_BUFFER_STATE)HECMW_ctrlalloc(sizeof(struct yy_buffer_state));
1603 
1604  if (!b) YY_FATAL_ERROR("out of dynamic memory in HECMW_ctrl_create_buffer()");
1605 
1606  b->yy_buf_size = size;
1607  /* yy_ch_buf has to be 2 characters longer than the size given because
1608  * we need to put in 2 end-of-buffer characters.
1609  */
1610  b->yy_ch_buf = (char *)HECMW_ctrlalloc(b->yy_buf_size + 2);
1611 
1612  if (!b->yy_ch_buf)
1613  YY_FATAL_ERROR("out of dynamic memory in HECMW_ctrl_create_buffer()");
1614 
1615  b->yy_is_our_buffer = 1;
1616  HECMW_ctrl_init_buffer(b, file);
1617  return b;
1618 }
1619 
1625  if (!b) return;
1626 
1627  if (b == YY_CURRENT_BUFFER) /* Not sure if we should pop here. */
1629 
1630  if (b->yy_is_our_buffer) HECMW_ctrlfree((void *)b->yy_ch_buf);
1631 
1632  HECMW_ctrlfree((void *)b);
1633 }
1634 
1635 #ifndef __cplusplus
1636 extern int isatty(int);
1637 #endif /* __cplusplus */
1638 
1639 /* Initializes or reinitializes a buffer.
1640  * This function is sometimes called more than once on the same buffer,
1641  * such as during a HECMW_ctrlrestart() or at EOF.
1642  */
1643 static void HECMW_ctrl_init_buffer(YY_BUFFER_STATE b, FILE *file)
1644 
1645 {
1646  int oerrno = errno;
1648  b->yy_input_file = file;
1649  b->yy_fill_buffer = 1;
1650 
1651  /* If b is the current buffer, then HECMW_ctrl_init_buffer was _probably_
1652  * called from HECMW_ctrlrestart() or through yy_get_next_buffer.
1653  * In that case, we don't want to reset the lineno or column.
1654  */
1655  if (b != YY_CURRENT_BUFFER) {
1656  b->yy_bs_lineno = 1;
1657  b->yy_bs_column = 0;
1658  }
1659 
1660  b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0;
1661  errno = oerrno;
1662 }
1663 
1669  if (!b) return;
1670 
1671  b->yy_n_chars = 0;
1672  /* We always need two end-of-buffer characters. The first causes
1673  * a transition to the end-of-buffer state. The second causes
1674  * a jam in that state.
1675  */
1678  b->yy_buf_pos = &b->yy_ch_buf[0];
1679  b->yy_at_bol = 1;
1681 
1682  if (b == YY_CURRENT_BUFFER) HECMW_ctrl_load_buffer_state();
1683 }
1684 
1692  if (new_buffer == NULL) return;
1693 
1694  HECMW_ctrlensure_buffer_stack();
1695 
1696  /* This block is copied from HECMW_ctrl_switch_to_buffer. */
1697  if (YY_CURRENT_BUFFER) {
1698  /* Flush out information for old buffer. */
1699  *(yy_c_buf_p) = (yy_hold_char);
1700  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1701  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1702  }
1703 
1704  /* Only push if top exists. Otherwise, replace top. */
1705  if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++;
1706 
1707  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1708  /* copied from HECMW_ctrl_switch_to_buffer. */
1709  HECMW_ctrl_load_buffer_state();
1710  (yy_did_buffer_switch_on_eof) = 1;
1711 }
1712 
1718  if (!YY_CURRENT_BUFFER) return;
1719 
1722 
1723  if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top);
1724 
1725  if (YY_CURRENT_BUFFER) {
1726  HECMW_ctrl_load_buffer_state();
1727  (yy_did_buffer_switch_on_eof) = 1;
1728  }
1729 }
1730 
1731 /* Allocates the stack if it does not exist.
1732  * Guarantees space for at least one push.
1733  */
1734 static void HECMW_ctrlensure_buffer_stack(void) {
1735  yy_size_t num_to_alloc;
1736 
1737  if (!(yy_buffer_stack)) {
1738  /* First allocation is just for 2 elements, since we don't know if this
1739  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1740  * immediate realloc on the next call.
1741  */
1742  num_to_alloc = 1;
1743  (yy_buffer_stack) = (struct yy_buffer_state **)HECMW_ctrlalloc(
1744  num_to_alloc * sizeof(struct yy_buffer_state *));
1745 
1746  if (!(yy_buffer_stack))
1748  "out of dynamic memory in HECMW_ctrlensure_buffer_stack()");
1749 
1750  memset((yy_buffer_stack), 0,
1751  num_to_alloc * sizeof(struct yy_buffer_state *));
1752  (yy_buffer_stack_max) = num_to_alloc;
1753  (yy_buffer_stack_top) = 0;
1754  return;
1755  }
1756 
1757  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1) {
1758  /* Increase the buffer to prepare for a possible push. */
1759  int grow_size = 8 /* arbitrary grow size */;
1760  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1761  (yy_buffer_stack) = (struct yy_buffer_state **)HECMW_ctrlrealloc(
1762  (yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state *));
1763 
1764  if (!(yy_buffer_stack))
1766  "out of dynamic memory in HECMW_ctrlensure_buffer_stack()");
1767 
1768  /* zero only the new slots.*/
1769  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0,
1770  grow_size * sizeof(struct yy_buffer_state *));
1771  (yy_buffer_stack_max) = num_to_alloc;
1772  }
1773 }
1774 
1783  YY_BUFFER_STATE b;
1784 
1785  if (size < 2 || base[size - 2] != YY_END_OF_BUFFER_CHAR ||
1786  base[size - 1] != YY_END_OF_BUFFER_CHAR)
1787  /* They forgot to leave room for the EOB's. */
1788  return 0;
1789 
1790  b = (YY_BUFFER_STATE)HECMW_ctrlalloc(sizeof(struct yy_buffer_state));
1791 
1792  if (!b) YY_FATAL_ERROR("out of dynamic memory in HECMW_ctrl_scan_buffer()");
1793 
1794  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1795  b->yy_buf_pos = b->yy_ch_buf = base;
1796  b->yy_is_our_buffer = 0;
1797  b->yy_input_file = 0;
1798  b->yy_n_chars = b->yy_buf_size;
1799  b->yy_is_interactive = 0;
1800  b->yy_at_bol = 1;
1801  b->yy_fill_buffer = 0;
1804  return b;
1805 }
1806 
1817  return HECMW_ctrl_scan_bytes(yystr, strlen(yystr));
1818 }
1819 
1829  yy_size_t _yybytes_len) {
1830  YY_BUFFER_STATE b;
1831  char *buf;
1832  yy_size_t n, i;
1833  /* Get memory for full buffer, including space for trailing EOB's. */
1834  n = _yybytes_len + 2;
1835  buf = (char *)HECMW_ctrlalloc(n);
1836 
1837  if (!buf) YY_FATAL_ERROR("out of dynamic memory in HECMW_ctrl_scan_bytes()");
1838 
1839  for (i = 0; i < _yybytes_len; ++i) buf[i] = yybytes[i];
1840 
1841  buf[_yybytes_len] = buf[_yybytes_len + 1] = YY_END_OF_BUFFER_CHAR;
1842  b = HECMW_ctrl_scan_buffer(buf, n);
1843 
1844  if (!b) YY_FATAL_ERROR("bad buffer in HECMW_ctrl_scan_bytes()");
1845 
1846  /* It's okay to grow etc. this buffer, and we should throw it
1847  * away when we're done.
1848  */
1849  b->yy_is_our_buffer = 1;
1850  return b;
1851 }
1852 
1853 #ifndef YY_EXIT_FAILURE
1854 #define YY_EXIT_FAILURE 2
1855 #endif
1856 
1857 static void yy_fatal_error(yyconst char *msg) {
1858  (void)fprintf(stderr, "%s\n", msg);
1859  exit(YY_EXIT_FAILURE);
1860 }
1861 
1862 /* Redefine yyless() so it works in section 3 code. */
1863 
1864 #undef yyless
1865 #define yyless(n) \
1866  do { \
1867  /* Undo effects of setting up HECMW_ctrltext. */ \
1868  int yyless_macro_arg = (n); \
1869  YY_LESS_LINENO(yyless_macro_arg); \
1870  HECMW_ctrltext[HECMW_ctrlleng] = (yy_hold_char); \
1871  (yy_c_buf_p) = HECMW_ctrltext + yyless_macro_arg; \
1872  (yy_hold_char) = *(yy_c_buf_p); \
1873  *(yy_c_buf_p) = '\0'; \
1874  HECMW_ctrlleng = yyless_macro_arg; \
1875  } while (0)
1876 
1877 /* Accessor methods (get/set functions) to struct members. */
1878 
1883 
1887 FILE *HECMW_ctrlget_in(void) { return HECMW_ctrlin; }
1888 
1892 FILE *HECMW_ctrlget_out(void) { return HECMW_ctrlout; }
1893 
1898 
1903 char *HECMW_ctrlget_text(void) { return HECMW_ctrltext; }
1904 
1909 void HECMW_ctrlset_lineno(int line_number) { HECMW_ctrllineno = line_number; }
1910 
1917 void HECMW_ctrlset_in(FILE *in_str) { HECMW_ctrlin = in_str; }
1918 
1919 void HECMW_ctrlset_out(FILE *out_str) { HECMW_ctrlout = out_str; }
1920 
1922 
1923 void HECMW_ctrlset_debug(int bdebug) { HECMW_ctrl_flex_debug = bdebug; }
1924 
1925 static int yy_init_globals(void) {
1926  /* Initialization is the same as for the non-reentrant scanner.
1927  * This function is called from HECMW_ctrllex_destroy(), so don't allocate
1928  * here.
1929  */
1930  (yy_buffer_stack) = 0;
1931  (yy_buffer_stack_top) = 0;
1932  (yy_buffer_stack_max) = 0;
1933  (yy_c_buf_p) = (char *)0;
1934  (yy_init) = 0;
1935  (yy_start) = 0;
1936 /* Defined in main.c */
1937 #ifdef YY_STDINIT
1938  HECMW_ctrlin = stdin;
1939  HECMW_ctrlout = stdout;
1940 #else
1941  HECMW_ctrlin = (FILE *)0;
1942  HECMW_ctrlout = (FILE *)0;
1943 #endif
1944  /* For future reference: Set errno on error, since we are called by
1945  * HECMW_ctrllex_init()
1946  */
1947  return 0;
1948 }
1949 
1950 /* HECMW_ctrllex_destroy is for both reentrant and non-reentrant scanners. */
1952  /* Pop the buffer stack, destroying each element. */
1953  while (YY_CURRENT_BUFFER) {
1957  }
1958 
1959  /* Destroy the stack itself. */
1960  HECMW_ctrlfree((yy_buffer_stack));
1961  (yy_buffer_stack) = NULL;
1962  /* Reset the globals. This is important in a non-reentrant scanner so the next
1963  * time
1964  * HECMW_ctrllex() is called, initialization will occur. */
1965  yy_init_globals();
1966  return 0;
1967 }
1968 
1969 /*
1970  * Internal utility routines.
1971  */
1972 
1973 #ifndef yytext_ptr
1974 static void yy_flex_strncpy(char *s1, yyconst char *s2, int n) {
1975  register int i;
1976 
1977  for (i = 0; i < n; ++i) s1[i] = s2[i];
1978 }
1979 #endif
1980 
1981 #ifdef YY_NEED_STRLEN
1982 static int yy_flex_strlen(yyconst char *s) {
1983  register int n;
1984 
1985  for (n = 0; s[n]; ++n)
1986  ;
1987 
1988  return n;
1989 }
1990 #endif
1991 
1992 void *HECMW_ctrlalloc(yy_size_t size) { return (void *)malloc(size); }
1993 
1994 void *HECMW_ctrlrealloc(void *ptr, yy_size_t size) {
1995  /* The cast to (char *) in the following accommodates both
1996  * implementations that use char* generic pointers, and those
1997  * that use void* generic pointers. It works with the latter
1998  * because both ANSI C and C++ allow castless assignment from
1999  * any pointer type to void*, and deal with argument conversions
2000  * as though doing an assignment.
2001  */
2002  return (void *)realloc((char *)ptr, size);
2003 }
2004 
2005 void HECMW_ctrlfree(void *ptr) {
2006  free((char *)ptr); /* see HECMW_ctrlrealloc() for (char *) cast */
2007 }
2008 
2009 #define YYTABLES_NAME "yytables"
2010 
2011 #line 94 "../src/common/hecmw_ctrllex.l"
2012 
2013 static void set_flag_header(int flag) { flag_header = flag ? 1 : 0; }
2014 
2015 int HECMW_ctrllex_get_lineno(void) { return lineno; }
2016 
2017 double HECMW_ctrllex_get_number(void) { return yylval.dval; }
2018 
2020 
2022 
2023 int HECMW_ctrllex_next_token_skip(int skip_token) {
2024  int token;
2025 
2026  while ((token = HECMW_ctrllex())) {
2027  if (token != skip_token) break;
2028  }
2029 
2030  return token;
2031 }
2032 
2034  static int first = 1;
2035 
2036  if (fp == NULL) return -1;
2037 
2038  if (first) {
2039  HECMW_ctrlin = fp;
2040  first = 0;
2041 
2042  } else {
2043  HECMW_ctrlrestart(fp);
2044  }
2045 
2046  lineno = 1;
2047  return 0;
2048 }
2049 
2051  int token;
2052 
2053  while ((token = HECMW_ctrllex_next_token())) {
2054  if (token == HECMW_CTRLLEX_NL) break;
2055  }
2056 
2057  return token;
2058 }
2059 
2061  char *p = HECMW_ctrltext;
2062 
2063  while (*p) {
2064  if (*p == '\n') {
2065  lineno--;
2066  }
2067 
2068  p++;
2069  }
2070 
2071  yyless(0);
2072  return 0;
2073 }
2074 
2075 int HECMW_ctrlwrap(void) { return 1; }
unsigned char YY_CHAR
Definition: hecmw_ablex.c:349
short int flex_int16_t
Definition: hecmw_ablex.c:70
int flex_int32_t
Definition: hecmw_ablex.c:71
int yy_state_type
Definition: hecmw_ablex.c:353
size_t yy_size_t
Definition: hecmw_ablex.c:177
#define YY_NEW_FILE
FILE * HECMW_ctrlget_in(void)
int HECMW_ctrlget_lineno(void)
FILE * HECMW_ctrlget_out(void)
unsigned char flex_uint8_t
Definition: hecmw_ctrllex.c:72
void HECMW_ctrlset_in(FILE *in_str)
YY_BUFFER_STATE HECMW_ctrl_scan_bytes(yyconst char *bytes, yy_size_t len)
unsigned char YY_CHAR
double HECMW_ctrllex_get_number(void)
#define YY_EXTRA_TYPE
YY_EXTRA_TYPE HECMW_ctrlget_extra(void)
FILE * HECMW_ctrlin
short int flex_int16_t
Definition: hecmw_ctrllex.c:70
unsigned int flex_uint32_t
Definition: hecmw_ctrllex.c:74
YY_BUFFER_STATE HECMW_ctrl_scan_string(yyconst char *yy_str)
#define YY_BREAK
int HECMW_ctrlget_debug(void)
void HECMW_ctrlset_debug(int debug_flag)
struct yy_buffer_state * YY_BUFFER_STATE
void HECMW_ctrl_delete_buffer(YY_BUFFER_STATE b)
#define YY_BUFFER_NEW
int HECMW_ctrllex_next_token_skip(int skip_token)
#define YY_RESTORE_YY_MORE_OFFSET
int HECMW_ctrllex(void)
#define YY_BUFFER_NORMAL
#define YY_MORE_ADJ
#define YY_RULE_SETUP
char * HECMW_ctrllex_get_text(void)
void HECMW_ctrlpush_buffer_state(YY_BUFFER_STATE new_buffer)
YY_BUFFER_STATE HECMW_ctrl_scan_buffer(char *base, yy_size_t size)
void * HECMW_ctrlalloc(yy_size_t)
#define YY_AT_BOL()
register char * yy_bp
#define yytext_ptr
signed char flex_int8_t
Definition: hecmw_ctrllex.c:69
int HECMW_ctrllex_unput_token(void)
void HECMW_ctrlrestart(FILE *input_file)
void HECMW_ctrlpop_buffer_state(void)
#define EOB_ACT_END_OF_FILE
register int yy_act
#define YY_CURRENT_BUFFER_LVALUE
int flex_int32_t
Definition: hecmw_ctrllex.c:71
void HECMW_ctrlset_out(FILE *out_str)
int HECMW_ctrl_flex_debug
#define YY_START
int HECMW_ctrllex_skip_line(void)
void HECMW_ctrlset_lineno(int line_number)
int yy_state_type
int HECMW_ctrllineno
#define YY_CURRENT_BUFFER
#define yyconst
#define INITIAL
void HECMW_ctrlfree(void *)
yy_size_t HECMW_ctrlget_leng(void)
#define YY_READ_BUF_SIZE
int HECMW_ctrlwrap(void)
#define YY_INPUT(buf, result, max_size)
#define ECHO
#define YY_END_OF_BUFFER
#define YY_STATE_EOF(state)
int isatty(int)
#define YY_END_OF_BUFFER_CHAR
FILE * HECMW_ctrlout
register char * yy_cp
#define YY_FATAL_ERROR(msg)
YY_BUFFER_STATE HECMW_ctrl_create_buffer(FILE *file, int size)
unsigned short int flex_uint16_t
Definition: hecmw_ctrllex.c:73
#define YY_DO_BEFORE_ACTION
#define EOB_ACT_LAST_MATCH
size_t yy_size_t
#define YY_BUFFER_EOF_PENDING
yy_size_t HECMW_ctrlleng
int HECMW_ctrllex_destroy(void)
#define EOB_ACT_CONTINUE_SCAN
char * HECMW_ctrlget_text(void)
#define YY_DECL
#define yyless(n)
#define YY_BUF_SIZE
#define YY_EXIT_FAILURE
void HECMW_ctrl_switch_to_buffer(YY_BUFFER_STATE new_buffer)
#define YY_SC_TO_UI(c)
int HECMW_ctrllex_set_input(FILE *fp)
int HECMW_ctrllex_next_token(void)
void HECMW_ctrlset_extra(YY_EXTRA_TYPE user_defined)
void * HECMW_ctrlrealloc(void *, yy_size_t)
int HECMW_ctrllex_get_lineno(void)
char * HECMW_ctrltext
void HECMW_ctrl_flush_buffer(YY_BUFFER_STATE b)
@ HECMW_CTRLLEX_K_IO
Definition: hecmw_ctrllex.h:33
@ HECMW_CTRLLEX_K_NAME
Definition: hecmw_ctrllex.h:35
@ HECMW_CTRLLEX_H_RESULT
Definition: hecmw_ctrllex.h:21
@ HECMW_CTRLLEX_K_REFINE
Definition: hecmw_ctrllex.h:40
@ HECMW_CTRLLEX_H_CONTROL
Definition: hecmw_ctrllex.h:18
@ HECMW_CTRLLEX_H_SUBDIR
Definition: hecmw_ctrllex.h:23
@ HECMW_CTRLLEX_K_LIMIT
Definition: hecmw_ctrllex.h:34
@ HECMW_CTRLLEX_H_MESH
Definition: hecmw_ctrllex.h:19
@ HECMW_CTRLLEX_K_OFF
Definition: hecmw_ctrllex.h:38
@ HECMW_CTRLLEX_H_RESTART
Definition: hecmw_ctrllex.h:22
@ HECMW_CTRLLEX_DOUBLE
Definition: hecmw_ctrllex.h:14
@ HECMW_CTRLLEX_K_GEOFEM
Definition: hecmw_ctrllex.h:28
@ HECMW_CTRLLEX_K_HECMW_ENTIRE
Definition: hecmw_ctrllex.h:30
@ HECMW_CTRLLEX_INT
Definition: hecmw_ctrllex.h:13
@ HECMW_CTRLLEX_K_OUT
Definition: hecmw_ctrllex.h:39
@ HECMW_CTRLLEX_K_NASTRAN
Definition: hecmw_ctrllex.h:36
@ HECMW_CTRLLEX_K_DIR
Definition: hecmw_ctrllex.h:26
@ HECMW_CTRLLEX_K_HECMW_DIST
Definition: hecmw_ctrllex.h:29
@ HECMW_CTRLLEX_K_ABAQUS
Definition: hecmw_ctrllex.h:25
@ HECMW_CTRLLEX_FILENAME
Definition: hecmw_ctrllex.h:16
@ HECMW_CTRLLEX_K_ON
Definition: hecmw_ctrllex.h:37
@ HECMW_CTRLLEX_K_TYPE
Definition: hecmw_ctrllex.h:41
@ HECMW_CTRLLEX_H_MESH_GROUP
Definition: hecmw_ctrllex.h:20
@ HECMW_CTRLLEX_K_INOUT
Definition: hecmw_ctrllex.h:32
@ HECMW_CTRLLEX_NL
Definition: hecmw_ctrllex.h:12
@ HECMW_CTRLLEX_NAME
Definition: hecmw_ctrllex.h:15
@ HECMW_CTRLLEX_K_IN
Definition: hecmw_ctrllex.h:31
@ HECMW_CTRLLEX_K_FEMAP
Definition: hecmw_ctrllex.h:27
#define NULL
FILE * yy_input_file
Definition: hecmw_ablex.c:207
yy_size_t yy_buf_size
Definition: hecmw_ablex.c:215
yy_size_t yy_n_chars
Definition: hecmw_ablex.c:220
flex_int32_t yy_verify
Definition: hecmw_ablex.c:382
flex_int32_t yy_nxt
Definition: hecmw_ablex.c:383
char * str
Definition: hecmw_ablex.c:1108
double dval
Definition: hecmw_ablex.c:1107