Logo AND Algorithmique Numérique Distribuée

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