Logo AND Algorithmique Numérique Distribuée

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