Logo AND Algorithmique Numérique Distribuée

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