My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
scan_dataset.cpp
Go to the documentation of this file.
1 #line 2 "scan_dataset.cpp"
2 
3 #line 4 "scan_dataset.cpp"
4 
5 #define YY_INT_ALIGNED short int
6 
7 /* A lexical scanner generated by flex */
8 
9 #define yy_create_buffer dataset__create_buffer
10 #define yy_delete_buffer dataset__delete_buffer
11 #define yy_flex_debug dataset__flex_debug
12 #define yy_init_buffer dataset__init_buffer
13 #define yy_flush_buffer dataset__flush_buffer
14 #define yy_load_buffer_state dataset__load_buffer_state
15 #define yy_switch_to_buffer dataset__switch_to_buffer
16 #define yyin dataset_in
17 #define yyleng dataset_leng
18 #define yylex dataset_lex
19 #define yylineno dataset_lineno
20 #define yyout dataset_out
21 #define yyrestart dataset_restart
22 #define yytext dataset_text
23 #define yywrap dataset_wrap
24 #define yyalloc dataset_alloc
25 #define yyrealloc dataset_realloc
26 #define yyfree dataset_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 dataset_restart(dataset_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 dataset_leng;
185 
186 extern FILE *dataset_in, *dataset_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 dataset_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-dataset_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 < dataset_leng; ++yyl )\
203  if ( dataset_text[yyl] == '\n' )\
204  --dataset_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 dataset_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 dataset_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 dataset_restart()), so that the user can continue scanning by
286  * just pointing dataset_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 dataset_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 dataset_wrap()'s to do buffer switches
324  * instead of setting up a fresh dataset_in. A bit of a hack ...
325  */
326 static int yy_did_buffer_switch_on_eof;
327 
328 void dataset_restart (FILE *input_file );
329 void dataset__switch_to_buffer (YY_BUFFER_STATE new_buffer );
330 YY_BUFFER_STATE dataset__create_buffer (FILE *file,int size );
331 void dataset__delete_buffer (YY_BUFFER_STATE b );
332 void dataset__flush_buffer (YY_BUFFER_STATE b );
333 void dataset_push_buffer_state (YY_BUFFER_STATE new_buffer );
334 void dataset_pop_buffer_state (void );
335 
336 static void dataset_ensure_buffer_stack (void );
337 static void dataset__load_buffer_state (void );
338 static void dataset__init_buffer (YY_BUFFER_STATE b,FILE *file );
339 
340 #define YY_FLUSH_BUFFER dataset__flush_buffer(YY_CURRENT_BUFFER )
341 
342 YY_BUFFER_STATE dataset__scan_buffer (char *base,yy_size_t size );
343 YY_BUFFER_STATE dataset__scan_string (yyconst char *yy_str );
344 YY_BUFFER_STATE dataset__scan_bytes (yyconst char *bytes,int len );
345 
346 void *dataset_alloc (yy_size_t );
347 void *dataset_realloc (void *,yy_size_t );
348 void dataset_free (void * );
349 
350 #define yy_new_buffer dataset__create_buffer
351 
352 #define yy_set_interactive(is_interactive) \
353  { \
354  if ( ! YY_CURRENT_BUFFER ){ \
355  dataset_ensure_buffer_stack (); \
356  YY_CURRENT_BUFFER_LVALUE = \
357  dataset__create_buffer(dataset_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  dataset_ensure_buffer_stack (); \
366  YY_CURRENT_BUFFER_LVALUE = \
367  dataset__create_buffer(dataset_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 dataset_wrap(n) 1
377 #define YY_SKIP_YYWRAP
378 
379 typedef unsigned char YY_CHAR;
380 
381 FILE *dataset_in = (FILE *) 0, *dataset_out = (FILE *) 0;
382 
383 typedef int yy_state_type;
384 
385 extern int dataset_lineno;
386 
387 int dataset_lineno = 1;
388 
389 extern char *dataset_text;
390 #define yytext_ptr dataset_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 dataset_text.
399  */
400 #define YY_DO_BEFORE_ACTION \
401  (yytext_ptr) = yy_bp; \
402  dataset_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 19
408 #define YY_END_OF_BUFFER 20
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[117] =
417  { 0,
418  0, 0, 0, 0, 0, 0, 20, 16, 14, 13,
419  16, 15, 16, 16, 7, 11, 6, 16, 6, 17,
420  14, 18, 17, 17, 19, 16, 16, 10, 12, 6,
421  6, 13, 0, 7, 0, 7, 0, 0, 0, 0,
422  6, 0, 6, 14, 0, 0, 6, 18, 10, 0,
423  0, 6, 6, 0, 8, 0, 0, 7, 0, 9,
424  0, 6, 6, 6, 6, 0, 0, 2, 6, 8,
425  0, 0, 7, 9, 0, 0, 6, 6, 6, 6,
426  6, 0, 6, 4, 0, 6, 0, 8, 0, 0,
427  9, 0, 0, 6, 0, 3, 8, 0, 9, 0,
428 
429  5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
430  0, 0, 0, 0, 1, 0
431  } ;
432 
433 static yyconst flex_int32_t yy_ec[256] =
434  { 0,
435  1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
436  1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
437  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
438  1, 5, 1, 1, 6, 1, 1, 1, 1, 1,
439  1, 1, 7, 8, 7, 9, 10, 11, 11, 11,
440  11, 11, 11, 11, 11, 11, 11, 1, 1, 12,
441  1, 13, 1, 1, 14, 14, 14, 15, 16, 14,
442  14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
443  17, 14, 14, 14, 14, 14, 14, 14, 14, 14,
444  8, 18, 8, 1, 14, 1, 19, 14, 20, 21,
445 
446  22, 14, 14, 14, 23, 24, 14, 14, 14, 25,
447  14, 26, 14, 14, 27, 28, 29, 14, 14, 14,
448  14, 14, 1, 1, 1, 1, 1, 1, 1, 1,
449  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
451  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
452  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
453  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
454  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
455  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
456 
457  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
458  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
459  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
460  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
461  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
462  1, 1, 1, 1, 1
463  } ;
464 
465 static yyconst flex_int32_t yy_meta[30] =
466  { 0,
467  1, 1, 1, 1, 1, 1, 1, 2, 3, 1,
468  4, 1, 1, 4, 4, 4, 4, 1, 4, 4,
469  4, 4, 4, 4, 4, 4, 4, 4, 4
470  } ;
471 
472 static yyconst flex_int16_t yy_base[124] =
473  { 0,
474  0, 0, 28, 45, 61, 0, 240, 241, 241, 241,
475  236, 241, 28, 227, 79, 220, 26, 37, 34, 241,
476  241, 241, 233, 50, 241, 224, 15, 223, 241, 47,
477  50, 241, 222, 0, 51, 97, 53, 50, 69, 203,
478  222, 219, 83, 241, 226, 217, 114, 241, 216, 204,
479  200, 85, 88, 213, 96, 72, 212, 103, 211, 122,
480  201, 211, 90, 123, 139, 193, 197, 107, 120, 138,
481  130, 206, 144, 141, 151, 189, 206, 205, 156, 0,
482  162, 202, 205, 241, 189, 159, 165, 199, 167, 198,
483  197, 202, 195, 78, 179, 168, 193, 173, 166, 141,
484 
485  241, 134, 115, 121, 108, 102, 89, 101, 89, 150,
486  70, 171, 55, 170, 241, 241, 185, 188, 191, 40,
487  193, 196, 199
488  } ;
489 
490 static yyconst flex_int16_t yy_def[124] =
491  { 0,
492  116, 1, 117, 117, 1, 5, 116, 116, 116, 116,
493  116, 116, 116, 116, 116, 116, 118, 116, 118, 116,
494  116, 116, 116, 116, 116, 116, 116, 116, 116, 118,
495  118, 116, 116, 15, 116, 116, 116, 116, 116, 116,
496  119, 120, 118, 116, 116, 120, 118, 116, 116, 116,
497  116, 118, 118, 116, 116, 116, 116, 116, 116, 116,
498  116, 121, 122, 121, 118, 116, 116, 118, 118, 116,
499  116, 116, 116, 116, 116, 116, 121, 123, 122, 64,
500  121, 116, 65, 116, 116, 65, 116, 116, 116, 116,
501  116, 116, 116, 121, 116, 65, 116, 116, 116, 116,
502 
503  116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
504  116, 116, 116, 116, 116, 0, 116, 116, 116, 116,
505  116, 116, 116
506  } ;
507 
508 static yyconst flex_int16_t yy_nxt[271] =
509  { 0,
510  8, 9, 10, 11, 9, 12, 13, 8, 14, 8,
511  15, 16, 8, 17, 17, 17, 17, 18, 17, 17,
512  17, 17, 19, 19, 17, 17, 17, 17, 17, 21,
513  22, 23, 21, 41, 42, 50, 33, 51, 34, 44,
514  45, 41, 46, 63, 47, 24, 21, 22, 23, 21,
515  35, 35, 44, 45, 41, 42, 57, 41, 42, 54,
516  58, 55, 24, 25, 8, 114, 8, 26, 52, 8,
517  27, 28, 8, 29, 53, 39, 39, 59, 72, 60,
518  112, 30, 73, 31, 17, 37, 42, 33, 94, 34,
519  41, 42, 41, 42, 38, 41, 42, 78, 42, 110,
520 
521  38, 39, 39, 37, 54, 109, 55, 36, 69, 37,
522  68, 71, 56, 58, 41, 42, 108, 71, 56, 39,
523  39, 41, 46, 107, 47, 39, 39, 41, 42, 65,
524  59, 42, 60, 80, 106, 65, 82, 75, 81, 105,
525  88, 86, 104, 75, 81, 82, 41, 42, 70, 83,
526  37, 74, 103, 87, 73, 102, 89, 90, 111, 87,
527  110, 91, 89, 78, 42, 116, 39, 39, 93, 43,
528  42, 93, 94, 98, 116, 97, 99, 99, 43, 113,
529  114, 112, 115, 99, 96, 20, 20, 20, 20, 43,
530  43, 43, 41, 41, 41, 77, 77, 79, 79, 79,
531 
532  78, 78, 78, 97, 101, 97, 100, 91, 91, 88,
533  95, 116, 88, 42, 42, 92, 73, 85, 84, 42,
534  76, 74, 58, 70, 67, 66, 49, 64, 44, 62,
535  42, 61, 36, 49, 49, 48, 40, 36, 32, 116,
536  7, 116, 116, 116, 116, 116, 116, 116, 116, 116,
537  116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
538  116, 116, 116, 116, 116, 116, 116, 116, 116, 116
539  } ;
540 
541 static yyconst flex_int16_t yy_chk[271] =
542  { 0,
543  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
544  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
545  1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
546  3, 3, 3, 17, 17, 27, 13, 27, 13, 18,
547  18, 19, 19, 120, 19, 3, 4, 4, 4, 4,
548  13, 13, 24, 24, 30, 30, 38, 31, 31, 35,
549  38, 35, 4, 5, 5, 113, 5, 5, 30, 5,
550  5, 5, 5, 5, 31, 37, 37, 39, 56, 39,
551  111, 5, 56, 5, 5, 15, 94, 15, 94, 15,
552  43, 43, 52, 52, 15, 53, 53, 63, 63, 109,
553 
554  15, 15, 15, 36, 55, 108, 55, 36, 53, 58,
555  52, 55, 36, 58, 68, 68, 107, 55, 36, 36,
556  36, 47, 47, 106, 47, 58, 58, 69, 69, 47,
557  60, 64, 60, 64, 105, 47, 71, 60, 64, 104,
558  71, 69, 103, 60, 64, 65, 65, 65, 70, 65,
559  73, 74, 102, 70, 73, 100, 74, 75, 110, 70,
560  110, 75, 74, 79, 79, 86, 73, 73, 81, 86,
561  81, 87, 81, 89, 96, 87, 99, 89, 96, 112,
562  114, 112, 114, 98, 86, 117, 117, 117, 117, 118,
563  118, 118, 119, 119, 119, 121, 121, 122, 122, 122,
564 
565  123, 123, 123, 97, 95, 93, 92, 91, 90, 88,
566  85, 83, 82, 78, 77, 76, 72, 67, 66, 62,
567  61, 59, 57, 54, 51, 50, 49, 46, 45, 42,
568  41, 40, 33, 28, 26, 23, 16, 14, 11, 7,
569  116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
570  116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
571  116, 116, 116, 116, 116, 116, 116, 116, 116, 116
572  } ;
573 
574 /* Table of booleans, true if rule could match eol. */
575 static yyconst flex_int32_t yy_rule_can_match_eol[20] =
576  { 0,
577 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0,
578  };
579 
580 static yy_state_type yy_last_accepting_state;
581 static char *yy_last_accepting_cpos;
582 
583 extern int dataset__flex_debug;
584 int dataset__flex_debug = 0;
585 
586 /* The intent behind this definition is that it'll catch
587  * any uses of REJECT which flex missed.
588  */
589 #define REJECT reject_used_but_not_detected
590 #define yymore() yymore_used_but_not_detected
591 #define YY_MORE_ADJ 0
592 #define YY_RESTORE_YY_MORE_OFFSET
594 #line 1 "scan_dataset.l"
595 /* -*-c-*- */
596 #line 4 "scan_dataset.l"
597 /*
598  * scan_dataset.l - scanner for the Qucs dataset
599  *
600  * Copyright (C) 2003, 2004, 2005, 2006, 2008 Stefan Jahn <stefan@lkcc.org>
601  *
602  * This is free software; you can redistribute it and/or modify
603  * it under the terms of the GNU General Public License as published by
604  * the Free Software Foundation; either version 2, or (at your option)
605  * any later version.
606  *
607  * This software is distributed in the hope that it will be useful,
608  * but WITHOUT ANY WARRANTY; without even the implied warranty of
609  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
610  * GNU General Public License for more details.
611  *
612  * You should have received a copy of the GNU General Public License
613  * along with this package; see the file COPYING. If not, write to
614  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
615  * Boston, MA 02110-1301, USA.
616  *
617  * $Id: scan_dataset.l 1825 2011-03-11 20:42:14Z ela $
618  *
619  */
620 
621 #if HAVE_CONFIG_H
622 # include <config.h>
623 #endif
624 
625 #include <stdio.h>
626 #include <stdlib.h>
627 #include <string.h>
628 #include <ctype.h>
629 
630 #ifdef __MINGW32__
631 #include <io.h>
632 #endif
633 
634 #ifdef HAVE_UNISTD_H
635 #include <unistd.h>
636 #endif
637 
638 #include "logging.h"
639 #include "complex.h"
640 #include "object.h"
641 #include "vector.h"
642 #include "dataset.h"
643 #include "check_dataset.h"
644 #include "tokens_dataset.h"
645 
646 
647 #line 648 "scan_dataset.cpp"
648 
649 #define INITIAL 0
650 #define COMMENT 1
651 #define DESCRIPTION 2
652 
653 #ifndef YY_EXTRA_TYPE
654 #define YY_EXTRA_TYPE void *
655 #endif
656 
657 static int yy_init_globals (void );
658 
659 /* Accessor methods to globals.
660  These are made visible to non-reentrant scanners for convenience. */
661 
662 int dataset_lex_destroy (void );
663 
664 int dataset_get_debug (void );
665 
666 void dataset_set_debug (int debug_flag );
667 
669 
670 void dataset_set_extra (YY_EXTRA_TYPE user_defined );
671 
672 FILE *dataset_get_in (void );
673 
674 void dataset_set_in (FILE * in_str );
675 
676 FILE *dataset_get_out (void );
677 
678 void dataset_set_out (FILE * out_str );
679 
680 int dataset_get_leng (void );
681 
682 char *dataset_get_text (void );
683 
684 int dataset_get_lineno (void );
685 
686 void dataset_set_lineno (int line_number );
687 
688 /* Macros after this point can all be overridden by user definitions in
689  * section 1.
690  */
691 
692 #ifndef YY_SKIP_YYWRAP
693 #ifdef __cplusplus
694 extern "C" int dataset_wrap (void );
695 #else
696 extern int dataset_wrap (void );
697 #endif
698 #endif
699 
700 #ifndef yytext_ptr
701 static void yy_flex_strncpy (char *,yyconst char *,int );
702 #endif
703 
704 #ifdef YY_NEED_STRLEN
705 static int yy_flex_strlen (yyconst char * );
706 #endif
707 
708 #ifndef YY_NO_INPUT
709 
710 #ifdef __cplusplus
711 static int yyinput (void );
712 #else
713 static int input (void );
714 #endif
715 
716 #endif
717 
718 /* Amount of stuff to slurp up with each read. */
719 #ifndef YY_READ_BUF_SIZE
720 #ifdef __ia64__
721 /* On IA-64, the buffer size is 16k, not 8k */
722 #define YY_READ_BUF_SIZE 16384
723 #else
724 #define YY_READ_BUF_SIZE 8192
725 #endif /* __ia64__ */
726 #endif
727 
728 /* Copy whatever the last rule matched to the standard output. */
729 #ifndef ECHO
730 /* This used to be an fputs(), but since the string might contain NUL's,
731  * we now use fwrite().
732  */
733 #define ECHO do { if (fwrite( dataset_text, dataset_leng, 1, dataset_out )) {} } while (0)
734 #endif
735 
736 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
737  * is returned in "result".
738  */
739 #ifndef YY_INPUT
740 #define YY_INPUT(buf,result,max_size) \
741  if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
742  { \
743  int c = '*'; \
744  size_t n; \
745  for ( n = 0; n < max_size && \
746  (c = getc( dataset_in )) != EOF && c != '\n'; ++n ) \
747  buf[n] = (char) c; \
748  if ( c == '\n' ) \
749  buf[n++] = (char) c; \
750  if ( c == EOF && ferror( dataset_in ) ) \
751  YY_FATAL_ERROR( "input in flex scanner failed" ); \
752  result = n; \
753  } \
754  else \
755  { \
756  errno=0; \
757  while ( (result = fread(buf, 1, max_size, dataset_in))==0 && ferror(dataset_in)) \
758  { \
759  if( errno != EINTR) \
760  { \
761  YY_FATAL_ERROR( "input in flex scanner failed" ); \
762  break; \
763  } \
764  errno=0; \
765  clearerr(dataset_in); \
766  } \
767  }\
768 \
769 
770 #endif
771 
772 /* No semi-colon after return; correct usage is to write "yyterminate();" -
773  * we don't want an extra ';' after the "return" because that will cause
774  * some compilers to complain about unreachable statements.
775  */
776 #ifndef yyterminate
777 #define yyterminate() return YY_NULL
778 #endif
779 
780 /* Number of entries by which start-condition stack grows. */
781 #ifndef YY_START_STACK_INCR
782 #define YY_START_STACK_INCR 25
783 #endif
784 
785 /* Report a fatal error. */
786 #ifndef YY_FATAL_ERROR
787 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
788 #endif
789 
790 /* end tables serialization structures and prototypes */
791 
792 /* Default declaration of generated scanner - a define so the user can
793  * easily add parameters.
794  */
795 #ifndef YY_DECL
796 #define YY_DECL_IS_OURS 1
797 
798 extern int dataset_lex (void);
799 
800 #define YY_DECL int dataset_lex (void)
801 #endif /* !YY_DECL */
802 
803 /* Code executed at the beginning of each rule, after dataset_text and dataset_leng
804  * have been set up.
805  */
806 #ifndef YY_USER_ACTION
807 #define YY_USER_ACTION
808 #endif
809 
810 /* Code executed at the end of each rule. */
811 #ifndef YY_BREAK
812 #define YY_BREAK break;
813 #endif
814 
815 #define YY_RULE_SETUP \
816  YY_USER_ACTION
817 
820 YY_DECL
821 {
822  register yy_state_type yy_current_state;
823  register char *yy_cp, *yy_bp;
824  register int yy_act;
825 
826 #line 86 "scan_dataset.l"
827 
828 
829 #line 830 "scan_dataset.cpp"
830 
831  if ( !(yy_init) )
832  {
833  (yy_init) = 1;
834 
835 #ifdef YY_USER_INIT
836  YY_USER_INIT;
837 #endif
838 
839  if ( ! (yy_start) )
840  (yy_start) = 1; /* first start state */
841 
842  if ( ! dataset_in )
843  dataset_in = stdin;
844 
845  if ( ! dataset_out )
846  dataset_out = stdout;
847 
848  if ( ! YY_CURRENT_BUFFER ) {
849  dataset_ensure_buffer_stack ();
852  }
853 
854  dataset__load_buffer_state( );
855  }
856 
857  while ( 1 ) /* loops until end-of-file is reached */
858  {
859  yy_cp = (yy_c_buf_p);
860 
861  /* Support of dataset_text. */
862  *yy_cp = (yy_hold_char);
863 
864  /* yy_bp points to the position in yy_ch_buf of the start of
865  * the current run.
866  */
867  yy_bp = yy_cp;
868 
869  yy_current_state = (yy_start);
870 yy_match:
871  do
872  {
873  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
874  if ( yy_accept[yy_current_state] )
875  {
876  (yy_last_accepting_state) = yy_current_state;
877  (yy_last_accepting_cpos) = yy_cp;
878  }
879  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
880  {
881  yy_current_state = (int) yy_def[yy_current_state];
882  if ( yy_current_state >= 117 )
883  yy_c = yy_meta[(unsigned int) yy_c];
884  }
885  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
886  ++yy_cp;
887  }
888  while ( yy_base[yy_current_state] != 241 );
889 
890 yy_find_action:
891  yy_act = yy_accept[yy_current_state];
892  if ( yy_act == 0 )
893  { /* have to back up */
894  yy_cp = (yy_last_accepting_cpos);
895  yy_current_state = (yy_last_accepting_state);
896  yy_act = yy_accept[yy_current_state];
897  }
898 
900 
901  if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
902  {
903  int yyl;
904  for ( yyl = 0; yyl < dataset_leng; ++yyl )
905  if ( dataset_text[yyl] == '\n' )
906 
907  dataset_lineno++;
908 ;
909  }
910 
911 do_action: /* This label is used only to access EOF actions. */
912 
913  switch ( yy_act )
914  { /* beginning of action switch */
915  case 0: /* must back up */
916  /* undo the effects of YY_DO_BEFORE_ACTION */
917  *yy_cp = (yy_hold_char);
918  yy_cp = (yy_last_accepting_cpos);
919  yy_current_state = (yy_last_accepting_state);
920  goto yy_find_action;
921 
922 case 1:
924 #line 88 "scan_dataset.l"
925 {
926  return Version;
927  }
928  YY_BREAK
929 case 2:
931 #line 92 "scan_dataset.l"
932 {
933  return DepBegin;
934  }
935  YY_BREAK
936 case 3:
938 #line 96 "scan_dataset.l"
939 {
940  return IndepBegin;
941  }
942  YY_BREAK
943 case 4:
945 #line 100 "scan_dataset.l"
946 {
947  return DepEnd;
948  }
949  YY_BREAK
950 case 5:
952 #line 104 "scan_dataset.l"
953 {
954  return IndepEnd;
955  }
956  YY_BREAK
957 case 6:
959 #line 108 "scan_dataset.l"
960 { /* identify identifier */
961  dataset_lval.ident = strdup (dataset_text);
962  return Identifier;
963  }
964  YY_BREAK
965 case 7:
967 #line 113 "scan_dataset.l"
968 { /* identify real float */
969  dataset_lval.f = strtod (dataset_text, NULL);
970  return REAL;
971  }
972  YY_BREAK
973 case 8:
975 #line 118 "scan_dataset.l"
976 { /* identify imaginary float */
977  if (dataset_text[0] == 'i' || dataset_text[0] == 'j')
978  dataset_text[0] = '0';
979  else
980  dataset_text[1] = '0';
981  dataset_lval.f = strtod (dataset_text, NULL);
982  return IMAG;
983  }
984  YY_BREAK
985 case 9:
987 #line 127 "scan_dataset.l"
988 { /* identify complete complex number */
989  int i = 0;
990  while (dataset_text[i] != 'i' && dataset_text[i] != 'j') i++;
991  dataset_text[i] = dataset_text[i - 1];
992  dataset_text[i - 1] = '\0';
993  dataset_lval.c.r = strtod (dataset_text, NULL);
994  dataset_lval.c.i = strtod (&dataset_text[i], NULL);
995  return COMPLEX;
996  }
997  YY_BREAK
998 case 10:
1000 #line 137 "scan_dataset.l"
1001 { /* identify integer */
1002  dataset_lval.n = strtol (dataset_text, NULL, 10);
1003  return Integer;
1004  }
1005  YY_BREAK
1006 case 11:
1008 #line 142 "scan_dataset.l"
1009 { /* pass the '<' to the parser */
1010  BEGIN(DESCRIPTION);
1011  return '<';
1012  }
1013  YY_BREAK
1014 case 12:
1016 #line 146 "scan_dataset.l"
1017 { /* pass the '>' to the parser */
1018  BEGIN(INITIAL);
1019  return '>';
1020  }
1021  YY_BREAK
1022 case 13:
1023 /* rule 13 can match eol */
1025 #line 150 "scan_dataset.l"
1026 { /* detect end of line */ return Eol; }
1027  YY_BREAK
1028 case 14:
1029 /* rule 14 can match eol */
1031 #line 152 "scan_dataset.l"
1032 /* skip spaces and the trailing '\' */
1033  YY_BREAK
1034 case 15:
1036 #line 154 "scan_dataset.l"
1037 { /* leave these characters */
1038  BEGIN(COMMENT);
1039  }
1040  YY_BREAK
1041 case 16:
1043 #line 157 "scan_dataset.l"
1044 { /* any other character in invalid */
1045  logprint (LOG_ERROR,
1046  "line %d: syntax error, unrecognized character: `%s'\n",
1047  dataset_lineno, dataset_text);
1048  return InvalidCharacter;
1049  }
1050  YY_BREAK
1051 case 17:
1053 #line 164 "scan_dataset.l"
1054 { /* skip any character in here */ }
1055  YY_BREAK
1056 case 18:
1057 /* rule 18 can match eol */
1059 #line 165 "scan_dataset.l"
1060 { BEGIN(INITIAL); /* skipping ends here */ }
1061  YY_BREAK
1062 case 19:
1064 #line 167 "scan_dataset.l"
1065 ECHO;
1066  YY_BREAK
1067 #line 1068 "scan_dataset.cpp"
1068 case YY_STATE_EOF(INITIAL):
1069 case YY_STATE_EOF(COMMENT):
1071  yyterminate();
1072 
1073  case YY_END_OF_BUFFER:
1074  {
1075  /* Amount of text matched not including the EOB char. */
1076  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1077 
1078  /* Undo the effects of YY_DO_BEFORE_ACTION. */
1079  *yy_cp = (yy_hold_char);
1081 
1082  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1083  {
1084  /* We're scanning a new file or input source. It's
1085  * possible that this happened because the user
1086  * just pointed dataset_in at a new source and called
1087  * dataset_lex(). If so, then we have to assure
1088  * consistency between YY_CURRENT_BUFFER and our
1089  * globals. Here is the right place to do so, because
1090  * this is the first action (other than possibly a
1091  * back-up) that will match for the new input source.
1092  */
1093  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1094  YY_CURRENT_BUFFER_LVALUE->yy_input_file = dataset_in;
1095  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1096  }
1097 
1098  /* Note that here we test for yy_c_buf_p "<=" to the position
1099  * of the first EOB in the buffer, since yy_c_buf_p will
1100  * already have been incremented past the NUL character
1101  * (since all states make transitions on EOB to the
1102  * end-of-buffer state). Contrast this with the test
1103  * in input().
1104  */
1105  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1106  { /* This was really a NUL. */
1107  yy_state_type yy_next_state;
1108 
1109  (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1110 
1111  yy_current_state = yy_get_previous_state( );
1112 
1113  /* Okay, we're now positioned to make the NUL
1114  * transition. We couldn't have
1115  * yy_get_previous_state() go ahead and do it
1116  * for us because it doesn't know how to deal
1117  * with the possibility of jamming (and we don't
1118  * want to build jamming into it because then it
1119  * will run more slowly).
1120  */
1121 
1122  yy_next_state = yy_try_NUL_trans( yy_current_state );
1123 
1124  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1125 
1126  if ( yy_next_state )
1127  {
1128  /* Consume the NUL. */
1129  yy_cp = ++(yy_c_buf_p);
1130  yy_current_state = yy_next_state;
1131  goto yy_match;
1132  }
1133 
1134  else
1135  {
1136  yy_cp = (yy_c_buf_p);
1137  goto yy_find_action;
1138  }
1139  }
1140 
1141  else switch ( yy_get_next_buffer( ) )
1142  {
1143  case EOB_ACT_END_OF_FILE:
1144  {
1145  (yy_did_buffer_switch_on_eof) = 0;
1146 
1147  if ( dataset_wrap( ) )
1148  {
1149  /* Note: because we've taken care in
1150  * yy_get_next_buffer() to have set up
1151  * dataset_text, we can now set up
1152  * yy_c_buf_p so that if some total
1153  * hoser (like flex itself) wants to
1154  * call the scanner after we return the
1155  * YY_NULL, it'll still work - another
1156  * YY_NULL will get returned.
1157  */
1158  (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1159 
1160  yy_act = YY_STATE_EOF(YY_START);
1161  goto do_action;
1162  }
1163 
1164  else
1165  {
1166  if ( ! (yy_did_buffer_switch_on_eof) )
1167  YY_NEW_FILE;
1168  }
1169  break;
1170  }
1171 
1172  case EOB_ACT_CONTINUE_SCAN:
1173  (yy_c_buf_p) =
1174  (yytext_ptr) + yy_amount_of_matched_text;
1175 
1176  yy_current_state = yy_get_previous_state( );
1177 
1178  yy_cp = (yy_c_buf_p);
1179  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1180  goto yy_match;
1181 
1182  case EOB_ACT_LAST_MATCH:
1183  (yy_c_buf_p) =
1184  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1185 
1186  yy_current_state = yy_get_previous_state( );
1187 
1188  yy_cp = (yy_c_buf_p);
1189  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1190  goto yy_find_action;
1191  }
1192  break;
1193  }
1194 
1195  default:
1197  "fatal flex scanner internal error--no action found" );
1198  } /* end of action switch */
1199  } /* end of scanning one token */
1200 } /* end of dataset_lex */
1201 
1202 /* yy_get_next_buffer - try to read in a new buffer
1203  *
1204  * Returns a code representing an action:
1205  * EOB_ACT_LAST_MATCH -
1206  * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1207  * EOB_ACT_END_OF_FILE - end of file
1208  */
1209 static int yy_get_next_buffer (void)
1210 {
1211  register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1212  register char *source = (yytext_ptr);
1213  register int number_to_move, i;
1214  int ret_val;
1215 
1216  if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1218  "fatal flex scanner internal error--end of buffer missed" );
1219 
1220  if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1221  { /* Don't try to fill the buffer, so this is an EOF. */
1222  if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1223  {
1224  /* We matched a single character, the EOB, so
1225  * treat this as a final EOF.
1226  */
1227  return EOB_ACT_END_OF_FILE;
1228  }
1229 
1230  else
1231  {
1232  /* We matched some text prior to the EOB, first
1233  * process it.
1234  */
1235  return EOB_ACT_LAST_MATCH;
1236  }
1237  }
1238 
1239  /* Try to read more data. */
1240 
1241  /* First move last chars to start of buffer. */
1242  number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1243 
1244  for ( i = 0; i < number_to_move; ++i )
1245  *(dest++) = *(source++);
1246 
1247  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1248  /* don't do the read, it's not guaranteed to return an EOF,
1249  * just force an EOF
1250  */
1251  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1252 
1253  else
1254  {
1255  int num_to_read =
1256  YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1257 
1258  while ( num_to_read <= 0 )
1259  { /* Not enough room in the buffer - grow it. */
1260 
1261  /* just a shorter name for the current buffer */
1262  YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1263 
1264  int yy_c_buf_p_offset =
1265  (int) ((yy_c_buf_p) - b->yy_ch_buf);
1266 
1267  if ( b->yy_is_our_buffer )
1268  {
1269  int new_size = b->yy_buf_size * 2;
1270 
1271  if ( new_size <= 0 )
1272  b->yy_buf_size += b->yy_buf_size / 8;
1273  else
1274  b->yy_buf_size *= 2;
1275 
1276  b->yy_ch_buf = (char *)
1277  /* Include room in for 2 EOB chars. */
1278  dataset_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
1279  }
1280  else
1281  /* Can't grow it, we don't own it. */
1282  b->yy_ch_buf = 0;
1283 
1284  if ( ! b->yy_ch_buf )
1286  "fatal error - scanner input buffer overflow" );
1287 
1288  (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1289 
1290  num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1291  number_to_move - 1;
1292 
1293  }
1294 
1295  if ( num_to_read > YY_READ_BUF_SIZE )
1296  num_to_read = YY_READ_BUF_SIZE;
1297 
1298  /* Read in more data. */
1299  YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1300  (yy_n_chars), (size_t) num_to_read );
1301 
1302  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1303  }
1304 
1305  if ( (yy_n_chars) == 0 )
1306  {
1307  if ( number_to_move == YY_MORE_ADJ )
1308  {
1309  ret_val = EOB_ACT_END_OF_FILE;
1311  }
1312 
1313  else
1314  {
1315  ret_val = EOB_ACT_LAST_MATCH;
1316  YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1318  }
1319  }
1320 
1321  else
1322  ret_val = EOB_ACT_CONTINUE_SCAN;
1323 
1324  if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1325  /* Extend the array by 50%, plus the number we really need. */
1326  yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1327  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) dataset_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1328  if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1329  YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1330  }
1331 
1332  (yy_n_chars) += number_to_move;
1333  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1334  YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1335 
1336  (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1337 
1338  return ret_val;
1339 }
1340 
1341 /* yy_get_previous_state - get the state just before the EOB char was reached */
1342 
1343  static yy_state_type yy_get_previous_state (void)
1344 {
1345  register yy_state_type yy_current_state;
1346  register char *yy_cp;
1347 
1348  yy_current_state = (yy_start);
1349 
1350  for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1351  {
1352  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1353  if ( yy_accept[yy_current_state] )
1354  {
1355  (yy_last_accepting_state) = yy_current_state;
1356  (yy_last_accepting_cpos) = yy_cp;
1357  }
1358  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1359  {
1360  yy_current_state = (int) yy_def[yy_current_state];
1361  if ( yy_current_state >= 117 )
1362  yy_c = yy_meta[(unsigned int) yy_c];
1363  }
1364  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1365  }
1366 
1367  return yy_current_state;
1368 }
1369 
1370 /* yy_try_NUL_trans - try to make a transition on the NUL character
1371  *
1372  * synopsis
1373  * next_state = yy_try_NUL_trans( current_state );
1374  */
1375  static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1376 {
1377  register int yy_is_jam;
1378  register char *yy_cp = (yy_c_buf_p);
1379 
1380  register YY_CHAR yy_c = 1;
1381  if ( yy_accept[yy_current_state] )
1382  {
1383  (yy_last_accepting_state) = yy_current_state;
1384  (yy_last_accepting_cpos) = yy_cp;
1385  }
1386  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1387  {
1388  yy_current_state = (int) yy_def[yy_current_state];
1389  if ( yy_current_state >= 117 )
1390  yy_c = yy_meta[(unsigned int) yy_c];
1391  }
1392  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1393  yy_is_jam = (yy_current_state == 116);
1394 
1395  return yy_is_jam ? 0 : yy_current_state;
1396 }
1397 
1398 #ifndef YY_NO_INPUT
1399 #ifdef __cplusplus
1400  static int yyinput (void)
1401 #else
1402  static int input (void)
1403 #endif
1404 
1405 {
1406  int c;
1407 
1408  *(yy_c_buf_p) = (yy_hold_char);
1409 
1410  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1411  {
1412  /* yy_c_buf_p now points to the character we want to return.
1413  * If this occurs *before* the EOB characters, then it's a
1414  * valid NUL; if not, then we've hit the end of the buffer.
1415  */
1416  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1417  /* This was really a NUL. */
1418  *(yy_c_buf_p) = '\0';
1419 
1420  else
1421  { /* need more input */
1422  int offset = (yy_c_buf_p) - (yytext_ptr);
1423  ++(yy_c_buf_p);
1424 
1425  switch ( yy_get_next_buffer( ) )
1426  {
1427  case EOB_ACT_LAST_MATCH:
1428  /* This happens because yy_g_n_b()
1429  * sees that we've accumulated a
1430  * token and flags that we need to
1431  * try matching the token before
1432  * proceeding. But for input(),
1433  * there's no matching to consider.
1434  * So convert the EOB_ACT_LAST_MATCH
1435  * to EOB_ACT_END_OF_FILE.
1436  */
1437 
1438  /* Reset buffer status. */
1440 
1441  /*FALLTHROUGH*/
1442 
1443  case EOB_ACT_END_OF_FILE:
1444  {
1445  if ( dataset_wrap( ) )
1446  return EOF;
1447 
1448  if ( ! (yy_did_buffer_switch_on_eof) )
1449  YY_NEW_FILE;
1450 #ifdef __cplusplus
1451  return yyinput();
1452 #else
1453  return input();
1454 #endif
1455  }
1456 
1457  case EOB_ACT_CONTINUE_SCAN:
1458  (yy_c_buf_p) = (yytext_ptr) + offset;
1459  break;
1460  }
1461  }
1462  }
1463 
1464  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1465  *(yy_c_buf_p) = '\0'; /* preserve dataset_text */
1466  (yy_hold_char) = *++(yy_c_buf_p);
1467 
1468  if ( c == '\n' )
1469 
1470  dataset_lineno++;
1471 ;
1472 
1473  return c;
1474 }
1475 #endif /* ifndef YY_NO_INPUT */
1476 
1482  void dataset_restart (FILE * input_file )
1483 {
1484 
1485  if ( ! YY_CURRENT_BUFFER ){
1486  dataset_ensure_buffer_stack ();
1489  }
1490 
1491  dataset__init_buffer(YY_CURRENT_BUFFER,input_file );
1492  dataset__load_buffer_state( );
1493 }
1494 
1499  void dataset__switch_to_buffer (YY_BUFFER_STATE new_buffer )
1500 {
1501 
1502  /* TODO. We should be able to replace this entire function body
1503  * with
1504  * dataset_pop_buffer_state();
1505  * dataset_push_buffer_state(new_buffer);
1506  */
1507  dataset_ensure_buffer_stack ();
1508  if ( YY_CURRENT_BUFFER == new_buffer )
1509  return;
1510 
1511  if ( YY_CURRENT_BUFFER )
1512  {
1513  /* Flush out information for old buffer. */
1514  *(yy_c_buf_p) = (yy_hold_char);
1515  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1516  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1517  }
1518 
1519  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1520  dataset__load_buffer_state( );
1521 
1522  /* We don't actually know whether we did this switch during
1523  * EOF (dataset_wrap()) processing, but the only time this flag
1524  * is looked at is after dataset_wrap() is called, so it's safe
1525  * to go ahead and always set it.
1526  */
1527  (yy_did_buffer_switch_on_eof) = 1;
1528 }
1529 
1530 static void dataset__load_buffer_state (void)
1531 {
1532  (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1533  (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1534  dataset_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1535  (yy_hold_char) = *(yy_c_buf_p);
1536 }
1537 
1544  YY_BUFFER_STATE dataset__create_buffer (FILE * file, int size )
1545 {
1546  YY_BUFFER_STATE b;
1547 
1548  b = (YY_BUFFER_STATE) dataset_alloc(sizeof( struct yy_buffer_state ) );
1549  if ( ! b )
1550  YY_FATAL_ERROR( "out of dynamic memory in dataset__create_buffer()" );
1551 
1552  b->yy_buf_size = size;
1553 
1554  /* yy_ch_buf has to be 2 characters longer than the size given because
1555  * we need to put in 2 end-of-buffer characters.
1556  */
1557  b->yy_ch_buf = (char *) dataset_alloc(b->yy_buf_size + 2 );
1558  if ( ! b->yy_ch_buf )
1559  YY_FATAL_ERROR( "out of dynamic memory in dataset__create_buffer()" );
1560 
1561  b->yy_is_our_buffer = 1;
1562 
1563  dataset__init_buffer(b,file );
1564 
1565  return b;
1566 }
1567 
1572  void dataset__delete_buffer (YY_BUFFER_STATE b )
1573 {
1574 
1575  if ( ! b )
1576  return;
1577 
1578  if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1580 
1581  if ( b->yy_is_our_buffer )
1582  dataset_free((void *) b->yy_ch_buf );
1583 
1584  dataset_free((void *) b );
1585 }
1586 
1587 #ifndef __cplusplus
1588 extern int isatty (int );
1589 #endif /* __cplusplus */
1590 
1591 /* Initializes or reinitializes a buffer.
1592  * This function is sometimes called more than once on the same buffer,
1593  * such as during a dataset_restart() or at EOF.
1594  */
1595  static void dataset__init_buffer (YY_BUFFER_STATE b, FILE * file )
1596 
1597 {
1598  int oerrno = errno;
1599 
1601 
1602  b->yy_input_file = file;
1603  b->yy_fill_buffer = 1;
1604 
1605  /* If b is the current buffer, then dataset__init_buffer was _probably_
1606  * called from dataset_restart() or through yy_get_next_buffer.
1607  * In that case, we don't want to reset the lineno or column.
1608  */
1609  if (b != YY_CURRENT_BUFFER){
1610  b->yy_bs_lineno = 1;
1611  b->yy_bs_column = 0;
1612  }
1613 
1614  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1615 
1616  errno = oerrno;
1617 }
1618 
1623  void dataset__flush_buffer (YY_BUFFER_STATE b )
1624 {
1625  if ( ! b )
1626  return;
1627 
1628  b->yy_n_chars = 0;
1629 
1630  /* We always need two end-of-buffer characters. The first causes
1631  * a transition to the end-of-buffer state. The second causes
1632  * a jam in that state.
1633  */
1636 
1637  b->yy_buf_pos = &b->yy_ch_buf[0];
1638 
1639  b->yy_at_bol = 1;
1641 
1642  if ( b == YY_CURRENT_BUFFER )
1643  dataset__load_buffer_state( );
1644 }
1645 
1652 void dataset_push_buffer_state (YY_BUFFER_STATE new_buffer )
1653 {
1654  if (new_buffer == NULL)
1655  return;
1656 
1657  dataset_ensure_buffer_stack();
1658 
1659  /* This block is copied from dataset__switch_to_buffer. */
1660  if ( YY_CURRENT_BUFFER )
1661  {
1662  /* Flush out information for old buffer. */
1663  *(yy_c_buf_p) = (yy_hold_char);
1664  YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1665  YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1666  }
1667 
1668  /* Only push if top exists. Otherwise, replace top. */
1669  if (YY_CURRENT_BUFFER)
1670  (yy_buffer_stack_top)++;
1671  YY_CURRENT_BUFFER_LVALUE = new_buffer;
1672 
1673  /* copied from dataset__switch_to_buffer. */
1674  dataset__load_buffer_state( );
1675  (yy_did_buffer_switch_on_eof) = 1;
1676 }
1677 
1683 {
1684  if (!YY_CURRENT_BUFFER)
1685  return;
1686 
1688  YY_CURRENT_BUFFER_LVALUE = NULL;
1689  if ((yy_buffer_stack_top) > 0)
1690  --(yy_buffer_stack_top);
1691 
1692  if (YY_CURRENT_BUFFER) {
1693  dataset__load_buffer_state( );
1694  (yy_did_buffer_switch_on_eof) = 1;
1695  }
1696 }
1697 
1698 /* Allocates the stack if it does not exist.
1699  * Guarantees space for at least one push.
1700  */
1701 static void dataset_ensure_buffer_stack (void)
1702 {
1703  int num_to_alloc;
1704 
1705  if (!(yy_buffer_stack)) {
1706 
1707  /* First allocation is just for 2 elements, since we don't know if this
1708  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1709  * immediate realloc on the next call.
1710  */
1711  num_to_alloc = 1;
1712  (yy_buffer_stack) = (struct yy_buffer_state**)dataset_alloc
1713  (num_to_alloc * sizeof(struct yy_buffer_state*)
1714  );
1715  if ( ! (yy_buffer_stack) )
1716  YY_FATAL_ERROR( "out of dynamic memory in dataset_ensure_buffer_stack()" );
1717 
1718  memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1719 
1720  (yy_buffer_stack_max) = num_to_alloc;
1721  (yy_buffer_stack_top) = 0;
1722  return;
1723  }
1724 
1725  if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1726 
1727  /* Increase the buffer to prepare for a possible push. */
1728  int grow_size = 8 /* arbitrary grow size */;
1729 
1730  num_to_alloc = (yy_buffer_stack_max) + grow_size;
1731  (yy_buffer_stack) = (struct yy_buffer_state**)dataset_realloc
1732  ((yy_buffer_stack),
1733  num_to_alloc * sizeof(struct yy_buffer_state*)
1734  );
1735  if ( ! (yy_buffer_stack) )
1736  YY_FATAL_ERROR( "out of dynamic memory in dataset_ensure_buffer_stack()" );
1737 
1738  /* zero only the new slots.*/
1739  memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1740  (yy_buffer_stack_max) = num_to_alloc;
1741  }
1742 }
1743 
1750 YY_BUFFER_STATE dataset__scan_buffer (char * base, yy_size_t size )
1751 {
1752  YY_BUFFER_STATE b;
1753 
1754  if ( size < 2 ||
1755  base[size-2] != YY_END_OF_BUFFER_CHAR ||
1756  base[size-1] != YY_END_OF_BUFFER_CHAR )
1757  /* They forgot to leave room for the EOB's. */
1758  return 0;
1759 
1760  b = (YY_BUFFER_STATE) dataset_alloc(sizeof( struct yy_buffer_state ) );
1761  if ( ! b )
1762  YY_FATAL_ERROR( "out of dynamic memory in dataset__scan_buffer()" );
1763 
1764  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1765  b->yy_buf_pos = b->yy_ch_buf = base;
1766  b->yy_is_our_buffer = 0;
1767  b->yy_input_file = 0;
1768  b->yy_n_chars = b->yy_buf_size;
1769  b->yy_is_interactive = 0;
1770  b->yy_at_bol = 1;
1771  b->yy_fill_buffer = 0;
1773 
1775 
1776  return b;
1777 }
1778 
1787 YY_BUFFER_STATE dataset__scan_string (yyconst char * yystr )
1788 {
1789 
1790  return dataset__scan_bytes(yystr,strlen(yystr) );
1791 }
1792 
1800 YY_BUFFER_STATE dataset__scan_bytes (yyconst char * yybytes, int _yybytes_len )
1801 {
1802  YY_BUFFER_STATE b;
1803  char *buf;
1804  yy_size_t n;
1805  int i;
1806 
1807  /* Get memory for full buffer, including space for trailing EOB's. */
1808  n = _yybytes_len + 2;
1809  buf = (char *) dataset_alloc(n );
1810  if ( ! buf )
1811  YY_FATAL_ERROR( "out of dynamic memory in dataset__scan_bytes()" );
1812 
1813  for ( i = 0; i < _yybytes_len; ++i )
1814  buf[i] = yybytes[i];
1815 
1816  buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1817 
1818  b = dataset__scan_buffer(buf,n );
1819  if ( ! b )
1820  YY_FATAL_ERROR( "bad buffer in dataset__scan_bytes()" );
1821 
1822  /* It's okay to grow etc. this buffer, and we should throw it
1823  * away when we're done.
1824  */
1825  b->yy_is_our_buffer = 1;
1826 
1827  return b;
1828 }
1829 
1830 #ifndef YY_EXIT_FAILURE
1831 #define YY_EXIT_FAILURE 2
1832 #endif
1833 
1834 static void yy_fatal_error (yyconst char* msg )
1835 {
1836  (void) fprintf( stderr, "%s\n", msg );
1837  exit( YY_EXIT_FAILURE );
1838 }
1839 
1840 /* Redefine yyless() so it works in section 3 code. */
1841 
1842 #undef yyless
1843 #define yyless(n) \
1844  do \
1845  { \
1846  /* Undo effects of setting up dataset_text. */ \
1847  int yyless_macro_arg = (n); \
1848  YY_LESS_LINENO(yyless_macro_arg);\
1849  dataset_text[dataset_leng] = (yy_hold_char); \
1850  (yy_c_buf_p) = dataset_text + yyless_macro_arg; \
1851  (yy_hold_char) = *(yy_c_buf_p); \
1852  *(yy_c_buf_p) = '\0'; \
1853  dataset_leng = yyless_macro_arg; \
1854  } \
1855  while ( 0 )
1856 
1857 /* Accessor methods (get/set functions) to struct members. */
1858 
1863 {
1864 
1865  return dataset_lineno;
1866 }
1867 
1871 FILE *dataset_get_in (void)
1872 {
1873  return dataset_in;
1874 }
1875 
1879 FILE *dataset_get_out (void)
1880 {
1881  return dataset_out;
1882 }
1883 
1888 {
1889  return dataset_leng;
1890 }
1891 
1896 char *dataset_get_text (void)
1897 {
1898  return dataset_text;
1899 }
1900 
1905 void dataset_set_lineno (int line_number )
1906 {
1907 
1908  dataset_lineno = line_number;
1909 }
1910 
1917 void dataset_set_in (FILE * in_str )
1918 {
1919  dataset_in = in_str ;
1920 }
1921 
1922 void dataset_set_out (FILE * out_str )
1923 {
1924  dataset_out = out_str ;
1925 }
1926 
1928 {
1929  return dataset__flex_debug;
1930 }
1931 
1932 void dataset_set_debug (int bdebug )
1933 {
1934  dataset__flex_debug = bdebug ;
1935 }
1936 
1937 static int yy_init_globals (void)
1938 {
1939  /* Initialization is the same as for the non-reentrant scanner.
1940  * This function is called from dataset_lex_destroy(), so don't allocate here.
1941  */
1942 
1943  /* We do not touch dataset_lineno unless the option is enabled. */
1944  dataset_lineno = 1;
1945 
1946  (yy_buffer_stack) = 0;
1947  (yy_buffer_stack_top) = 0;
1948  (yy_buffer_stack_max) = 0;
1949  (yy_c_buf_p) = (char *) 0;
1950  (yy_init) = 0;
1951  (yy_start) = 0;
1952 
1953 /* Defined in main.c */
1954 #ifdef YY_STDINIT
1955  dataset_in = stdin;
1956  dataset_out = stdout;
1957 #else
1958  dataset_in = (FILE *) 0;
1959  dataset_out = (FILE *) 0;
1960 #endif
1961 
1962  /* For future reference: Set errno on error, since we are called by
1963  * dataset_lex_init()
1964  */
1965  return 0;
1966 }
1967 
1968 /* dataset_lex_destroy is for both reentrant and non-reentrant scanners. */
1970 {
1971 
1972  /* Pop the buffer stack, destroying each element. */
1973  while(YY_CURRENT_BUFFER){
1975  YY_CURRENT_BUFFER_LVALUE = NULL;
1977  }
1978 
1979  /* Destroy the stack itself. */
1980  dataset_free((yy_buffer_stack) );
1981  (yy_buffer_stack) = NULL;
1982 
1983  /* Reset the globals. This is important in a non-reentrant scanner so the next time
1984  * dataset_lex() is called, initialization will occur. */
1985  yy_init_globals( );
1986 
1987  return 0;
1988 }
1989 
1990 /*
1991  * Internal utility routines.
1992  */
1993 
1994 #ifndef yytext_ptr
1995 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1996 {
1997  register int i;
1998  for ( i = 0; i < n; ++i )
1999  s1[i] = s2[i];
2000 }
2001 #endif
2002 
2003 #ifdef YY_NEED_STRLEN
2004 static int yy_flex_strlen (yyconst char * s )
2005 {
2006  register int n;
2007  for ( n = 0; s[n]; ++n )
2008  ;
2009 
2010  return n;
2011 }
2012 #endif
2013 
2015 {
2016  return (void *) malloc( size );
2017 }
2018 
2019 void *dataset_realloc (void * ptr, yy_size_t size )
2020 {
2021  /* The cast to (char *) in the following accommodates both
2022  * implementations that use char* generic pointers, and those
2023  * that use void* generic pointers. It works with the latter
2024  * because both ANSI C and C++ allow castless assignment from
2025  * any pointer type to void*, and deal with argument conversions
2026  * as though doing an assignment.
2027  */
2028  return (void *) realloc( (char *) ptr, size );
2029 }
2030 
2031 void dataset_free (void * ptr )
2032 {
2033  free( (char *) ptr ); /* see dataset_realloc() for (char *) cast */
2034 }
2035 
2036 #define YYTABLES_NAME "yytables"
2037 
2038 #line 167 "scan_dataset.l"
2039 
2040 
2041