My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
scan_mdl.cpp
Go to the documentation of this file.
1 #line 2 "scan_mdl.cpp"
2 
3 #line 4 "scan_mdl.cpp"
4 
5 #define YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define yy_create_buffer mdl__create_buffer
10 #define yy_delete_buffer mdl__delete_buffer
11 #define yy_flex_debug mdl__flex_debug
12 #define yy_init_buffer mdl__init_buffer
13 #define yy_flush_buffer mdl__flush_buffer
14 #define yy_load_buffer_state mdl__load_buffer_state
15 #define yy_switch_to_buffer mdl__switch_to_buffer
16 #define yyin mdl_in
17 #define yyleng mdl_leng
18 #define yylex mdl_lex
19 #define yylineno mdl_lineno
20 #define yyout mdl_out
21 #define yyrestart mdl_restart
22 #define yytext mdl_text
23 #define yywrap mdl_wrap
24 #define yyalloc mdl_alloc
25 #define yyrealloc mdl_realloc
26 #define yyfree mdl_free
27 
28 #define FLEX_SCANNER
29 #define YY_FLEX_MAJOR_VERSION 2
30 #define YY_FLEX_MINOR_VERSION 5
31 #define YY_FLEX_SUBMINOR_VERSION 35
32 #if YY_FLEX_SUBMINOR_VERSION > 0
33 #define FLEX_BETA
34 #endif
35 
36 /* First, we deal with platform-specific or compiler-specific issues. */
37 
38 /* begin standard C headers. */
39 #include <stdio.h>
40 #include <string.h>
41 #include <errno.h>
42 #include <stdlib.h>
43 
44 /* end standard C headers. */
45 
46 /* flex integer type definitions */
47 
48 #ifndef FLEXINT_H
49 #define FLEXINT_H
50 
51 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
52 
53 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
54 
55 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
56  * if you want the limit (max/min) macros for int types.
57  */
58 #ifndef __STDC_LIMIT_MACROS
59 #define __STDC_LIMIT_MACROS 1
60 #endif
61 
62 #include <inttypes.h>
63 typedef int8_t flex_int8_t;
64 typedef uint8_t flex_uint8_t;
65 typedef int16_t flex_int16_t;
66 typedef uint16_t flex_uint16_t;
67 typedef int32_t flex_int32_t;
68 typedef uint32_t flex_uint32_t;
69 #else
70 typedef signed char flex_int8_t;
71 typedef short int flex_int16_t;
72 typedef int flex_int32_t;
73 typedef unsigned char flex_uint8_t;
74 typedef unsigned short int flex_uint16_t;
75 typedef unsigned int flex_uint32_t;
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 /* ! C99 */
107 
108 #endif /* ! FLEXINT_H */
109 
110 #ifdef __cplusplus
111 
112 /* The "const" storage-class-modifier is valid. */
113 #define YY_USE_CONST
114 
115 #else /* ! __cplusplus */
116 
117 /* C99 requires __STDC__ to be defined as 1. */
118 #if defined (__STDC__)
119 
120 #define YY_USE_CONST
121 
122 #endif /* defined (__STDC__) */
123 #endif /* ! __cplusplus */
124 
125 #ifdef YY_USE_CONST
126 #define yyconst const
127 #else
128 #define yyconst
129 #endif
130 
131 /* Returned upon end-of-file. */
132 #define YY_NULL 0
133 
134 /* Promotes a possibly negative, possibly signed char to an unsigned
135  * integer for use as an array index. If the signed char is negative,
136  * we want to instead treat it as an 8-bit unsigned char, hence the
137  * double cast.
138  */
139 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
140 
141 /* Enter a start condition. This macro really ought to take a parameter,
142  * but we do it the disgusting crufty way forced on us by the ()-less
143  * definition of BEGIN.
144  */
145 #define BEGIN (yy_start) = 1 + 2 *
146 
147 /* Translate the current start state into a value that can be later handed
148  * to BEGIN to return to the state. The YYSTATE alias is for lex
149  * compatibility.
150  */
151 #define YY_START (((yy_start) - 1) / 2)
152 #define YYSTATE YY_START
153 
154 /* Action number for EOF rule of a given start state. */
155 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
156 
157 /* Special action meaning "start processing a new file". */
158 #define YY_NEW_FILE mdl_restart(mdl_in )
159 
160 #define YY_END_OF_BUFFER_CHAR 0
161 
162 /* Size of default input buffer. */
163 #ifndef YY_BUF_SIZE
164 #ifdef __ia64__
165 /* On IA-64, the buffer size is 16k, not 8k.
166  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
167  * Ditto for the __ia64__ case accordingly.
168  */
169 #define YY_BUF_SIZE 32768
170 #else
171 #define YY_BUF_SIZE 16384
172 #endif /* __ia64__ */
173 #endif
174 
175 /* The state buf must be large enough to hold one state per character in the main buffer.
176  */
177 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
178 
179 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
180 #define YY_TYPEDEF_YY_BUFFER_STATE
182 #endif
183 
184 extern int mdl_leng;
185 
186 extern FILE *mdl_in, *mdl_out;
187 
188 #define EOB_ACT_CONTINUE_SCAN 0
189 #define EOB_ACT_END_OF_FILE 1
190 #define EOB_ACT_LAST_MATCH 2
191 
192  /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
193  * access to the local variable yy_act. Since yyless() is a macro, it would break
194  * existing scanners that call yyless() from OUTSIDE mdl_lex.
195  * One obvious solution it to make yy_act a global. I tried that, and saw
196  * a 5% performance hit in a non-mdl_lineno scanner, because yy_act is
197  * normally declared as a register variable-- so it is not worth it.
198  */
199  #define YY_LESS_LINENO(n) \
200  do { \
201  int yyl;\
202  for ( yyl = n; yyl < mdl_leng; ++yyl )\
203  if ( mdl_text[yyl] == '\n' )\
204  --mdl_lineno;\
205  }while(0)
206 
207 /* Return all but the first "n" matched characters back to the input stream. */
208 #define yyless(n) \
209  do \
210  { \
211  /* Undo effects of setting up mdl_text. */ \
212  int yyless_macro_arg = (n); \
213  YY_LESS_LINENO(yyless_macro_arg);\
214  *yy_cp = (yy_hold_char); \
215  YY_RESTORE_YY_MORE_OFFSET \
216  (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
217  YY_DO_BEFORE_ACTION; /* set up mdl_text again */ \
218  } \
219  while ( 0 )
220 
221 #define unput(c) yyunput( c, (yytext_ptr) )
222 
223 #ifndef YY_TYPEDEF_YY_SIZE_T
224 #define YY_TYPEDEF_YY_SIZE_T
225 typedef size_t yy_size_t;
226 #endif
227 
228 #ifndef YY_STRUCT_YY_BUFFER_STATE
229 #define YY_STRUCT_YY_BUFFER_STATE
230 struct yy_buffer_state
231  {
232  FILE *yy_input_file;
233 
234  char *yy_ch_buf; /* input buffer */
235  char *yy_buf_pos; /* current position in input buffer */
236 
237  /* Size of input buffer in bytes, not including room for EOB
238  * characters.
239  */
241 
242  /* Number of characters read into yy_ch_buf, not including EOB
243  * characters.
244  */
245  int yy_n_chars;
246 
247  /* Whether we "own" the buffer - i.e., we know we created it,
248  * and can realloc() it to grow it, and should free() it to
249  * delete it.
250  */
251  int yy_is_our_buffer;
252 
253  /* Whether this is an "interactive" input source; if so, and
254  * if we're using stdio for input, then we want to use getc()
255  * instead of fread(), to make sure we stop fetching input after
256  * each newline.
257  */
258  int yy_is_interactive;
259 
260  /* Whether we're considered to be at the beginning of a line.
261  * If so, '^' rules will be active on the next match, otherwise
262  * not.
263  */
264  int yy_at_bol;
265 
266  int yy_bs_lineno;
267  int yy_bs_column;
269  /* Whether to try to fill the input buffer when we reach the
270  * end of it.
271  */
272  int yy_fill_buffer;
273 
274  int yy_buffer_status;
275 
276 #define YY_BUFFER_NEW 0
277 #define YY_BUFFER_NORMAL 1
278  /* When an EOF's been seen but there's still some text to process
279  * then we mark the buffer as YY_EOF_PENDING, to indicate that we
280  * shouldn't try reading from the input source any more. We might
281  * still have a bunch of tokens to match, though, because of
282  * possible backing-up.
283  *
284  * When we actually see the EOF, we change the status to "new"
285  * (via mdl_restart()), so that the user can continue scanning by
286  * just pointing mdl_in at a new input file.
287  */
288 #define YY_BUFFER_EOF_PENDING 2
289 
290  };
291 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
292 
293 /* Stack of input buffers. */
294 static size_t yy_buffer_stack_top = 0;
295 static size_t yy_buffer_stack_max = 0;
296 static YY_BUFFER_STATE * yy_buffer_stack = 0;
298 /* We provide macros for accessing buffer states in case in the
299  * future we want to put the buffer states in a more general
300  * "scanner state".
301  *
302  * Returns the top of the stack, or NULL.
303  */
304 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
305  ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
306  : NULL)
307 
308 /* Same as previous macro, but useful when we know that the buffer stack is not
309  * NULL or when we need an lvalue. For internal use only.
310  */
311 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
312 
313 /* yy_hold_char holds the character lost when mdl_text is formed. */
314 static char yy_hold_char;
315 static int yy_n_chars; /* number of characters read into yy_ch_buf */
317 
318 /* Points to current character in buffer. */
319 static char *yy_c_buf_p = (char *) 0;
320 static int yy_init = 0; /* whether we need to initialize */
321 static int yy_start = 0; /* start state number */
322 
323 /* Flag which is used to allow mdl_wrap()'s to do buffer switches
324  * instead of setting up a fresh mdl_in. A bit of a hack ...
325  */
326 static int yy_did_buffer_switch_on_eof;
327 
328 void mdl_restart (FILE *input_file );
329 void mdl__switch_to_buffer (YY_BUFFER_STATE new_buffer );
330 YY_BUFFER_STATE mdl__create_buffer (FILE *file,int size );
331 void mdl__delete_buffer (YY_BUFFER_STATE b );
332 void mdl__flush_buffer (YY_BUFFER_STATE b );
333 void mdl_push_buffer_state (YY_BUFFER_STATE new_buffer );
334 void mdl_pop_buffer_state (void );
335 
336 static void mdl_ensure_buffer_stack (void );
337 static void mdl__load_buffer_state (void );
338 static void mdl__init_buffer (YY_BUFFER_STATE b,FILE *file );
339 
340 #define YY_FLUSH_BUFFER mdl__flush_buffer(YY_CURRENT_BUFFER )
341 
342 YY_BUFFER_STATE mdl__scan_buffer (char *base,yy_size_t size );
343 YY_BUFFER_STATE mdl__scan_string (yyconst char *yy_str );
344 YY_BUFFER_STATE mdl__scan_bytes (yyconst char *bytes,int len );
345 
346 void *mdl_alloc (yy_size_t );
347 void *mdl_realloc (void *,yy_size_t );
348 void mdl_free (void * );
349 
350 #define yy_new_buffer mdl__create_buffer
351 
352 #define yy_set_interactive(is_interactive) \
353  { \
354  if ( ! YY_CURRENT_BUFFER ){ \
355  mdl_ensure_buffer_stack (); \
356  YY_CURRENT_BUFFER_LVALUE = \
357  mdl__create_buffer(mdl_in,YY_BUF_SIZE ); \
358  } \
359  YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
360  }
361 
362 #define yy_set_bol(at_bol) \
363  { \
364  if ( ! YY_CURRENT_BUFFER ){\
365  mdl_ensure_buffer_stack (); \
366  YY_CURRENT_BUFFER_LVALUE = \
367  mdl__create_buffer(mdl_in,YY_BUF_SIZE ); \
368  } \
369  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
370  }
371 
372 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
373 
374 /* Begin user sect3 */
375 
376 #define mdl_wrap(n) 1
377 #define YY_SKIP_YYWRAP
378 
379 typedef unsigned char YY_CHAR;
380 
381 FILE *mdl_in = (FILE *) 0, *mdl_out = (FILE *) 0;
382 
383 typedef int yy_state_type;
384 
385 extern int mdl_lineno;
386 
387 int mdl_lineno = 1;
388 
389 extern char *mdl_text;
390 #define yytext_ptr mdl_text
391 
392 static yy_state_type yy_get_previous_state (void );
393 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
394 static int yy_get_next_buffer (void );
395 static void yy_fatal_error (yyconst char msg[] );
396 
397 /* Done after the current pattern has been matched and before the
398  * corresponding action - sets up mdl_text.
399  */
400 #define YY_DO_BEFORE_ACTION \
401  (yytext_ptr) = yy_bp; \
402  mdl_leng = (size_t) (yy_cp - yy_bp); \
403  (yy_hold_char) = *yy_cp; \
404  *yy_cp = '\0'; \
405  (yy_c_buf_p) = yy_cp;
406 
407 #define YY_NUM_RULES 48
408 #define YY_END_OF_BUFFER 49
409 /* This struct is not used in this scanner,
410  but its presence is necessary. */
411 struct yy_trans_info
412  {
415  };
416 static yyconst flex_int16_t yy_accept[314] =
417  { 0,
418  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
419  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
420  0, 0, 49, 47, 44, 44, 44, 47, 47, 37,
421  38, 42, 43, 38, 38, 38, 38, 38, 38, 38,
422  38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
423  38, 38, 39, 46, 44, 44, 45, 40, 47, 47,
424  47, 47, 47, 47, 47, 47, 41, 44, 0, 3,
425  37, 0, 0, 0, 38, 0, 38, 38, 38, 38,
426  38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
427  38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
428 
429  38, 38, 0, 0, 0, 0, 0, 0, 0, 0,
430  0, 2, 0, 0, 0, 37, 0, 37, 38, 38,
431  0, 38, 38, 38, 38, 38, 38, 38, 38, 38,
432  38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
433  38, 38, 38, 38, 38, 38, 38, 0, 0, 0,
434  0, 0, 0, 0, 0, 0, 38, 0, 38, 38,
435  38, 1, 38, 38, 38, 38, 4, 38, 38, 38,
436  38, 38, 13, 38, 38, 18, 38, 38, 38, 38,
437  38, 38, 38, 30, 24, 0, 0, 0, 0, 0,
438  38, 0, 38, 38, 38, 38, 38, 38, 38, 5,
439 
440  38, 38, 38, 38, 38, 38, 38, 38, 38, 38,
441  28, 38, 16, 29, 38, 38, 38, 38, 38, 38,
442  38, 38, 38, 38, 0, 33, 38, 31, 38, 38,
443  38, 38, 38, 38, 17, 38, 38, 34, 8, 9,
444  38, 38, 7, 38, 38, 0, 32, 38, 38, 14,
445  38, 38, 12, 38, 38, 11, 38, 38, 38, 0,
446  38, 35, 15, 25, 27, 26, 10, 23, 38, 0,
447  38, 38, 0, 38, 38, 0, 36, 38, 0, 38,
448  0, 38, 38, 0, 38, 38, 0, 19, 38, 0,
449  38, 0, 38, 6, 38, 38, 38, 38, 38, 38,
450 
451  38, 38, 20, 38, 38, 38, 38, 38, 21, 38,
452  38, 22, 0
453  } ;
454 
455 static yyconst flex_int32_t yy_ec[256] =
456  { 0,
457  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
458  1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
459  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
460  1, 5, 1, 6, 1, 1, 1, 1, 1, 1,
461  1, 1, 7, 8, 7, 9, 1, 10, 10, 10,
462  10, 10, 10, 10, 10, 10, 10, 1, 1, 1,
463  1, 1, 1, 1, 11, 12, 13, 14, 15, 16,
464  17, 18, 19, 17, 20, 21, 22, 23, 24, 25,
465  17, 26, 27, 28, 29, 30, 31, 32, 33, 17,
466  34, 1, 35, 1, 36, 1, 37, 38, 39, 40,
467 
468  41, 17, 42, 17, 43, 17, 44, 45, 46, 47,
469  48, 49, 17, 50, 51, 52, 53, 17, 54, 17,
470  55, 56, 57, 1, 58, 1, 1, 1, 1, 1,
471  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
472  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
473  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
474  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
475  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
476  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
477  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
478 
479  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
480  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
481  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
482  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
483  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
484  1, 1, 1, 1, 1
485  } ;
486 
487 static yyconst flex_int32_t yy_meta[59] =
488  { 0,
489  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
490  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
491  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
492  3, 3, 3, 4, 1, 2, 3, 3, 3, 3,
493  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
494  3, 3, 3, 3, 3, 3, 1, 1
495  } ;
496 
497 static yyconst flex_int16_t yy_base[323] =
498  { 0,
499  0, 58, 9, 13, 115, 120, 17, 125, 129, 133,
500  21, 137, 194, 0, 0, 0, 0, 0, 143, 147,
501  25, 151, 655, 901, 901, 901, 651, 636, 624, 148,
502  22, 901, 901, 150, 151, 134, 157, 153, 179, 171,
503  160, 183, 193, 201, 203, 206, 205, 211, 216, 220,
504  222, 224, 901, 901, 901, 615, 901, 901, 13, 22,
505  28, 549, 17, 543, 555, 551, 901, 901, 559, 901,
506  253, 550, 33, 546, 225, 544, 235, 238, 242, 261,
507  243, 264, 265, 269, 271, 273, 274, 276, 277, 280,
508  282, 287, 284, 281, 295, 300, 297, 308, 314, 321,
509 
510  324, 328, 469, 465, 454, 449, 443, 413, 396, 375,
511  375, 901, 379, 372, 366, 160, 379, 370, 32, 329,
512  38, 331, 330, 344, 334, 347, 358, 348, 362, 351,
513  361, 364, 375, 377, 379, 367, 384, 388, 393, 378,
514  398, 399, 408, 411, 412, 414, 416, 366, 352, 326,
515  334, 316, 321, 294, 276, 291, 420, 290, 425, 429,
516  447, 427, 443, 435, 455, 428, 457, 458, 459, 463,
517  464, 465, 469, 471, 466, 474, 475, 476, 477, 478,
518  481, 485, 493, 497, 509, 273, 267, 262, 229, 206,
519  214, 511, 515, 516, 523, 521, 519, 529, 532, 539,
520 
521  530, 536, 538, 542, 543, 550, 549, 552, 553, 562,
522  566, 573, 580, 585, 586, 202, 901, 589, 593, 592,
523  596, 597, 588, 595, 187, 602, 606, 612, 615, 616,
524  619, 623, 624, 630, 628, 632, 635, 636, 639, 642,
525  663, 656, 643, 647, 651, 162, 652, 659, 654, 674,
526  675, 678, 680, 683, 687, 689, 692, 691, 693, 166,
527  696, 697, 698, 701, 702, 704, 706, 709, 713, 143,
528  720, 724, 146, 733, 735, 149, 736, 737, 130, 740,
529  130, 739, 741, 44, 744, 748, 26, 752, 756, 42,
530  763, 44, 775, 901, 774, 772, 780, 783, 784, 785,
531 
532  790, 796, 791, 798, 806, 794, 811, 822, 818, 820,
533  824, 825, 901, 876, 880, 884, 888, 891, 46, 894,
534  42, 897
535  } ;
536 
537 static yyconst flex_int16_t yy_def[323] =
538  { 0,
539  314, 313, 315, 315, 315, 315, 316, 316, 315, 315,
540  316, 316, 315, 13, 13, 13, 13, 13, 315, 315,
541  316, 316, 313, 313, 313, 313, 313, 317, 313, 313,
542  318, 313, 313, 318, 318, 318, 318, 318, 318, 318,
543  318, 318, 318, 318, 318, 318, 318, 318, 318, 318,
544  318, 318, 313, 313, 313, 313, 313, 313, 313, 313,
545  313, 313, 313, 313, 313, 313, 313, 313, 317, 313,
546  313, 313, 313, 319, 318, 313, 318, 318, 318, 318,
547  318, 318, 318, 318, 318, 318, 318, 318, 318, 318,
548  318, 318, 318, 318, 318, 318, 318, 318, 318, 318,
549 
550  318, 318, 313, 313, 313, 313, 313, 313, 313, 313,
551  313, 313, 313, 313, 313, 313, 313, 313, 313, 320,
552  313, 318, 318, 318, 318, 318, 318, 318, 318, 318,
553  318, 318, 318, 318, 318, 318, 318, 318, 318, 318,
554  318, 318, 318, 318, 318, 318, 318, 313, 313, 313,
555  313, 313, 313, 313, 313, 321, 320, 313, 318, 318,
556  318, 318, 318, 318, 318, 318, 318, 318, 318, 318,
557  318, 318, 318, 318, 318, 318, 318, 318, 318, 318,
558  318, 318, 318, 318, 318, 313, 313, 313, 313, 313,
559  322, 313, 318, 318, 318, 318, 318, 318, 318, 318,
560 
561  318, 318, 318, 318, 318, 318, 318, 318, 318, 318,
562  318, 318, 318, 318, 318, 322, 313, 318, 318, 318,
563  318, 318, 318, 318, 313, 318, 318, 318, 318, 318,
564  318, 318, 318, 318, 318, 318, 318, 318, 318, 318,
565  318, 318, 318, 318, 318, 313, 318, 318, 318, 318,
566  318, 318, 318, 318, 318, 318, 318, 318, 318, 313,
567  318, 318, 318, 318, 318, 318, 318, 318, 318, 313,
568  318, 318, 313, 318, 318, 313, 318, 318, 313, 318,
569  313, 318, 318, 313, 318, 318, 313, 318, 318, 313,
570  318, 313, 318, 313, 318, 318, 318, 318, 318, 318,
571 
572  318, 318, 318, 318, 318, 318, 318, 318, 318, 318,
573  318, 318, 0, 313, 313, 313, 313, 313, 313, 313,
574  313, 313
575  } ;
576 
577 static yyconst flex_int16_t yy_nxt[960] =
578  { 0,
579  24, 25, 26, 27, 25, 28, 29, 24, 24, 30,
580  25, 26, 27, 25, 25, 26, 27, 25, 55, 26,
581  56, 55, 55, 26, 56, 55, 55, 26, 56, 55,
582  74, 103, 105, 24, 24, 24, 104, 111, 108, 117,
583  156, 119, 118, 112, 191, 158, 106, 121, 120, 294,
584  107, 109, 292, 290, 287, 76, 32, 33, 24, 25,
585  26, 27, 25, 28, 29, 24, 24, 30, 31, 34,
586  35, 31, 31, 31, 31, 36, 31, 31, 37, 31,
587  31, 38, 39, 31, 31, 40, 31, 41, 31, 31,
588  31, 24, 24, 24, 42, 31, 43, 44, 45, 31,
589 
590  31, 31, 46, 47, 31, 48, 49, 50, 51, 52,
591  31, 31, 31, 31, 32, 33, 25, 26, 27, 25,
592  28, 25, 26, 27, 25, 28, 55, 26, 56, 55,
593  25, 26, 27, 25, 25, 26, 27, 25, 55, 26,
594  56, 55, 74, 284, 25, 26, 27, 25, 25, 26,
595  27, 25, 55, 26, 56, 55, 72, 71, 74, 74,
596  281, 74, 73, 279, 276, 74, 79, 76, 74, 116,
597  77, 53, 273, 78, 73, 80, 53, 81, 270, 74,
598  260, 84, 57, 76, 76, 58, 76, 74, 73, 58,
599  76, 74, 246, 76, 57, 25, 26, 27, 25, 67,
600 
601  73, 74, 85, 67, 76, 82, 59, 60, 57, 74,
602  156, 74, 76, 74, 74, 61, 76, 62, 63, 74,
603  64, 65, 156, 83, 74, 66, 76, 112, 74, 87,
604  74, 86, 74, 74, 76, 88, 76, 90, 76, 76,
605  89, 112, 91, 74, 76, 94, 74, 92, 93, 76,
606  74, 74, 96, 76, 122, 76, 99, 76, 76, 95,
607  97, 72, 71, 98, 101, 123, 124, 73, 76, 74,
608  126, 76, 74, 74, 100, 76, 76, 74, 102, 74,
609  129, 74, 74, 125, 74, 74, 112, 112, 74, 74,
610  74, 127, 74, 73, 76, 74, 112, 76, 76, 192,
611 
612  119, 190, 76, 74, 76, 74, 76, 76, 74, 76,
613  76, 130, 128, 76, 76, 76, 74, 76, 132, 189,
614  76, 131, 74, 134, 136, 133, 139, 137, 76, 74,
615  76, 135, 74, 76, 138, 188, 74, 74, 74, 74,
616  160, 76, 74, 112, 142, 159, 140, 76, 187, 141,
617  143, 186, 74, 162, 76, 74, 74, 76, 145, 74,
618  144, 76, 76, 76, 76, 163, 74, 76, 164, 74,
619  74, 161, 74, 146, 112, 74, 147, 76, 112, 118,
620  76, 76, 166, 74, 76, 74, 74, 74, 118, 155,
621  154, 76, 74, 153, 76, 76, 74, 76, 152, 165,
622 
623  76, 74, 112, 169, 167, 168, 74, 74, 76, 151,
624  76, 76, 76, 171, 170, 173, 74, 76, 174, 74,
625  74, 76, 74, 172, 74, 150, 76, 178, 74, 175,
626  177, 76, 76, 74, 179, 74, 74, 74, 193, 176,
627  194, 76, 200, 74, 76, 76, 197, 76, 183, 76,
628  180, 74, 182, 76, 181, 74, 185, 195, 76, 184,
629  76, 76, 76, 74, 196, 74, 74, 74, 76, 198,
630  112, 74, 74, 74, 74, 112, 76, 74, 199, 74,
631  76, 112, 74, 74, 74, 74, 74, 149, 76, 74,
632  76, 76, 76, 74, 148, 202, 76, 76, 76, 76,
633 
634  201, 74, 76, 203, 76, 74, 208, 76, 76, 76,
635  76, 76, 210, 205, 76, 209, 204, 74, 76, 206,
636  192, 207, 211, 74, 74, 214, 76, 74, 212, 74,
637  76, 74, 213, 218, 220, 221, 219, 74, 74, 222,
638  74, 215, 76, 225, 74, 217, 74, 74, 76, 76,
639  74, 74, 76, 121, 76, 119, 76, 74, 74, 116,
640  74, 74, 76, 76, 70, 76, 115, 114, 226, 76,
641  74, 76, 76, 113, 74, 76, 76, 110, 223, 230,
642  224, 74, 76, 76, 229, 76, 76, 227, 74, 228,
643  231, 233, 232, 74, 74, 76, 74, 74, 234, 76,
644 
645  74, 74, 235, 74, 74, 74, 76, 240, 236, 242,
646  74, 243, 241, 76, 74, 237, 239, 68, 76, 76,
647  74, 76, 76, 74, 74, 76, 76, 74, 76, 76,
648  76, 74, 74, 71, 238, 76, 74, 244, 74, 76,
649  74, 70, 247, 74, 74, 76, 245, 74, 76, 76,
650  74, 74, 76, 68, 313, 74, 76, 76, 249, 74,
651  74, 76, 74, 76, 74, 76, 248, 74, 76, 76,
652  250, 74, 76, 254, 257, 76, 76, 256, 251, 252,
653  76, 253, 74, 74, 76, 76, 74, 76, 74, 76,
654  255, 74, 76, 259, 258, 74, 76, 74, 261, 74,
655 
656  74, 74, 313, 262, 74, 74, 74, 76, 76, 74,
657  74, 76, 74, 76, 74, 263, 76, 74, 264, 267,
658  76, 74, 76, 265, 76, 76, 76, 266, 74, 76,
659  76, 76, 74, 313, 76, 76, 271, 76, 269, 76,
660  268, 74, 76, 74, 74, 74, 76, 74, 74, 74,
661  313, 313, 74, 76, 313, 272, 74, 76, 274, 313,
662  74, 313, 313, 282, 74, 313, 76, 283, 76, 76,
663  76, 74, 76, 76, 76, 278, 277, 76, 313, 275,
664  74, 76, 74, 74, 289, 76, 280, 285, 74, 76,
665  286, 74, 74, 74, 291, 288, 76, 295, 74, 74,
666 
667  296, 297, 74, 293, 74, 76, 74, 76, 76, 313,
668  298, 313, 299, 76, 74, 304, 76, 76, 76, 74,
669  300, 313, 305, 76, 76, 302, 74, 76, 74, 76,
670  74, 76, 74, 74, 301, 308, 303, 313, 306, 76,
671  313, 313, 313, 313, 76, 313, 307, 313, 310, 313,
672  313, 76, 313, 76, 313, 76, 313, 76, 76, 313,
673  311, 313, 309, 313, 313, 313, 313, 313, 313, 313,
674  313, 313, 313, 313, 313, 312, 31, 31, 31, 31,
675  24, 24, 24, 24, 54, 54, 54, 54, 69, 69,
676  69, 69, 75, 75, 75, 157, 157, 157, 216, 216,
677 
678  23, 313, 313, 313, 313, 313, 313, 313, 313, 313,
679  313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
680  313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
681  313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
682  313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
683  313, 313, 313, 313, 313, 313, 313, 313, 313
684  } ;
685 
686 static yyconst flex_int16_t yy_chk[960] =
687  { 0,
688  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
689  3, 3, 3, 3, 4, 4, 4, 4, 7, 7,
690  7, 7, 11, 11, 11, 11, 21, 21, 21, 21,
691  31, 59, 60, 1, 1, 1, 59, 63, 61, 73,
692  119, 119, 73, 63, 321, 121, 60, 121, 319, 292,
693  60, 61, 290, 287, 284, 31, 1, 1, 2, 2,
694  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
695  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
696  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
697  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
698 
699  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
700  2, 2, 2, 2, 2, 2, 5, 5, 5, 5,
701  5, 6, 6, 6, 6, 6, 8, 8, 8, 8,
702  9, 9, 9, 9, 10, 10, 10, 10, 12, 12,
703  12, 12, 36, 281, 19, 19, 19, 19, 20, 20,
704  20, 20, 22, 22, 22, 22, 30, 30, 34, 35,
705  279, 38, 30, 276, 273, 37, 36, 36, 41, 116,
706  34, 5, 270, 35, 116, 37, 6, 38, 260, 40,
707  246, 40, 8, 34, 35, 9, 38, 39, 30, 10,
708  37, 42, 225, 41, 12, 13, 13, 13, 13, 19,
709 
710  116, 43, 41, 20, 40, 39, 13, 13, 22, 44,
711  216, 45, 39, 47, 46, 13, 42, 13, 13, 48,
712  13, 13, 191, 39, 49, 13, 43, 190, 50, 43,
713  51, 42, 52, 75, 44, 43, 45, 44, 47, 46,
714  43, 189, 45, 77, 48, 47, 78, 45, 46, 49,
715  79, 81, 49, 50, 77, 51, 50, 52, 75, 48,
716  49, 71, 71, 49, 52, 78, 79, 71, 77, 80,
717  81, 78, 82, 83, 51, 79, 81, 84, 52, 85,
718  84, 86, 87, 80, 88, 89, 188, 187, 90, 94,
719  91, 82, 93, 71, 80, 92, 186, 82, 83, 158,
720 
721  156, 155, 84, 95, 85, 97, 86, 87, 96, 88,
722  89, 85, 83, 90, 94, 91, 98, 93, 87, 154,
723  92, 86, 99, 89, 91, 88, 94, 92, 95, 100,
724  97, 90, 101, 96, 93, 153, 102, 120, 123, 122,
725  123, 98, 125, 152, 97, 122, 95, 99, 151, 96,
726  98, 150, 124, 125, 100, 126, 128, 101, 100, 130,
727  99, 102, 120, 123, 122, 126, 127, 125, 127, 131,
728  129, 124, 132, 101, 149, 136, 102, 124, 148, 118,
729  126, 128, 129, 133, 130, 134, 140, 135, 117, 115,
730  114, 127, 137, 113, 131, 129, 138, 132, 111, 128,
731 
732  136, 139, 110, 132, 130, 131, 141, 142, 133, 109,
733  134, 140, 135, 133, 132, 135, 143, 137, 136, 144,
734  145, 138, 146, 134, 147, 108, 139, 140, 157, 137,
735  139, 141, 142, 159, 141, 162, 166, 160, 159, 138,
736  160, 143, 166, 164, 144, 145, 164, 146, 145, 147,
737  142, 163, 144, 157, 143, 161, 147, 161, 159, 146,
738  162, 166, 160, 165, 163, 167, 168, 169, 164, 165,
739  107, 170, 171, 172, 175, 106, 163, 173, 165, 174,
740  161, 105, 176, 177, 178, 179, 180, 104, 165, 181,
741  167, 168, 169, 182, 103, 169, 170, 171, 172, 175,
742 
743  168, 183, 173, 170, 174, 184, 175, 176, 177, 178,
744  179, 180, 178, 172, 181, 177, 171, 185, 182, 173,
745  192, 174, 179, 193, 194, 182, 183, 197, 180, 196,
746  184, 195, 181, 193, 195, 196, 194, 198, 201, 197,
747  199, 183, 185, 200, 202, 192, 203, 200, 193, 194,
748  204, 205, 197, 76, 196, 74, 195, 207, 206, 72,
749  208, 209, 198, 201, 69, 199, 66, 65, 201, 202,
750  210, 203, 200, 64, 211, 204, 205, 62, 198, 205,
751  199, 212, 207, 206, 204, 208, 209, 202, 213, 203,
752  206, 207, 206, 214, 215, 210, 223, 218, 208, 211,
753 
754  220, 219, 209, 224, 221, 222, 212, 219, 210, 221,
755  226, 222, 220, 213, 227, 212, 218, 56, 214, 215,
756  228, 223, 218, 229, 230, 220, 219, 231, 224, 221,
757  222, 232, 233, 29, 215, 226, 235, 223, 234, 227,
758  236, 28, 227, 237, 238, 228, 224, 239, 229, 230,
759  240, 243, 231, 27, 23, 244, 232, 233, 230, 245,
760  247, 235, 249, 234, 242, 236, 229, 248, 237, 238,
761  231, 241, 239, 236, 242, 240, 243, 241, 232, 233,
762  244, 234, 250, 251, 245, 247, 252, 249, 253, 242,
763  237, 254, 248, 245, 244, 255, 241, 256, 248, 258,
764 
765  257, 259, 0, 249, 261, 262, 263, 250, 251, 264,
766  265, 252, 266, 253, 267, 251, 254, 268, 252, 257,
767  255, 269, 256, 254, 258, 257, 259, 255, 271, 261,
768  262, 263, 272, 0, 264, 265, 261, 266, 259, 267,
769  258, 274, 268, 275, 277, 278, 269, 282, 280, 283,
770  0, 0, 285, 271, 0, 269, 286, 272, 271, 0,
771  288, 0, 0, 280, 289, 0, 274, 280, 275, 277,
772  278, 291, 282, 280, 283, 275, 274, 285, 0, 272,
773  296, 286, 295, 293, 286, 288, 278, 282, 297, 289,
774  283, 298, 299, 300, 289, 285, 291, 293, 301, 303,
775 
776  293, 293, 306, 291, 302, 296, 304, 295, 293, 0,
777  295, 0, 296, 297, 305, 301, 298, 299, 300, 307,
778  297, 0, 302, 301, 303, 299, 309, 306, 310, 302,
779  308, 304, 311, 312, 298, 306, 300, 0, 304, 305,
780  0, 0, 0, 0, 307, 0, 305, 0, 308, 0,
781  0, 309, 0, 310, 0, 308, 0, 311, 312, 0,
782  310, 0, 307, 0, 0, 0, 0, 0, 0, 0,
783  0, 0, 0, 0, 0, 311, 314, 314, 314, 314,
784  315, 315, 315, 315, 316, 316, 316, 316, 317, 317,
785  317, 317, 318, 318, 318, 320, 320, 320, 322, 322,
786 
787  313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
788  313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
789  313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
790  313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
791  313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
792  313, 313, 313, 313, 313, 313, 313, 313, 313
793  } ;
794 
795 /* Table of booleans, true if rule could match eol. */
796 static yyconst flex_int32_t yy_rule_can_match_eol[49] =
797  { 0,
798 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
799  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
800  0, 0, 0, 0, 1, 0, 0, 0, 0, };
801 
802 static yy_state_type yy_last_accepting_state;
803 static char *yy_last_accepting_cpos;
804 
805 extern int mdl__flex_debug;
806 int mdl__flex_debug = 0;
807 
808 /* The intent behind this definition is that it'll catch
809  * any uses of REJECT which flex missed.
810  */
811 #define REJECT reject_used_but_not_detected
812 #define yymore() yymore_used_but_not_detected
813 #define YY_MORE_ADJ 0
814 #define YY_RESTORE_YY_MORE_OFFSET
815 char *mdl_text;
816 #line 1 "scan_mdl.l"
817 /* -*-c-*- */
818 #line 4 "scan_mdl.l"
819 /*
820  * scan_mdl.l - scanner for an IC-CAP MDL data file
821  *
822  * Copyright (C) 2006 Stefan Jahn <stefan@lkcc.org>
823  *
824  * This is free software; you can redistribute it and/or modify
825  * it under the terms of the GNU General Public License as published by
826  * the Free Software Foundation; either version 2, or (at your option)
827  * any later version.
828  *
829  * This software is distributed in the hope that it will be useful,
830  * but WITHOUT ANY WARRANTY; without even the implied warranty of
831  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
832  * GNU General Public License for more details.
833  *
834  * You should have received a copy of the GNU General Public License
835  * along with this package; see the file COPYING. If not, write to
836  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
837  * Boston, MA 02110-1301, USA.
838  *
839  * $Id: scan_mdl.l 1825 2011-03-11 20:42:14Z ela $
840  *
841  */
842 
843 #if HAVE_CONFIG_H
844 # include <config.h>
845 #endif
846 
847 #include <stdio.h>
848 #include <stdlib.h>
849 #include <string.h>
850 #include <ctype.h>
851 
852 #ifdef __MINGW32__
853 #include <io.h>
854 #endif
855 
856 #ifdef HAVE_UNISTD_H
857 #include <unistd.h>
858 #endif
859 
860 #include "check_mdl.h"
861 #include "tokens_mdl.h"
862 
863 #if !HAVE_STRCHR
864 # define strchr index
865 # define strrchr rindex
866 #endif
867 
868 
869 
870 #line 871 "scan_mdl.cpp"
871 
872 #define INITIAL 0
873 #define VERSION 1
874 #define BLKEDIT 2
875 #define BLKEDIT1 3
876 #define CIRCUIT 4
877 #define CIRCUIT1 5
878 #define PLINK 6
879 #define PLIST 7
880 #define PMEMBER 8
881 #define TABDATA 9
882 #define TABDATA1 10
883 
884 #ifndef YY_EXTRA_TYPE
885 #define YY_EXTRA_TYPE void *
886 #endif
887 
888 static int yy_init_globals (void );
889 
890 /* Accessor methods to globals.
891  These are made visible to non-reentrant scanners for convenience. */
892 
893 int mdl_lex_destroy (void );
894 
895 int mdl_get_debug (void );
896 
897 void mdl_set_debug (int debug_flag );
898 
900 
901 void mdl_set_extra (YY_EXTRA_TYPE user_defined );
902 
903 FILE *mdl_get_in (void );
904 
905 void mdl_set_in (FILE * in_str );
906 
907 FILE *mdl_get_out (void );
908 
909 void mdl_set_out (FILE * out_str );
910 
911 int mdl_get_leng (void );
912 
913 char *mdl_get_text (void );
914 
915 int mdl_get_lineno (void );
916 
917 void mdl_set_lineno (int line_number );
918 
919 /* Macros after this point can all be overridden by user definitions in
920  * section 1.
921  */
922 
923 #ifndef YY_SKIP_YYWRAP
924 #ifdef __cplusplus
925 extern "C" int mdl_wrap (void );
926 #else
927 extern int mdl_wrap (void );
928 #endif
929 #endif
930 
931 #ifndef yytext_ptr
932 static void yy_flex_strncpy (char *,yyconst char *,int );
933 #endif
934 
935 #ifdef YY_NEED_STRLEN
936 static int yy_flex_strlen (yyconst char * );
937 #endif
938 
939 #ifndef YY_NO_INPUT
940 
941 #ifdef __cplusplus
942 static int yyinput (void );
943 #else
944 static int input (void );
945 #endif
946 
947 #endif
948 
949 /* Amount of stuff to slurp up with each read. */
950 #ifndef YY_READ_BUF_SIZE
951 #ifdef __ia64__
952 /* On IA-64, the buffer size is 16k, not 8k */
953 #define YY_READ_BUF_SIZE 16384
954 #else
955 #define YY_READ_BUF_SIZE 8192
956 #endif /* __ia64__ */
957 #endif
958 
959 /* Copy whatever the last rule matched to the standard output. */
960 #ifndef ECHO
961 /* This used to be an fputs(), but since the string might contain NUL's,
962  * we now use fwrite().
963  */
964 #define ECHO do { if (fwrite( mdl_text, mdl_leng, 1, mdl_out )) {} } while (0)
965 #endif
966 
967 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
968  * is returned in "result".
969  */
970 #ifndef YY_INPUT
971 #define YY_INPUT(buf,result,max_size) \
972  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
973  { \
974  int c = '*'; \
975  size_t n; \
976  for ( n = 0; n < max_size && \
977  (c = getc( mdl_in )) != EOF && c != '\n'; ++n ) \
978  buf[n] = (char) c; \
979  if ( c == '\n' ) \
980  buf[n++] = (char) c; \
981  if ( c == EOF && ferror( mdl_in ) ) \
982  YY_FATAL_ERROR( "input in flex scanner failed" ); \
983  result = n; \
984  } \
985  else \
986  { \
987  errno=0; \
988  while ( (result = fread(buf, 1, max_size, mdl_in))==0 && ferror(mdl_in)) \
989  { \
990  if( errno != EINTR) \
991  { \
992  YY_FATAL_ERROR( "input in flex scanner failed" ); \
993  break; \
994  } \
995  errno=0; \
996  clearerr(mdl_in); \
997  } \
998  }\
999 \
1000 
1001 #endif
1002 
1003 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1004  * we don't want an extra ';' after the "return" because that will cause
1005  * some compilers to complain about unreachable statements.
1006  */
1007 #ifndef yyterminate
1008 #define yyterminate() return YY_NULL
1009 #endif
1010 
1011 /* Number of entries by which start-condition stack grows. */
1012 #ifndef YY_START_STACK_INCR
1013 #define YY_START_STACK_INCR 25
1014 #endif
1015 
1016 /* Report a fatal error. */
1017 #ifndef YY_FATAL_ERROR
1018 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1019 #endif
1020 
1021 /* end tables serialization structures and prototypes */
1022 
1023 /* Default declaration of generated scanner - a define so the user can
1024  * easily add parameters.
1025  */
1026 #ifndef YY_DECL
1027 #define YY_DECL_IS_OURS 1
1028 
1029 extern int mdl_lex (void);
1030 
1031 #define YY_DECL int mdl_lex (void)
1032 #endif /* !YY_DECL */
1033 
1034 /* Code executed at the beginning of each rule, after mdl_text and mdl_leng
1035  * have been set up.
1036  */
1037 #ifndef YY_USER_ACTION
1038 #define YY_USER_ACTION
1039 #endif
1040 
1041 /* Code executed at the end of each rule. */
1042 #ifndef YY_BREAK
1043 #define YY_BREAK break;
1044 #endif
1045 
1046 #define YY_RULE_SETUP \
1047  if ( mdl_leng > 0 ) \
1048  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1049  (mdl_text[mdl_leng - 1] == '\n'); \
1050  YY_USER_ACTION
1051 
1054 YY_DECL
1056  register yy_state_type yy_current_state;
1057  register char *yy_cp, *yy_bp;
1058  register int yy_act;
1059 
1060 #line 72 "scan_mdl.l"
1061 
1062 
1063 #line 1064 "scan_mdl.cpp"
1064 
1065  if ( !(yy_init) )
1066  {
1067  (yy_init) = 1;
1068 
1069 #ifdef YY_USER_INIT
1070  YY_USER_INIT;
1071 #endif
1072 
1073  if ( ! (yy_start) )
1074  (yy_start) = 1; /* first start state */
1075 
1076  if ( ! mdl_in )
1077  mdl_in = stdin;
1078 
1079  if ( ! mdl_out )
1080  mdl_out = stdout;
1081 
1082  if ( ! YY_CURRENT_BUFFER ) {
1083  mdl_ensure_buffer_stack ();
1086  }
1087 
1088  mdl__load_buffer_state( );
1089  }
1090 
1091  while ( 1 ) /* loops until end-of-file is reached */
1092  {
1093  yy_cp = (yy_c_buf_p);
1094 
1095  /* Support of mdl_text. */
1096  *yy_cp = (yy_hold_char);
1097 
1098  /* yy_bp points to the position in yy_ch_buf of the start of
1099  * the current run.
1100  */
1101  yy_bp = yy_cp;
1102 
1103  yy_current_state = (yy_start);
1104  yy_current_state += YY_AT_BOL();
1105 yy_match:
1106  do
1107  {
1108  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1109  if ( yy_accept[yy_current_state] )
1110  {
1111  (yy_last_accepting_state) = yy_current_state;
1112  (yy_last_accepting_cpos) = yy_cp;
1113  }
1114  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1115  {
1116  yy_current_state = (int) yy_def[yy_current_state];
1117  if ( yy_current_state >= 314 )
1118  yy_c = yy_meta[(unsigned int) yy_c];
1119  }
1120  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1121  ++yy_cp;
1122  }
1123  while ( yy_base[yy_current_state] != 901 );
1124 
1125 yy_find_action:
1126  yy_act = yy_accept[yy_current_state];
1127  if ( yy_act == 0 )
1128  { /* have to back up */
1129  yy_cp = (yy_last_accepting_cpos);
1130  yy_current_state = (yy_last_accepting_state);
1131  yy_act = yy_accept[yy_current_state];
1132  }
1133 
1135 
1136  if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1137  {
1138  int yyl;
1139  for ( yyl = 0; yyl < mdl_leng; ++yyl )
1140  if ( mdl_text[yyl] == '\n' )
1141 
1142  mdl_lineno++;
1143 ;
1144  }
1145 
1146 do_action: /* This label is used only to access EOF actions. */
1147 
1148  switch ( yy_act )
1149  { /* beginning of action switch */
1150  case 0: /* must back up */
1151  /* undo the effects of YY_DO_BEFORE_ACTION */
1152  *yy_cp = (yy_hold_char);
1153  yy_cp = (yy_last_accepting_cpos);
1154  yy_current_state = (yy_last_accepting_state);
1155  goto yy_find_action;
1156 
1157 case 1:
1159 #line 74 "scan_mdl.l"
1160 {
1161  BEGIN(PLINK);
1162  return LINK;
1163 }
1164  YY_BREAK
1165 case 2:
1167 #line 79 "scan_mdl.l"
1168 {
1169  mdl_lval.ident = strdup (mdl_text);
1170  BEGIN(INITIAL);
1171  return t_LINK;
1172 }
1173  YY_BREAK
1174 case 3:
1175 /* rule 3 can match eol */
1177 #line 85 "scan_mdl.l"
1178 {
1179  mdl_text[strlen (mdl_text) - 1] = '\0';
1180  mdl_text[0] = '\0';
1181  mdl_lval.ident = strdup (&mdl_text[1]);
1182  return String;
1183 }
1184  YY_BREAK
1185 case 4:
1187 #line 92 "scan_mdl.l"
1188 {
1189  return t_VIEW;
1190 }
1191  YY_BREAK
1192 case 5:
1194 #line 96 "scan_mdl.l"
1195 {
1196  return t_TABLE;
1197 }
1198  YY_BREAK
1199 case 6:
1201 #line 100 "scan_mdl.l"
1202 {
1203  BEGIN(TABDATA);
1204  return t_TABLE;
1205 }
1206  YY_BREAK
1207 case 7:
1209 #line 105 "scan_mdl.l"
1210 {
1211  return t_PSTABLE;
1212 }
1213  YY_BREAK
1214 case 8:
1216 #line 109 "scan_mdl.l"
1217 {
1218  BEGIN(BLKEDIT);
1219  return t_BLKEDIT;
1220 }
1221  YY_BREAK
1222 case 9:
1224 #line 114 "scan_mdl.l"
1225 {
1226  return t_CNTABLE;
1227 }
1228  YY_BREAK
1229 case 10:
1231 #line 118 "scan_mdl.l"
1232 {
1233  return t_OPTIMEDIT;
1234 }
1235  YY_BREAK
1236 case 11:
1238 #line 122 "scan_mdl.l"
1239 {
1240  return t_HYPTABLE;
1241 }
1242  YY_BREAK
1243 case 12:
1245 #line 126 "scan_mdl.l"
1246 {
1247  return t_ELEMENT;
1248 }
1249  YY_BREAK
1250 case 13:
1252 #line 130 "scan_mdl.l"
1253 {
1254  return t_DATA;
1255 }
1256  YY_BREAK
1257 case 14:
1259 #line 134 "scan_mdl.l"
1260 {
1261  return t_DATASET;
1262 }
1263  YY_BREAK
1264 case 15:
1266 #line 138 "scan_mdl.l"
1267 {
1268  return t_DATASIZE;
1269 }
1270  YY_BREAK
1271 case 16:
1273 #line 142 "scan_mdl.l"
1274 {
1275  return t_POINT;
1276 }
1277  YY_BREAK
1278 case 17:
1280 #line 146 "scan_mdl.l"
1281 {
1282  BEGIN(PMEMBER);
1283  return t_MEMBER;
1284 }
1285  YY_BREAK
1286 case 18:
1288 #line 151 "scan_mdl.l"
1289 {
1290  BEGIN(PLIST);
1291  return t_LIST;
1292 }
1293  YY_BREAK
1294 case 19:
1296 #line 156 "scan_mdl.l"
1297 {
1298  return t_PLOTOPTIMIZEROPT;
1299 }
1300  YY_BREAK
1301 case 20:
1303 #line 160 "scan_mdl.l"
1304 {
1305  return t_PLOTOPTIMIZERTRACESET;
1306 }
1307  YY_BREAK
1308 case 21:
1310 #line 164 "scan_mdl.l"
1311 {
1313 }
1314  YY_BREAK
1315 case 22:
1317 #line 168 "scan_mdl.l"
1318 {
1320 }
1321  YY_BREAK
1322 case 23:
1324 #line 172 "scan_mdl.l"
1325 {
1326  return t_PLOTERROR;
1327 }
1328  YY_BREAK
1329 case 24:
1331 #line 176 "scan_mdl.l"
1332 {
1333  return t_TYPE;
1334 }
1335  YY_BREAK
1336 case 25:
1338 #line 180 "scan_mdl.l"
1339 {
1340  return t_EDITSIZE;
1341 }
1342  YY_BREAK
1343 case 26:
1345 #line 184 "scan_mdl.l"
1346 {
1347  return t_PLOTSIZE;
1348 }
1349  YY_BREAK
1350 case 27:
1352 #line 188 "scan_mdl.l"
1353 {
1354  return t_OPTRANGE;
1355 }
1356  YY_BREAK
1357 case 28:
1359 #line 192 "scan_mdl.l"
1360 {
1361  return t_PARAM;
1362 }
1363  YY_BREAK
1364 case 29:
1366 #line 196 "scan_mdl.l"
1367 {
1368  return t_RANGE;
1369 }
1370  YY_BREAK
1371 case 30:
1373 #line 200 "scan_mdl.l"
1374 {
1375  return t_TERM;
1376 }
1377  YY_BREAK
1378 case 31:
1380 #line 204 "scan_mdl.l"
1381 {
1382  return t_CALSET;
1383 }
1384  YY_BREAK
1385 case 32:
1387 #line 208 "scan_mdl.l"
1388 {
1389  return t_CALDATA;
1390 }
1391  YY_BREAK
1392 case 33:
1394 #line 212 "scan_mdl.l"
1395 {
1396  return t_APPLIC;
1397 }
1398  YY_BREAK
1399 case 34:
1401 #line 216 "scan_mdl.l"
1402 {
1403  return t_SUBAPP;
1404 }
1405  YY_BREAK
1406 case 35:
1408 #line 220 "scan_mdl.l"
1409 {
1410  return t_CONNPAIR;
1411 }
1412  YY_BREAK
1413 case 36:
1415 #line 224 "scan_mdl.l"
1416 {
1417  BEGIN(CIRCUIT);
1418  return t_CIRCUITDECK;
1419 }
1420  YY_BREAK
1421 case 37:
1423 #line 229 "scan_mdl.l"
1424 { /* identify float */
1425  mdl_lval.f = strtod (mdl_text, NULL);
1426  return Real;
1427 }
1428  YY_BREAK
1429 case 38:
1431 #line 234 "scan_mdl.l"
1432 {
1433  mdl_lval.ident = strdup (mdl_text);
1434  return Identifier;
1435 }
1436  YY_BREAK
1437 case 39:
1439 #line 239 "scan_mdl.l"
1440 { BEGIN(BLKEDIT1); return '{'; }
1441  YY_BREAK
1442 case 40:
1444 #line 240 "scan_mdl.l"
1445 { BEGIN(CIRCUIT1); return '{'; }
1446  YY_BREAK
1447 case 41:
1449 #line 241 "scan_mdl.l"
1450 { BEGIN(TABDATA1); return '{'; }
1451  YY_BREAK
1452 case 42:
1454 #line 243 "scan_mdl.l"
1455 { /* pass the '{' to the parser */ return '{'; }
1456  YY_BREAK
1457 case 43:
1459 #line 244 "scan_mdl.l"
1460 { /* pass the '{' to the parser */ return '}'; }
1461  YY_BREAK
1462 case 44:
1463 /* rule 44 can match eol */
1465 #line 246 "scan_mdl.l"
1466 { /* skip end of line and spaces */ }
1467  YY_BREAK
1468 case 45:
1470 #line 248 "scan_mdl.l"
1471 { BEGIN(INITIAL); return '}'; }
1472  YY_BREAK
1473 case 46:
1475 #line 249 "scan_mdl.l"
1476 { /* ignore */ }
1477  YY_BREAK
1478 case 47:
1480 #line 251 "scan_mdl.l"
1481 { /* any other character is invalid */
1482  fprintf (stderr,
1483  "line %d: syntax error, unrecognized character: `%s'\n",
1484  mdl_lineno, mdl_text);
1485  return InvalidCharacter;
1486 }
1487  YY_BREAK
1488 case 48:
1490 #line 258 "scan_mdl.l"
1491 ECHO;
1492  YY_BREAK
1493 #line 1494 "scan_mdl.cpp"
1494 case YY_STATE_EOF(INITIAL):
1495 case YY_STATE_EOF(VERSION):
1496 case YY_STATE_EOF(BLKEDIT):
1497 case YY_STATE_EOF(BLKEDIT1):
1498 case YY_STATE_EOF(CIRCUIT):
1499 case YY_STATE_EOF(CIRCUIT1):
1500 case YY_STATE_EOF(PLINK):
1501 case YY_STATE_EOF(PLIST):
1502 case YY_STATE_EOF(PMEMBER):
1503 case YY_STATE_EOF(TABDATA):
1504 case YY_STATE_EOF(TABDATA1):
1505  yyterminate();
1506 
1507  case YY_END_OF_BUFFER:
1508  {
1509  /* Amount of text matched not including the EOB char. */
1510  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1511 
1512  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1513  *yy_cp = (yy_hold_char);
1515 
1516  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1517  {
1518  /* We're scanning a new file or input source. It's
1519  * possible that this happened because the user
1520  * just pointed mdl_in at a new source and called
1521  * mdl_lex(). If so, then we have to assure
1522  * consistency between YY_CURRENT_BUFFER and our
1523  * globals. Here is the right place to do so, because
1524  * this is the first action (other than possibly a
1525  * back-up) that will match for the new input source.
1526  */
1527  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1528  YY_CURRENT_BUFFER_LVALUE->yy_input_file = mdl_in;
1529  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1530  }
1531 
1532  /* Note that here we test for yy_c_buf_p "<=" to the position
1533  * of the first EOB in the buffer, since yy_c_buf_p will
1534  * already have been incremented past the NUL character
1535  * (since all states make transitions on EOB to the
1536  * end-of-buffer state). Contrast this with the test
1537  * in input().
1538  */
1539  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1540  { /* This was really a NUL. */
1541  yy_state_type yy_next_state;
1542 
1543  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1544 
1545  yy_current_state = yy_get_previous_state( );
1546 
1547  /* Okay, we're now positioned to make the NUL
1548  * transition. We couldn't have
1549  * yy_get_previous_state() go ahead and do it
1550  * for us because it doesn't know how to deal
1551  * with the possibility of jamming (and we don't
1552  * want to build jamming into it because then it
1553  * will run more slowly).
1554  */
1555 
1556  yy_next_state = yy_try_NUL_trans( yy_current_state );
1557 
1558  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1559 
1560  if ( yy_next_state )
1561  {
1562  /* Consume the NUL. */
1563  yy_cp = ++(yy_c_buf_p);
1564  yy_current_state = yy_next_state;
1565  goto yy_match;
1566  }
1567 
1568  else
1569  {
1570  yy_cp = (yy_c_buf_p);
1571  goto yy_find_action;
1572  }
1573  }
1574 
1575  else switch ( yy_get_next_buffer( ) )
1576  {
1577  case EOB_ACT_END_OF_FILE:
1578  {
1579  (yy_did_buffer_switch_on_eof) = 0;
1580 
1581  if ( mdl_wrap( ) )
1582  {
1583  /* Note: because we've taken care in
1584  * yy_get_next_buffer() to have set up
1585  * mdl_text, we can now set up
1586  * yy_c_buf_p so that if some total
1587  * hoser (like flex itself) wants to
1588  * call the scanner after we return the
1589  * YY_NULL, it'll still work - another
1590  * YY_NULL will get returned.
1591  */
1592  (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1593 
1594  yy_act = YY_STATE_EOF(YY_START);
1595  goto do_action;
1596  }
1597 
1598  else
1599  {
1600  if ( ! (yy_did_buffer_switch_on_eof) )
1601  YY_NEW_FILE;
1602  }
1603  break;
1604  }
1605 
1606  case EOB_ACT_CONTINUE_SCAN:
1607  (yy_c_buf_p) =
1608  (yytext_ptr) + yy_amount_of_matched_text;
1609 
1610  yy_current_state = yy_get_previous_state( );
1611 
1612  yy_cp = (yy_c_buf_p);
1613  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1614  goto yy_match;
1615 
1616  case EOB_ACT_LAST_MATCH:
1617  (yy_c_buf_p) =
1618  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1619 
1620  yy_current_state = yy_get_previous_state( );
1621 
1622  yy_cp = (yy_c_buf_p);
1623  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1624  goto yy_find_action;
1625  }
1626  break;
1627  }
1628 
1629  default:
1631  "fatal flex scanner internal error--no action found" );
1632  } /* end of action switch */
1633  } /* end of scanning one token */
1634 } /* end of mdl_lex */
1635 
1636 /* yy_get_next_buffer - try to read in a new buffer
1637  *
1638  * Returns a code representing an action:
1639  * EOB_ACT_LAST_MATCH -
1640  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1641  * EOB_ACT_END_OF_FILE - end of file
1642  */
1643 static int yy_get_next_buffer (void)
1644 {
1645  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1646  register char *source = (yytext_ptr);
1647  register int number_to_move, i;
1648  int ret_val;
1649 
1650  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1652  "fatal flex scanner internal error--end of buffer missed" );
1653 
1654  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1655  { /* Don't try to fill the buffer, so this is an EOF. */
1656  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1657  {
1658  /* We matched a single character, the EOB, so
1659  * treat this as a final EOF.
1660  */
1661  return EOB_ACT_END_OF_FILE;
1662  }
1663 
1664  else
1665  {
1666  /* We matched some text prior to the EOB, first
1667  * process it.
1668  */
1669  return EOB_ACT_LAST_MATCH;
1670  }
1671  }
1672 
1673  /* Try to read more data. */
1674 
1675  /* First move last chars to start of buffer. */
1676  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1677 
1678  for ( i = 0; i < number_to_move; ++i )
1679  *(dest++) = *(source++);
1680 
1681  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1682  /* don't do the read, it's not guaranteed to return an EOF,
1683  * just force an EOF
1684  */
1685  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1686 
1687  else
1688  {
1689  int num_to_read =
1690  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1691 
1692  while ( num_to_read <= 0 )
1693  { /* Not enough room in the buffer - grow it. */
1694 
1695  /* just a shorter name for the current buffer */
1696  YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1697 
1698  int yy_c_buf_p_offset =
1699  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1700 
1701  if ( b->yy_is_our_buffer )
1702  {
1703  int new_size = b->yy_buf_size * 2;
1704 
1705  if ( new_size <= 0 )
1706  b->yy_buf_size += b->yy_buf_size / 8;
1707  else
1708  b->yy_buf_size *= 2;
1709 
1710  b->yy_ch_buf = (char *)
1711  /* Include room in for 2 EOB chars. */
1712  mdl_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1713  }
1714  else
1715  /* Can't grow it, we don't own it. */
1716  b->yy_ch_buf = 0;
1717 
1718  if ( ! b->yy_ch_buf )
1720  "fatal error - scanner input buffer overflow" );
1721 
1722  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1723 
1724  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1725  number_to_move - 1;
1726 
1727  }
1728 
1729  if ( num_to_read > YY_READ_BUF_SIZE )
1730  num_to_read = YY_READ_BUF_SIZE;
1731 
1732  /* Read in more data. */
1733  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1734  (yy_n_chars), (size_t) num_to_read );
1735 
1736  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1737  }
1738 
1739  if ( (yy_n_chars) == 0 )
1740  {
1741  if ( number_to_move == YY_MORE_ADJ )
1742  {
1743  ret_val = EOB_ACT_END_OF_FILE;
1744  mdl_restart(mdl_in );
1745  }
1746 
1747  else
1748  {
1749  ret_val = EOB_ACT_LAST_MATCH;
1750  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1752  }
1753  }
1754 
1755  else
1756  ret_val = EOB_ACT_CONTINUE_SCAN;
1757 
1758  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1759  /* Extend the array by 50%, plus the number we really need. */
1760  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1761  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) mdl_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1762  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1763  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1764  }
1765 
1766  (yy_n_chars) += number_to_move;
1767  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1768  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1769 
1770  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1771 
1772  return ret_val;
1773 }
1774 
1775 /* yy_get_previous_state - get the state just before the EOB char was reached */
1776 
1777  static yy_state_type yy_get_previous_state (void)
1778 {
1779  register yy_state_type yy_current_state;
1780  register char *yy_cp;
1781 
1782  yy_current_state = (yy_start);
1783  yy_current_state += YY_AT_BOL();
1784 
1785  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1786  {
1787  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1788  if ( yy_accept[yy_current_state] )
1789  {
1790  (yy_last_accepting_state) = yy_current_state;
1791  (yy_last_accepting_cpos) = yy_cp;
1792  }
1793  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1794  {
1795  yy_current_state = (int) yy_def[yy_current_state];
1796  if ( yy_current_state >= 314 )
1797  yy_c = yy_meta[(unsigned int) yy_c];
1798  }
1799  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1800  }
1801 
1802  return yy_current_state;
1803 }
1804 
1805 /* yy_try_NUL_trans - try to make a transition on the NUL character
1806  *
1807  * synopsis
1808  * next_state = yy_try_NUL_trans( current_state );
1809  */
1810  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1811 {
1812  register int yy_is_jam;
1813  register char *yy_cp = (yy_c_buf_p);
1814 
1815  register YY_CHAR yy_c = 1;
1816  if ( yy_accept[yy_current_state] )
1817  {
1818  (yy_last_accepting_state) = yy_current_state;
1819  (yy_last_accepting_cpos) = yy_cp;
1820  }
1821  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1822  {
1823  yy_current_state = (int) yy_def[yy_current_state];
1824  if ( yy_current_state >= 314 )
1825  yy_c = yy_meta[(unsigned int) yy_c];
1826  }
1827  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1828  yy_is_jam = (yy_current_state == 313);
1829 
1830  return yy_is_jam ? 0 : yy_current_state;
1831 }
1832 
1833 #ifndef YY_NO_INPUT
1834 #ifdef __cplusplus
1835  static int yyinput (void)
1836 #else
1837  static int input (void)
1838 #endif
1839 
1840 {
1841  int c;
1842 
1843  *(yy_c_buf_p) = (yy_hold_char);
1844 
1845  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1846  {
1847  /* yy_c_buf_p now points to the character we want to return.
1848  * If this occurs *before* the EOB characters, then it's a
1849  * valid NUL; if not, then we've hit the end of the buffer.
1850  */
1851  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1852  /* This was really a NUL. */
1853  *(yy_c_buf_p) = '\0';
1854 
1855  else
1856  { /* need more input */
1857  int offset = (yy_c_buf_p) - (yytext_ptr);
1858  ++(yy_c_buf_p);
1859 
1860  switch ( yy_get_next_buffer( ) )
1861  {
1862  case EOB_ACT_LAST_MATCH:
1863  /* This happens because yy_g_n_b()
1864  * sees that we've accumulated a
1865  * token and flags that we need to
1866  * try matching the token before
1867  * proceeding. But for input(),
1868  * there's no matching to consider.
1869  * So convert the EOB_ACT_LAST_MATCH
1870  * to EOB_ACT_END_OF_FILE.
1871  */
1872 
1873  /* Reset buffer status. */
1874  mdl_restart(mdl_in );
1875 
1876  /*FALLTHROUGH*/
1877 
1878  case EOB_ACT_END_OF_FILE:
1879  {
1880  if ( mdl_wrap( ) )
1881  return EOF;
1882 
1883  if ( ! (yy_did_buffer_switch_on_eof) )
1884  YY_NEW_FILE;
1885 #ifdef __cplusplus
1886  return yyinput();
1887 #else
1888  return input();
1889 #endif
1890  }
1891 
1892  case EOB_ACT_CONTINUE_SCAN:
1893  (yy_c_buf_p) = (yytext_ptr) + offset;
1894  break;
1895  }
1896  }
1897  }
1898 
1899  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1900  *(yy_c_buf_p) = '\0'; /* preserve mdl_text */
1901  (yy_hold_char) = *++(yy_c_buf_p);
1902 
1903  YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1904  if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol )
1905 
1906  mdl_lineno++;
1907 ;
1908 
1909  return c;
1910 }
1911 #endif /* ifndef YY_NO_INPUT */
1912 
1918  void mdl_restart (FILE * input_file )
1919 {
1920 
1921  if ( ! YY_CURRENT_BUFFER ){
1922  mdl_ensure_buffer_stack ();
1925  }
1926 
1927  mdl__init_buffer(YY_CURRENT_BUFFER,input_file );
1928  mdl__load_buffer_state( );
1929 }
1930 
1935  void mdl__switch_to_buffer (YY_BUFFER_STATE new_buffer )
1936 {
1937 
1938  /* TODO. We should be able to replace this entire function body
1939  * with
1940  * mdl_pop_buffer_state();
1941  * mdl_push_buffer_state(new_buffer);
1942  */
1943  mdl_ensure_buffer_stack ();
1944  if ( YY_CURRENT_BUFFER == new_buffer )
1945  return;
1946 
1947  if ( YY_CURRENT_BUFFER )
1948  {
1949  /* Flush out information for old buffer. */
1950  *(yy_c_buf_p) = (yy_hold_char);
1951  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1952  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1953  }
1954 
1955  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1956  mdl__load_buffer_state( );
1957 
1958  /* We don't actually know whether we did this switch during
1959  * EOF (mdl_wrap()) processing, but the only time this flag
1960  * is looked at is after mdl_wrap() is called, so it's safe
1961  * to go ahead and always set it.
1962  */
1963  (yy_did_buffer_switch_on_eof) = 1;
1964 }
1965 
1966 static void mdl__load_buffer_state (void)
1967 {
1968  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1969  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1970  mdl_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1971  (yy_hold_char) = *(yy_c_buf_p);
1972 }
1973 
1980  YY_BUFFER_STATE mdl__create_buffer (FILE * file, int size )
1981 {
1982  YY_BUFFER_STATE b;
1983 
1984  b = (YY_BUFFER_STATE) mdl_alloc(sizeof( struct yy_buffer_state ) );
1985  if ( ! b )
1986  YY_FATAL_ERROR( "out of dynamic memory in mdl__create_buffer()" );
1987 
1988  b->yy_buf_size = size;
1989 
1990  /* yy_ch_buf has to be 2 characters longer than the size given because
1991  * we need to put in 2 end-of-buffer characters.
1992  */
1993  b->yy_ch_buf = (char *) mdl_alloc(b->yy_buf_size + 2 );
1994  if ( ! b->yy_ch_buf )
1995  YY_FATAL_ERROR( "out of dynamic memory in mdl__create_buffer()" );
1996 
1997  b->yy_is_our_buffer = 1;
1998 
1999  mdl__init_buffer(b,file );
2000 
2001  return b;
2002 }
2003 
2008  void mdl__delete_buffer (YY_BUFFER_STATE b )
2009 {
2010 
2011  if ( ! b )
2012  return;
2013 
2014  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2016 
2017  if ( b->yy_is_our_buffer )
2018  mdl_free((void *) b->yy_ch_buf );
2019 
2020  mdl_free((void *) b );
2021 }
2022 
2023 #ifndef __cplusplus
2024 extern int isatty (int );
2025 #endif /* __cplusplus */
2026 
2027 /* Initializes or reinitializes a buffer.
2028  * This function is sometimes called more than once on the same buffer,
2029  * such as during a mdl_restart() or at EOF.
2030  */
2031  static void mdl__init_buffer (YY_BUFFER_STATE b, FILE * file )
2032 
2033 {
2034  int oerrno = errno;
2035 
2036  mdl__flush_buffer(b );
2037 
2038  b->yy_input_file = file;
2039  b->yy_fill_buffer = 1;
2040 
2041  /* If b is the current buffer, then mdl__init_buffer was _probably_
2042  * called from mdl_restart() or through yy_get_next_buffer.
2043  * In that case, we don't want to reset the lineno or column.
2044  */
2045  if (b != YY_CURRENT_BUFFER){
2046  b->yy_bs_lineno = 1;
2047  b->yy_bs_column = 0;
2048  }
2049 
2050  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2051 
2052  errno = oerrno;
2053 }
2054 
2059  void mdl__flush_buffer (YY_BUFFER_STATE b )
2060 {
2061  if ( ! b )
2062  return;
2063 
2064  b->yy_n_chars = 0;
2065 
2066  /* We always need two end-of-buffer characters. The first causes
2067  * a transition to the end-of-buffer state. The second causes
2068  * a jam in that state.
2069  */
2072 
2073  b->yy_buf_pos = &b->yy_ch_buf[0];
2074 
2075  b->yy_at_bol = 1;
2077 
2078  if ( b == YY_CURRENT_BUFFER )
2079  mdl__load_buffer_state( );
2080 }
2081 
2088 void mdl_push_buffer_state (YY_BUFFER_STATE new_buffer )
2089 {
2090  if (new_buffer == NULL)
2091  return;
2092 
2093  mdl_ensure_buffer_stack();
2094 
2095  /* This block is copied from mdl__switch_to_buffer. */
2096  if ( YY_CURRENT_BUFFER )
2097  {
2098  /* Flush out information for old buffer. */
2099  *(yy_c_buf_p) = (yy_hold_char);
2100  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2101  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2102  }
2103 
2104  /* Only push if top exists. Otherwise, replace top. */
2105  if (YY_CURRENT_BUFFER)
2106  (yy_buffer_stack_top)++;
2107  YY_CURRENT_BUFFER_LVALUE = new_buffer;
2108 
2109  /* copied from mdl__switch_to_buffer. */
2110  mdl__load_buffer_state( );
2111  (yy_did_buffer_switch_on_eof) = 1;
2112 }
2113 
2119 {
2120  if (!YY_CURRENT_BUFFER)
2121  return;
2122 
2124  YY_CURRENT_BUFFER_LVALUE = NULL;
2125  if ((yy_buffer_stack_top) > 0)
2126  --(yy_buffer_stack_top);
2127 
2128  if (YY_CURRENT_BUFFER) {
2129  mdl__load_buffer_state( );
2130  (yy_did_buffer_switch_on_eof) = 1;
2131  }
2132 }
2133 
2134 /* Allocates the stack if it does not exist.
2135  * Guarantees space for at least one push.
2136  */
2137 static void mdl_ensure_buffer_stack (void)
2138 {
2139  int num_to_alloc;
2140 
2141  if (!(yy_buffer_stack)) {
2142 
2143  /* First allocation is just for 2 elements, since we don't know if this
2144  * scanner will even need a stack. We use 2 instead of 1 to avoid an
2145  * immediate realloc on the next call.
2146  */
2147  num_to_alloc = 1;
2148  (yy_buffer_stack) = (struct yy_buffer_state**)mdl_alloc
2149  (num_to_alloc * sizeof(struct yy_buffer_state*)
2150  );
2151  if ( ! (yy_buffer_stack) )
2152  YY_FATAL_ERROR( "out of dynamic memory in mdl_ensure_buffer_stack()" );
2153 
2154  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2155 
2156  (yy_buffer_stack_max) = num_to_alloc;
2157  (yy_buffer_stack_top) = 0;
2158  return;
2159  }
2160 
2161  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2162 
2163  /* Increase the buffer to prepare for a possible push. */
2164  int grow_size = 8 /* arbitrary grow size */;
2165 
2166  num_to_alloc = (yy_buffer_stack_max) + grow_size;
2167  (yy_buffer_stack) = (struct yy_buffer_state**)mdl_realloc
2168  ((yy_buffer_stack),
2169  num_to_alloc * sizeof(struct yy_buffer_state*)
2170  );
2171  if ( ! (yy_buffer_stack) )
2172  YY_FATAL_ERROR( "out of dynamic memory in mdl_ensure_buffer_stack()" );
2173 
2174  /* zero only the new slots.*/
2175  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2176  (yy_buffer_stack_max) = num_to_alloc;
2177  }
2178 }
2179 
2186 YY_BUFFER_STATE mdl__scan_buffer (char * base, yy_size_t size )
2187 {
2188  YY_BUFFER_STATE b;
2189 
2190  if ( size < 2 ||
2191  base[size-2] != YY_END_OF_BUFFER_CHAR ||
2192  base[size-1] != YY_END_OF_BUFFER_CHAR )
2193  /* They forgot to leave room for the EOB's. */
2194  return 0;
2195 
2196  b = (YY_BUFFER_STATE) mdl_alloc(sizeof( struct yy_buffer_state ) );
2197  if ( ! b )
2198  YY_FATAL_ERROR( "out of dynamic memory in mdl__scan_buffer()" );
2199 
2200  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2201  b->yy_buf_pos = b->yy_ch_buf = base;
2202  b->yy_is_our_buffer = 0;
2203  b->yy_input_file = 0;
2204  b->yy_n_chars = b->yy_buf_size;
2205  b->yy_is_interactive = 0;
2206  b->yy_at_bol = 1;
2207  b->yy_fill_buffer = 0;
2209 
2211 
2212  return b;
2213 }
2214 
2223 YY_BUFFER_STATE mdl__scan_string (yyconst char * yystr )
2224 {
2225 
2226  return mdl__scan_bytes(yystr,strlen(yystr) );
2227 }
2228 
2236 YY_BUFFER_STATE mdl__scan_bytes (yyconst char * yybytes, int _yybytes_len )
2237 {
2238  YY_BUFFER_STATE b;
2239  char *buf;
2240  yy_size_t n;
2241  int i;
2242 
2243  /* Get memory for full buffer, including space for trailing EOB's. */
2244  n = _yybytes_len + 2;
2245  buf = (char *) mdl_alloc(n );
2246  if ( ! buf )
2247  YY_FATAL_ERROR( "out of dynamic memory in mdl__scan_bytes()" );
2248 
2249  for ( i = 0; i < _yybytes_len; ++i )
2250  buf[i] = yybytes[i];
2251 
2252  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2253 
2254  b = mdl__scan_buffer(buf,n );
2255  if ( ! b )
2256  YY_FATAL_ERROR( "bad buffer in mdl__scan_bytes()" );
2257 
2258  /* It's okay to grow etc. this buffer, and we should throw it
2259  * away when we're done.
2260  */
2261  b->yy_is_our_buffer = 1;
2262 
2263  return b;
2264 }
2265 
2266 #ifndef YY_EXIT_FAILURE
2267 #define YY_EXIT_FAILURE 2
2268 #endif
2269 
2270 static void yy_fatal_error (yyconst char* msg )
2271 {
2272  (void) fprintf( stderr, "%s\n", msg );
2273  exit( YY_EXIT_FAILURE );
2274 }
2275 
2276 /* Redefine yyless() so it works in section 3 code. */
2277 
2278 #undef yyless
2279 #define yyless(n) \
2280  do \
2281  { \
2282  /* Undo effects of setting up mdl_text. */ \
2283  int yyless_macro_arg = (n); \
2284  YY_LESS_LINENO(yyless_macro_arg);\
2285  mdl_text[mdl_leng] = (yy_hold_char); \
2286  (yy_c_buf_p) = mdl_text + yyless_macro_arg; \
2287  (yy_hold_char) = *(yy_c_buf_p); \
2288  *(yy_c_buf_p) = '\0'; \
2289  mdl_leng = yyless_macro_arg; \
2290  } \
2291  while ( 0 )
2292 
2293 /* Accessor methods (get/set functions) to struct members. */
2294 
2298 int mdl_get_lineno (void)
2299 {
2300 
2301  return mdl_lineno;
2302 }
2303 
2307 FILE *mdl_get_in (void)
2308 {
2309  return mdl_in;
2310 }
2311 
2315 FILE *mdl_get_out (void)
2316 {
2317  return mdl_out;
2318 }
2319 
2323 int mdl_get_leng (void)
2324 {
2325  return mdl_leng;
2326 }
2327 
2332 char *mdl_get_text (void)
2333 {
2334  return mdl_text;
2335 }
2336 
2341 void mdl_set_lineno (int line_number )
2342 {
2343 
2344  mdl_lineno = line_number;
2345 }
2346 
2353 void mdl_set_in (FILE * in_str )
2354 {
2355  mdl_in = in_str ;
2356 }
2357 
2358 void mdl_set_out (FILE * out_str )
2359 {
2360  mdl_out = out_str ;
2361 }
2362 
2363 int mdl_get_debug (void)
2364 {
2365  return mdl__flex_debug;
2366 }
2367 
2368 void mdl_set_debug (int bdebug )
2369 {
2370  mdl__flex_debug = bdebug ;
2371 }
2372 
2373 static int yy_init_globals (void)
2374 {
2375  /* Initialization is the same as for the non-reentrant scanner.
2376  * This function is called from mdl_lex_destroy(), so don't allocate here.
2377  */
2378 
2379  /* We do not touch mdl_lineno unless the option is enabled. */
2380  mdl_lineno = 1;
2381 
2382  (yy_buffer_stack) = 0;
2383  (yy_buffer_stack_top) = 0;
2384  (yy_buffer_stack_max) = 0;
2385  (yy_c_buf_p) = (char *) 0;
2386  (yy_init) = 0;
2387  (yy_start) = 0;
2388 
2389 /* Defined in main.c */
2390 #ifdef YY_STDINIT
2391  mdl_in = stdin;
2392  mdl_out = stdout;
2393 #else
2394  mdl_in = (FILE *) 0;
2395  mdl_out = (FILE *) 0;
2396 #endif
2397 
2398  /* For future reference: Set errno on error, since we are called by
2399  * mdl_lex_init()
2400  */
2401  return 0;
2402 }
2403 
2404 /* mdl_lex_destroy is for both reentrant and non-reentrant scanners. */
2406 {
2407 
2408  /* Pop the buffer stack, destroying each element. */
2409  while(YY_CURRENT_BUFFER){
2411  YY_CURRENT_BUFFER_LVALUE = NULL;
2413  }
2414 
2415  /* Destroy the stack itself. */
2416  mdl_free((yy_buffer_stack) );
2417  (yy_buffer_stack) = NULL;
2418 
2419  /* Reset the globals. This is important in a non-reentrant scanner so the next time
2420  * mdl_lex() is called, initialization will occur. */
2421  yy_init_globals( );
2422 
2423  return 0;
2424 }
2425 
2426 /*
2427  * Internal utility routines.
2428  */
2429 
2430 #ifndef yytext_ptr
2431 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2432 {
2433  register int i;
2434  for ( i = 0; i < n; ++i )
2435  s1[i] = s2[i];
2436 }
2437 #endif
2438 
2439 #ifdef YY_NEED_STRLEN
2440 static int yy_flex_strlen (yyconst char * s )
2441 {
2442  register int n;
2443  for ( n = 0; s[n]; ++n )
2444  ;
2445 
2446  return n;
2447 }
2448 #endif
2449 
2450 void *mdl_alloc (yy_size_t size )
2451 {
2452  return (void *) malloc( size );
2453 }
2454 
2455 void *mdl_realloc (void * ptr, yy_size_t size )
2456 {
2457  /* The cast to (char *) in the following accommodates both
2458  * implementations that use char* generic pointers, and those
2459  * that use void* generic pointers. It works with the latter
2460  * because both ANSI C and C++ allow castless assignment from
2461  * any pointer type to void*, and deal with argument conversions
2462  * as though doing an assignment.
2463  */
2464  return (void *) realloc( (char *) ptr, size );
2465 }
2466 
2467 void mdl_free (void * ptr )
2468 {
2469  free( (char *) ptr ); /* see mdl_realloc() for (char *) cast */
2470 }
2471 
2472 #define YYTABLES_NAME "yytables"
2473 
2474 #line 258 "scan_mdl.l"
2475 
2476 
2477