Logo AND Algorithmique Numérique Distribuée

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