Logo AND Algorithmique Numérique Distribuée

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