Logo AND Algorithmique Numérique Distribuée

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