Logo AND Algorithmique Numérique Distribuée

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