Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
More verbose debug
[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 /* $Id$ */
487 /* DataDesc/ddt_parse -- automatic parsing of data structures */
488 /* Authors: Arnaud Legrand, Martin Quinson            */
489 /* Copyright (C) 2003, 2004 Martin Quinson.                                 */
490 /* This program is free software; you can redistribute it and/or modify it
491    under the terms of the license (GNU LGPL) which comes with this package. */
492 #line 13 "DataDesc/ddt_parse.yy.l"
493 #include"DataDesc/datadesc_private.h"
494 #include"DataDesc/ddt_parse.yy.h"
495 #include <string.h>
496   YY_BUFFER_STATE input_buffer;
497   FILE *file_to_parse;
498
499   int gras_ddt_parse_line_pos = 1;
500   int gras_ddt_parse_col_pos = 0;
501   int gras_ddt_parse_char_pos = 0;
502   int gras_ddt_parse_tok_num = 0;
503   GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(lexer,parse);
504 #define SHOW_WHERE DEBUG4("%d:%d (char #%d): seen %s", gras_ddt_parse_line_pos,gras_ddt_parse_col_pos,gras_ddt_parse_char_pos,gras_ddt_parse_text)
505
506 #line 507 "DataDesc/ddt_parse.yy.c"
507
508 #define INITIAL 0
509 #define comment 1
510 #define foo 2
511 #define str 3
512
513 #ifndef YY_NO_UNISTD_H
514 /* Special case for "unistd.h", since it is non-ANSI. We include it way
515  * down here because we want the user's section 1 to have been scanned first.
516  * The user has a chance to override it with an option.
517  */
518 #include <unistd.h>
519 #endif
520
521 #ifndef YY_EXTRA_TYPE
522 #define YY_EXTRA_TYPE void *
523 #endif
524
525 /* Macros after this point can all be overridden by user definitions in
526  * section 1.
527  */
528
529 #ifndef YY_SKIP_YYWRAP
530 #ifdef __cplusplus
531 extern "C" int gras_ddt_parse_wrap (void );
532 #else
533 extern int gras_ddt_parse_wrap (void );
534 #endif
535 #endif
536
537     static void yyunput (int c,char *buf_ptr  );
538     
539 #ifndef yytext_ptr
540 static void yy_flex_strncpy (char *,yyconst char *,int );
541 #endif
542
543 #ifdef YY_NEED_STRLEN
544 static int yy_flex_strlen (yyconst char * );
545 #endif
546
547 #ifndef YY_NO_INPUT
548
549 #ifdef __cplusplus
550 static int yyinput (void );
551 #else
552 static int input (void );
553 #endif
554
555 #endif
556
557 /* Amount of stuff to slurp up with each read. */
558 #ifndef YY_READ_BUF_SIZE
559 #define YY_READ_BUF_SIZE 8192
560 #endif
561
562 /* Copy whatever the last rule matched to the standard output. */
563 #ifndef ECHO
564 /* This used to be an fputs(), but since the string might contain NUL's,
565  * we now use fwrite().
566  */
567 #define ECHO (void) fwrite( gras_ddt_parse_text, gras_ddt_parse_leng, 1, gras_ddt_parse_out )
568 #endif
569
570 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
571  * is returned in "result".
572  */
573 #ifndef YY_INPUT
574 #define YY_INPUT(buf,result,max_size) \
575         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
576                 { \
577                 int c = '*'; \
578                 size_t n; \
579                 for ( n = 0; n < max_size && \
580                              (c = getc( gras_ddt_parse_in )) != EOF && c != '\n'; ++n ) \
581                         buf[n] = (char) c; \
582                 if ( c == '\n' ) \
583                         buf[n++] = (char) c; \
584                 if ( c == EOF && ferror( gras_ddt_parse_in ) ) \
585                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
586                 result = n; \
587                 } \
588         else \
589                 { \
590                 errno=0; \
591                 while ( (result = fread(buf, 1, max_size, gras_ddt_parse_in))==0 && ferror(gras_ddt_parse_in)) \
592                         { \
593                         if( errno != EINTR) \
594                                 { \
595                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
596                                 break; \
597                                 } \
598                         errno=0; \
599                         clearerr(gras_ddt_parse_in); \
600                         } \
601                 }\
602 \
603
604 #endif
605
606 /* No semi-colon after return; correct usage is to write "yyterminate();" -
607  * we don't want an extra ';' after the "return" because that will cause
608  * some compilers to complain about unreachable statements.
609  */
610 #ifndef yyterminate
611 #define yyterminate() return YY_NULL
612 #endif
613
614 /* Number of entries by which start-condition stack grows. */
615 #ifndef YY_START_STACK_INCR
616 #define YY_START_STACK_INCR 25
617 #endif
618
619 /* Report a fatal error. */
620 #ifndef YY_FATAL_ERROR
621 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
622 #endif
623
624 /* end tables serialization structures and prototypes */
625
626 /* Default declaration of generated scanner - a define so the user can
627  * easily add parameters.
628  */
629 #ifndef YY_DECL
630 #define YY_DECL_IS_OURS 1
631
632 extern int gras_ddt_parse_lex (void);
633
634 #define YY_DECL int gras_ddt_parse_lex (void)
635 #endif /* !YY_DECL */
636
637 /* Code executed at the beginning of each rule, after gras_ddt_parse_text and gras_ddt_parse_leng
638  * have been set up.
639  */
640 #ifndef YY_USER_ACTION
641 #define YY_USER_ACTION
642 #endif
643
644 /* Code executed at the end of each rule. */
645 #ifndef YY_BREAK
646 #define YY_BREAK break;
647 #endif
648
649 #define YY_RULE_SETUP \
650         YY_USER_ACTION
651
652 /** The main scanner function which does all the work.
653  */
654 YY_DECL
655 {
656         register yy_state_type yy_current_state;
657         register char *yy_cp, *yy_bp;
658         register int yy_act;
659     
660 #line 32 "DataDesc/ddt_parse.yy.l"
661
662         int comment_caller=0;
663
664         char string_buf[GRAS_DDT_PARSE_MAX_STR_CONST];
665         char *string_buf_ptr = NULL;
666
667 #line 668 "DataDesc/ddt_parse.yy.c"
668
669         if ( (yy_init) )
670                 {
671                 (yy_init) = 0;
672
673 #ifdef YY_USER_INIT
674                 YY_USER_INIT;
675 #endif
676
677                 if ( ! (yy_start) )
678                         (yy_start) = 1; /* first start state */
679
680                 if ( ! gras_ddt_parse_in )
681                         gras_ddt_parse_in = stdin;
682
683                 if ( ! gras_ddt_parse_out )
684                         gras_ddt_parse_out = stdout;
685
686                 if ( ! YY_CURRENT_BUFFER ) {
687                         gras_ddt_parse_ensure_buffer_stack ();
688                         YY_CURRENT_BUFFER_LVALUE =
689                                 gras_ddt_parse__create_buffer(gras_ddt_parse_in,YY_BUF_SIZE );
690                 }
691
692                 gras_ddt_parse__load_buffer_state( );
693                 }
694
695         while ( 1 )             /* loops until end-of-file is reached */
696                 {
697                 yy_cp = (yy_c_buf_p);
698
699                 /* Support of gras_ddt_parse_text. */
700                 *yy_cp = (yy_hold_char);
701
702                 /* yy_bp points to the position in yy_ch_buf of the start of
703                  * the current run.
704                  */
705                 yy_bp = yy_cp;
706
707                 yy_current_state = (yy_start);
708 yy_match:
709                 do
710                         {
711                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
712                         if ( yy_accept[yy_current_state] )
713                                 {
714                                 (yy_last_accepting_state) = yy_current_state;
715                                 (yy_last_accepting_cpos) = yy_cp;
716                                 }
717                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
718                                 {
719                                 yy_current_state = (int) yy_def[yy_current_state];
720                                 if ( yy_current_state >= 53 )
721                                         yy_c = yy_meta[(unsigned int) yy_c];
722                                 }
723                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
724                         ++yy_cp;
725                         }
726                 while ( yy_base[yy_current_state] != 97 );
727
728 yy_find_action:
729                 yy_act = yy_accept[yy_current_state];
730                 if ( yy_act == 0 )
731                         { /* have to back up */
732                         yy_cp = (yy_last_accepting_cpos);
733                         yy_current_state = (yy_last_accepting_state);
734                         yy_act = yy_accept[yy_current_state];
735                         }
736
737                 YY_DO_BEFORE_ACTION;
738
739 do_action:      /* This label is used only to access EOF actions. */
740
741                 switch ( yy_act )
742         { /* beginning of action switch */
743                         case 0: /* must back up */
744                         /* undo the effects of YY_DO_BEFORE_ACTION */
745                         *yy_cp = (yy_hold_char);
746                         yy_cp = (yy_last_accepting_cpos);
747                         yy_current_state = (yy_last_accepting_state);
748                         goto yy_find_action;
749
750 case 1:
751 YY_RULE_SETUP
752 #line 38 "DataDesc/ddt_parse.yy.l"
753
754         YY_BREAK
755 case 2:
756 YY_RULE_SETUP
757 #line 39 "DataDesc/ddt_parse.yy.l"
758 {
759              comment_caller = INITIAL;
760              BEGIN(comment);
761              }
762         YY_BREAK
763 case 3:
764 YY_RULE_SETUP
765 #line 44 "DataDesc/ddt_parse.yy.l"
766 {
767              comment_caller = foo;
768              BEGIN(comment);
769              }
770         YY_BREAK
771 case 4:
772 YY_RULE_SETUP
773 #line 49 "DataDesc/ddt_parse.yy.l"
774 /* eat anything that's not a '*' */
775         YY_BREAK
776 case 5:
777 YY_RULE_SETUP
778 #line 50 "DataDesc/ddt_parse.yy.l"
779 /* eat up '*'s not followed by '/'s */
780         YY_BREAK
781 case 6:
782 /* rule 6 can match eol */
783 YY_RULE_SETUP
784 #line 51 "DataDesc/ddt_parse.yy.l"
785 {
786   ++gras_ddt_parse_line_pos;
787   gras_ddt_parse_col_pos=0;
788   gras_ddt_parse_char_pos++;
789 }
790         YY_BREAK
791 case 7:
792 YY_RULE_SETUP
793 #line 56 "DataDesc/ddt_parse.yy.l"
794 BEGIN(comment_caller);
795         YY_BREAK
796 case 8:
797 YY_RULE_SETUP
798 #line 58 "DataDesc/ddt_parse.yy.l"
799 string_buf_ptr = string_buf; gras_ddt_parse_char_pos++;gras_ddt_parse_col_pos++; BEGIN(str);
800         YY_BREAK
801 case 9:
802 YY_RULE_SETUP
803 #line 60 "DataDesc/ddt_parse.yy.l"
804 { /* saw closing quote - all done */
805         BEGIN(INITIAL);
806         *string_buf_ptr = '\0';
807         gras_ddt_parse_text=string_buf;
808         gras_ddt_parse_char_pos++;
809         gras_ddt_parse_col_pos++;
810         return GRAS_DDT_PARSE_TOKEN_WORD;
811         /* return string constant token type and
812          * value to parser
813          */
814         }
815         YY_BREAK
816 case 10:
817 /* rule 10 can match eol */
818 YY_RULE_SETUP
819 #line 72 "DataDesc/ddt_parse.yy.l"
820 {
821         /* error - unterminated string constant */
822         /* generate error message */
823         }
824         YY_BREAK
825 case 11:
826 YY_RULE_SETUP
827 #line 77 "DataDesc/ddt_parse.yy.l"
828 {
829         /* octal escape sequence */
830         int result;
831
832         (void) sscanf( gras_ddt_parse_text + 1, "%o", &result );
833
834         if ( result > 0xff )
835                 /* error, constant is out-of-bounds */
836
837         *string_buf_ptr++ = result;
838         gras_ddt_parse_char_pos++;
839         gras_ddt_parse_col_pos++;
840         }
841         YY_BREAK
842 case 12:
843 YY_RULE_SETUP
844 #line 91 "DataDesc/ddt_parse.yy.l"
845 {
846         /* generate error - bad escape sequence; something
847          * like '\48' or '\0777777'
848          */
849         }
850         YY_BREAK
851 case 13:
852 YY_RULE_SETUP
853 #line 97 "DataDesc/ddt_parse.yy.l"
854 {
855   *string_buf_ptr++ = '\n';
856   gras_ddt_parse_char_pos++;
857   gras_ddt_parse_col_pos++;
858 }
859         YY_BREAK
860 case 14:
861 YY_RULE_SETUP
862 #line 102 "DataDesc/ddt_parse.yy.l"
863 {
864   *string_buf_ptr++ = '\t';     
865   gras_ddt_parse_char_pos++;
866   gras_ddt_parse_col_pos++;
867 }
868         YY_BREAK
869 case 15:
870 YY_RULE_SETUP
871 #line 107 "DataDesc/ddt_parse.yy.l"
872 {
873   *string_buf_ptr++ = '\r';     
874   gras_ddt_parse_char_pos++;
875   gras_ddt_parse_col_pos++;
876 }
877         YY_BREAK
878 case 16:
879 YY_RULE_SETUP
880 #line 112 "DataDesc/ddt_parse.yy.l"
881 {
882   *string_buf_ptr++ = '\b';     
883   gras_ddt_parse_char_pos++;
884   gras_ddt_parse_col_pos++;
885 }
886         YY_BREAK
887 case 17:
888 YY_RULE_SETUP
889 #line 117 "DataDesc/ddt_parse.yy.l"
890 {
891   *string_buf_ptr++ = '\f';
892   gras_ddt_parse_char_pos++;
893   gras_ddt_parse_col_pos++;
894 }
895         YY_BREAK
896 case 18:
897 /* rule 18 can match eol */
898 YY_RULE_SETUP
899 #line 123 "DataDesc/ddt_parse.yy.l"
900 {
901   *string_buf_ptr++ = gras_ddt_parse_text[1];   
902   if(gras_ddt_parse_text[1]=='\n') {
903     ++gras_ddt_parse_line_pos;
904     gras_ddt_parse_col_pos=0;
905   } else {
906     gras_ddt_parse_col_pos++;
907   }
908   gras_ddt_parse_char_pos++;
909 }
910         YY_BREAK
911 case 19:
912 YY_RULE_SETUP
913 #line 134 "DataDesc/ddt_parse.yy.l"
914 {
915   char *yptr = gras_ddt_parse_text;
916   
917   while ( *yptr )
918     *string_buf_ptr++ = *yptr++;
919   gras_ddt_parse_char_pos++;
920   gras_ddt_parse_col_pos++;
921 }
922         YY_BREAK
923 case 20:
924 YY_RULE_SETUP
925 #line 143 "DataDesc/ddt_parse.yy.l"
926
927   gras_ddt_parse_char_pos+= strlen(gras_ddt_parse_text);
928   gras_ddt_parse_col_pos+= strlen(gras_ddt_parse_text);
929   return(GRAS_DDT_PARSE_TOKEN_WORD);
930 }
931         YY_BREAK
932 case 21:
933 YY_RULE_SETUP
934 #line 148 "DataDesc/ddt_parse.yy.l"
935
936   gras_ddt_parse_char_pos++; 
937   gras_ddt_parse_col_pos++; 
938   SHOW_WHERE;
939   return(GRAS_DDT_PARSE_TOKEN_LP);
940 }
941         YY_BREAK
942 case 22:
943 YY_RULE_SETUP
944 #line 154 "DataDesc/ddt_parse.yy.l"
945 {
946   gras_ddt_parse_char_pos++;
947   gras_ddt_parse_col_pos++;
948   SHOW_WHERE;
949   return(GRAS_DDT_PARSE_TOKEN_RP);
950 }
951         YY_BREAK
952 case 23:
953 YY_RULE_SETUP
954 #line 160 "DataDesc/ddt_parse.yy.l"
955
956   gras_ddt_parse_char_pos++; 
957   gras_ddt_parse_col_pos++; 
958   SHOW_WHERE;
959   return(GRAS_DDT_PARSE_TOKEN_LB);
960 }
961         YY_BREAK
962 case 24:
963 YY_RULE_SETUP
964 #line 166 "DataDesc/ddt_parse.yy.l"
965 {
966   gras_ddt_parse_char_pos++;
967   gras_ddt_parse_col_pos++;
968   SHOW_WHERE;
969   return(GRAS_DDT_PARSE_TOKEN_RB);
970 }
971         YY_BREAK
972 case 25:
973 YY_RULE_SETUP
974 #line 172 "DataDesc/ddt_parse.yy.l"
975 {
976   gras_ddt_parse_char_pos++;
977   gras_ddt_parse_col_pos++;
978   SHOW_WHERE;
979   return(GRAS_DDT_PARSE_TOKEN_STAR);
980 }
981         YY_BREAK
982 case 26:
983 YY_RULE_SETUP
984 #line 178 "DataDesc/ddt_parse.yy.l"
985 {
986   gras_ddt_parse_char_pos++;
987   gras_ddt_parse_col_pos++;
988   SHOW_WHERE;
989   return(GRAS_DDT_PARSE_TOKEN_SEMI_COLON);
990 }
991         YY_BREAK
992 case 27:
993 YY_RULE_SETUP
994 #line 184 "DataDesc/ddt_parse.yy.l"
995
996   gras_ddt_parse_char_pos++;
997   gras_ddt_parse_col_pos++;
998   SHOW_WHERE;
999   return(GRAS_DDT_PARSE_TOKEN_COLON);
1000 }
1001         YY_BREAK
1002 case 28:
1003 /* rule 28 can match eol */
1004 YY_RULE_SETUP
1005 #line 190 "DataDesc/ddt_parse.yy.l"
1006 {
1007  gras_ddt_parse_line_pos++; 
1008  gras_ddt_parse_char_pos++;
1009  gras_ddt_parse_col_pos=0;
1010   SHOW_WHERE;
1011 }
1012         YY_BREAK
1013 case 29:
1014 YY_RULE_SETUP
1015 #line 196 "DataDesc/ddt_parse.yy.l"
1016
1017   gras_ddt_parse_char_pos++;
1018   gras_ddt_parse_col_pos++;
1019   SHOW_WHERE;
1020 }
1021         YY_BREAK
1022 case 30:
1023 YY_RULE_SETUP
1024 #line 201 "DataDesc/ddt_parse.yy.l"
1025 ECHO;
1026         YY_BREAK
1027 #line 1028 "DataDesc/ddt_parse.yy.c"
1028 case YY_STATE_EOF(INITIAL):
1029 case YY_STATE_EOF(comment):
1030 case YY_STATE_EOF(foo):
1031 case YY_STATE_EOF(str):
1032         yyterminate();
1033
1034         case YY_END_OF_BUFFER:
1035                 {
1036                 /* Amount of text matched not including the EOB char. */
1037                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1038
1039                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1040                 *yy_cp = (yy_hold_char);
1041                 YY_RESTORE_YY_MORE_OFFSET
1042
1043                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1044                         {
1045                         /* We're scanning a new file or input source.  It's
1046                          * possible that this happened because the user
1047                          * just pointed gras_ddt_parse_in at a new source and called
1048                          * gras_ddt_parse_lex().  If so, then we have to assure
1049                          * consistency between YY_CURRENT_BUFFER and our
1050                          * globals.  Here is the right place to do so, because
1051                          * this is the first action (other than possibly a
1052                          * back-up) that will match for the new input source.
1053                          */
1054                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1055                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = gras_ddt_parse_in;
1056                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1057                         }
1058
1059                 /* Note that here we test for yy_c_buf_p "<=" to the position
1060                  * of the first EOB in the buffer, since yy_c_buf_p will
1061                  * already have been incremented past the NUL character
1062                  * (since all states make transitions on EOB to the
1063                  * end-of-buffer state).  Contrast this with the test
1064                  * in input().
1065                  */
1066                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1067                         { /* This was really a NUL. */
1068                         yy_state_type yy_next_state;
1069
1070                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1071
1072                         yy_current_state = yy_get_previous_state(  );
1073
1074                         /* Okay, we're now positioned to make the NUL
1075                          * transition.  We couldn't have
1076                          * yy_get_previous_state() go ahead and do it
1077                          * for us because it doesn't know how to deal
1078                          * with the possibility of jamming (and we don't
1079                          * want to build jamming into it because then it
1080                          * will run more slowly).
1081                          */
1082
1083                         yy_next_state = yy_try_NUL_trans( yy_current_state );
1084
1085                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1086
1087                         if ( yy_next_state )
1088                                 {
1089                                 /* Consume the NUL. */
1090                                 yy_cp = ++(yy_c_buf_p);
1091                                 yy_current_state = yy_next_state;
1092                                 goto yy_match;
1093                                 }
1094
1095                         else
1096                                 {
1097                                 yy_cp = (yy_c_buf_p);
1098                                 goto yy_find_action;
1099                                 }
1100                         }
1101
1102                 else switch ( yy_get_next_buffer(  ) )
1103                         {
1104                         case EOB_ACT_END_OF_FILE:
1105                                 {
1106                                 (yy_did_buffer_switch_on_eof) = 0;
1107
1108                                 if ( gras_ddt_parse_wrap( ) )
1109                                         {
1110                                         /* Note: because we've taken care in
1111                                          * yy_get_next_buffer() to have set up
1112                                          * gras_ddt_parse_text, we can now set up
1113                                          * yy_c_buf_p so that if some total
1114                                          * hoser (like flex itself) wants to
1115                                          * call the scanner after we return the
1116                                          * YY_NULL, it'll still work - another
1117                                          * YY_NULL will get returned.
1118                                          */
1119                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1120
1121                                         yy_act = YY_STATE_EOF(YY_START);
1122                                         goto do_action;
1123                                         }
1124
1125                                 else
1126                                         {
1127                                         if ( ! (yy_did_buffer_switch_on_eof) )
1128                                                 YY_NEW_FILE;
1129                                         }
1130                                 break;
1131                                 }
1132
1133                         case EOB_ACT_CONTINUE_SCAN:
1134                                 (yy_c_buf_p) =
1135                                         (yytext_ptr) + yy_amount_of_matched_text;
1136
1137                                 yy_current_state = yy_get_previous_state(  );
1138
1139                                 yy_cp = (yy_c_buf_p);
1140                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1141                                 goto yy_match;
1142
1143                         case EOB_ACT_LAST_MATCH:
1144                                 (yy_c_buf_p) =
1145                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1146
1147                                 yy_current_state = yy_get_previous_state(  );
1148
1149                                 yy_cp = (yy_c_buf_p);
1150                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1151                                 goto yy_find_action;
1152                         }
1153                 break;
1154                 }
1155
1156         default:
1157                 YY_FATAL_ERROR(
1158                         "fatal flex scanner internal error--no action found" );
1159         } /* end of action switch */
1160                 } /* end of scanning one token */
1161 } /* end of gras_ddt_parse_lex */
1162
1163 /* yy_get_next_buffer - try to read in a new buffer
1164  *
1165  * Returns a code representing an action:
1166  *      EOB_ACT_LAST_MATCH -
1167  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1168  *      EOB_ACT_END_OF_FILE - end of file
1169  */
1170 static int yy_get_next_buffer (void)
1171 {
1172         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1173         register char *source = (yytext_ptr);
1174         register int number_to_move, i;
1175         int ret_val;
1176
1177         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1178                 YY_FATAL_ERROR(
1179                 "fatal flex scanner internal error--end of buffer missed" );
1180
1181         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1182                 { /* Don't try to fill the buffer, so this is an EOF. */
1183                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1184                         {
1185                         /* We matched a single character, the EOB, so
1186                          * treat this as a final EOF.
1187                          */
1188                         return EOB_ACT_END_OF_FILE;
1189                         }
1190
1191                 else
1192                         {
1193                         /* We matched some text prior to the EOB, first
1194                          * process it.
1195                          */
1196                         return EOB_ACT_LAST_MATCH;
1197                         }
1198                 }
1199
1200         /* Try to read more data. */
1201
1202         /* First move last chars to start of buffer. */
1203         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1204
1205         for ( i = 0; i < number_to_move; ++i )
1206                 *(dest++) = *(source++);
1207
1208         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1209                 /* don't do the read, it's not guaranteed to return an EOF,
1210                  * just force an EOF
1211                  */
1212                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1213
1214         else
1215                 {
1216                         size_t num_to_read =
1217                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1218
1219                 while ( num_to_read <= 0 )
1220                         { /* Not enough room in the buffer - grow it. */
1221
1222                         /* just a shorter name for the current buffer */
1223                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1224
1225                         int yy_c_buf_p_offset =
1226                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1227
1228                         if ( b->yy_is_our_buffer )
1229                                 {
1230                                 int new_size = b->yy_buf_size * 2;
1231
1232                                 if ( new_size <= 0 )
1233                                         b->yy_buf_size += b->yy_buf_size / 8;
1234                                 else
1235                                         b->yy_buf_size *= 2;
1236
1237                                 b->yy_ch_buf = (char *)
1238                                         /* Include room in for 2 EOB chars. */
1239                                         gras_ddt_parse_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
1240                                 }
1241                         else
1242                                 /* Can't grow it, we don't own it. */
1243                                 b->yy_ch_buf = 0;
1244
1245                         if ( ! b->yy_ch_buf )
1246                                 YY_FATAL_ERROR(
1247                                 "fatal error - scanner input buffer overflow" );
1248
1249                         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1250
1251                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1252                                                 number_to_move - 1;
1253
1254                         }
1255
1256                 if ( num_to_read > YY_READ_BUF_SIZE )
1257                         num_to_read = YY_READ_BUF_SIZE;
1258
1259                 /* Read in more data. */
1260                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1261                         (yy_n_chars), num_to_read );
1262
1263                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1264                 }
1265
1266         if ( (yy_n_chars) == 0 )
1267                 {
1268                 if ( number_to_move == YY_MORE_ADJ )
1269                         {
1270                         ret_val = EOB_ACT_END_OF_FILE;
1271                         gras_ddt_parse_restart(gras_ddt_parse_in  );
1272                         }
1273
1274                 else
1275                         {
1276                         ret_val = EOB_ACT_LAST_MATCH;
1277                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1278                                 YY_BUFFER_EOF_PENDING;
1279                         }
1280                 }
1281
1282         else
1283                 ret_val = EOB_ACT_CONTINUE_SCAN;
1284
1285         (yy_n_chars) += number_to_move;
1286         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1287         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1288
1289         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1290
1291         return ret_val;
1292 }
1293
1294 /* yy_get_previous_state - get the state just before the EOB char was reached */
1295
1296     static yy_state_type yy_get_previous_state (void)
1297 {
1298         register yy_state_type yy_current_state;
1299         register char *yy_cp;
1300     
1301         yy_current_state = (yy_start);
1302
1303         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1304                 {
1305                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1306                 if ( yy_accept[yy_current_state] )
1307                         {
1308                         (yy_last_accepting_state) = yy_current_state;
1309                         (yy_last_accepting_cpos) = yy_cp;
1310                         }
1311                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1312                         {
1313                         yy_current_state = (int) yy_def[yy_current_state];
1314                         if ( yy_current_state >= 53 )
1315                                 yy_c = yy_meta[(unsigned int) yy_c];
1316                         }
1317                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1318                 }
1319
1320         return yy_current_state;
1321 }
1322
1323 /* yy_try_NUL_trans - try to make a transition on the NUL character
1324  *
1325  * synopsis
1326  *      next_state = yy_try_NUL_trans( current_state );
1327  */
1328     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
1329 {
1330         register int yy_is_jam;
1331         register char *yy_cp = (yy_c_buf_p);
1332
1333         register YY_CHAR yy_c = 1;
1334         if ( yy_accept[yy_current_state] )
1335                 {
1336                 (yy_last_accepting_state) = yy_current_state;
1337                 (yy_last_accepting_cpos) = yy_cp;
1338                 }
1339         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1340                 {
1341                 yy_current_state = (int) yy_def[yy_current_state];
1342                 if ( yy_current_state >= 53 )
1343                         yy_c = yy_meta[(unsigned int) yy_c];
1344                 }
1345         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1346         yy_is_jam = (yy_current_state == 52);
1347
1348         return yy_is_jam ? 0 : yy_current_state;
1349 }
1350
1351     static void yyunput (int c, register char * yy_bp )
1352 {
1353         register char *yy_cp;
1354     
1355     yy_cp = (yy_c_buf_p);
1356
1357         /* undo effects of setting up gras_ddt_parse_text */
1358         *yy_cp = (yy_hold_char);
1359
1360         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1361                 { /* need to shift things up to make room */
1362                 /* +2 for EOB chars. */
1363                 register int number_to_move = (yy_n_chars) + 2;
1364                 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1365                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1366                 register char *source =
1367                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1368
1369                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1370                         *--dest = *--source;
1371
1372                 yy_cp += (int) (dest - source);
1373                 yy_bp += (int) (dest - source);
1374                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1375                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1376
1377                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1378                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1379                 }
1380
1381         *--yy_cp = (char) c;
1382
1383         (yytext_ptr) = yy_bp;
1384         (yy_hold_char) = *yy_cp;
1385         (yy_c_buf_p) = yy_cp;
1386 }
1387
1388 #ifndef YY_NO_INPUT
1389 #ifdef __cplusplus
1390     static int yyinput (void)
1391 #else
1392     static int input  (void)
1393 #endif
1394
1395 {
1396         int c;
1397     
1398         *(yy_c_buf_p) = (yy_hold_char);
1399
1400         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1401                 {
1402                 /* yy_c_buf_p now points to the character we want to return.
1403                  * If this occurs *before* the EOB characters, then it's a
1404                  * valid NUL; if not, then we've hit the end of the buffer.
1405                  */
1406                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1407                         /* This was really a NUL. */
1408                         *(yy_c_buf_p) = '\0';
1409
1410                 else
1411                         { /* need more input */
1412                         int offset = (yy_c_buf_p) - (yytext_ptr);
1413                         ++(yy_c_buf_p);
1414
1415                         switch ( yy_get_next_buffer(  ) )
1416                                 {
1417                                 case EOB_ACT_LAST_MATCH:
1418                                         /* This happens because yy_g_n_b()
1419                                          * sees that we've accumulated a
1420                                          * token and flags that we need to
1421                                          * try matching the token before
1422                                          * proceeding.  But for input(),
1423                                          * there's no matching to consider.
1424                                          * So convert the EOB_ACT_LAST_MATCH
1425                                          * to EOB_ACT_END_OF_FILE.
1426                                          */
1427
1428                                         /* Reset buffer status. */
1429                                         gras_ddt_parse_restart(gras_ddt_parse_in );
1430
1431                                         /*FALLTHROUGH*/
1432
1433                                 case EOB_ACT_END_OF_FILE:
1434                                         {
1435                                         if ( gras_ddt_parse_wrap( ) )
1436                                                 return EOF;
1437
1438                                         if ( ! (yy_did_buffer_switch_on_eof) )
1439                                                 YY_NEW_FILE;
1440 #ifdef __cplusplus
1441                                         return yyinput();
1442 #else
1443                                         return input();
1444 #endif
1445                                         }
1446
1447                                 case EOB_ACT_CONTINUE_SCAN:
1448                                         (yy_c_buf_p) = (yytext_ptr) + offset;
1449                                         break;
1450                                 }
1451                         }
1452                 }
1453
1454         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
1455         *(yy_c_buf_p) = '\0';   /* preserve gras_ddt_parse_text */
1456         (yy_hold_char) = *++(yy_c_buf_p);
1457
1458         return c;
1459 }
1460 #endif  /* ifndef YY_NO_INPUT */
1461
1462 /** Immediately switch to a different input stream.
1463  * @param input_file A readable stream.
1464  * 
1465  * @note This function does not reset the start condition to @c INITIAL .
1466  */
1467     void gras_ddt_parse_restart  (FILE * input_file )
1468 {
1469     
1470         if ( ! YY_CURRENT_BUFFER ){
1471         gras_ddt_parse_ensure_buffer_stack ();
1472                 YY_CURRENT_BUFFER_LVALUE =
1473             gras_ddt_parse__create_buffer(gras_ddt_parse_in,YY_BUF_SIZE );
1474         }
1475
1476         gras_ddt_parse__init_buffer(YY_CURRENT_BUFFER,input_file );
1477         gras_ddt_parse__load_buffer_state( );
1478 }
1479
1480 /** Switch to a different input buffer.
1481  * @param new_buffer The new input buffer.
1482  * 
1483  */
1484     void gras_ddt_parse__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
1485 {
1486     
1487         /* TODO. We should be able to replace this entire function body
1488          * with
1489          *              gras_ddt_parse_pop_buffer_state();
1490          *              gras_ddt_parse_push_buffer_state(new_buffer);
1491      */
1492         gras_ddt_parse_ensure_buffer_stack ();
1493         if ( YY_CURRENT_BUFFER == new_buffer )
1494                 return;
1495
1496         if ( YY_CURRENT_BUFFER )
1497                 {
1498                 /* Flush out information for old buffer. */
1499                 *(yy_c_buf_p) = (yy_hold_char);
1500                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1501                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1502                 }
1503
1504         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1505         gras_ddt_parse__load_buffer_state( );
1506
1507         /* We don't actually know whether we did this switch during
1508          * EOF (gras_ddt_parse_wrap()) processing, but the only time this flag
1509          * is looked at is after gras_ddt_parse_wrap() is called, so it's safe
1510          * to go ahead and always set it.
1511          */
1512         (yy_did_buffer_switch_on_eof) = 1;
1513 }
1514
1515 static void gras_ddt_parse__load_buffer_state  (void)
1516 {
1517         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1518         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1519         gras_ddt_parse_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1520         (yy_hold_char) = *(yy_c_buf_p);
1521 }
1522
1523 /** Allocate and initialize an input buffer state.
1524  * @param file A readable stream.
1525  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1526  * 
1527  * @return the allocated buffer state.
1528  */
1529     YY_BUFFER_STATE gras_ddt_parse__create_buffer  (FILE * file, int  size )
1530 {
1531         YY_BUFFER_STATE b;
1532     
1533         b = (YY_BUFFER_STATE) gras_ddt_parse_alloc(sizeof( struct yy_buffer_state )  );
1534         if ( ! b )
1535                 YY_FATAL_ERROR( "out of dynamic memory in gras_ddt_parse__create_buffer()" );
1536
1537         b->yy_buf_size = size;
1538
1539         /* yy_ch_buf has to be 2 characters longer than the size given because
1540          * we need to put in 2 end-of-buffer characters.
1541          */
1542         b->yy_ch_buf = (char *) gras_ddt_parse_alloc(b->yy_buf_size + 2  );
1543         if ( ! b->yy_ch_buf )
1544                 YY_FATAL_ERROR( "out of dynamic memory in gras_ddt_parse__create_buffer()" );
1545
1546         b->yy_is_our_buffer = 1;
1547
1548         gras_ddt_parse__init_buffer(b,file );
1549
1550         return b;
1551 }
1552
1553 /** Destroy the buffer.
1554  * @param b a buffer created with gras_ddt_parse__create_buffer()
1555  * 
1556  */
1557     void gras_ddt_parse__delete_buffer (YY_BUFFER_STATE  b )
1558 {
1559     
1560         if ( ! b )
1561                 return;
1562
1563         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1564                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1565
1566         if ( b->yy_is_our_buffer )
1567                 gras_ddt_parse_free((void *) b->yy_ch_buf  );
1568
1569         gras_ddt_parse_free((void *) b  );
1570 }
1571
1572 #ifndef __cplusplus
1573 extern int isatty (int );
1574 #endif /* __cplusplus */
1575     
1576 /* Initializes or reinitializes a buffer.
1577  * This function is sometimes called more than once on the same buffer,
1578  * such as during a gras_ddt_parse_restart() or at EOF.
1579  */
1580     static void gras_ddt_parse__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
1581
1582 {
1583         int oerrno = errno;
1584     
1585         gras_ddt_parse__flush_buffer(b );
1586
1587         b->yy_input_file = file;
1588         b->yy_fill_buffer = 1;
1589
1590     /* If b is the current buffer, then gras_ddt_parse__init_buffer was _probably_
1591      * called from gras_ddt_parse_restart() or through yy_get_next_buffer.
1592      * In that case, we don't want to reset the lineno or column.
1593      */
1594     if (b != YY_CURRENT_BUFFER){
1595         b->yy_bs_lineno = 1;
1596         b->yy_bs_column = 0;
1597     }
1598
1599         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1600     
1601         errno = oerrno;
1602 }
1603
1604 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1605  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1606  * 
1607  */
1608     void gras_ddt_parse__flush_buffer (YY_BUFFER_STATE  b )
1609 {
1610         if ( ! b )
1611                 return;
1612
1613         b->yy_n_chars = 0;
1614
1615         /* We always need two end-of-buffer characters.  The first causes
1616          * a transition to the end-of-buffer state.  The second causes
1617          * a jam in that state.
1618          */
1619         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1620         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1621
1622         b->yy_buf_pos = &b->yy_ch_buf[0];
1623
1624         b->yy_at_bol = 1;
1625         b->yy_buffer_status = YY_BUFFER_NEW;
1626
1627         if ( b == YY_CURRENT_BUFFER )
1628                 gras_ddt_parse__load_buffer_state( );
1629 }
1630
1631 /** Pushes the new state onto the stack. The new state becomes
1632  *  the current state. This function will allocate the stack
1633  *  if necessary.
1634  *  @param new_buffer The new state.
1635  *  
1636  */
1637 void gras_ddt_parse_push_buffer_state (YY_BUFFER_STATE new_buffer )
1638 {
1639         if (new_buffer == NULL)
1640                 return;
1641
1642         gras_ddt_parse_ensure_buffer_stack();
1643
1644         /* This block is copied from gras_ddt_parse__switch_to_buffer. */
1645         if ( YY_CURRENT_BUFFER )
1646                 {
1647                 /* Flush out information for old buffer. */
1648                 *(yy_c_buf_p) = (yy_hold_char);
1649                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1650                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1651                 }
1652
1653         /* Only push if top exists. Otherwise, replace top. */
1654         if (YY_CURRENT_BUFFER)
1655                 (yy_buffer_stack_top)++;
1656         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1657
1658         /* copied from gras_ddt_parse__switch_to_buffer. */
1659         gras_ddt_parse__load_buffer_state( );
1660         (yy_did_buffer_switch_on_eof) = 1;
1661 }
1662
1663 /** Removes and deletes the top of the stack, if present.
1664  *  The next element becomes the new top.
1665  *  
1666  */
1667 void gras_ddt_parse_pop_buffer_state (void)
1668 {
1669         if (!YY_CURRENT_BUFFER)
1670                 return;
1671
1672         gras_ddt_parse__delete_buffer(YY_CURRENT_BUFFER );
1673         YY_CURRENT_BUFFER_LVALUE = NULL;
1674         if ((yy_buffer_stack_top) > 0)
1675                 --(yy_buffer_stack_top);
1676
1677         if (YY_CURRENT_BUFFER) {
1678                 gras_ddt_parse__load_buffer_state( );
1679                 (yy_did_buffer_switch_on_eof) = 1;
1680         }
1681 }
1682
1683 /* Allocates the stack if it does not exist.
1684  *  Guarantees space for at least one push.
1685  */
1686 static void gras_ddt_parse_ensure_buffer_stack (void)
1687 {
1688         int num_to_alloc;
1689     
1690         if (!(yy_buffer_stack)) {
1691
1692                 /* First allocation is just for 2 elements, since we don't know if this
1693                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1694                  * immediate realloc on the next call.
1695          */
1696                 num_to_alloc = 1;
1697                 (yy_buffer_stack) = (struct yy_buffer_state**)gras_ddt_parse_alloc
1698                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
1699                                                                 );
1700                 
1701                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1702                                 
1703                 (yy_buffer_stack_max) = num_to_alloc;
1704                 (yy_buffer_stack_top) = 0;
1705                 return;
1706         }
1707
1708         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1709
1710                 /* Increase the buffer to prepare for a possible push. */
1711                 int grow_size = 8 /* arbitrary grow size */;
1712
1713                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1714                 (yy_buffer_stack) = (struct yy_buffer_state**)gras_ddt_parse_realloc
1715                                                                 ((yy_buffer_stack),
1716                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
1717                                                                 );
1718
1719                 /* zero only the new slots.*/
1720                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1721                 (yy_buffer_stack_max) = num_to_alloc;
1722         }
1723 }
1724
1725 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1726  * @param base the character buffer
1727  * @param size the size in bytes of the character buffer
1728  * 
1729  * @return the newly allocated buffer state object. 
1730  */
1731 YY_BUFFER_STATE gras_ddt_parse__scan_buffer  (char * base, yy_size_t  size )
1732 {
1733         YY_BUFFER_STATE b;
1734     
1735         if ( size < 2 ||
1736              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1737              base[size-1] != YY_END_OF_BUFFER_CHAR )
1738                 /* They forgot to leave room for the EOB's. */
1739                 return 0;
1740
1741         b = (YY_BUFFER_STATE) gras_ddt_parse_alloc(sizeof( struct yy_buffer_state )  );
1742         if ( ! b )
1743                 YY_FATAL_ERROR( "out of dynamic memory in gras_ddt_parse__scan_buffer()" );
1744
1745         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1746         b->yy_buf_pos = b->yy_ch_buf = base;
1747         b->yy_is_our_buffer = 0;
1748         b->yy_input_file = 0;
1749         b->yy_n_chars = b->yy_buf_size;
1750         b->yy_is_interactive = 0;
1751         b->yy_at_bol = 1;
1752         b->yy_fill_buffer = 0;
1753         b->yy_buffer_status = YY_BUFFER_NEW;
1754
1755         gras_ddt_parse__switch_to_buffer(b  );
1756
1757         return b;
1758 }
1759
1760 /** Setup the input buffer state to scan a string. The next call to gras_ddt_parse_lex() will
1761  * scan from a @e copy of @a str.
1762  * @param str a NUL-terminated string to scan
1763  * 
1764  * @return the newly allocated buffer state object.
1765  * @note If you want to scan bytes that may contain NUL values, then use
1766  *       gras_ddt_parse__scan_bytes() instead.
1767  */
1768 YY_BUFFER_STATE gras_ddt_parse__scan_string (yyconst char * yy_str )
1769 {
1770     
1771         return gras_ddt_parse__scan_bytes(yy_str,strlen(yy_str) );
1772 }
1773
1774 /** Setup the input buffer state to scan the given bytes. The next call to gras_ddt_parse_lex() will
1775  * scan from a @e copy of @a bytes.
1776  * @param bytes the byte buffer to scan
1777  * @param len the number of bytes in the buffer pointed to by @a bytes.
1778  * 
1779  * @return the newly allocated buffer state object.
1780  */
1781 YY_BUFFER_STATE gras_ddt_parse__scan_bytes  (yyconst char * bytes, int  len )
1782 {
1783         YY_BUFFER_STATE b;
1784         char *buf;
1785         yy_size_t n;
1786         int i;
1787     
1788         /* Get memory for full buffer, including space for trailing EOB's. */
1789         n = len + 2;
1790         buf = (char *) gras_ddt_parse_alloc(n  );
1791         if ( ! buf )
1792                 YY_FATAL_ERROR( "out of dynamic memory in gras_ddt_parse__scan_bytes()" );
1793
1794         for ( i = 0; i < len; ++i )
1795                 buf[i] = bytes[i];
1796
1797         buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1798
1799         b = gras_ddt_parse__scan_buffer(buf,n );
1800         if ( ! b )
1801                 YY_FATAL_ERROR( "bad buffer in gras_ddt_parse__scan_bytes()" );
1802
1803         /* It's okay to grow etc. this buffer, and we should throw it
1804          * away when we're done.
1805          */
1806         b->yy_is_our_buffer = 1;
1807
1808         return b;
1809 }
1810
1811 #ifndef YY_EXIT_FAILURE
1812 #define YY_EXIT_FAILURE 2
1813 #endif
1814
1815 static void yy_fatal_error (yyconst char* msg )
1816 {
1817         (void) fprintf( stderr, "%s\n", msg );
1818         exit( YY_EXIT_FAILURE );
1819 }
1820
1821 /* Redefine yyless() so it works in section 3 code. */
1822
1823 #undef yyless
1824 #define yyless(n) \
1825         do \
1826                 { \
1827                 /* Undo effects of setting up gras_ddt_parse_text. */ \
1828         int yyless_macro_arg = (n); \
1829         YY_LESS_LINENO(yyless_macro_arg);\
1830                 gras_ddt_parse_text[gras_ddt_parse_leng] = (yy_hold_char); \
1831                 (yy_c_buf_p) = gras_ddt_parse_text + yyless_macro_arg; \
1832                 (yy_hold_char) = *(yy_c_buf_p); \
1833                 *(yy_c_buf_p) = '\0'; \
1834                 gras_ddt_parse_leng = yyless_macro_arg; \
1835                 } \
1836         while ( 0 )
1837
1838 /* Accessor  methods (get/set functions) to struct members. */
1839
1840 /** Get the current line number.
1841  * 
1842  */
1843 int gras_ddt_parse_get_lineno  (void)
1844 {
1845         
1846     return gras_ddt_parse_lineno;
1847 }
1848
1849 /** Get the input stream.
1850  * 
1851  */
1852 FILE *gras_ddt_parse_get_in  (void)
1853 {
1854         return gras_ddt_parse_in;
1855 }
1856
1857 /** Get the output stream.
1858  * 
1859  */
1860 FILE *gras_ddt_parse_get_out  (void)
1861 {
1862         return gras_ddt_parse_out;
1863 }
1864
1865 /** Get the length of the current token.
1866  * 
1867  */
1868 int gras_ddt_parse_get_leng  (void)
1869 {
1870         return gras_ddt_parse_leng;
1871 }
1872
1873 /** Get the current token.
1874  * 
1875  */
1876
1877 char *gras_ddt_parse_get_text  (void)
1878 {
1879         return gras_ddt_parse_text;
1880 }
1881
1882 /** Set the current line number.
1883  * @param line_number
1884  * 
1885  */
1886 void gras_ddt_parse_set_lineno (int  line_number )
1887 {
1888     
1889     gras_ddt_parse_lineno = line_number;
1890 }
1891
1892 /** Set the input stream. This does not discard the current
1893  * input buffer.
1894  * @param in_str A readable stream.
1895  * 
1896  * @see gras_ddt_parse__switch_to_buffer
1897  */
1898 void gras_ddt_parse_set_in (FILE *  in_str )
1899 {
1900         gras_ddt_parse_in = in_str ;
1901 }
1902
1903 void gras_ddt_parse_set_out (FILE *  out_str )
1904 {
1905         gras_ddt_parse_out = out_str ;
1906 }
1907
1908 int gras_ddt_parse_get_debug  (void)
1909 {
1910         return gras_ddt_parse__flex_debug;
1911 }
1912
1913 void gras_ddt_parse_set_debug (int  bdebug )
1914 {
1915         gras_ddt_parse__flex_debug = bdebug ;
1916 }
1917
1918 /* gras_ddt_parse_lex_destroy is for both reentrant and non-reentrant scanners. */
1919 int gras_ddt_parse_lex_destroy  (void)
1920 {
1921     
1922     /* Pop the buffer stack, destroying each element. */
1923         while(YY_CURRENT_BUFFER){
1924                 gras_ddt_parse__delete_buffer(YY_CURRENT_BUFFER  );
1925                 YY_CURRENT_BUFFER_LVALUE = NULL;
1926                 gras_ddt_parse_pop_buffer_state();
1927         }
1928
1929         /* Destroy the stack itself. */
1930         gras_ddt_parse_free((yy_buffer_stack) );
1931         (yy_buffer_stack) = NULL;
1932
1933     return 0;
1934 }
1935
1936 /*
1937  * Internal utility routines.
1938  */
1939
1940 #ifndef yytext_ptr
1941 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1942 {
1943         register int i;
1944         for ( i = 0; i < n; ++i )
1945                 s1[i] = s2[i];
1946 }
1947 #endif
1948
1949 #ifdef YY_NEED_STRLEN
1950 static int yy_flex_strlen (yyconst char * s )
1951 {
1952         register int n;
1953         for ( n = 0; s[n]; ++n )
1954                 ;
1955
1956         return n;
1957 }
1958 #endif
1959
1960 void *gras_ddt_parse_alloc (yy_size_t  size )
1961 {
1962         return (void *) malloc( size );
1963 }
1964
1965 void *gras_ddt_parse_realloc  (void * ptr, yy_size_t  size )
1966 {
1967         /* The cast to (char *) in the following accommodates both
1968          * implementations that use char* generic pointers, and those
1969          * that use void* generic pointers.  It works with the latter
1970          * because both ANSI C and C++ allow castless assignment from
1971          * any pointer type to void*, and deal with argument conversions
1972          * as though doing an assignment.
1973          */
1974         return (void *) realloc( (char *) ptr, size );
1975 }
1976
1977 void gras_ddt_parse_free (void * ptr )
1978 {
1979         free( (char *) ptr );   /* see gras_ddt_parse_realloc() for (char *) cast */
1980 }
1981
1982 #define YYTABLES_NAME "yytables"
1983
1984 #undef YY_NEW_FILE
1985 #undef YY_FLUSH_BUFFER
1986 #undef yy_set_bol
1987 #undef yy_new_buffer
1988 #undef yy_set_interactive
1989 #undef yytext_ptr
1990 #undef YY_DO_BEFORE_ACTION
1991
1992 #ifdef YY_DECL_IS_OURS
1993 #undef YY_DECL_IS_OURS
1994 #undef YY_DECL
1995 #endif
1996 #line 201 "DataDesc/ddt_parse.yy.l"
1997
1998
1999 /* {space}+                { return(TOKEN_SPACE);} */
2000
2001 void gras_ddt_parse_dump(void) {
2002   switch(gras_ddt_parse_tok_num) {
2003   case GRAS_DDT_PARSE_TOKEN_LP      : {printf("TOKEN_LP ");break;}
2004   case GRAS_DDT_PARSE_TOKEN_RP      : {printf("TOKEN_RP ");break;}
2005   case GRAS_DDT_PARSE_TOKEN_WORD    : {printf("TOKEN_WORD ");break;}
2006     //  case GRAS_DDT_PARSE_TOKEN_SPACE   : {printf("TOKEN_SPACE ");break;}
2007     //  case GRAS_DDT_PARSE_TOKEN_COMMENT : {printf("TOKEN_COMMENT ");break;}
2008   case GRAS_DDT_PARSE_TOKEN_NEWLINE : {printf("TOKEN_NEWLINE\n");return;}
2009   case GRAS_DDT_PARSE_TOKEN_EMPTY : {printf("TOKEN_EMPTY\n");return;}
2010   default             : {printf("Unknown token %d\n", gras_ddt_parse_tok_num);return;}
2011   }
2012   printf("-->%s<-- [line %d, pos %d]\n",gras_ddt_parse_text,gras_ddt_parse_line_pos,gras_ddt_parse_char_pos);
2013   return;
2014 }
2015
2016 int gras_ddt_parse_lex_n_dump(void) {
2017   gras_ddt_parse_tok_num = gras_ddt_parse_lex();
2018   //  gras_ddt_parse_char_pos += strlen(gras_ddt_parse_text);
2019   return(gras_ddt_parse_tok_num);
2020 }
2021
2022 void  gras_ddt_parse_pointer_init(const char *file) {
2023   file_to_parse = fopen(file,"r");
2024   input_buffer = gras_ddt_parse__create_buffer(file_to_parse,10 );
2025   gras_ddt_parse__switch_to_buffer(input_buffer);
2026
2027   gras_ddt_parse_line_pos = 1;
2028   gras_ddt_parse_char_pos = 0;
2029   gras_ddt_parse_col_pos = 0;
2030   gras_ddt_parse_tok_num = 0;
2031 }
2032
2033 void  gras_ddt_parse_pointer_close(void) {
2034   gras_ddt_parse__delete_buffer(input_buffer);
2035   fclose(file_to_parse);
2036
2037   gras_ddt_parse_line_pos = 1;
2038   gras_ddt_parse_char_pos = 0;
2039   gras_ddt_parse_tok_num = 0;
2040 }
2041
2042
2043 void  gras_ddt_parse_pointer_string_init(const char *string_to_parse) {
2044   input_buffer = gras_ddt_parse__scan_string (string_to_parse);
2045   gras_ddt_parse__switch_to_buffer(input_buffer);
2046
2047   gras_ddt_parse_line_pos = 1;
2048   gras_ddt_parse_char_pos = 0;
2049   gras_ddt_parse_tok_num = 0;
2050 }
2051
2052 void  gras_ddt_parse_pointer_string_close(void) {
2053   gras_ddt_parse__delete_buffer(input_buffer);
2054
2055   gras_ddt_parse_line_pos = 1;
2056   gras_ddt_parse_char_pos = 0;
2057   gras_ddt_parse_tok_num = 0;
2058 }
2059
2060 // Local variables:
2061 // mode: c
2062 // End:
2063