Logo AND Algorithmique Numérique Distribuée

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