Logo AND Algorithmique Numérique Distribuée

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