Logo AND Algorithmique Numérique Distribuée

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