Logo AND Algorithmique Numérique Distribuée

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