Logo AND Algorithmique Numérique Distribuée

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