Logo AND Algorithmique Numérique Distribuée

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