Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
At least. ignore ignorable
[simgrid.git] / src / xbt / graphxml.c
1
2 #line 3 "xbt/graphxml.c"
3
4 #define  YY_INT_ALIGNED short int
5
6 /* A lexical scanner generated by flex */
7
8 #define yy_create_buffer xbt_graph_parse__create_buffer
9 #define yy_delete_buffer xbt_graph_parse__delete_buffer
10 #define yy_flex_debug xbt_graph_parse__flex_debug
11 #define yy_init_buffer xbt_graph_parse__init_buffer
12 #define yy_flush_buffer xbt_graph_parse__flush_buffer
13 #define yy_load_buffer_state xbt_graph_parse__load_buffer_state
14 #define yy_switch_to_buffer xbt_graph_parse__switch_to_buffer
15 #define yyin xbt_graph_parse_in
16 #define yyleng xbt_graph_parse_leng
17 #define yylex xbt_graph_parse_lex
18 #define yylineno xbt_graph_parse_lineno
19 #define yyout xbt_graph_parse_out
20 #define yyrestart xbt_graph_parse_restart
21 #define yytext xbt_graph_parse_text
22 #define yywrap xbt_graph_parse_wrap
23 #define yyalloc xbt_graph_parse_alloc
24 #define yyrealloc xbt_graph_parse_realloc
25 #define yyfree xbt_graph_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_graph_parse_restart(xbt_graph_parse_in  )
158
159 #define YY_END_OF_BUFFER_CHAR 0
160
161 /* Size of default input buffer. */
162 #ifndef YY_BUF_SIZE
163 #define YY_BUF_SIZE 16384
164 #endif
165
166 /* The state buf must be large enough to hold one state per character in the main buffer.
167  */
168 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
169
170 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
171 #define YY_TYPEDEF_YY_BUFFER_STATE
172 typedef struct yy_buffer_state *YY_BUFFER_STATE;
173 #endif
174
175 extern int xbt_graph_parse_leng;
176
177 extern FILE *xbt_graph_parse_in, *xbt_graph_parse_out;
178
179 #define EOB_ACT_CONTINUE_SCAN 0
180 #define EOB_ACT_END_OF_FILE 1
181 #define EOB_ACT_LAST_MATCH 2
182
183     /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
184      *       access to the local variable yy_act. Since yyless() is a macro, it would break
185      *       existing scanners that call yyless() from OUTSIDE xbt_graph_parse_lex. 
186      *       One obvious solution it to make yy_act a global. I tried that, and saw
187      *       a 5% performance hit in a non-xbt_graph_parse_lineno scanner, because yy_act is
188      *       normally declared as a register variable-- so it is not worth it.
189      */
190     #define  YY_LESS_LINENO(n) \
191             do { \
192                 int yyl;\
193                 for ( yyl = n; yyl < xbt_graph_parse_leng; ++yyl )\
194                     if ( xbt_graph_parse_text[yyl] == '\n' )\
195                         --xbt_graph_parse_lineno;\
196             }while(0)
197     
198 /* Return all but the first "n" matched characters back to the input stream. */
199 #define yyless(n) \
200         do \
201                 { \
202                 /* Undo effects of setting up xbt_graph_parse_text. */ \
203         int yyless_macro_arg = (n); \
204         YY_LESS_LINENO(yyless_macro_arg);\
205                 *yy_cp = (yy_hold_char); \
206                 YY_RESTORE_YY_MORE_OFFSET \
207                 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
208                 YY_DO_BEFORE_ACTION; /* set up xbt_graph_parse_text again */ \
209                 } \
210         while ( 0 )
211
212 #define unput(c) yyunput( c, (yytext_ptr)  )
213
214 #ifndef YY_TYPEDEF_YY_SIZE_T
215 #define YY_TYPEDEF_YY_SIZE_T
216 typedef size_t yy_size_t;
217 #endif
218
219 #ifndef YY_STRUCT_YY_BUFFER_STATE
220 #define YY_STRUCT_YY_BUFFER_STATE
221 struct yy_buffer_state
222         {
223         FILE *yy_input_file;
224
225         char *yy_ch_buf;                /* input buffer */
226         char *yy_buf_pos;               /* current position in input buffer */
227
228         /* Size of input buffer in bytes, not including room for EOB
229          * characters.
230          */
231         yy_size_t yy_buf_size;
232
233         /* Number of characters read into yy_ch_buf, not including EOB
234          * characters.
235          */
236         int yy_n_chars;
237
238         /* Whether we "own" the buffer - i.e., we know we created it,
239          * and can realloc() it to grow it, and should free() it to
240          * delete it.
241          */
242         int yy_is_our_buffer;
243
244         /* Whether this is an "interactive" input source; if so, and
245          * if we're using stdio for input, then we want to use getc()
246          * instead of fread(), to make sure we stop fetching input after
247          * each newline.
248          */
249         int yy_is_interactive;
250
251         /* Whether we're considered to be at the beginning of a line.
252          * If so, '^' rules will be active on the next match, otherwise
253          * not.
254          */
255         int yy_at_bol;
256
257     int yy_bs_lineno; /**< The line count. */
258     int yy_bs_column; /**< The column count. */
259     
260         /* Whether to try to fill the input buffer when we reach the
261          * end of it.
262          */
263         int yy_fill_buffer;
264
265         int yy_buffer_status;
266
267 #define YY_BUFFER_NEW 0
268 #define YY_BUFFER_NORMAL 1
269         /* When an EOF's been seen but there's still some text to process
270          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
271          * shouldn't try reading from the input source any more.  We might
272          * still have a bunch of tokens to match, though, because of
273          * possible backing-up.
274          *
275          * When we actually see the EOF, we change the status to "new"
276          * (via xbt_graph_parse_restart()), so that the user can continue scanning by
277          * just pointing xbt_graph_parse_in at a new input file.
278          */
279 #define YY_BUFFER_EOF_PENDING 2
280
281         };
282 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
283
284 /* Stack of input buffers. */
285 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
286 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
287 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
288
289 /* We provide macros for accessing buffer states in case in the
290  * future we want to put the buffer states in a more general
291  * "scanner state".
292  *
293  * Returns the top of the stack, or NULL.
294  */
295 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
296                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
297                           : NULL)
298
299 /* Same as previous macro, but useful when we know that the buffer stack is not
300  * NULL or when we need an lvalue. For internal use only.
301  */
302 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
303
304 /* yy_hold_char holds the character lost when xbt_graph_parse_text is formed. */
305 static char yy_hold_char;
306 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
307 int xbt_graph_parse_leng;
308
309 /* Points to current character in buffer. */
310 static char *yy_c_buf_p = (char *) 0;
311 static int yy_init = 0;         /* whether we need to initialize */
312 static int yy_start = 0;        /* start state number */
313
314 /* Flag which is used to allow xbt_graph_parse_wrap()'s to do buffer switches
315  * instead of setting up a fresh xbt_graph_parse_in.  A bit of a hack ...
316  */
317 static int yy_did_buffer_switch_on_eof;
318
319 void xbt_graph_parse_restart (FILE *input_file  );
320 void xbt_graph_parse__switch_to_buffer (YY_BUFFER_STATE new_buffer  );
321 YY_BUFFER_STATE xbt_graph_parse__create_buffer (FILE *file,int size  );
322 void xbt_graph_parse__delete_buffer (YY_BUFFER_STATE b  );
323 void xbt_graph_parse__flush_buffer (YY_BUFFER_STATE b  );
324 void xbt_graph_parse_push_buffer_state (YY_BUFFER_STATE new_buffer  );
325 void xbt_graph_parse_pop_buffer_state (void );
326
327 static void xbt_graph_parse_ensure_buffer_stack (void );
328 static void xbt_graph_parse__load_buffer_state (void );
329 static void xbt_graph_parse__init_buffer (YY_BUFFER_STATE b,FILE *file  );
330
331 #define YY_FLUSH_BUFFER xbt_graph_parse__flush_buffer(YY_CURRENT_BUFFER )
332
333 YY_BUFFER_STATE xbt_graph_parse__scan_buffer (char *base,yy_size_t size  );
334 YY_BUFFER_STATE xbt_graph_parse__scan_string (yyconst char *yy_str  );
335 YY_BUFFER_STATE xbt_graph_parse__scan_bytes (yyconst char *bytes,int len  );
336
337 void *xbt_graph_parse_alloc (yy_size_t  );
338 void *xbt_graph_parse_realloc (void *,yy_size_t  );
339 void xbt_graph_parse_free (void *  );
340
341 #define yy_new_buffer xbt_graph_parse__create_buffer
342
343 #define yy_set_interactive(is_interactive) \
344         { \
345         if ( ! YY_CURRENT_BUFFER ){ \
346         xbt_graph_parse_ensure_buffer_stack (); \
347                 YY_CURRENT_BUFFER_LVALUE =    \
348             xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE ); \
349         } \
350         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
351         }
352
353 #define yy_set_bol(at_bol) \
354         { \
355         if ( ! YY_CURRENT_BUFFER ){\
356         xbt_graph_parse_ensure_buffer_stack (); \
357                 YY_CURRENT_BUFFER_LVALUE =    \
358             xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE ); \
359         } \
360         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
361         }
362
363 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
364
365 /* Begin user sect3 */
366
367 #define xbt_graph_parse_wrap(n) 1
368 #define YY_SKIP_YYWRAP
369
370 typedef unsigned char YY_CHAR;
371
372 FILE *xbt_graph_parse_in = (FILE *) 0, *xbt_graph_parse_out = (FILE *) 0;
373
374 typedef int yy_state_type;
375
376 extern int xbt_graph_parse_lineno;
377
378 int xbt_graph_parse_lineno = 1;
379
380 extern char *xbt_graph_parse_text;
381 #define yytext_ptr xbt_graph_parse_text
382
383 static yy_state_type yy_get_previous_state (void );
384 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
385 static int yy_get_next_buffer (void );
386 static void yy_fatal_error (yyconst char msg[]  );
387
388 /* Done after the current pattern has been matched and before the
389  * corresponding action - sets up xbt_graph_parse_text.
390  */
391 #define YY_DO_BEFORE_ACTION \
392         (yytext_ptr) = yy_bp; \
393         xbt_graph_parse_leng = (size_t) (yy_cp - yy_bp); \
394         (yy_hold_char) = *yy_cp; \
395         *yy_cp = '\0'; \
396         (yy_c_buf_p) = yy_cp;
397
398 #define YY_NUM_RULES 92
399 #define YY_END_OF_BUFFER 93
400 /* This struct is not used in this scanner,
401    but its presence is necessary. */
402 struct yy_trans_info
403         {
404         flex_int32_t yy_verify;
405         flex_int32_t yy_nxt;
406         };
407 static yyconst flex_int16_t yy_accept[564] =
408     {   0,
409         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
410         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
411         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
412         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
413         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
414        93,   91,   17,   10,   10,   17,   17,   71,   10,   71,
415         5,    6,    5,    8,    9,    8,   87,   79,   80,   88,
416        85,   88,   86,   90,   79,   80,   90,   91,   26,   10,
417        26,   26,   26,   24,   26,   30,   10,   30,   30,   91,
418        91,   30,   91,   45,   10,   45,   45,   45,   43,   45,
419
420        45,   45,   45,   49,   10,   49,   91,   66,   10,   66,
421        66,   66,   64,   66,   66,   66,   66,   66,   70,   10,
422        70,   88,   87,   10,    0,    2,    2,    0,    4,    7,
423        82,   81,    0,    0,    0,    0,    0,    0,    0,   25,
424        27,   27,    0,    0,    0,    0,    0,    0,   44,   46,
425        46,   46,   46,   46,    0,   65,   67,   67,   67,   67,
426        67,   67,   67,    0,    0,    0,    0,    0,    0,    0,
427         3,    0,    0,    0,    0,    0,    0,    0,   89,    0,
428        27,    0,    0,    0,    0,    0,    0,    0,   46,   46,
429        46,   46,    0,    0,   67,   67,   67,   67,   67,   67,
430
431         0,    0,    0,   84,    0,   16,    1,    0,    0,   77,
432         0,    0,    0,   74,   73,    0,    0,   27,    0,    0,
433        29,    0,    0,    0,    0,    0,    0,   46,   46,   46,
434        46,    0,    0,   48,    0,   67,   67,   67,   67,   67,
435        67,    0,    0,   69,    0,    0,    0,    0,   78,   72,
436         0,    0,    0,   27,    0,   51,    0,   32,   31,   50,
437         0,    0,   46,    0,    0,   46,    0,    0,    0,   67,
438        67,    0,    0,   67,   67,    0,    0,    0,    0,    0,
439        12,    0,   75,   76,   19,   27,    0,   51,   18,   32,
440        31,   50,    0,   38,   37,    0,    0,    0,   36,   35,
441
442        46,    0,    0,   63,   62,    0,    0,   67,    0,   55,
443        54,   67,   67,    0,    0,    0,    0,    0,   11,   19,
444        27,    0,   18,    0,   34,   33,   46,    0,   47,    0,
445        53,   52,    0,    0,    0,    0,    0,    0,    0,   68,
446         0,    0,    0,    0,   27,    0,   28,   46,    0,   61,
447        60,    0,   57,   56,    0,   59,   58,    0,    0,    0,
448         0,   27,   46,   83,    0,    0,    0,   27,   46,   46,
449         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
450         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
451        40,   39,    0,   42,   41,    0,    0,    0,    0,    0,
452
453         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
454         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
455         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
456         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
457         0,    0,    0,   12,    0,   12,    0,    0,   21,    0,
458        20,    0,    0,    0,    0,    0,    0,    0,   23,   22,
459         0,    0,    0,    0,    0,    0,    0,   11,    0,    0,
460         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
461         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
462         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
463
464         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
465         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
466         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
467         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
468         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
469         0,    0,    0,    0,    0,    0,   13,    0,    0,   14,
470         0,   15,    0
471     } ;
472
473 static yyconst flex_int32_t yy_ec[256] =
474     {   0,
475         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
476         1,    2,    4,    1,    1,    1,    1,    1,    1,    1,
477         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
478         1,    2,    5,    6,    7,    1,    1,    8,    9,    1,
479         1,    1,    1,    1,   10,   11,   12,   13,   13,   13,
480        13,   13,   13,   13,   13,   13,   13,   14,   15,   16,
481        17,   18,   19,    1,   20,   21,   22,   23,   24,   21,
482        14,   14,   14,   14,   14,   14,   25,   14,   26,   27,
483        14,   14,   28,   29,   14,   14,   14,   14,   30,   14,
484        31,    1,   32,    1,   33,    1,   34,   35,   36,   37,
485
486        38,   39,   40,   41,   42,   14,   14,   43,   44,   45,
487        46,   47,   48,   49,   50,   51,   52,   53,   14,   54,
488        55,   14,    1,    1,    1,    1,    1,    1,    1,    1,
489         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
490         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
491         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
492         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
493         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
494         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
495         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
496
497         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
498         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
499         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
500         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
501         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
502         1,    1,    1,    1,    1
503     } ;
504
505 static yyconst flex_int32_t yy_meta[56] =
506     {   0,
507         1,    2,    2,    2,    1,    1,    1,    1,    1,    3,
508         3,    1,    4,    5,    1,    1,    1,    6,    1,    7,
509         7,    7,    7,    7,    5,    5,    5,    5,    5,    5,
510         1,    1,    5,    7,    7,    7,    7,    7,    7,    5,
511         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
512         5,    5,    5,    5,    5
513     } ;
514
515 static yyconst flex_int16_t yy_base[594] =
516     {   0,
517         0,    0,    0,    3,    6,    9,   24,   27,   11,   14,
518        15,   17,   29,   38,   45,   52,   59,   61,   67,   70,
519        93,  135,   73,   76,  111,  114,  117,  153,  156,  159,
520       176,  179,  182,  185,  200,  203,  206,  209,  225,    0,
521       279,  282,  285,  288,  304,    0,  358,  361,  363,  365,
522      1585, 1586, 1586,  380,  383,   47,   62, 1586,  386,  171,
523      1586, 1586, 1574, 1586, 1586, 1565, 1586, 1578, 1578,  365,
524      1586, 1586, 1586, 1586, 1576, 1576, 1546,  375, 1586,  389,
525      1559,    0,  195, 1586, 1526, 1586,  398,  391,  399,  402,
526       411,  414,  393, 1586,  420, 1557,    0,  401, 1586, 1540,
527
528      1539, 1538, 1525, 1586,  458,  422,  427, 1586,  464, 1552,
529         0,  409, 1586, 1535,    1, 1534, 1521, 1532, 1586,  467,
530       438, 1560, 1532,  470,   34, 1509, 1586, 1552, 1543, 1586,
531      1586, 1586,   69,   40, 1509, 1508, 1506, 1539, 1507, 1586,
532         0, 1532, 1514, 1516, 1503, 1505, 1504, 1512, 1586,    0,
533      1497, 1512, 1502, 1495, 1499, 1586,    0, 1492, 1507, 1496,
534      1496, 1487, 1489, 1499, 1505, 1517, 1516, 1523,  108, 1488,
535      1586,   75,    0, 1484, 1484, 1514, 1513, 1481, 1586, 1492,
536      1483,  473,  476, 1484, 1489, 1485, 1484, 1480, 1485, 1480,
537      1479, 1474,  479,  482, 1481, 1476, 1473, 1474, 1462, 1470,
538
539       485,  502, 1487, 1586, 1490, 1586, 1586,  110, 1464, 1586,
540      1491, 1490, 1454, 1586, 1586, 1452, 1455, 1452,  505,  508,
541      1586,  511, 1462, 1452, 1460, 1459, 1458,  514, 1452,  530,
542      1443,  533,  538, 1586,  546,  550, 1450, 1373,  555, 1387,
543      1375,  558,  566, 1586,  571, 1387,  435,  575, 1586, 1586,
544      1392, 1389, 1356, 1354,  578,  583, 1346,  588,  595,  598,
545       601,  604,  612,  617,  624, 1263,  620,  633,  637,  645,
546      1263,  649,  661, 1264, 1250,  653, 1280,  472, 1280,  657,
547      1586, 1279, 1586, 1586,  670, 1260,  674,  677,  680,  683,
548       686,  694,  697, 1586, 1586,  705,  710,  721, 1586, 1586,
549
550      1248,  729,  732, 1586, 1586,  740,  746,  756,  759, 1586,
551      1586,  767,  772,  775, 1264,   32,  104,  153, 1586,  778,
552      1226,  783,  788,  793, 1586, 1586, 1230,  801, 1586,  804,
553      1586, 1586,  812,  818,  828,  831,  839,  844,  855, 1586,
554      1234,  146,  179,  147, 1212,  858, 1586, 1215,  861, 1586,
555      1586,  875, 1586, 1586,  883, 1586, 1586, 1111,  891,  175,
556       445, 1066,  119, 1586,  894,  181,   89,  897,  900,  903,
557       501,  360,  399,  480,  475,  919,  922,  938,  941,  949,
558       954,  506,  509,  526,  599,  624,  965,  654,  678,  973,
559      1586, 1586,  981, 1586, 1586,  417,  176,  594,  548,  989,
560
561      1058, 1003, 1016,  937,  992,  407,  995,  998, 1001, 1018,
562       930,  918,  922,  910, 1026, 1029, 1035, 1038, 1055, 1063,
563      1081, 1113,  819,  790,  733,  616,  710, 1073,  721, 1131,
564       748,  284, 1149, 1181,  557,  565,  458,  449,  537,  770,
565       676,  805,  278,  369,  285,  291, 1076,  293, 1586,  211,
566      1586,  708,  693,  727,  162,  110,   76, 1105, 1586, 1586,
567       352,  735,  794,    5,  199,  820,  474, 1586, 1144,  850,
568      1173, 1199, 1207, 1212,  591,  754, 1220,  799,  831,  749,
569       833,  834,  848,  862,  897,  684,  791,  900,  912,  895,
570       901,  483,  808,  920,  930,  836,  890,  627,  892,  941,
571
572       962,  971,  993,  818,  873, 1005, 1007,  954,  960,  702,
573       872,  963, 1008, 1027, 1092, 1017, 1025, 1151, 1160, 1031,
574      1084, 1093, 1152, 1176, 1188, 1161, 1209, 1033, 1087, 1217,
575      1221, 1123, 1155, 1088, 1108, 1215, 1216, 1120, 1156, 1218,
576      1219, 1222, 1223, 1224, 1225, 1239, 1240, 1226, 1228, 1241,
577      1242, 1264, 1258, 1260, 1268, 1277, 1586, 1281, 1285, 1586,
578      1288, 1586, 1586, 1306, 1313, 1320, 1327, 1334, 1341, 1348,
579      1355, 1362, 1369, 1376, 1381, 1386, 1391, 1398, 1401, 1404,
580      1407, 1414, 1418, 1424, 1430, 1436, 1443, 1450, 1457, 1464,
581      1471, 1478, 1485
582
583     } ;
584
585 static yyconst flex_int16_t yy_def[594] =
586     {   0,
587       564,  564,  565,  565,  565,  565,  566,  566,  567,  567,
588       568,  568,  569,  569,  569,  569,  570,  570,  564,  564,
589       571,  571,  572,  572,  572,  572,  564,  564,  572,  572,
590       564,  564,  572,  572,  572,  572,  564,  564,  563,   39,
591       573,  573,  564,  564,  563,   45,  574,  574,  569,  569,
592       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
593       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
594       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
595       563,  575,  563,  563,  575,  563,  563,  563,  563,  563,
596       563,  563,  563,  563,  563,  563,  576,  563,  563,  576,
597
598       576,  576,  576,  563,  563,  563,  563,  563,  563,  563,
599       577,  563,  563,  577,  577,  577,  577,  577,  563,  563,
600       563,  563,  563,  563,  578,  563,  563,  563,  563,  563,
601       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
602       575,  575,  579,  563,  563,  563,  563,  563,  563,  576,
603       576,  576,  576,  576,  580,  563,  577,  577,  577,  577,
604       577,  577,  577,  581,  563,  563,  582,  563,  582,  563,
605       563,  563,  583,  563,  563,  563,  563,  563,  563,  563,
606       575,  584,  584,  563,  563,  563,  563,  563,  576,  576,
607       576,  576,  585,  585,  577,  577,  577,  577,  577,  577,
608
609       586,  586,  563,  563,  582,  563,  563,  582,  563,  563,
610       583,  563,  563,  563,  563,  563,  563,  575,  563,  584,
611       563,  584,  563,  563,  563,  563,  563,  576,  576,  576,
612       576,  563,  585,  563,  585,  577,  577,  577,  577,  577,
613       577,  563,  586,  563,  586,  563,  582,  587,  563,  563,
614       563,  563,  563,  575,  584,  563,  563,  563,  563,  563,
615       563,  563,  576,  563,  563,  576,  585,  563,  563,  577,
616       577,  563,  563,  577,  577,  586,  563,  582,  587,  587,
617       563,  587,  563,  563,  563,  575,  584,  563,  563,  563,
618       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
619
620       576,  585,  563,  563,  563,  563,  563,  577,  563,  563,
621       563,  577,  577,  586,  563,  582,  587,  587,  563,  563,
622       575,  584,  563,  563,  563,  563,  576,  563,  563,  563,
623       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
624       563,  582,  587,  587,  575,  563,  563,  576,  563,  563,
625       563,  563,  563,  563,  563,  563,  563,  563,  582,  587,
626       587,  575,  576,  563,  582,  587,  587,  575,  576,  576,
627       582,  582,  582,  587,  587,  563,  563,  563,  563,  563,
628       563,  582,  582,  582,  587,  587,  563,  563,  563,  563,
629       563,  563,  563,  563,  563,  582,  582,  582,  587,  587,
630
631       563,  563,  563,  563,  582,  582,  582,  587,  587,  587,
632       563,  563,  563,  563,  582,  582,  582,  587,  587,  587,
633       588,  589,  563,  563,  563,  563,  582,  582,  582,  587,
634       590,  591,  588,  589,  563,  563,  563,  563,  582,  582,
635       582,  590,  587,  592,  591,  593,  587,  563,  563,  563,
636       563,  582,  582,  582,  592,  563,  593,  587,  563,  563,
637       582,  582,  582,  563,  582,  582,  582,  563,  582,  582,
638       582,  582,  582,  582,  582,  582,  582,  582,  582,  582,
639       582,  582,  582,  582,  582,  582,  582,  582,  582,  582,
640       582,  582,  582,  582,  582,  582,  582,  582,  582,  582,
641
642       582,  582,  582,  582,  582,  582,  582,  582,  582,  582,
643       582,  582,  582,  582,  582,  582,  582,  582,  582,  582,
644       582,  582,  582,  582,  582,  582,  582,  582,  582,  582,
645       582,  582,  582,  582,  582,  582,  582,  582,  582,  582,
646       582,  582,  582,  582,  582,  582,  582,  582,  582,  582,
647       582,  582,  582,  582,  582,  582,  563,  582,  582,  563,
648       582,  563,    0,  563,  563,  563,  563,  563,  563,  563,
649       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
650       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
651       563,  563,  563
652
653     } ;
654
655 static yyconst flex_int16_t yy_nxt[1642] =
656     {   0,
657       563,   54,   55,   54,   54,   55,   54,   54,   55,   54,
658        54,   55,   54,   62,  563,   56,   62,   65,   56,   65,
659        63,   57,  468,   63,   57,   59,   55,   59,   59,   55,
660        59,   68,   69,   66,  159,   66,   70,   71,  160,   60,
661        68,   69,   60,  168,   72,   70,   71,   68,   69,  206,
662        73,  125,   70,   72,   68,   69,  169,   73,  342,   70,
663        72,   75,   76,   75,   76,  126,  125,   72,   55,   55,
664        55,   55,   55,   55,   87,   55,   87,   87,   55,   87,
665       127,  172,   78,  174,  456,   78,  175,  172,   88,  210,
666        77,   88,   77,   79,   80,   55,   80,   79,   79,   79,
667
668        79,   79,   79,   79,   81,   79,  281,   79,   83,   79,
669        84,   79,   87,   55,   87,   87,   55,   87,   55,   55,
670        55,  281,  173,   79,   79,  206,   89,  206,  464,   89,
671       375,  247,   90,  208,   85,   79,   80,   55,   80,   79,
672        79,   79,   79,   79,   79,   79,   81,   79,  343,   79,
673        83,   79,   84,   79,   55,   55,   55,   87,   55,   87,
674        87,   55,   87,  206,  281,   79,   79,  456,   90,  359,
675       281,   88,  369,  370,   88,  128,   85,   55,   55,   55,
676        55,   55,   55,   87,   55,   87,   87,   55,   87,  127,
677       344,   91,  281,  206,   91,  361,  281,   89,  281,  128,
678
679        89,   87,   55,   87,   87,   55,   87,   55,   55,   55,
680        55,   55,   55,  127,  360,   92,  206,  374,   92,  460,
681       366,   93,  406,  469,   93,   94,   95,   55,   95,   94,
682        94,   94,   94,   94,   94,   94,   96,   94,   97,   94,
683        98,   94,   99,   94,   97,   97,   97,   97,   97,   97,
684        97,   97,   97,   97,   97,   94,   94,   97,   97,   97,
685        97,  100,   97,   97,   97,   97,   97,  101,   97,  102,
686        97,  103,   97,   97,   97,   97,   97,   97,   97,   97,
687       105,   55,  105,  105,   55,  105,   55,   55,   55,   55,
688        55,   55,  443,  443,  106,  281,  282,  106,  459,  456,
689
690       107,  446,  446,  107,  108,  109,   55,  109,  108,  108,
691       108,  108,  108,  108,  108,  110,  108,  111,  108,  112,
692       108,  113,  108,  111,  111,  111,  111,  111,  111,  111,
693       111,  111,  111,  111,  108,  108,  111,  111,  111,  111,
694       114,  111,  111,  111,  111,  111,  115,  111,  116,  111,
695       111,  111,  111,  117,  118,  111,  111,  111,  111,  120,
696        55,  120,  120,   55,  120,   68,   69,   68,   69,  206,
697        70,  133,   70,  121,  456,  465,  121,  206,  122,  128,
698       122,  124,  124,  124,  124,  124,  124,  124,  124,  124,
699       124,  124,  124,  127,  123,  128,  123,  128,  134,  124,
700
701       124,  124,  143,  128,  135,  128,  128,  136,  383,  127,
702       143,  127,  137,  128,  139,  128,  206,  127,  128,  127,
703       127,  124,  124,  124,  206,  143,  128,  127,  144,  127,
704       145,  128,  127,  155,  206,  146,  144,  146,  145,  148,
705       127,  145,  128,  147,  384,  127,  146,  416,  144,  164,
706       145,  148,  206,  145,  405,  147,  127,  451,  147,  124,
707       124,  124,  281,  278,  144,  124,  124,  124,  124,  124,
708       124,  124,  124,  124,  219,  219,  219,  219,  219,  219,
709       232,  232,  232,  232,  232,  232,  242,  242,  242,  206,
710       221,  206,  281,  221,  367,  450,  234,  281,  471,  234,
711
712       206,  316,  244,  242,  242,  242,  219,  219,  219,  219,
713       219,  219,  219,  219,  219,  261,  261,  261,  206,  244,
714       386,  385,  221,  206,  222,  221,  206,  235,  221,  498,
715       262,  264,  264,  264,  232,  232,  232,  382,  245,  232,
716       232,  232,  397,  206,  255,  396,  265,  232,  232,  232,
717       234,  268,  268,  268,  206,  234,  272,  272,  272,  242,
718       242,  242,  398,  234,  452,  281,  269,  242,  242,  242,
719       449,  273,  242,  242,  242,  244,  280,  280,  280,  219,
720       219,  219,  267,  244,  288,  288,  288,  408,  244,  290,
721       290,  290,  281,  282,  448,  221,  291,  291,  291,  292,
722
723       292,  292,  261,  261,  261,  293,  293,  293,  206,  294,
724       276,  206,  295,  296,  296,  296,  281,  262,  264,  264,
725       264,  232,  232,  232,  287,  298,  298,  298,  297,  299,
726       480,  407,  300,  265,  268,  268,  268,  234,  303,  303,
727       303,  281,  304,  399,  206,  305,  306,  306,  306,  269,
728       272,  272,  272,  438,  242,  242,  242,  302,  280,  280,
729       280,  307,  309,  309,  309,  273,  310,  504,  400,  311,
730       244,  320,  320,  320,  281,  219,  219,  219,  288,  288,
731       288,  323,  323,  323,  290,  290,  290,  291,  291,  291,
732       314,  221,  401,  206,  317,  292,  292,  292,  293,  293,
733
734       293,  206,  294,  454,  402,  295,  296,  296,  296,  318,
735       206,  324,  324,  324,  322,  325,  403,  492,  326,  206,
736       462,  297,  298,  298,  298,  206,  299,  206,  404,  300,
737       328,  328,  328,  303,  303,  303,  461,  304,  206,  439,
738       305,  306,  306,  306,  206,  516,  329,  330,  330,  330,
739       441,  331,  206,  443,  332,  463,  307,  333,  333,  333,
740       309,  309,  309,  466,  310,  444,  206,  311,  335,  335,
741       335,  206,  334,  337,  337,  337,  339,  339,  339,  320,
742       320,  320,  437,  336,  346,  346,  346,  206,  338,  323,
743       323,  323,  340,  481,  324,  324,  324,  486,  325,  453,
744
745       347,  326,  328,  328,  328,  330,  330,  330,  206,  331,
746       443,  206,  332,  333,  333,  333,  206,  467,  329,  349,
747       349,  349,  444,  350,  493,  206,  351,  436,  334,  335,
748       335,  335,  352,  352,  352,  206,  353,  206,  484,  354,
749       337,  337,  337,  470,  336,  355,  355,  355,  206,  356,
750       206,  206,  357,  206,  499,  338,  339,  339,  339,  346,
751       346,  346,  349,  349,  349,  206,  350,  206,  435,  351,
752       485,  510,  340,  488,  473,  347,  352,  352,  352,  206,
753       353,  487,  502,  354,  355,  355,  355,  489,  356,  206,
754       206,  357,  365,  365,  365,  365,  365,  365,  376,  376,
755
756       376,  378,  378,  378,  380,  380,  380,  206,  206,  206,
757       490,  206,  206,  377,  206,  517,  379,  206,  206,  381,
758       376,  376,  376,  387,  387,  387,  511,  388,  496,  206,
759       389,  371,  505,  372,  497,  377,  503,  206,  373,  378,
760       378,  378,  390,  390,  390,  491,  391,  206,  494,  392,
761       380,  380,  380,  500,  379,  393,  393,  393,  206,  394,
762       495,  426,  395,  501,  425,  381,  387,  387,  387,  424,
763       388,  206,  423,  389,  390,  390,  390,  206,  391,  206,
764       206,  392,  393,  393,  393,  414,  394,  506,  206,  395,
765       409,  409,  409,  415,  415,  415,  417,  417,  417,  418,
766
767       418,  418,  409,  409,  409,  410,  281,  514,  507,  206,
768       206,  508,  206,  515,  419,  281,  518,  410,  281,  420,
769       420,  420,  206,  421,  206,  206,  422,  415,  415,  415,
770       428,  428,  428,  509,  206,  281,  417,  417,  417,  418,
771       418,  418,  206,  206,  206,  512,  206,  513,  206,  413,
772       206,  412,  206,  427,  419,  281,  430,  430,  430,  522,
773       431,  519,  429,  432,  420,  420,  420,  523,  421,  534,
774       520,  422,  281,  526,  428,  428,  428,  458,  458,  458,
775       281,  279,  279,  279,  279,  279,  279,  279,  279,  279,
776       206,  411,  279,  281,  282,  279,  279,  279,  281,  279,
777
778       440,  206,  368,  528,  206,  206,  458,  458,  458,  206,
779       206,  279,  279,  279,  279,  279,  279,  279,  279,  279,
780       279,  279,  281,  535,  279,  206,  527,  279,  279,  279,
781       281,  279,  430,  430,  430,  521,  431,  206,  540,  432,
782       206,  364,  317,  279,  279,  472,  472,  472,  281,  279,
783       279,  279,  279,  279,  447,  279,  279,  279,  541,  538,
784       279,  206,  529,  279,  279,  279,  281,  279,  206,  206,
785       544,  532,  206,  206,  474,  474,  474,  206,  206,  279,
786       279,  279,  279,  279,  279,  279,  279,  279,  279,  447,
787       206,  539,  279,  206,  524,  279,  279,  279,  281,  279,
788
789       472,  472,  472,  525,  475,  206,  545,  476,  477,  477,
790       477,  279,  279,  474,  474,  474,  206,  478,  530,  533,
791       479,  477,  477,  477,  206,  482,  206,  536,  483,  206,
792       531,  537,  206,  206,  206,  206,  206,  206,  206,  206,
793       206,  206,  206,  206,  552,  206,  555,  363,  552,  362,
794       555,  542,  543,  358,  546,  547,  206,  206,  206,  206,
795       550,  551,  553,  558,  554,  556,  556,  556,  558,  559,
796       559,  559,  548,  549,  348,  206,  345,  206,  556,  556,
797       556,  557,  561,  561,  561,  560,  559,  559,  559,  561,
798       561,  561,  341,  327,  557,  321,  319,  281,  562,  315,
799
800       313,  312,  560,  308,  301,  562,   52,   52,   52,   52,
801        52,   52,   52,   53,   53,   53,   53,   53,   53,   53,
802        58,   58,   58,   58,   58,   58,   58,   61,   61,   61,
803        61,   61,   61,   61,   64,   64,   64,   64,   64,   64,
804        64,   67,   67,   67,   67,   67,   67,   67,   74,   74,
805        74,   74,   74,   74,   74,   82,   82,   82,   82,   82,
806        82,   82,   86,   86,   86,   86,   86,   86,   86,  104,
807       104,  104,  104,  104,  104,  104,  119,  119,  119,  119,
808       119,  119,  119,  141,  141,  141,  289,  141,  150,  150,
809       150,  286,  150,  157,  157,  157,  285,  157,  167,  167,
810
811       167,  167,  167,  284,  167,  182,  283,  182,  193,  277,
812       193,  201,  275,  201,  205,  205,  205,  205,  205,  205,
813       205,  211,  274,  271,  211,  220,  220,  220,  220,  220,
814       220,  233,  233,  233,  233,  233,  233,  243,  243,  243,
815       243,  243,  243,  279,  279,  279,  279,  279,  279,  279,
816       433,  433,  433,  433,  433,  433,  433,  434,  434,  434,
817       434,  434,  434,  434,  442,  442,  442,  442,  442,  442,
818       442,  445,  445,  445,  445,  445,  445,  445,  455,  455,
819       455,  455,  455,  455,  455,  457,  457,  457,  457,  457,
820       457,  457,  270,  266,  263,  260,  259,  258,  257,  256,
821
822       254,  253,  252,  251,  250,  249,  248,  206,  246,  241,
823       240,  239,  238,  237,  236,  231,  230,  229,  228,  227,
824       226,  225,  224,  223,  218,  217,  216,  215,  214,  213,
825       212,  209,  207,  206,  204,  203,  202,  200,  199,  198,
826       197,  196,  195,  194,  192,  191,  190,  189,  188,  187,
827       186,  185,  184,  183,  181,  180,  179,  178,  177,  176,
828       171,  168,  170,  166,  165,  163,  162,  161,  158,  156,
829       154,  153,  152,  151,  149,  142,  140,  138,  132,  131,
830       132,  131,  130,  129,  563,   51,  563,  563,  563,  563,
831       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
832
833       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
834       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
835       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
836       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
837       563
838     } ;
839
840 static yyconst flex_int16_t yy_chk[1642] =
841     {   0,
842         0,    3,    3,    3,    4,    4,    4,    5,    5,    5,
843         6,    6,    6,    9,    0,    3,   10,   11,    4,   12,
844         9,    5,  464,   10,    6,    7,    7,    7,    8,    8,
845         8,   13,   13,   11,  115,   12,   13,   13,  115,    7,
846        14,   14,    8,  125,   13,   14,   14,   15,   15,  316,
847        15,   56,   15,   14,   16,   16,  125,   16,  316,   16,
848        15,   17,   17,   18,   18,   56,   57,   16,   19,   19,
849        19,   20,   20,   20,   23,   23,   23,   24,   24,   24,
850        57,  133,   19,  134,  457,   20,  134,  172,   23,  172,
851        17,   24,   18,   21,   21,   21,   21,   21,   21,   21,
852
853        21,   21,   21,   21,   21,   21,  367,   21,   21,   21,
854        21,   21,   25,   25,   25,   26,   26,   26,   27,   27,
855        27,  317,  133,   21,   21,  169,   25,  208,  456,   26,
856       367,  208,   27,  169,   21,   22,   22,   22,   22,   22,
857        22,   22,   22,   22,   22,   22,   22,   22,  317,   22,
858        22,   22,   22,   22,   28,   28,   28,   29,   29,   29,
859        30,   30,   30,  342,  344,   22,   22,  455,   28,  342,
860       318,   29,  363,  363,   30,   60,   22,   31,   31,   31,
861        32,   32,   32,   33,   33,   33,   34,   34,   34,   60,
862       318,   31,  360,  397,   32,  344,  343,   33,  366,   83,
863
864        34,   35,   35,   35,   36,   36,   36,   37,   37,   37,
865        38,   38,   38,   83,  343,   35,  465,  366,   36,  450,
866       360,   37,  397,  465,   38,   39,   39,   39,   39,   39,
867        39,   39,   39,   39,   39,   39,   39,   39,   39,   39,
868        39,   39,   39,   39,   39,   39,   39,   39,   39,   39,
869        39,   39,   39,   39,   39,   39,   39,   39,   39,   39,
870        39,   39,   39,   39,   39,   39,   39,   39,   39,   39,
871        39,   39,   39,   39,   39,   39,   39,   39,   39,   39,
872        41,   41,   41,   42,   42,   42,   43,   43,   43,   44,
873        44,   44,  432,  445,   41,  443,  443,   42,  448,  446,
874
875        43,  432,  445,   44,   45,   45,   45,   45,   45,   45,
876        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
877        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
878        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
879        45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
880        45,   45,   45,   45,   45,   45,   45,   45,   45,   47,
881        47,   47,   48,   48,   48,   49,   49,   50,   50,  461,
882        49,   70,   50,   47,  444,  461,   48,  372,   49,   78,
883        50,   54,   54,   54,   55,   55,   55,   59,   59,   59,
884        80,   80,   80,   78,   49,   88,   50,   93,   70,   87,
885
886        87,   87,   88,   89,   70,   98,   90,   70,  372,   88,
887        89,   93,   70,  112,   78,   91,  373,   89,   92,   98,
888        90,   95,   95,   95,  406,   92,  106,  112,   88,   91,
889        88,  107,   92,  106,  396,   88,   89,   93,   89,   90,
890       106,   90,  121,   89,  373,  107,   90,  406,   91,  121,
891        91,   92,  247,   92,  396,   91,  121,  438,   92,  105,
892       105,  105,  361,  247,  107,  109,  109,  109,  120,  120,
893       120,  124,  124,  124,  182,  182,  182,  183,  183,  183,
894       193,  193,  193,  194,  194,  194,  201,  201,  201,  278,
895       182,  467,  375,  183,  361,  437,  193,  374,  467,  194,
896
897       492,  278,  201,  202,  202,  202,  219,  219,  219,  220,
898       220,  220,  222,  222,  222,  228,  228,  228,  371,  202,
899       375,  374,  219,  382,  183,  220,  383,  194,  222,  492,
900       228,  230,  230,  230,  232,  232,  232,  371,  202,  233,
901       233,  233,  383,  384,  222,  382,  230,  235,  235,  235,
902       232,  236,  236,  236,  439,  233,  239,  239,  239,  242,
903       242,  242,  384,  235,  439,  399,  236,  243,  243,  243,
904       436,  239,  245,  245,  245,  242,  248,  248,  248,  255,
905       255,  255,  235,  243,  256,  256,  256,  399,  245,  258,
906       258,  258,  248,  248,  435,  255,  259,  259,  259,  260,
907
908       260,  260,  261,  261,  261,  262,  262,  262,  475,  262,
909       245,  398,  262,  263,  263,  263,  385,  261,  264,  264,
910       264,  267,  267,  267,  255,  265,  265,  265,  263,  265,
911       475,  398,  265,  264,  268,  268,  268,  267,  269,  269,
912       269,  386,  269,  385,  498,  269,  270,  270,  270,  268,
913       272,  272,  272,  426,  276,  276,  276,  267,  280,  280,
914       280,  270,  273,  273,  273,  272,  273,  498,  386,  273,
915       276,  285,  285,  285,  280,  287,  287,  287,  288,  288,
916       288,  289,  289,  289,  290,  290,  290,  291,  291,  291,
917       276,  287,  388,  441,  280,  292,  292,  292,  293,  293,
918
919       293,  486,  293,  441,  388,  293,  296,  296,  296,  280,
920       453,  297,  297,  297,  287,  297,  389,  486,  297,  510,
921       453,  296,  298,  298,  298,  452,  298,  427,  389,  298,
922       302,  302,  302,  303,  303,  303,  452,  303,  429,  427,
923       303,  306,  306,  306,  454,  510,  302,  307,  307,  307,
924       429,  307,  462,  431,  307,  454,  306,  308,  308,  308,
925       309,  309,  309,  462,  309,  431,  480,  309,  312,  312,
926       312,  476,  308,  313,  313,  313,  314,  314,  314,  320,
927       320,  320,  425,  312,  322,  322,  322,  440,  313,  323,
928       323,  323,  314,  476,  324,  324,  324,  480,  324,  440,
929
930       322,  324,  328,  328,  328,  330,  330,  330,  487,  330,
931       442,  463,  330,  333,  333,  333,  478,  463,  328,  334,
932       334,  334,  442,  334,  487,  493,  334,  424,  333,  335,
933       335,  335,  336,  336,  336,  504,  336,  466,  478,  336,
934       337,  337,  337,  466,  335,  338,  338,  338,  479,  338,
935       481,  482,  338,  496,  493,  337,  339,  339,  339,  346,
936       346,  346,  349,  349,  349,  483,  349,  470,  423,  349,
937       479,  504,  339,  482,  470,  346,  352,  352,  352,  484,
938       352,  481,  496,  352,  355,  355,  355,  483,  355,  511,
939       505,  355,  359,  359,  359,  365,  365,  365,  368,  368,
940
941       368,  369,  369,  369,  370,  370,  370,  497,  359,  499,
942       484,  365,  490,  368,  485,  511,  369,  488,  491,  370,
943       376,  376,  376,  377,  377,  377,  505,  377,  490,  489,
944       377,  365,  499,  365,  491,  376,  497,  494,  365,  378,
945       378,  378,  379,  379,  379,  485,  379,  495,  488,  379,
946       380,  380,  380,  494,  378,  381,  381,  381,  500,  381,
947       489,  414,  381,  495,  413,  380,  387,  387,  387,  412,
948       387,  508,  411,  387,  390,  390,  390,  509,  390,  501,
949       512,  390,  393,  393,  393,  404,  393,  500,  502,  393,
950       400,  400,  400,  405,  405,  405,  407,  407,  407,  408,
951
952       408,  408,  409,  409,  409,  400,  400,  508,  501,  405,
953       503,  502,  407,  509,  408,  408,  512,  409,  409,  410,
954       410,  410,  506,  410,  507,  513,  410,  415,  415,  415,
955       416,  416,  416,  503,  516,  410,  417,  417,  417,  418,
956       418,  418,  517,  415,  514,  506,  416,  507,  520,  403,
957       528,  402,  417,  415,  418,  418,  419,  419,  419,  516,
958       419,  513,  417,  419,  420,  420,  420,  517,  420,  528,
959       514,  420,  419,  520,  428,  428,  428,  447,  447,  447,
960       420,  421,  421,  421,  421,  421,  421,  421,  421,  421,
961       428,  401,  421,  447,  447,  421,  421,  421,  421,  421,
962
963       428,  521,  362,  522,  529,  534,  458,  458,  458,  515,
964       522,  421,  421,  422,  422,  422,  422,  422,  422,  422,
965       422,  422,  458,  529,  422,  535,  521,  422,  422,  422,
966       422,  422,  430,  430,  430,  515,  430,  538,  534,  430,
967       532,  358,  458,  422,  422,  469,  469,  469,  430,  433,
968       433,  433,  433,  433,  433,  433,  433,  433,  535,  532,
969       433,  469,  523,  433,  433,  433,  433,  433,  518,  523,
970       538,  526,  533,  539,  471,  471,  471,  519,  526,  433,
971       433,  434,  434,  434,  434,  434,  434,  434,  434,  434,
972       471,  533,  434,  524,  518,  434,  434,  434,  434,  434,
973
974       472,  472,  472,  519,  472,  525,  539,  472,  473,  473,
975       473,  434,  434,  474,  474,  474,  472,  474,  524,  527,
976       474,  477,  477,  477,  473,  477,  527,  530,  477,  474,
977       525,  531,  536,  537,  530,  540,  541,  477,  531,  542,
978       543,  544,  545,  548,  546,  549,  550,  348,  547,  345,
979       551,  536,  537,  341,  540,  541,  546,  547,  550,  551,
980       544,  545,  548,  553,  549,  552,  552,  552,  554,  555,
981       555,  555,  542,  543,  327,  553,  321,  554,  556,  556,
982       556,  552,  558,  558,  558,  555,  559,  559,  559,  561,
983       561,  561,  315,  301,  556,  286,  282,  279,  558,  277,
984
985       275,  274,  559,  271,  266,  561,  564,  564,  564,  564,
986       564,  564,  564,  565,  565,  565,  565,  565,  565,  565,
987       566,  566,  566,  566,  566,  566,  566,  567,  567,  567,
988       567,  567,  567,  567,  568,  568,  568,  568,  568,  568,
989       568,  569,  569,  569,  569,  569,  569,  569,  570,  570,
990       570,  570,  570,  570,  570,  571,  571,  571,  571,  571,
991       571,  571,  572,  572,  572,  572,  572,  572,  572,  573,
992       573,  573,  573,  573,  573,  573,  574,  574,  574,  574,
993       574,  574,  574,  575,  575,  575,  257,  575,  576,  576,
994       576,  254,  576,  577,  577,  577,  253,  577,  578,  578,
995
996       578,  578,  578,  252,  578,  579,  251,  579,  580,  246,
997       580,  581,  241,  581,  582,  582,  582,  582,  582,  582,
998       582,  583,  240,  238,  583,  584,  584,  584,  584,  584,
999       584,  585,  585,  585,  585,  585,  585,  586,  586,  586,
1000       586,  586,  586,  587,  587,  587,  587,  587,  587,  587,
1001       588,  588,  588,  588,  588,  588,  588,  589,  589,  589,
1002       589,  589,  589,  589,  590,  590,  590,  590,  590,  590,
1003       590,  591,  591,  591,  591,  591,  591,  591,  592,  592,
1004       592,  592,  592,  592,  592,  593,  593,  593,  593,  593,
1005       593,  593,  237,  231,  229,  227,  226,  225,  224,  223,
1006
1007       218,  217,  216,  213,  212,  211,  209,  205,  203,  200,
1008       199,  198,  197,  196,  195,  192,  191,  190,  189,  188,
1009       187,  186,  185,  184,  181,  180,  178,  177,  176,  175,
1010       174,  170,  168,  167,  166,  165,  164,  163,  162,  161,
1011       160,  159,  158,  155,  154,  153,  152,  151,  148,  147,
1012       146,  145,  144,  143,  142,  139,  138,  137,  136,  135,
1013       129,  128,  126,  123,  122,  118,  117,  116,  114,  110,
1014       103,  102,  101,  100,   96,   85,   81,   77,   76,   75,
1015        69,   68,   66,   63,   51,  563,  563,  563,  563,  563,
1016       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
1017
1018       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
1019       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
1020       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
1021       563,  563,  563,  563,  563,  563,  563,  563,  563,  563,
1022       563
1023     } ;
1024
1025 /* Table of booleans, true if rule could match eol. */
1026 static yyconst flex_int32_t yy_rule_can_match_eol[93] =
1027     {   0,
1028 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 
1029     1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1030     1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
1031     1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 
1032     1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0,     };
1033
1034 static yy_state_type yy_last_accepting_state;
1035 static char *yy_last_accepting_cpos;
1036
1037 extern int xbt_graph_parse__flex_debug;
1038 int xbt_graph_parse__flex_debug = 0;
1039
1040 /* The intent behind this definition is that it'll catch
1041  * any uses of REJECT which flex missed.
1042  */
1043 #define REJECT reject_used_but_not_detected
1044 #define yymore() yymore_used_but_not_detected
1045 #define YY_MORE_ADJ 0
1046 #define YY_RESTORE_YY_MORE_OFFSET
1047 char *xbt_graph_parse_text;
1048 /* Validating XML processor for xbt/graphxml.dtd.
1049  * Generated 2007/12/19 15:09:56.
1050  *
1051  * This program was generated with the FleXML XML processor generator.
1052  * FleXML is Copyright (C) 1999-2005 Kristoffer Rose.  All rights reserved.
1053  * FleXML is Copyright (C) 2003-2006 Martin Quinson.  All rights reserved.
1054  * (Id: flexml.pl,v 1.63 2007/10/11 14:46:08 mquinson Exp).
1055  * 
1056  * There are two, intertwined parts to this program, part A and part B.
1057  *
1058  * Part A
1059  * ------
1060  * 
1061  * Some parts, here collectively called "Part A", are found in the 
1062  * FleXML package.  They are Copyright (C) 1999-2005 Kristoffer Rose
1063  * and Copyright (C) 2003-2006 Martin Quinson. All rights reserved.
1064  *
1065  * You can redistribute, use, perform, display and/or modify "Part A"
1066  * provided the following two conditions hold:
1067  *
1068  * 1. The program is distributed WITHOUT ANY WARRANTY from the author of
1069  *    FleXML; without even the implied warranty of MERCHANTABILITY or
1070  *    FITNESS FOR A PARTICULAR PURPOSE.
1071  *
1072  * 2. The program distribution conditions do not in any way affect the
1073  *    distribution conditions of the FleXML system used to generate this
1074  *    file or any version of FleXML derived from that system.
1075  *
1076  * Notice that these are explicit rights granted to you for files
1077  * generated by the FleXML system.  For your rights in connection with
1078  * the FleXML system itself please consult the GNU General Public License.
1079  * 
1080  * Part B
1081  * ------
1082  * 
1083  * The other parts, here collectively called "Part B", and which came 
1084  * from the DTD used by FleXML to generate this program, can be 
1085  * distributed (or not, as the case may be) under the terms of whoever
1086  * wrote them, provided these terms respect and obey the two conditions 
1087  * above under the heading "Part A".
1088  *
1089  * The author of and contributors to FleXML specifically disclaim
1090  * any copyright interest in "Part B", unless "Part B" was written 
1091  * by the author of or contributors to FleXML.
1092  * 
1093  */
1094
1095 /* Version strings. */
1096 const char rcs_graphxml_flexml_skeleton[] =
1097  "$" "Id: skel,v 1.40 2007/10/11 09:57:24 mquinson Exp $";
1098 const char rcs_graphxml_flexml[] =
1099  "$" "Id: flexml.pl,v 1.63 2007/10/11 14:46:08 mquinson Exp $";
1100
1101 /* ANSI headers. */
1102 #include <stdlib.h> /* for realloc() -- needed here when using flex 2.5.4 */
1103 #include <stdio.h>
1104 #include <string.h>
1105 #include <assert.h>
1106 #include <stdarg.h>
1107 #include <ctype.h>
1108      
1109 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
1110 # ifndef __STRICT_ANSI__
1111 #  include <io.h>
1112 #  include <process.h>
1113 # endif
1114 #else
1115 # include <unistd.h>
1116 #endif
1117      
1118 #ifndef FLEXML_INDEXSTACKSIZE
1119 #define FLEXML_INDEXSTACKSIZE 1000
1120 #endif
1121
1122 /* Generated definitions. */
1123 #define FLEXML_yylineno
1124 #ifndef FLEXML_BUFFERSTACKSIZE
1125 #define FLEXML_BUFFERSTACKSIZE 1000000
1126 #endif
1127 #define FLEXML_NEED_BUFFERLIT
1128
1129 /* XML processor api. */
1130 /* FleXML-provided data. */
1131 int graphxml_pcdata_ix;
1132 extern char *graphxml_bufferstack;
1133 #define graphxml_pcdata (graphxml_bufferstack + graphxml_pcdata_ix)
1134 AT_graphxml_node_name AX_graphxml_node_name;
1135 #define A_graphxml_node_name (graphxml_bufferstack + AX_graphxml_node_name)
1136 AT_graphxml_edge_source AX_graphxml_edge_source;
1137 #define A_graphxml_edge_source (graphxml_bufferstack + AX_graphxml_edge_source)
1138 AT_graphxml_node_position_y AX_graphxml_node_position_y;
1139 #define A_graphxml_node_position_y (graphxml_bufferstack + AX_graphxml_node_position_y)
1140 AT_graphxml_node_position_x AX_graphxml_node_position_x;
1141 #define A_graphxml_node_position_x (graphxml_bufferstack + AX_graphxml_node_position_x)
1142 AT_graphxml_edge_data AX_graphxml_edge_data;
1143 #define A_graphxml_edge_data (graphxml_bufferstack + AX_graphxml_edge_data)
1144 AT_graphxml_edge_target AX_graphxml_edge_target;
1145 #define A_graphxml_edge_target (graphxml_bufferstack + AX_graphxml_edge_target)
1146 AT_graphxml_graph_isDirected AX_graphxml_graph_isDirected;
1147 #define A_graphxml_graph_isDirected AX_graphxml_graph_isDirected
1148 AT_graphxml_node_label AX_graphxml_node_label;
1149 #define A_graphxml_node_label (graphxml_bufferstack + AX_graphxml_node_label)
1150 AT_graphxml_node_data AX_graphxml_node_data;
1151 #define A_graphxml_node_data (graphxml_bufferstack + AX_graphxml_node_data)
1152 AT_graphxml_edge_label AX_graphxml_edge_label;
1153 #define A_graphxml_edge_label (graphxml_bufferstack + AX_graphxml_edge_label)
1154 AT_graphxml_edge_length AX_graphxml_edge_length;
1155 #define A_graphxml_edge_length (graphxml_bufferstack + AX_graphxml_edge_length)
1156 AT_graphxml_edge_name AX_graphxml_edge_name;
1157 #define A_graphxml_edge_name (graphxml_bufferstack + AX_graphxml_edge_name)
1158
1159 /* XML state. */
1160 #ifdef FLEX_DEBUG
1161 # define ENTER(state)   debug_enter(state,#state)
1162 # define LEAVE          debug_leave()
1163 # define SET(state)     debug_set(state,#state)
1164   static void debug_enter(int, const char*);
1165   static void debug_leave(void);
1166   static void debug_set(int, const char*);
1167 #else
1168 # define ENTER(state)   (yy_push_state(state))
1169 # define LEAVE          (yy_pop_state())
1170 # define SET(state)     BEGIN(state)
1171 #endif
1172
1173 /* Generic actions. */
1174 #define SKIP    /*skip*/
1175 #define SUCCEED        CLEANUP; return 0
1176
1177 #define FAIL    return fail
1178 static int fail(const char*, ...);
1179
1180 enum {flexml_max_err_msg_size = 512};
1181 static char flexml_err_msg[flexml_max_err_msg_size];
1182 const char * graphxml_parse_err_msg()
1183 {
1184     return flexml_err_msg;
1185 }
1186 static void reset_graphxml_parse_err_msg()
1187 {
1188     flexml_err_msg[0] = '\0';
1189 }
1190
1191 /* Cleanup */
1192 static void cleanup(void);
1193 #define CLEANUP  cleanup()
1194
1195 /* Text buffer stack handling. */
1196 char *graphxml_bufferstack = NULL;
1197 static int blimit = FLEXML_BUFFERSTACKSIZE;
1198 static int bnext = 1;
1199
1200 static int *indexstack = NULL;
1201 static int ilimit = FLEXML_INDEXSTACKSIZE;
1202 static int inext = 1;
1203
1204 #define BUFFERSET(P)  (P = bnext)
1205 #define BUFFERPUTC(C) (ck_blimit(), graphxml_bufferstack[bnext++] = (C))
1206 #define BUFFERDONE    (BUFFERPUTC('\0'))
1207
1208 #define BUFFERLITERAL(C, P) graphxml_bufferliteral(C, &(P), xbt_graph_parse_text)
1209
1210 /* after this is called, there are at least 2 slots left in the stack */
1211 static int ck_blimit()
1212 {
1213      if (bnext >= blimit) {
1214          blimit += FLEXML_BUFFERSTACKSIZE + 2;
1215          {
1216              char *temp = (char *) realloc(graphxml_bufferstack, blimit);
1217              assert(temp);
1218              graphxml_bufferstack = temp;
1219          }
1220      }
1221      return 0;
1222 }
1223
1224 /* after this is called, there are at least 2 slots left in the stack */
1225 static int ck_ilimit()
1226 {
1227      if (inext >= ilimit) {
1228          ilimit += FLEXML_INDEXSTACKSIZE + 2;
1229          {
1230              int *temp = (int *) realloc(indexstack, ilimit);
1231              assert(temp);
1232              indexstack = temp;
1233          }
1234      }
1235      return 0;
1236 }
1237
1238 #ifdef FLEXML_NEED_BUFFERLIT
1239 static void graphxml_bufferliteral(char c, int* pp, const char* text)
1240 {
1241   const char *s = (c ? strchr(text,c) : text-1), *e = strrchr(text,c);
1242   assert(s <= e); BUFFERSET(*pp);
1243   while (++s<e) {
1244     if (isspace(*s) && c) { BUFFERPUTC(' '); while (isspace(*s)) ++s; }
1245     else BUFFERPUTC(*s);
1246   }
1247   BUFFERDONE;
1248 }
1249 #endif
1250
1251 static void pushbuffer(int p)
1252 {
1253     ck_ilimit();
1254     indexstack[inext++] = p;
1255     indexstack[inext++] = bnext;    
1256 }
1257
1258 static int popbuffer(void)
1259 {
1260     assert(inext >= 2);
1261     bnext = indexstack[--inext];
1262     return indexstack[--inext];
1263 }
1264
1265 /* General internal entities are `unput' back onto the input stream... */
1266 #define ENTITYTEXT(T) \
1267   { char *s = (T), *e = s+strlen(s);\
1268     while (--e >= s) { unput(*e); }}
1269
1270 /* Flex standard options. */
1271 #define YY_NO_INPUT 1
1272 /* Flex user-requested options. */
1273 /* XML character classes (currently restricted to ASCII). */
1274 /* "Common syntactic structures." */
1275 /* "Names and Tokens." */
1276 /* Miscellaneous. */
1277 /* Parser states (flex `exclusive start conditions'):
1278  *
1279  * PROLOG       the XML prolog of the document before <?xml...>
1280  * DOCTYPE      the XML prolog of the document after <?xml...>
1281  * EPILOG       after the root element
1282  * INCOMMENT    inside an XML comment <!--....-->
1283  * INPI         inside an XML PI <?...?>
1284  * VALUE1       inside a '...'-delimited literal
1285  * VALUE2       inside a "..."-delimited literal
1286  * CDATA        inside a <![CDATA[...] ]> section.
1287  * ROOT_<tag>   expect root element <tag>
1288  * AL_<tag>     inside the attribute list for <tag>
1289  * IN_<tag>     inside a <tag> with element contents (ready for end tag)
1290  * IMPOSSIBLE   dummy to permit disabling rules; must be last
1291  */
1292
1293 /* State names. */
1294 const char* *graphxml_statenames=NULL;
1295
1296 #define INITIAL 0
1297 #define PROLOG 1
1298 #define DOCTYPE 2
1299 #define EPILOG 3
1300 #define INCOMMENT 4
1301 #define INPI 5
1302 #define VALUE1 6
1303 #define VALUE2 7
1304 #define CDATA 8
1305 #define ROOT_graphxml_graph 9
1306 #define AL_graphxml_graph 10
1307 #define S_graphxml_graph 11
1308 #define S_graphxml_graph_1 12
1309 #define S_graphxml_graph_2 13
1310 #define S_graphxml_graph_3 14
1311 #define S_graphxml_graph_4 15
1312 #define S_graphxml_graph_5 16
1313 #define E_graphxml_graph 17
1314 #define ROOT_graphxml_node 18
1315 #define AL_graphxml_node 19
1316 #define E_graphxml_node 20
1317 #define ROOT_graphxml_edge 21
1318 #define AL_graphxml_edge 22
1319 #define E_graphxml_edge 23
1320 #define IMPOSSIBLE 24
1321
1322 #ifndef YY_NO_UNISTD_H
1323 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1324  * down here because we want the user's section 1 to have been scanned first.
1325  * The user has a chance to override it with an option.
1326  */
1327 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
1328 #  ifndef __STRICT_ANSI__
1329 #    include <io.h>
1330 #    include <process.h>
1331 #  endif
1332 #else
1333 #  include <unistd.h>
1334 #endif
1335 #endif
1336
1337 #ifndef YY_EXTRA_TYPE
1338 #define YY_EXTRA_TYPE void *
1339 #endif
1340
1341 static int yy_init_globals (void );
1342
1343 /* Accessor methods to globals.
1344    These are made visible to non-reentrant scanners for convenience. */
1345
1346 int xbt_graph_parse_lex_destroy (void );
1347
1348 int xbt_graph_parse_get_debug (void );
1349
1350 void xbt_graph_parse_set_debug (int debug_flag  );
1351
1352 YY_EXTRA_TYPE xbt_graph_parse_get_extra (void );
1353
1354 void xbt_graph_parse_set_extra (YY_EXTRA_TYPE user_defined  );
1355
1356 FILE *xbt_graph_parse_get_in (void );
1357
1358 void xbt_graph_parse_set_in  (FILE * in_str  );
1359
1360 FILE *xbt_graph_parse_get_out (void );
1361
1362 void xbt_graph_parse_set_out  (FILE * out_str  );
1363
1364 int xbt_graph_parse_get_leng (void );
1365
1366 char *xbt_graph_parse_get_text (void );
1367
1368 int xbt_graph_parse_get_lineno (void );
1369
1370 void xbt_graph_parse_set_lineno (int line_number  );
1371
1372 /* Macros after this point can all be overridden by user definitions in
1373  * section 1.
1374  */
1375
1376 #ifndef YY_SKIP_YYWRAP
1377 #ifdef __cplusplus
1378 extern "C" int xbt_graph_parse_wrap (void );
1379 #else
1380 extern int xbt_graph_parse_wrap (void );
1381 #endif
1382 #endif
1383
1384 #ifndef yytext_ptr
1385 static void yy_flex_strncpy (char *,yyconst char *,int );
1386 #endif
1387
1388 #ifdef YY_NEED_STRLEN
1389 static int yy_flex_strlen (yyconst char * );
1390 #endif
1391
1392 #ifndef YY_NO_INPUT
1393
1394 #ifdef __cplusplus
1395 static int yyinput (void );
1396 #else
1397 static int input (void );
1398 #endif
1399
1400 #endif
1401
1402         static int yy_start_stack_ptr = 0;
1403         static int yy_start_stack_depth = 0;
1404         static int *yy_start_stack = NULL;
1405     
1406     static void yy_push_state (int new_state );
1407     
1408     static void yy_pop_state (void );
1409     
1410 /* Amount of stuff to slurp up with each read. */
1411 #ifndef YY_READ_BUF_SIZE
1412 #define YY_READ_BUF_SIZE 8192
1413 #endif
1414
1415 /* Copy whatever the last rule matched to the standard output. */
1416 #ifndef ECHO
1417 /* This used to be an fputs(), but since the string might contain NUL's,
1418  * we now use fwrite().
1419  */
1420 #define ECHO do { if (fwrite( xbt_graph_parse_text, xbt_graph_parse_leng, 1, xbt_graph_parse_out )) {} } while (0)
1421 #endif
1422
1423 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
1424  * is returned in "result".
1425  */
1426 #ifndef YY_INPUT
1427 #define YY_INPUT(buf,result,max_size) \
1428         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1429                 { \
1430                 int c = '*'; \
1431                 size_t n; \
1432                 for ( n = 0; n < max_size && \
1433                              (c = getc( xbt_graph_parse_in )) != EOF && c != '\n'; ++n ) \
1434                         buf[n] = (char) c; \
1435                 if ( c == '\n' ) \
1436                         buf[n++] = (char) c; \
1437                 if ( c == EOF && ferror( xbt_graph_parse_in ) ) \
1438                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
1439                 result = n; \
1440                 } \
1441         else \
1442                 { \
1443                 errno=0; \
1444                 while ( (result = fread(buf, 1, max_size, xbt_graph_parse_in))==0 && ferror(xbt_graph_parse_in)) \
1445                         { \
1446                         if( errno != EINTR) \
1447                                 { \
1448                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1449                                 break; \
1450                                 } \
1451                         errno=0; \
1452                         clearerr(xbt_graph_parse_in); \
1453                         } \
1454                 }\
1455 \
1456
1457 #endif
1458
1459 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1460  * we don't want an extra ';' after the "return" because that will cause
1461  * some compilers to complain about unreachable statements.
1462  */
1463 #ifndef yyterminate
1464 #define yyterminate() return YY_NULL
1465 #endif
1466
1467 /* Number of entries by which start-condition stack grows. */
1468 #ifndef YY_START_STACK_INCR
1469 #define YY_START_STACK_INCR 25
1470 #endif
1471
1472 /* Report a fatal error. */
1473 #ifndef YY_FATAL_ERROR
1474 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1475 #endif
1476
1477 /* end tables serialization structures and prototypes */
1478
1479 /* Default declaration of generated scanner - a define so the user can
1480  * easily add parameters.
1481  */
1482 #ifndef YY_DECL
1483 #define YY_DECL_IS_OURS 1
1484
1485 extern int xbt_graph_parse_lex (void);
1486
1487 #define YY_DECL int xbt_graph_parse_lex (void)
1488 #endif /* !YY_DECL */
1489
1490 /* Code executed at the beginning of each rule, after xbt_graph_parse_text and xbt_graph_parse_leng
1491  * have been set up.
1492  */
1493 #ifndef YY_USER_ACTION
1494 #define YY_USER_ACTION
1495 #endif
1496
1497 /* Code executed at the end of each rule. */
1498 #ifndef YY_BREAK
1499 #define YY_BREAK break;
1500 #endif
1501
1502 #define YY_RULE_SETUP \
1503         YY_USER_ACTION
1504
1505 /** The main scanner function which does all the work.
1506  */
1507 YY_DECL
1508 {
1509         register yy_state_type yy_current_state;
1510         register char *yy_cp, *yy_bp;
1511         register int yy_act;
1512     
1513  /* Bypass Flex's default INITIAL state and begin by parsing the XML prolog. */
1514  SET(PROLOG);
1515  reset_graphxml_parse_err_msg();
1516  graphxml_bufferstack = (char *) malloc(FLEXML_BUFFERSTACKSIZE);
1517  assert(graphxml_bufferstack);
1518  #ifdef FLEX_DEBUG
1519  {
1520      int i;
1521      for (i = 0; i < blimit; i++) {
1522          graphxml_bufferstack[i] = '\377';
1523      }
1524  }
1525  #endif
1526  graphxml_bufferstack[0] = '\0';
1527  indexstack = (int *) malloc(FLEXML_INDEXSTACKSIZE * sizeof(int));
1528  assert(indexstack);
1529  indexstack[0] = 0;
1530
1531   /* FleXML_init */
1532   bnext = inext = 1;
1533   graphxml_bufferliteral('\0', &bnext, "-1.0");
1534   graphxml_bufferliteral('\0', &bnext, "-1.0");
1535   graphxml_bufferliteral('\0', &bnext, "-1.0");
1536   if(!graphxml_statenames) {graphxml_statenames= (const char **)calloc(IMPOSSIBLE,sizeof(char*));
1537   graphxml_statenames[PROLOG] = NULL;
1538   graphxml_statenames[DOCTYPE] = NULL;
1539   graphxml_statenames[EPILOG] = NULL;
1540   graphxml_statenames[INCOMMENT] = NULL;
1541   graphxml_statenames[INPI] = NULL;
1542   graphxml_statenames[VALUE1] = NULL;
1543   graphxml_statenames[VALUE2] = NULL;
1544   graphxml_statenames[CDATA] = NULL;
1545   graphxml_statenames[ROOT_graphxml_graph] = NULL;
1546   graphxml_statenames[AL_graphxml_graph] = NULL;
1547   graphxml_statenames[S_graphxml_graph] = "graph";
1548   graphxml_statenames[S_graphxml_graph_1] = "graph";
1549   graphxml_statenames[S_graphxml_graph_2] = "graph";
1550   graphxml_statenames[S_graphxml_graph_3] = "graph";
1551   graphxml_statenames[S_graphxml_graph_4] = "graph";
1552   graphxml_statenames[S_graphxml_graph_5] = "graph";
1553   graphxml_statenames[E_graphxml_graph] = "graph";
1554   graphxml_statenames[ROOT_graphxml_node] = NULL;
1555   graphxml_statenames[AL_graphxml_node] = NULL;
1556   graphxml_statenames[E_graphxml_node] = "node";
1557   graphxml_statenames[ROOT_graphxml_edge] = NULL;
1558   graphxml_statenames[AL_graphxml_edge] = NULL;
1559   graphxml_statenames[E_graphxml_edge] = "edge";
1560   }
1561
1562  /* COMMENTS and PIs: handled uniformly for efficiency. */
1563
1564         if ( !(yy_init) )
1565                 {
1566                 (yy_init) = 1;
1567
1568 #ifdef YY_USER_INIT
1569                 YY_USER_INIT;
1570 #endif
1571
1572                 if ( ! (yy_start) )
1573                         (yy_start) = 1; /* first start state */
1574
1575                 if ( ! xbt_graph_parse_in )
1576                         xbt_graph_parse_in = stdin;
1577
1578                 if ( ! xbt_graph_parse_out )
1579                         xbt_graph_parse_out = stdout;
1580
1581                 if ( ! YY_CURRENT_BUFFER ) {
1582                         xbt_graph_parse_ensure_buffer_stack ();
1583                         YY_CURRENT_BUFFER_LVALUE =
1584                                 xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE );
1585                 }
1586
1587                 xbt_graph_parse__load_buffer_state( );
1588                 }
1589
1590         while ( 1 )             /* loops until end-of-file is reached */
1591                 {
1592                 yy_cp = (yy_c_buf_p);
1593
1594                 /* Support of xbt_graph_parse_text. */
1595                 *yy_cp = (yy_hold_char);
1596
1597                 /* yy_bp points to the position in yy_ch_buf of the start of
1598                  * the current run.
1599                  */
1600                 yy_bp = yy_cp;
1601
1602                 yy_current_state = (yy_start);
1603 yy_match:
1604                 do
1605                         {
1606                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1607                         if ( yy_accept[yy_current_state] )
1608                                 {
1609                                 (yy_last_accepting_state) = yy_current_state;
1610                                 (yy_last_accepting_cpos) = yy_cp;
1611                                 }
1612                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1613                                 {
1614                                 yy_current_state = (int) yy_def[yy_current_state];
1615                                 if ( yy_current_state >= 564 )
1616                                         yy_c = yy_meta[(unsigned int) yy_c];
1617                                 }
1618                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1619                         ++yy_cp;
1620                         }
1621                 while ( yy_base[yy_current_state] != 1586 );
1622
1623 yy_find_action:
1624                 yy_act = yy_accept[yy_current_state];
1625                 if ( yy_act == 0 )
1626                         { /* have to back up */
1627                         yy_cp = (yy_last_accepting_cpos);
1628                         yy_current_state = (yy_last_accepting_state);
1629                         yy_act = yy_accept[yy_current_state];
1630                         }
1631
1632                 YY_DO_BEFORE_ACTION;
1633
1634                 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1635                         {
1636                         int yyl;
1637                         for ( yyl = 0; yyl < xbt_graph_parse_leng; ++yyl )
1638                                 if ( xbt_graph_parse_text[yyl] == '\n' )
1639                                            
1640     xbt_graph_parse_lineno++;
1641 ;
1642                         }
1643
1644 do_action:      /* This label is used only to access EOF actions. */
1645
1646                 switch ( yy_act )
1647         { /* beginning of action switch */
1648                         case 0: /* must back up */
1649                         /* undo the effects of YY_DO_BEFORE_ACTION */
1650                         *yy_cp = (yy_hold_char);
1651                         yy_cp = (yy_last_accepting_cpos);
1652                         yy_current_state = (yy_last_accepting_state);
1653                         goto yy_find_action;
1654
1655 case 1:
1656 YY_RULE_SETUP
1657 ENTER(INCOMMENT);
1658         YY_BREAK
1659 case 2:
1660 YY_RULE_SETUP
1661 ENTER(INPI);
1662         YY_BREAK
1663
1664 case 3:
1665 YY_RULE_SETUP
1666 LEAVE;
1667         YY_BREAK
1668 case 4:
1669 case 5:
1670 case 6:
1671 /* rule 6 can match eol */
1672 YY_RULE_SETUP
1673 SKIP;
1674         YY_BREAK
1675 case YY_STATE_EOF(INCOMMENT):
1676 FAIL("EOF in comment.");
1677         YY_BREAK
1678
1679 case 7:
1680 YY_RULE_SETUP
1681 LEAVE;
1682         YY_BREAK
1683 case 8:
1684 case 9:
1685 /* rule 9 can match eol */
1686 YY_RULE_SETUP
1687 SKIP;
1688         YY_BREAK
1689 case YY_STATE_EOF(INPI):
1690 FAIL("EOF in PI (processing instruction).");
1691         YY_BREAK
1692
1693 /* SPACES: skipped uniformly */
1694 case 10:
1695 /* rule 10 can match eol */
1696 YY_RULE_SETUP
1697 SKIP;
1698         YY_BREAK
1699 /* PROLOG: determine root element and process it. */
1700
1701 case 11:
1702 /* rule 11 can match eol */
1703 YY_RULE_SETUP
1704 SET(DOCTYPE); 
1705         YY_BREAK
1706 case 12:
1707 /* rule 12 can match eol */
1708 YY_RULE_SETUP
1709 FAIL("Bad declaration %s.",xbt_graph_parse_text);
1710         YY_BREAK
1711
1712 case 13:
1713 /* rule 13 can match eol */
1714 YY_RULE_SETUP
1715 SET(ROOT_graphxml_edge);
1716         YY_BREAK
1717 case 14:
1718 /* rule 14 can match eol */
1719 YY_RULE_SETUP
1720 SET(ROOT_graphxml_node);
1721         YY_BREAK
1722 case 15:
1723 /* rule 15 can match eol */
1724 YY_RULE_SETUP
1725 SET(ROOT_graphxml_graph);
1726         YY_BREAK
1727 case 16:
1728 /* rule 16 can match eol */
1729 YY_RULE_SETUP
1730 FAIL("Bad declaration %s.",xbt_graph_parse_text);
1731         YY_BREAK
1732 case 17:
1733 YY_RULE_SETUP
1734 FAIL("Unexpected character `%c' in prolog.", xbt_graph_parse_text[0]);
1735         YY_BREAK
1736 case YY_STATE_EOF(PROLOG):
1737 case YY_STATE_EOF(DOCTYPE):
1738 FAIL("EOF in prolog.");
1739         YY_BREAK
1740
1741 /* RULES DERIVED FROM DTD. */
1742 /* <!-- Small DTD for xbt graphs. -->  */
1743 /*     isDirected (true|false) "true"
1744   * >  */
1745 case 18:
1746 /* rule 18 can match eol */
1747 YY_RULE_SETUP
1748 FAIL("Starting tag <graph> is not allowed here.");
1749         YY_BREAK
1750 case 19:
1751 /* rule 19 can match eol */
1752 YY_RULE_SETUP
1753 {
1754   AX_graphxml_graph_isDirected = A_graphxml_graph_isDirected_true;
1755   ENTER(AL_graphxml_graph); pushbuffer(0);
1756   }
1757         YY_BREAK
1758
1759 case 20:
1760 /* rule 20 can match eol */
1761 case 21:
1762 /* rule 21 can match eol */
1763 YY_RULE_SETUP
1764 A_graphxml_graph_isDirected = A_graphxml_graph_isDirected_true;
1765         YY_BREAK
1766 case 22:
1767 /* rule 22 can match eol */
1768 case 23:
1769 /* rule 23 can match eol */
1770 YY_RULE_SETUP
1771 A_graphxml_graph_isDirected = A_graphxml_graph_isDirected_false;
1772         YY_BREAK
1773 case 24:
1774 YY_RULE_SETUP
1775 {
1776   LEAVE; STag_graphxml_graph();graphxml_pcdata_ix = 0; ENTER(S_graphxml_graph);
1777  }
1778         YY_BREAK
1779 case 25:
1780 YY_RULE_SETUP
1781 {
1782   LEAVE; STag_graphxml_graph(); graphxml_pcdata_ix = 0; ETag_graphxml_graph(); popbuffer(); /* attribute */
1783   switch (YY_START) {
1784    case ROOT_graphxml_graph: SET(EPILOG); break;
1785   }
1786  }
1787         YY_BREAK
1788 case 26:
1789 YY_RULE_SETUP
1790 FAIL("Unexpected character `%c' in attribute list of graph element.", xbt_graph_parse_text[0]);
1791         YY_BREAK
1792 case 27:
1793 YY_RULE_SETUP
1794 FAIL("Bad attribute `%s' in `graph' element start tag.",xbt_graph_parse_text);
1795         YY_BREAK
1796 case YY_STATE_EOF(AL_graphxml_graph):
1797 FAIL("EOF in attribute list of `graph' element.");
1798         YY_BREAK
1799
1800 case 28:
1801 /* rule 28 can match eol */
1802 YY_RULE_SETUP
1803 {
1804   LEAVE;
1805   ETag_graphxml_graph();
1806   popbuffer(); /* attribute */
1807   switch (YY_START) {
1808    case ROOT_graphxml_graph: SET(EPILOG); break;
1809   }
1810  }
1811         YY_BREAK
1812 case 29:
1813 /* rule 29 can match eol */
1814 YY_RULE_SETUP
1815 FAIL("Unexpected end-tag `%s': `</graph>' expected.",xbt_graph_parse_text);
1816         YY_BREAK
1817 case 30:
1818 YY_RULE_SETUP
1819 FAIL("Unexpected character `%c': `</graph>' expected.",xbt_graph_parse_text[0]);
1820         YY_BREAK
1821 case YY_STATE_EOF(S_graphxml_graph_1):
1822 case YY_STATE_EOF(E_graphxml_graph):
1823 case YY_STATE_EOF(S_graphxml_graph_3):
1824 case YY_STATE_EOF(S_graphxml_graph_5):
1825 case YY_STATE_EOF(S_graphxml_graph):
1826 FAIL("Premature EOF: `</graph>' expected.");
1827         YY_BREAK
1828
1829 /*     label           CDATA                ""
1830   *     name            CDATA                #REQUIRED
1831   *     data            CDATA                ""
1832   *     position_x          CDATA                "-1.0"
1833   *     position_y          CDATA                "-1.0"
1834   * >  */
1835 case 31:
1836 /* rule 31 can match eol */
1837 YY_RULE_SETUP
1838 FAIL("Starting tag <node> is not allowed here.");
1839         YY_BREAK
1840 case 32:
1841 /* rule 32 can match eol */
1842 YY_RULE_SETUP
1843 {
1844   AX_graphxml_node_label = 0;
1845   AX_graphxml_node_name = 0;
1846   AX_graphxml_node_data = 0;
1847   AX_graphxml_node_position_x = 1;
1848   AX_graphxml_node_position_y = 6;
1849   ENTER(AL_graphxml_node); pushbuffer(0);
1850   }
1851         YY_BREAK
1852
1853 case 33:
1854 /* rule 33 can match eol */
1855 YY_RULE_SETUP
1856 ENTER(VALUE1); BUFFERSET(AX_graphxml_node_label);
1857         YY_BREAK
1858 case 34:
1859 /* rule 34 can match eol */
1860 YY_RULE_SETUP
1861 ENTER(VALUE2); BUFFERSET(AX_graphxml_node_label);
1862         YY_BREAK
1863 case 35:
1864 /* rule 35 can match eol */
1865 YY_RULE_SETUP
1866 ENTER(VALUE1); BUFFERSET(AX_graphxml_node_name);
1867         YY_BREAK
1868 case 36:
1869 /* rule 36 can match eol */
1870 YY_RULE_SETUP
1871 ENTER(VALUE2); BUFFERSET(AX_graphxml_node_name);
1872         YY_BREAK
1873 case 37:
1874 /* rule 37 can match eol */
1875 YY_RULE_SETUP
1876 ENTER(VALUE1); BUFFERSET(AX_graphxml_node_data);
1877         YY_BREAK
1878 case 38:
1879 /* rule 38 can match eol */
1880 YY_RULE_SETUP
1881 ENTER(VALUE2); BUFFERSET(AX_graphxml_node_data);
1882         YY_BREAK
1883 case 39:
1884 /* rule 39 can match eol */
1885 YY_RULE_SETUP
1886 ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position_x);
1887         YY_BREAK
1888 case 40:
1889 /* rule 40 can match eol */
1890 YY_RULE_SETUP
1891 ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position_x);
1892         YY_BREAK
1893 case 41:
1894 /* rule 41 can match eol */
1895 YY_RULE_SETUP
1896 ENTER(VALUE1); BUFFERSET(AX_graphxml_node_position_y);
1897         YY_BREAK
1898 case 42:
1899 /* rule 42 can match eol */
1900 YY_RULE_SETUP
1901 ENTER(VALUE2); BUFFERSET(AX_graphxml_node_position_y);
1902         YY_BREAK
1903 case 43:
1904 YY_RULE_SETUP
1905 {
1906   if (!AX_graphxml_node_name) FAIL("Required attribute `name' not set for `node' element.");
1907   LEAVE; STag_graphxml_node();graphxml_pcdata_ix = 0; ENTER(E_graphxml_node);
1908  }
1909         YY_BREAK
1910 case 44:
1911 YY_RULE_SETUP
1912 {
1913   if (!AX_graphxml_node_name) FAIL("Required attribute `name' not set for `node' element.");
1914   LEAVE; STag_graphxml_node(); graphxml_pcdata_ix = 0; ETag_graphxml_node(); popbuffer(); /* attribute */
1915   switch (YY_START) {
1916    case S_graphxml_graph_2: case S_graphxml_graph_3: case S_graphxml_graph: SET(S_graphxml_graph_3); break;
1917    case ROOT_graphxml_node: SET(EPILOG); break;
1918   }
1919  }
1920         YY_BREAK
1921 case 45:
1922 YY_RULE_SETUP
1923 FAIL("Unexpected character `%c' in attribute list of node element.", xbt_graph_parse_text[0]);
1924         YY_BREAK
1925 case 46:
1926 YY_RULE_SETUP
1927 FAIL("Bad attribute `%s' in `node' element start tag.",xbt_graph_parse_text);
1928         YY_BREAK
1929 case YY_STATE_EOF(AL_graphxml_node):
1930 FAIL("EOF in attribute list of `node' element.");
1931         YY_BREAK
1932
1933 case 47:
1934 /* rule 47 can match eol */
1935 YY_RULE_SETUP
1936 {
1937   LEAVE;
1938   ETag_graphxml_node();
1939   popbuffer(); /* attribute */
1940   switch (YY_START) {
1941    case S_graphxml_graph_2: case S_graphxml_graph_3: case S_graphxml_graph: SET(S_graphxml_graph_3); break;
1942    case ROOT_graphxml_node: SET(EPILOG); break;
1943   }
1944  }
1945         YY_BREAK
1946 case 48:
1947 /* rule 48 can match eol */
1948 YY_RULE_SETUP
1949 FAIL("Unexpected end-tag `%s': `</node>' expected.",xbt_graph_parse_text);
1950         YY_BREAK
1951 case 49:
1952 YY_RULE_SETUP
1953 FAIL("Unexpected character `%c': `</node>' expected.",xbt_graph_parse_text[0]);
1954         YY_BREAK
1955 case YY_STATE_EOF(E_graphxml_node):
1956 FAIL("Premature EOF: `</node>' expected.");
1957         YY_BREAK
1958
1959 /*     label           CDATA                ""
1960   *     name            CDATA               #IMPLIED
1961   *     source          CDATA               #REQUIRED
1962   *     target          CDATA               #REQUIRED
1963   *     length          CDATA               "-1.0"
1964   *     data            CDATA               ""
1965   * >  */
1966 case 50:
1967 /* rule 50 can match eol */
1968 YY_RULE_SETUP
1969 FAIL("Starting tag <edge> is not allowed here.");
1970         YY_BREAK
1971 case 51:
1972 /* rule 51 can match eol */
1973 YY_RULE_SETUP
1974 {
1975   AX_graphxml_edge_label = 0;
1976   AX_graphxml_edge_name = 0;
1977   AX_graphxml_edge_source = 0;
1978   AX_graphxml_edge_target = 0;
1979   AX_graphxml_edge_length = 11;
1980   AX_graphxml_edge_data = 0;
1981   ENTER(AL_graphxml_edge); pushbuffer(0);
1982   }
1983         YY_BREAK
1984
1985 case 52:
1986 /* rule 52 can match eol */
1987 YY_RULE_SETUP
1988 ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_label);
1989         YY_BREAK
1990 case 53:
1991 /* rule 53 can match eol */
1992 YY_RULE_SETUP
1993 ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_label);
1994         YY_BREAK
1995 case 54:
1996 /* rule 54 can match eol */
1997 YY_RULE_SETUP
1998 ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_name);
1999         YY_BREAK
2000 case 55:
2001 /* rule 55 can match eol */
2002 YY_RULE_SETUP
2003 ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_name);
2004         YY_BREAK
2005 case 56:
2006 /* rule 56 can match eol */
2007 YY_RULE_SETUP
2008 ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_source);
2009         YY_BREAK
2010 case 57:
2011 /* rule 57 can match eol */
2012 YY_RULE_SETUP
2013 ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_source);
2014         YY_BREAK
2015 case 58:
2016 /* rule 58 can match eol */
2017 YY_RULE_SETUP
2018 ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_target);
2019         YY_BREAK
2020 case 59:
2021 /* rule 59 can match eol */
2022 YY_RULE_SETUP
2023 ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_target);
2024         YY_BREAK
2025 case 60:
2026 /* rule 60 can match eol */
2027 YY_RULE_SETUP
2028 ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_length);
2029         YY_BREAK
2030 case 61:
2031 /* rule 61 can match eol */
2032 YY_RULE_SETUP
2033 ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_length);
2034         YY_BREAK
2035 case 62:
2036 /* rule 62 can match eol */
2037 YY_RULE_SETUP
2038 ENTER(VALUE1); BUFFERSET(AX_graphxml_edge_data);
2039         YY_BREAK
2040 case 63:
2041 /* rule 63 can match eol */
2042 YY_RULE_SETUP
2043 ENTER(VALUE2); BUFFERSET(AX_graphxml_edge_data);
2044         YY_BREAK
2045 case 64:
2046 YY_RULE_SETUP
2047 {
2048   if (!AX_graphxml_edge_source) FAIL("Required attribute `source' not set for `edge' element.");
2049   if (!AX_graphxml_edge_target) FAIL("Required attribute `target' not set for `edge' element.");
2050   LEAVE; STag_graphxml_edge();graphxml_pcdata_ix = 0; ENTER(E_graphxml_edge);
2051  }
2052         YY_BREAK
2053 case 65:
2054 YY_RULE_SETUP
2055 {
2056   if (!AX_graphxml_edge_source) FAIL("Required attribute `source' not set for `edge' element.");
2057   if (!AX_graphxml_edge_target) FAIL("Required attribute `target' not set for `edge' element.");
2058   LEAVE; STag_graphxml_edge(); graphxml_pcdata_ix = 0; ETag_graphxml_edge(); popbuffer(); /* attribute */
2059   switch (YY_START) {
2060    case S_graphxml_graph_1: case S_graphxml_graph_3: case S_graphxml_graph_5: case S_graphxml_graph_4: case S_graphxml_graph: SET(S_graphxml_graph_5); break;
2061    case ROOT_graphxml_edge: SET(EPILOG); break;
2062   }
2063  }
2064         YY_BREAK
2065 case 66:
2066 YY_RULE_SETUP
2067 FAIL("Unexpected character `%c' in attribute list of edge element.", xbt_graph_parse_text[0]);
2068         YY_BREAK
2069 case 67:
2070 YY_RULE_SETUP
2071 FAIL("Bad attribute `%s' in `edge' element start tag.",xbt_graph_parse_text);
2072         YY_BREAK
2073 case YY_STATE_EOF(AL_graphxml_edge):
2074 FAIL("EOF in attribute list of `edge' element.");
2075         YY_BREAK
2076
2077 case 68:
2078 /* rule 68 can match eol */
2079 YY_RULE_SETUP
2080 {
2081   LEAVE;
2082   ETag_graphxml_edge();
2083   popbuffer(); /* attribute */
2084   switch (YY_START) {
2085    case S_graphxml_graph_1: case S_graphxml_graph_3: case S_graphxml_graph_5: case S_graphxml_graph_4: case S_graphxml_graph: SET(S_graphxml_graph_5); break;
2086    case ROOT_graphxml_edge: SET(EPILOG); break;
2087   }
2088  }
2089         YY_BREAK
2090 case 69:
2091 /* rule 69 can match eol */
2092 YY_RULE_SETUP
2093 FAIL("Unexpected end-tag `%s': `</edge>' expected.",xbt_graph_parse_text);
2094         YY_BREAK
2095 case 70:
2096 YY_RULE_SETUP
2097 FAIL("Unexpected character `%c': `</edge>' expected.",xbt_graph_parse_text[0]);
2098         YY_BREAK
2099 case YY_STATE_EOF(E_graphxml_edge):
2100 FAIL("Premature EOF: `</edge>' expected.");
2101         YY_BREAK
2102
2103 /* EPILOG: after the root element. */
2104
2105 case 71:
2106 YY_RULE_SETUP
2107 {SET(PROLOG); yyless(0); CLEANUP; return -1;}
2108         YY_BREAK
2109 case YY_STATE_EOF(EPILOG):
2110 SUCCEED;
2111         YY_BREAK
2112
2113 /* CHARACTER DATA. */
2114
2115 /* Non-defined standard entities... */
2116 case 72:
2117 YY_RULE_SETUP
2118 BUFFERPUTC('&');
2119         YY_BREAK
2120 case 73:
2121 YY_RULE_SETUP
2122 BUFFERPUTC('<');
2123         YY_BREAK
2124 case 74:
2125 YY_RULE_SETUP
2126 BUFFERPUTC('>');
2127         YY_BREAK
2128 case 75:
2129 YY_RULE_SETUP
2130 BUFFERPUTC('\'');
2131         YY_BREAK
2132 case 76:
2133 YY_RULE_SETUP
2134 BUFFERPUTC('"');
2135         YY_BREAK
2136 /* Character entities. */
2137 case 77:
2138 YY_RULE_SETUP
2139 BUFFERPUTC((unsigned char)atoi(xbt_graph_parse_text+2));
2140         YY_BREAK
2141 case 78:
2142 YY_RULE_SETUP
2143 BUFFERPUTC((unsigned char)strtol(xbt_graph_parse_text+3,NULL,16));
2144         YY_BREAK
2145
2146 case 79:
2147 /* rule 79 can match eol */
2148 case 80:
2149 /* rule 80 can match eol */
2150 case 81:
2151 /* rule 81 can match eol */
2152 case 82:
2153 /* rule 82 can match eol */
2154 YY_RULE_SETUP
2155 BUFFERPUTC('\n');
2156         YY_BREAK
2157
2158 case 83:
2159 YY_RULE_SETUP
2160 ENTER(CDATA);
2161         YY_BREAK
2162 case 84:
2163 YY_RULE_SETUP
2164 FAIL("Unexpected `]""]>' in character data.");
2165         YY_BREAK
2166
2167 case 85:
2168 YY_RULE_SETUP
2169 BUFFERDONE; LEAVE;
2170         YY_BREAK
2171 case YY_STATE_EOF(VALUE1):
2172 FAIL("EOF in literal (\"'\" expected).");
2173         YY_BREAK
2174
2175 case 86:
2176 YY_RULE_SETUP
2177 BUFFERDONE; LEAVE;
2178         YY_BREAK
2179 case YY_STATE_EOF(VALUE2):
2180 FAIL("EOF in literal (`\"' expected).");
2181         YY_BREAK
2182
2183 case 87:
2184 /* rule 87 can match eol */
2185 YY_RULE_SETUP
2186 BUFFERPUTC(xbt_graph_parse_text[0]);
2187         YY_BREAK
2188 case 88:
2189 YY_RULE_SETUP
2190 FAIL("Spurious `%c' in character data.",xbt_graph_parse_text[0]);
2191         YY_BREAK
2192
2193 case 89:
2194 YY_RULE_SETUP
2195 LEAVE;
2196         YY_BREAK
2197 /* "]""]"               BUFFERPUTC(xbt_graph_parse_text[0]); BUFFERPUTC(xbt_graph_parse_text[1]); */
2198 case 90:
2199 YY_RULE_SETUP
2200 BUFFERPUTC(xbt_graph_parse_text[0]);
2201         YY_BREAK
2202 case YY_STATE_EOF(CDATA):
2203 FAIL("EOF in CDATA section.");
2204         YY_BREAK
2205
2206 /* Impossible rules to avoid warnings from flex(1). */
2207 /* Ideally, this should be replaced by code in flexml.pl that
2208     generates just the states not covered by other rules. */
2209
2210 case 91:
2211 /* rule 91 can match eol */
2212 YY_RULE_SETUP
2213 FAIL("Syntax error on character `%c'.", xbt_graph_parse_text[0]);
2214         YY_BREAK
2215
2216 case 92:
2217 YY_RULE_SETUP
2218 ECHO;
2219         YY_BREAK
2220 case YY_STATE_EOF(INITIAL):
2221 case YY_STATE_EOF(ROOT_graphxml_graph):
2222 case YY_STATE_EOF(S_graphxml_graph_2):
2223 case YY_STATE_EOF(S_graphxml_graph_4):
2224 case YY_STATE_EOF(ROOT_graphxml_node):
2225 case YY_STATE_EOF(ROOT_graphxml_edge):
2226 case YY_STATE_EOF(IMPOSSIBLE):
2227         yyterminate();
2228
2229         case YY_END_OF_BUFFER:
2230                 {
2231                 /* Amount of text matched not including the EOB char. */
2232                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2233
2234                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2235                 *yy_cp = (yy_hold_char);
2236                 YY_RESTORE_YY_MORE_OFFSET
2237
2238                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2239                         {
2240                         /* We're scanning a new file or input source.  It's
2241                          * possible that this happened because the user
2242                          * just pointed xbt_graph_parse_in at a new source and called
2243                          * xbt_graph_parse_lex().  If so, then we have to assure
2244                          * consistency between YY_CURRENT_BUFFER and our
2245                          * globals.  Here is the right place to do so, because
2246                          * this is the first action (other than possibly a
2247                          * back-up) that will match for the new input source.
2248                          */
2249                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2250                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = xbt_graph_parse_in;
2251                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2252                         }
2253
2254                 /* Note that here we test for yy_c_buf_p "<=" to the position
2255                  * of the first EOB in the buffer, since yy_c_buf_p will
2256                  * already have been incremented past the NUL character
2257                  * (since all states make transitions on EOB to the
2258                  * end-of-buffer state).  Contrast this with the test
2259                  * in input().
2260                  */
2261                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2262                         { /* This was really a NUL. */
2263                         yy_state_type yy_next_state;
2264
2265                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2266
2267                         yy_current_state = yy_get_previous_state(  );
2268
2269                         /* Okay, we're now positioned to make the NUL
2270                          * transition.  We couldn't have
2271                          * yy_get_previous_state() go ahead and do it
2272                          * for us because it doesn't know how to deal
2273                          * with the possibility of jamming (and we don't
2274                          * want to build jamming into it because then it
2275                          * will run more slowly).
2276                          */
2277
2278                         yy_next_state = yy_try_NUL_trans( yy_current_state );
2279
2280                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2281
2282                         if ( yy_next_state )
2283                                 {
2284                                 /* Consume the NUL. */
2285                                 yy_cp = ++(yy_c_buf_p);
2286                                 yy_current_state = yy_next_state;
2287                                 goto yy_match;
2288                                 }
2289
2290                         else
2291                                 {
2292                                 yy_cp = (yy_c_buf_p);
2293                                 goto yy_find_action;
2294                                 }
2295                         }
2296
2297                 else switch ( yy_get_next_buffer(  ) )
2298                         {
2299                         case EOB_ACT_END_OF_FILE:
2300                                 {
2301                                 (yy_did_buffer_switch_on_eof) = 0;
2302
2303                                 if ( xbt_graph_parse_wrap( ) )
2304                                         {
2305                                         /* Note: because we've taken care in
2306                                          * yy_get_next_buffer() to have set up
2307                                          * xbt_graph_parse_text, we can now set up
2308                                          * yy_c_buf_p so that if some total
2309                                          * hoser (like flex itself) wants to
2310                                          * call the scanner after we return the
2311                                          * YY_NULL, it'll still work - another
2312                                          * YY_NULL will get returned.
2313                                          */
2314                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2315
2316                                         yy_act = YY_STATE_EOF(YY_START);
2317                                         goto do_action;
2318                                         }
2319
2320                                 else
2321                                         {
2322                                         if ( ! (yy_did_buffer_switch_on_eof) )
2323                                                 YY_NEW_FILE;
2324                                         }
2325                                 break;
2326                                 }
2327
2328                         case EOB_ACT_CONTINUE_SCAN:
2329                                 (yy_c_buf_p) =
2330                                         (yytext_ptr) + yy_amount_of_matched_text;
2331
2332                                 yy_current_state = yy_get_previous_state(  );
2333
2334                                 yy_cp = (yy_c_buf_p);
2335                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2336                                 goto yy_match;
2337
2338                         case EOB_ACT_LAST_MATCH:
2339                                 (yy_c_buf_p) =
2340                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2341
2342                                 yy_current_state = yy_get_previous_state(  );
2343
2344                                 yy_cp = (yy_c_buf_p);
2345                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2346                                 goto yy_find_action;
2347                         }
2348                 break;
2349                 }
2350
2351         default:
2352                 YY_FATAL_ERROR(
2353                         "fatal flex scanner internal error--no action found" );
2354         } /* end of action switch */
2355                 } /* end of scanning one token */
2356 } /* end of xbt_graph_parse_lex */
2357
2358 /* yy_get_next_buffer - try to read in a new buffer
2359  *
2360  * Returns a code representing an action:
2361  *      EOB_ACT_LAST_MATCH -
2362  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2363  *      EOB_ACT_END_OF_FILE - end of file
2364  */
2365 static int yy_get_next_buffer (void)
2366 {
2367         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2368         register char *source = (yytext_ptr);
2369         register int number_to_move, i;
2370         int ret_val;
2371
2372         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2373                 YY_FATAL_ERROR(
2374                 "fatal flex scanner internal error--end of buffer missed" );
2375
2376         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2377                 { /* Don't try to fill the buffer, so this is an EOF. */
2378                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2379                         {
2380                         /* We matched a single character, the EOB, so
2381                          * treat this as a final EOF.
2382                          */
2383                         return EOB_ACT_END_OF_FILE;
2384                         }
2385
2386                 else
2387                         {
2388                         /* We matched some text prior to the EOB, first
2389                          * process it.
2390                          */
2391                         return EOB_ACT_LAST_MATCH;
2392                         }
2393                 }
2394
2395         /* Try to read more data. */
2396
2397         /* First move last chars to start of buffer. */
2398         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2399
2400         for ( i = 0; i < number_to_move; ++i )
2401                 *(dest++) = *(source++);
2402
2403         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2404                 /* don't do the read, it's not guaranteed to return an EOF,
2405                  * just force an EOF
2406                  */
2407                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2408
2409         else
2410                 {
2411                         int num_to_read =
2412                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2413
2414                 while ( num_to_read <= 0 )
2415                         { /* Not enough room in the buffer - grow it. */
2416
2417                         /* just a shorter name for the current buffer */
2418                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2419
2420                         int yy_c_buf_p_offset =
2421                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2422
2423                         if ( b->yy_is_our_buffer )
2424                                 {
2425                                 int new_size = b->yy_buf_size * 2;
2426
2427                                 if ( new_size <= 0 )
2428                                         b->yy_buf_size += b->yy_buf_size / 8;
2429                                 else
2430                                         b->yy_buf_size *= 2;
2431
2432                                 b->yy_ch_buf = (char *)
2433                                         /* Include room in for 2 EOB chars. */
2434                                         xbt_graph_parse_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
2435                                 }
2436                         else
2437                                 /* Can't grow it, we don't own it. */
2438                                 b->yy_ch_buf = 0;
2439
2440                         if ( ! b->yy_ch_buf )
2441                                 YY_FATAL_ERROR(
2442                                 "fatal error - scanner input buffer overflow" );
2443
2444                         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2445
2446                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2447                                                 number_to_move - 1;
2448
2449                         }
2450
2451                 if ( num_to_read > YY_READ_BUF_SIZE )
2452                         num_to_read = YY_READ_BUF_SIZE;
2453
2454                 /* Read in more data. */
2455                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2456                         (yy_n_chars), (size_t) num_to_read );
2457
2458                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2459                 }
2460
2461         if ( (yy_n_chars) == 0 )
2462                 {
2463                 if ( number_to_move == YY_MORE_ADJ )
2464                         {
2465                         ret_val = EOB_ACT_END_OF_FILE;
2466                         xbt_graph_parse_restart(xbt_graph_parse_in  );
2467                         }
2468
2469                 else
2470                         {
2471                         ret_val = EOB_ACT_LAST_MATCH;
2472                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2473                                 YY_BUFFER_EOF_PENDING;
2474                         }
2475                 }
2476
2477         else
2478                 ret_val = EOB_ACT_CONTINUE_SCAN;
2479
2480         if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2481                 /* Extend the array by 50%, plus the number we really need. */
2482                 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2483                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) xbt_graph_parse_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
2484                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2485                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2486         }
2487
2488         (yy_n_chars) += number_to_move;
2489         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2490         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2491
2492         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2493
2494         return ret_val;
2495 }
2496
2497 /* yy_get_previous_state - get the state just before the EOB char was reached */
2498
2499     static yy_state_type yy_get_previous_state (void)
2500 {
2501         register yy_state_type yy_current_state;
2502         register char *yy_cp;
2503     
2504         yy_current_state = (yy_start);
2505
2506         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2507                 {
2508                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2509                 if ( yy_accept[yy_current_state] )
2510                         {
2511                         (yy_last_accepting_state) = yy_current_state;
2512                         (yy_last_accepting_cpos) = yy_cp;
2513                         }
2514                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2515                         {
2516                         yy_current_state = (int) yy_def[yy_current_state];
2517                         if ( yy_current_state >= 564 )
2518                                 yy_c = yy_meta[(unsigned int) yy_c];
2519                         }
2520                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2521                 }
2522
2523         return yy_current_state;
2524 }
2525
2526 /* yy_try_NUL_trans - try to make a transition on the NUL character
2527  *
2528  * synopsis
2529  *      next_state = yy_try_NUL_trans( current_state );
2530  */
2531     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
2532 {
2533         register int yy_is_jam;
2534         register char *yy_cp = (yy_c_buf_p);
2535
2536         register YY_CHAR yy_c = 1;
2537         if ( yy_accept[yy_current_state] )
2538                 {
2539                 (yy_last_accepting_state) = yy_current_state;
2540                 (yy_last_accepting_cpos) = yy_cp;
2541                 }
2542         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2543                 {
2544                 yy_current_state = (int) yy_def[yy_current_state];
2545                 if ( yy_current_state >= 564 )
2546                         yy_c = yy_meta[(unsigned int) yy_c];
2547                 }
2548         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2549         yy_is_jam = (yy_current_state == 563);
2550
2551         return yy_is_jam ? 0 : yy_current_state;
2552 }
2553
2554 #ifndef YY_NO_INPUT
2555 #ifdef __cplusplus
2556     static int yyinput (void)
2557 #else
2558     static int input  (void)
2559 #endif
2560
2561 {
2562         int c;
2563     
2564         *(yy_c_buf_p) = (yy_hold_char);
2565
2566         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2567                 {
2568                 /* yy_c_buf_p now points to the character we want to return.
2569                  * If this occurs *before* the EOB characters, then it's a
2570                  * valid NUL; if not, then we've hit the end of the buffer.
2571                  */
2572                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2573                         /* This was really a NUL. */
2574                         *(yy_c_buf_p) = '\0';
2575
2576                 else
2577                         { /* need more input */
2578                         int offset = (yy_c_buf_p) - (yytext_ptr);
2579                         ++(yy_c_buf_p);
2580
2581                         switch ( yy_get_next_buffer(  ) )
2582                                 {
2583                                 case EOB_ACT_LAST_MATCH:
2584                                         /* This happens because yy_g_n_b()
2585                                          * sees that we've accumulated a
2586                                          * token and flags that we need to
2587                                          * try matching the token before
2588                                          * proceeding.  But for input(),
2589                                          * there's no matching to consider.
2590                                          * So convert the EOB_ACT_LAST_MATCH
2591                                          * to EOB_ACT_END_OF_FILE.
2592                                          */
2593
2594                                         /* Reset buffer status. */
2595                                         xbt_graph_parse_restart(xbt_graph_parse_in );
2596
2597                                         /*FALLTHROUGH*/
2598
2599                                 case EOB_ACT_END_OF_FILE:
2600                                         {
2601                                         if ( xbt_graph_parse_wrap( ) )
2602                                                 return EOF;
2603
2604                                         if ( ! (yy_did_buffer_switch_on_eof) )
2605                                                 YY_NEW_FILE;
2606 #ifdef __cplusplus
2607                                         return yyinput();
2608 #else
2609                                         return input();
2610 #endif
2611                                         }
2612
2613                                 case EOB_ACT_CONTINUE_SCAN:
2614                                         (yy_c_buf_p) = (yytext_ptr) + offset;
2615                                         break;
2616                                 }
2617                         }
2618                 }
2619
2620         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
2621         *(yy_c_buf_p) = '\0';   /* preserve xbt_graph_parse_text */
2622         (yy_hold_char) = *++(yy_c_buf_p);
2623
2624         if ( c == '\n' )
2625                    
2626     xbt_graph_parse_lineno++;
2627 ;
2628
2629         return c;
2630 }
2631 #endif  /* ifndef YY_NO_INPUT */
2632
2633 /** Immediately switch to a different input stream.
2634  * @param input_file A readable stream.
2635  * 
2636  * @note This function does not reset the start condition to @c INITIAL .
2637  */
2638     void xbt_graph_parse_restart  (FILE * input_file )
2639 {
2640     
2641         if ( ! YY_CURRENT_BUFFER ){
2642         xbt_graph_parse_ensure_buffer_stack ();
2643                 YY_CURRENT_BUFFER_LVALUE =
2644             xbt_graph_parse__create_buffer(xbt_graph_parse_in,YY_BUF_SIZE );
2645         }
2646
2647         xbt_graph_parse__init_buffer(YY_CURRENT_BUFFER,input_file );
2648         xbt_graph_parse__load_buffer_state( );
2649 }
2650
2651 /** Switch to a different input buffer.
2652  * @param new_buffer The new input buffer.
2653  * 
2654  */
2655     void xbt_graph_parse__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
2656 {
2657     
2658         /* TODO. We should be able to replace this entire function body
2659          * with
2660          *              xbt_graph_parse_pop_buffer_state();
2661          *              xbt_graph_parse_push_buffer_state(new_buffer);
2662      */
2663         xbt_graph_parse_ensure_buffer_stack ();
2664         if ( YY_CURRENT_BUFFER == new_buffer )
2665                 return;
2666
2667         if ( YY_CURRENT_BUFFER )
2668                 {
2669                 /* Flush out information for old buffer. */
2670                 *(yy_c_buf_p) = (yy_hold_char);
2671                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2672                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2673                 }
2674
2675         YY_CURRENT_BUFFER_LVALUE = new_buffer;
2676         xbt_graph_parse__load_buffer_state( );
2677
2678         /* We don't actually know whether we did this switch during
2679          * EOF (xbt_graph_parse_wrap()) processing, but the only time this flag
2680          * is looked at is after xbt_graph_parse_wrap() is called, so it's safe
2681          * to go ahead and always set it.
2682          */
2683         (yy_did_buffer_switch_on_eof) = 1;
2684 }
2685
2686 static void xbt_graph_parse__load_buffer_state  (void)
2687 {
2688         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2689         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2690         xbt_graph_parse_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2691         (yy_hold_char) = *(yy_c_buf_p);
2692 }
2693
2694 /** Allocate and initialize an input buffer state.
2695  * @param file A readable stream.
2696  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2697  * 
2698  * @return the allocated buffer state.
2699  */
2700     YY_BUFFER_STATE xbt_graph_parse__create_buffer  (FILE * file, int  size )
2701 {
2702         YY_BUFFER_STATE b;
2703     
2704         b = (YY_BUFFER_STATE) xbt_graph_parse_alloc(sizeof( struct yy_buffer_state )  );
2705         if ( ! b )
2706                 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__create_buffer()" );
2707
2708         b->yy_buf_size = size;
2709
2710         /* yy_ch_buf has to be 2 characters longer than the size given because
2711          * we need to put in 2 end-of-buffer characters.
2712          */
2713         b->yy_ch_buf = (char *) xbt_graph_parse_alloc(b->yy_buf_size + 2  );
2714         if ( ! b->yy_ch_buf )
2715                 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__create_buffer()" );
2716
2717         b->yy_is_our_buffer = 1;
2718
2719         xbt_graph_parse__init_buffer(b,file );
2720
2721         return b;
2722 }
2723
2724 /** Destroy the buffer.
2725  * @param b a buffer created with xbt_graph_parse__create_buffer()
2726  * 
2727  */
2728     void xbt_graph_parse__delete_buffer (YY_BUFFER_STATE  b )
2729 {
2730     
2731         if ( ! b )
2732                 return;
2733
2734         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2735                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2736
2737         if ( b->yy_is_our_buffer )
2738                 xbt_graph_parse_free((void *) b->yy_ch_buf  );
2739
2740         xbt_graph_parse_free((void *) b  );
2741 }
2742
2743 #ifndef __cplusplus
2744 extern int isatty (int );
2745 #endif /* __cplusplus */
2746     
2747 /* Initializes or reinitializes a buffer.
2748  * This function is sometimes called more than once on the same buffer,
2749  * such as during a xbt_graph_parse_restart() or at EOF.
2750  */
2751     static void xbt_graph_parse__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
2752
2753 {
2754         int oerrno = errno;
2755     
2756         xbt_graph_parse__flush_buffer(b );
2757
2758         b->yy_input_file = file;
2759         b->yy_fill_buffer = 1;
2760
2761     /* If b is the current buffer, then xbt_graph_parse__init_buffer was _probably_
2762      * called from xbt_graph_parse_restart() or through yy_get_next_buffer.
2763      * In that case, we don't want to reset the lineno or column.
2764      */
2765     if (b != YY_CURRENT_BUFFER){
2766         b->yy_bs_lineno = 1;
2767         b->yy_bs_column = 0;
2768     }
2769
2770         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2771     
2772         errno = oerrno;
2773 }
2774
2775 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2776  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2777  * 
2778  */
2779     void xbt_graph_parse__flush_buffer (YY_BUFFER_STATE  b )
2780 {
2781         if ( ! b )
2782                 return;
2783
2784         b->yy_n_chars = 0;
2785
2786         /* We always need two end-of-buffer characters.  The first causes
2787          * a transition to the end-of-buffer state.  The second causes
2788          * a jam in that state.
2789          */
2790         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2791         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2792
2793         b->yy_buf_pos = &b->yy_ch_buf[0];
2794
2795         b->yy_at_bol = 1;
2796         b->yy_buffer_status = YY_BUFFER_NEW;
2797
2798         if ( b == YY_CURRENT_BUFFER )
2799                 xbt_graph_parse__load_buffer_state( );
2800 }
2801
2802 /** Pushes the new state onto the stack. The new state becomes
2803  *  the current state. This function will allocate the stack
2804  *  if necessary.
2805  *  @param new_buffer The new state.
2806  *  
2807  */
2808 void xbt_graph_parse_push_buffer_state (YY_BUFFER_STATE new_buffer )
2809 {
2810         if (new_buffer == NULL)
2811                 return;
2812
2813         xbt_graph_parse_ensure_buffer_stack();
2814
2815         /* This block is copied from xbt_graph_parse__switch_to_buffer. */
2816         if ( YY_CURRENT_BUFFER )
2817                 {
2818                 /* Flush out information for old buffer. */
2819                 *(yy_c_buf_p) = (yy_hold_char);
2820                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2821                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2822                 }
2823
2824         /* Only push if top exists. Otherwise, replace top. */
2825         if (YY_CURRENT_BUFFER)
2826                 (yy_buffer_stack_top)++;
2827         YY_CURRENT_BUFFER_LVALUE = new_buffer;
2828
2829         /* copied from xbt_graph_parse__switch_to_buffer. */
2830         xbt_graph_parse__load_buffer_state( );
2831         (yy_did_buffer_switch_on_eof) = 1;
2832 }
2833
2834 /** Removes and deletes the top of the stack, if present.
2835  *  The next element becomes the new top.
2836  *  
2837  */
2838 void xbt_graph_parse_pop_buffer_state (void)
2839 {
2840         if (!YY_CURRENT_BUFFER)
2841                 return;
2842
2843         xbt_graph_parse__delete_buffer(YY_CURRENT_BUFFER );
2844         YY_CURRENT_BUFFER_LVALUE = NULL;
2845         if ((yy_buffer_stack_top) > 0)
2846                 --(yy_buffer_stack_top);
2847
2848         if (YY_CURRENT_BUFFER) {
2849                 xbt_graph_parse__load_buffer_state( );
2850                 (yy_did_buffer_switch_on_eof) = 1;
2851         }
2852 }
2853
2854 /* Allocates the stack if it does not exist.
2855  *  Guarantees space for at least one push.
2856  */
2857 static void xbt_graph_parse_ensure_buffer_stack (void)
2858 {
2859         int num_to_alloc;
2860     
2861         if (!(yy_buffer_stack)) {
2862
2863                 /* First allocation is just for 2 elements, since we don't know if this
2864                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
2865                  * immediate realloc on the next call.
2866          */
2867                 num_to_alloc = 1;
2868                 (yy_buffer_stack) = (struct yy_buffer_state**)xbt_graph_parse_alloc
2869                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
2870                                                                 );
2871                 if ( ! (yy_buffer_stack) )
2872                         YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse_ensure_buffer_stack()" );
2873                                                                   
2874                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2875                                 
2876                 (yy_buffer_stack_max) = num_to_alloc;
2877                 (yy_buffer_stack_top) = 0;
2878                 return;
2879         }
2880
2881         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2882
2883                 /* Increase the buffer to prepare for a possible push. */
2884                 int grow_size = 8 /* arbitrary grow size */;
2885
2886                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2887                 (yy_buffer_stack) = (struct yy_buffer_state**)xbt_graph_parse_realloc
2888                                                                 ((yy_buffer_stack),
2889                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
2890                                                                 );
2891                 if ( ! (yy_buffer_stack) )
2892                         YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse_ensure_buffer_stack()" );
2893
2894                 /* zero only the new slots.*/
2895                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2896                 (yy_buffer_stack_max) = num_to_alloc;
2897         }
2898 }
2899
2900 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2901  * @param base the character buffer
2902  * @param size the size in bytes of the character buffer
2903  * 
2904  * @return the newly allocated buffer state object. 
2905  */
2906 YY_BUFFER_STATE xbt_graph_parse__scan_buffer  (char * base, yy_size_t  size )
2907 {
2908         YY_BUFFER_STATE b;
2909     
2910         if ( size < 2 ||
2911              base[size-2] != YY_END_OF_BUFFER_CHAR ||
2912              base[size-1] != YY_END_OF_BUFFER_CHAR )
2913                 /* They forgot to leave room for the EOB's. */
2914                 return 0;
2915
2916         b = (YY_BUFFER_STATE) xbt_graph_parse_alloc(sizeof( struct yy_buffer_state )  );
2917         if ( ! b )
2918                 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__scan_buffer()" );
2919
2920         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
2921         b->yy_buf_pos = b->yy_ch_buf = base;
2922         b->yy_is_our_buffer = 0;
2923         b->yy_input_file = 0;
2924         b->yy_n_chars = b->yy_buf_size;
2925         b->yy_is_interactive = 0;
2926         b->yy_at_bol = 1;
2927         b->yy_fill_buffer = 0;
2928         b->yy_buffer_status = YY_BUFFER_NEW;
2929
2930         xbt_graph_parse__switch_to_buffer(b  );
2931
2932         return b;
2933 }
2934
2935 /** Setup the input buffer state to scan a string. The next call to xbt_graph_parse_lex() will
2936  * scan from a @e copy of @a str.
2937  * @param yystr a NUL-terminated string to scan
2938  * 
2939  * @return the newly allocated buffer state object.
2940  * @note If you want to scan bytes that may contain NUL values, then use
2941  *       xbt_graph_parse__scan_bytes() instead.
2942  */
2943 YY_BUFFER_STATE xbt_graph_parse__scan_string (yyconst char * yystr )
2944 {
2945     
2946         return xbt_graph_parse__scan_bytes(yystr,strlen(yystr) );
2947 }
2948
2949 /** Setup the input buffer state to scan the given bytes. The next call to xbt_graph_parse_lex() will
2950  * scan from a @e copy of @a bytes.
2951  * @param bytes the byte buffer to scan
2952  * @param len the number of bytes in the buffer pointed to by @a bytes.
2953  * 
2954  * @return the newly allocated buffer state object.
2955  */
2956 YY_BUFFER_STATE xbt_graph_parse__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
2957 {
2958         YY_BUFFER_STATE b;
2959         char *buf;
2960         yy_size_t n;
2961         int i;
2962     
2963         /* Get memory for full buffer, including space for trailing EOB's. */
2964         n = _yybytes_len + 2;
2965         buf = (char *) xbt_graph_parse_alloc(n  );
2966         if ( ! buf )
2967                 YY_FATAL_ERROR( "out of dynamic memory in xbt_graph_parse__scan_bytes()" );
2968
2969         for ( i = 0; i < _yybytes_len; ++i )
2970                 buf[i] = yybytes[i];
2971
2972         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2973
2974         b = xbt_graph_parse__scan_buffer(buf,n );
2975         if ( ! b )
2976                 YY_FATAL_ERROR( "bad buffer in xbt_graph_parse__scan_bytes()" );
2977
2978         /* It's okay to grow etc. this buffer, and we should throw it
2979          * away when we're done.
2980          */
2981         b->yy_is_our_buffer = 1;
2982
2983         return b;
2984 }
2985
2986     static void yy_push_state (int  new_state )
2987 {
2988         if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
2989                 {
2990                 yy_size_t new_size;
2991
2992                 (yy_start_stack_depth) += YY_START_STACK_INCR;
2993                 new_size = (yy_start_stack_depth) * sizeof( int );
2994
2995                 if ( ! (yy_start_stack) )
2996                         (yy_start_stack) = (int *) xbt_graph_parse_alloc(new_size  );
2997
2998                 else
2999                         (yy_start_stack) = (int *) xbt_graph_parse_realloc((void *) (yy_start_stack),new_size  );
3000
3001                 if ( ! (yy_start_stack) )
3002                         YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
3003                 }
3004
3005         (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
3006
3007         BEGIN(new_state);
3008 }
3009
3010     static void yy_pop_state  (void)
3011 {
3012         if ( --(yy_start_stack_ptr) < 0 )
3013                 YY_FATAL_ERROR( "start-condition stack underflow" );
3014
3015         BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
3016 }
3017
3018 #ifndef YY_EXIT_FAILURE
3019 #define YY_EXIT_FAILURE 2
3020 #endif
3021
3022 static void yy_fatal_error (yyconst char* msg )
3023 {
3024         (void) fprintf( stderr, "%s\n", msg );
3025         exit( YY_EXIT_FAILURE );
3026 }
3027
3028 /* Redefine yyless() so it works in section 3 code. */
3029
3030 #undef yyless
3031 #define yyless(n) \
3032         do \
3033                 { \
3034                 /* Undo effects of setting up xbt_graph_parse_text. */ \
3035         int yyless_macro_arg = (n); \
3036         YY_LESS_LINENO(yyless_macro_arg);\
3037                 xbt_graph_parse_text[xbt_graph_parse_leng] = (yy_hold_char); \
3038                 (yy_c_buf_p) = xbt_graph_parse_text + yyless_macro_arg; \
3039                 (yy_hold_char) = *(yy_c_buf_p); \
3040                 *(yy_c_buf_p) = '\0'; \
3041                 xbt_graph_parse_leng = yyless_macro_arg; \
3042                 } \
3043         while ( 0 )
3044
3045 /* Accessor  methods (get/set functions) to struct members. */
3046
3047 /** Get the current line number.
3048  * 
3049  */
3050 int xbt_graph_parse_get_lineno  (void)
3051 {
3052         
3053     return xbt_graph_parse_lineno;
3054 }
3055
3056 /** Get the input stream.
3057  * 
3058  */
3059 FILE *xbt_graph_parse_get_in  (void)
3060 {
3061         return xbt_graph_parse_in;
3062 }
3063
3064 /** Get the output stream.
3065  * 
3066  */
3067 FILE *xbt_graph_parse_get_out  (void)
3068 {
3069         return xbt_graph_parse_out;
3070 }
3071
3072 /** Get the length of the current token.
3073  * 
3074  */
3075 int xbt_graph_parse_get_leng  (void)
3076 {
3077         return xbt_graph_parse_leng;
3078 }
3079
3080 /** Get the current token.
3081  * 
3082  */
3083
3084 char *xbt_graph_parse_get_text  (void)
3085 {
3086         return xbt_graph_parse_text;
3087 }
3088
3089 /** Set the current line number.
3090  * @param line_number
3091  * 
3092  */
3093 void xbt_graph_parse_set_lineno (int  line_number )
3094 {
3095     
3096     xbt_graph_parse_lineno = line_number;
3097 }
3098
3099 /** Set the input stream. This does not discard the current
3100  * input buffer.
3101  * @param in_str A readable stream.
3102  * 
3103  * @see xbt_graph_parse__switch_to_buffer
3104  */
3105 void xbt_graph_parse_set_in (FILE *  in_str )
3106 {
3107         xbt_graph_parse_in = in_str ;
3108 }
3109
3110 void xbt_graph_parse_set_out (FILE *  out_str )
3111 {
3112         xbt_graph_parse_out = out_str ;
3113 }
3114
3115 int xbt_graph_parse_get_debug  (void)
3116 {
3117         return xbt_graph_parse__flex_debug;
3118 }
3119
3120 void xbt_graph_parse_set_debug (int  bdebug )
3121 {
3122         xbt_graph_parse__flex_debug = bdebug ;
3123 }
3124
3125 static int yy_init_globals (void)
3126 {
3127         /* Initialization is the same as for the non-reentrant scanner.
3128      * This function is called from xbt_graph_parse_lex_destroy(), so don't allocate here.
3129      */
3130
3131     /* We do not touch xbt_graph_parse_lineno unless the option is enabled. */
3132     xbt_graph_parse_lineno =  1;
3133     
3134     (yy_buffer_stack) = 0;
3135     (yy_buffer_stack_top) = 0;
3136     (yy_buffer_stack_max) = 0;
3137     (yy_c_buf_p) = (char *) 0;
3138     (yy_init) = 0;
3139     (yy_start) = 0;
3140
3141     (yy_start_stack_ptr) = 0;
3142     (yy_start_stack_depth) = 0;
3143     (yy_start_stack) =  NULL;
3144
3145 /* Defined in main.c */
3146 #ifdef YY_STDINIT
3147     xbt_graph_parse_in = stdin;
3148     xbt_graph_parse_out = stdout;
3149 #else
3150     xbt_graph_parse_in = (FILE *) 0;
3151     xbt_graph_parse_out = (FILE *) 0;
3152 #endif
3153
3154     /* For future reference: Set errno on error, since we are called by
3155      * xbt_graph_parse_lex_init()
3156      */
3157     return 0;
3158 }
3159
3160 /* xbt_graph_parse_lex_destroy is for both reentrant and non-reentrant scanners. */
3161 int xbt_graph_parse_lex_destroy  (void)
3162 {
3163     
3164     /* Pop the buffer stack, destroying each element. */
3165         while(YY_CURRENT_BUFFER){
3166                 xbt_graph_parse__delete_buffer(YY_CURRENT_BUFFER  );
3167                 YY_CURRENT_BUFFER_LVALUE = NULL;
3168                 xbt_graph_parse_pop_buffer_state();
3169         }
3170
3171         /* Destroy the stack itself. */
3172         xbt_graph_parse_free((yy_buffer_stack) );
3173         (yy_buffer_stack) = NULL;
3174
3175     /* Destroy the start condition stack. */
3176         xbt_graph_parse_free((yy_start_stack)  );
3177         (yy_start_stack) = NULL;
3178
3179     /* Reset the globals. This is important in a non-reentrant scanner so the next time
3180      * xbt_graph_parse_lex() is called, initialization will occur. */
3181     yy_init_globals( );
3182
3183     return 0;
3184 }
3185
3186 /*
3187  * Internal utility routines.
3188  */
3189
3190 #ifndef yytext_ptr
3191 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3192 {
3193         register int i;
3194         for ( i = 0; i < n; ++i )
3195                 s1[i] = s2[i];
3196 }
3197 #endif
3198
3199 #ifdef YY_NEED_STRLEN
3200 static int yy_flex_strlen (yyconst char * s )
3201 {
3202         register int n;
3203         for ( n = 0; s[n]; ++n )
3204                 ;
3205
3206         return n;
3207 }
3208 #endif
3209
3210 void *xbt_graph_parse_alloc (yy_size_t  size )
3211 {
3212         return (void *) malloc( size );
3213 }
3214
3215 void *xbt_graph_parse_realloc  (void * ptr, yy_size_t  size )
3216 {
3217         /* The cast to (char *) in the following accommodates both
3218          * implementations that use char* generic pointers, and those
3219          * that use void* generic pointers.  It works with the latter
3220          * because both ANSI C and C++ allow castless assignment from
3221          * any pointer type to void*, and deal with argument conversions
3222          * as though doing an assignment.
3223          */
3224         return (void *) realloc( (char *) ptr, size );
3225 }
3226
3227 void xbt_graph_parse_free (void * ptr )
3228 {
3229         free( (char *) ptr );   /* see xbt_graph_parse_realloc() for (char *) cast */
3230 }
3231
3232 #define YYTABLES_NAME "yytables"
3233
3234 /* Element context stack lookup. */
3235 int graphxml_element_context(int i)
3236 {
3237   return (0<i && i<yy_start_stack_depth
3238           ? yy_start_stack[yy_start_stack_ptr - i]
3239           : 0);
3240 }
3241
3242 #ifdef FLEX_DEBUG
3243 void print_yy_stack(char* fmt, ...)
3244 {
3245   int i = 0; va_list ap; va_start(ap, fmt);
3246   vfprintf(stderr, fmt, ap);
3247   if (graphxml_statenames) {
3248       for (i=1; i<yy_start_stack_ptr; i++) {
3249           fprintf(stderr, "%s/", graphxml_statenames[yy_start_stack[i] ]);
3250       }
3251       fprintf(stderr,"%s\n", graphxml_statenames[YY_START]);
3252   }
3253   va_end(ap);
3254 }
3255
3256 void print_graphxml_bufferstack()
3257 {
3258     int i;
3259     fputs("Buffer: ", stderr);
3260     for (i = 0; i < blimit; i++) {
3261        if ( graphxml_bufferstack[i] == '\377' ) break;
3262          putc(graphxml_bufferstack[i], stderr);
3263     }
3264     putc('\n', stderr);
3265 }
3266
3267 static void debug_enter(int state, const char* statename) {
3268   yy_push_state(state);
3269   if (xbt_graph_parse__flex_debug) {
3270        print_yy_stack("--ENTER(%s) : ",statename);
3271        print_graphxml_bufferstack();
3272   }
3273 }
3274
3275 static void debug_leave(void) {
3276     if (xbt_graph_parse__flex_debug) {
3277         print_yy_stack("--LEAVE : ");
3278         print_graphxml_bufferstack();
3279     }
3280   yy_pop_state();
3281 }
3282
3283 static void debug_set(int state, const char* statename) {
3284   BEGIN(state);
3285   if (xbt_graph_parse__flex_debug) print_yy_stack("--SET(%s) : ",statename);
3286 }
3287 #endif
3288
3289 static void cleanup(void)
3290 {
3291     if (graphxml_statenames) {
3292         free(graphxml_statenames);
3293         graphxml_statenames = NULL;
3294     }
3295     free(graphxml_bufferstack);
3296     graphxml_bufferstack = NULL;
3297
3298     free(indexstack);
3299     indexstack = NULL;
3300 }
3301
3302 static int fail(const char* fmt, ...)
3303 {
3304     int chars_left, used;
3305     va_list ap; va_start(ap, fmt);
3306 #ifdef FLEXML_yylineno
3307     used = sprintf(flexml_err_msg,
3308                    "Invalid XML (XML input line %d, state %d): ",
3309                    xbt_graph_parse_lineno, YY_START);
3310 #else
3311     used = sprintf(flexml_err_msg,
3312                    "Invalid XML (state %d): ",
3313                    YY_START);
3314 #endif
3315     chars_left = flexml_max_err_msg_size - used - 1;
3316     vsnprintf(flexml_err_msg + used, chars_left, fmt, ap);
3317     va_end(ap);
3318
3319 #ifndef FLEXML_quiet_parser
3320     /* print directly to sdterr */
3321     fprintf(stderr, "%s\n", flexml_err_msg);
3322     flexml_err_msg[0] = '\0';
3323 #endif
3324
3325     cleanup();
3326
3327     return 1;
3328 }
3329