Logo AND Algorithmique Numérique Distribuée

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